| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Data.GCode.Types
Description
GCode types
This module exports types for constructing Code values
Synopsis
- data Class
- = G
 - | M
 - | T
 - | PStandalone
 - | FStandalone
 - | SStandalone
 
 - data AxisDesignator
 - data ParamDesignator
 - allClasses :: [Class]
 - allAxisDesignators :: [AxisDesignator]
 - zeroAxes :: Axes
 - allParamDesignators :: [ParamDesignator]
 - asChars :: Show a => [a] -> [Char]
 - type Axes = Map AxisDesignator Double
 - type Params = Map ParamDesignator Double
 - type Limits = Map AxisDesignator (Double, Double)
 - type ParamLimits = Map ParamDesignator (Double, Double)
 - data Code
- = Code { 
- codeCls :: Maybe Class
 - codeNum :: Maybe Int
 - codeSub :: Maybe Int
 - codeAxes :: Axes
 - codeParams :: Params
 - codeComment :: ByteString
 
 - | Comment ByteString
 - | Empty
 - | Other ByteString
 
 - = Code { 
 - type GCode = [Code]
 - toCodeClass :: Char -> Maybe Class
 - toAxis :: Char -> Maybe AxisDesignator
 - toParam :: Char -> Maybe ParamDesignator
 - (&) :: a -> (a -> c) -> c
 - cls :: Class -> Code -> Code
 - axis :: AxisDesignator -> Double -> Code -> Code
 - param :: ParamDesignator -> Double -> Code -> Code
 - num :: Int -> Code -> Code
 - sub :: Int -> Code -> Code
 - axes :: Axes -> Code -> Code
 - params :: Params -> Code -> Code
 - comment :: ByteString -> Code -> Code
 - emptyCode :: Code
 - defaultPrec :: Int
 - data Style = Style {}
 - defaultStyle :: Style
 
Documentation
Code class
Constructors
| G | G-code  | 
| M | M-code  | 
| T | T-code (select tool)  | 
| PStandalone | Stand-alone P-code  | 
| FStandalone | Stand-alone F-code  | 
| SStandalone | Stand-alone S-code  | 
data AxisDesignator Source #
Axis letter
Instances
data ParamDesignator Source #
Param letter
Constructors
| S | S parameter - usually spindle RPM  | 
| P | P parameter  | 
| F | F parameter - usually feedrate  | 
| H | H paramater - used by tool length offset  | 
| R | R parameter  | 
| I | X offset for arcs  | 
| J | Y offset for arcs  | 
| K | Z offset for arcs  | 
Instances
allClasses :: [Class] Source #
type Axes = Map AxisDesignator Double Source #
Map of AxisDesignator to Double
type Params = Map ParamDesignator Double Source #
Map of ParamDesignator to Double
type Limits = Map AxisDesignator (Double, Double) Source #
Map of AxisDesignator to pair of Doubles indicating lower and upper limits of travel
type ParamLimits = Map ParamDesignator (Double, Double) Source #
Map of ParamDesignator to pair of Doubles indicating lower and upper limits of this parameter
Constructors
| Code | |
| Comment ByteString | Standalone comment  | 
| Empty | Empty lines  | 
| Other ByteString | Parser unhandled lines  | 
toAxis :: Char -> Maybe AxisDesignator Source #
Convert Char representation of an axis to its AxisDesignator
toParam :: Char -> Maybe ParamDesignator Source #
Convert Char representation of a param to its ParamDesignator
defaultPrec :: Int Source #
Constructors
| Style | |
Fields 
  | |
defaultStyle :: Style Source #