Notifications
Clear all

Circular interpolation  

  RSS
keith.g5
(@keith-g5)
Eminent Member
Circular interpolation

Hello list.
I'm new here but an old hand at machine shop, toolmaking CNC machining/programming, Gcode. I recently assembled my mk3 kit and am quite happy with it. I've mostly been using Prusa Slicer3D as my post processor for my .stl files and I have one big question:

Does the firmware in M3 support Circular interpolation? G2, G3, I, J, [K] ? G2, G3 really reduces the file size versus G1 point to point.

One line (or two) of code in circular (G2 G3) can complete a full diameter versus man many point to point lines via G1. So, I have not searched the forum for this question but i am curious and looking for efficiency.

thank you.

Publié : 26/08/2018 3:02 am
RetireeJay
(@retireejay)
Reputable Member
Re: Circular interpolation

Prusa's firmware is based upon Marlin firmware, but with some additions and subtractions. According to https://reprap.org/wiki/G-code the G2 and G3 commands are supported in Marlin. And the Prusa Firmware Wiki https://github.com/prusa3d/Prusa-Firmware/wiki/Supported-G-codes does indicate support for G2 and G3.

However, those commands don't seem to be implemented in Slic3r, either the "stock" version or the "PE" (Prusa Edition) version.

This may be related to the fact that slicers always start with STL files, and STL files don't actually have circles; they have approximations made up of straight lines, with the number of segments in each circle dependent on settings used to translate from the original CAD program to the STL file.

So a slicer would have to reverse-engineer and make an educated guess that this sequence of little segments is in fact a circle (and not an ellipse or some more complex smooth curve). At one time, I actually was considering building a post-processor for G-code to make use of the circular arcs, but I quickly realized that there are deep weeds in making the decision to use or not use an arc, and then how to specify the arc so that it most faithfully conforms to the original intent (which, in a post-processor can only be inferred from the slic3r's G-code, not the STL file and certainly not the original CAD file). Some STL files are generated from scans of physical objects, and don't have any underlying CAD data at all!

Ultimately, the printer executes vector moves on a grid of 80 steps per mm in X and 80 steps per mm in Y, so it's not clear how much efficiency would be gained by using the circular arcs. Yes, the G-code could be more compact with circular arcs, but it won't necessarily improve the execution of the physical steps on the machine, either in speed of execution or smoothness of motion.

Publié : 26/08/2018 3:54 am
JoanTabb
(@joantabb)
Veteran Member Moderator
Re: Circular interpolation

To the best of my knowledge, Circular interpolation is not currently available on the prusa at the m moment,

regards Joan

I try to make safe suggestions,You should understand the context and ensure you are happy that they are safe before attempting to apply my suggestions, what you do, is YOUR responsibility. Location Halifax UK

Publié : 26/08/2018 3:56 am
keith.g5
(@keith-g5)
Eminent Member
Topic starter answered:
Re: Circular interpolation

Thank you both for your responses.

Retireejay: You nailed it. Yes .stl files are all point to point so it follows that the posted code would also be. I overlooked that. I'm still more accustomed to CNC code. So I did do a little hand coding and my MK3 followed a 100mm dia circle via G3 (only) 90 degrees counterclockwise from starting point x50. y0.

Publié : 26/08/2018 5:51 pm
Partager :