CV toolpath smoothing

Here is where you can request new features or special features.

CV toolpath smoothing

Postby Doncis » Tue Jan 23, 2024 3:27 pm

I Want to ask about cv toolpath planner. I struggle to get good 3d surface finish, I tested a lot of various cv parameter combinations over years, with tight tolerance I get jerky movement, with loose tolerance i get polygons, where suposed to be circles. Its not a hardware issue, zero backlash, arc interpolation works good. I able to get some results with smoothing in servo drive, but it cost precisission too much. Maybe have plans in near future add some toolpath smoothing? It may be some simple filters, or something. I know with this issue strugling a lot of people. I want to test new features.
https://postimg.cc/dL66JDn3
https://postimg.cc/k2VTwqF5
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Re: CV toolpath smoothing

Postby hmnijp » Tue Jan 23, 2024 7:33 pm

This already exists in the UCCNC. Code G64 D... E... H... L... P... Q... sets the smoothing parameters.
You can find out how they affect CV in the manual, pages 33,34,35,59.

if you are getting polygons - I think you are setting a large tolerance in the CAM and not in the UCCNC setting, because of this your toolpath is output with low resolution.

You shouldn't reduce the precision much in CAM, but you can achieve smoothing and good speed by setting a larger tolerance in the G64 parameters (P, Q) - this setting will do the smoothing. If the car moves jerkily, then your G64 accuracy is too high. Widen the tolerance and it will go smoothly.
There is also no need to change the settings in the servo drive.
hmnijp
 
Posts: 44
Joined: Sun Jan 17, 2021 12:59 am

Re: CV toolpath smoothing

Postby Doncis » Tue Jan 23, 2024 8:17 pm

Yes, I already controll G64 parameters trouhg CAM program, for specific operations. I wrote postprocessor, to output G64 settings. It works very well for adaptive roughing operations, for high speed and low precission, and high presission for simple 2d finishing. But I struggle to get good quality 3d surface finish. It looks like UCCNC "smoothing" toolpath with straight lines, but not with arc fillets, as mention in uccnc manual page 35(corners error max).
What G64 settings you recomend? In the cam program, We tried all combinations, chaining tolerance 2mm-0.1mm, sirface quality parameter 0.1-0.002mm, with no success.
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Re: CV toolpath smoothing

Postby hmnijp » Tue Jan 23, 2024 8:36 pm

Doncis wrote:Yes, I already controll G64 parameters trouhg CAM program, for specific operations. I wrote postprocessor, to output G64 settings. It works very well for adaptive roughing operations, for high speed and low precission, and high presission for simple 2d finishing. But I struggle to get good quality 3d surface finish. It looks like UCCNC "smoothing" toolpath with straight lines, but not with arc fillets, as mention in uccnc manual page 35(corners error max).
What G64 settings you recomend? In the cam program, We tried all combinations, chaining tolerance 2mm-0.1mm, sirface quality parameter 0.1-0.002mm, with no success.


I think you need to try different settings, as the amount of smoothing will also depend on the acceleration of your machine. If your path is round enough, you can safely set a large tolerance - this will make a smooth path without greatly affecting the accuracy - since the average value of the position will fall where intended.
But you have to worry about the sharp corners being cut off.

I also have a post-processor that allows you to change settings depending on the required accuracy. Most often I use 0.05-0.1 Linear and Corner Error for 3D shapes, but for some cases I have to do more or less.
In some cases Linear addition length 2, Linear Unify length 10. Stop at angle - 89.

A short video demonstrating how it works on a bad trajectory. Here the parameters are enlarged for clarity.

[ Play Quicktime file ] 2024-01-24-00-34-29.mp4 [ 1.81 MiB | Viewed 1399 times ]

hmnijp
 
Posts: 44
Joined: Sun Jan 17, 2021 12:59 am

Re: CV toolpath smoothing

Postby Doncis » Tue Jan 23, 2024 9:14 pm

Acceleration 0.3g.
G64 H0.01 L1 P2 Q0. 03 for finishing
G64 H0.3 L1 P2 Q0.3 for rough

I dont worry much for sharp corners cut off, just want smooth arc fillet corner error. Zigzag toolpath do not corresponds real world 3d surface,because it just replace zigzag segments with sraght lines, but not arc fillets. If you try on simple circle, you will get nasty polygon, with sharp edges.
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Re: CV toolpath smoothing

Postby hmnijp » Tue Jan 23, 2024 9:55 pm

Doncis wrote:I dont worry much for sharp corners cut off, just want smooth arc fillet corner error. Zigzag toolpath do not corresponds real world 3d surface,because it just replace zigzag segments with sraght lines, but not arc fillets. If you try on simple circle, you will get nasty polygon, with sharp edges.


a circle will not become a polygon if the linear error is small. the trajectory will not be able to deviate from the circle more than this value. But at the same time there can be a large rounding(corner error). Here's an example:

[ Play Quicktime file ] 2024-01-24-01-48-58.mp4 [ 1.91 MiB | Viewed 1397 times ]

(this is one program, the settings have not been changed. You can see how the polygon is rounded, but there is no deviation from the circle.)
hmnijp
 
Posts: 44
Joined: Sun Jan 17, 2021 12:59 am

Re: CV toolpath smoothing

Postby Doncis » Tue Jan 23, 2024 10:43 pm

Looks very good. What is you G64 settings in this viseo? Please poat gcode, and acceleration values. Thanks
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Re: CV toolpath smoothing

Postby hmnijp » Tue Jan 23, 2024 11:32 pm

Doncis wrote:Looks very good. What is you G64 settings in this viseo? Please poat gcode, and acceleration values. Thanks

These settings have no relation to reality, they have very large numbers that can be seen with the naked eye. I set them just to show how it works...
I’ll also add a screenshot of this programm from LinuxCNC - It has a similar smothing algorithm, but also saves on the screen the path along which it moved - this will help me draw notes to show what each parameter means.
The program was run with two different settings.
2024-01-24 02-30-24.jpg

As you can see, in one case the circle actually becomes a polyhedron with rounded corners, since the linear error is very large and unify length allows you to combine a section of the trajectory into one line. But if linear error is less than Corner error, then the trajectory will be a circle. If you understand this smoothing algorithm, you can find the best settings for you.
I also agree with you that there are better trajectory planning algorithms based on nurbs. and it would be great to see them in action. :)

Untitled - Setup1 -6.txt
(3.2 KiB) Downloaded 48 times
hmnijp
 
Posts: 44
Joined: Sun Jan 17, 2021 12:59 am

Re: CV toolpath smoothing

Postby Doncis » Wed Jan 24, 2024 3:52 am

So, not only acceleration, but also feed rate effect corner rounding? Fast feed - more rounding, slow feed - less corner rounding?
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Re: CV toolpath smoothing

Postby Doncis » Wed Jan 24, 2024 4:58 am

I also working on complex parts (4axis simultaneus), inverse feed G73 of course. Trajectory planner work same way for rotary axis also?

https://youtu.be/4wU5BIvge8I?feature=shared
https://youtu.be/T1L3NnEx1NM?feature=shared
Doncis
 
Posts: 35
Joined: Thu Jul 15, 2021 11:51 am

Next

Return to Feature Request

Who is online

Users browsing this forum: No registered users and 2 guests