Error in generating gcode?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
- K0nrad
- Active Member
- Posts: 44
- Joined: Sun Jan 02, 2022 11:59 am
- Location: Poland
Error in generating gcode?
Hi,
I have encountered the following problem: when generating the path for my profile (see files), the lowest part of the path is lost. It looks like a very long tab but I did not declare it in that way. Is it my mistake or problem with the CAM module?
Regards,
Konrad
I have encountered the following problem: when generating the path for my profile (see files), the lowest part of the path is lost. It looks like a very long tab but I did not declare it in that way. Is it my mistake or problem with the CAM module?
Regards,
Konrad
- Attachments
-
- Test2.png (41.51 KiB) Viewed 59985 times
-
- Test1.dxf
- (792.67 KiB) Downloaded 1571 times
-
- Test1.png (34.08 KiB) Viewed 59985 times
- andrew
- Site Admin
- Posts: 8769
- Joined: Fri Mar 30, 2007 6:07 am
Re: Error in generating gcode?
I can confirm.
Can you change the length of the tab at the bottom from 4 to 3.5 and try again?
Can you change the length of the tab at the bottom from 4 to 3.5 and try again?
- K0nrad
- Active Member
- Posts: 44
- Joined: Sun Jan 02, 2022 11:59 am
- Location: Poland
Re: Error in generating gcode?
I have changed the tab length as you suggested. Unfortunately, it had no effect (see picture)
Regards,
Konrad

Regards,
Konrad
- Attachments
-
- Test3.jpg (50.86 KiB) Viewed 59978 times
- andrew
- Site Admin
- Posts: 8769
- Joined: Fri Mar 30, 2007 6:07 am
Re: Error in generating gcode?
I cannot reproduce that (with tab length 3.5) Could you attach your DXF and G-Code again?
Also, please indicate your QCAD/CAM version and operating system (see forum rules above).
Also, please indicate your QCAD/CAM version and operating system (see forum rules above).
- K0nrad
- Active Member
- Posts: 44
- Joined: Sun Jan 02, 2022 11:59 am
- Location: Poland
Re: Error in generating gcode?
Fixed. I changed the length from 4 to 3mm and it works
Any idea what might have been the cause?
I work with the latest release of QCAD/CAM. win10 OS.
Regards,
Konrad

