CabinetHingeEdge: Fix spurious 270° corner

Resolves: #404 - Issue not found
This commit is contained in:
Florian Festi 2022-06-06 19:55:24 +02:00
parent 2f59c6191b
commit c289758749
1 changed files with 6 additions and 3 deletions

View File

@ -1670,13 +1670,16 @@ class CabinetHingeEdge(BaseEdge):
if self.top: if self.top:
# start with space # start with space
poly = [spacing, 90, e+p, 180, 0] poly = [spacing, 90, e+p]
else: else:
# start with hinge eye # start with hinge eye
poly = [spacing+p, 90, e+p, 0] poly = [spacing+p, 90, e+p, 0]
for i in range(n): for i in range(n):
if (i % 2) ^ self.top: if (i % 2) ^ self.top:
# space # space
if i == 0:
poly += [-90, t + 2*p, 90]
else:
poly += [90, t + 2*p, 90] poly += [90, t + 2*p, 90]
else: else:
# hinge eye # hinge eye
@ -1687,7 +1690,7 @@ class CabinetHingeEdge(BaseEdge):
poly += [0, e+p, 90, p+spacing] poly += [0, e+p, 90, p+spacing]
else: else:
# stopped with space # stopped with space
poly += [0, 180, e+p, 90, 0+spacing ] poly[-1:] = [-90, e+p, 90, 0+spacing ]
width = (t+p) * n + p + 2 * spacing width = (t+p) * n + p + 2 * spacing