waterfall-cad-0.5.1.0: Declarative CAD/Solid Modeling Library
Safe HaskellNone
LanguageHaskell2010

Waterfall.Offset

Synopsis

Documentation

offset Source #

Arguments

:: Double

Amount to offset by, positive values expand, negative values contract

-> Solid

the Solid to offset

-> Solid 

Expand or contract a Solid by a certain amount.

This is based on MakeOffsetShape from the underlying OpenCascade library. And as such, only supports the same set of Solids that MakeOffsetShape does.

The documentation for MakeOffsetShape lists the following constraints ( link ):

  • All the faces of the shape S should be based on the surfaces with continuity at least C1.
  • The offset value should be sufficiently small to avoid self-intersections in resulting shape. Otherwise these self-intersections may appear inside an offset face if its initial surface is not plane or sphere or cylinder, also some non-adjacent offset faces may intersect each other. Also, some offset surfaces may "turn inside out".
  • The algorithm may fail if the shape S contains vertices where more than 3 edges converge.
  • Since 3d-offset algorithm involves intersection of surfaces, it is under limitations of surface intersection algorithm.
  • A result cannot be generated if the underlying geometry of S is BSpline with continuity C0.

offsetWithTolerance Source #

Arguments

:: Double

Tolerance, this can be relatively small

-> Double

Amount to offset by, positive values expand, negative values contract

-> Solid

the Solid to offset

-> Solid 

like offset, but allows setting the tolerance parameter used by the algorithm