Andy, I haven't calculated how far the midpoint of the arc is from the midpoint of a straight line from point to point using the values in your example but I know it would not be much. I do know APT uses 2500 inches as the cutoff point for radius calculation. I don't know the exact reason for choosing this radius value as the cutoff point but it gives rise to an interesting programming scenario. Apt is very conducive to 'family of parts' programming. A bearing pillow block is one example since the shape contour is basically the same for every size. The 2500 inch as a cutoff value allows you to program the entire contour using circular (G02/G03) commands. You would choose 2500 as the radius of any straight lines and the desired radius of any needed radius. G02/G03 X.... Y... R*>*2500 is treated as a straight line. G02/G03 X... Y... R<2500. Deviation from the 'standard' contour can be addressed using this protocol and the same APT code can be used to generate a Gcode file. Just my thoughts this fine morning. I have never used this except to prove it to myself with an example. I still wonder the exact reason this was done. HTH Stuart
On Fri, Feb 4, 2022 at 3:30 PM andy pugh <bodge...@gmail.com> wrote: > LinuxCNC G-code assumes that the programmer wanted a full circle if > the coordinates of the start and end points in the plane are "the > same". > > Currently both the preview interpreter and motion use the angle > between the start and end points of an arc to decide if the start and > end coordinates are “identical” and if so it is assumed that a full > turn was wanted. > > > https://github.com/LinuxCNC/linuxcnc/blob/master/src/libnml/posemath/_posemath.c#L1824 > > https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/rs274ngc/gcodemodule.cc#L1002 > > They calculate the angle in different ways and get slightly different > results. (ie, if you carefully tweak the code, you can have the > preview and actual motion give different results. > > This probably doesn't matter very often. > > A problem arises if a _very_ large radius is computed to generate a > nearly-straight line. > (In the example in issue 1528 one of the problem arcs is 5mm long, but > has a 7km radius. The coordinates are very different, but the included > angle is very, very small) > > Given that arcs are programmed in terms of XY coordinates, I think it > makes no sense to judge the smallness of an arc by internal angle. I > propose doing it purely on the basis of hypotenuse distance in the > plane. > > (Incidentally, part of the reason that the preview and motion differ > is because motion is in metric and preview is in imperial! At least > with a metric config and metric G-code. I will need to test the 4 > combinations) > > -- > atp > "A motorcycle is a bicycle with a pandemonium attachment and is > designed for the especial use of mechanical geniuses, daredevils and > lunatics." > — George Fitch, Atlanta Constitution Newspaper, 1912 > > > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers > -- Addressee is the intended audience. If you are not the addressee then my consent is not given for you to read this email furthermore it is my wish you would close this without saving or reading, and cease and desist from saving or opening my private correspondence. Thank you for honoring my wish. _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers