GCodeAPI.GCodeLine Class Reference

This class wraps the G0 and G1 g-codes which provide the printer track of line. More...

Inheritance diagram for GCodeAPI.GCodeLine:
GCodeAPI.IGCode

Public Types

enum  SpeedModes { Fast, Slow }
 This enum wraps Rapid linear Move (G0, Fast) and Linear Move (G1, Slow) More...
 

Public Member Functions

 GCodeLine (double? x=null, double? y=null, double? z=null, double? speed=null, double? extrude=null, SpeedModes mode=SpeedModes.Slow)
 Constructs a new GCodeLine object with the specified parameters. More...
 
override string ToString ()
 Returns the g-code string. More...
 
IGCode Duplicate ()
 Return a deep copy of the object. More...
 

Public Attributes

double x
 

Properties

string Name [get]
 Returns the name of IGCode More...
 
SpeedModes SpeedMode [get, set]
 Sets or returns the current speed mode [Rapid linear Move (G0, Fast) or Linear Move (G1, Slow)] More...
 
bool isMoving [get]
 Returns true if this line contain x, y or z moving command. More...
 
bool isMovingXY [get]
 Returns true if this line contain x or y moving command. More...
 
bool isMovingZ [get]
 Returns true if this line contain z moving command. More...
 
Point Position [get]
 Returns a Point which contains the x y positions or null if there is not x-y positions. More...
 
- Properties inherited from GCodeAPI.IGCode
string Name [get]
 Returns the name of IGCode More...
 

Detailed Description

This class wraps the G0 and G1 g-codes which provide the printer track of line.

Member Enumeration Documentation

◆ SpeedModes

This enum wraps Rapid linear Move (G0, Fast) and Linear Move (G1, Slow)

Constructor & Destructor Documentation

◆ GCodeLine()

GCodeAPI.GCodeLine.GCodeLine ( double?  x = null,
double?  y = null,
double?  z = null,
double?  speed = null,
double?  extrude = null,
SpeedModes  mode = SpeedModes.Slow 
)

Constructs a new GCodeLine object with the specified parameters.

Parameters
xThe position to move to on the X axis
yThe position to move to on the Y axis
zThe position to move to on the Z axis
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
modeRapid linear Move (G0, Fast) and Linear Move (G1, Slow)

Member Function Documentation

◆ Duplicate()

IGCode GCodeAPI.GCodeLine.Duplicate ( )

Return a deep copy of the object.

Returns

Implements GCodeAPI.IGCode.

◆ ToString()

override string GCodeAPI.GCodeLine.ToString ( )

Returns the g-code string.

Returns

Property Documentation

◆ isMoving

bool GCodeAPI.GCodeLine.isMoving
get

Returns true if this line contain x, y or z moving command.

◆ isMovingXY

bool GCodeAPI.GCodeLine.isMovingXY
get

Returns true if this line contain x or y moving command.

◆ isMovingZ

bool GCodeAPI.GCodeLine.isMovingZ
get

Returns true if this line contain z moving command.

◆ Name

string GCodeAPI.GCodeLine.Name
get

Returns the name of IGCode

◆ Position

Point GCodeAPI.GCodeLine.Position
get

Returns a Point which contains the x y positions or null if there is not x-y positions.

◆ SpeedMode

SpeedModes GCodeAPI.GCodeLine.SpeedMode
getset

Sets or returns the current speed mode [Rapid linear Move (G0, Fast) or Linear Move (G1, Slow)]


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