Adaptive Path/CAM Operation

Here's the place for discussion related to CAM/CNC and the development of the Path module.
RatonLaveur
Posts: 303
Joined: Wed Mar 27, 2019 10:45 am

Re: Adaptive Path/CAM Operation

Postby RatonLaveur » Fri Sep 06, 2019 3:35 pm

Adaptive strategies with a laser process keeps the ablation rate stable, due to constant beam engagement. Quite similar to conventional if you think about it.

The machine does not use a galvo scanner, hence why adaptives are more interesting than conventional laser milling strategies.
RatonLaveur wrote:
Fri Sep 06, 2019 7:54 am
It seems that the blue generative path is already much more accurate than the resulting G-Code path. Perhaps there's something to be done here?
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Sat Sep 07, 2019 6:21 pm

Hi,

Managed to find simple way to increase accuracy for small tools without affecting the performance for larger tools (and also without needing to adjust the all the parameters, the solution is based just on scaling adjustments within the alg. for tools <1mm).

i.e. before (tool 0.1mm 20% stepover, processing duration ~10 sec):
Selection_074.png
Selection_074.png (40.73 KiB) Viewed 104 times
after (processing duration ~ 50 sec):
Selection_075.png
Selection_075.png (36.49 KiB) Viewed 104 times
calculation is 5x slower in this example, but generally speaking slow-down can not be avoided as the alg. naturally needs to process/produce more points to get more accuracy.

Submitted as a PR.

BR,
K.
dubstar-04
Posts: 379
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Adaptive Path/CAM Operation

Postby dubstar-04 » Sat Sep 07, 2019 6:52 pm

What would it take to swap the G1 moves for G2 or G3 arc moves?
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Sat Sep 07, 2019 7:51 pm

dubstar-04 wrote:
Sat Sep 07, 2019 6:52 pm
What would it take to swap the G1 moves for G2 or G3 arc moves?
Although curves produced by the alg. are not actually arcs, in many cases they could probably be approximated with arcs (within some tolerance) and I guess that number of output points would decrease significantly with that. To make this work some arc fitting algorithm would be required, and also if that would be done in C++ then change of the interface between the C++ code and python code would be required (currently C++ part outputs only arrays of points/line segments)
dubstar-04
Posts: 379
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Adaptive Path/CAM Operation

Postby dubstar-04 » Sat Sep 07, 2019 8:07 pm

kreso-t wrote:
Sat Sep 07, 2019 7:51 pm
dubstar-04 wrote:
Sat Sep 07, 2019 6:52 pm
What would it take to swap the G1 moves for G2 or G3 arc moves?
Although curves produced by the alg. are not actually arcs, in many cases they could probably be approximated with arcs (within some tolerance) and I guess that number of output points would decrease significantly with that. To make this work some arc fitting algorithm would be required, and also if that would be done in C++ then change of the interface between the C++ code and python code would be required (currently C++ part outputs only arrays of points/line segments)
If this is something you're interested in working on I would like to help. I understand you're busy with other things but if you ever fancy having a look at it let me know.
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Sat Sep 07, 2019 8:27 pm

dubstar-04 wrote:
Sat Sep 07, 2019 8:07 pm

If this is something you're interested in working on I would like to help. I understand you're busy with other things but if you ever fancy having a look at it let me know.
If someone knows a decent python implementation of arc fitting alg. that would as input take a list of points/line segments + tolerance setting and as output produce the list of arcs, it would be relatively easy to include it into adaptive if all that done in python code (no need to change the interfaces to C++, etc.)
RatonLaveur
Posts: 303
Joined: Wed Mar 27, 2019 10:45 am

Re: Adaptive Path/CAM Operation

Postby RatonLaveur » Sat Sep 07, 2019 8:32 pm

I'm...I'm speechless... If you can share a file that i can use on my current 0.18 py2.7 (i do run a 3.6 too) version the day after that I'd be making some sparks fly!
dubstar-04
Posts: 379
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Adaptive Path/CAM Operation

Postby dubstar-04 » Sat Sep 07, 2019 8:34 pm

RatonLaveur wrote: I'd be making some sparks fly!
Video required....
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Sat Sep 07, 2019 8:40 pm

RatonLaveur wrote:
Sat Sep 07, 2019 8:32 pm
I'm...I'm speechless... If you can share a file that i can use on my current 0.18 py2.7 (i do run a 3.6 too) version the day after that I'd be making some sparks fly!
The change is done in c++ code so file copy would not work - you need to either build the FreeCAD from source https://github.com/kreso-t/FreeCAD
or wait for the FreeCAD official build (i.e. in https://github.com/FreeCAD/FreeCAD/releases) produced after this pull request is included/merged into master.
RatonLaveur
Posts: 303
Joined: Wed Mar 27, 2019 10:45 am

Re: Adaptive Path/CAM Operation

Postby RatonLaveur » Sat Sep 07, 2019 10:26 pm

dubstar-04 wrote:
Sat Sep 07, 2019 8:34 pm
Video required....
I cannot guarantee that I can here. But ill be happy to share some in PM.
kreso-t wrote:
Sat Sep 07, 2019 8:40 pm
The change is done in c++ code so file copy would not work - you need to either build the FreeCAD from source https://github.com/kreso-t/FreeCAD
or wait for the FreeCAD official build (i.e. in https://github.com/FreeCAD/FreeCAD/releases) produced after this pull request is included/merged into master.
I suspected it was there in the hard C++ code, i did take a look at the python file (me and my ignorance) and was surprised to not see much about the actual algo.

Then I'll do just that, get the next 0.19 pre and enjoy the fruits of a civilizeder world. Need a new laptop though...:)