From ae9588e73a66dd32f6b47714a17d6c60069831b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Ecorchard?= Date: Fri, 2 Oct 2015 09:56:05 +0200 Subject: [PATCH] Use thickness parameter in Lego --- CadQuery/Examples/Ex026_Lego_Brick.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CadQuery/Examples/Ex026_Lego_Brick.py b/CadQuery/Examples/Ex026_Lego_Brick.py index a463a38..e52dde2 100644 --- a/CadQuery/Examples/Ex026_Lego_Brick.py +++ b/CadQuery/Examples/Ex026_Lego_Brick.py @@ -8,17 +8,19 @@ from Helpers import show ###### lbumps = 1 # number of bumps long wbumps = 1 # number of bumps wide -thickness = 3.2 # this is a thin lego -# thickness = 9.6 # a thick lego +thin = True # True for thin, False for thick # # Lego Brick Constants-- these make a lego brick a lego :) # pitch = 8.0 clearance = 0.1 -height = 3.2 bumpDiam = 4.8 bumpHeight = 1.8 +if thin: + height = 3.2 +else: + height = 9.6 t = (pitch - (2 * clearance) - bumpDiam) / 2.0 postDiam = pitch - t # works out to 6.5