Merge pull request #59 from galou/lego_really_parametric

Use thickness parameter in Lego
This commit is contained in:
Jeremy Wright 2015-10-02 08:16:47 -04:00
commit 176f768083

View File

@ -8,17 +8,19 @@ from Helpers import show
###### ######
lbumps = 1 # number of bumps long lbumps = 1 # number of bumps long
wbumps = 1 # number of bumps wide wbumps = 1 # number of bumps wide
thickness = 3.2 # this is a thin lego thin = True # True for thin, False for thick
# thickness = 9.6 # a thick lego
# #
# Lego Brick Constants-- these make a lego brick a lego :) # Lego Brick Constants-- these make a lego brick a lego :)
# #
pitch = 8.0 pitch = 8.0
clearance = 0.1 clearance = 0.1
height = 3.2
bumpDiam = 4.8 bumpDiam = 4.8
bumpHeight = 1.8 bumpHeight = 1.8
if thin:
height = 3.2
else:
height = 9.6
t = (pitch - (2 * clearance) - bumpDiam) / 2.0 t = (pitch - (2 * clearance) - bumpDiam) / 2.0
postDiam = pitch - t # works out to 6.5 postDiam = pitch - t # works out to 6.5