miny = -20 dy = 01 maxy = 20 z = -0.2 bucketSize = 20 #pftp = cam.ParallelFinish() #pftp.initCLPoints(minx,dx,maxx,miny,dy,maxy,z) #pftp.initSTLSurf(s, bucketSize) #pftp.dropCutterSTL1(cutter) #print " made ", pftp.dcCalls, " drop-cutter calls" #exit pf2 = cam.ParallelFinish() pf2.initCLPoints(minx, dx, maxx, miny, dy, maxy, z) pf2.initSTLSurf(s, bucketSize) pf2.dropCutterSTL2(cutter) print(" made ", pf2.dcCalls, " drop-cutter calls") #clpoints = pftp.getCLPoints() #ccpoints = pftp.getCCPoints() clpoints = pf2.getCLPoints() ccpoints = pf2.getCCPoints() #CLPointGrid(minx,dx,maxx,miny,dy,maxy,z) nv = 0 nn = 0 ne = 0
path = ocl.Path() path.append(ocl.Line(ocl.Point(1.0, 1.4, 0), ocl.Point(2.0, 1.4, 0))) cl = ocl.Point(1.4, 1.4, 0) s = ocl.STLSurf("cone_on_side.stl") stl = camvtk.STLSurf("cone_on_side.stl") myscreen.addActor(stl) stl.SetWireframe() #dcf = ocl.PathDropCutterFinish(s) #dcf.setCutter(cutter) #dcf.setPath(path) #dcf.run() #plist = dcf.getCLPoints() pf = ocl.ParallelFinish() pf.initSTLSurf(s, 1) plist = [] zbase = -5 #for n in range(0,3): # plist.append( ocl.Point(1 + 0.01*n, 1.4, zbase) ) plist.append(ocl.Point(1.02, 1.4, zbase)) clpoints = [] ccpoints = [] for p in plist: cc = ocl.CCPoint() trilist = pf.getTrianglesUnderCutter(p, cutter) for t in trilist: #cutter.dropCutter(p,cc,t)