From 6b4e3b6e2a3daebb3184eb3db4446bfebb460563 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 20 Aug 2026 09:39:24 +0200 Subject: [PATCH 1/4] Fixing issue #2423 (local merge has to capture touching shapes) --- src/db/db/dbRegionLocalOperations.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/db/dbRegionLocalOperations.cc b/src/db/db/dbRegionLocalOperations.cc index 82c17c80e..1a2df425c 100644 --- a/src/db/db/dbRegionLocalOperations.cc +++ b/src/db/db/dbRegionLocalOperations.cc @@ -888,10 +888,10 @@ std::map check_local_operation::override_distance () const { // makes sure, the "foreign"-type pseudo-intruder used for merging only - // does not use the full search range, but only "touching". + // does not use the full search range, but only "touching" (distance 1). std::map od; if (check_local_operation_base::m_has_other) { - od.insert (std::make_pair (1, 0)); + od.insert (std::make_pair (1, 1)); } return od; } From 1b48dcb4cd7979d5731ef3549909f65aa36854f9 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 20 Aug 2026 09:44:24 +0200 Subject: [PATCH 2/4] Clarify documentation. --- src/db/db/dbBoxScanner.h | 6 +++--- src/db/db/dbLocalOperation.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/db/db/dbBoxScanner.h b/src/db/db/dbBoxScanner.h index fe7cbbff0..6a59239dc 100644 --- a/src/db/db/dbBoxScanner.h +++ b/src/db/db/dbBoxScanner.h @@ -297,10 +297,10 @@ public: * @brief Get the interactions between the stored objects * * Two objects interact if the boxes of the objects enlarged by the given value overlap. - * The enlargement is specified in units of width and height, i.e. half of the enlargement - * is applied to one side before the overlap check. * - * An enlargement of 1 means that boxes have to touch only in order to get an interaction. + * An enlargement of 1 means that boxes have to touch in order to get an interaction. + * An enlargement of 0 means that boxes have to overlap in order to get an interaction. + * To capture interactions between object precisely spaced d, use d+1 for the enlargement. * * The box scanner will report all interactions to the receiver object. See box_scanner_receiver * for details about the methods that this object must provide. diff --git a/src/db/db/dbLocalOperation.h b/src/db/db/dbLocalOperation.h index 8f8651865..28ef522c9 100644 --- a/src/db/db/dbLocalOperation.h +++ b/src/db/db/dbLocalOperation.h @@ -114,7 +114,8 @@ public: /** * @brief Gets the interaction distance - * A distance of means the shapes must overlap in order to interact. + * A distance of zero means the shapes must overlap in order to interact. + * A distance of 1 means the shapes need to touch in order to interact. */ virtual db::Coord dist () const { return 0; } From 570d5d50b3785a70e11aad2259865b236c9acb9f Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 20 Aug 2026 10:18:30 +0200 Subject: [PATCH 3/4] Adding tests --- src/drc/unit_tests/drcSimpleTests.cc | 10 ++++++++++ testdata/drc/drcSimpleTests_151.drc | 2 -- testdata/drc/drcSimpleTests_152.drc | 16 ++++++++++++++++ testdata/drc/drcSimpleTests_152.gds | Bin 0 -> 926 bytes testdata/drc/drcSimpleTests_au151.gds | Bin 2156 -> 1826 bytes testdata/drc/drcSimpleTests_au152.gds | Bin 0 -> 990 bytes testdata/drc/drcSimpleTests_au152d.gds | Bin 0 -> 1134 bytes 7 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 testdata/drc/drcSimpleTests_152.drc create mode 100644 testdata/drc/drcSimpleTests_152.gds create mode 100644 testdata/drc/drcSimpleTests_au152.gds create mode 100644 testdata/drc/drcSimpleTests_au152d.gds diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index 9928e45de..b86dc9e9e 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -2143,3 +2143,13 @@ TEST(151d_edges_from_region_with_properties) { run_test (_this, "151", true); } + +TEST(152_issue_2423) +{ + run_test (_this, "152", false); +} + +TEST(152d_issue_2423) +{ + run_test (_this, "152", true); +} diff --git a/testdata/drc/drcSimpleTests_151.drc b/testdata/drc/drcSimpleTests_151.drc index 154464951..52f90704c 100644 --- a/testdata/drc/drcSimpleTests_151.drc +++ b/testdata/drc/drcSimpleTests_151.drc @@ -5,8 +5,6 @@ if $drc_test_deep deep end -deep - l1 = input(1, 0, enable_props) l1.output(1, 0) diff --git a/testdata/drc/drcSimpleTests_152.drc b/testdata/drc/drcSimpleTests_152.drc new file mode 100644 index 000000000..0f144bdaf --- /dev/null +++ b/testdata/drc/drcSimpleTests_152.drc @@ -0,0 +1,16 @@ + +source $drc_test_source +target $drc_test_target + +if $drc_test_deep + deep +end + +l1 = polygons(1, 0) +l2 = polygons(2, 0) + +l1.output(1, 0) +l2.output(2, 0) + +l1.separation(l2, 10.um).output(100, 0) + diff --git a/testdata/drc/drcSimpleTests_152.gds b/testdata/drc/drcSimpleTests_152.gds new file mode 100644 index 0000000000000000000000000000000000000000..de8c2013c744c60daba9d6a24b21a88e42c41201 GIT binary patch literal 926 zcmZ`%u}T9$5PjKPHYcbk#;bB7q|ic8K@gjOl17Zd!Xl)zkRXVNwiapi7i{eG6Z`^e zf52X?QrZZ<8Fnr)WCxZv+`IQ?c4pz>To?6{t9~Oz4Kvur%6N{{`S#%fP%BrO`}ey? zZ_mTM*6ZfeWA7C8N?bSV{q6bL<;}%aA4v-MIfoMbyaTYaP)6Qn!cc4ukUtCn!^S%D zes{z(OBQ)1d^XHSbo4v^I#C}(^^-c}V|w8<1bLP|h9eXr@G*VX_))nc|IJ%ls!=3k z{4~AH0laGwmWN)ncBpUvMSW-@_m=1+FY4P_d)HnJjTemh6m#U}vrP8lkeNJz nRcW#v(11T|9Fs+uB*1(%7N^O2Ks9fGbOwt88#@C73kw4PbLJ+Q delta 264 zcmZ3)_eMa8fsKKQDS|~Qe(dWQq91?y9P|NX)^)6$EL&P P%)r1R2*m6_%)$Tw6KOpI diff --git a/testdata/drc/drcSimpleTests_au152.gds b/testdata/drc/drcSimpleTests_au152.gds new file mode 100644 index 0000000000000000000000000000000000000000..93a755d303b857756e860e46c51fe09146db38dc GIT binary patch literal 990 zcmZ`%u}T9`5S+YRE{8->j92AENuhT*uY`*aq}ANpZ>#xtMjpXBrUAYW(aFsTodZv%}L?Of2ukL%y8f+G89E-7Ep z&INsZa;*o>$=J}&i9Y^Rd?E(UK=J1taaZ2N(9Q*Y{Oo<|zr9E5r{%MJm+t2U{j*)- z9BFL*8&YGqzoskYnitIOQQjU<*Y@1*$o8|B_QUtAe%*_QSK`O92+xWiPk(rMuIH9l Jep%inz%LZHhLr#S literal 0 HcmV?d00001 diff --git a/testdata/drc/drcSimpleTests_au152d.gds b/testdata/drc/drcSimpleTests_au152d.gds new file mode 100644 index 0000000000000000000000000000000000000000..4a90a26c1954157ab469b9cb3e215c38860fc816 GIT binary patch literal 1134 zcmbVKu}T9`5S+YRE_budqb~cjyiaGr{GlJFXFT(X{z*RT9pr28Y$owx@^zrGqTLJn_?6lhtDwktG?tXF zX!n9XKDqV=_Q}}L?ukDBROM6*oPpx^8!8={iJ{#K`uOSpssA>Q#81no`7X7e={GX= z?Wfgwb!;c;M-rP4hD=#5OJ|Mql%w^6>HYNWm(^$K{dd3i6Mx8$KJR3vS2CXydC;uP S=kXUWFZAB>`v0QrNq`^R>XsJ( literal 0 HcmV?d00001 From e890bcc393b6db26493558c1ce20c98428f9a1b3 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 20 Aug 2026 11:19:57 +0200 Subject: [PATCH 4/4] Resolving conflict with master --- src/drc/unit_tests/drcSimpleTests.cc | 8 ++++---- ...rcSimpleTests_152.drc => drcSimpleTests_153.drc} | 0 ...rcSimpleTests_152.gds => drcSimpleTests_153.gds} | Bin ...mpleTests_au152.gds => drcSimpleTests_au153.gds} | Bin ...leTests_au152d.gds => drcSimpleTests_au153d.gds} | Bin 5 files changed, 4 insertions(+), 4 deletions(-) rename testdata/drc/{drcSimpleTests_152.drc => drcSimpleTests_153.drc} (100%) rename testdata/drc/{drcSimpleTests_152.gds => drcSimpleTests_153.gds} (100%) rename testdata/drc/{drcSimpleTests_au152.gds => drcSimpleTests_au153.gds} (100%) rename testdata/drc/{drcSimpleTests_au152d.gds => drcSimpleTests_au153d.gds} (100%) diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index b86dc9e9e..5c61f7aa1 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -2144,12 +2144,12 @@ TEST(151d_edges_from_region_with_properties) run_test (_this, "151", true); } -TEST(152_issue_2423) +TEST(153_issue_2423) { - run_test (_this, "152", false); + run_test (_this, "153", false); } -TEST(152d_issue_2423) +TEST(153d_issue_2423) { - run_test (_this, "152", true); + run_test (_this, "153", true); } diff --git a/testdata/drc/drcSimpleTests_152.drc b/testdata/drc/drcSimpleTests_153.drc similarity index 100% rename from testdata/drc/drcSimpleTests_152.drc rename to testdata/drc/drcSimpleTests_153.drc diff --git a/testdata/drc/drcSimpleTests_152.gds b/testdata/drc/drcSimpleTests_153.gds similarity index 100% rename from testdata/drc/drcSimpleTests_152.gds rename to testdata/drc/drcSimpleTests_153.gds diff --git a/testdata/drc/drcSimpleTests_au152.gds b/testdata/drc/drcSimpleTests_au153.gds similarity index 100% rename from testdata/drc/drcSimpleTests_au152.gds rename to testdata/drc/drcSimpleTests_au153.gds diff --git a/testdata/drc/drcSimpleTests_au152d.gds b/testdata/drc/drcSimpleTests_au153d.gds similarity index 100% rename from testdata/drc/drcSimpleTests_au152d.gds rename to testdata/drc/drcSimpleTests_au153d.gds