|
openNURBS SDK Help
6.0
|
#include <opennurbs_mesh.h>
Public Member Functions | |
| ON_MeshParameters ()=default | |
| ON_MeshParameters (const ON_MeshParameters &)=default | |
| ON_MeshParameters (double 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 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 |
| const ON_MeshParameters::MESH_STYLE | GeometrySettingsRenderMeshStyle (const ON_MeshParameters *custom_mp, ON_MeshParameters::MESH_STYLE no_match_found_result) 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 |
| 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_MeshParameters & | operator= (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 | SetTextureRange (unsigned int texture_range) |
| void | SetTextureRangePictureFrameHack () |
| void | SetTolerance (double tolerance) |
| const bool | SimplePlanes () const |
| unsigned int | SubDDisplayMeshDensity () 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 int | Compare (const ON_MeshParameters &a, const ON_MeshParameters &b) |
| static int | CompareGeometrySettings (const ON_MeshParameters &a, const ON_MeshParameters &b) |
| 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... | |
/ / Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved. / OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert / McNeel & Associates. / / THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. / ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF / MERCHANTABILITY ARE HEREBY DISCLAIMED. / / For complete openNURBS copyright information see http://www.opennurbs.org. / //////////////////////////////////////////////////////////////
Class ON_Mesh
|
strong |
The MESH_PARAMETER_ID enum values are used to identify mesh creation parameters.
|
strong |
|
default |
|
default |
|
default |
| ON_MeshParameters::ON_MeshParameters | ( | double | density, |
| double | min_edge_length = ON_UNSET_VALUE |
||
| ) |
Description: Tool for provding a simple slider interface. Parameters: density - [in] 0.0 <= density <= 1.0 0 quickly creates coarse meshes. 1 slowly creates dense meshes. min_edge_length - [in] > 0.0 custom value ON_UNSET_VALUE: for default (0.0001)
| 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.
|
static |
|
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.
| 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;
| ON_SHA1_Hash ON_MeshParameters::ContentHash | ( | ) | const |
| 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 explictily 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.
| 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.
| ON__UINT32 ON_MeshParameters::DataCRC | ( | ON__UINT32 | ) | const |
| 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.
| void ON_MeshParameters::Dump | ( | ON_TextLog & | test_log | ) | const |
C++ default works fine ///< ON_MeshParameters(const ON_MeshParameters& ); C++ default works fine ///< ON_MeshParameters& operator=(const ON_MeshParameters&);
| const unsigned int ON_MeshParameters::FaceType | ( | ) | const |
These controls are used during stage 30 = mixed triangle and quads 1 = all triangles 2 = all quads
| 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
| ON_SHA1_Hash ON_MeshParameters::GeometrySettingsHash | ( | ) | const |
| 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
| 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.
| const double ON_MeshParameters::GridAngleDegrees | ( | ) | const |
maximum angle (degrees) between surface normal evaluated at adjacent vertices. 0.0 is treated as 180.0.
| const double ON_MeshParameters::GridAngleRadians | ( | ) | const |
maximum angle (radians) between surface normal evaluated at adjacent vertices. 0.0 is treated as pi.
| const double ON_MeshParameters::GridAspectRatio | ( | ) | const |
These controls are used during stage 1 to generate the griddesired aspect ratio of quads in grid 0.0 = any aspect ratio is acceptable values >0 and < sqrt(2) are treated as sqrt(2)
| const int ON_MeshParameters::GridMaxCount | ( | ) | const |
desired masimum number of quads in initial grid
| const int ON_MeshParameters::GridMinCount | ( | ) | const |
minimum number of quads in initial grid
| 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.
| const double ON_MeshParameters::MaximumEdgeLength | ( | ) | const |
edges longer than MaximumEdgeLength() will be split even when they meet all other meshing requirements
| const unsigned int ON_MeshParameters::Mesher | ( | ) | const |
0 = slow mesher, 1 = fast mesher
| ON_UUID ON_MeshParameters::MesherId | ( | ) | const |
|
static |
|
static |
| const double ON_MeshParameters::MinimumEdgeLength | ( | ) | const |
edges shorter than MinimumEdgeLength() will not be split even if the do not meet other meshing requirements
|
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.
| const double ON_MeshParameters::MinimumTolerance | ( | ) | const |
|
default |
| bool ON_MeshParameters::Read | ( | ON_BinaryArchive & | ) |
| const bool ON_MeshParameters::Refine | ( | ) | const |
false - skip stage 2 mesh refinement step true - (default) do stage 2 mesh refinement step
| const double ON_MeshParameters::RefineAngleDegrees | ( | ) | const |
| 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.
| 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 esimate of the size of the object being meshed.
| void ON_MeshParameters::SetClosedObjectPostProcess | ( | bool | bClosedObjectPostProcess | ) |
| void ON_MeshParameters::SetComputeCurvature | ( | bool | bComputeCurvature | ) |
| void ON_MeshParameters::SetCustomSettings | ( | bool | bCustomSettings | ) |
| void ON_MeshParameters::SetCustomSettingsEnabled | ( | bool | bCustomSettingsEnabled | ) |
| void ON_MeshParameters::SetDoublePrecision | ( | bool | bDoublePrecision | ) |
| void ON_MeshParameters::SetFaceType | ( | unsigned int | face_type | ) |
| void ON_MeshParameters::SetGridAmplification | ( | double | grid_amplification | ) |
| void ON_MeshParameters::SetGridAngleDegrees | ( | double | grid_angle_degrees | ) |
| void ON_MeshParameters::SetGridAngleRadians | ( | double | grid_angle_radians | ) |
| void ON_MeshParameters::SetGridAspectRatio | ( | double | grid_aspect_ratio | ) |
| void ON_MeshParameters::SetGridMaxCount | ( | int | grid_max_count | ) |
| void ON_MeshParameters::SetGridMinCount | ( | int | grid_min_count | ) |
| void ON_MeshParameters::SetJaggedSeams | ( | bool | bJaggedSeams | ) |
| void ON_MeshParameters::SetMaximumEdgeLength | ( | double | maximum_edge_length | ) |
| void ON_MeshParameters::SetMesher | ( | unsigned int | mesher | ) |
| void ON_MeshParameters::SetMesherId | ( | ON_UUID | ) |
| void ON_MeshParameters::SetMinimumEdgeLength | ( | double | minimum_edge_length | ) |
| void ON_MeshParameters::SetMinimumTolerance | ( | double | minimum_tolerance | ) |
| void ON_MeshParameters::SetRefine | ( | bool | bRefine | ) |
| void ON_MeshParameters::SetRefineAngleDegrees | ( | double | refine_angle_degrees | ) |
| void ON_MeshParameters::SetRefineAngleRadians | ( | double | refine_angle_radians | ) |
| void ON_MeshParameters::SetRelativeTolerance | ( | double | relative_tolerance | ) |
| void ON_MeshParameters::SetSimplePlanes | ( | bool | bSimplePlanes | ) |
| void ON_MeshParameters::SetTextureRange | ( | unsigned int | texture_range | ) |
| void ON_MeshParameters::SetTextureRangePictureFrameHack | ( | ) |
| void ON_MeshParameters::SetTolerance | ( | double | tolerance | ) |
| 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.
| unsigned int ON_MeshParameters::SubDDisplayMeshDensity | ( | ) | const |
Returns: SubD display mesh density. Example: Use ON_MeshParameters to control the density of a SubD limit mesh. ON_MeshParameters mp = ...; ON_Mesh* mesh = subd->GetLimitSurfaceMesh( ON_SubDDisplayParameters::CreateFromDisplayDensity( mp.SubDDisplayMeshDensity() ), nullptr );
| 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 unsued 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;
| const bool ON_MeshParameters::TextureRangeIsValid | ( | ) | const |
| const double ON_MeshParameters::Tolerance | ( | ) | const |
These controls are used in both stages.
approximate maximum distance from center of edge to surface
|
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.
| bool ON_MeshParameters::Write | ( | ON_BinaryArchive & | ) | const |
|
static |
Description: Mesh creationg parameters to create the default analysis mesh.
|
static |
Description: Mesh creationg parameters to create the default render mesh.
|
static |
Description: Mesh creationg parameters to create the a render mesh when meshing speed is prefered over mesh quality.
|
static |
{EB6F6F3F-F975-4546-9D1C-64E9423BEB7F}
|
static |
Description: Mesh creationg parameters to create the a render mesh when mesh quality is prefered over meshing speed.
|
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}
1.8.13