-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Cubic DSL for 3D printing -- @package cube @version 0.1.0 module Language.Cube class ToSTL a toSTL :: ToSTL a => a -> STL -- | Unit element of Cube. -- -- This is the same as quaternion. data Quaternion a Quaternion :: a -> a -> a -> a -> Quaternion a us :: Quaternion a -> a ux :: Quaternion a -> a uy :: Quaternion a -> a uz :: Quaternion a -> a type Cube = Quaternion Int -- | Set of Cube. This supports boolean operations on polygons. (+) means -- or. (-) means not. (*) means convolution. data Block a Block :: Set a -> Block a units :: Block a -> Set a -- | map for Block. smap :: (Ord a, Ord b) => (a -> b) -> Block a -> Block b -- | Utility function of generating Block from list of cube block :: Ord a => [a] -> Block a -- | Utility function of Cube 0 x y z cube :: Int -> Int -> Int -> Cube -- | Generate STL file from Block writeFileStl :: ToSTL a => String -> a -> IO () -- | Unit scalar vector ds :: Cube -- | Unit vector of X direction dx :: Cube -- | Unit vector of Y direction dy :: Cube -- | Unit vector of Z direction dz :: Cube -- | Vector for generating routation vector dr :: Float -> Cube -> Cube -- | This function genrates a cube of n-width. nCube :: Int -> Block Cube -- | Generate surface block. This is fast function. But shape becomes -- little bit bigger. surface' :: Block Cube -> Block Cube -- | Generate surface block surface :: Block Cube -> Block Cube -- | Generate house which is for demo. house :: Block Cube instance [incoherent] Show a => Show (Quaternion a) instance [incoherent] Eq a => Eq (Quaternion a) instance [incoherent] Ord a => Ord (Quaternion a) instance [incoherent] Show a => Show (Block a) instance [incoherent] Eq a => Eq (Block a) instance [incoherent] Ord a => Ord (Block a) instance [incoherent] (Ord a, Monoid a) => Monoid (Block a) instance [incoherent] Monoid STL instance [incoherent] ToSTL a => ToSTL (Block a) instance [incoherent] ToSTL (Quaternion Int) instance [incoherent] (Ord a, Eq a, Num a) => Num (Block a) instance [incoherent] Num a => Num (Quaternion a) instance [incoherent] Num a => Monoid (Quaternion a)