Safe Haskell | None |
---|---|
Language | Haskell2010 |
GCode pretty-printing functions
Utilities for manipulating and filtering GCode
Synopsis
- isG :: Code -> Bool
- isM :: Code -> Bool
- isGN :: Int -> Code -> Bool
- hasAxis :: AxisDesignator -> Code -> Bool
- getAxis :: AxisDesignator -> Code -> Maybe Double
- getAxes :: [AxisDesignator] -> Code -> [Maybe Double]
- getAxesToList :: Code -> [(AxisDesignator, Double)]
- hasX :: Code -> Bool
- hasY :: Code -> Bool
- hasZ :: Code -> Bool
- hasE :: Code -> Bool
- hasParam :: ParamDesignator -> Code -> Bool
- getParam :: ParamDesignator -> Code -> Maybe Double
- hasFeedrate :: Code -> Bool
- gcodes :: [Code] -> [Code]
- mcodes :: [Code] -> [Code]
- rapids :: [Code] -> [Code]
- moves :: [Code] -> [Code]
- replaceClass :: Class -> Code -> Code
- replaceCode :: Int -> Code -> Code
- replaceAxis :: AxisDesignator -> Double -> Code -> Code
- modifyAxis :: AxisDesignator -> (Double -> Double) -> Code -> Code
- modifyAxes :: [AxisDesignator] -> (Double -> Double) -> Code -> Code
- hasXY :: Code -> Bool
- modifyXY :: (Double -> Double -> (Double, Double)) -> Code -> Code
- addReplaceAxis :: AxisDesignator -> Double -> Code -> Code
- replaceX :: Double -> Code -> Code
- replaceY :: Double -> Code -> Code
- replaceZ :: Double -> Code -> Code
- replaceE :: Double -> Code -> Code
- addReplaceX :: Double -> Code -> Code
- addReplaceY :: Double -> Code -> Code
- addReplaceZ :: Double -> Code -> Code
- addReplaceE :: Double -> Code -> Code
- replaceParam :: ParamDesignator -> Double -> Code -> Code
- modifyParam :: ParamDesignator -> (Double -> Double) -> Code -> Code
- modifyParams :: [ParamDesignator] -> (Double -> Double) -> Code -> Code
- modifyParamsWithKey :: [ParamDesignator] -> (ParamDesignator -> Double -> Double) -> Code -> Code
- addReplaceParam :: ParamDesignator -> Double -> Code -> Code
- replaceFeedrate :: Double -> Code -> Code
- modifyFeedrate :: (Double -> Double) -> Code -> Code
- travelDistance :: Code -> Double
- roundprec :: (Integral a, RealFrac b, Fractional c) => a -> b -> c
Documentation
getAxesToList :: Code -> [(AxisDesignator, Double)] Source #
hasParam :: ParamDesignator -> Code -> Bool Source #
True if Code
contains parameter with ParamDesignator
replaceAxis :: AxisDesignator -> Double -> Code -> Code Source #
Replace axis with AxisDesignator
in Code
returning new Code
modifyAxis :: AxisDesignator -> (Double -> Double) -> Code -> Code Source #
Apply function to axis specified by AxisDesignator
modifyAxes :: [AxisDesignator] -> (Double -> Double) -> Code -> Code Source #
Apply function to axes specified by '[AxisDesignator]'
modifyXY :: (Double -> Double -> (Double, Double)) -> Code -> Code Source #
Apply function to X and Y axes
addReplaceAxis :: AxisDesignator -> Double -> Code -> Code Source #
Replace or add axis with AxisDesignator
in Code
returning new Code
replaceParam :: ParamDesignator -> Double -> Code -> Code Source #
Replace parameter with ParamDesignator
in Code
returning new Code
modifyParam :: ParamDesignator -> (Double -> Double) -> Code -> Code Source #
Apply function to parameter with ParamDesignator
modifyParams :: [ParamDesignator] -> (Double -> Double) -> Code -> Code Source #
Apply function to parameters specified by '[ParamDesignator]'
modifyParamsWithKey :: [ParamDesignator] -> (ParamDesignator -> Double -> Double) -> Code -> Code Source #
Apply function to parameters specified by '[ParamDesignator]'
Function gets ParameterDesignator
passed as its first argument
addReplaceParam :: ParamDesignator -> Double -> Code -> Code Source #
Replace or add parameter with ParamDesignator
in Code
returning new Code