Rhino C++ API  8.6
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_MeshParameters Class Reference

#include <opennurbs_mesh.h>

Public Types

enum  MESH_PARAMETER_ID : unsigned int {
  MESH_PARAMETER_ID::unspecified_mesh_parameter_id = 0, MESH_PARAMETER_ID::bComputeCurvature_parameter_id = 1, MESH_PARAMETER_ID::bSimplePlanes_parameter_id = 2, MESH_PARAMETER_ID::bRefine_parameter_id = 3,
  MESH_PARAMETER_ID::bJaggedSeams_parameter_id = 4, MESH_PARAMETER_ID::bDoublePrecision_parameter_id = 5, MESH_PARAMETER_ID::mesher_parameter_id = 6, MESH_PARAMETER_ID::texture_range_parameter_id = 7,
  MESH_PARAMETER_ID::tolerance_parameter_id = 8, MESH_PARAMETER_ID::relative_tolerance_parameter_id = 9, MESH_PARAMETER_ID::min_tolerance_parameter_id = 10, MESH_PARAMETER_ID::min_edge_length_parameter_id = 11,
  MESH_PARAMETER_ID::max_edge_length_parameter_id = 12, MESH_PARAMETER_ID::grid_aspect_ratio_parameter_id = 13, MESH_PARAMETER_ID::grid_min_count_parameter_id = 14, MESH_PARAMETER_ID::grid_max_count_parameter_id = 15,
  MESH_PARAMETER_ID::grid_angle_parameter_id = 16, MESH_PARAMETER_ID::grid_amplification_parameter_id = 17, MESH_PARAMETER_ID::refine_angle_parameter_id = 18, MESH_PARAMETER_ID::face_type_parameter_id = 19,
  MESH_PARAMETER_ID::srf_domain_parameter_id = 20, MESH_PARAMETER_ID::bClosedObjectPostProcess_id = 21, MESH_PARAMETER_ID::mesher_id = 22, MESH_PARAMETER_ID::crv_tess_min_num_segments_parameter_id = 23,
  MESH_PARAMETER_ID::crv_tess_angle_tol_in_degrees_parameter_id = 24, MESH_PARAMETER_ID::crv_tess_max_dist_between_points_parameter_id = 25, MESH_PARAMETER_ID::crv_tess_min_parametric_ratio_parameter_id = 26, MESH_PARAMETER_ID::bEvaluatorBasedTessellation_parameter_id = 27,
  MESH_PARAMETER_ID::srf_tess_chord_height_parameter_id = 28, MESH_PARAMETER_ID::srf_tess_angle_tol_in_degrees_parameter_id = 29, MESH_PARAMETER_ID::srf_tess_max_edge_length_parameter_id = 30, MESH_PARAMETER_ID::srf_tess_min_edge_length_parameter_id = 31,
  MESH_PARAMETER_ID::srf_tess_min_edge_length_ratio_uv_parameter_id = 32, MESH_PARAMETER_ID::srf_tess_max_aspect_ratio_parameter_id = 33, MESH_PARAMETER_ID::smoothing_passes_parameter_id = 34, MESH_PARAMETER_ID::max_mesh_parameter_id
}
 
enum  MESH_STYLE : unsigned char {
  MESH_STYLE::unset_mesh_style = 0, MESH_STYLE::render_mesh_fast = 1, MESH_STYLE::render_mesh_quality = 2, MESH_STYLE::render_mesh_custom = 9,
  MESH_STYLE::render_mesh_per_object = 10
}
 
enum  Type : unsigned char {
  Type::Unset = 0, Type::Default = 1, Type::FastRender = 2, Type::QualityRender = 3,
  Type::DefaultAnalysis = 4, Type::FromMeshDensity = 5, Type::Custom = 15
}
 ON_MeshParameter::Type identifies the type of mesh creation settings. More...
 

Public Member Functions

 ON_MeshParameters ()=default
 
 ON_MeshParameters (const ON_MeshParameters &)=default
 
 ON_MeshParameters (double normalized_mesh_density, double min_edge_length=ON_UNSET_VALUE)
 
 ~ON_MeshParameters ()=default
 
const bool ClosedObjectPostProcess () const
 
const bool ComputeCurvature () const
 
ON_SHA1_Hash ContentHash () const
 
const bool CustomSettings () const
 
const bool CustomSettingsEnabled () const
 
ON__UINT32 DataCRC (ON__UINT32) const
 
const ON_wString Description () const
 
const bool DoublePrecision () const
 
void Dump (ON_TextLog &test_log) const
 
const unsigned int FaceType () const
 
