Rhino C++ API  8.6
Public Member Functions | Friends | List of all members
ON_MeshThicknessAnalysis Class Reference

#include <opennurbs_mesh.h>

Public Member Functions

 ON_MeshThicknessAnalysis ()=default
 
 ~ON_MeshThicknessAnalysis ()=default
 
unsigned int AddMesh (const ON_Mesh *mesh, ON__UINT_PTR mesh_context, ON_Terminator *terminator)
 
bool CalculateVertexDistances (double max_distance, double sharp_angle_radians, ON_ProgressReporter *progress_reporter, ON_Terminator *terminator)
 
ON_MeshThicknessAnalysisVertexIterator Iterator () const
 
double MaximumDistance () const
 
unsigned int MeshCount () const
 
unsigned int PointCount () const
 
double SharpAngleRadians () const
 
bool VertexDistancesSet () const
 

Friends

class ON_MeshThicknessAnalysisVertexIterator
 

Constructor & Destructor Documentation

◆ ON_MeshThicknessAnalysis()

ON_MeshThicknessAnalysis::ON_MeshThicknessAnalysis ( )
default

◆ ~ON_MeshThicknessAnalysis()

ON_MeshThicknessAnalysis::~ON_MeshThicknessAnalysis ( )
default

Member Function Documentation

◆ AddMesh()

unsigned int ON_MeshThicknessAnalysis::AddMesh ( const ON_Mesh mesh,
ON__UINT_PTR  mesh_context,
ON_Terminator terminator 
)

Description: Adds a mesh that will be included in the thickness calculation. Multiple meshes can be added. The final calculation will treat the collection of mesh faces and vertices as a single mesh. Parameters: mesh - [in] mesh to add. mesh_context - [in] A "context" value passed back on ON_MeshThicknessAnalysisPoint.m_mesh_context when an ON_MeshThicknessAnalysisVertexIterator is use to iterate through the results. If you are certain mesh will persist until you are finished iterating over the results, (ON__UINT_PTR)mesh can be passed to provide quick access to mesh during iteration. terminator - [in] (can be nullptr) optional terminator to check. This process is generally fast. If your mesh has millions of vertices and faces, you may want to use a terminator. Returns: >0: The mesh id value for this mesh in this ON_MeshThicknessAnalysis The first mesh has id = 1, the second id = 2, and so on. 0: Invalid input nothing added.

◆ CalculateVertexDistances()

bool ON_MeshThicknessAnalysis::CalculateVertexDistances ( double  max_distance,
double  sharp_angle_radians,
ON_ProgressReporter progress_reporter,
ON_Terminator terminator 
)

Description: Computes the shortest distance from each vertex to a facet on the "other side". When that distance is <= max_distance, the information is saved. Parameters: mesh - [in] mesh to add. max_distance - [in] Distances larger than this value will be ignored. Setting this parameter to a value a bit larger than any distance you care about can dramatically reduce the amount of time spent in CalculateVertexDistances(). sharp_angle_radians - [in] If sharp_angle_radians >= 0.0 and < 0.5*ON_PI, it is used as the sharp angle. Otherwise, 89 degrees (89.0/180.0*ON_PI radians) is used as the sharp angle. When the interior angle between triangles sharing a common vertex is <= sharp angle, the vertex is assigned a thickness of 0.
Smaller values of sharp_angle_radians reduce the number of adjacent vertices that are assigned a thickness of 0. progress_reporter - [in] (can be nullptr) optional progress reporter. terminator - [in] (can be nullptr) optional terminator. Returns: true: Calculation finished. false: Calculation failed or was terminated.

◆ Iterator()

ON_MeshThicknessAnalysisVertexIterator ON_MeshThicknessAnalysis::Iterator ( ) const

◆ MaximumDistance()

double ON_MeshThicknessAnalysis::MaximumDistance ( ) const

Returns: Value of maximum distance used to set vertex distances

◆ MeshCount()

unsigned int ON_MeshThicknessAnalysis::MeshCount ( ) const

Returns: Total number of mesh in this ON_MeshThicknessAnalysis.

◆ PointCount()

unsigned int ON_MeshThicknessAnalysis::PointCount ( ) const

Returns: Total number of vertices in this ON_MeshThicknessAnalysis.

◆ SharpAngleRadians()

double ON_MeshThicknessAnalysis::SharpAngleRadians ( ) const

Returns: The sharp angle used to set vertex distances

◆ VertexDistancesSet()

bool ON_MeshThicknessAnalysis::VertexDistancesSet ( ) const

Returns true if vertex distance information is up to date. (Set by calling CalculateVertexDistances().)

Friends And Related Function Documentation

◆ ON_MeshThicknessAnalysisVertexIterator

C4251: 'ON_MeshThicknessAnalysisVertexIterator::m_sp' : class 'std::shared_ptr<ON_MeshThicknessAnalysisImpl>' needs to have dll-interface to be used by clients ... m_sp is private and all code that manages m_sp is explicitly implemented in the DLL.