GCodeState

interface GCodeState

Properties

Link copied to clipboard
abstract val command: String
Link copied to clipboard
abstract val e: Double

The amount of filament extruded in mm

Link copied to clipboard
abstract val feedRate: Double
Link copied to clipboard
abstract val gcode: GCode
Link copied to clipboard
Link copied to clipboard

True iff any of x,y,z have changed and e has increased. i.e. the head has moved, and we have extruded filament by a positive amount. This will be false for simple movements without extrusions. Also false for extrusions when the head doesn't move (such as feeding filament back after a retraction) Also false for a retraction, regardless of whether the head moved during the retraction. NOTE, I have assumed that undoing a retraction (i.e. a positive extrusion amount corresponding with the negative extrusion amount of the retraction) will take place while the head is stationary. If this assumption is wrong, and undoing a retraction also moves the head, then findHeights() will not work correctly.

Link copied to clipboard
abstract val isRelative: Boolean
Link copied to clipboard
abstract val lineNumber: Int
Link copied to clipboard
abstract val seconds: Double
Link copied to clipboard
abstract val x: Double
Link copied to clipboard
abstract val y: Double
Link copied to clipboard
abstract val z: Double

Functions

Link copied to clipboard
abstract fun insertAfter(commands: String): GCodeState
Link copied to clipboard
abstract fun insertBefore(commands: String): GCodeState