File: ocl_offsetCutter_1.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 (33 lines) | stat: -rw-r--r-- 502 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
22
23
24
25
26
27
28
29
30
31
32
33
from opencamlib import ocl
import math

print(ocl.version())

# cylinder
c = ocl.CylCutter(2.345, 5)
d = c.offsetCutter(0.1)
print(c)
print("offset: ",d)
print

# ball
c = ocl.BallCutter(2.345, 6)
d = c.offsetCutter(0.1)
print(c)
print("offset: ",d)
print

# bull
c = ocl.BullCutter(2.345, 0.123, 6)
d = c.offsetCutter(0.1)
print(c)
print("offset: ",d)
print

# cone
c = ocl.ConeCutter(2.345, math.pi/6, 5)
d = c.offsetCutter(0.1)
print(c)
print("offset: ",d)

# TODO: add compound-cutters here below.