generative-art-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Draw.Plotting.GCode

Synopsis

Documentation

data GCode Source #

Raw GCode for penplotting.

Constructors

GComment Text 
GBlock [GCode]

Group a couple of commands for easier reading.

F_Feedrate Double

Set the feedrate. Normally mm/min, but can be altered using G93, G94, G20, G21.

M0_Pause

Pause and wait for user input

G00_LinearRapidMove (Maybe Double) (Maybe Double) (Maybe Double)

G0 X Y Z: Move as fast as possible

G01_LinearFeedrateMove (Maybe Double) (Maybe Double) (Maybe Double) (Maybe Double)

G1 F X Y Z: Move with specified feedrate

G02_ArcClockwise (Maybe Double) Double Double Double Double

G2 F I J X Y: Paint part of a circle, clockwise

G03_ArcCounterClockwise (Maybe Double) Double Double Double Double

G3 F I J X Y: Paint part of a circle, counterclockwise

G04_Dwell_ms Double

G4 P: wait a number of milliseconds.

G17_Plane_XY 
G18_Plane_ZX 
G19_Plane_YZ 
G20_UseInches 
G21_UseMm 
G28_GotoPredefinedPosition (Maybe Double) (Maybe Double) (Maybe Double)
G28 X Y Z
G30_GotoPredefinedPosition (Maybe Double) (Maybe Double) (Maybe Double)
G30 X Y Z
G90_AbsoluteMovement

Move commands use coordinates relative to the origin

G91_RelativeMovement

Move commands use coordinates relative to the current position

G93_Feedrate_TravelInFractionOfMinute 
G94_Feedrate_UnitsPerMinute 

Instances

Instances details
Show GCode Source # 
Instance details

Defined in Draw.Plotting.GCode

Methods

showsPrec :: Int -> GCode -> ShowS #

show :: GCode -> String #

showList :: [GCode] -> ShowS #

Eq GCode Source # 
Instance details

Defined in Draw.Plotting.GCode

Methods

(==) :: GCode -> GCode -> Bool #

(/=) :: GCode -> GCode -> Bool #

Ord GCode Source # 
Instance details

Defined in Draw.Plotting.GCode

Methods

compare :: GCode -> GCode -> Ordering #

(<) :: GCode -> GCode -> Bool #

(<=) :: GCode -> GCode -> Bool #

(>) :: GCode -> GCode -> Bool #

(>=) :: GCode -> GCode -> Bool #

max :: GCode -> GCode -> GCode #

min :: GCode -> GCode -> GCode #

renderGCode :: [GCode] -> Text Source #

Convert GCode to Text, to be written to a file.