Cutter compensation and variables is very bad
Posted: Sun Jul 02, 2023 2:07 am
Using cutter compensation to offset arcs while using variables is unusable.
Cutter compensation with literal constants works as expected, [leftmost circle in image] (although adding a + to a constant also fails, which is unexpected, [final line of gcode, rightmost circle])
When the arc's y coordinates use a variable (#2, #1 in the example) the offset arcs have incorrect midpoints, and other glitchy behaviour at edges of arcs. [center ?circle? in image, should be same as left]
In addition, variables are extremely difficult to use. Using the negative value of a variable such as `g1 y-#1` doesnt work, nor does any variable maths `g1 y[#1 + 10]`
Minimal GCode to reproduce, using AXBB demo with standard profile.
Cutter compensation with literal constants works as expected, [leftmost circle in image] (although adding a + to a constant also fails, which is unexpected, [final line of gcode, rightmost circle])
When the arc's y coordinates use a variable (#2, #1 in the example) the offset arcs have incorrect midpoints, and other glitchy behaviour at edges of arcs. [center ?circle? in image, should be same as left]
In addition, variables are extremely difficult to use. Using the negative value of a variable such as `g1 y-#1` doesnt work, nor does any variable maths `g1 y[#1 + 10]`
Minimal GCode to reproduce, using AXBB demo with standard profile.
- Code: Select all
g40
g90
#2 = -10
#1 = 10
g1 x -10 y 10
g1 y#1
g41 d1
g0 x0
g2 x0 y-10 r10
g2 x0 y10 r10
g0 x30
g2 x30 y#2 r10
g2 x30 y#1 r10
g0 x60
g2 x60 y-10 r10
g2 x60 y+10 r10