Skip to content

Commit

Permalink
.polygonWalls(): Add dovetail joints to 0° "corners"
Browse files Browse the repository at this point in the history
This allow using objects with only rounded corners
  • Loading branch information
florianfesti committed Oct 23, 2024
1 parent e74a1eb commit ccdd263
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion boxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2901,9 +2901,12 @@ def polygonWalls(self, borders, h, bottom="F", top="F", symmetrical=True):
top_lengths = []
top_edges = []

if angle == 0:
left = self.edges["d"]

leftsettings.setValues(self.thickness, angle=angle)
self.moveTo(left.spacing() + self.spacing, 0)
l = borders[i] - length_correction
leftsettings.setValues(self.thickness, angle=angle)
angle = borders[i+1]

while isinstance(angle, (tuple, list)):
Expand All @@ -2925,6 +2928,8 @@ def polygonWalls(self, borders, h, bottom="F", top="F", symmetrical=True):
length_correction = t * math.tan(math.radians(-angle / 2))
else:
length_correction = 0.0
if angle == 0:
right = self.edges["D"]
l -= length_correction

bottom(l)
Expand Down

0 comments on commit ccdd263

Please sign in to comment.