by cncdrive » Tue Sep 20, 2016 12:05 pm
I was working on this for some time and the algorithm I've made already working with linear movements and to some level with arcs too,
but it is not perfect yet for arcs and I had to do other things, had no enough time to finish it yet.
Although I think I have to mention here that cutter radius compensation is not the magic wand as many people (mostly the ones who has not enough experience with it yet) may think,
how it works in CNC controllers can sometimes cause more problems than advantages, the reason for this is that by definition the algorithm has to look ahead only one segment (line or arc) to know the connection angle. This can cause lots of precision issues especially if a toolpath is built from small line segments and sharp corners.
The algorithm could be implemented also differently, but then it is no more G41/G42 standard as it would then not comply the definition and then the exact path calculation could be not easily followed by the operator and could be time consuming for the CNC controller.
So, a CAM program calculates the radius compensated path totally differently, the main difference is that it views the whole path in once and that way the new path can be even perfectly parallel, but it can take time for the computer to calculate the path which is not acceptable for a CNC controller. I mean the CNC controller can't work for minutes on calculating the offset path.
So this topic is really interesting, because it is a complex mathematical and computation problem if we think and go more deep into.