Any idea what might have been the cause?
I work with the latest release of QCAD/CAM. win10 OS.
Regards,
Konrad
- Attachments
-
- Test4.jpg (43.23 KiB) Viewed 59976 times
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
Hello Konrad,
what software did you use to visualize the g-code file, as per your attached image test1.dxf in the post? The visualisation takes into account material thickness and tool diameter and gives a realistic view of the outcome of the cutting process. With such visualisation it is impossible not to spot the issue with the TABs.
I am asking as I am having TAB troubles as well and that visualisation could have spared me wasting some sheet material.
Thank you for your help and pointers,
Kind regards
LB
--> EDIT: I think I gathered it was CAMotics
what software did you use to visualize the g-code file, as per your attached image test1.dxf in the post? The visualisation takes into account material thickness and tool diameter and gives a realistic view of the outcome of the cutting process. With such visualisation it is impossible not to spot the issue with the TABs.
I am asking as I am having TAB troubles as well and that visualisation could have spared me wasting some sheet material.
Thank you for your help and pointers,
Kind regards
LB
--> EDIT: I think I gathered it was CAMotics
Last edited by newyd_cnc on Fri Oct 20, 2023 1:44 pm, edited 1 time in total.
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
Dear all,
since I have encountered the exact same proiblem, and by chance using 4 mm tabs I was wondering if this was a known problem, whether it was solved or not,
thank you for yor time
LB
since I have encountered the exact same proiblem, and by chance using 4 mm tabs I was wondering if this was a known problem, whether it was solved or not,
thank you for yor time
LB
-
- Premier Member
- Posts: 4879
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Error in generating gcode?
If you are using the latest release of QCAD/CAM and encountered the same issue then I think not.
The why eludes me.
In the case of K0nrad:
The cam entity was long enough so that the TAB is cleared before it ends.
Why the TAB down is missed and continues for the path that follow until the next TAB down is a mystery.
TAB's can perfectly cross several distinct cam entities.
Now from the looks of it in Test3.jpg, it seems that the TAB starts at the connection point between the arc and the line segment.
As if the cam entity was chopped into a line segment and a null-length line segment what could matter.
But then I don't get why a 1mm reduction would generate Test4.jpg there the line itself is 9.8mm long.
With 4mm and a mill of 1mm it still should be 2.4mm straight, up, 5mm straight, down, 2.4mm straight.
2.4 or 2.9mm at either side should not matter.
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
Hello CVH,
thank you for your feedback. For info I am using
Version:
3.27.9.0 (3.27.9)
Now I agree that perhaps the tab issue is due to some sort of geometric discontinuity in the main path within the span length of the tab, I mean to say the tab starts on a certain feature of the path (be it a line, arc, spline) and then the path changes nature before the tab length is "elapsed". Waht is odd is that I had this behavior both over a spline and a straight line, the latter being much longer than the tab length.
Since having the issue I'm using CAMotics to visualize the g-code end result simulation, and that helps identifying these sort of problems before committing to a cutting job.
Kind regards
LB
thank you for your feedback. For info I am using
Version:
3.27.9.0 (3.27.9)
Now I agree that perhaps the tab issue is due to some sort of geometric discontinuity in the main path within the span length of the tab, I mean to say the tab starts on a certain feature of the path (be it a line, arc, spline) and then the path changes nature before the tab length is "elapsed". Waht is odd is that I had this behavior both over a spline and a straight line, the latter being much longer than the tab length.
Since having the issue I'm using CAMotics to visualize the g-code end result simulation, and that helps identifying these sort of problems before committing to a cutting job.
Kind regards
LB
-
- Premier Member
- Posts: 4879
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Error in generating gcode?
Current art is 3.28.2
There are no entries in the Changelog concerning this.
Can't be the case as TAB's can span over several cam entities.
Prove of that is Test3.jpg where it spans dozens of entities, faulty but still.
Discarding null-length segments is the most probable cause.
To cross a TAB a cam entity is chopped into parts so that the second or the middle part can be elevated in Z.
Or the first part up to the TAB end when already elevated for a prior cam entity.
A null-length segment occurs when the position to chop coincides (or almost) with a segment ending.
Or at segments intersection ... Here between arc-line or line-arc.
It seems that the Zup is included but the Zdown at 'nothing' is 'forgotten' ...

Still, that doesn't fully match with given example values, the TAB is 4mm long plus the diameter of the mill, not 9.79999999...
As said: "The why eludes me."
Any chance that you could attach an example of that?
Remind that a spline is not handle in G-code directly.
It can be broken up in tangentially connected arcs or in line segments depending your preferences.
Avoid when using 'Cutter radius compensation'.
See first entry of: https://camotics.org/gcode.html#missing-linuxcnc-codes
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
.. I am wondering if the behaviour described in this forum topic could be notified as a bug? I am encountering several occurencies of this issue in my work with QCAD. Last time it happened today:
here's a correctly planned tab: and here's a tab on the same piece where the plunge operation to finish off the tab is not planned, hence the z axis stays at its shallowest position until another tab is met
Here is the dxf and the corresponding gcde.
here's a correctly planned tab: and here's a tab on the same piece where the plunge operation to finish off the tab is not planned, hence the z axis stays at its shallowest position until another tab is met
Here is the dxf and the corresponding gcde.
- Attachments
-
- fuel_tank_tray.nc
- (11.32 KiB) Downloaded 656 times
-
- fuel_tank_tray.dxf
- (529.96 KiB) Downloaded 646 times
-
- Premier Member
- Posts: 4879
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Error in generating gcode?
Already using dashed lines for the toolpaths in the 3D view bothers me.
As if the paths are interrupted.
Not sure, have you tried to set a shorter TAB length?
Remind that a 4mm long TAB with a 6mm cutter requires the tool to go up 5mm before the TAB center and the same for plunging back.
I would then place my TAB's at least 5,5mm away from a corner.
For some reason yours are placed related to lines on a layer called 'text'.
As above:
The path related to the CAM entity is split in 3 parts, the middle part is raised ... But what happens when the first or third part is nothing?
Or when the TAB spans more than one CAM entity? It typically fails at arcs then.
In most cases it goes well. In most cases the math is sound.
But I think that not all limit situations are handled in full.
Shorter TAB's or rearranging may fix that.
A CAM I tend to use ramps up and down for a TAB, it doesn't go straight up and plunges back.

