Ticket #6232 - Gcode generated by Path engrave skips some lines

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bmsaus4ax
Posts: 258
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Gcode generated by Path engrave skips some lines

Post by bmsaus4ax »

munther_hindi wrote: Tue Jun 15, 2021 11:37 pm Just to be clear, if you do not touch the sketch and just make an engraving Path out of it, do you get what I get? If so, then the version you have behaves the same as mine and I would think this is a bug. Do you agree? Again, if I export the sketch as a dxf file and process that with with another program (dxf2gcode), it produces the complete "6".
I can get the shape to produce the required path if I select the first or last edge and then use Path->Finish Selecting Loop -> Add(in Base Geometry)
This seems to overcome the need to fully constrain the sketch, by defining the connections at selection.

From my experience working with PathShape in creating paths via macro, there is a Property "Nearest K " which nominates the nearest number of vertices considered during sorting for the path. This property is not visible (even with show all) in the engraving job but may have an effect deeper down in the path generation?? I don't know if this is involved in engraving paths or could be the case.
If each edge is considered as a separate "Path" this may contribute to the selection of segments in the "six" object, some may be outside the area of consideration?? Again just theorising.

Edited to add FreeCAD info

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.25065 (Git) AppImage
Build type: Release
Branch: master
Hash: 4de2ad46b2b9c78ac2721a0dbea7c19306261095
Python version: 3.9.4
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/Australia (en_AU)
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

Re: Gcode generated by Path engrave skips some lines

Post by chrisb »

munther_hindi wrote: Tue Jun 15, 2021 11:37 pm if you do not touch the sketch and just make an engraving Path out of it, do you get what I get? If so, then the version you have behaves the same as mine and I would think this is a bug. Do you agree?
Yes and yes. Not touching and recompute or create a completely new job behaves as yours. And yes, it is a bug. That's why I pinged mlampert.
He may be busy with other things, so you should create a ticket in the tracker to not forget the issue.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

Re: Gcode generated by Path engrave skips some lines

Post by chrisb »

This may help finding the bug. I just tried the profile operation without compensation: it creates the same erroneous path.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
munther_hindi
Posts: 28
Joined: Tue Apr 21, 2020 4:21 pm

Re: Gcode generated by Path engrave skips some lines

Post by munther_hindi »

bmsaus4ax, crisb, thanks for taking the time to look into this. This is my first post and I'll have to try and figure out how to post a bug report. Was not so obvious on a first reading.

bmsaus4ax, I have hundreds of these characters in the job I am sending to the CNC, so as a practical matter it is just not feasible to select an element of each, one by one, and then click on complete the loop. I have found a somewhat faster work-around, though still a little tedious. The letters I wish to engrave start out as Path::Feature objects. The Path workbench produces nothing if I try to engrave those. By selecting all the letters (the Path::Feature objects) and using Draft->Convert Bi bidirectionally to sketch, all the letters were put into a single sketch which contained all the letters lines); I could then select that single sketch and do a Path engrave on it. That seemed to work, except I noticed after the machine was done engraving that certain segments were missing (which led to this post). If I now select the sketch and use Draft->Convert bidirectionally again, Draft produces Wires and Lines (hundreds of them), but since are consecutive in the document tree, it is relatively easy to select all of them and produce a Path engrave operation that works correctly. A tedious process, but it works. It seems to me either the sketch->engrave should work completely or not at all; so working 90% of the time seems to me to be a bug. I will try to file a bug report when I figure out how. Thanks for all your help!
munther_hindi
Posts: 28
Joined: Tue Apr 21, 2020 4:21 pm

Re: Gcode generated by Path engrave skips some lines

Post by munther_hindi »

bmsaus4ax wrote: Wed Jun 16, 2021 3:09 am
munther_hindi wrote: Tue Jun 15, 2021 11:37 pm Just to be clear, if you do not touch the sketch and just make an engraving Path out of it, do you get what I get? If so, then the version you have behaves the same as mine and I would think this is a bug. Do you agree? Again, if I export the sketch as a dxf file and process that with with another program (dxf2gcode), it produces the complete "6".
I can get the shape to produce the required path if I select the first or last edge and then use Path->Finish Selecting Loop -> Add(in Base Geometry)
This seems to overcome the need to fully constrain the sketch, by defining the connections at selection.

From my experience working with PathShape in creating paths via macro, there is a Property "Nearest K " which nominates the nearest number of vertices considered during sorting for the path. This property is not visible (even with show all) in the engraving job but may have an effect deeper down in the path generation?? I don't know if this is involved in engraving paths or could be the case.
If each edge is considered as a separate "Path" this may contribute to the selection of segments in the "six" object, some may be outside the area of consideration?? Again just theorising.
Seems plausible. Please next post for another workaround I found. Thanks!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Gcode generated by Path engrave skips some lines

Post by GeneFC »

munther_hindi wrote: Wed Jun 16, 2021 8:42 am Seems plausible. Please next post for another workaround I found. Thanks!
I fixed your first post by adding the images directly.

Please do not use external links for relatively small image files. It is much more helpful to include them directly into your posts. Use the "Attachments" tab below the edit window.

Gene
munther_hindi
Posts: 28
Joined: Tue Apr 21, 2020 4:21 pm

Re: Gcode generated by Path engrave skips some lines

Post by munther_hindi »

GeneFC wrote: Wed Jun 16, 2021 1:37 pm
munther_hindi wrote: Wed Jun 16, 2021 8:42 am Seems plausible. Please next post for another workaround I found. Thanks!
I fixed your first post by adding the images directly.

Please do not use external links for relatively small image files. It is much more helpful to include them directly into your posts. Use the "Attachments" tab below the edit window.

Gene
Ah! Below the window! I did not notice that, only the insert image icon on top. Thanks for the correction and point that out!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #6232 - Gcode generated by Path engrave skips some lines

Post by Kunda1 »

Ticket has been migrated to Github: please see https://github.com/FreeCAD/FreeCAD/issues/6232 and notate it. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #6232 - Gcode generated by Path engrave skips some lines

Post by Kunda1 »

Any progress here?
Please also update issue #6232
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply