mirror of https://github.com/KLayout/klayout.git
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:
parent
5060d0fcdb
commit
93c43d049a
|
|
@ -2381,8 +2381,11 @@ PolygonToEdgeLocalOperation::do_compute_local (db::Layout * /*layout*/, db::Cell
|
||||||
|
|
||||||
db::properties_id_type prop_id = shapes_by_prop_id->first;
|
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) {
|
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);
|
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 {
|
} else {
|
||||||
|
|
||||||
// @@@ that's not correct, isn't it?
|
|
||||||
// With intruders: to compute our local contribution we take the edges without and with intruders
|
// With intruders: to compute our local contribution we take the edges without and with intruders
|
||||||
// and deliver what is in both sets
|
// and deliver what is in both sets
|
||||||
|
|
||||||
|
|
@ -2407,18 +2409,19 @@ PolygonToEdgeLocalOperation::do_compute_local (db::Layout * /*layout*/, db::Cell
|
||||||
|
|
||||||
ep.clear ();
|
ep.clear ();
|
||||||
|
|
||||||
for (auto s = interactions.begin_subjects (); s != interactions.end_subjects (); ++s) {
|
size_t p = 0;
|
||||||
ep.insert (s->second);
|
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) {
|
for (auto s = shapes_by_prop_id->second.second.begin (); s != shapes_by_prop_id->second.second.end (); ++s) {
|
||||||
ep.insert (i->second.second);
|
ep.insert (*(s->second), ++p);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Edge> edges2;
|
std::vector<Edge> edges2;
|
||||||
db::EdgeContainer ec2 (edges2);
|
db::EdgeContainer ec2 (edges2);
|
||||||
ep.process (ec2, op);
|
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;
|
db::box_scanner<db::Edge, size_t> scanner;
|
||||||
scanner.reserve (edges1.size () + edges2.size ());
|
scanner.reserve (edges1.size () + edges2.size ());
|
||||||
|
|
|
||||||
|
|
@ -2133,3 +2133,13 @@ TEST(150d_optimized_separation)
|
||||||
{
|
{
|
||||||
run_test (_this, "150", true);
|
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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue