diff --git a/src/db/db/dbInstElement.h b/src/db/db/dbInstElement.h index 850c93e63..b49a67de4 100644 --- a/src/db/db/dbInstElement.h +++ b/src/db/db/dbInstElement.h @@ -85,7 +85,8 @@ struct DB_PUBLIC InstElement * * @param bc The bounding box converter for the cell instance (db::box_convert) */ - db::Box bbox (const db::box_convert &bc) const + template + db::Box bbox (const BoxConvert &bc) const { if (whole_array ()) { // this is the whole array diff --git a/src/edt/edt/edtService.cc b/src/edt/edt/edtService.cc index d6ff82a2d..9492b4ed0 100644 --- a/src/edt/edt/edtService.cc +++ b/src/edt/edt/edtService.cc @@ -627,7 +627,7 @@ Service::selection_bbox () db::CplxTrans ctx_trans = db::CplxTrans (layout.dbu ()) * cv.context_trans () * r->trans (); - db::box_convert bc (layout); + db::box_convert bc (layout); if (! r->is_cell_inst ()) { const std::vector *tv_list = tv.per_cv_and_layer (r->cv_index (), r->layer ()); diff --git a/src/edt/edt/edtServiceImpl.cc b/src/edt/edt/edtServiceImpl.cc index bc72ec62e..634a70a86 100644 --- a/src/edt/edt/edtServiceImpl.cc +++ b/src/edt/edt/edtServiceImpl.cc @@ -1686,7 +1686,7 @@ InstService::do_begin_edit (const db::DPoint &p) std::pair ci = make_cell (cv); if (ci.first) { // use the snapped lower left corner of the bbox unless the origin is inside the bbox - db::Box cell_bbox = cv->layout ().cell (ci.second).bbox (); + db::Box cell_bbox = cv->layout ().cell (ci.second).bbox_with_empty (); if (! m_place_origin && ! cell_bbox.contains (db::Point ())) { db::CplxTrans ct (1.0, m_angle, m_mirror, db::DVector ()); m_disp = db::DPoint () + (m_disp - snap (cell_bbox.transformed (ct).lower_left () * cv->layout ().dbu ())); @@ -1830,7 +1830,7 @@ InstService::do_mouse_move (const db::DPoint &p) std::pair ci = make_cell (cv); if (ci.first) { // use the snapped lower left corner of the bbox unless the origin is inside the bbox - db::Box cell_bbox = cv->layout ().cell (ci.second).bbox (); + db::Box cell_bbox = cv->layout ().cell (ci.second).bbox_with_empty (); if (! m_place_origin && ! cell_bbox.contains (db::Point ())) { db::CplxTrans ct (1.0, m_angle, m_mirror, db::DVector ()); m_disp = db::DPoint () + (m_disp - snap (cell_bbox.transformed (ct).lower_left () * cv->layout ().dbu ())); diff --git a/src/laybasic/laybasic/layFinder.cc b/src/laybasic/laybasic/layFinder.cc index 6564e5f7e..bce8845b6 100644 --- a/src/laybasic/laybasic/layFinder.cc +++ b/src/laybasic/laybasic/layFinder.cc @@ -100,13 +100,13 @@ Finder::start (lay::LayoutViewBase *view, unsigned int cv_index, const std::vect if (layers.size () == 1) { - m_box_convert = db::box_convert (*mp_layout, (unsigned int) layers [0]); - m_cell_box_convert = db::box_convert ((unsigned int) layers [0]); + m_box_convert = db::box_convert (*mp_layout, (unsigned int) layers [0]); + m_cell_box_convert = db::box_convert ((unsigned int) layers [0]); } else { - m_box_convert = db::box_convert (*mp_layout); - m_cell_box_convert = db::box_convert (); + m_box_convert = db::box_convert (*mp_layout); + m_cell_box_convert = db::box_convert (); } @@ -836,10 +836,10 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d ++*mp_progress; db::Box ibox; - if (inst_cell.bbox ().empty ()) { + if (inst_cell.bbox_with_empty ().empty ()) { ibox = db::Box (db::Point (0, 0), db::Point (0, 0)); } else if (! m_visible_layers || level == mp_view->get_max_hier_levels () - 1 || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { - ibox = inst_cell.bbox (); + ibox = inst_cell.bbox_with_empty (); } else { for (std::vector::const_iterator l = m_visible_layer_indexes.begin (); l != m_visible_layer_indexes.end (); ++l) { ibox += inst_cell.bbox (*l); @@ -914,10 +914,10 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d double d = std::numeric_limits::max (); db::Box ibox; - if (inst_cell.bbox ().empty ()) { + if (inst_cell.bbox_with_empty ().empty ()) { ibox = db::Box (db::Point (0, 0), db::Point (0, 0)); } else if (! m_visible_layers || level == mp_view->get_max_hier_levels () - 1 || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { - ibox = inst_cell.bbox (); + ibox = inst_cell.bbox_with_empty (); } else { for (std::vector::const_iterator l = m_visible_layer_indexes.begin (); l != m_visible_layer_indexes.end (); ++l) { ibox += inst_cell.bbox (*l); diff --git a/src/laybasic/laybasic/layFinder.h b/src/laybasic/laybasic/layFinder.h index d02aaa09a..d93e0c9f1 100644 --- a/src/laybasic/laybasic/layFinder.h +++ b/src/laybasic/laybasic/layFinder.h @@ -218,8 +218,8 @@ private: bool m_point_mode; bool m_catch_all; bool m_top_level_sel; - db::box_convert m_box_convert; - db::box_convert m_cell_box_convert; + db::box_convert m_box_convert; + db::box_convert m_cell_box_convert; }; /** diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.cc b/src/laybasic/laybasic/layRedrawThreadWorker.cc index 5e86f737a..ef86fb2b8 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.cc +++ b/src/laybasic/laybasic/layRedrawThreadWorker.cc @@ -2282,7 +2282,7 @@ RedrawThreadWorker::iterate_variants_rec (const std::vector &redraw_re db::Coord lim = std::numeric_limits::max (); db::DBox world (trans * db::Box (db::Point (-lim, -lim), db::Point (lim, lim))); db::Box vp = db::Box (trans.inverted () * (world & db::DBox (*rr))); - vp &= mp_layout->cell (ci).bbox (); // this avoids problems when accessing designs through very large viewports + vp &= mp_layout->cell (ci).bbox_with_empty (); // this avoids problems when accessing designs through very large viewports if (! vp.empty ()) { actual_regions.push_back (vp); }