Refactor, move towards adding cylinders

This commit is contained in:
2023-03-16 17:01:58 +00:00
parent 24c1264f96
commit 46d6d91138
4 changed files with 70 additions and 62 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ upperBox
-> [Point2]
-> Shape
{-# INLINE upperBox #-}
upperBox h ps = singleShape (Surface (TopBox n) (f ps) white)
upperBox h ps = singleShape (Surface (FlatFaces n) (f ps) white)
where
n = length ps
g h' (V2 x y) = V3 x y h'
@@ -90,7 +90,7 @@ upperCylinder
-> [Point2]
-> Shape
{-# INLINE upperCylinder #-}
upperCylinder h ps = singleShape (Surface (TopCylinder n) (addZ h cc:addZ 0 cc:f ps) black)
upperCylinder h ps = singleShape (Surface (RoundedFaces n) (addZ h cc:addZ 0 cc:f ps) black)
where
cc = centroid ps
n = length ps