from cad_shapes import * # Render boundaries cad.xmin = -2 cad.xmax = 2 cad.ymin = -2 cad.ymax = 2 cad.zmin = -2 cad.zmax = 2 cad.mm_per_unit = 25.4 # inch units c = cone(0,0,-2,0,.4) cleft = rotate_y(c,90) cright = rotate_y(c,-90) cup = rotate_x(c,90) cdown = rotate_x(c,-90) xycones = add(add(add(cleft,cright),cup),cdown) xyzcones = add(xycones,rotate_y(xycones,90)) mxc = rotate_y(xyzcones,45) myc = rotate_x(xyzcones,45) mzc = rotate_z(xyzcones,45) allcones = add(add(add(xyzcones,mxc),myc),mzc) dr = .1 s = sphere(0,0,0,1) n = 10 for x in range(0,n,2): s = add(s,sphere(0,0,0,1-x*dr)) s = subtract(s,sphere(0,0,0,1-(x+1)*dr)) cad.function = subtract(s,allcones)