const int GeometrySettingsDensityPercentage (int no_match_found_result) const
 
ON_SHA1_Hash GeometrySettingsHash () const
 
ON_SHA1_Hash GeometrySettingsHash (bool bIgnoreSubDParameters) const
 
const ON_MeshParameters::MESH_STYLE GeometrySettingsRenderMeshStyle (const ON_MeshParameters *custom_mp, ON_MeshParameters::MESH_STYLE no_match_found_result) const
 
ON_MeshParameters::Type GeometrySettingsType () const
 
ON_MeshParameters::Type GeometrySettingsType (bool bIgnoreSubDParameters) const
 
const double GridAmplification () const
 
const double GridAngleDegrees () const
 
const double GridAngleRadians () const
 
const double GridAspectRatio () const
 
const int GridMaxCount () const
 desired masimum number of quads in initial grid More...
 
const int GridMinCount () const
 minimum number of quads in initial grid More...
 
const bool JaggedSeams () const
 
const double MaximumEdgeLength () const
 
double MeshDensity () const
 
double MeshDensity (bool bIgnoreSubDParameters) const
 
const unsigned int Mesher () const
 0 = slow mesher, 1 = fast mesher More...
 
ON_UUID MesherId () const
 
const double MinimumEdgeLength () const
 
const double MinimumTolerance () const
 
ON_MeshParametersoperator= (const ON_MeshParameters &)=default
 
bool Read (ON_BinaryArchive &)
 
const bool Refine () const
 
const double RefineAngleDegrees () const
 
const double RefineAngleRadians () const
 
const double RelativeTolerance () const
 
void SetClosedObjectPostProcess (bool bClosedObjectPostProcess)
 
void SetComputeCurvature (bool bComputeCurvature)
 
void SetCustomSettings (bool bCustomSettings)
 
void SetCustomSettingsEnabled (bool bCustomSettingsEnabled)
 
void SetDoublePrecision (bool bDoublePrecision)
 
void SetFaceType (unsigned int face_type)
 
void SetGridAmplification (double grid_amplification)
 
void SetGridAngleDegrees (double grid_angle_degrees)
 
void SetGridAngleRadians (double grid_angle_radians)
 
void SetGridAspectRatio (double grid_aspect_ratio)
 
void SetGridMaxCount (int grid_max_count)
 
void SetGridMinCount (int grid_min_count)
 
void SetJaggedSeams (bool bJaggedSeams)
 
void SetMaximumEdgeLength (double maximum_edge_length)
 
void SetMesher (unsigned int mesher)
 
void SetMesherId (ON_UUID)
 
void SetMinimumEdgeLength (double minimum_edge_length)
 
void SetMinimumTolerance (double minimum_tolerance)
 
void SetRefine (bool bRefine)
 
void SetRefineAngleDegrees (double refine_angle_degrees)
 
void SetRefineAngleRadians (double refine_angle_radians)
 
void SetRelativeTolerance (double relative_tolerance)
 
void SetSimplePlanes (bool bSimplePlanes)
 
void SetSubDDisplayParameters (const class ON_SubDDisplayParameters &subd_mesh_parameters)
 
void SetTextureRange (unsigned int texture_range)
 
void SetTextureRangePictureFrameHack ()
 
void SetTolerance (double tolerance)
 
const bool SimplePlanes () const
 
const ON_SubDDisplayParameters SubDDisplayParameters () const
 
const unsigned int TextureRange () const
 
const bool TextureRangeIsValid () const
 
const double Tolerance () const
 These controls are used in both stages. More...
 
bool Write (ON_BinaryArchive &) const
 

Static Public Member Functions

static double ClampMeshDensityValue (double normalized_mesh_density)
 
static int Compare (const ON_MeshParameters &a, const ON_MeshParameters &b)
 
static int CompareGeometrySettings (const ON_MeshParameters &a, const ON_MeshParameters &b)
 
static int CompareGeometrySettings (const ON_MeshParameters &a, const ON_MeshParameters &b, const bool bIgnoreSubDParameters)
 
static const ON_MeshParameters CreateFromMeshDensity (double normalized_mesh_density)
 
static double MeshDensityAsPercentage (double normalized_mesh_density)
 
static ON_MeshParameters::MESH_PARAMETER_ID MeshParameterIdFromUnsigned (unsigned int mesh_parameter_id_as_unsigned)
 
static ON_MeshParameters::MESH_STYLE MeshStyleFromUnsigned (unsigned int mesh_style_as_unsigned)
 
static double MinimumEdgeLengthFromTolerance (double max_edge_length, double tolerance)
 
