Package-level declarations
Types
Link copied to clipboard
Base implementation of GeneratorContext that collects commands in a list.
Link copied to clipboard
data class BasicGrblGenerator(val drawRate: Double? = 500.0, val moveRate: Double? = null, val setup: Commands = listOf(
"G21", // mm
"G90", // Absolute positioning
), val preDraw: Commands = listOf("M3 S255"), val postDraw: Commands = listOf("M3 S0"), val comment: (String) -> Commands = { listOf(";$it") }, val end: Commands = listOf(
"G0 X0 Y0",
"G90",
), val deduplicateCommands: Boolean = true, val distanceTolerance: Double = 0.5, val minSquaredDistance: Double = 0.5) : Generator
Link copied to clipboard
Link copied to clipboard
Simple factory for GeneratorContext instances.
Link copied to clipboard
interface GeneratorContext
Generates g-code commands for defined operations.
Link copied to clipboard
class GrblGeneratorContext(val drawRate: Double?, val moveRate: Double?, val setup: Commands, val preDraw: Commands, val postDraw: Commands, val comment: (String) -> Commands, val end: Commands, val distanceTolerance: Double, val minSquaredDistance: Double, deduplicateCommands: Boolean = true) : BaseGeneratorContext
Link copied to clipboard
class Plot(dimensions: Vector2, var name: String? = null, val origin: Origin = Origin.BOTTOM_LEFT, var generator: Generator = noopGenerator(), var distanceTolerance: Double = 0.5, var layerMode: LayerMode = LayerMode.SINGLE_FILE, var defaultDrawColor: ColorRGBa = ColorRGBa.BLACK, var defaultPenWeight: Double = 1.0, var backgroundColor: ColorRGBa = ColorRGBa.WHITE, val manualRedraw: Boolean = true, var renderMode: RenderMode = RenderMode.AFTER, val gCodeBind: String? = "g", val redrawBind: String? = "r", var folder: String? = "gcode") : Extension
Configuration: When manualRedraw is true, the programs presentation mode is set to Manual on startup. "r" to trigger redraw. When renderMode is set to manual, the plot will not be rendered to the programms drawer. Then render has to be called to draw the plot. origin
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Opens a new GeneratorContext and calls block with it. The context is initialized with GeneratorContext.beginFile and finalized with GeneratorContext.endFile.
Link copied to clipboard
NOOP GCode Generator used as default.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Consecutive identical commands are removed, ignoring comments. Comments are lines starting with ";" or "(".