Denvi / Candle

GRBL controller application with G-Code visualizer written in Qt.
GNU General Public License v3.0
1.35k stars 548 forks source link

Part of the toolpath for G3 is not displayed #576

Open iillii opened 1 year ago

iillii commented 1 year ago

Versions

PC info

Describe the bug Part of the toolpath for G3 is not displayed

To Reproduce Code:

G90
G21
M0
G0 Z5.00
G0 X0.00 Y0.00
G0 Z5.00
G0 X0.00 Y9.80
G0 Z1.00
G3 X0.00 Y-9.80 Z0.00 R9.80 F150.00
G3 X0.00 Y9.80 Z-1.00 R9.80 F150.00
G3 X0.00 Y-9.80 R9.80 F300.00
G3 X0.00 Y9.80 R9.80 
G1 X0.00 Y12.40 F300.00
G3 X0.00 Y-12.40 R12.40 F300.00
G3 X0.00 Y12.40 R12.40 
G1 X0.00 Y13.00 F300.00
G3 X0.00 Y-13.00 R13.00 F300.00
G3 X0.00 Y13.00 R13.00 
G0 Z5.00

Lines 9-12 not displayed in toolpath preview.

Сode:

G90
G21
M0
G0 Z5.00
G0 X0.00 Y0.00
G0 Z5.00
G0 X0.00 Y9.80
G0 Z1.00
G3 X0.00 Y-9.80 Z0.00 R9.80 F150.00
G3 X0.00 Y9.80 Z-1.00 R9.80 F150.00
G3 X0.00 Y-9.80 R9.80 F300.00
G3 X0.00 Y9.80 R9.80 
G1 X0.00 Y11.80 F300.00
G3 X0.00 Y-11.80 R11.80 F300.00
G3 X0.00 Y11.80 R11.80 
G1 X0.00 Y13.00 F300.00
G3 X0.00 Y-13.00 R13.00 F300.00
G3 X0.00 Y13.00 R13.00 
G0 Z5.00

Lines 9-12 and lines 14-15 not displayed in toolpath preview.

Additional context But there is no issues with this code:

G90
G21
M0
G0 Z5.00
G0 X0.00 Y0.00
G0 Z5.00
G0 X0.00 Y9.90
G0 Z1.00
G3 X0.00 Y-9.90 Z0.00 R9.90 F150.00
G3 X0.00 Y9.90 Z-1.00 R9.90 F150.00
G3 X0.00 Y-9.90 R9.90 F300.00
G3 X0.00 Y9.90 R9.90 
G1 X0.00 Y12.50 F300.00
G3 X0.00 Y-12.50 R12.50 F300.00
G3 X0.00 Y12.50 R12.50 
G1 X0.00 Y13.00 F300.00
G3 X0.00 Y-13.00 R13.00 F300.00
G3 X0.00 Y13.00 R13.00 
G0 Z5.00

Everything shows correctly

mar0x commented 1 year ago

Hello,

It seems the line 9 G3 X0.00 Y-9.80 Z0.00 R9.80 F150.00 expected to be an arc from (0.0, 9.8, 1.0) to (0.0, -9.8, 0.0).

So, I would suggest to specify an arc center with I, J, K parameters instead of arc radius R: G3 X0.00 Y-9.80 Z0.00 J-9.8 K-0.5 F150.00.