Skip to content

Commit

Permalink
Flexbox3: Fix lid length
Browse files Browse the repository at this point in the history
  • Loading branch information
florianfesti committed Aug 8, 2019
1 parent 73422b0 commit e4bdc19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions boxes/generators/flexbox3.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def surroundingWall(self, move=None):
x, y, z, r, d = self.x, self.y, self.z, self.radius, self.d
t = self.thickness

tw = x + y - 2*r + self.c4 + 2*t + d
tw = x + y - 2*r + self.c4 + 2*t + t
th = z + 4*t + 2*d

if self.move(tw, th, move, True):
Expand All @@ -79,11 +79,11 @@ def surroundingWall(self, move=None):
self.corner(-90)
self.edge(d)
self.corner(90)
self.edges["f"](x - r + d)
self.edges["f"](x - r + t)
self.corner(90)
self.edges["f"](z + 2 * t + 2 * d)
self.corner(90)
self.edges["f"](x - r + d)
self.edges["f"](x - r + t)
self.corner(90)
self.edge(d)
self.corner(-90)
Expand All @@ -110,18 +110,18 @@ def lidSide(self, move=None):

self.edge(h + self.thickness - r2)
self.corner(90, r2)
self.edge(r - r2 + 2 * t)
self.edge(r - r2 + 1 * t)
else:
a = math.acos((r-h)/(r+t))
ang = math.degrees(a)
base_l = x + (r+t) * math.sin(a) - r
base_l = x + (r+t) * math.sin(a) - r + t
if self.move(h+t, base_l+t, move, True):
return

self.corner(90-ang)
self.corner(ang, r+t)

self.edges["F"](x - r)
self.edges["F"](x - r + t)
self.edgeCorner("F", "f")
self.edges["g"](h)
self.edgeCorner("f", "e")
Expand Down

0 comments on commit e4bdc19

Please sign in to comment.