summaryrefslogtreecommitdiff
path: root/tests/remap/oword-pycall/test.ngc
blob: d4ed6369d561ab75e673a9699cf6a828dd1aa675 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; introspection acrobatics

;py,from interpreter import *
;py,assert this.call_level  == 0

o<square> call [25.0]
;py,assert this.call_level  == 0
;py,assert this.params["_value"] == 625.0
;py,assert this.return_value == 625.0

o<multiply> call [5] [6]
;py,assert this.call_level  == 0
;py,assert this.return_value == 30.0
;py,assert this.params["_value"] == 30.0

o<multiply> call [5] [6] [7]
;py,assert this.call_level  == 0
;py,assert this.return_value == 210.0
;py,assert this.params["_value"] == 210.0


G20
; t1 p1 x10 y0 z20
T1M6
G43
;py,assert equal(this.params[5400],1.0),"loaded tool number not 1: %f" % (this.params[5400])
;py,assert equal(this.params[5410],10.0) # diameter from tt

;py,assert this.params[5400] == this.tool_table[0].toolno
;py,assert equal(this.tool_offset.x, 10.0)
;py,assert equal(this.tool_offset.y, 0.0)
;py,assert equal(this.tool_offset.z, 20.0)

;py,assert equal(this.tool_offset.x, this.tool_table[0].offset.x)
;py,assert equal(this.tool_offset.y, this.tool_table[0].offset.y)
;py,assert equal(this.tool_offset.z, this.tool_table[0].offset.z)

;py,assert equal(this.tool_offset.x, this.params[5401])
;py,assert equal(this.tool_offset.y, this.params[5402])
;py,assert equal(this.tool_offset.z, this.params[5403])

G49
G10 L1 P1 R10 X20 Y30 Z40
G43

;py,assert equal(this.tool_offset.x, 20.0)
;py,assert equal(this.tool_offset.y, 30.0)
;py,assert equal(this.tool_offset.z, 40.0)

M2