Base Geometry path selection issues for Engrave operation

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!
freecadnoob11
Posts: 8
Joined: Thu Aug 26, 2021 11:11 pm

Base Geometry path selection issues for Engrave operation

Post by freecadnoob11 »

Hello Fellow Freecaders,

I'm having issues with creating an Engraved Operation in a Path job as the Base Geometry is not selecting all lines from the Sketch. This is to create Gcode for a CNC machine.

These are the steps are taking:

-Create 100mm*100mm sketch
-Pad the sketch
-Import SVG from Inkscape.
-Set up some constraints on the image to make it easier to work with.
-In Path workbench, I create a job for “Bear Sketch” under 2D.
-Set up tool and remove the “Default tool”
-Choose “Engrave” as the Operation
-Set up safe heights, final depth, step down, etc.
-And now the issues begin under the “Base Geometry” tab.

Issue 1:
If I click apply in “Base Geometry” without adding anything only about 16 out of the like 53 lines are selected. See the green lines that show the path on Image 1.
Image

Issue 2:
Double clicking the sketch highlights the entire image and clicking “Add” adds “Model-Bear Sketch” to Base Geometry. See how only the lines from the previous issue are green in Image 2.
Image

Issue 3:
Clicking 1 line in the sketch, then clicking “Finish Selecting Loop” highlights the entire sketch and adding it adds the entire sketch as it should to Base Geometry. But clicking apply you see that not all lines were added to the path although they were highlighted. For example, “Model-Bear Sketch.Edge11” is selected under Base Geometry so the line was added (and it’s highlighted on the drawing with a red arrow to show that it should part of the path) but it does not have a green path line. You can see that there’s about 15 lines that do not have a green path line. This is image 3.
Image

Workaround:
I can select each line each line and add it individually. But even then some of the lines are not added although they appear under Base Geometry. I have to scroll through the edges in Base Geometry, Remove the line, click Apply, Add the line again, click Apply and keep doing this until it works.

I have hundreds of these drawings of different sizes with thousands of lines so obviously having to select each one individually is not going to be feasible.

I have included the file, version, and images. Thanks in advance and let me know if you need anything else from me.


OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
Attachments
Base Geometry path selection issues for Engrave operation.FCStd
(33.33 KiB) Downloaded 36 times
Image 3.png
Image 3.png (152.75 KiB) Viewed 1858 times
Image 2.png
Image 2.png (125.14 KiB) Viewed 1858 times
Image 1.png
Image 1.png (127.51 KiB) Viewed 1858 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Base Geometry path selection issues for Engrave operation

Post by GeneFC »

freecadnoob11 wrote: Sat Feb 26, 2022 4:18 am I'm having issues with creating an Engraved Operation in a Path job as the Base Geometry is not selecting all lines from the Sketch.
Your sketch has lots of missing coincidences. That is why the "Finish Selecting Loop" operation does not work as expected.

When I tried to replicate your Issue 1 and Issue 2 everything worked perfectly.

There have been some very recent improvements to the Engrave operation. I suggest trying a very recent FC version 0.20.

https://github.com/FreeCAD/FreeCAD-AppI ... kly-builds

Gene
freecadnoob11
Posts: 8
Joined: Thu Aug 26, 2021 11:11 pm

Re: Base Geometry path selection issues for Engrave operation

Post by freecadnoob11 »

I'm installing version .2 now and will try it again. I will report back as soon as I get to try it.
freecadnoob11
Posts: 8
Joined: Thu Aug 26, 2021 11:11 pm

Re: Base Geometry path selection issues for Engrave operation

Post by freecadnoob11 »

Edit: Put output in code tags and added file. In the file attached I created the job but not the Engrave operation as it gave me the error and also to not confuse the the issue that the Engrave operation is not working. Thanks for all your help.

Hello,
I have been unable to work on Freecad for the past couple of months. I'm jumping back in and hope to get some assistance as this is still not working and I'm now having new issues in addition to my previous issues.

I installed ver. 0.20 (see below) and have it running alongside version 0.19. I have the same exact issue on ver. 0.20 as ver. 0.19. (see original post)
Your sketch has lots of missing coincidences. That is why the "Finish Selecting Loop" operation does not work as expected.


What is the ideal "missing coincidences" for Freecad to work properly? What happens if I have a drawing with thousands of complicated and diverse lines and I just want to CNC that whole drawing as is (imagine a comic book drawing with hundreds of superheroes together)? Likewise, what if I only have a drawing with 3 lines that I want "as is", is there a way to force Freecad to just output what's on the screen instead of making any changes to it? What you see is what you get type of thinking.

These are the new errors I'm getting when I click "Apply" in the Engrave operation box:

In ver. 0.19

Code: Select all

 Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.19\Mod\Path\PathScripts\PathUtils.py", line 60, in new_function
    res = function(*args, **kwargs)
  File "C:\Program Files\FreeCAD 0.19\Mod\Path\PathScripts\PathOp.py", line 552, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "C:\Program Files\FreeCAD 0.19\Mod\Path\PathScripts\PathEngrave.py", line 129, in opExecute
    self.buildpathocc(obj, shapeWires, self.getZValues(obj))
  File "C:\Program Files\FreeCAD 0.19\Mod\Path\PathScripts\PathEngraveBase.py", line 75, in buildpathocc
    edges = copy.copy(PathOpTools.orientWire(offset, forward).Edges)
  File "C:\Program Files\FreeCAD 0.19\Mod\Path\PathScripts\PathOpTools.py", line 138, in orientWire
    wire = Part.Wire(_orientEdges(w.Edges))
<class 'Part.OCCError'>: BRep_API: command not done 
In ver. 0.20

Code: Select all

 Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathUtils.py", line 62, in new_function
    res = function(*args, **kwargs)
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathOp.py", line 810, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathEngrave.py", line 153, in opExecute
    self.buildpathocc(obj, shapeWires, self.getZValues(obj))
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathEngraveBase.py", line 73, in buildpathocc
    edges = copy.copy(PathOpTools.orientWire(offset, forward).Edges)
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathOpTools.py", line 164, in orientWire
    wire = Part.Wire(_orientEdges(w.Edges))
<class 'Part.OCCError'>: BRep_API: command not done
13:34:31  Recompute failed! Please check report view. 
I have been unable to find a proper way to troubleshoot these issues and even searched the forum for each particular error and was unable to see where the issue is.


Version 0.20
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27422 (Git)
Build type: Release
Branch: master
Hash: d938733eaf2c2ce7cb18d1cbb56147185c473530
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)


Version 0.19
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
Attachments
Base Geometry path selection issues for Engrave operation.FCStd
(28.71 KiB) Downloaded 29 times
Last edited by freecadnoob11 on Wed Apr 27, 2022 9:08 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Base Geometry path selection issues for Engrave operation

Post by chrisb »

freecadnoob11 wrote: Wed Apr 27, 2022 7:44 pm I have been unable to find a proper way to troubleshoot these issues and even searched the forum for each particular error and was unable to see where the issue is.
You should attach the file and edit the post and put the output in code tags for improved readability. It is sufficient to test in 0.20 (it's not 0.2).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Base Geometry path selection issues for Engrave operation

Post by sliptonic »

I just tested this with a current build of master and it works correctly, even with the original messy sketch.
The underlying issue was corrected in https://github.com/FreeCAD/FreeCAD/pull/6394

However.. The job was created in an older version of Path and the visualization changed since then. So if you delete the current engraving operation, you'll still 'see' the backplot as shown in the job. The job no longer keeps its own copy of the visualization. The only way you can get rid of this ghost is to
1) hide the job
2) delete the job and recreate it.
3) Get a reference to the job object (select in tree, right click 'send to python console') Then in python console type

Code: Select all

obj.Path = Path.Path()
If you hide the job and recompute the engraving operation, it should look correct.
2022-04-29_10-33_1.png
2022-04-29_10-33_1.png (19.48 KiB) Viewed 1310 times
Perhaps we should nullify the job.Path before the release.
freecadnoob11
Posts: 8
Joined: Thu Aug 26, 2021 11:11 pm

