diff --git a/src/db/db/dbRegion.cc b/src/db/db/dbRegion.cc index ae5ca987e..d362a7af9 100644 --- a/src/db/db/dbRegion.cc +++ b/src/db/db/dbRegion.cc @@ -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); diff --git a/src/db/db/gsiDeclDbRegion.cc b/src/db/db/gsiDeclDbRegion.cc index 5b37d1790..965fc3ce1 100644 --- a/src/db/db/gsiDeclDbRegion.cc +++ b/src/db/db/gsiDeclDbRegion.cc @@ -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) diff --git a/src/drc/drc/built-in-macros/drc.lym b/src/drc/drc/built-in-macros/drc.lym index ea52c850f..9de7b23dd 100644 --- a/src/drc/drc/built-in-macros/drc.lym +++ b/src/drc/drc/built-in-macros/drc.lym @@ -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. # diff --git a/testdata/drc/drcSimpleTests_4.drc b/testdata/drc/drcSimpleTests_4.drc index 280fafc98..b729ee968 100644 --- a/testdata/drc/drcSimpleTests_4.drc +++ b/testdata/drc/drcSimpleTests_4.drc @@ -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) diff --git a/testdata/drc/drcSimpleTests_au4.oas b/testdata/drc/drcSimpleTests_au4.oas index 7a7a8d6b0..3a6f5f206 100644 Binary files a/testdata/drc/drcSimpleTests_au4.oas and b/testdata/drc/drcSimpleTests_au4.oas differ