static double ToleranceFromObjectSize (double relative_tolerance, double actual_size)
 

Static Public Attributes

static const ON_MeshParameters DefaultAnalysisMesh
 
static const ON_MeshParameters DefaultMesh
 
static const ON_MeshParameters FastRenderMesh
 
static const ON_UUID PangolinMesherId
 {EB6F6F3F-F975-4546-9D1C-64E9423BEB7F} More...
 
static const ON_MeshParameters QualityRenderMesh
 
static const ON_UUID RhinoLegacyMesherId
 surface meshing perameters More...
 

Detailed Description

Class ON_Mesh

Member Enumeration Documentation

◆ MESH_PARAMETER_ID

enum ON_MeshParameters::MESH_PARAMETER_ID : unsigned int
strong

The MESH_PARAMETER_ID enum values are used to identify mesh creation parameters.

Enumerator
unspecified_mesh_parameter_id 
bComputeCurvature_parameter_id 

BEGIN Legacy parameters.

bSimplePlanes_parameter_id 
bRefine_parameter_id 
bJaggedSeams_parameter_id 
bDoublePrecision_parameter_id 
mesher_parameter_id 
texture_range_parameter_id 
tolerance_parameter_id 
relative_tolerance_parameter_id 
min_tolerance_parameter_id 
min_edge_length_parameter_id 
max_edge_length_parameter_id 
grid_aspect_ratio_parameter_id 
grid_min_count_parameter_id 
grid_max_count_parameter_id 
grid_angle_parameter_id 
grid_amplification_parameter_id 
refine_angle_parameter_id 
face_type_parameter_id 
srf_domain_parameter_id 
bClosedObjectPostProcess_id 
mesher_id 

END Legacy parameters.

UUID parameter identifying what mesher code created the mesh.

crv_tess_min_num_segments_parameter_id 

BEGIN Pangolin parameters

crv_tess_angle_tol_in_degrees_parameter_id 
crv_tess_max_dist_between_points_parameter_id 

Not same as 'max_edge_length_parameter_id' since 'curve_tess_max_dist_between_points' is only for curves, not surfaces.

crv_tess_min_parametric_ratio_parameter_id 
bEvaluatorBasedTessellation_parameter_id 
srf_tess_chord_height_parameter_id 

Not same as 'tolerance_parameter_id' since 'surface_tess_chord_height' is only for surfaces, not curves.

srf_tess_angle_tol_in_degrees_parameter_id 
srf_tess_max_edge_length_parameter_id 
srf_tess_min_edge_length_parameter_id 
srf_tess_min_edge_length_ratio_uv_parameter_id 
srf_tess_max_aspect_ratio_parameter_id 
smoothing_passes_parameter_id 
max_mesh_parameter_id 

END Pangolin parameters.

◆ MESH_STYLE

enum ON_MeshParameters::MESH_STYLE : unsigned char
strong
Enumerator
unset_mesh_style 

All of these enum values must be in the range 0-255 because unsigned chars are use for storage in some locations.

render_mesh_fast 

Use ON_MeshParameters::FastRenderMesh.

render_mesh_quality 

Use ON_MeshParameters::QualityRenderMesh

render_mesh_custom 

3 - 8 reserved for future predefined render mesh styles

Use ON_3dmSettings::m_CustomRenderMeshSettings

render_mesh_per_object 

Use ON_Object::GetMeshParameters().

◆ Type

enum ON_MeshParameters::Type : unsigned char
strong

ON_MeshParameter::Type identifies the type of mesh creation settings.

Enumerator
Unset 

Not set.

Default 

Default mesh creation settings from ON_MeshParameters::DefaultMesh.

FastRender 

Fast render mesh creation settings from ON_MeshParameters::FastRenderMesh.

QualityRender 

Quality render mesh creation settings from ON_MeshParameters::QualityRenderMesh.

DefaultAnalysis 

Default analysis mesh creation settings from ON_MeshParameters::DefaultAnalysisMesh

FromMeshDensity 

Mesh density settings from ON_MeshParameters::CreateFromMeshDensity(normalized_mesh_density). The value of normalized_mesh_density is returned by the MeshDensity() property.

Custom 

Mesh creation settings are set and are not from one of the cases listed above.

Constructor & Destructor Documentation

◆ ON_MeshParameters() [1/3]

ON_MeshParameters::ON_MeshParameters ( )
default

◆ ~ON_MeshParameters()

ON_MeshParameters::~ON_MeshParameters ( )
default

◆ ON_MeshParameters() [2/3]

ON_MeshParameters::ON_MeshParameters ( const ON_MeshParameters )
default

