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

Defines parameters used by the mesh generator. More...

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

Public Types

enum  GranularityType { Coarse , Medium , Fine , Custom }
 Defines target accuracy of the mesh to be generated. More...
 

Public Member Functions

 MeshGeneratorParameters (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 MeshGeneratorParameters ()
 Sets default parameter values according to GranularityType.Fine.
 
 MeshGeneratorParameters (cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
 Sets default parameter values according to theGranularity.
 
cadex.ModelAlgo.MeshGeneratorParameters.GranularityType Granularity ()
 Returns a granularity value.
 
void SetGranularity (cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
 If theGranularity is Custom, the method does nothing.
 
double ChordalDeflection ()
 Returns a relative or absolute value of the chordal deflection depending on the value returned by IsRelativeChordalDeflection().
 
void SetChordalDeflection (double theValue)
 Specifies either a value relative to the body bounding box (if IsRelativeChordalDeflection() is true) or an absolute value of the maximum deflection of the visualization mesh.
 
bool IsRelativeChordalDeflection ()
 By default, it is true.
 
void SetIsRelativeChordalDeflection (bool theValue)
 Specifies whether ChordalDeflection() contains an absolute (if false) or a relative to the shape bounding box (if true, by default) value of the deflection.
 
double AngularDeflection ()
 Returns angular deflection.
 
void SetAngularDeflection (double theValue)
 Specifies a maximum deviation (in radians) between tangents at two adjacent mesh nodes when tessellating an edge curve or between normals when tessellating a face surface.
 
- 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.MeshGeneratorParameters Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Defines parameters used by the mesh generator.

Parameters can be set to and retrieved from the mesh generator using MeshGenerator.SetParameters() and MeshGenerator.Parameters() methods respectively.

Examples
meshing/mesh_generation/Program.cs, and meshing/mesh_generation/main.cxx.

Member Enumeration Documentation

◆ GranularityType

Defines target accuracy of the mesh to be generated.

Provides predefined values for chordal and angular deflections:

  Fine Medium Coarse
chordal deflection 0.004 (0.4%) 0.01 (1%) 0.05 (5%)
angular deflection 20 degrees 45 degrees 60 degrees

The predefined values are applied when invoking MeshGeneratorParameters.SetGranularity().

Chordal and angular deflections can also be set to explicitly specified values using MeshGeneratorParameters.SetChordalDeflection() and MeshGeneratorParameters.SetAngularDeflection() methods.

Constructor & Destructor Documentation

◆ MeshGeneratorParameters() [1/2]

cadex.ModelAlgo.MeshGeneratorParameters.MeshGeneratorParameters ( )
inline

Sets default parameter values according to GranularityType.Fine.

See also
SetGranularity(). Constructor.

◆ MeshGeneratorParameters() [2/2]

cadex.ModelAlgo.MeshGeneratorParameters.MeshGeneratorParameters ( cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
inline

Sets default parameter values according to theGranularity.

See also
SetGranularity(). Constructor.

Member Function Documentation

◆ AngularDeflection()

double cadex.ModelAlgo.MeshGeneratorParameters.AngularDeflection ( )
inline

Returns angular deflection.

See also
SetAngularDeflection().

◆ ChordalDeflection()

double cadex.ModelAlgo.MeshGeneratorParameters.ChordalDeflection ( )
inline

Returns a relative or absolute value of the chordal deflection depending on the value returned by IsRelativeChordalDeflection().

Default value is 0.004 (0.4%) when IsRelativeChordalDeflection() is true.

See also
SetChordalDeflection(). Returns chordal deflection.

◆ Dispose()

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

Reimplemented from cadex.BaseObject.

◆ Granularity()

cadex.ModelAlgo.MeshGeneratorParameters.GranularityType cadex.ModelAlgo.MeshGeneratorParameters.Granularity ( )
inline

Returns a granularity value.

See also
SetGranularity().

◆ IsRelativeChordalDeflection()

bool cadex.ModelAlgo.MeshGeneratorParameters.IsRelativeChordalDeflection ( )
inline

By default, it is true.

See also
SetIsRelativeChordalDeflection(). Returns whether ChordalDeflection() contains an absolute or relative value.

◆ SetAngularDeflection()

void cadex.ModelAlgo.MeshGeneratorParameters.SetAngularDeflection ( double theValue)
inline

Specifies a maximum deviation (in radians) between tangents at two adjacent mesh nodes when tessellating an edge curve or between normals when tessellating a face surface.

Default value in radians is equal to 20 degrees.

Sets granularity to Custom. Sets angular deflection.

Examples
meshing/mesh_generation/Program.cs, and meshing/mesh_generation/main.cxx.

◆ SetChordalDeflection()

void cadex.ModelAlgo.MeshGeneratorParameters.SetChordalDeflection ( double theValue)
inline

Specifies either a value relative to the body bounding box (if IsRelativeChordalDeflection() is true) or an absolute value of the maximum deflection of the visualization mesh.

Chordal deflection is basically a deviation of the triangles from the original surfaces or curves. Default value is 0.004 (0.4%) when IsRelativeChordalDeflection() is true.

Note that in some cases the algorithm can produce more coarse triangulation.

Sets granularity to Custom.

See also
ChordalDeflection(). Sets chordal deflection.
Examples
meshing/mesh_generation/Program.cs, and meshing/mesh_generation/main.cxx.

◆ SetGranularity()

void cadex.ModelAlgo.MeshGeneratorParameters.SetGranularity ( cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
inline

If theGranularity is Custom, the method does nothing.

Otherwise sets chordal and angular deflections according to the specified granularity value. Refer to the table in the description of the GranularityType. IsRelativeChordalDeflection() is set to true.

See also
GetGranularity().

◆ SetIsRelativeChordalDeflection()

void cadex.ModelAlgo.MeshGeneratorParameters.SetIsRelativeChordalDeflection ( bool theValue)
inline

Specifies whether ChordalDeflection() contains an absolute (if false) or a relative to the shape bounding box (if true, by default) value of the deflection.

Sets granularity to Custom.

See also
IsRelativeChordalDeflection() Sets whether ChordalDeflection() contains an absolute or relative value.