MCPcopy Create free account
hub / github.com/KLayout/klayout / start

Method start

src/laybasic/laybasic/layFinder.cc:89–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void
90Finder::start (lay::LayoutViewBase *view, unsigned int cv_index, const std::vector<db::DCplxTrans> &trans, const db::DBox &region, const db::DBox &scan_region, int min_level, int max_level, const std::vector<unsigned int> &layers)
91{
92 const lay::CellView &cv = view->cellview (cv_index);
93
94 reset_counter ();
95
96 m_layers = layers;
97 mp_layout = &cv->layout ();
98 mp_view = view;
99 m_cv_index = cv_index;
100 m_min_level = std::max (0, min_level);
101 m_max_level = std::max (m_min_level, std::min (max_level, m_top_level_sel ? ((int) cv.specific_path ().size () + 1) : max_level));
102
103 if (layers.size () == 1) {
104
105 m_box_convert = db::box_convert <db::CellInst, false> (*mp_layout, layers [0]);
106 m_cell_box_convert = db::box_convert <db::Cell, false> (layers [0]);
107
108 } else {
109
110 m_box_convert = db::box_convert <db::CellInst, false> (*mp_layout);
111 m_cell_box_convert = db::box_convert <db::Cell, false> ();
112
113 }
114
115 m_path.erase (m_path.begin (), m_path.end ());
116
117 for (std::vector<db::DCplxTrans>::const_iterator t = trans.begin (); t != trans.end (); ++t) {
118
119 db::VCplxTrans it = (*t * db::CplxTrans (mp_layout->dbu ())).inverted ();
120 m_region = it * region;
121 m_scan_region = it * scan_region;
122
123 do_find (*cv.cell (), int (cv.specific_path ().size ()), view->viewport ().trans () * *t, cv.context_trans ());
124
125 }
126}
127
128void
129Finder::test_edge (const db::ICplxTrans &trans, const db::Edge &edge, double &distance, bool &match)

Callers

nothing calls this directly

Calls 13

maxFunction · 0.85
minFunction · 0.85
cellviewMethod · 0.80
context_transMethod · 0.80
layoutMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
invertedMethod · 0.45
dbuMethod · 0.45
cellMethod · 0.45

Tested by

no test coverage detected