◆ ON_MeshParameters() [3/3]

ON_MeshParameters::ON_MeshParameters ( double  normalized_mesh_density,
double  min_edge_length = ON_UNSET_VALUE 
)

Description: Tool for providing a simple "slider" interface. Parameters: normalized_mesh_density - [in] 0.0 <= normalized_mesh_density <= 1.0 0 quickly creates extremely coarse meshes. 1 slowly creates extremely dense meshes. min_edge_length - [in] > 0.0 custom value ON_UNSET_VALUE: for default (0.0001) Remarks: If you are using a user interface "slider" to set mesh parameters, then you are strongly encouraged to call ON_MeshParameters::CreateFromMeshDensity() instead of using this constructor. ON_MeshParameters::CreateFromMeshDensity() handles out of bounds input in a predictable way and is easier to search for when examining code.

Member Function Documentation

◆ ClampMeshDensityValue()

static double ON_MeshParameters::ClampMeshDensityValue ( double  normalized_mesh_density)
static

Description: This function cleans up normalized_density used in ON_MeshParameters::CreateFromMeshDensity() and ON_SubDDisplayParameters CreateFromMeshDensity(). Parameters: normalized_mesh_density - [in] should be close to being between 0 and 1. Returns: if normalized_density is between 0.0 and 1.0, that value is returned. If normalized_density is a hair smaller than 0.0, then 0.0 is returned. If normalized_density is a hair bigger than 1.0, then 1.0 is returned. Otherwise 0.5 is returned.

◆ ClosedObjectPostProcess()

const bool ON_MeshParameters::ClosedObjectPostProcess ( ) const

If the object being meshed is closed, m_bClosedObjectPostProcess is true, m_bJaggedSeams = false, and the resultig mesh is not closed, then a post meshing process is applied to find and close gaps in the mesh. Typically the resulting mesh is not closed because the input object has a geometric flaw like loops in trimming curves.

◆ Compare()

static int ON_MeshParameters::Compare ( const ON_MeshParameters a,
const ON_MeshParameters b 
)
static

◆ CompareGeometrySettings() [1/2]

static int ON_MeshParameters::CompareGeometrySettings ( const ON_MeshParameters a,
const ON_MeshParameters b 
)
static

Description: Compares all meshing parameters that control mesh geometry. Does not compare m_bCustomSettings, CustomSettingsEnabled(), m_bComputeCurvature, m_bDoublePrecision, MinimumTolerance(), m_texture_range, m_srf_domain0 and m_srf_domain1; and from the SubD meshing parameters in m_subd_mesh_parameters_as_char, does not compare m_context, m_bComputeCurvature, m_terminator, m_progress_reporter, and m_progress_reporter_interval.

◆ CompareGeometrySettings() [2/2]

static int ON_MeshParameters::CompareGeometrySettings ( const ON_MeshParameters a,
const ON_MeshParameters b,
const bool  bIgnoreSubDParameters 
)
static

Description: Compares all meshing parameters that control mesh geometry. Does not compare m_bCustomSettings, CustomSettingsEnabled(), m_bComputeCurvature, m_bDoublePrecision, MinimumTolerance(), m_texture_range, m_srf_domain0 and m_srf_domain1; and from the SubD meshing parameters in m_subd_mesh_parameters_as_char, does not compare m_context, m_bComputeCurvature, m_terminator, m_progress_reporter, and m_progress_reporter_interval. If bIgnoreSubDParameters is true, ignores all settings in m_subd_mesh_parameters_as_char.

◆ ComputeCurvature()

const bool ON_MeshParameters::ComputeCurvature ( ) const

Meshing happens in two stages. The first stage creates a rectangular grid. The second stage refines the grid until the mesh meets all meshing requirements. The third stage combines coincident vertices if the resulting mesh is a composite. false - (default) - ON_Mesh::m_K[] not computed true - ON_Mesh::m_K[] computed bool ComputeCurvature() const;

◆ ContentHash()

ON_SHA1_Hash ON_MeshParameters::ContentHash ( ) const

Returns: A hash of every ON_MeshParameters setting. Remarks: The hash intentionally ignores m_bCustomSettingsEnabled or m_bDoublePrecision.

◆ CreateFromMeshDensity()

static const ON_MeshParameters ON_MeshParameters::CreateFromMeshDensity ( double  normalized_mesh_density)
static

Description: This function creates ON_MeshParameters from a user interface "slider" like Rhino's simple mesh controls. Parameters: normalized_mesh_density - [in] A double between 0.0 and 1.0. 0.0 creates meshes with fewer faces than 1.0.

