Merge flex if rounded edges meet at top and bottom

This commit is contained in:
Florian Festi 2016-07-09 10:45:53 +02:00
parent f65bafbcac
commit 8f0dc0330e
1 changed files with 12 additions and 6 deletions

View File

@ -48,10 +48,16 @@ class FlexBox(boxes.Boxes):
c4 = math.pi * r * 0.5 c4 = math.pi * r * 0.5
self.edges["F"](y-2*r-self.latchsize, False) self.edges["F"](y-2*r-self.latchsize, False)
if x-2*r < self.thickness:
self.edges["X"](2*c4+x-2*r, h+2*self.thickness)
else:
self.edges["X"](c4, h+2*self.thickness) self.edges["X"](c4, h+2*self.thickness)
self.edges["F"](x-2*r, False) self.edges["F"](x-2*r, False)
self.edges["X"](c4, h+2*self.thickness) self.edges["X"](c4, h+2*self.thickness)
self.edges["F"](y-2*r, False) self.edges["F"](y-2*r, False)
if x-2*r < self.thickness:
self.edges["X"](2*c4+x-2*r, h+2*self.thickness)
else:
self.edges["X"](c4, h+2*self.thickness) self.edges["X"](c4, h+2*self.thickness)
self.edge(x-2*r) self.edge(x-2*r)
self.edges["X"](c4, h+2*self.thickness) self.edges["X"](c4, h+2*self.thickness)