File: lineclfilter_test.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 (21 lines) | stat: -rw-r--r-- 315 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
20
21
from opencamlib import ocl

print(ocl.version())

p0 = ocl.CLPoint(0,0,0)
p1 = ocl.CLPoint(1,2,3)
p2 = ocl.CLPoint(1.1,2.2,3.3)
clp=[]
clp.append(p0)
clp.append(p1)
clp.append(p2)

f = ocl.LineCLFilter()
f.setTolerance(0.01)
for p in clp:
    f.addCLPoint(p)

f.run()
p2 = f.getCLPoints()
for p in p2:
    print(p)