Rhino C++ API
8.10
|
#include <opennurbs_3dm_settings.h>
Public Member Functions | |
ON_3dmUnitsAndTolerances ()=default | |
The default constructor set units to millimeters and tolerance = 0.001mm. More... | |
ON_3dmUnitsAndTolerances (const ON_3dmUnitsAndTolerances &)=default | |
~ON_3dmUnitsAndTolerances ()=default | |
double | AbsoluteTolerance () const |
Gets and sets the absolute tolerance in units, > 0.0. More... | |
double | AngleTolerance () const |
Gets and sets the angle tolerance in radians, > 0.0 and <= ON_PI. More... | |
ON::OBSOLETE_DistanceDisplayMode | DistanceDisplayMode () const |
Gets and sets the distance display mode. More... | |
int | DistanceDisplayPrecision () const |
Gets and sets the distance display precision, >= 0 and <= 7. More... | |
void | Dump (ON_TextLog &) const |
bool | IsValid () const |
bool | operator!= (const ON_3dmUnitsAndTolerances &other) const |
ON_3dmUnitsAndTolerances & | operator= (const ON_3dmUnitsAndTolerances &)=default |
bool | operator== (const ON_3dmUnitsAndTolerances &other) const |
bool | Read (ON_BinaryArchive &) |
double | RelativeTolerance () const |
Gets and sets the relative tolerance, fraction > 0.0 and < 1.0. More... | |
double | Scale (ON::LengthUnitSystem) const |
void | SetAbsoluteTolerance (double absolute_tolerance) |
void | SetAngleTolerance (double angle_tolerance) |
void | SetDistanceDisplayMode (ON::OBSOLETE_DistanceDisplayMode distance_display_mode) |
void | SetDistanceDisplayPrecision (int distance_display_precision) |
unsigned int | SetInvalidTolerancesToDefaultValues () |
void | SetRelativeTolerance (double relative_tolerance) |
bool | TolerancesAreValid () const |
Returns true if absolute, angle, and relative tolerances values are valid. More... | |
bool | Write (ON_BinaryArchive &) const |
Public Attributes | |
double | m_absolute_tolerance = 0.001 |
in units > 0.0 More... | |
double | m_angle_tolerance = ON_PI/180.0 |
in radians > 0.0 and <= ON_PI More... | |
ON::OBSOLETE_DistanceDisplayMode | m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal |
decimal or fractional More... | |
int | m_distance_display_precision = 3 |
double | m_relative_tolerance = 0.01 |
fraction > 0.0 and < 1.0 More... | |
ON_UnitSystem | m_unit_system = ON_UnitSystem::Millimeters |
Expert access to member variables. More... | |
Static Public Attributes | |
static const ON_3dmUnitsAndTolerances | Millimeters |
Copyright (c) 1993-2022 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. units and tolerances
|
default |
The default constructor set units to millimeters and tolerance = 0.001mm.
|
default |
|
default |
double ON_3dmUnitsAndTolerances::AbsoluteTolerance | ( | ) | const |
Gets and sets the absolute tolerance in units, > 0.0.
double ON_3dmUnitsAndTolerances::AngleTolerance | ( | ) | const |
Gets and sets the angle tolerance in radians, > 0.0 and <= ON_PI.
ON::OBSOLETE_DistanceDisplayMode ON_3dmUnitsAndTolerances::DistanceDisplayMode | ( | ) | const |
Gets and sets the distance display mode.
int ON_3dmUnitsAndTolerances::DistanceDisplayPrecision | ( | ) | const |
Gets and sets the distance display precision, >= 0 and <= 7.
void ON_3dmUnitsAndTolerances::Dump | ( | ON_TextLog & | ) | const |
bool ON_3dmUnitsAndTolerances::IsValid | ( | ) | const |
bool ON_3dmUnitsAndTolerances::operator!= | ( | const ON_3dmUnitsAndTolerances & | other | ) | const |
|
default |
bool ON_3dmUnitsAndTolerances::operator== | ( | const ON_3dmUnitsAndTolerances & | other | ) | const |
bool ON_3dmUnitsAndTolerances::Read | ( | ON_BinaryArchive & | ) |
double ON_3dmUnitsAndTolerances::RelativeTolerance | ( | ) | const |
Gets and sets the relative tolerance, fraction > 0.0 and < 1.0.
double ON_3dmUnitsAndTolerances::Scale | ( | ON::LengthUnitSystem | ) | const |
Returns scale factor that needs to be applied to change from the argument's unit system to m_unit_system.
When m_unit_system is not ON::LengthUnitSystem::CustomUnits, Scale(us) = ON::UnitScale(us,m_unit_system). When Scale(us) When m_unit_system is ON::LengthUnitSystem::CustomUnits, Scale(us) = ON::UnitScale(us,ON::LengthUnitSystem::Meters)*m_custom_unit_scale.
void ON_3dmUnitsAndTolerances::SetAbsoluteTolerance | ( | double | absolute_tolerance | ) |
void ON_3dmUnitsAndTolerances::SetAngleTolerance | ( | double | angle_tolerance | ) |
void ON_3dmUnitsAndTolerances::SetDistanceDisplayMode | ( | ON::OBSOLETE_DistanceDisplayMode | distance_display_mode | ) |
void ON_3dmUnitsAndTolerances::SetDistanceDisplayPrecision | ( | int | distance_display_precision | ) |
unsigned int ON_3dmUnitsAndTolerances::SetInvalidTolerancesToDefaultValues | ( | ) |
Description: If m_absolute_tolerance is not set to a valid value, it is set to ON_3dmUnitsAndTolerances::DefaultValue.m_absolute_tolerance. If m_angle_tolerance is not set to a valid value, it is set to ON_3dmUnitsAndTolerances::DefaultValue.m_angle_tolerance. If m_relative_tolerance is not set to a valid value, it is set to ON_3dmUnitsAndTolerances::DefaultValue.m_relative_tolerance. Returns: 0: all tolerances were valid 0 != (rc & 1): m_absolute_tolerance was invalid and set to the default value 0 != (rc & 2): m_angle_tolerance was invalid and set to the default value 0 != (rc & 4): m_relative_tolerance was invalid and set to the default value
void ON_3dmUnitsAndTolerances::SetRelativeTolerance | ( | double | relative_tolerance | ) |
bool ON_3dmUnitsAndTolerances::TolerancesAreValid | ( | ) | const |
Returns true if absolute, angle, and relative tolerances values are valid.
bool ON_3dmUnitsAndTolerances::Write | ( | ON_BinaryArchive & | ) | const |
double ON_3dmUnitsAndTolerances::m_absolute_tolerance = 0.001 |
in units > 0.0
double ON_3dmUnitsAndTolerances::m_angle_tolerance = ON_PI/180.0 |
in radians > 0.0 and <= ON_PI
ON::OBSOLETE_DistanceDisplayMode ON_3dmUnitsAndTolerances::m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal |
decimal or fractional
int ON_3dmUnitsAndTolerances::m_distance_display_precision = 3 |
decimal mode: number of decimal places fractional modes: denominator = (1/2)^m_distance_display_precision
double ON_3dmUnitsAndTolerances::m_relative_tolerance = 0.01 |
fraction > 0.0 and < 1.0
ON_UnitSystem ON_3dmUnitsAndTolerances::m_unit_system = ON_UnitSystem::Millimeters |
Expert access to member variables.
|
static |
DefaultValue m_unit_system ON::LengthUnitSystem::Millimeters m_absolute_tolerance 0.001 m_angle_tolerance pi/180 = 1 degree m_relative_tolerance 0.01 = 1% m_distance_display_mode ON::OBSOLETE_DistanceDisplayMode::Decimal m_distance_display_precision 3