GCodeAPI.GCodeCircle Class Reference

This class wraps the G2 and G3 g-codes which provide the printer track of circle. More...

Inheritance diagram for GCodeAPI.GCodeCircle:
GCodeAPI.IGCode

Public Member Functions

 GCodeCircle (double i, double j, double? x=null, double? y=null, double? f=null, double? e=null, bool isClockwise=true)
 Default constructor (http://reprap.org/wiki/G-code#G2_.26_G3:_Controlled_Arc_Move) More...
 
override string ToString ()
 Returns the g-code string. More...
 
IGCode Duplicate ()
 Returns a deep copy of the object. More...
 

Static Public Member Functions

static GCodeCircle getCircleByRadius (double axisAngle, double radius, bool isClockwise=true, double? speed=null, double? extrude=null)
 Returns a printer track of specified circle. The circle path is defined by using a line. The start point of the line is the current position of printer head (use the GCodeLine class to define it). The line is defined by angle with horizontal axis and length of line (2x radius). More...
 
static void Arc (GCodeCollector code, double centerX, double centerY, double radius, double startDegree, double stopDegree, double? speed=null, bool needExtrude=false, bool isClockwise=true)
 Add a curve to the input GCodeCollector; More...
 
static void ArcByPoints (GCodeCollector code, double startX, double startY, double stopX, double stopY, double radius, double? speed=null, bool needExtrude=false, bool isClockwise=true)
 

Properties

string Name [get]
 Returns the name of IGCode More...
 
Rect Bound [get]
 Returns this circle's bounding rectangle. More...
 
- Properties inherited from GCodeAPI.IGCode
string Name [get]
 Returns the name of IGCode More...
 

Detailed Description

This class wraps the G2 and G3 g-codes which provide the printer track of circle.

Constructor & Destructor Documentation

◆ GCodeCircle()

GCodeAPI.GCodeCircle.GCodeCircle ( double  i,
double  j,
double?  x = null,
double?  y = null,
double?  f = null,
double?  e = null,
bool  isClockwise = true 
)

Default constructor (http://reprap.org/wiki/G-code#G2_.26_G3:_Controlled_Arc_Move)

Parameters
fThe feed-rate per minute of the move between the starting point and ending point
xThe position to move to on the X axis
yThe position to move to on the Y axis
iThe point in X space from the current X position to maintain a constant distance from
jThe point in Y space from the current Y position to maintain a constant distance from
eThe amount to extrude between the starting point and ending point
isClockwisedirection (Clockwise G2, Counter-Clockwise G3)

Member Function Documentation

◆ Arc()

static void GCodeAPI.GCodeCircle.Arc ( GCodeCollector  code,
double  centerX,
double  centerY,
double  radius,
double  startDegree,
double  stopDegree,
double?  speed = null,
bool  needExtrude = false,
bool  isClockwise = true 
)
static

Add a curve to the input GCodeCollector;

Parameters
codeinput GCodeCollector
centerXcenter X of curve
centerYcenter y of curve
radiusradius of curve
startDegreestart degree of curve
stopDegreestart degree of curve
speedThe feed-rate per minute of the move between the starting point and ending point
needExtrudeset true for extruding

◆ Duplicate()

IGCode GCodeAPI.GCodeCircle.Duplicate ( )

Returns a deep copy of the object.

Returns

Implements GCodeAPI.IGCode.

◆ getCircleByRadius()

static GCodeCircle GCodeAPI.GCodeCircle.getCircleByRadius ( double  axisAngle,
double  radius,
bool  isClockwise = true,
double?  speed = null,
double?  extrude = null 
)
static

Returns a printer track of specified circle. The circle path is defined by using a line. The start point of the line is the current position of printer head (use the GCodeLine class to define it). The line is defined by angle with horizontal axis and length of line (2x radius).

Parameters
axisAngleangle with horizontal axis
radiusradius of circle
isClockwisedirection (Clockwise G2, Counter-Clockwise G3)
speedThe feed-rate per minute of the move between the starting point and ending point
extrudeThe amount to extrude between the starting point and ending point
Returns

◆ ToString()

override string GCodeAPI.GCodeCircle.ToString ( )

Returns the g-code string.

Returns

Property Documentation

◆ Bound

Rect GCodeAPI.GCodeCircle.Bound
get

Returns this circle's bounding rectangle.

◆ Name

string GCodeAPI.GCodeCircle.Name
get

Returns the name of IGCode


The documentation for this class was generated from the following file: