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 ()
 Constructor.
 
 MeshGeneratorParameters (cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
 Constructor.
 
cadex.ModelAlgo.MeshGeneratorParameters.GranularityType Granularity ()
 Returns a granularity value.
 
void SetGranularity (cadex.ModelAlgo.MeshGeneratorParameters.GranularityType theGranularity)
 
double ChordalDeflection ()
 Returns chordal deflection.
 
void SetChordalDeflection (double theValue)
 Sets chordal deflection.
 
bool IsRelativeChordalDeflection ()
 Returns whether ChordalDeflection() contains an absolute or relative value.
 
void SetIsRelativeChordalDeflection (bool theValue)
 Sets whether ChordalDeflection() contains an absolute or relative value.
 
double AngularDeflection ()
 Returns angular deflection.
 
void SetAngularDeflection (double theValue)
 Sets angular deflection.
 
- 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

Constructor.

Sets default parameter values according to GranularityType.Fine.

See also
SetGranularity().

◆ MeshGeneratorParameters() [2/2]

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

Constructor.

Sets default parameter values according to theGranularity.

See also
SetGranularity().

Member Function Documentation

◆ AngularDeflection()

double cadex.ModelAlgo.MeshGeneratorParameters.AngularDeflection ( )
inline

Returns angular deflection.

See also
SetAngularDeflection().

◆ ChordalDeflection()

double cadex.ModelAlgo.MeshGeneratorParameters.ChordalDeflection ( )
inline

Returns chordal deflection.

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().

◆ 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

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

By default, it is true.

See also
SetIsRelativeChordalDeflection().

◆ SetAngularDeflection()

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

Sets angular deflection.

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.

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

◆ SetChordalDeflection()

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

Sets chordal deflection.

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().
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

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

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()