examples/python/issues/issue08_bug2010-04-02.py
raw| 1 | from opencamlib import ocl |
| 2 | |
| 3 | # this illustrates issue 8 |
| 4 | |
| 5 | if __name__ == "__main__": |
| 6 | print(ocl.version()) |
| 7 | cutter = ocl.CylCutter(3.0, 6) |
| 8 | path = ocl.Path() |
| 9 | path.append(ocl.Line(ocl.Point(-6.51, 0, 0), ocl.Point(6.51, 1.2, 0))) |
| 10 | s=ocl.STLSurf() |
| 11 | ocl.STLReader("../../../stl/sphere2.stl",s) |
| 12 | pdc = ocl.PathDropCutter() |
| 13 | pdc.setSTL(s) |
| 14 | pdc.setCutter(cutter) |
| 15 | pdc.setPath(path) |
| 16 | pdc.run() |
| 17 | clpts = pdc.getCLPoints() |
| 18 | for p in clpts: |
| 19 | print(p) |