Arc G02 G03 Issue while converting FastNEST Gcode to LinuxCNC
- sin-do-re
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 1
25 Dec 2024 20:02 - 25 Dec 2024 20:09 #317370
by sin-do-re
Arc G02 G03 Issue while converting FastNEST Gcode to LinuxCNC was created by sin-do-re
Hello Everyone.
Merry Christmas.
FastCAM/FastNest is a Chinese software for generating G-Code for plasma and other 2d cutting machines.
It features some decent stuff like nesting, cutter compensation (g40,g41), and common cut, so i've decided to buy it and use it.
The way it generates the g-code is quite weird, though, because it doesnt introduce some lines like G01 (...) and G02 (...),
the converted code looks like this, below.
the problem, is i still have arc errors where the radius doesn't match from start to end, which is normal as the arcs really dont make sense in the original program.
am i missing something? the referential im using is wrong?
can anyone point me in the right direction?
thank you
Merry Christmas.
FastCAM/FastNest is a Chinese software for generating G-Code for plasma and other 2d cutting machines.
It features some decent stuff like nesting, cutter compensation (g40,g41), and common cut, so i've decided to buy it and use it.
The way it generates the g-code is quite weird, though, because it doesnt introduce some lines like G01 (...) and G02 (...),
G92X0Y0
G21
G91
G00X377.359Y53.137
G41
M07
G03X-8.486I-4.243J-4.243
X8.132Y-19.632I8.132J-8.132
Y23.I0.J11.5
X-8.132Y-3.368I0.J-11.5
Y-7.071I3.536J-3.536
M08
G40
G00X8.486Y87.071
G41
M07
G03X-8.486I-4.243J-4.243
X8.132Y-19.632I8.132J-8.132
Y23.I0.J11.5
X-8.132Y-3.368I0.J-11.5
Y-7.071I3.536J-3.536
M08
G40
G00X148.486Y7.071
G41
M07
G03X-8.486I-4.243J-4.243
X8.132Y-19.632I8.132J-8.132
Y23.I0.J11.5
X-8.132Y-3.368I0.J-11.5
Y-7.071I3.536J-3.536
M08
G40
G00X8.486Y-72.929
G41
M07
G03X-8.486I-4.243J-4.243
X8.132Y-19.632I8.132J-8.132
Y23.I0.J11.5
X-8.132Y-3.368I0.J-11.5
Y-7.071I3.536J-3.536
M08
G40
G00X80.132Y-30.061
G41
M07
G01Y-6.
X-584.
Y150.
X584.
Y-150.
Y-5.
M08
G40
G00X111.878Y372.359
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X-87.071Y8.486
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X-7.071Y148.486
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X72.929Y8.486
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X30.061Y80.132
G41
M07
G01X6.
Y-584.
X-150.
Y584.
X150.
X5.
M08
G40
G00X-48.132Y377.364
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X-87.071Y8.486
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
G40
G00X-7.071Y148.486
G41
M07
G03Y-8.486I4.243J-4.243
X19.632Y8.132I8.132J8.132
X-23.I-11.5J0.
X3.368Y-8.132I11.5J0.
X7.071I3.536J3.536
M08
the converted code looks like this, below.
the problem, is i still have arc errors where the radius doesn't match from start to end, which is normal as the arcs really dont make sense in the original program.
am i missing something? the referential im using is wrong?
can anyone point me in the right direction?
thank you
;begin pre-amble
G21 (units: metric)
G40 (cutter compensation: off)
G90 (distance mode: absolute)
M52 P1 (adaptive feed: on)
M65 P2 (enable THC)
M65 P3 (enable torch)
M68 E3 Q0 (velocity 100%)
G64 P0.254 Q0.025 (tracking tolerances: 0.254mm)
;end pre-amble
;begin material setup
T0 M6 (select plasma tool)
G43 H0 (apply tool offsets)
M190 P1 (numero do material a utilizar)
M66 P3 L3 Q2 (wait for valid change)
F#<_hal[plasmac.cut-feed-rate]>
;end material setup
G00X377.359Y53.137
G41
M3 $0 S1 (plasma start)
G03 X-8.486 Y53.137 I-4.243 J-4.243
G03 X8.132 Y-19.632 I8.132 J-8.132
G02 X8.132 Y23.000 I0.000 J11.500
G03 X-8.132 Y-3.368 I0.000 J-11.500
G03 X-8.132 Y-7.071 I3.536 J-3.536
M5 $0 (plasma end)
G40
G00X8.486Y87.071
G41
M3 $0 S1 (plasma start)
G03 X-8.486 Y87.071 I-4.243 J-4.243
G03 X8.132 Y-19.632 I8.132 J-8.132
G02 X8.132 Y23.000 I0.000 J11.500
G03 X-8.132 Y-3.368 I0.000 J-11.500
G03 X-8.132 Y-7.071 I3.536 J-3.536
M5 $0 (plasma end)
G40
G00X148.486Y7.071
G41
M3 $0 S1 (plasma start)
G03 X-8.486 Y7.071 I-4.243 J-4.243
G03 X8.132 Y-19.632 I8.132 J-8.132
G02 X8.132 Y23.000 I0.000 J11.500
G03 X-8.132 Y-3.368 I0.000 J-11.500
G03 X-8.132 Y-7.071 I3.536 J-3.536
M5 $0 (plasma end)
G40
G00X8.486Y-72.929
G41
M3 $0 S1 (plasma start)
G03 X-8.486 Y-72.929 I-4.243 J-4.243
G02 X8.132 Y-19.632 I8.132 J-8.132
G02 X8.132 Y23.000 I0.000 J11.500
G03 X-8.132 Y-3.368 I0.000 J-11.500
G03 X-8.132 Y-7.071 I3.536 J-3.536
M5 $0 (plasma end)
G40
G00X80.132Y-30.061
G41
M3 $0 S1 (plasma start)
G01 Y-6.000
G01 X-584.000
G01 Y150.000
G01 X584.000
G01 Y-150.000
G01 Y-5.000
M5 $0 (plasma end)
G40
G00X111.878Y372.359
G41
M3 $0 S1 (plasma start)
G03 X111.878 Y-8.486 I4.243 J-4.243
G02 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-87.071Y8.486
G41
M3 $0 S1 (plasma start)
G03 X-87.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-7.071Y148.486
G41
M3 $0 S1 (plasma start)
G03 X-7.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X72.929Y8.486
G41
M3 $0 S1 (plasma start)
G03 X72.929 Y-8.486 I4.243 J-4.243
G02 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X30.061Y80.132
G41
M3 $0 S1 (plasma start)
G01 X6.000
G01 Y-584.000
G01 X-150.000
G01 Y584.000
G01 X150.000
G01 X5.000
M5 $0 (plasma end)
G40
G00X-48.132Y377.364
G41
M3 $0 S1 (plasma start)
G03 X-48.132 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-87.071Y8.486
G41
M3 $0 S1 (plasma start)
G03 X-87.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-7.071Y148.486
G41
M3 $0 S1 (plasma start)
G03 X-7.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X72.929Y8.486
G41
M3 $0 S1 (plasma start)
G03 X72.929 Y-8.486 I4.243 J-4.243
G02 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X30.061Y80.132
G41
M3 $0 S1 (plasma start)
G01 X6.000
G01 Y-584.000
G01 X-150.000
G01 Y584.000
G01 X150.000
G01 X5.000
M5 $0 (plasma end)
G40
G00X-48.132Y377.364
G41
M3 $0 S1 (plasma start)
G03 X-48.132 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-87.071Y8.486
G41
M3 $0 S1 (plasma start)
G03 X-87.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-7.071Y148.486
G41
M3 $0 S1 (plasma start)
G03 X-7.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X72.929Y8.486
G41
M3 $0 S1 (plasma start)
G03 X72.929 Y-8.486 I4.243 J-4.243
G02 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X30.061Y80.132
G41
M3 $0 S1 (plasma start)
G01 X6.000
G01 Y-584.000
G01 X-150.000
G01 Y584.000
G01 X150.000
G01 X5.000
M5 $0 (plasma end)
G40
G00X-48.132Y377.364
G41
M3 $0 S1 (plasma start)
G03 X-48.132 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-87.071Y8.486
G41
M3 $0 S1 (plasma start)
G03 X-87.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
G40
G00X-7.071Y148.486
G41
M3 $0 S1 (plasma start)
G03 X-7.071 Y-8.486 I4.243 J-4.243
G03 X19.632 Y8.132 I8.132 J8.132
G02 X-23.000 Y8.132 I-11.500 J0.000
G03 X3.368 Y-8.132 I11.500 J0.000
G03 X7.071 Y-8.132 I3.536 J3.536
M5 $0 (plasma end)
Last edit: 25 Dec 2024 20:09 by sin-do-re. Reason: misspel againn.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1442
04 Jan 2025 21:02 #318121
by Todd Zuercher
Replied by Todd Zuercher on topic Arc G02 G03 Issue while converting FastNEST Gcode to LinuxCNC
Many CNC controls do not require a new line (or block) of g-code to repeat a G0, G1, G2, or G3 code on a new line if they are not changing from the previous lines, because those codes are considered "modal" (ie they are remembered). This allowed controls to save precious memory space, from the days of paper tape and when 1024k was considered a significant amount of memory. Linuxcnc is no different and will work fine with the extra repeated g-codes omitted.
Your problem with arc radii not matching the begining and end is an unrelated problem, and results from your cam program taking liberties with rounding errors. Usually there are settings in the cam program to adjust how closely the cam program must calculate the arc radius. What those settings are called and were to find them are not always straight forward or easy to figure out. (I'm not familiar with your cam program to make suggestions there.)
There are settings in Linuxcnc that will allow you to change the limits where an alarm will be set for these radius calculations. See this part of the Linuxcnc documentation.
linuxcnc.org/docs/2.9/html/config/ini-co...sub:ini:sec:rs274ngc
Your problem with arc radii not matching the begining and end is an unrelated problem, and results from your cam program taking liberties with rounding errors. Usually there are settings in the cam program to adjust how closely the cam program must calculate the arc radius. What those settings are called and were to find them are not always straight forward or easy to figure out. (I'm not familiar with your cam program to make suggestions there.)
There are settings in Linuxcnc that will allow you to change the limits where an alarm will be set for these radius calculations. See this part of the Linuxcnc documentation.
linuxcnc.org/docs/2.9/html/config/ini-co...sub:ini:sec:rs274ngc
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds