diff options
-rw-r--r-- | shelves.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,8 +1,13 @@ | |||
1 | import Control.Lens | 1 | import Control.Lens |
2 | import GenSCAD (genscad) | ||
3 | import Graphics.OpenSCAD | 2 | import Graphics.OpenSCAD |
4 | import Linear.V3 | 3 | import Linear.V3 |
5 | 4 | ||
5 | genscad :: [(V3 Double, V3 Double)] -> String | ||
6 | genscad = render . union . map transBox | ||
7 | where | ||
8 | transBox :: (V3 Double, V3 Double) -> Model3d | ||
9 | transBox (V3 x1 y1 z1, V3 x2 y2 z2) = translate (x1,y1,z1) $ box x2 y2 z2 | ||
10 | |||
6 | data Shelf | 11 | data Shelf |
7 | 12 | ||
8 | myShelf :: Shelf | 13 | myShelf :: Shelf |