NotesHolder: Fix various issues
Code for opening == 0.0 was broken (See #187) Fixed placement of bottom Fixed margin of USlotEdge Resolves: #187
This commit is contained in:
parent
9a8ae198c4
commit
4ac46840d2
|
@ -27,6 +27,9 @@ class USlotEdge(Edge):
|
||||||
self.polyline(0, 90, 0, (-90, r), l-2*d-2*r, (-90, r), 0, 90)
|
self.polyline(0, 90, 0, (-90, r), l-2*d-2*r, (-90, r), 0, 90)
|
||||||
self.edges["f"](d)
|
self.edges["f"](d)
|
||||||
|
|
||||||
|
def margin(self):
|
||||||
|
return self.edges["f"].margin()
|
||||||
|
|
||||||
class HalfStackableEdge(edges.StackableEdge):
|
class HalfStackableEdge(edges.StackableEdge):
|
||||||
|
|
||||||
char = 'H'
|
char = 'H'
|
||||||
|
@ -80,16 +83,21 @@ class NotesHolder(Boxes):
|
||||||
with self.saved_context():
|
with self.saved_context():
|
||||||
self.rectangularWall(y, h, [b, "F", "e", "F"], move="right")
|
self.rectangularWall(y, h, [b, "F", "e", "F"], move="right")
|
||||||
if self.opening == 0.0:
|
if self.opening == 0.0:
|
||||||
self.rectangularWall(x, h, [b, "e", "e", "f"], move="right")
|
self.rectangularWall(x, h, [b, "f", "e", "f"], move="right")
|
||||||
else:
|
else:
|
||||||
self.rectangularWall(sides, h, [b2, "e", "e", "f"], move="right")
|
self.rectangularWall(sides, h, [b2, "e", "e", "f"], move="right")
|
||||||
self.rectangularWall(sides, h, [b2, "e", "e", "f"], move="right mirror")
|
self.rectangularWall(sides, h, [b2, "e", "e", "f"], move="right mirror")
|
||||||
|
|
||||||
self.rectangularWall(x, h, [b, "F", "e", "F"], move="up only")
|
self.rectangularWall(x, h, [b, "F", "e", "F"], move="up only")
|
||||||
|
|
||||||
self.rectangularWall(y, h, [b, "F", "e", "F"], move="right")
|
with self.saved_context():
|
||||||
self.rectangularWall(x, h, [b, "f", "e", "f"], move="right")
|
self.rectangularWall(y, h, [b, "F", "e", "F"], move="right")
|
||||||
|
self.rectangularWall(x, h, [b, "f", "e", "f"], move="right")
|
||||||
|
self.rectangularWall(y, h, [b, "F", "e", "F"], move="up only")
|
||||||
|
|
||||||
if self.bottom_edge != "e":
|
if self.bottom_edge != "e":
|
||||||
self.rectangularWall(x, y, [USlotEdge(self, sides), "f", "f", "f"], move="up")
|
if self.opening == 0.0:
|
||||||
|
self.rectangularWall(x, y, ["f", "f", "f", "f"], move="up")
|
||||||
|
else:
|
||||||
|
self.rectangularWall(x, y, [USlotEdge(self, sides), "f", "f", "f"], move="up")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue