#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
 
void Dump (ON_TextLog &) const
 
ON_3dmUnitsAndTolerancesoperator= (const ON_3dmUnitsAndTolerances &)=default
 
bool Read (ON_BinaryArchive &)
 
double Scale (ON::LengthUnitSystem) const
 
unsigned int SetInvalidTolerancesToDefaultValues ()
 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. More...
 
bool TolerancesAreValid () const
 
bool Write (ON_BinaryArchive &) const
 

Public Attributes

double m_absolute_tolerance = 0.001
 
double m_angle_tolerance = ON_PI/180.0
 
ON::OBSOLETE_DistanceDisplayMode m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal
 
int m_distance_display_precision = 3
 
double m_relative_tolerance = 0.01
 
ON_UnitSystem m_unit_system = ON_UnitSystem::Millimeters
 

Static Public Attributes

static const ON_3dmUnitsAndTolerances Millimeters
 

Constructor & Destructor Documentation

◆ ON_3dmUnitsAndTolerances() [1/2]

ON_3dmUnitsAndTolerances::ON_3dmUnitsAndTolerances ( )
default

The default constructor set units to millimeters and tolerance = 0.001mm.

◆ ~ON_3dmUnitsAndTolerances()

ON_3dmUnitsAndTolerances::~ON_3dmUnitsAndTolerances ( )
default

◆ ON_3dmUnitsAndTolerances() [2/2]

ON_3dmUnitsAndTolerances::ON_3dmUnitsAndTolerances ( const ON_3dmUnitsAndTolerances )
default

Member Function Documentation

◆ Dump()

void ON_3dmUnitsAndTolerances::Dump ( ON_TextLog ) const

◆ operator=()

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

◆ Read()

bool ON_3dmUnitsAndTolerances::Read ( ON_BinaryArchive )

◆ Scale()

double ON_3dmUnitsAndTolerances::Scale ( ON::LengthUnitSystem  ) const

◆ SetInvalidTolerancesToDefaultValues()

unsigned int ON_3dmUnitsAndTolerances::SetInvalidTolerancesToDefaultValues ( )

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

◆ TolerancesAreValid()

bool ON_3dmUnitsAndTolerances::TolerancesAreValid ( ) const
Returns
True if tolerances (m_absolute_tolerance, m_angle_tolerance, m_relative_tolerance) are set to valid values.

◆ Write()

bool ON_3dmUnitsAndTolerances::Write ( ON_BinaryArchive ) const

Member Data Documentation

◆ m_absolute_tolerance

double ON_3dmUnitsAndTolerances::m_absolute_tolerance = 0.001

◆ m_angle_tolerance

double ON_3dmUnitsAndTolerances::m_angle_tolerance = ON_PI/180.0

◆ m_distance_display_mode

ON::OBSOLETE_DistanceDisplayMode ON_3dmUnitsAndTolerances::m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal

◆ m_distance_display_precision

int ON_3dmUnitsAndTolerances::m_distance_display_precision = 3

◆ m_relative_tolerance

double ON_3dmUnitsAndTolerances::m_relative_tolerance = 0.01

◆ m_unit_system

ON_UnitSystem ON_3dmUnitsAndTolerances::m_unit_system = ON_UnitSystem::Millimeters

◆ Millimeters

const ON_3dmUnitsAndTolerances ON_3dmUnitsAndTolerances::Millimeters
static