ON_DimStyleContext Class Reference

A general and portable interface to access a model's available dimension styles. More...

#include <opennurbs_dimensionstyle.h>

Public Member Functions

 ON_DimStyleContext ()=default
 
 ON_DimStyleContext (const ON_DimStyleContext &)=default
 
virtual ~ON_DimStyleContext ()
 
virtual bool AddDimStyle (const ON_DimStyle &dim_style, bool bResolveNameAndIdConflicts)
 
virtual const ON_DimStyleCurrentDimStyle () const
 
virtual const ON_DimStyleDimStyleFromContentHash (const ON_SHA1_Hash &content_hash, const ON_DimStyle *not_found_result=nullptr) const
 
virtual const ON_DimStyleDimStyleFromFont (const ON_Font &font, double model_space_text_scale, double text_height, ON::LengthUnitSystem text_height_unit_system, bool bReturnClosestMatch=true, const ON_DimStyle *not_found_result=nullptr) const
 
virtual const ON_DimStyleDimStyleFromId (ON_UUID id, const ON_DimStyle *not_found_result=nullptr) const
 
virtual const ON_DimStyleDimStyleFromName (const ON_NameHash &name_hash, const ON_DimStyle *not_found_result=nullptr) const
 
virtual const ON_DimStyleFirstDimStyle (bool bIncludeSystemDimStyles=false, bool bIncludeDeletedDimStyles=false) const
 
virtual ON__UINT64 ModelSerialNumber () const
 
virtual ON::LengthUnitSystem ModelUnitSystem () const
 
virtual bool ModifyDimStyle (ON_UUID model_dim_style_id, const ON_DimStyle &dim_style)
 
virtual const ON_DimStyleNextDimStyle (ON_UUID id, bool bIncludeSystemDimStyles=false, bool bIncludeDeletedDimStyles=false) const
 
ON_DimStyleContextoperator= (const ON_DimStyleContext &)=default
 
virtual const ON_DimStylePrevDimStyle (ON_UUID id, bool bIncludeSystemDimStyles=false, bool bIncludeDeletedDimStyles=false) const
 

Protected Attributes

ON__UINT64 m_model_serial_number = 0
 
ON::LengthUnitSystem m_unit_system = ON::LengthUnitSystem::Millimeters
 

Detailed Description

A general and portable interface to access a model's available dimension styles.

The Rhino C++ SDK function CRhinoDoc.DimStyleContext() will return an ON_DimStyleContext for the Rhino model. The ONX_Model function ONX_Model.DimStyleContext() will return an ON_DimStyleContext for ONX_Model model.

Constructor & Destructor Documentation

◆ ON_DimStyleContext() [1/2]

ON_DimStyleContext::ON_DimStyleContext ( )
default

◆ ~ON_DimStyleContext()

virtual ON_DimStyleContext::~ON_DimStyleContext ( )
virtual

◆ ON_DimStyleContext() [2/2]

ON_DimStyleContext::ON_DimStyleContext ( const ON_DimStyleContext )
default

Member Function Documentation

◆ AddDimStyle()

virtual bool ON_DimStyleContext::AddDimStyle ( const ON_DimStyle dim_style,
bool  bResolveNameAndIdConflicts 
)
virtual

◆ CurrentDimStyle()

virtual const ON_DimStyle& ON_DimStyleContext::CurrentDimStyle ( ) const
virtual

◆ DimStyleFromContentHash()

virtual const ON_DimStyle* ON_DimStyleContext::DimStyleFromContentHash ( const ON_SHA1_Hash content_hash,
const ON_DimStyle not_found_result = nullptr 
) const
virtual

◆ DimStyleFromFont()

virtual const ON_DimStyle* ON_DimStyleContext::DimStyleFromFont ( const ON_Font font,
double  model_space_text_scale,
double  text_height,
ON::LengthUnitSystem  text_height_unit_system,
bool  bReturnClosestMatch = true,
const ON_DimStyle not_found_result = nullptr 
) const
virtual

◆ DimStyleFromId()

virtual const ON_DimStyle* ON_DimStyleContext::DimStyleFromId ( ON_UUID  id,
const ON_DimStyle not_found_result = nullptr 
) const
virtual

◆ DimStyleFromName()

virtual const ON_DimStyle* ON_DimStyleContext::DimStyleFromName ( const ON_NameHash name_hash,
const ON_DimStyle not_found_result = nullptr 
) const
virtual

◆ FirstDimStyle()

virtual const ON_DimStyle* ON_DimStyleContext::FirstDimStyle ( bool  bIncludeSystemDimStyles = false,
bool  bIncludeDeletedDimStyles = false 
) const
virtual

◆ ModelSerialNumber()

virtual ON__UINT64 ON_DimStyleContext::ModelSerialNumber ( ) const
virtual

◆ ModelUnitSystem()

virtual ON::LengthUnitSystem ON_DimStyleContext::ModelUnitSystem ( ) const
virtual

◆ ModifyDimStyle()

virtual bool ON_DimStyleContext::ModifyDimStyle ( ON_UUID  model_dim_style_id,
const ON_DimStyle dim_style 
)
virtual

◆ NextDimStyle()

virtual const ON_DimStyle* ON_DimStyleContext::NextDimStyle ( ON_UUID  id,
bool  bIncludeSystemDimStyles = false,
bool  bIncludeDeletedDimStyles = false 
) const
virtual

◆ operator=()

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

◆ PrevDimStyle()

virtual const ON_DimStyle* ON_DimStyleContext::PrevDimStyle ( ON_UUID  id,
bool  bIncludeSystemDimStyles = false,
bool  bIncludeDeletedDimStyles = false 
) const
virtual

Member Data Documentation

◆ m_model_serial_number

ON__UINT64 ON_DimStyleContext::m_model_serial_number = 0
mutableprotected

◆ m_unit_system

ON::LengthUnitSystem ON_DimStyleContext::m_unit_system = ON::LengthUnitSystem::Millimeters
mutableprotected