Invalid input is treated as 0.5. Returns: A valid ON_MeshParameters with the specified subd display denstity.

◆ CustomSettings()

const bool ON_MeshParameters::CustomSettings ( ) const

The CustomSettings() parameter applies when these mesh creation parameters specify how an object's mesh should be created and these parameters should override the the model or application default mesh creation parameters.

When CustomSettings() is true, it indicates these mesh creation parameters are explicitly set for the object and context in question and should override the model or application defaults.

When CustomSettings() is false, it indicates these mesh creation parameters were inherited from from model or application defaults and any mesh created with these parameters should be updated when these parameters differ from the current model or application defaults.

◆ CustomSettingsEnabled()

const bool ON_MeshParameters::CustomSettingsEnabled ( ) const

The CustomSettingsEnabled() value applies to mesh creation parameters that are on ON_3dmObjectAttributes and have CustomSettings() = true. In this situation:

If CustomSettingsEnabled() is true, then the use of these mesh creation parameters is enabled.

If CustomSettingsEnabled() is false, then these mesh creation parameters should be gnored.

◆ DataCRC()

ON__UINT32 ON_MeshParameters::DataCRC ( ON__UINT32  ) const

◆ Description()

const ON_wString ON_MeshParameters::Description ( ) const

Returns: "Fast" if this and ON_MeshParameters::FastRenderMesh have the same geometry settings. "Quality" if this and ON_MeshParameters::QualityRenderMesh have the same geometry settings. "Density(p%)" if this and ON_MeshParameters::CreateFromMeshDensity(p/100.0) have the same geometry settings. "Default" if this and ON_MeshParameters::DefaultMesh have the same geometry settings. "DefaultAnalysis" if this and ON_MeshParameters::DefaultAnalysis have the same geometry settings. Otherwise, "Custom(SHA1)" where SHA1 = this->GeometryHash();

◆ DoublePrecision()

const bool ON_MeshParameters::DoublePrecision ( ) const

false - (default) the mesh vertices will be float precision values in the m_V[] array. true - The mesh vertices will be double precision values in the DoublePrecisionVertices() array. Float precision values will also be returned in the m_V[] array.

◆ Dump()

void ON_MeshParameters::Dump ( ON_TextLog test_log) const

◆ FaceType()

const unsigned int ON_MeshParameters::FaceType ( ) const

These controls are used during stage 3 0 = mixed triangle and quads 1 = all triangles 2 = all quads

◆ GeometrySettingsDensityPercentage()

const int ON_MeshParameters::GeometrySettingsDensityPercentage ( int  no_match_found_result) const

