GCode Processor
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
GCodeLineEntry Struct Reference

Holds the parameter of the extruder read from the input .gcode file. More...

#include <GCodeLineEntry.h>

Public Member Functions

 GCodeLineEntry (short g, double x, double y, double e) noexcept
 Constructor. More...
 
 GCodeLineEntry ()=default
 Default constructor.
 

Static Public Member Functions

static double angle (const GCodeLineEntry &A, const GCodeLineEntry &B, const GCodeLineEntry &C) noexcept
 Distance between the coordinates of two entries. More...
 
static GCodeLineEntry point_between (const GCodeLineEntry &A, const GCodeLineEntry &B, const double d) noexcept
 Creates a point on the segment AB with a specified distance from the second point. More...
 
static double distance (const GCodeLineEntry &A, const GCodeLineEntry &B) noexcept
 Angle ABC (in degrees) between two segments (i.e. three points). More...
 

Public Attributes

short G
 The extruder index.
 
double X
 The x coordinate.
 
double Y
 The y coordinate.
 
double E
 Length of the filament to extrude.
 

Detailed Description

Holds the parameter of the extruder read from the input .gcode file.

Constructor & Destructor Documentation

GCodeLineEntry ( short  g,
double  x,
double  y,
double  e 
)
inlineexplicitnoexcept

Constructor.

Parameters
gThe G (extruder index) entry.
xThe X (x coordinate) entry.
yThe Y (y coordinate) entry.
eThe filament length to push out.

Member Function Documentation

double angle ( const GCodeLineEntry A,
const GCodeLineEntry B,
const GCodeLineEntry C 
)
staticnoexcept

Distance between the coordinates of two entries.

Parameters
AThe first coordinate.
BThe second coordinate.
Attention
It's a static member variable just because I want it to be in the GCodeLineEntry namespace.
Todo:
throw if the G's don't match!
double distance ( const GCodeLineEntry A,
const GCodeLineEntry B 
)
staticnoexcept

Angle ABC (in degrees) between two segments (i.e. three points).

Parameters
AThe first point.
BThe second point.
CThe third point.
Attention
It's a static member variable just because I want it to be in the GCodeLineEntry namespace.
Todo:
throw if the G's don't match!
GCodeLineEntry point_between ( const GCodeLineEntry A,
const GCodeLineEntry B,
const double  d 
)
staticnoexcept

Creates a point on the segment AB with a specified distance from the second point.

Parameters
AThe first coordinate.
BThe second coordinate.
dThe distance from the second point.
Attention
It's a static member variable just because I want it to be in the GCodeLineEntry namespace.
Todo:
throw if the G's don't match!

The documentation for this struct was generated from the following files: