Add Boxes.debug to add construction lines
This commit is contained in:
parent
96c8cb9eb6
commit
a2870f0f29
5
boxes.py
5
boxes.py
|
@ -360,6 +360,9 @@ class FingerHoles:
|
|||
d, d_nut, h_nut, l, l1 = bedBoltSettings or self.bedBoltSettings
|
||||
leftover = length - fingers*(s+f) - f
|
||||
b = self.boxes.burn
|
||||
if self.boxes.debug:
|
||||
self.ctx.rectangle(0, -self.settings.width/2+b,
|
||||
length, self.settings.width - 2*b)
|
||||
for i in xrange(fingers):
|
||||
pos = leftover/2.0+i*(s+f)
|
||||
if bedBolts and bedBolts.drawBolt(i):
|
||||
|
@ -420,6 +423,7 @@ class Boxes:
|
|||
self.bedBoltSettings = (3, 5.5, 2, 20, 15) #d, d_nut, h_nut, l, l1
|
||||
self.hexHolesSettings = (5, 3, 'circle') # r, dist, style
|
||||
self.output = "box.svg"
|
||||
self.debug = 0
|
||||
self._init_surface(width, height)
|
||||
self._buildObjects()
|
||||
|
||||
|
@ -716,6 +720,7 @@ class Boxes:
|
|||
}
|
||||
width, flange, holedistance, diameter = nema[size]
|
||||
self.moveTo(x, y, angle)
|
||||
if self.debug:
|
||||
self.rectangularHole(0, 0, width, width)
|
||||
self.hole(0,0, 0.5*flange)
|
||||
for x in (-1, 1):
|
||||
|
|
Loading…
Reference in New Issue