summaryrefslogtreecommitdiff
path: root/shelves.hs
diff options
context:
space:
mode:
Diffstat (limited to 'shelves.hs')
-rw-r--r--shelves.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/shelves.hs b/shelves.hs
index 0ea28ee..c6364e1 100644
--- a/shelves.hs
+++ b/shelves.hs
@@ -22,13 +22,10 @@ data Shelf = Shelf {
22 shelfSideDimX :: Inches 22 shelfSideDimX :: Inches
23} 23}
24 24
25shelfDim :: Shelf -> V3 Inches
26shelfDim Shelf{..} = V3 shelfLength shelfWidth shelfThickness
27
28shelves' :: Shelf -> [(V3 Double, V3 Double)] 25shelves' :: Shelf -> [(V3 Double, V3 Double)]
29shelves' s@Shelf{..} = [(p, shelfDim s) | p <- shelvesPos] 26shelves' Shelf{..} = [(p, V3 shelfLength shelfWidth shelfThickness) | p <- shelvesPos]
30 where 27 where
31 shelfHeight = (sum shelfHeights) + (shelfDim s ^. _z * (fromIntegral (length shelfHeights) + 1)) 28 shelfHeight = sum shelfHeights + (shelfThickness * (fromIntegral (length shelfHeights) + 1))
32 29
33 shelfSideDim :: V3 Inches 30 shelfSideDim :: V3 Inches
34 shelfSideDim = V3 shelfSideDimX shelfWidth shelfHeight 31 shelfSideDim = V3 shelfSideDimX shelfWidth shelfHeight