diff --git a/src/plugins/tools/netx/db_plugin/dbHierProcessor.cc b/src/plugins/tools/netx/db_plugin/dbHierProcessor.cc index 39405385f..0828d72f0 100644 --- a/src/plugins/tools/netx/db_plugin/dbHierProcessor.cc +++ b/src/plugins/tools/netx/db_plugin/dbHierProcessor.cc @@ -155,21 +155,24 @@ void SelfOverlapMergeLocalOperation::compute_local (db::Layout *layout, const Sh db::EdgeProcessor ep; size_t p1 = 0, p2 = 1; - std::set seen2; + std::set seen; for (ShapeInteractions::iterator i = interactions.begin (); i != interactions.end (); ++i) { - const db::PolygonRef &subject = interactions.shape (i->first); - for (db::PolygonRef::polygon_edge_iterator e = subject.begin_edge (); ! e.at_end(); ++e) { - ep.insert (*e, p1); + if (seen.find (i->first) == seen.end ()) { + seen.insert (i->first); + const db::PolygonRef &subject = interactions.shape (i->first); + for (db::PolygonRef::polygon_edge_iterator e = subject.begin_edge (); ! e.at_end(); ++e) { + ep.insert (*e, p1); + } + p1 += 2; } - p1 += 2; for (db::ShapeInteractions::iterator2 o = i->second.begin (); o != i->second.end (); ++o) { // don't take the same (really the same, not an identical one) shape twice - the interaction // set does not take care to list just one copy of the same item on the intruder side. - if (seen2.find (*o) == seen2.end ()) { - seen2.insert (*o); + if (seen.find (*o) == seen.end ()) { + seen.insert (*o); const db::PolygonRef &intruder = interactions.shape (*o); for (db::PolygonRef::polygon_edge_iterator e = intruder.begin_edge (); ! e.at_end(); ++e) { ep.insert (*e, p2); @@ -414,6 +417,7 @@ public: } else { mp_result->add_shape (id2, *ref2); } + mp_result->add_interaction (id1, id2); } @@ -863,7 +867,11 @@ void LocalProcessor::compute_contexts (LocalProcessorContexts &contexts, for (std::set::const_iterator j = i->second.first.begin (); j != i->second.first.end (); ++j) { for (db::CellInstArray::iterator k = (*j)->begin_touching (nbox.enlarged (db::Vector (-1, -1)), inst_bcii); ! k.at_end (); ++k) { - intruders_below.first.insert (db::CellInstArray (db::CellInst ((*j)->object ().cell_index ()), tni * (*j)->complex_trans (*k))); + db::ICplxTrans tk = (*j)->complex_trans (*k); + // NOTE: no self-interactions + if (i->first != *j || tn != tk) { + intruders_below.first.insert (db::CellInstArray (db::CellInst ((*j)->object ().cell_index ()), tni * tk)); + } } } diff --git a/src/plugins/tools/netx/testdata/hlp10.oas b/src/plugins/tools/netx/testdata/hlp10.oas index 9a51e38d1..53aba0a97 100644 Binary files a/src/plugins/tools/netx/testdata/hlp10.oas and b/src/plugins/tools/netx/testdata/hlp10.oas differ diff --git a/src/plugins/tools/netx/testdata/hlp9.oas b/src/plugins/tools/netx/testdata/hlp9.oas index c12644748..16d63a4f8 100644 Binary files a/src/plugins/tools/netx/testdata/hlp9.oas and b/src/plugins/tools/netx/testdata/hlp9.oas differ diff --git a/src/plugins/tools/netx/unit_tests/dbHierProcessorTests.cc b/src/plugins/tools/netx/unit_tests/dbHierProcessorTests.cc index 9baedc2f5..b45f3b4e7 100644 --- a/src/plugins/tools/netx/unit_tests/dbHierProcessorTests.cc +++ b/src/plugins/tools/netx/unit_tests/dbHierProcessorTests.cc @@ -910,7 +910,7 @@ TEST(BasicSelfOverlap9) // from atop the CHILD cell don't interact with shapes inside CHILD, so there are 4 shapes rather than // 6. And the shapes from top inside the ring are not seen by the RING's subject shapes. "TOP[1] 0 insts, 0 shapes (1 times)\n" - "RING[1] 0 insts, 0 shapes (1 times)\n" + "RING[1] 0 insts, 1 shapes (1 times)\n" "CHILD1[1] 0 insts, 4 shapes (2 times)\n" ); }