From 234698aa889c93f330b26873e84b7c31c2305203 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 20 Jul 2013 13:10:03 +0200 Subject: [PATCH] Make size of the fingers cross section configurable --- boxes.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boxes.py b/boxes.py index 39839c5..3085f9c 100755 --- a/boxes.py +++ b/boxes.py @@ -144,6 +144,8 @@ class FingerJointSettings(Settings): relative_params = { "space" : 1.0, "finger" : 1.0, + "height" : 1.0, + "width" : 1.0, } class FingerJointEdge(Edge): @@ -173,11 +175,11 @@ class FingerJointEdge(Edge): else: self.edge(s) self.corner(-90*p) - self.edge(thickness) + self.edge(self.settings.height) self.corner(90*p) self.edge(f) self.corner(90*p) - self.edge(thickness) + self.edge(self.settings.height) self.corner(-90*p) self.edge(s+leftover/2.0) @@ -349,8 +351,8 @@ class FingerHoles: pos = leftover/2.0+i*(s+f) if bedBolts and bedBolts.drawBolt(i): self.hole(pos+0.5*s, 0, d*0.5) - self.ctx.rectangle(pos+s+b, -self.boxes.thickness/2+b, - f-2*b, self.boxes.thickness - 2*b) + self.ctx.rectangle(pos+s+b, -self.settings.width/2+b, + f-2*b, self.settings.width - 2*b) self.ctx.move_to(0, length) self.ctx.translate(*self.ctx.get_current_point())