diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 4d22374b8..fa0735ba2 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -842,18 +842,23 @@ CODE # @name smoothed # @brief Smoothes the polygons of the region # @synopsis layer.smoothed(d) + # @synopsis layer.smoothed(d, hv_keep) # # "Smoothing" returns a simplified version of the polygons. Simplification is # achieved by removing vertices unless the resulting polygon deviates by more # than the given distance d from the original polygon. # + # "hv_keep" is a boolean parameter which makes the smoothing function maintain + # horizontal or vertical edges. The default is false, meaning horizontal or + # vertical edges may be changed into tilted ones. + # # This method return a layer wit the modified polygons. Merged semantics applies for this # method (see \raw and \clean). - def smoothed(d) + def smoothed(d, hv_keep = false) @engine._context("smoothed") do requires_region - DRCLayer::new(@engine, @engine._tcmd(self.data, 0, RBA::Region, :smoothed, @engine._make_value(d))) + DRCLayer::new(@engine, @engine._tcmd(self.data, 0, RBA::Region, :smoothed, @engine._make_value(d), hv_keep)) end end diff --git a/testdata/drc/drcSimpleTests_2.drc b/testdata/drc/drcSimpleTests_2.drc index 5582c41dd..66faa4c55 100644 --- a/testdata/drc/drcSimpleTests_2.drc +++ b/testdata/drc/drcSimpleTests_2.drc @@ -12,6 +12,7 @@ c1.output(3, 0) c1.rounded_corners(0.5, 0.5, 16).output(1010, 0) c1.smoothed(1.5).output(1011, 0) +c1.smoothed(1.5, true).output(1012, 0) a1.texts.output(1020, 0) a1.texts("A*").output(1021, 0) diff --git a/testdata/drc/drcSimpleTests_au2.gds b/testdata/drc/drcSimpleTests_au2.gds index c85d1eebe..76c8b8afe 100644 Binary files a/testdata/drc/drcSimpleTests_au2.gds and b/testdata/drc/drcSimpleTests_au2.gds differ