From 9e948c3dba9124e7cef54bc64fc76038b89f45f8 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 13 Mar 2019 02:45:51 -0400 Subject: reimplement genscad in terms of Graphics.OpenSCAD --- shelves.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shelves.hs b/shelves.hs index 0484ff5..6ed051a 100644 --- a/shelves.hs +++ b/shelves.hs @@ -1,8 +1,13 @@ import Control.Lens -import GenSCAD (genscad) import Graphics.OpenSCAD import Linear.V3 +genscad :: [(V3 Double, V3 Double)] -> String +genscad = render . union . map transBox + where + transBox :: (V3 Double, V3 Double) -> Model3d + transBox (V3 x1 y1 z1, V3 x2 y2 z2) = translate (x1,y1,z1) $ box x2 y2 z2 + data Shelf myShelf :: Shelf -- cgit v1.2.3