Skip to content

Commit

Permalink
Attempt to fix issue 11 and 8 - needs confirmation.
Browse files Browse the repository at this point in the history
  • Loading branch information
klayoutmatthias committed Aug 2, 2018
1 parent c81099b commit ad25a85
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/macros/xsection.lym
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,15 @@ class MaskData < LayoutData
end

kp = RBA::Polygon::new(kernel_pts)
me.each { |e| d.insert(kp.minkowsky_sum(e, false)) }
n = 0
me.each do |e|
d.insert(kp.minkowsky_sum(e, false))
if (n += 1) == 10
# merge each 10 iteration steps to reduce overhead of the final merge
d.merge
n = 0
end
end
d.merge

elsif mode == :square
Expand All @@ -524,7 +532,8 @@ class MaskData < LayoutData
kernel_pts << RBA::Point::new(xyi, zi)
kernel_pts << RBA::Point::new(xyi, -zi)

kp = RBA::Polygon::new(kernel_pts)
kp = RBA::SimplePolygon::new
kp.set_points(kernel_pts, true) # "raw" - don't optimize away
me.each { |e| d.insert(kp.minkowsky_sum(e, false)) }
d.merge

Expand Down
Binary file added tests/au/xs_bug8.gds
Binary file not shown.
Binary file added tests/xs_bug8.gds
Binary file not shown.
17 changes: 17 additions & 0 deletions tests/xs_bug8.xs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# XS_INPUT=xs_bug8.gds
# XS_CUT=-3,0;7,0

depth(20.0)
height(20.0)

l1 = layer("1/0")

substrate = bulk

m1 = deposit(1.0)
mask(l1).etch(2.0, 0.0, :into => [ m1, substrate ])
mask(l1.sized(0.2)).etch(0.0, 0.5, :into => m1)

output("1/0", substrate)
output("2/0", m1)

0 comments on commit ad25a85

Please sign in to comment.