From 1f9342b6789118bf77421afa6043e3fc33c5f78d Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 15 Feb 2017 22:35:10 +0100 Subject: [PATCH] Castle: Make available in UI and adjust to current code base --- boxes/generators/castle.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/boxes/generators/castle.py b/boxes/generators/castle.py index c5c8e22..7c50544 100755 --- a/boxes/generators/castle.py +++ b/boxes/generators/castle.py @@ -18,25 +18,21 @@ from boxes import * class Castle(Boxes): - webinterface = False + "Castle tower with two walls" + + ui_group = "Unstable" def __init__(self): Boxes.__init__(self) - self.addSettingsArgs(boxes.edges.FingerJointSettings) + self.addSettingsArgs(edges.FingerJointSettings) def render(self, t_x=70, t_h=250, w1_x=300, w1_h=120, w2_x=100, w2_h=120): self.open() - s = edges.FingerJointSettings(self.thickness, relative=False, - space=10, finger=10, height=10, + s = edges.FingerJointSettings(10.0, relative=True, + space=1, finger=1, width=self.thickness) - p = edges.FingerJointEdge(self, s) - p.char = "p" - self.addPart(p) - - P = edges.FingerJointEdgeCounterPart(self, s) - P.char = "P" - self.addPart(P) + s.edgeObjects(self, "pPQ") self.moveTo(0, 0) self.rectangularWall(t_x, t_h, edges="efPf", move="right", callback=[lambda: self.fingerHolesAt(t_x * 0.5, 0, w1_h, 90), ])