Returns: n in the range 0 to 100, inclusive, when (0 == ON_MeshParameters::CompareGeometrySettings(*this,ON_MeshParameters(n/100.0)) no_match_found_result: otherwise Remarks: This is a legacy function with roots dating back to Rhino 1.0. High quality code should use ON_MeshParameters::MeshDensity() or ON_MeshParameters::MeshDensityAsPercentage(ON_MeshParameters::MeshDensity()).

◆ GeometrySettingsHash() [1/2]

ON_SHA1_Hash ON_MeshParameters::GeometrySettingsHash ( ) const

Returns: A hash of values that control mesh geometry. Remarks: This has intentionally ignored m_bCustomSettings, m_bCustomSettingsEnabled, m_bComputeCurvature, m_bDoublePrecision, m_bClosedObjectPostProcess, m_texture_range. If you need to include those values, call ContentHash().

◆ GeometrySettingsHash() [2/2]

ON_SHA1_Hash ON_MeshParameters::GeometrySettingsHash ( bool  bIgnoreSubDParameters) const

Parameters: bIgnoreSubDParameters - [in] If true, the SubD meshing parameters are not hashed. Returns: A hash of values that control mesh geometry. Remarks: This has intentionally ignored m_bCustomSettings, m_bCustomSettingsEnabled, m_bComputeCurvature, m_bDoublePrecision, m_bClosedObjectPostProcess, m_texture_range. If you need to include those values, call ContentHash().

◆ GeometrySettingsRenderMeshStyle()

const ON_MeshParameters::MESH_STYLE ON_MeshParameters::GeometrySettingsRenderMeshStyle ( const ON_MeshParameters custom_mp,
ON_MeshParameters::MESH_STYLE  no_match_found_result 
) const

Returns: ON_MeshParameters::render_mesh_fast ON_MeshParameters::FastRenderMesh and this have the same geometry settings ON_MeshParameters::render_mesh_quality ON_MeshParameters::QualityRenderMesh and this have the same geometry settings ON_MeshParameters::render_mesh_custom custom_mp is not null and has the same geometry settings no_match_found_result otherwise

◆ GeometrySettingsType() [1/2]

ON_MeshParameters::Type ON_MeshParameters::GeometrySettingsType ( ) const

Returns: The type of geometry settings taking SubD parameters into account. Remarks: This function will never return ON_MeshParameters::Type::Unset. In particular, if the return value is not ON_MeshParameters::Type::Custom, then the settings come from one of the built-in mesh creation settings.

◆ GeometrySettingsType() [2/2]

ON_MeshParameters::Type ON_MeshParameters::GeometrySettingsType ( bool  bIgnoreSubDParameters) const

Returns: The type of geometry settings. Parameters: bIgnoreSubDParameters - [in] If true, SubD meshing parameters are ignored in determining the type. Remarks: This function will never return ON_MeshParameters::Type::Unset. In particular, if the return value is not ON_MeshParameters::Type::Custom, then the settings come from one of the built-in mesh creation settings.

◆ GridAmplification()

const double ON_MeshParameters::GridAmplification ( ) const

The parameters above generate a grid. If you want fewer quads, set m_grid_amplification to a value < 1. If you want more quads, set m_grid_amplification to a value > 1. default = 1 and values <= 0 are treated as 1.

◆ GridAngleDegrees()

const double ON_MeshParameters::GridAngleDegrees ( ) const

maximum angle (degrees) between surface normal evaluated at adjacent vertices. 0.0 is treated as 180.0.

◆ GridAngleRadians()

const double ON_MeshParameters::GridAngleRadians ( ) const

maximum angle (radians) between surface normal evaluated at adjacent vertices. 0.0 is treated as pi.

◆ GridAspectRatio()

const double ON_MeshParameters::GridAspectRatio ( ) const

These controls are used during stage 1 to generate the grid desired aspect ratio of quads in grid 0.0 = any aspect ratio is acceptable values >0 and < sqrt(2) are treated as sqrt(2)

◆ GridMaxCount()

const int ON_MeshParameters::GridMaxCount ( ) const

desired masimum number of quads in initial grid

◆ GridMinCount()

const int ON_MeshParameters::GridMinCount ( ) const

minimum number of quads in initial grid

◆ JaggedSeams()

const bool ON_MeshParameters::JaggedSeams ( ) const

false - (default) edges of meshes of joined b-rep faces match with no gaps or "T" joints. true - faces in b-reps are meshed independently. This is faster but results in gaps and "T" joints along seams between faces.

◆ MaximumEdgeLength()

const double ON_MeshParameters::MaximumEdgeLength ( ) const

edges longer than MaximumEdgeLength() will be split even when they meet all other meshing requirements

◆ MeshDensity() [1/2]

double ON_MeshParameters::MeshDensity ( ) const

Returns: If these mesh parameters, including the SubD meshing parameters, were created from ON_MeshParameters::CreateFromMeshDensity(normalized_mesh_density), then normalized_mesh_density is returned. Otherwise, ON_DBL_QNAN is returned. Remarks: The values of m_bDoublePrecision, m_bClosedObjectPostProcess, and m_texture_range can be arbitrary because they do not determine geometry of the resulting mesh and are typically ignored. You must compare these properties if they matter in your particular context.

◆ MeshDensity() [2/2]

double ON_MeshParameters::MeshDensity ( bool  bIgnoreSubDParameters) const

Parameters: bIgnoreSubDParameters - [in] If true, SubD meshing parameters are ignored. Returns: If these mesh parameters were created from ON_MeshParameters::CreateFromMeshDensity(normalized_mesh_density), then normalized_mesh_density is returned. Otherwise, ON_DBL_QNAN is returned. Remarks: The values of m_bDoublePrecision, m_bClosedObjectPostProcess, and m_texture_range can be arbitrary because they do not determine geometry of the resulting mesh and are typically ignored. You must compare these properties if they matter in your particular context.

◆ MeshDensityAsPercentage()

static double ON_MeshParameters::MeshDensityAsPercentage ( double  normalized_mesh_density)
static

Description: Convert a mesh density value to a percentage with finite precision fuzz removed. Parameters: normalized_mesh_density - [in] valid input is 0.0 <= normalized_mesh_density <= 1.0 Returns: If normalized_density is valid, 100*normalized_density with fuzz cleaned up is returned. Otherwise ON_DBL_QNAN is returned.

◆ Mesher()

const unsigned int ON_MeshParameters::Mesher ( ) const

0 = slow mesher, 1 = fast mesher

◆ MesherId()

ON_UUID ON_MeshParameters::MesherId ( ) const

◆ MeshParameterIdFromUnsigned()

static ON_MeshParameters::MESH_PARAMETER_ID ON_MeshParameters::MeshParameterIdFromUnsigned ( unsigned int  mesh_parameter_id_as_unsigned)
static

◆ MeshStyleFromUnsigned()

static ON_MeshParameters::MESH_STYLE ON_MeshParameters::MeshStyleFromUnsigned ( unsigned int  mesh_style_as_unsigned)
static

◆ MinimumEdgeLength()

const double ON_MeshParameters::MinimumEdgeLength ( ) const

edges shorter than MinimumEdgeLength() will not be split even if the do not meet other meshing requirements

◆ MinimumEdgeLengthFromTolerance()

static double ON_MeshParameters::MinimumEdgeLengthFromTolerance ( double  max_edge_length,
double  tolerance 
)
static

Description: Get a value to use for minimum edge length base on max_edge_length and tolerance settings. Parameters: max_edge_length - [in] 3d maximum edge length used to create mesh. tolerance - [in] 3d distance tolerance used to create mesh. Returns: A value that can be used for m_min_edge_length if no user specified value is available.

◆ MinimumTolerance()

const double ON_MeshParameters::MinimumTolerance ( ) const

◆ operator=()

ON_MeshParameters& ON_MeshParameters::operator= ( const ON_MeshParameters )
default

◆ Read()

bool ON_MeshParameters::Read ( ON_BinaryArchive )

◆ Refine()

const bool ON_MeshParameters::Refine ( ) const

false - skip stage 2 mesh refinement step true - (default) do stage 2 mesh refinement step

◆ RefineAngleDegrees()

const double ON_MeshParameters::RefineAngleDegrees ( ) const

◆ RefineAngleRadians()

const double ON_MeshParameters::RefineAngleRadians ( ) const

These controls are used during stage 2 to refine the grid (in radians) maximum angle in radians between surface normal evaluated at adjacent vertices.

◆ RelativeTolerance()

const double ON_MeshParameters::RelativeTolerance ( ) const

If 0.0 < RelativeTolerance() < 1.0, then the maximum distance from the center of an edge to the surface will be <= T, where T is the larger of (MinimumTolerance(),d*RelativeTolerance()), where d is an estimate of the size of the object being meshed.

◆ SetClosedObjectPostProcess()

void ON_MeshParameters::SetClosedObjectPostProcess ( bool  bClosedObjectPostProcess)

◆ SetComputeCurvature()

void ON_MeshParameters::SetComputeCurvature ( bool  bComputeCurvature)

◆ SetCustomSettings()

void ON_MeshParameters::SetCustomSettings ( bool  bCustomSettings)

◆ SetCustomSettingsEnabled()

void ON_MeshParameters::SetCustomSettingsEnabled ( bool  bCustomSettingsEnabled)

◆ SetDoublePrecision()

void ON_MeshParameters::SetDoublePrecision ( bool  bDoublePrecision)

◆ SetFaceType()

void ON_MeshParameters::SetFaceType ( unsigned int  face_type)

◆ SetGridAmplification()

void ON_MeshParameters::SetGridAmplification ( double  grid_amplification)

◆ SetGridAngleDegrees()

void ON_MeshParameters::SetGridAngleDegrees ( double  grid_angle_degrees)

◆ SetGridAngleRadians()

void ON_MeshParameters::SetGridAngleRadians ( double  grid_angle_radians)

◆ SetGridAspectRatio()

void ON_MeshParameters::SetGridAspectRatio ( double  grid_aspect_ratio)

◆ SetGridMaxCount()

void ON_MeshParameters::SetGridMaxCount ( int  grid_max_count)

◆ SetGridMinCount()

void ON_MeshParameters::SetGridMinCount ( int  grid_min_count)

◆ SetJaggedSeams()

void ON_MeshParameters::SetJaggedSeams ( bool  bJaggedSeams)

◆ SetMaximumEdgeLength()

void ON_MeshParameters::SetMaximumEdgeLength ( double  maximum_edge_length)

◆ SetMesher()

void ON_MeshParameters::SetMesher ( unsigned int  mesher)

◆ SetMesherId()

void ON_MeshParameters::SetMesherId ( ON_UUID  )

◆ SetMinimumEdgeLength()

void ON_MeshParameters::SetMinimumEdgeLength ( double  minimum_edge_length)

◆ SetMinimumTolerance()

void ON_MeshParameters::SetMinimumTolerance ( double  minimum_tolerance)

◆ SetRefine()

void ON_MeshParameters::SetRefine ( bool  bRefine)

◆ SetRefineAngleDegrees()

void ON_MeshParameters::SetRefineAngleDegrees ( double  refine_angle_degrees)

◆ SetRefineAngleRadians()

void ON_MeshParameters::SetRefineAngleRadians ( double  refine_angle_radians)

◆ SetRelativeTolerance()

void ON_MeshParameters::SetRelativeTolerance ( double  relative_tolerance)

◆ SetSimplePlanes()

void ON_MeshParameters::SetSimplePlanes ( bool  bSimplePlanes)

◆ SetSubDDisplayParameters()

void ON_MeshParameters::SetSubDDisplayParameters ( const class ON_SubDDisplayParameters subd_mesh_parameters)

◆ SetTextureRange()

void ON_MeshParameters::SetTextureRange ( unsigned int  texture_range)

◆ SetTextureRangePictureFrameHack()

void ON_MeshParameters::SetTextureRangePictureFrameHack ( )

◆ SetTolerance()

void ON_MeshParameters::SetTolerance ( double  tolerance)

◆ SimplePlanes()

const bool ON_MeshParameters::SimplePlanes ( ) const

false - (default) planar surfaces are meshed using the controls below. true - planar surfaces are meshed using minimal number of triangles and aspect/edge controls are ignored.

◆ SubDDisplayParameters()

const ON_SubDDisplayParameters ON_MeshParameters::SubDDisplayParameters ( ) const

◆ TextureRange()

const unsigned int ON_MeshParameters::TextureRange ( ) const

1: unpacked, unscaled, normalized each face has a normalized texture range [0,1]x[0,1]. The normalized coordinate is calculated using the entire surface domain. For meshes of trimmed surfaces when the active area is a small subset of the entire surface, there will be large regions of unused texture space in [0,1]x[0,1]. When the 3d region being meshed is far from being sqaure-ish, there will be a substantual amount of distortion mapping [0,1]x[0,1] texture space to the 3d mesh.

2: packed, scaled, normalized (default) each face is assigned a texture range that is a subrectangle of [0,1]x[0,1]. The subrectangles are mutually disjoint and packed into into [0,1]x[0,1] in a way that minimizes distortion and maximizes the coverage of [0,1]x[0,1]. When the surface or surfaces being meshed are trimmed, this option takes into account only the region of the base surface the mesh covers and uses as much of [0,1]x[0,1] as possible. unsigned int TextureRange() const;

◆ TextureRangeIsValid()

const bool ON_MeshParameters::TextureRangeIsValid ( ) const

◆ Tolerance()

const double ON_MeshParameters::Tolerance ( ) const

These controls are used in both stages.

approximate maximum distance from center of edge to surface

◆ ToleranceFromObjectSize()

static double ON_MeshParameters::ToleranceFromObjectSize ( double  relative_tolerance,
double  actual_size 
)
static

Description: Get a value to use for tolerance based on the relative_tolerance and actual size. Parameters: relative_tolerance - [in] See m_relative_tolerance field actual_size - [in] Length of object's bounding box diagonal or some similar measure of the object's 3d size. Returns: A value that can be used for m_tolerance if no user specified value is available.

◆ Write()

bool ON_MeshParameters::Write ( ON_BinaryArchive ) const

Member Data Documentation

◆ DefaultAnalysisMesh

const ON_MeshParameters ON_MeshParameters::DefaultAnalysisMesh
static

Description: Mesh creationg parameters to create the default analysis mesh.

◆ DefaultMesh

const ON_MeshParameters ON_MeshParameters::DefaultMesh
static

Description: Mesh creationg parameters to create the default render mesh.

◆ FastRenderMesh

const ON_MeshParameters ON_MeshParameters::FastRenderMesh
static

Description: Mesh creationg parameters to create the a render mesh when meshing speed is preferred over mesh quality.

◆ PangolinMesherId

const ON_UUID ON_MeshParameters::PangolinMesherId
static

{EB6F6F3F-F975-4546-9D1C-64E9423BEB7F}

◆ QualityRenderMesh

const ON_MeshParameters ON_MeshParameters::QualityRenderMesh
static

Description: Mesh creationg parameters to create the a render mesh when mesh quality is preferred over meshing speed.

◆ RhinoLegacyMesherId

const ON_UUID ON_MeshParameters::RhinoLegacyMesherId
static

surface meshing perameters

The Rhino legacy mesher is the mesher used in Rhino 1, 2, 3, 4, 5, 6. {F15F67AA-4AF9-4B25-A3B8-517CEDDAB134}