mirror of https://github.com/KLayout/klayout.git
Two bug fixes in DRC related to flatten:
- Merge semantics wasn't transferred to flat region - Merge semantics wasn't set at all in deep region
This commit is contained in:
parent
bcc506adc6
commit
745696507f
|
|
@ -310,9 +310,8 @@ Region::flat_region ()
|
|||
if (! region) {
|
||||
region = new FlatRegion ();
|
||||
if (mp_delegate) {
|
||||
region->RegionDelegate::operator= (*mp_delegate); // copy basic flags
|
||||
region->insert_seq (begin ());
|
||||
}
|
||||
if (mp_delegate) {
|
||||
region->set_is_merged (mp_delegate->is_merged ());
|
||||
}
|
||||
set_delegate (region);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ static db::Region *new_si2 (const db::RecursiveShapeIterator &si, const db::ICpl
|
|||
|
||||
static db::Region *new_sid2 (const db::RecursiveShapeIterator &si, db::DeepShapeStore &dss, const db::ICplxTrans &trans, double area_ratio, size_t max_vertex_count)
|
||||
{
|
||||
return new db::Region (si, dss, trans, area_ratio, max_vertex_count);
|
||||
return new db::Region (si, dss, trans, true, area_ratio, max_vertex_count);
|
||||
}
|
||||
|
||||
static std::string to_string0 (const db::Region *r)
|
||||
|
|
|
|||
|
|
@ -1360,7 +1360,7 @@ CODE
|
|||
# It is an alias for the "&" operator.
|
||||
#
|
||||
# This method is available for polygon and edge layers.
|
||||
# If the first operand is an edge layer and the second is an edge layer, the
|
||||
# If the first operand is an edge layer and the second is a polygon layer, the
|
||||
# result will be the edges of the first operand which are inside or on the
|
||||
# borders of the polygons of the second operand.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -33,18 +33,45 @@ l2.output(2, 0)
|
|||
l1_flat.output(11, 0)
|
||||
l2_flat.output(12, 0)
|
||||
|
||||
l1.and(l2).output(1000, 0)
|
||||
l1_flat.and(l2).output(1001, 0)
|
||||
l1.and(l2_flat).output(1002, 0)
|
||||
l1_flat.and(l2_flat).output(1003, 0)
|
||||
r = l1.and(l2)
|
||||
r.output(1000, 0)
|
||||
r.extents.output(1100, 0)
|
||||
|
||||
l1.separation(l2, 0.3).output(1020, 0)
|
||||
l1_flat.separation(l2, 0.3).output(1021, 0)
|
||||
l1.separation(l2_flat, 0.3).output(1022, 0)
|
||||
l1_flat.separation(l2_flat, 0.3).output(1023, 0)
|
||||
r = l1_flat.and(l2)
|
||||
r.output(1001, 0)
|
||||
r.extents.output(1101, 0)
|
||||
|
||||
r = l1.and(l2_flat)
|
||||
r.output(1002, 0)
|
||||
r.extents.output(1102, 0)
|
||||
|
||||
r = l1_flat.and(l2_flat)
|
||||
r.output(1003, 0)
|
||||
r.extents.output(1103, 0)
|
||||
|
||||
r = l1.separation(l2, 0.3)
|
||||
r.output(1020, 0)
|
||||
r.extents.output(1120, 0)
|
||||
|
||||
r = l1_flat.separation(l2, 0.3)
|
||||
r.output(1021, 0)
|
||||
r.extents.output(1121, 0)
|
||||
|
||||
r = l1.separation(l2_flat, 0.3)
|
||||
r.output(1022, 0)
|
||||
r.extents.output(1122, 0)
|
||||
|
||||
r = l1_flat.separation(l2_flat, 0.3)
|
||||
r.output(1023, 0)
|
||||
r.extents.output(1123, 0)
|
||||
|
||||
r = l1.space(0.5)
|
||||
r.output(1010, 0)
|
||||
r.extents.output(1110, 0)
|
||||
|
||||
l1.space(0.2).output(1010, 0)
|
||||
l1.flatten
|
||||
l1.space(0.2).output(1011, 0)
|
||||
r = l1.space(0.5)
|
||||
r.output(1011, 0)
|
||||
r.extents.output(1111, 0)
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue