(Solved...?) Can't generate toolpath in 3d surface

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!
Post Reply
dkwvt
Posts: 66
Joined: Sat Oct 16, 2021 10:26 pm

(Solved...?) Can't generate toolpath in 3d surface

Post by dkwvt »

Hi all, another glitch in the works.
I am trying to generate and also regenerate tool paths in 3d surface in two separate files, one revision and one recovery as a process check.
AT17 cca frame pm is the original file and the right side of the body was previously tool-pathed and cut successfully.
The surface was not correct leading to the revision on the left side and subsequently another file.
AT17 J curves platform is the revised file using sketches copied out of (cca).
I can't get either file to generate a toolpath now, both send the program into an extended blue rotating processing "orb" and eventually into "non responding". At this point I have to close with task manager and start over.
I have tried switching between bounding box and stock with no effect and adjusting the geometry/curves tolerances in settings also no effect.
The original toolpath in (cca) was deleted after deciding it was not correct. I attempted to recreate it as a check against the new file.
Thoughts, corrective action, constructive ctrticism...? thanks, dkw

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * Curves 0.3.0
  * Help 1.0.3
  * ocl.pyd
Attachments
AT17 J curves platform.FCStd
(92.35 KiB) Downloaded 24 times
AT17 cca frame pm.FCStd
(839.47 KiB) Downloaded 19 times
Last edited by dkwvt on Wed Sep 14, 2022 2:34 pm, edited 1 time in total.
bmsaus4ax
Posts: 255
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Can't generate toolpath in 3d surface

Post by bmsaus4ax »

dkwvt wrote: Tue Sep 13, 2022 8:58 pm Hi all, another glitch in the works.


I can't get either file to generate a toolpath now, both send the program into an extended blue rotating processing "orb" and eventually into "non responding". At this point I have to close with task manager and start over.
The non responding is usually not fatal, a check of the system monitor showing the cpu cores usually shows there is still fairly intense activity. Accepting "Wait" will eventually lead to a result. The more intricate the surface shape the longer the process, always been a disadvantage with 3D Surface.

That said I was able to get a path in 2min 50 sec with the step over at 100% for a 6mm ball end mill. Modifying this later to 15% step over in the Data Properties and recomputing only took 50 sec. I often do the first run at 100% step over to prove a path is possible. Subsequent reprocessing doesn't take as long, although this has not always been the case in my experience?

One thing you have to be certain of in dealing with Curves surfaces is that the Model surface has to be the selected geometry, not the Gordon surface.
Stock selection is usually the fastest Boundbox also.

Could only attach one file with Cut Material deleted to limit size

Code: Select all

OS: Ubuntu 20.04.5 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.30345 (Git) AppImage
Build type: Release
Branch: master
Hash: f42a47aa0fd8c4f34ef63c185d9f29b9b6e84737
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/Australia (en_AU)
Installed mods: 
  * fcgear 1.0.0
  * Curves 0.4.4
  * Lithophane
  * CurvedShapes 1.0.3
.
Attachments
AT17 J curves platform_test.FCStd
(846.85 KiB) Downloaded 17 times
bmsaus4ax
Posts: 255
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Can't generate toolpath in 3d surface

Post by bmsaus4ax »

dkwvt wrote: Tue Sep 13, 2022 8:58 pm Hi all, another glitch in the works.
I
Second file with Surface Operation de-activated to reduce file size.
Attachments
AT17 cca frame pm_test_1.FCStd
(972.91 KiB) Downloaded 15 times
dkwvt
Posts: 66
Joined: Sat Oct 16, 2021 10:26 pm

Re: Can't generate toolpath in 3d surface

Post by dkwvt »

Hi bmsaus4ax

The non responding is usually not fatal, a check of the system monitor showing the cpu cores usually shows there is still fairly intense activity. Accepting "Wait" will eventually lead to a result. The more intricate the surface shape the longer the process, always been a disadvantage with 3D Surface.

Understood, this is a complex surface, I am not in a hurry... ;-)

That said I was able to get a path in 2min 50 sec with the step over at 100% for a 6mm ball end mill. Modifying this later to 15% step over in the Data Properties and recomputing only took 50 sec. I often do the first run at 100% step over to prove a path is possible. Subsequent reprocessing doesn't take as long, although this has not always been the case in my experience?

The wait times were running up to 20 min for a 12.7 mm ball end run at 100% single cut to "prove the toolpath". At that point I am thinking something is wrong...? My original toolpath in the "cca" file took less than 2 min.

One thing you have to be certain of in dealing with Curves surfaces is that the Model surface has to be the selected geometry, not the Gordon surface.
Stock selection is usually the fastest Boundbox also.

Yes to both, model selection for toolpath and stock selection in Boundbox.

I will download your files and have a look, I am relieved you could generate a toolpath that indicates there is something wrong with the process not the files...

thanks for looking at this, dkw
dkwvt
Posts: 66
Joined: Sat Oct 16, 2021 10:26 pm

(Solved...) Re: Can't generate toolpath in 3d surface

Post by dkwvt »

And then this...
I was just able to generate a toolpath on all surfaces in question including the test file from bmsaus4ax, all in +/- 1 min 45 sec.
I don't have a clue, there must have been some internal malady yesterday causing the headlock.
Again, thanks for the help, onward with fingers crossed...! dkw
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: (Solved...?) Can't generate toolpath in 3d surface

Post by freman »

3D surfaces are computationally heavy but I suspect that a lot of intricate 3D calculations are being repeated orders of magnitude more than is necessary. Someone has timed it and reported that the most of the time is spent in the library code written in C not in the python code itself.

I did start to dig into this at one time and it seems that complex geometries are calculated to do one step then lost and recalculated for the next path segment. I don't know whether there would be a means of keeping a pointer to the C object from python to avoid this. The library code it pretty hard to follow and it would probably a good understanding of that code to use it better.

Sadly C competent coders often have other priorities ;)
Post Reply