Skip to content

True Arc Commands (G02 G03) #2

@chuyskywalker

Description

@chuyskywalker

Quite a few 3D printers today support true arc commands which have some worthwhile benefits. These GCODE commands (G03 and G03) produce smooth arcs with significantly less GCODE which eliminates faceting on model surfaces during prints, makes for less machine jerking, and in some printers, helps with buffer overflow.

Some slicers today implement these movements either by accepting vector model files (step for example) or by utilizing ArcWelder and similar approaches to transform sets of 2D moves that look like arcs back into proper arc commands.

As a simple example of how this plays out, this draws 4 circles in a row (my example here was based around experiments for making FullControl parameterized battery pack cell holders):

from math import tau
steps = []
cell_diameter = 21.2
segments = 90
clockwise = True
for i in range(4):
  circle_center = fc.Point(x=50 + (cell_diameter*i), y=50, z=0)
  steps.extend(fc.travel_to(fc.geometry.polar_to_point(circle_center, cell_diameter/2, 0.25*tau)))
  steps.extend(fc.circleXY(
    circle_center, cell_diameter/2, 0.25*tau, segments, clockwise
  ))

fc.transform(steps, 'plot')

The GCODE produced from this, excluding all the printer start/prime/stop stuff, is something to the tune of 364 commands.

Here's the same result (minus E amount, I don't know how to calculate that):

G21 ; set units to millimeters
G91 ; relative positioning, makes the below coordinate movement easier
G0 X21.2 Y21.2
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6

The end result of 4 printed circles is the same, but the G2 commands will produce much better print results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    added to roadmapAdded to roadmap doc in root of repoenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions