mirror of https://github.com/KLayout/klayout.git
Added cell variants to polygon to edge processor
This commit is contained in:
parent
dd81fda27d
commit
c2df163b8a
|
|
@ -325,6 +325,7 @@ VariantsCollectorBase::separate_variants (db::Layout &layout, db::Cell &top_cell
|
|||
var_name += "$VAR" + tl::to_string (index);
|
||||
|
||||
ci_var = layout.add_cell (var_name.c_str ());
|
||||
m_called.insert (ci_var);
|
||||
layout.add_meta_info (ci_var, layout.begin_meta (*c), layout.end_meta (*c));
|
||||
copy_shapes (layout, ci_var, *c);
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,13 @@ void RelativeExtentsAsEdges::process (const db::Polygon &poly, std::vector<db::E
|
|||
|
||||
const TransformationReducer *RelativeExtentsAsEdges::vars () const
|
||||
{
|
||||
return & m_anisotropic_reducer;
|
||||
if (fabs (m_fx1) < db::epsilon && fabs (m_fy1) < db::epsilon && fabs (1.0 - m_fx2) < db::epsilon && fabs (1.0 - m_fy2) < db::epsilon) {
|
||||
return 0;
|
||||
} else if (fabs (m_fx1 - m_fy1) < db::epsilon && fabs (1.0 - (m_fx1 + m_fx2)) < db::epsilon && fabs (m_fx2 - m_fy2) < db::epsilon && fabs (1.0 - (m_fy1 + m_fy2)) < db::epsilon) {
|
||||
return & m_isotropic_reducer;
|
||||
} else {
|
||||
return & m_anisotropic_reducer;
|
||||
}
|
||||
}
|
||||
|
||||
bool RelativeExtentsAsEdges::result_must_not_be_merged () const
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ public:
|
|||
private:
|
||||
double m_fx1, m_fy1, m_fx2, m_fy2;
|
||||
db::MagnificationAndOrientationReducer m_anisotropic_reducer;
|
||||
db::MagnificationReducer m_isotropic_reducer;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,5 +28,5 @@ l1.drc(middle).output(110, 0)
|
|||
l1.drc(middle(as_dots)).output(111, 0)
|
||||
l1.drc(middle(as_boxes)).output(112, 0)
|
||||
l1.drc(extent_refs(0.0, 0.0, 0.25, 0.5, as_edges)).output(113, 0)
|
||||
l1.drc(extent_refs(0.0, 0.0, 0.25, 0.5, 0.5, 1.0, as_boxes)).output(114, 0)
|
||||
l1.drc(extent_refs(0.0, 0.0, 0.25, 0.5, as_boxes)).output(114, 0)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue