Adaptive Path/CAM 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!
Post Reply
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

kreso-t wrote: Sun Aug 26, 2018 3:13 pm
sgrogan wrote: Fri Aug 24, 2018 8:27 pm
kreso-t wrote: Fri Aug 24, 2018 7:31 pm I think I fixed the problem with the py3 "No module named 'PathAdaptive'", haven't been able to test it myself with py3 (with py2 still works ok), but I'am pretty sure the problem is solved now and the reason was me not using "explicit imports" that py3 requires (i.e. https://stackoverflow.com/questions/121 ... nt-python3)
Nice!
VS2013/PY2/boost-python: builds, passes all Self-tests, and I can load the Path WB.
VS2015/PY3/pybind11: builds, I get the same Self-test errors I get in master, and the Path WB loads.

I will work on packaging the PY3 build.

Test Build (VS2015/PY3/pybind11): https://github.com/sgrogan/FreeCAD/releases/tag/kreso-t
Thx sgrogan,

I tried the Test build but there seem to be some more problems related to py3 (this following error not happen with py2):

Code: Select all

...
  File "F:\MyFiles\FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64\Mod\Path\PathScripts\PathAdaptive.py", line 143, in GenerateGCode
    helixAngleRad = math.pi * obj.HelixAngle/180.0
<class 'TypeError'>: unsupported operand type(s) for /: 'Base.Quantity' and 'float'
However now using your py3 build I can test and correct those things and also check if there are some more similar problems

Thx
BR,
K.
This problem with "unsupported operand type(s) for /: 'Base.Quantity' and 'float'" is fixed now. I tested the full functionality using build FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64 and did not find any more problems - with this fix (https://github.com/kreso-t/FreeCAD/comm ... 2ca8238b52) in the python script (....\PathScripts\PathAdaptive.py) the build seem to work OK.

BR,
Kreso
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Adaptive Path/CAM Operation

Post by dubstar-04 »

This is just incredible!! Huge thanks and congratulations from me!!

I have been testing the adaptive path and for the most part it is working as expected.

Would it be possible to add a 'stock to leave' option where the user could enter an additional offset?

I generally use an adaptive strategy for roughing and then come back with a finishing strategy.
Screenshot from 2018-08-26 20-13-24.png
Screenshot from 2018-08-26 20-13-24.png (90.32 KiB) Viewed 1533 times
File is attached for testing.
Attachments
TortureTest2.FCStd
(574.09 KiB) Downloaded 41 times
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

dubstar-04 wrote: Sun Aug 26, 2018 7:21 pm This is just incredible!! Huge thanks and congratulations from me!!

I have been testing the adaptive path and for the most part it is working as expected.

Would it be possible to add a 'stock to leave' option where the user could enter an additional offset?

I generally use an adaptive strategy for roughing and then come back with a finishing strategy.

Screenshot from 2018-08-26 20-13-24.png

File is attached for testing.
Thx, I am very happy you like it!

It should not be a problem to add 'stock to leave' option, will add it for sure.

BR,
Kreso
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

This version in the FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64 build also had a problem with a shapes like in the attached image:
Selection_015.png
Selection_015.png (57.34 KiB) Viewed 1521 times
when tool could not pass from one side to another due to too narrow regions in between (maybe also in some other cases but this is where I noticed it) so it cleared only one side of it (it skipped the other helix plunge), this is corrected now in the current FreeCAD fork version in my git repo.

BR,
Kreso
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Adaptive Path/CAM Operation

Post by dubstar-04 »

kreso-t wrote: Sun Aug 26, 2018 8:46 pm This version in the FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64 build also had a problem with a shapes like in the attached image: Selection_015.png when tool could not pass from one side to another due to too narrow regions in between (maybe also in some other cases but this is where I noticed it) so it cleared only one side of it (it skipped the other helix plunge), this is corrected now in the current FreeCAD fork version in my git repo.

BR,
Kreso

Hi Kreso,

I have come across an instance where a path isn't generated:

I would like to rough the outside of this part before profiling, however I cant get the adaptive tool to generate a path.
AdaptiveError.png
AdaptiveError.png (246.88 KiB) Viewed 1505 times
I would like to say a huge THANK YOU again. The adaptive toolpath is an absolute game changer for me. I haven't been able to use FreeCAD for CAM on most of my parts but the adaptive tool allows me to!!

Thanks,

Dan
Attachments
TortureTest2.FCStd
(656.69 KiB) Downloaded 42 times
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

dubstar-04 wrote: Mon Aug 27, 2018 6:13 am
kreso-t wrote: Sun Aug 26, 2018 8:46 pm This version in the FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64 build also had a problem with a shapes like in the attached image: Selection_015.png when tool could not pass from one side to another due to too narrow regions in between (maybe also in some other cases but this is where I noticed it) so it cleared only one side of it (it skipped the other helix plunge), this is corrected now in the current FreeCAD fork version in my git repo.

BR,
Kreso

Hi Kreso,

I have come across an instance where a path isn't generated:

I would like to rough the outside of this part before profiling, however I cant get the adaptive tool to generate a path.

AdaptiveError.png

I would like to say a huge THANK YOU again. The adaptive toolpath is an absolute game changer for me. I haven't been able to use FreeCAD for CAM on most of my parts but the adaptive tool allows me to!!

Thanks,

Dan
Hi Dan,

Thx, it should be possible now with this most recent version (included in the forked FreeCAD https://github.com/FreeCAD/FreeCAD), btw. in this version you can also select edges, not only faces. In order for tool to be able to plunge into those relatively narrow area you need to limit the helix diameter (by default it takes tool diameter), however the python version that you seem to be using has one other problem that will prevent you to get the desired result here (it does not entirely correctly resolve the regions to cut even if you limit the helix diameter).
Selection_017.png
Selection_017.png (236.38 KiB) Viewed 1500 times
BR,
Kresimir
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Adaptive Path/CAM Operation

Post by dubstar-04 »

kreso-t wrote: Mon Aug 27, 2018 6:48 am
dubstar-04 wrote: Mon Aug 27, 2018 6:13 am
kreso-t wrote: Sun Aug 26, 2018 8:46 pm This version in the FreeCAD_0.18.14442-kreso-t_Conda_Py3QT5-WinVS2016_x64 build also had a problem with a shapes like in the attached image: Selection_015.png when tool could not pass from one side to another due to too narrow regions in between (maybe also in some other cases but this is where I noticed it) so it cleared only one side of it (it skipped the other helix plunge), this is corrected now in the current FreeCAD fork version in my git repo.

BR,
Kreso

Hi Kreso,

I have come across an instance where a path isn't generated:

I would like to rough the outside of this part before profiling, however I cant get the adaptive tool to generate a path.

AdaptiveError.png

I would like to say a huge THANK YOU again. The adaptive toolpath is an absolute game changer for me. I haven't been able to use FreeCAD for CAM on most of my parts but the adaptive tool allows me to!!

Thanks,

Dan
Hi Dan,

Thx, it should be possible now with this most recent version (included in the forked FreeCAD https://github.com/FreeCAD/FreeCAD), btw. in this version you can also select edges, not only faces. In order for tool to be able to plunge into those relatively narrow area you need to limit the helix diameter (by default it takes tool diameter), however the python version that you seem to be using has one other problem that will prevent you to get the desired result here (it does not entirely correctly resolve the regions to cut even if you limit the helix diameter).

Selection_017.png

BR,
Kresimir
Hey,

Thanks for the super quick reply.

I will build your branch later and test.

Do you want feedback at the moment or is it too early?

Thanks,

Dan
schnebeck
Posts: 130
Joined: Thu Jun 22, 2017 8:04 pm

Re: Adaptive Path/CAM Operation

Post by schnebeck »

@kreso-t

Hi,

would it be possible to have FreeCAD fork and https://github.com/kreso-t/FreeCAD_Mod_ ... e_Path-Cpp in sync? The latter is easy to build and use with freecad daily ppa. Hopefully Adaptive Path is soon part of the main branch repo of FreeCAD :D

Bye

Thorsten
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

dubstar-04 wrote: Mon Aug 27, 2018 7:11 am ...

Hey,

Thanks for the super quick reply.

I will build your branch later and test.

Do you want feedback at the moment or is it too early?

Thanks,

Dan
Hi Dan,

Feedback would be very helpful. I have corrected the issues I noticed so far (in my FreeCAD fork version, I will sync that also to cpp add-on mod version, however I don't plan to further maintain the python version since I can't simply apply same fixes/features there without actually rewriting same stuff again in python), so if you find some more ploblems in this FC fork version please let me know so I can fix it.

btw. seems I pasted the wrong link to my FC fork in my previous post, it should be: https://github.com/kreso-t/FreeCAD

BR,
Kreso
kreso-t
Posts: 115
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Post by kreso-t »

schnebeck wrote: Mon Aug 27, 2018 8:05 am @kreso-t

Hi,

would it be possible to have FreeCAD fork and https://github.com/kreso-t/FreeCAD_Mod_ ... e_Path-Cpp in sync? The latter is easy to build and use with freecad daily ppa. Hopefully Adaptive Path is soon part of the main branch repo of FreeCAD :D

Bye

Thorsten
Hi Thorsten,

I will see if I can sync it later today, however at the moment it is not possible to support some things without modifying the FreeCAD code which can't be done in add-on, so some features may not be available in this version (so far only this posibility to select edges).

BR,
Kreso
Post Reply