Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- scale :: Object obj vec => vec -> obj -> obj
- complement :: Object obj vec => obj -> obj
- translate :: Object obj vec => vec -> obj -> obj
- unionR :: Object obj vec => ℝ -> [obj] -> obj
- intersectR :: Object obj vec => ℝ -> [obj] -> obj
- differenceR :: Object obj vec => ℝ -> [obj] -> obj
- shell :: Object obj vec => ℝ -> obj -> obj
- implicit :: Object obj vec => (vec -> ℝ) -> (vec, vec) -> obj
- sphere :: ℝ -> SymbolicObj3
- rect3R :: ℝ -> ℝ3 -> ℝ3 -> SymbolicObj3
- cylinder2 :: ℝ -> ℝ -> ℝ -> SymbolicObj3
- cylinder :: ℝ -> ℝ -> SymbolicObj3
- circle :: ℝ -> SymbolicObj2
- rectR :: ℝ -> ℝ2 -> ℝ2 -> SymbolicObj2
- polygonR :: ℝ -> [ℝ2] -> SymbolicObj2
- union :: Object obj vec => [obj] -> obj
- difference :: Object obj vec => [obj] -> obj
- intersect :: Object obj vec => [obj] -> obj
- extrudeR :: ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3
- extrudeRotateR :: ℝ -> ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3
- extrudeRM :: ℝ -> Either ℝ (ℝ -> ℝ) -> Either ℝ (ℝ -> ℝ) -> Either ℝ2 (ℝ -> ℝ2) -> SymbolicObj2 -> Either ℝ (ℝ2 -> ℝ) -> SymbolicObj3
- rotateExtrude :: ℝ -> Maybe ℝ -> Either ℝ2 (ℝ -> ℝ2) -> Either ℝ (ℝ -> ℝ) -> SymbolicObj2 -> SymbolicObj3
- extrudeOnEdgeOf :: SymbolicObj2 -> SymbolicObj2 -> SymbolicObj3
- rotate3 :: ℝ3 -> SymbolicObj3 -> SymbolicObj3
- rotate3V :: ℝ -> ℝ3 -> SymbolicObj3 -> SymbolicObj3
- pack3 :: ℝ2 -> ℝ -> [SymbolicObj3] -> Maybe SymbolicObj3
- rotate :: ℝ -> SymbolicObj2 -> SymbolicObj2
- pack2 :: ℝ2 -> ℝ -> [SymbolicObj2] -> Maybe SymbolicObj2
- runOpenscad :: ScadOpts -> [String] -> String -> IO (VarLookup, [SymbolicObj2], [SymbolicObj3], [Message])
- data SymbolicObj3
- data SymbolicObj2
- type ℝ = Double
- writeSVG :: ℝ -> FilePath -> SymbolicObj2 -> IO ()
- writeDXF2 :: ℝ -> FilePath -> SymbolicObj2 -> IO ()
- writeSTL :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
- writeBinSTL :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
- writeOBJ :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
- writeTHREEJS :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
- writeSCAD2 :: ℝ -> FilePath -> SymbolicObj2 -> IO ()
- writeSCAD3 :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
- writeGCodeHacklabLaser :: ℝ -> FilePath -> SymbolicObj2 -> IO ()
- writePNG2 :: ℝ -> FilePath -> SymbolicObj2 -> IO ()
- writePNG3 :: ℝ -> FilePath -> SymbolicObj3 -> IO ()
Documentation
:: Object obj vec | |
=> vec | Amount to scale by |
-> obj | Object to scale |
-> obj | Resulting scaled object |
Scale an object
:: Object obj vec | |
=> vec | Vector to translate by (Also: a is a vector, blah, blah) |
-> obj | Object to translate |
-> obj | Resulting object |
Translate an object by a vector of appropriate dimension.
:: Object obj vec | |
=> ℝ | The radius of rounding |
-> [obj] | objects to union |
-> obj | Resulting object |
Rounded union
:: Object obj vec | |
=> ℝ | The radius of rounding |
-> [obj] | Objects to intersect |
-> obj | Resulting object |
Rounded minimum
:: Object obj vec | |
=> ℝ | The radius of rounding |
-> [obj] | Objects to difference |
-> obj | Resulting object |
Rounded difference
:: Object obj vec | |
=> ℝ | width of shell |
-> obj | object to take shell of |
-> obj | resulting shell |
Make a shell of an object.
:: Object obj vec | |
=> (vec -> ℝ) | Implicit function |
-> (vec, vec) | Bounding box |
-> obj | Resulting object |
:: ℝ | Radius of the sphere |
-> SymbolicObj3 | Resulting sphere |
:: ℝ | Rounding of corners |
-> ℝ3 | Bottom.. corner |
-> ℝ3 | Top right... corner |
-> SymbolicObj3 | Resuting cube - (0,0,0) is bottom left... |
:: ℝ | Radius of the cylinder |
-> ℝ | Second radius of the cylinder |
-> ℝ | Height of the cylinder |
-> SymbolicObj3 | Resulting cylinder |
:: ℝ | Radius of the cylinder |
-> ℝ | Height of the cylinder |
-> SymbolicObj3 | Resulting cylinder |
:: ℝ | radius of the circle |
-> SymbolicObj2 | resulting circle |
:: ℝ | |
-> ℝ2 | Bottom left corner |
-> ℝ2 | Top right corner |
-> SymbolicObj2 | Resulting square (bottom right = (0,0) ) |
:: ℝ | Rouding of the polygon |
-> [ℝ2] | Verticies of the polygon |
-> SymbolicObj2 | Resulting polygon |
difference :: Object obj vec => [obj] -> obj Source #
extrudeR :: ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3 Source #
extrudeRotateR :: ℝ -> ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3 Source #
extrudeRM :: ℝ -> Either ℝ (ℝ -> ℝ) -> Either ℝ (ℝ -> ℝ) -> Either ℝ2 (ℝ -> ℝ2) -> SymbolicObj2 -> Either ℝ (ℝ2 -> ℝ) -> SymbolicObj3 Source #
rotateExtrude :: ℝ -> Maybe ℝ -> Either ℝ2 (ℝ -> ℝ2) -> Either ℝ (ℝ -> ℝ) -> SymbolicObj2 -> SymbolicObj3 Source #
rotate3 :: ℝ3 -> SymbolicObj3 -> SymbolicObj3 Source #
rotate3V :: ℝ -> ℝ3 -> SymbolicObj3 -> SymbolicObj3 Source #
pack3 :: ℝ2 -> ℝ -> [SymbolicObj3] -> Maybe SymbolicObj3 Source #
rotate :: ℝ -> SymbolicObj2 -> SymbolicObj2 Source #
pack2 :: ℝ2 -> ℝ -> [SymbolicObj2] -> Maybe SymbolicObj2 Source #
runOpenscad :: ScadOpts -> [String] -> String -> IO (VarLookup, [SymbolicObj2], [SymbolicObj3], [Message]) Source #
Small wrapper of our parser to handle parse errors, etc.
data SymbolicObj3 Source #
A symbolic 3D format!
Instances
Show SymbolicObj3 Source # | |
Defined in Graphics.Implicit.Definitions showsPrec :: Int -> SymbolicObj3 -> ShowS # show :: SymbolicObj3 -> String # showList :: [SymbolicObj3] -> ShowS # | |
DiscreteAproxable SymbolicObj3 DynamicImage Source # | |
Defined in Graphics.Implicit.Export.DiscreteAproxable discreteAprox :: ℝ -> SymbolicObj3 -> DynamicImage Source # | |
DiscreteAproxable SymbolicObj3 NormedTriangleMesh Source # | |
Defined in Graphics.Implicit.Export.DiscreteAproxable discreteAprox :: ℝ -> SymbolicObj3 -> NormedTriangleMesh Source # | |
DiscreteAproxable SymbolicObj3 TriangleMesh Source # | |
Defined in Graphics.Implicit.Export.DiscreteAproxable discreteAprox :: ℝ -> SymbolicObj3 -> TriangleMesh Source # |
data SymbolicObj2 Source #
A symbolic 2D object format. We want to have symbolic objects so that we can accelerate rendering & give ideal meshes for simple cases.
Instances
Show SymbolicObj2 Source # | |
Defined in Graphics.Implicit.Definitions showsPrec :: Int -> SymbolicObj2 -> ShowS # show :: SymbolicObj2 -> String # showList :: [SymbolicObj2] -> ShowS # | |
DiscreteAproxable SymbolicObj2 DynamicImage Source # | |
Defined in Graphics.Implicit.Export.DiscreteAproxable discreteAprox :: ℝ -> SymbolicObj2 -> DynamicImage Source # | |
DiscreteAproxable SymbolicObj2 [Polyline] Source # | |
Defined in Graphics.Implicit.Export.DiscreteAproxable discreteAprox :: ℝ -> SymbolicObj2 -> [Polyline] Source # |
writeBinSTL :: ℝ -> FilePath -> SymbolicObj3 -> IO () Source #
writeTHREEJS :: ℝ -> FilePath -> SymbolicObj3 -> IO () Source #
writeSCAD2 :: ℝ -> FilePath -> SymbolicObj2 -> IO () Source #
writeSCAD3 :: ℝ -> FilePath -> SymbolicObj3 -> IO () Source #
writeGCodeHacklabLaser :: ℝ -> FilePath -> SymbolicObj2 -> IO () Source #