From 4a2d1be8bfc68aaec3bc29c4320456a7eaa67ada Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 3 Jul 2024 22:59:31 +0200 Subject: [PATCH] Backward compatibility mode (with fix): size now also accepts sizing mode as string (for supporting GF180 DRC decks properly) --- src/drc/drc/built-in-macros/_drc_layer.rb | 4 ++++ testdata/drc/drcSimpleTests_130.drc | 1 + testdata/drc/drcSimpleTests_au130.gds | Bin 5266 -> 5426 bytes testdata/drc/drcSimpleTests_au130d.gds | Bin 5888 -> 6048 bytes 4 files changed, 5 insertions(+) diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 0bb26948d..b06b04e77 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -4805,6 +4805,10 @@ TP_SCRIPT n = 1 args.each do |a| + # accept DRCSizingMode as string as well, i.e. "size(l1, 'square_limit')" + if a.is_a?(String) && @engine.respond_to?(a.to_sym) + a = @engine.send(a.to_sym) + end if a.is_a?(1.class) || a.is_a?(Float) v = @engine._make_value(a) v.abs > dist && dist = v.abs diff --git a/testdata/drc/drcSimpleTests_130.drc b/testdata/drc/drcSimpleTests_130.drc index 8091a9145..ea38291e2 100644 --- a/testdata/drc/drcSimpleTests_130.drc +++ b/testdata/drc/drcSimpleTests_130.drc @@ -58,4 +58,5 @@ l3.sized(1.0, diamond_limit).output(202, 0) l3.sized(1.0, 0.5, diamond_limit).output(203, 0) l3.sized(diamond_limit, 1.0, 0.5).output(204, 0) l3.sized(1.0, diamond_limit, size_outside(l2), steps(2)).output(205, 0) +l3.sized(1.0, 'diamond_limit').output(206, 0) diff --git a/testdata/drc/drcSimpleTests_au130.gds b/testdata/drc/drcSimpleTests_au130.gds index c1fbd043cb7a2a6de1fd0c937af334a5ed806e59..89937baf512fd06f72e2e7d08f3ca11356a08f7f 100644 GIT binary patch delta 81 zcmbQFxk*cjfsKKQDS|CWdp9 OMTGnr&rNm_@dE(p>Xxyct;!!eBGVq2=47n`&tx_f{III4s>1{pK3urn~ou;L7f&G*=xSsBl5zQnD^4FKOFFd+Z{ delta 309 zcmZ3W-=L?&z{bGD6u}_F$i)7Fft`VwL5xA2!5Eo6QAv{@O=x43I3v2)<_1P~CUn8c z)0q85&@?k}u(3H#R%8*uP%OhDi7vL;h2;w4