From 9b8025f3229830af997e010a24fe2317f5790a7e Mon Sep 17 00:00:00 2001 From: stansu Date: Mon, 8 Dec 2014 10:22:06 +0800 Subject: [PATCH] fix for 1x1 brick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when i try 1x1 brick, the rarray can’t use 0 for parameter. so i add last else condition to disable last cylinder making. --- CadQuery/Examples/Ex026_Lego_Brick.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CadQuery/Examples/Ex026_Lego_Brick.py b/CadQuery/Examples/Ex026_Lego_Brick.py index 3f44293..e3227e0 100644 --- a/CadQuery/Examples/Ex026_Lego_Brick.py +++ b/CadQuery/Examples/Ex026_Lego_Brick.py @@ -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())