Skip to content

Commit

Permalink
Handle boards with small spacing well in stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed May 13, 2024
1 parent a7873c2 commit 36cad87
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kikit/stencil.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,15 @@ def makeRegister(board, jigFrameSize, jigThickness, pcbThickness,
body = solid.linear_extrude(height=top, convexity=10)(solid.polygon(
outerRing))

innerRing = createOffsetPolygon(board, - innerBorder).exterior.coords
innerRings = [x.exterior.coords for x in listGeometries(createOffsetPolygon(board, - innerBorder))]
if topSide:
innerRing = mirrorX(innerRing, centerpoint[0])
innerRings = [mirrorX(innerRing, centerpoint[0]) for innerRing in innerRings]

innerCutout = solid.utils.down(jigThickness)(
solid.linear_extrude(height=3 * jigThickness, convexity=10)(solid.polygon(innerRing)))
solid.linear_extrude(height=3 * jigThickness, convexity=10)(solid.polygon(innerRings[0])))
for innerRing in innerRings[1:]:
innerCutout = innerCutout + solid.utils.down(jigThickness)(
solid.linear_extrude(height=3 * jigThickness, convexity=10)(solid.polygon(innerRing)))
registerRing = createOffsetPolygon(board, tolerance).exterior.coords
if topSide:
registerRing = mirrorX(registerRing, centerpoint[0])
Expand Down

0 comments on commit 36cad87

Please sign in to comment.