waterfall-cad 0.6.3.0 → 0.6.3.1
raw patch · 4 files changed
+10/−22 lines, 4 filesdep ~opencascade-hsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: opencascade-hs
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- src/Waterfall/Internal/Edges.hs +1/−17
- src/Waterfall/TwoD/Shape.hs +2/−2
- waterfall-cad.cabal +3/−3
CHANGELOG.md view
@@ -8,6 +8,10 @@ ## Unreleased +## 0.6.3.1++- Fix potential segfault in `shapePaths`+ ## 0.6.3.0 - Fixed an issue in `Waterfall.Transforms` where negative coefficients to `scale` would produce a broken `Solid`
src/Waterfall/Internal/Edges.hs view
@@ -74,22 +74,6 @@ else pure [points] runToEnd -allSubShapes :: ShapeEnum.ShapeEnum -> Ptr TopoDS.Shape -> Acquire [Ptr TopoDS.Shape]-allSubShapes t s = do - explorer <- Explorer.new s t- let go visited = do- isMore <- liftIO $ Explorer.more explorer- if isMore - then do- v <- liftIO $ Explorer.value explorer- hash <- liftIO $ TopTools.ShapeMapHasher.hash v- let add = if hash `elem` visited then id else (v:) - liftIO $ Explorer.next explorer- add <$> go visited- else return []- go []-- allSubShapesWithCopy :: ShapeEnum.ShapeEnum -> Ptr TopoDS.Shape -> Acquire [Ptr TopoDS.Shape] allSubShapesWithCopy t s = do explorer <- Explorer.new s t@@ -114,7 +98,7 @@ allEdges s = traverse (liftIO . unsafeDowncast) =<< allSubShapesWithCopy ShapeEnum.Edge s allWires :: Ptr TopoDS.Shape -> Acquire [Ptr TopoDS.Wire]-allWires s = traverse (liftIO . unsafeDowncast) =<< allSubShapes ShapeEnum.Wire s +allWires s = traverse (liftIO . unsafeDowncast) =<< allSubShapesWithCopy ShapeEnum.Wire s wireEndpoints :: Ptr TopoDS.Wire -> IO (V3 Double, V3 Double) wireEndpoints wire = with (WireExplorer.fromWire wire) $ \explorer -> do
src/Waterfall/TwoD/Shape.hs view
@@ -18,7 +18,7 @@ import Waterfall.TwoD.Internal.Shape (Shape (..), union2D, difference2D, intersection2D, unions2D, intersections2D, emptyShape) import Waterfall.TwoD.Internal.Path2D (Path2D (..)) import Waterfall.TwoD.Transforms (translate2D, rotate2D)-import Waterfall.Internal.Finalizers (toAcquire, unsafeFromAcquire)+import Waterfall.Internal.Finalizers (toAcquire, unsafeFromAcquire, unsafeFromAcquireT) import Waterfall.Internal.Edges (allWires) import qualified OpenCascade.BRepBuilderAPI.MakeFace as MakeFace import OpenCascade.Inheritance (upcast)@@ -45,7 +45,7 @@ -- Although this can only hold when the shape has one boundary path, -- and is not guaranteed shapePaths :: Shape -> [Path2D] -shapePaths (Shape r) = fmap (Path2D . ComplexRawPath) . unsafeFromAcquire $ do+shapePaths (Shape r) = fmap (Path2D . ComplexRawPath) . unsafeFromAcquireT $ do s <- toAcquire r allWires s
waterfall-cad.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.39.1.+-- This file has been generated from package.yaml by hpack version 0.39.6. -- -- see: https://github.com/sol/hpack name: waterfall-cad-version: 0.6.3.0+version: 0.6.3.1 synopsis: Declarative CAD/Solid Modeling Library description: Please see the README on GitHub at <https://github.com/joe-warren/opencascade-hs#readme> category: Graphics@@ -73,7 +73,7 @@ , lattices >=2.0 && <3 , lens ==5.* , linear >=1.21 && <2- , opencascade-hs >=0.6.3.0 && <0.7+ , opencascade-hs >=0.6.3.1 && <0.7 , primitive >=0.7 && <0.10 , resourcet >=1.2 && <1.4 default-language: Haskell2010