Bugfix: Region#edges wasn't working properly in deep mode with properties - edges are not separated according to polygon properties

This commit is contained in:
Matthias Koefferlein 2026-07-20 01:09:47 +02:00
parent 5060d0fcdb
commit 93c43d049a
6 changed files with 34 additions and 7 deletions

View File

@ -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<db::Edge, std::unordered_set<db::EdgeWithProperties> > 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<Edge> 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<db::Edge, size_t> scanner;
scanner.reserve (edges1.size () + edges2.size ());

View File

@ -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);
}

14
testdata/drc/drcSimpleTests_151.drc vendored Normal file
View File

@ -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)

BIN
testdata/drc/drcSimpleTests_151.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au151.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au151d.gds vendored Normal file

Binary file not shown.