waterfall-cad-examples 0.2.0.0 → 0.2.1.0
raw patch · 3 files changed
+17/−9 lines, 3 filesdep ~opencascade-hsdep ~waterfall-cadPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: opencascade-hs, waterfall-cad
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- app/Main.hs +8/−4
- waterfall-cad-examples.cabal +5/−5
CHANGELOG.md view
@@ -8,6 +8,10 @@ ## Unreleased +## 0.2.1.0++- Added support for writing files as GLTF/GLB+ ## 0.2.0.0 - Add an example demonstrating both `Waterfall.BoundingBox.Oriented` and `Waterfall.BoundingBox.AxisAligned`
app/Main.hs view
@@ -9,7 +9,7 @@ import OffsetExample (offsetExample) import TextExample (textExample) import BoundingBoxExample (boundingBoxExample)-import Waterfall.IO (writeSTL, writeSTEP)+import Waterfall.IO (writeSTL, writeSTEP, writeGLTF, writeGLB) import qualified Waterfall.Solids as Solids import qualified Options.Applicative as OA import Control.Applicative ((<|>), liftA2)@@ -17,10 +17,14 @@ outputOption :: OA.Parser (Solids.Solid -> IO ()) outputOption =- let stlOption = writeSTL <$> (OA.option OA.auto (OA.long "resolution" <> OA.help "stl file linear tolerance") <|> pure 0.001) <*>- OA.strOption (OA.long "stl" <> OA.metavar "Stl file to write results to")+ let stlOption = (flip writeSTL) <$> OA.strOption (OA.long "stl" <> OA.metavar "Stl file to write results to")+ gltfOption = (flip writeGLTF) <$> OA.strOption (OA.long "gltf" <> OA.metavar "GLTF file to write results to")+ glbOption = (flip writeGLB) <$> OA.strOption (OA.long "glb" <> OA.metavar "GLB file to write results to")+ meshOptionsNoResolution = stlOption <|> gltfOption <|> glbOption+ meshOptions = meshOptionsNoResolution <*>+ (OA.option OA.auto (OA.long "resolution" <> OA.help "linear tolerance for mesh file formats") <|> pure 0.001) stepOption = writeSTEP <$> OA.strOption (OA.long "step" <> OA.metavar "Stl file to write results to")- in stlOption <|> stepOption+ in meshOptions <|> stepOption exampleOption :: OA.Parser (IO Solids.Solid) exampleOption =
waterfall-cad-examples.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: waterfall-cad-examples-version: 0.2.0.0+version: 0.2.1.0 synopsis: Examples for Waterfall CAD, a Declarative CAD/Solid Modeling Library description: Please see the README on GitHub at <https://github.com/joe-warren/opencascade-hs#readme> category: Graphics@@ -46,9 +46,9 @@ base >=4.7 && <5 , lens ==5.* , linear >=1.21 && <2- , opencascade-hs >=0.2.0.0 && <0.3+ , opencascade-hs >=0.2.1.0 && <0.3 , optparse-applicative >=0.17 && <0.19- , waterfall-cad >=0.2.0.0 && <0.3+ , waterfall-cad >=0.2.1.0 && <0.3 default-language: Haskell2010 executable waterfall-cad-examples@@ -62,8 +62,8 @@ base >=4.7 && <5 , lens ==5.* , linear >=1.21 && <2- , opencascade-hs >=0.2.0.0 && <0.3+ , opencascade-hs >=0.2.1.0 && <0.3 , optparse-applicative >=0.17 && <0.19- , waterfall-cad >=0.2.0.0 && <0.3+ , waterfall-cad >=0.2.1.0 && <0.3 , waterfall-cad-examples default-language: Haskell2010