Re: Base Geometry path selection issues for Engrave operation

Post by freecadnoob11 »

I spent quite a few hours troubleshooting this and still got the same results. I followed your instructions exactly @sliptonic and even recreated the whole job from scratch when it didn't work. So at this point I'm just giving up trying to do this the "correct and easy way" as one or more of the following must be true:

1) You guys use a super foolproof, bug free, highly programmed version of Freecad;
2) I'm just one big old dumb dummy dumbass;
3) I'll just go back to my original solution of selecting each line individually, even if it's thousands of lines;
4) I need to use a specialized commercial program for my CNC'ing needs;
5) I need to wait for the official release of Freecad ver. 0.20;
6) or I need to find another hobby.

In any case, I appreciate all your assistance with this and your continuing support of Freecad and the community. I've found many answers from these forums as well as your YouTube videos, unfortunately not for this particular issue. Very helpful in so many other aspects of Freecad.
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Base Geometry path selection issues for Engrave operation

Post by chrisb »

freecadnoob11 wrote: Fri Apr 29, 2022 9:57 pm 1) You guys use a super foolproof, bug free, highly programmed version of Freecad;
Of course we do. I use the official precompiled version available here: https://github.com/FreeCAD/FreeCAD-AppI ... kly-builds.

If things are different on your machine, it is time to try to reset the configuration with the button in the preferences. Another possibility is to delete your config files or to move them in case you want to restore them.

With that version and a plain vanilla config I have done the following:
- Opened your file
- switched to Path workbench
- selected "Bear sketch"
- invoked "Engraving operations"
- left everything at its defaults and only clicked Ok.

This is the result:
Bildschirmfoto 2022-04-30 um 00.19.13.png
Bildschirmfoto 2022-04-30 um 00.19.13.png (25.02 KiB) Viewed 1242 times

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.28751 (Git)
Build type: Release
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * FeedsAndSpeeds 0.4.0
  * fcgear
  * A2plus 0.4.56
  * Manipulator 1.4.3
  * fasteners
  * sheetmetal
  * ExplodedAssembly
  * Curves 0.3.0
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freecadnoob11
Posts: 8
Joined: Thu Aug 26, 2021 11:11 pm

Re: Base Geometry path selection issues for Engrave operation

Post by freecadnoob11 »

I wiped and installed the latest Windows version from your link. I also deleted the user.cfg and system.cfg config files, as suggested, before starting Freecad and I'm still having no luck.

With that version and a plain vanilla config I have done the following:
- Opened my file
- switched to Path workbench
- selected "Bear sketch"
- invoked "Engraving operations"
- left everything at its defaults and only clicked Ok.

Here's a screenshot of the error under the Engrave operations. The error from the Report View is below for easy reading.
Image

Code: Select all

17:59:33  Unknown command 'Part_SectionCut'
17:59:58  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathUtils.py", line 62, in new_function
    res = function(*args, **kwargs)
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathOp.py", line 810, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathEngrave.py", line 153, in opExecute
    self.buildpathocc(obj, shapeWires, self.getZValues(obj))
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathEngraveBase.py", line 73, in buildpathocc
    edges = copy.copy(PathOpTools.orientWire(offset, forward).Edges)
  File "C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathOpTools.py", line 164, in orientWire
    wire = Part.Wire(_orientEdges(w.Edges))
<class 'Part.OCCError'>: BRep_API: command not done
17:59:58  Recompute failed! Please check report view.

Here's the Freecad and Windows info:

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27422 (Git)
Build type: Release
Branch: master
Hash: d938733eaf2c2ce7cb18d1cbb56147185c473530
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
Attachments
Image after config reset.png
Image after config reset.png (158.34 KiB) Viewed 1218 times
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Base Geometry path selection issues for Engrave operation

Post by chrisb »

freecadnoob11 wrote: Sat Apr 30, 2022 12:20 am I wiped and installed the latest Windows version from your link.
The windows version seems behind. Can a windows user please test?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply