Hide menu
Loading...
Searching...
No Matches
cadex.ModelAlgo.MeshGenerator Class Reference

Generates a polygonal mesh for a B-Rep body. More...

Inheritance diagram for cadex.ModelAlgo.MeshGenerator:
cadex.BaseObject

Public Member Functions

 MeshGenerator (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 MeshGenerator (cadex.ModelAlgo.MeshGeneratorParameters theParameters)
 
cadex.ModelAlgo.MeshGeneratorParameters Parameters ()
 
void SetParameters (cadex.ModelAlgo.MeshGeneratorParameters theParameters)
 
void Generate (cadex.ModelData.Model theModel, bool theEnforceGeneration)
 
void Generate (cadex.ModelData.Model theModel)
 
void Generate (cadex.ModelData.Part thePart, bool theEnforceGeneration)
 
void Generate (cadex.ModelData.Part thePart)
 
void Generate (cadex.ModelData.Body theBody, bool theEnforceGeneration)
 
void Generate (cadex.ModelData.Body theBody)
 
cadex.ModelData.MeshShape Generate (cadex.ModelData.Shape theShape, bool theEnforceGeneration)
 
cadex.ModelData.MeshShape Generate (cadex.ModelData.Shape theShape)
 
void SetProgressStatus (cadex.ProgressStatus theStatus)
 
cadex.ProgressStatus ProgressStatus ()
 
- Public Member Functions inherited from cadex.BaseObject
 BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
bool IsNull ()
 
ulong Id ()
 Return unique identifier of public object.
 
bool IsEqual (cadex.BaseObject theObj)
 
override int GetHashCode ()
 
override bool Equals (System.Object o)
 

Static Public Member Functions

static cadex.ModelAlgo.MeshGenerator Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Generates a polygonal mesh for a B-Rep body.

Computes a bounding box for theShape, takes its maximum dimension and multiplies by thePrec. If computation of bounding box fails, returns thePrec.

This method is called when a relative precision mode is used.

The mesh generator can operate on an entire model, a subtree of a model element, or a particular B-Rep body/shape. It can also generate only a visualization mesh.

The following example demonstrates how to use the mesh generator.

Compute tessellation for all B-Rep bodies in the model using the mesh generator:

ModelData::Model aModel = ...;
MeshGenerator aMeshGenerator;
aMeshGenerator.Generate (aModel);
Generates a polygonal mesh for a B-Rep body.
Definition MeshGenerator.cs:36
Provides MTK data model.
Definition Model.cs:30
See also
Mesh Generation.
Examples
meshing/mesh_generation/Program.cs, meshing/mesh_generation/main.cxx, utilities/progress_bar/Program.cs, and utilities/progress_bar/main.cxx.

Member Function Documentation

◆ Dispose()

override void cadex.ModelAlgo.MeshGenerator.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ Generate() [1/4]

void cadex.ModelAlgo.MeshGenerator.Generate ( cadex.ModelData.Body theBody,
bool theEnforceGeneration )
inline

Generates a mesh for the body.

Parameters
theEnforceGenerationif true, regenerates the mesh even if it already exists.

◆ Generate() [2/4]

void cadex.ModelAlgo.MeshGenerator.Generate ( cadex.ModelData.Model theModel,
bool theEnforceGeneration )
inline

Generates a mesh for the model.

Parameters
theEnforceGenerationif true, regenerates the mesh even if it already exists.
Examples
meshing/mesh_generation/Program.cs, utilities/progress_bar/Program.cs, and utilities/progress_bar/main.cxx.

◆ Generate() [3/4]

void cadex.ModelAlgo.MeshGenerator.Generate ( cadex.ModelData.Part thePart,
bool theEnforceGeneration )
inline

Generates a mesh for the part.

Parameters
theEnforceGenerationif true, regenerates the mesh even if it already exists.

◆ Generate() [4/4]

cadex.ModelData.MeshShape cadex.ModelAlgo.MeshGenerator.Generate ( cadex.ModelData.Shape theShape,
bool theEnforceGeneration )
inline

Generates a mesh for the shape.

Parameters
theEnforceGenerationif true, regenerates the mesh even if it already exists.