Safe Haskell | None |
---|---|

Language | Haskell2010 |

- data RSTL a = Stl {}
- type Stl = RSTL Triangle
- class ToStl a where
- class Conjugate a where
- conjugate :: a -> a

- class Num a => Delta a where
- class RFunctor f a b where
- rfmap :: (a -> b) -> f a -> f b

- data Quaternion a = Quaternion {}
- type Cube = Quaternion Float
- data Block a = Block {}
- toSTL :: ToStl a => a -> STL
- toCube :: [Int] -> Cube
- block :: Ord a => [a] -> Block a
- cube :: Int -> Int -> Int -> Cube
- compaction :: Stl -> Stl
- flipTriangle :: Triangle -> Triangle
- writeFileStl :: ToStl a => String -> a -> IO ()
- writeFileStlWithText :: ToStl a => String -> a -> IO ()
- printStl :: ToStl a => a -> IO ()
- nCube :: Int -> Block Cube
- surface' :: Block Cube -> Block Cube
- surface :: Block Cube -> Block Cube

# Documentation

Ristricted STL This is the almost same as STL of Graphics.Formats.STL. This is used to instantiate RFunctor of STL. RFunctor provides a function(rfmap) like fmap of Functor.

Generate Ristricted STL

class Num a => Delta a where Source

Delta move and rotation for quaternion

delta for x axis

delta for y axis

delta for z axis

delta for real part of quaternion

:: Float | radian |

-> a | axes of routation |

-> a |

cons (theta*2) + i sin (theta*2) + j sin (theta*2) + k sin (theta*2) of quaternion

:: Float | radian |

-> a | axes of routation |

-> a | Input Vector |

-> a |

Routation for quaternion

:: Float | radian |

-> a | axes of routation |

-> a | Input Vector |

-> a |

Routation for quaternion This is the same as dR.

data Quaternion a Source

Unit element of Cube.

This is the same as quaternion.

Functor Quaternion | |

Delta Cube | |

ToStl Cube | |

Eq a => Eq (Quaternion a) | |

Num a => Num (Quaternion a) | |

Ord a => Ord (Quaternion a) | |

Show a => Show (Quaternion a) | |

Num a => Monoid (Quaternion a) | |

Num a => Conjugate (Quaternion a) |

type Cube = Quaternion Float Source

Set of Cube. This supports boolean operations on polygons. (+) means or. (-) means not. (*) means convolution.

compaction :: Stl -> Stl Source

Remove redundant triangles

flipTriangle :: Triangle -> Triangle Source

Flip rotation of triangle

writeFileStl :: ToStl a => String -> a -> IO () Source

Generate binary STL file from Block

writeFileStlWithText :: ToStl a => String -> a -> IO () Source

Generate text STL file from Block