Far better for your cutters and the motion is practically continuously, the FEED doesn't drop to zero.
As far as I know QCAD/CAM does not mix motions in Z with those in XY.
Your design seems to fit like a puzzle, the top right part needs to be mirrored ... Flipped over.
Have you accounted for that inner corners will have a radius of 3mm?
A round cutter can't cut sharp inner corners.

6mm for a tray sounds plenty.


Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
Thank you for your feedback.
I didn't know one could change line type in the preview, I will do so.
I like tabs to be lined up to provide coherent strength along the stock material during cutting. For that reason I lined them up on lines and in this case the "text" layer was unused and I placed the lines there.
I will try with shorter tabs and or being more careful at positioning them far off corners. I am just quite worried about larger cutting files where there will be numerous tabs, and my ability to visually identify tab issues from the 3D visualization/simulation window before committing the material to be cut.
Just for my knowledge, what would the CAM be that ramps up and down the tabs?
I didn't know one could change line type in the preview, I will do so.
I like tabs to be lined up to provide coherent strength along the stock material during cutting. For that reason I lined them up on lines and in this case the "text" layer was unused and I placed the lines there.
I will try with shorter tabs and or being more careful at positioning them far off corners. I am just quite worried about larger cutting files where there will be numerous tabs, and my ability to visually identify tab issues from the 3D visualization/simulation window before committing the material to be cut.
Just for my knowledge, what would the CAM be that ramps up and down the tabs?
-
- Premier Member
- Posts: 4879
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Error in generating gcode?
Not sure if this is possible but yes, it are some type of standard QCAD layers.
And one should be able to alter the layer attributes ...
Tried it for layer 'offset' and Continuous + Orange has my favor.

Off-topic and not QCAD/CAM related.
Read: https://www.qcad.org/rsforum/viewtopic.php?t=7415
For the rest I would use PM.
There was already a PM 'pending' concerning selecting entities in group.
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Thu Feb 02, 2023 6:06 pm
Re: Error in generating gcode?
... I am plagued by this issue and I cannot check manually or with camotics or other tools that all tabs are completed correctly.
here's another occurrence where the ab is not complete and the router bit will remain at the tab's shallow depth until the next tab is met.
how can I file a bug report to have it checked upon and hopefully fixed ?
Conceptually it doesn't seem to me to be too difficult to verify that all tabs are complete with "up to shallow depth" and "down to full cut depth" commands .... What I am often getting is that the second phase of the tab is omitted!
Version:
3.28.2.0 (3.28.2)
Internet:
QCAD.org
Build Date:
Aug 30 2023
Revision:
a8039fc
Qt Version:
5.8.0
Architecture:
x86_64
Compiler:
gcc 4.8.1
here's another occurrence where the ab is not complete and the router bit will remain at the tab's shallow depth until the next tab is met.
how can I file a bug report to have it checked upon and hopefully fixed ?
Conceptually it doesn't seem to me to be too difficult to verify that all tabs are complete with "up to shallow depth" and "down to full cut depth" commands .... What I am often getting is that the second phase of the tab is omitted!
Version:
3.28.2.0 (3.28.2)
Internet:
QCAD.org
Build Date:
Aug 30 2023
Revision:
a8039fc
Qt Version:
5.8.0
Architecture:
x86_64
Compiler:
gcc 4.8.1
- Attachments
-
- NEWYD_MODEL_DECK_24cm.nc
- (3.21 KiB) Downloaded 680 times