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

Waterfall.Internal.Remesh

Description

This code exists because the opencascade GLTF loading code generates "weird" BReps

The FreeCAD sourcecode describes this as follows:

The glTF reader creates a compound of faces that only contains the triangulation
but not the underlying surfaces. This leads to faces without boundaries.
The triangulation is used to create a valid shape.

The practical result of this, seems to be that directly using an Shape loaded using CafReader in most operations will lead to segmentation faults.

However, we can safely access the Triangulation of the Shape, construct Polygons from this and then use BReps derived from these Polygons.

In this way, the remesh function produces a new Boundary Represenation from the Mesh of an Shape

Documentation

remesh :: Ptr Shape -> Acquire (Maybe (Ptr Shape)) Source #