Simple Bool challenge for a beginner
Hello,
I have written a fairly simple script that follows the edge of an elipse and places cylinders at regualr points along it.
I'm stuggling to get the Bool subtract working. The output is currently 95% of the way there, but it breaks the solid and meshes very strangely.
commenting the line out and bool subtracting manually works fine BUT seems to use a different 'path' through the window menu.
resetMaxFile #noPrompt print "start of script ----------------------------------------------------------" rad = 15 rv = 60 rh = 30 a =cylinder() a.radius = 1 a.height=8 a.pos =[0,0,1] scale a [rv,rh,1] c = boolObj.createBooleanObject a for i = -1 to 1 by 2 do ( spaci = 1.8*rad -- use less then dia = 2 rad to ensure some small overlap for j = -1 to 1 by 2 do ( print " start quadrant - - - - - - - - - - - - - - - -" prev_x = 0 -- an inital value prev_y = 0 -- an initial value for t= 0 to 90 by 1 do ( x = i*rv*cos(t) y = j*rh*sin(t) diff_x = x-prev_x diff_y = y-prev_y -- use pythag to see if we are a diamter away. gap = (spaci*spaci) - (diff_x*diff_x )- (diff_y * diff_y) --sqrt gap for actual gap -- trigger first cirle and sets up prex x and y if t == 0 then gap =-1 -- does mean that 2 perfectly overlapped circles at tips, but for this cutout role that's ok if (gap < 0) then ( b=cylinder() b.radius=rad b.height=10 b.sides=36 b.pos=[x, y, 0] prev_x = x prev_y = y print b.pos c = boolObj.createBooleanObject c b 4 4 ) ) ) )