Welcome! Log In Create A New Profile

Advanced

GCode and circles

Posted by rogerw 
GCode and circles
December 03, 2012 07:23PM
hi don't know much about gcode but
i drew a STL with lots of circle in it and it took forever to convert to gcode
because it seems all the G1 are from point to point
why isn;t there a CIRCLE or ARC g code.
roger.


Prusa 'Explorer' (3dStuffMaker), GEN6, J-head Mk III-B, Bowden Extruder, Marlin 1.0.0 RC2, Repitier-Host V0.84 and Slic3r 0.9.8, PLA. Live at Victoria, Australia.
Re: GCode and circles
December 03, 2012 07:37PM
Because STL is an incredibly basic file format and has no support for curves, the entire model has to be made up of flat polygons.
A smart slicer could try and figure out if an arc were a "good fit", and replace lines with arcs, but it can only "guess" since it has no access to the original intent.

GCode itself has two arc gcodes G2 and G3, but only support circular arcs.

In the CNC world formats other than STL are used for interchange, those formats support curves, a lot of the higher end CAM packages are embedded in the CAD software.

Edited 1 time(s). Last edit at 12/03/2012 07:38PM by Polygonhell.
Re: GCode and circles
December 03, 2012 08:43PM
circle/arc gcode is a bit of a funny one, sprinter and marlin simply break the circle up into the little straight segments anyway, to help with communications,

in the industrial world every machine has it's own way of implementing g2 g3 as well, some will only support real circles some will do the whole box and dice, and some will only do them on the x-y plane,
the safest most compatible thing to do is forget circles exist...
Re: GCode and circles
December 03, 2012 08:52PM
how small a line (in mm) is it breaking a circle up into


Prusa 'Explorer' (3dStuffMaker), GEN6, J-head Mk III-B, Bowden Extruder, Marlin 1.0.0 RC2, Repitier-Host V0.84 and Slic3r 0.9.8, PLA. Live at Victoria, Australia.
Re: GCode and circles
December 03, 2012 11:19PM
from my understanding without looking at the firmware, marlin runs at the most detailed resolution it can. marlin does nothing to convert circles, the host process converts the lines and angles to curved arcs, marlin supports implimenting them, at high detail.. the gcode is less because you are telling marlin to draw a corner arch, rather than 10-30 lines very short to create the arch.

so it only makes a difference if your post processor converts the angles and circles into arch data.


also slic3r claims to do this.
Re: GCode and circles
December 04, 2012 04:51AM
thejollygrimreaper Wrote:
-------------------------------------------------------
> circle/arc gcode is a bit of a funny one, sprinter
> and marlin simply break the circle up into the
> little straight segments anyway, to help with
> communications,

Well it has to be interpolated at some point before the steppers in any system.

I don't think that printing needs arc support that much, the filament track naturally approximates the corners anyway and produces circles, even with comparatively long (0.5-1 mm or so?) segments. With milling it's more critical, there you really need the arc G-commands. I made a G-code file for milling extruder groove mount plates with all corners rounded with the G2/G3 arc commands and when milling it with Marlin, the curves look really good. The steppers sound different too, with smoothly rising and falling tones.
Re: GCode and circles
December 04, 2012 01:00PM
the reason the arc codes are being used in 3d printing are because the alternative is short segments that cause the electronics buffers to empty quicker then they can be filled. when the buffers empty the printer just sits there waiting for its next command, while the extruder begins oozing ruining the print. marlin compensated for this a little bit by trying to slow down feed rate when buffer is half full, but segments still need to be greater than a few mm to keep the buffer from getting empty. a corner can be defined as a single buffered command, or it can be 8-16 commands, a typical point of failure for most reprap printers is printing circles. this is fixed by using arc commands
Re: GCode and circles
December 04, 2012 02:52PM
ttsalo Wrote:
-------------------------------------------------------
> thejollygrimreaper Wrote:
> --------------------------------------------------
> -----
> > circle/arc gcode is a bit of a funny one,
> sprinter
> > and marlin simply break the circle up into the
> > little straight segments anyway, to help with
> > communications,
>
> Well it has to be interpolated at some point
> before the steppers in any system.
>
> I don't think that printing needs arc support that
> much, the filament track naturally approximates
> the corners anyway and produces circles, even with
> comparatively long (0.5-1 mm or so?) segments.
> With milling it's more critical, there you really
> need the arc G-commands. I made a G-code file for
> milling extruder groove mount plates with all
> corners rounded with the G2/G3 arc commands and
> when milling it with Marlin, the curves look
> really good. The steppers sound different too,
> with smoothly rising and falling tones.

Yeah but when your milling somthing your not going at 200+mm/sec, if you set the segment length in your cam program to less then .1mm it's not noticeable in materials like mdf and pine, even in aluminium and steel you'll find that flexing in the tool even helps smooth things out,
Sorry, only registered users may post in this forum.

Click here to login