diff options
Diffstat (limited to 'shelves.hs')
-rw-r--r-- | shelves.hs | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -91,14 +91,14 @@ assembleShelf s = assemble [shelves, sides] | |||
91 | sides = | 91 | sides = |
92 | let sideB = V3 (boardThickness s) (depth s) shelfHeight | 92 | let sideB = V3 (boardThickness s) (depth s) shelfHeight |
93 | sideP = at [0, boardThickness s + width s] [0] [0] | 93 | sideP = at [0, boardThickness s + width s] [0] [0] |
94 | in component "sides" sideB _xyz sideP | 94 | in component "sides" "blue" sideB _xyz sideP |
95 | shelves = | 95 | shelves = |
96 | let shelfB = V3 (width s) (depth s) (boardThickness s) | 96 | let shelfB = V3 (width s) (depth s) (boardThickness s) |
97 | shelfP = | 97 | shelfP = |
98 | let pz = | 98 | let pz = |
99 | scanl (+) 0 [h + (boardThickness s) | h <- (shelfHeights s)] | 99 | scanl (+) 0 [h + (boardThickness s) | h <- (shelfHeights s)] |
100 | in at [(boardThickness s)] [0] pz | 100 | in at [(boardThickness s)] [0] pz |
101 | in component "shelves" shelfB _xyz shelfP | 101 | in component "shelves" "red" shelfB _xyz shelfP |
102 | 102 | ||
103 | 103 | ||
104 | shelf :: String | 104 | shelf :: String |
@@ -108,7 +108,9 @@ shelf' = renderL $ modelShelf' myShelf | |||
108 | shelf'' :: String | 108 | shelf'' :: String |
109 | shelf'' = renderL $ modelShelf'' myShelf | 109 | shelf'' = renderL $ modelShelf'' myShelf |
110 | 110 | ||
111 | (cuts, model) = assembleShelf myShelf | 111 | mesh = assembleShelf myShelf |
112 | 112 | ||
113 | main :: IO ProcessHandle | 113 | main :: IO ProcessHandle |
114 | main = openTempSCAD $ shelf'' | 114 | main = let (cuts, model) = assembleShelf myShelf |
115 | in do putStrLn cuts | ||
116 | openTempSCAD $ renderL model | ||