{-
The following program will hang if you uncomment the line to writeSTL the 3D polygon, however you can see it works fine writing the 2d version and also a 2d and 3d version written using rectR. But for some reason polygon has an infinite loop when extruding.
-}
import Graphics.Implicit
main = do
writePNG2 0 "r2d.png" r
writePNG2 0 "p2d.png" p
writeSTL 0 "r3d.stl" $ extrudeR 0 r 1
--writeSTL 0 "p3d.stl" $ extrudeR 0 p 1
-- Two identical shapes written using rectR or polygon. One can extrude, one can't.
r = rectR 0 (0,0) (10,10)
p = polygon [(0,0), (10,0), (10,10), (0,10)]
{- The following program will hang if you uncomment the line to writeSTL the 3D polygon, however you can see it works fine writing the 2d version and also a 2d and 3d version written using rectR. But for some reason polygon has an infinite loop when extruding. -} import Graphics.Implicit
main = do writePNG2 0 "r2d.png" r writePNG2 0 "p2d.png" p writeSTL 0 "r3d.stl" $ extrudeR 0 r 1 --writeSTL 0 "p3d.stl" $ extrudeR 0 p 1
-- Two identical shapes written using rectR or polygon. One can extrude, one can't. r = rectR 0 (0,0) (10,10) p = polygon [(0,0), (10,0), (10,10), (0,10)]