fix for 1x1 brick

when i try 1x1 brick, the rarray can’t use 0 for parameter.
so i add last else condition to disable last cylinder making.
This commit is contained in:
stansu 2014-12-08 10:22:06 +08:00
parent 37420537d3
commit 9b8025f322

View File

@ -6,8 +6,8 @@ import Part
#####
# Inputs
######
lbumps = 4 # number of bumps long
wbumps = 4 # number of bumps wide
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
@ -49,5 +49,7 @@ elif lbumps > 1:
elif wbumps > 1:
tmp = tmp.rarray(pitch, pitch, 1, wbumps - 1, center=True). \
circle(t).extrude(height - t)
else:
tmp = s
Part.show(tmp.toFreecad())