diff --git a/src/db/db/dbRegionLocalOperations.cc b/src/db/db/dbRegionLocalOperations.cc index feaabf569..f60484eb6 100644 --- a/src/db/db/dbRegionLocalOperations.cc +++ b/src/db/db/dbRegionLocalOperations.cc @@ -2381,8 +2381,11 @@ PolygonToEdgeLocalOperation::do_compute_local (db::Layout * /*layout*/, db::Cell db::properties_id_type prop_id = shapes_by_prop_id->first; + ep.clear (); + + size_t p = 0; for (auto s = shapes_by_prop_id->second.first.begin (); s != shapes_by_prop_id->second.first.end (); ++s) { - ep.insert (**s); + ep.insert (**s, p++); } db::property_injector > results_with_properties (&results.front (), prop_id); @@ -2395,7 +2398,6 @@ PolygonToEdgeLocalOperation::do_compute_local (db::Layout * /*layout*/, db::Cell } else { - // @@@ that's not correct, isn't it? // With intruders: to compute our local contribution we take the edges without and with intruders // and deliver what is in both sets @@ -2407,18 +2409,19 @@ PolygonToEdgeLocalOperation::do_compute_local (db::Layout * /*layout*/, db::Cell ep.clear (); - for (auto s = interactions.begin_subjects (); s != interactions.end_subjects (); ++s) { - ep.insert (s->second); + size_t p = 0; + for (auto s = shapes_by_prop_id->second.first.begin (); s != shapes_by_prop_id->second.first.end (); ++s) { + ep.insert (**s, ++p); } - for (auto i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) { - ep.insert (i->second.second); + for (auto s = shapes_by_prop_id->second.second.begin (); s != shapes_by_prop_id->second.second.end (); ++s) { + ep.insert (*(s->second), ++p); } std::vector edges2; db::EdgeContainer ec2 (edges2); ep.process (ec2, op); - // Runs the boolean AND between the result with and without intruders + // Runs the boolean AND between the result with and without intruders - this identifies outside edges db::box_scanner scanner; scanner.reserve (edges1.size () + edges2.size ()); diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index ab6532d72..9928e45de 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -2133,3 +2133,13 @@ TEST(150d_optimized_separation) { run_test (_this, "150", true); } + +TEST(151_edges_from_region_with_properties) +{ + run_test (_this, "151", false); +} + +TEST(151d_edges_from_region_with_properties) +{ + run_test (_this, "151", true); +} diff --git a/testdata/drc/drcSimpleTests_151.drc b/testdata/drc/drcSimpleTests_151.drc new file mode 100644 index 000000000..154464951 --- /dev/null +++ b/testdata/drc/drcSimpleTests_151.drc @@ -0,0 +1,14 @@ +source $drc_test_source +target $drc_test_target + +if $drc_test_deep + deep +end + +deep + +l1 = input(1, 0, enable_props) +l1.output(1, 0) + +l1.edges.output(100, 0) + diff --git a/testdata/drc/drcSimpleTests_151.gds b/testdata/drc/drcSimpleTests_151.gds new file mode 100644 index 000000000..9750b9468 Binary files /dev/null and b/testdata/drc/drcSimpleTests_151.gds differ diff --git a/testdata/drc/drcSimpleTests_au151.gds b/testdata/drc/drcSimpleTests_au151.gds new file mode 100644 index 000000000..75622fd4b Binary files /dev/null and b/testdata/drc/drcSimpleTests_au151.gds differ diff --git a/testdata/drc/drcSimpleTests_au151d.gds b/testdata/drc/drcSimpleTests_au151d.gds new file mode 100644 index 000000000..75622fd4b Binary files /dev/null and b/testdata/drc/drcSimpleTests_au151d.gds differ