More specific clip variants after bounding boxes have been reduced in RecursiveShapeIterator

This commit is contained in:
Matthias Koefferlein 2021-11-01 17:27:52 +01:00
parent bc54ba3b99
commit a0367c1530
9 changed files with 17 additions and 5 deletions

View File

@ -381,14 +381,16 @@ HierarchyBuilder::new_inst_member (const RecursiveShapeIterator *iter, const db:
} else {
db::Box cell_bbox = iter->layout ()->cell (inst.object ().cell_index ()).bbox ();
db::cell_index_type inst_cell = inst.object ().cell_index ();
db::Box cell_bbox = iter->cell_bbox (inst_cell);
std::pair<bool, std::set<db::Box> > clip_variant = compute_clip_variant (cell_bbox, trans, region, complex_region);
if (! clip_variant.first) {
return false;
}
CellMapKey key (inst.object ().cell_index (), iter->is_child_inactive (inst.object ().cell_index ()), clip_variant.second);
db::cell_index_type new_cell = make_cell_variant (key, iter->layout ()->cell_name (inst.object ().cell_index ()));
CellMapKey key (inst.object ().cell_index (), iter->is_child_inactive (inst_cell), clip_variant.second);
db::cell_index_type new_cell = make_cell_variant (key, iter->layout ()->cell_name (inst_cell));
// for a new cell, create this instance
if (m_cell_stack.back ().first) {

View File

@ -775,7 +775,7 @@ RecursiveShapeIterator::down (RecursiveShapeReceiver *receiver) const
// compute the region inside the new cell
if (new_region != m_region) {
new_region = m_trans.inverted () * m_region;
new_region &= m_box_convert (db::CellInst (cell ()->cell_index ()));
new_region &= cell_bbox (cell_index ());
}
m_local_region_stack.push_back (new_region);
@ -969,7 +969,7 @@ RecursiveShapeIterator::new_inst_member (RecursiveShapeReceiver *receiver) const
// skip instance array members not part of the complex region
while (! m_inst_array.at_end ()) {
db::Box ia_box = m_inst->complex_trans (*m_inst_array) * m_box_convert (m_inst->cell_inst ().object ());
db::Box ia_box = m_inst->complex_trans (*m_inst_array) * cell_bbox (m_inst->cell_index ());
if (! is_outside_complex_region (ia_box)) {
break;
} else {

View File

@ -665,6 +665,16 @@ public:
return reinterpret_cast<const cell_type *> (c - (c & size_t (3)));
}
/**
* @brief Gets the current cell's bounding box
*
* The returned box is limited to the selected layer if applicable.
*/
box_type cell_bbox (db::cell_index_type cell_index) const
{
return m_box_convert (db::CellInst (cell_index));
}
/**
* @brief Increments the iterator (operator version)
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.