summaryrefslogtreecommitdiff
path: root/shelves.hs
diff options
context:
space:
mode:
Diffstat (limited to 'shelves.hs')
-rw-r--r--shelves.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/shelves.hs b/shelves.hs
index cf935a0..b59bccf 100644
--- a/shelves.hs
+++ b/shelves.hs
@@ -1,6 +1,6 @@
1import Graphics.OpenSCAD 1import Graphics.OpenSCAD
2import Linear.V3 2import Linear.V3
3import OpenSCAD.Carpentry 3import Carpentry
4import System.Process 4import System.Process
5 5
6-- the minimum paramaters to describe a shelf; the width and depth of a shelf, 6-- the minimum paramaters to describe a shelf; the width and depth of a shelf,
@@ -14,9 +14,8 @@ data Shelf = Shelf {
14} deriving (Show) 14} deriving (Show)
15 15
16myShelf :: Shelf 16myShelf :: Shelf
17myShelf = Shelf { width = 12*4, depth = 12, boardThickness = 1, 17myShelf = Shelf { width = 12*80000, depth = 48, boardThickness = 1,
18 shelfHeights = [15, 8, 8, 8] } 18 shelfHeights = [36, 36, 36] }
19
20 19
21calcShelfHeights :: Shelf -> [Double] 20calcShelfHeights :: Shelf -> [Double]
22calcShelfHeights s = scanl (+) 0 [h + (boardThickness s)|h <- (shelfHeights s)] 21calcShelfHeights s = scanl (+) 0 [h + (boardThickness s)|h <- (shelfHeights s)]