Merge pull request #2388 from KLayout/bugfix/issue-2384

Fixed issue #2384
This commit is contained in:
Matthias Köfferlein 2026-07-12 00:23:03 +02:00 committed by GitHub
commit 4ac26d686d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 30 additions and 10 deletions

View File

@ -1682,13 +1682,9 @@ CompoundRegionCheckOperationNode::computed_dist () const
void
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
{
// consider magnification variants
db::EdgeRelationFilter check = m_check;
check.set_distance (proc->dist_for_cell (cell, check.distance ()));
// TODO: needs a concept to deal with merged/non-merged inputs
bool is_merged = true;
db::check_local_operation<db::PolygonWithProperties, db::PolygonWithProperties> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
db::check_local_operation<db::PolygonWithProperties, db::PolygonWithProperties> op (m_check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
tl_assert (results.size () == 1);
if (results.front ().empty ()) {
@ -1704,13 +1700,9 @@ CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache
void
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
{
// consider magnification variants
db::EdgeRelationFilter check = m_check;
check.set_distance (proc->dist_for_cell (cell, check.distance ()));
// TODO: needs a concept to deal with merged/non-merged inputs
bool is_merged = true;
db::check_local_operation<db::PolygonRefWithProperties, db::PolygonRefWithProperties> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
db::check_local_operation<db::PolygonRefWithProperties, db::PolygonRefWithProperties> op (m_check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
tl_assert (results.size () == 1);
if (results.front ().empty ()) {

View File

@ -2113,3 +2113,13 @@ TEST(148_sparse_array_limit)
run_test (_this, "148", true);
}
// issue 2384
TEST(149_compound_drc_with_mag)
{
run_test (_this, "149", false);
}
TEST(149d_compound_drc_with_mag)
{
run_test (_this, "149", true);
}

18
testdata/drc/drcSimpleTests_149.drc vendored Normal file
View File

@ -0,0 +1,18 @@
source $drc_test_source
target $drc_test_target
if $drc_test_deep
deep
end
deep
metal2_drawn = polygons(36, 0)
metal2_slot = polygons(36, 3)
metal2_drawn.output(36, 0)
metal2_slot.output(36, 3)
violations_enclosed = metal2_slot.drc(enclosed(metal2_drawn) < 10.um)
violations_enclosed.output(100, 0)

BIN
testdata/drc/drcSimpleTests_149.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au149.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au149d.gds vendored Normal file

Binary file not shown.