diff options
Diffstat (limited to 'shelves.hs')
-rw-r--r-- | shelves.hs | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,6 +1,6 @@ | |||
1 | import Graphics.OpenSCAD | 1 | import Graphics.OpenSCAD |
2 | import Linear.V3 | 2 | import Linear.V3 |
3 | import OpenSCAD.Carpentry | 3 | import Carpentry |
4 | import System.Process | 4 | import 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 | ||
16 | myShelf :: Shelf | 16 | myShelf :: Shelf |
17 | myShelf = Shelf { width = 12*4, depth = 12, boardThickness = 1, | 17 | myShelf = Shelf { width = 12*80000, depth = 48, boardThickness = 1, |
18 | shelfHeights = [15, 8, 8, 8] } | 18 | shelfHeights = [36, 36, 36] } |
19 | |||
20 | 19 | ||
21 | calcShelfHeights :: Shelf -> [Double] | 20 | calcShelfHeights :: Shelf -> [Double] |
22 | calcShelfHeights s = scanl (+) 0 [h + (boardThickness s)|h <- (shelfHeights s)] | 21 | calcShelfHeights s = scanl (+) 0 [h + (boardThickness s)|h <- (shelfHeights s)] |