Skip to content

Mesh Processing

Justin edited this page Mar 18, 2022 · 11 revisions

CGAL offers a number of functions to process meshes. They are separated into helper classes as follows.

A example of how to use these helper class is as follows.


//Create the mesh.
var mesh = new Polyhedron3<EIK>(points, indices);

//Get a instance to the processing helperr class.
//Use the same kernel type (ie EIK)
var instance = MeshProcessingOrientation<EIK>.Instance;

//Perform the op you want.
instance.ReverseFaceOrientations(mesh);

A list of the helper classes and their functions is as follows.

MeshProcessingBoolean

  • Union
  • Difference
  • Intersection

MeshProcessingConnections

  • UnconnectedComponents
  • ConnectedFaces
  • SplitUnconnectedComponents
  • KeepLargeComponents
  • KeepLargestComponents

MeshProcessingFeatures

  • DetectSharpEdges
  • EdgeLengthMinMaxAvg
  • FaceAreaMinMaxAvg
  • SharpEdgesSegmentation

MeshProcessingLocate

  • RandomLocationOnMesh
  • LocateFace
  • ClosestFace

MeshProcessingMeshing

  • Extrude
  • Fair
  • Refine
  • IsotropicRemeshing
  • RandomPerturbation
  • SmoothMeshByAngle
  • SplitLongEdges
  • TriangulateFace
  • TriangulateFaces

MeshProcessingOrientation

  • DoesBoundAVolume
  • IsOutwardOriented
  • Orient
  • OrientToBoundAVolume
  • ReverseFaceOrientations

MeshProcessingRepair

  • DegenerateEdgeCount
  • DegenerateTriangleCount
  • NeedleTriangleCount
  • NonManifoldVertexCount
  • RepairPolygonSoup
  • StitchBoundaryCycles
  • StitchBorders
  • RemoveIsolatedVertices

MeshProcessingSlicer

  • Slice

Below is a image of the slicer applied to the bunny mesh.

slicer

Below is image of a mesh being remeshed with the isotropic mesher.

remesh

Clone this wiki locally