File: issue08_bug2010-04-02.py

package info (click to toggle)
opencamlib 2023.01.11-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,800 kB
  • sloc: cpp: 8,722; python: 5,530; sh: 604; javascript: 310; makefile: 209
file content (19 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from opencamlib import ocl

# this illustrates issue 8

if __name__ == "__main__":
    print(ocl.version())
    cutter = ocl.CylCutter(3.0, 6)
    path = ocl.Path()
    path.append(ocl.Line(ocl.Point(-6.51, 0, 0), ocl.Point(6.51, 1.2, 0)))
    s=ocl.STLSurf()
    ocl.STLReader("../../../stl/sphere2.stl",s)
    pdc = ocl.PathDropCutter()
    pdc.setSTL(s)
    pdc.setCutter(cutter)
    pdc.setPath(path)
    pdc.run()
    clpts = pdc.getCLPoints()
    for p in clpts:
        print(p)