#include <opennurbs_dimensionstyle.h>

Inheritance diagram for ON_DimStyle:
ON_ModelComponent ON_Object

Classes

class  DimstyleField
 

Public Types

enum  : unsigned int { FieldCount = (unsigned int)field::Count }
 
enum  angle_format : unsigned char { angle_format::DecimalDegrees = 0, angle_format::DegMinSec = 1, angle_format::Radians = 2, angle_format::Grads = 3 }
 Display format for angles More...
 
enum  centermark_style : unsigned char { centermark_style::None = 0, centermark_style::Mark = 1, centermark_style::MarkAndLines = 2 }
 Style for drawing centermark for Radial dimensions and Centermark objects More...
 
enum  ContentAngleStyle : unsigned char { ContentAngleStyle::Horizontal = 0, ContentAngleStyle::Aligned = 1, ContentAngleStyle::Rotated = 2 }
 Angle for text or other leader or dimension content More...
 
enum  field : unsigned int {
  field::Unset = 0, field::Name = 1, field::Index = 2, field::ExtensionLineExtension = 3,
  field::ExtensionLineOffset = 4, field::Arrowsize = 5, field::LeaderArrowsize = 6, field::Centermark = 7,
  field::TextGap = 8, field::TextHeight = 9, field::DimTextLocation = 10, field::LengthResolution = 12,
  field::AngleFormat = 13, field::AngleResolution = 14, field::Font = 15, field::LengthFactor = 16,
  field::Alternate = 17, field::AlternateLengthFactor = 18, field::AlternateLengthResolution = 20, field::Prefix = 21,
  field::Suffix = 22, field::AlternatePrefix = 23, field::AlternateSuffix = 24, field::DimensionLineExtension = 25,
  field::SuppressExtension1 = 26, field::SuppressExtension2 = 27, field::ExtLineColorSource = 28, field::DimLineColorSource = 29,
  field::ArrowColorSource = 30, field::TextColorSource = 31, field::ExtLineColor = 32, field::DimLineColor = 33,
  field::ArrowColor = 34, field::TextColor = 35, field::ExtLinePlotColorSource = 36, field::DimLinePlotColorSource = 37,
  field::ArrowPlotColorSource = 38, field::TextPlotColorSource = 39, field::ExtLinePlotColor = 40, field::DimLinePlotColor = 41,
  field::ArrowPlotColor = 42, field::TextPlotColor = 43, field::ExtLinePlotWeightSource = 44, field::DimLinePlotWeightSource = 45,
  field::ExtLinePlotWeight_mm = 46, field::DimLinePlotWeight_mm = 47, field::ToleranceFormat = 48, field::ToleranceResolution = 49,
  field::ToleranceUpperValue = 50, field::ToleranceLowerValue = 51, field::AltToleranceResolution = 52, field::ToleranceHeightScale = 53,
  field::BaselineSpacing = 54, field::DrawMask = 55, field::MaskColorSource = 56, field::MaskColor = 57,
  field::MaskBorder = 58, field::DimensionScale = 59, field::DimscaleSource = 60, field::FixedExtensionLength = 61,
  field::FixedExtensionOn = 62, field::TextRotation = 63, field::SuppressArrow1 = 64, field::SuppressArrow2 = 65,
  field::TextmoveLeader = 66, field::ArclengthSymbol = 67, field::StackTextheightScale = 68, field::StackFormat = 69,
  field::AltRound = 70, field::Round = 71, field::AngularRound = 72, field::AltZeroSuppress = 73,
  field::AngleZeroSuppress = 75, field::ZeroSuppress = 76, field::AltBelow = 77, field::ArrowType1 = 78,
  field::ArrowType2 = 79, field::LeaderArrowType = 80, field::ArrowBlockId1 = 81, field::ArrowBlockId2 = 82,
  field::LeaderArrowBlock = 83, field::DimRadialTextLocation = 84, field::TextVerticalAlignment = 85, field::LeaderTextVerticalAlignment = 86,
  field::LeaderContentAngleStyle = 87, field::LeaderCurveType = 88, field::LeaderContentAngle = 89, field::LeaderHasLanding = 90,
  field::LeaderLandingLength = 91, field::MaskFlags = 92, field::CentermarkStyle = 93, field::TextHorizontalAlignment = 94,
  field::LeaderTextHorizontalAlignment = 95, field::DrawForward = 96, field::SignedOrdinate = 97, field::UnitSystem = 98,
  field::TextMask = 99, field::TextOrientation = 100, field::LeaderTextOrientation = 101, field::DimTextOrientation = 102,
  field::DimRadialTextOrientation = 103, field::DimTextAngleStyle = 104, field::DimRadialTextAngleStyle = 105, field::TextUnderlined = 106,
  field::DimensionLengthDisplay = 109, field::AlternateDimensionLengthDisplay = 110, field::Count = 111
}
 Field identifiers used for file i/o and getting/setting values More...
 
enum  leader_curve_type : unsigned char { leader_curve_type::None = 0, leader_curve_type::Polyline = 1, leader_curve_type::Spline = 2 }
 Type of leader curve More...
 
enum  LengthDisplay : unsigned int {
  LengthDisplay::ModelUnits = 0, LengthDisplay::Millmeters = 3, LengthDisplay::Centimeters = 4, LengthDisplay::Meters = 5,
  LengthDisplay::Kilometers = 6, LengthDisplay::InchesDecimal = 7, LengthDisplay::InchesFractional = 1, LengthDisplay::FeetDecimal = 8,
  LengthDisplay::FeetAndInches = 2, LengthDisplay::Miles = 9
}
 Interface. More...
 
enum  OBSOLETE_length_format : unsigned char { OBSOLETE_length_format::Decimal = 0, OBSOLETE_length_format::Fractional = 1, OBSOLETE_length_format::FeetInches = 2, OBSOLETE_length_format::FeetDecimalInches = 3 }
 Obsolete format for length display - use ON_DimStyle::DimensionLengthDisplay instead More...
 
enum  stack_format : unsigned char { stack_format::None = 0, stack_format::StackHorizontal = 1, stack_format::StackDiagonal = 2 }
 Format of stacked fractions More...
 
enum  suppress_zero : unsigned char {
  suppress_zero::None = 0, suppress_zero::SuppressLeading = 1, suppress_zero::SuppressTrailing = 2, suppress_zero::SuppressLeadingAndTrailing = 3,
  suppress_zero::SuppressZeroFeet = 4, suppress_zero::SuppressZeroInches = 8, suppress_zero::SuppressZeroFeetAndZeroInches = 12
}
 Marks leading and trailing zeros for removal. More...
 
enum  TextLocation : unsigned char { TextLocation::AboveDimLine = 0, TextLocation::InDimLine = 1, TextLocation::BelowDimLine = 2 }
 The location of text in linear, angular, radial, and ordinate dimensions. More...
 
enum  tolerance_format : unsigned char { tolerance_format::None = 0, tolerance_format::Symmetrical = 1, tolerance_format::Deviation = 2, tolerance_format::Limits = 3 }
 Style of tolerance display for dimensions More...
 
- Public Types inherited from ON_ModelComponent
enum  Attributes : unsigned int {
  NoAttributes = 0U, ComponentSerialNumberAttribute = 0x0001U, TypeAttribute = 0x0002U, ModelSerialNumberAttribute = 0x0004U,
  IdAttribute = 0x0008U, IndexAttribute = 0x0010U, NameAttribute = 0x0020U, ParentIdAttribute = 0x0040U,
  DeletedNameAttribute = 0x0080U, ComponentStatusAttribute = 0x0100U, BinaryArchiveAttributes = 0x78U, AllAttributes = 0x1FFU,
  SystemComponentAttribute = 0x8000U
}
 
enum  Type : unsigned char {
  Type::Unset = 0, Type::Image = 1, Type::TextureMapping = 2, Type::RenderMaterial = 3,
  Type::LinePattern = 4, Type::Layer = 5, Type::Group = 6, Type::TextStyle = 7,
  Type::DimStyle = 8, Type::RenderLight = 9, Type::HatchPattern = 10, Type::InstanceDefinition = 11,
  Type::ModelGeometry = 12, Type::HistoryRecord = 13, Type::Mixed = 0xFE
}
 The ON_ModelComponent::Type enum has a value for each explicit component type and two special values, Unset and Mixed. Use an ON_ModelComponentTypeIterator instance to iterate over the ON_ModelComponent::Type values. More...
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 When a userdata item is copied or moved from a source object to a destination object, the ON_Object::UserDataConflictResolution enum values specify how conficts are resolved. Remark: A userdata item "conflict" occurs when both the destination and source object have a user data item with the same value of ON_UserData::m_userdata_uuid. More...
 

Public Member Functions

 ON_DimStyle ()
 Default constructor result is identical to ON_DimStyle::Unset;. More...
 
 ON_DimStyle (const ON_DimStyle &src)=default
 
 ON_DimStyle (ON::LengthUnitSystem model_length_unit_system, const class ON_V5x_DimStyle &src)
 Used when reading V5 and earlier archives. More...
 
 ON_DimStyle (const ON_3dmAnnotationSettings &src)
 
 ~ON_DimStyle ()=default
 
bool Alternate () const
 Additional measurement display toggle. More...
 
bool AlternateBelow () const
 
ON_DimStyle::LengthDisplay AlternateDimensionLengthDisplay () const
 Set dimension length units and format More...
 
ON::LengthUnitSystem AlternateDimensionLengthDisplayUnit (unsigned int model_sn) const
 Parameters: model_sn - 0, a model serial number, or ON_UNSET_UINT_INDEX to use the dimstyle's ModelSerialNumber() value. Returns Unit system for dimension length display. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn > 0, then the value of ON::LengthUnitSystemFromModelSerialNumber(model_sn) is returned. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn == 0, then ON::LengthUnitSystem::None is returned. More...
 
double AlternateLengthFactor () const
 AlternateLengthFactor is a rarely used. See Length factor for a discription of this property. More...
 
int AlternateLengthResolution () const
 Display resolution for alternate length measurements. More...
 
const ON_wStringAlternatePrefix () const
 Dimension alternate prefix text. More...
 
double AlternateRoundOff () const
 
const ON_wStringAlternateSuffix () const
 Dimension alternate suffix text. More...
 
int AlternateToleranceResolution () const
 
ON_DimStyle::suppress_zero AlternateZeroSuppress () const
 
angle_format AngleFormat () const
 
int AngleResolution () const
 Display resolution for angle measurements. More...
 
double AngleRoundOff () const
 
ON_DimStyle::suppress_zero AngleZeroSuppress () const
 
int ArcLengthSymbol () const
 
ON_UUID ArrowBlockId1 () const
 
ON_UUID ArrowBlockId2 () const
 
ON_Color ArrowColor () const
 
ON::object_color_source ArrowColorSource () const
 
ON_Color ArrowPlotColor () const
 
ON::plot_color_source ArrowPlotColorSource () const
 
double ArrowSize () const
 Arrow size. More...
 
ON_Arrowhead::arrow_type ArrowType1 () const
 
ON_Arrowhead::arrow_type ArrowType2 () const
 
double BaselineSpacing () const
 
double CenterMark () const
 Centermark size. More...
 
ON_DimStyle::centermark_style CenterMarkStyle () const
 Centermark style. More...
 
void ClearAllFieldOverrides ()
 All dimension style settings identified the ON_DimStyle::field enum, except Name and Id, are inherited from the parent dimension style. More...
 
bool CompareDimstyle (const ON_DimStyle &src) const
 
bool CompareFields (const ON_DimStyle &src) const
 
const class ON_SHA1_HashContentHash () const
 Two dimension styles have identical content if and only if they have identical values of ContentHash(). More...
 
const ON_DimStyle CreateOverrideCandidate () const
 Create a dimstyle from this that is configured to be customized for use in creating a new annotation object. More...
 
ON_DimStyle::LengthDisplay DimensionLengthDisplay () const
 Dimension length units and format More...
 
ON::LengthUnitSystem DimensionLengthDisplayUnit (unsigned int model_sn) const
 Parameters: model_sn - 0, a model serial number, or ON_UNSET_UINT_INDEX to use the dimstyle's ModelSerialNumber() value. Returns Unit system for dimension length display. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn > 0, then the value of ON::LengthUnitSystemFromModelSerialNumber(model_sn) is returned. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn == 0, then ON::LengthUnitSystem::None is returned. More...
 
ON_Color DimensionLineColor () const
 
ON::object_color_source DimensionLineColorSource () const
 
ON_Color DimensionLinePlotColor () const
 
ON::plot_color_source DimensionLinePlotColorSource () const
 
double DimensionLinePlotWeight () const
 
ON::plot_weight_source DimensionLinePlotWeightSource () const
 
double DimExtension () const
 Extension of dimension line past extension lines. More...
 
ON_DimStyle::ContentAngleStyle DimRadialTextAngleStyle () const
 
ON_DimStyle::TextLocation DimRadialTextLocation () const
 The location of text relative to the dimension line in radial dimensions. More...
 
ON::TextOrientation DimRadialTextOrientation () const
 
double DimScale () const
 
int DimScaleSource () const
 
ON_DimStyle::ContentAngleStyle DimTextAngleStyle () const
 
ON_DimStyle::TextLocation DimTextLocation () const
 The location of text relative to the dimension line in linear, angular, and ordinate dimensions. More...
 
ON::TextOrientation DimTextOrientation () const
 
bool DrawForward () const
 
bool DrawTextMask () const
 Determines whether or not to draw a Text Mask. More...
 
void Dump (ON_TextLog &) const override
 virtual More...
 
void EmergencyDestroy ()
 Interface. More...
 
ON_Color ExtensionLineColor () const
 
ON::object_color_source ExtensionLineColorSource () const
 
ON_Color ExtensionLinePlotColor () const
 
ON::plot_color_source ExtensionLinePlotColorSource () const
 
double ExtensionLinePlotWeight () const
 
ON::plot_weight_source ExtensionLinePlotWeightSource () const
 
double ExtExtension () const
 Extension line extension. More...
 
double ExtOffset () const
 Extension line offset. More...
 
double FixedExtensionLen () const
 
bool FixedExtensionLenOn () const
 
const class ON_FontFont () const
 
const class ON_FontFontCharacteristics () const
 
const bool FontSubstituted () const
 
bool HasOverrides () const
 
void InheritFields (const ON_DimStyle &parent)
 
bool IsChildDimstyle () const
 Test if this dimstyle is the child of any other dimstyle. More...
 
bool IsChildOf (const ON_UUID &parent_id) const
 
bool IsFieldOverride (ON_DimStyle::field field_id) const
 
bool IsOverrideDimStyleCandidate (ON_UUID parent_id, bool bRequireSetOverrides, ON_wString *error_description=nullptr) const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 virtual More...
 
ON_UUID LeaderArrowBlockId () const
 
double LeaderArrowSize () const
 Arrow size. More...
 
ON_Arrowhead::arrow_type LeaderArrowType () const
 
double LeaderContentAngleDegrees () const
 
double LeaderContentAngleRadians () const
 
ON_DimStyle::ContentAngleStyle LeaderContentAngleStyle () const
 
ON_DimStyle::leader_curve_type LeaderCurveType () const
 
bool LeaderHasLanding () const
 
double LeaderLandingLength () const
 
ON::TextHorizontalAlignment LeaderTextHorizontalAlignment () const
 
ON::TextOrientation LeaderTextOrientation () const
 
ON::TextVerticalAlignment LeaderTextVerticalAlignment () const
 
double LengthFactor () const
 LengthFactor is a rarely used. It applies when a model is being drawn to a scale and the dimension length values should be reverse scaled. For example, if a model is drawn at 1/4 scale, a line 5 units long indicates the real world line is 20 units long. In this case setting LengthFactor to 4 would cause a linear dimension applied to that line to display a value of 20. More...
 
int LengthResolution () const
 Display resolution for distance measurements. More...
 
double MaskBorder () const
 
ON_Color MaskColor () const
 
ON_TextMask::MaskType MaskFillType () const
 Determines where to get the color to draw a Text Mask. More...
 
ON_DimStyleoperator= (const ON_DimStyle &)=default
 
void OverrideFields (const ON_DimStyle &source, const ON_DimStyle &parent)
 For every dimension style property identified by a field_id ON_DimStyle::field enum, except Name and Index, do the following: More...
 
void OverrideFieldsWithDifferentValues (const ON_DimStyle &source, const ON_DimStyle &parent)
 For every dimension style property identified by a field_id ON_DimStyle::field enum, except Name and Index, if source and parent have different values, then set the field overide for that property to true. More...
 
const ON_SHA1_HashParentContentHash () const
 
const ON_wStringPrefix () const
 Dimension prefix text. More...
 
bool Read (ON_BinaryArchive &) override
 virtual More...
 
double RoundOff () const
 
void Scale (double scale)
 
double ScaleLeftLength_mm () const
 
double ScaleRightLength_mm () const
 
const ON_ScaleValueScaleValue () const
 
void SetAlternate (bool)
 
void SetAlternateBelow (bool below)
 
void SetAlternateDimensionLengthDisplay (ON_DimStyle::LengthDisplay length_display)
 Set alternate dimension length units and format More...
 
void SetAlternateLengthFactor (double)
 AlternateLengthFactor is a rarely used. See Length factor for a discription of this property. More...
 
void SetAlternateLengthResolution (int)
 
void SetAlternatePrefix (const wchar_t *)
 
void SetAlternateRoundOff (double r)
 
void SetAlternateSuffix (const wchar_t *)
 
void SetAlternateToleranceResolution (int r)
 
void SetAlternateZeroSuppress (ON_DimStyle::suppress_zero s)
 
void SetAngleFormat (angle_format format)
 
void SetAngleResolution (int)
 
void SetAngleRoundOff (double r)
 
void SetAngleZeroSuppress (ON_DimStyle::suppress_zero s)
 
void SetArcLengthSymbol (int m)
 
void SetArrowBlockId1 (ON_UUID id)
 
void SetArrowBlockId2 (ON_UUID id)
 
void SetArrowColor (ON_Color c)
 
void SetArrowColorSource (const ON::object_color_source src)
 
void SetArrowPlotColor (ON_Color c)
 
void SetArrowPlotColorSource (const ON::plot_color_source src)
 
void SetArrowSize (const double)
 
void SetArrowType1 (ON_Arrowhead::arrow_type)
 
void SetArrowType1And2 (ON_Arrowhead::arrow_type)
 
void SetArrowType2 (ON_Arrowhead::arrow_type)
 
void SetBaselineSpacing (double spacing)
 
void SetCenterMark (const double)
 
void SetCenterMarkStyle (ON_DimStyle::centermark_style style)
 
void SetDimensionLengthDisplay (ON_DimStyle::LengthDisplay length_display)
 Alternate dimension length units and format More...
 
void SetDimensionLineColor (ON_Color c)
 
void SetDimensionLineColorSource (const ON::object_color_source src)
 
void SetDimensionLinePlotColor (ON_Color c)
 
void SetDimensionLinePlotColorSource (const ON::plot_color_source src)
 
void SetDimensionLinePlotWeight (double w)
 
void SetDimensionLinePlotWeightSource (const ON::plot_weight_source src)
 
void SetDimExtension (const double e)
 
void SetDimRadialTextAngleStyle (ON_DimStyle::ContentAngleStyle style)
 
void SetDimRadialTextLocation (ON_DimStyle::TextLocation)
 
void SetDimRadialTextOrientation (ON::TextOrientation)
 
void SetDimScale (ON_ScaleValue sv)
 
void SetDimScale (double left_val, ON::LengthUnitSystem left_us, double right_val, ON::LengthUnitSystem right_us)
 
void SetDimScale (double scale)
 
void SetDimScaleSource (int source)
 
void SetDimTextAngleStyle (ON_DimStyle::ContentAngleStyle style)
 
void SetDimTextLocation (ON_DimStyle::TextLocation)
 
void SetDimTextOrientation (ON::TextOrientation)
 
void SetDrawForward (bool drawforward)
 
void SetDrawTextMask (bool bDraw)
 
void SetExtensionLineColor (ON_Color c)
 
void SetExtensionLineColorSource (const ON::object_color_source src)
 
void SetExtensionLinePlotColor (ON_Color c)
 
void SetExtensionLinePlotColorSource (const ON::plot_color_source src)
 
void SetExtensionLinePlotWeight (double w)
 
void SetExtensionLinePlotWeightSource (const ON::plot_weight_source src)
 
void SetExtExtension (const double)
 
void SetExtOffset (const double)
 
void SetFieldOverride (ON_DimStyle::field field_id, bool bOverrideParent)
 
void SetFieldOverrideAll (bool bOverrideParent)
 
void SetFixedExtensionLen (double l)
 
void SetFixedExtensionLenOn (bool on)
 
void SetFont (const class ON_Font &font_characteristics)
 Set the font used to render text. More...
 
void SetLeaderArrowBlockId (ON_UUID id)
 
void SetLeaderArrowSize (const double)
 
void SetLeaderArrowType (ON_Arrowhead::arrow_type)
 
void SetLeaderContentAngleDegrees (double angle_degrees)
 
void SetLeaderContentAngleRadians (double angle_radians)
 
void SetLeaderContentAngleStyle (ON_DimStyle::ContentAngleStyle style)
 
void SetLeaderCurveType (ON_DimStyle::leader_curve_type type)
 
void SetLeaderHasLanding (bool landing)
 
void SetLeaderLandingLength (double length)
 
void SetLeaderTextHorizontalAlignment (ON::TextHorizontalAlignment halign)
 
void SetLeaderTextOrientation (ON::TextOrientation)
 
void SetLeaderTextVerticalAlignment (ON::TextVerticalAlignment style)
 
void SetLengthFactor (double)
 LengthFactor is a rarely used. It applies when a model is being drawn to a scale and the dimension length values should be reverse scaled. For example, if a model is drawn at 1/4 scale, a line 5 units long indicates the real world line is 20 units long. In this case setting LengthFactor to 4 would cause a linear dimension applied to that line to display a value of 20. More...
 
void SetLengthResolution (int)
 
void SetMaskBorder (double offset)
 
void SetMaskColor (ON_Color color)
 Does not return viewport background color. More...
 
void SetMaskFillType (ON_TextMask::MaskType source)
 
void SetPrefix (const wchar_t *)
 
void SetRoundOff (double r)
 
void SetSignedOrdinate (bool allowsigned)
 
void SetSourceDimstyle (ON_UUID source_uuid)
 
void SetStackFractionFormat (ON_DimStyle::stack_format f)
 
void SetStackHeightScale (double f)
 
void SetSuffix (const wchar_t *)
 
void SetSuppressArrow1 (bool s)
 
void SetSuppressArrow2 (bool s)
 
void SetSuppressExtension1 (bool)
 
void SetSuppressExtension2 (bool)
 
void SetTextColor (ON_Color c)
 
void SetTextColorSource (const ON::object_color_source src)
 
void SetTextGap (double gap)
 
void SetTextHeight (double height)
 
void SetTextHorizontalAlignment (ON::TextHorizontalAlignment halign)
 
void SetTextMask (const ON_TextMask &text_mask)
 
void SetTextMoveLeader (int m)
 
void SetTextOrientation (ON::TextOrientation)
 
void SetTextPlotColor (ON_Color c)
 
void SetTextPlotColorSource (const ON::object_color_source src)
 
void SetTextRotation (double r)
 
void SetTextUnderlined (bool underlined)
 
void SetTextVerticalAlignment (ON::TextVerticalAlignment style)
 
void SetToleranceFormat (ON_DimStyle::tolerance_format format)
 
void SetToleranceHeightScale (double scale)
 
void SetToleranceLowerValue (double lower_value)
 
void SetToleranceResolution (int resolution)
 
void SetToleranceUpperValue (double upper_value)
 
void SetToleranceZeroSuppress (ON_DimStyle::suppress_zero s)
 
void SetUnitSystem (ON::LengthUnitSystem us)
 Unit system for dimension rendering sizes like TextHeight, TextGap, ArrowSize, ExtOffset, and dozens of other properties that control the appearance and placement of the components used to render a dimension. More...
 
void SetUnitSystemFromContext (bool bUseName, ON::LengthUnitSystem source_unit_system, ON::LengthUnitSystem destination_unit_system)
 When a dimension style unit system is not set, this function examines the context the dimension style is being used in and sets the unit system. More...
 
void SetZeroSuppress (ON_DimStyle::suppress_zero s)
 
bool SignedOrdinate () const
 
ON_UUID SourceDimstyle () const
 
ON_DimStyle::stack_format StackFractionFormat () const
 
double StackHeightScale () const
 
const ON_wStringSuffix () const
 Dimension suffix text. More...
 
bool SuppressArrow1 () const
 
bool SuppressArrow2 () const
 
bool SuppressExtension1 () const
 Suppress first dimension extension line. More...
 
bool SuppressExtension2 () const
 Suppress second dimension extension line. More...
 
ON_Color TextColor () const
 
ON::object_color_source TextColorSource () const
 
double TextGap () const
 Distance from dimension lines to text. More...
 
double TextHeight () const
 Height of dimension text. More...
 
ON::TextHorizontalAlignment TextHorizontalAlignment () const
 
const ON_TextMaskTextMask () const
 
int TextMoveLeader () const
 
ON::TextOrientation TextOrientation () const
 
ON_Color TextPlotColor () const
 
ON::object_color_source TextPlotColorSource () const
 
const class ON_SHA1_Hash TextPositionPropertiesHash () const
 Two dimension styles have identical text orientation, glyph content, and size parameters if and only if the have identical values of TextPositionPropertiesHash(). More...
 
double TextRotation () const
 
bool TextUnderlined () const
 
ON::TextVerticalAlignment TextVerticalAlignment () const
 
tolerance_format ToleranceFormat () const
 
double ToleranceHeightScale () const
 
double ToleranceLowerValue () const
 
int ToleranceResolution () const
 
double ToleranceUpperValue () const
 
ON_DimStyle::suppress_zero ToleranceZeroSuppress () const
 
ON::LengthUnitSystem UnitSystem () const
 Unit system for dimension rendering sizes like TextHeight, TextGap, ArrowSize, ExtOffset, and dozens of other properties that control the appearance and placement of the components used to render a dimension. More...
 
bool UnitSystemIsSet () const
 
bool Write (ON_BinaryArchive &) const override
 virtual More...
 
ON_DimStyle::suppress_zero ZeroSuppress () const
 
- Public Member Functions inherited from ON_ModelComponent
 ON_ModelComponent () ON_NOEXCEPT
 
 ON_ModelComponent (const ON_ModelComponent &source)
 
 ON_ModelComponent (ON_ModelComponent::Type component_type) ON_NOEXCEPT
 Sets and locks the component type attribute. More...
 
 ON_ModelComponent (ON_ModelComponent::Type component_type, const ON_ModelComponent &source) ON_NOEXCEPT
 Locked status of source attributes is not copied to permit copy and modify operations. More...
 
 ~ON_ModelComponent ()=default
 
bool ChangeName (const wchar_t *new_name, class ON_ComponentManifest *manifest)
 Change the name of a component and optionally update a manifest. More...
 
bool ClearComponentType ()
 Set the model serial number value to the ON_ModelComponent::Unset.Type() and change the state so TypeIsSet() returns false. More...
 
bool ClearId ()
 Set the component id value to the ON_ModelComponent::Unset.ModelComponentId() and change the state so ModelComponentIdIsSet() returns false. More...
 
bool ClearIndex ()
 Set the component index value to the ON_ModelComponent::Unset.ModelComponentIndex() and change the state so ModelComponentIndexIsSet() returns false. More...
 
unsigned int ClearModelComponentAttributes (unsigned int attributes_filter)
 Writes the attributes identified by the component_filter parameter. More...
 
bool ClearModelComponentStatus ()
 
bool ClearModelSerialNumber ()
 Sets the model serial number, reference model serial number and instance definition model serial number values to 0 and flags these values as unset. More...
 
bool ClearName ()
 Set the component name value to the ON_ModelComponent::Unset.Name() and change the state so NameIsSet() and DeletedNameIsSet() both return false. More...
 
bool ClearParentId ()
 
int CompareName (const ON_UUID &other_parent_id, const wchar_t *other_name) const
 
int CompareName (const wchar_t *other_name) const
 
int CompareNameExact (const ON_UUID &other_parent_id, const wchar_t *other_name) const
 
int CompareNameExact (const wchar_t *other_name) const
 
ON_ModelComponent::Type ComponentType () const
 
bool ComponentTypeIsLocked () const
 
bool ComponentTypeIsSet () const
 
ON__UINT64 ContentVersionNumber () const
 Whenever an attribute is changed, the content version number is incremented. The ContentVersionNumber() is commonly used by consumers of the model component attributes to trigger updates when needed. More...
 
unsigned int CopyFrom (const ON_ModelComponent &src, unsigned int attributes_filter)
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const override
 Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical. More...
 
const ON_wString DeletedName () const
 
const ON_NameHashDeletedNameHash () const
 
bool DeletedNameIsSet () const
 
bool DeleteName ()
 If NameIsSet() is true, then the name is deleted in a waty that can be undone by calling UndeleteName() and the DeletedNameIsSet() property is changed to true. More...
 
void Dump (ON_TextLog &) const override
 Creates a text dump of the object. More...
 
bool EraseIdentification (bool bIgnoreLocks)
 
const wchar_tGetName (ON_wString &component_name) const
 
const ON_UUIDId () const
 
bool IdIsLocked () const
 
bool IdIsNil () const
 
bool IdIsNotNil () const
 
bool IdIsSet () const
 
const ON_UUIDIfIdIsNilSetId ()
 If the it is nil, call SetId(). More...
 
int Index () const
 
int Index (int unset_index_value) const
 
bool IndexIsLocked () const
 
bool IndexIsSet () const
 
unsigned int InstanceDefinitionModelSerialNumber () const
 
bool IsDeleted () const
 
bool IsHidden () const
 
bool IsLocked () const
 
bool IsReferenceComponent () const
 
bool IsSystemComponent () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 Tests an object to see if its data members are correctly initialized. More...
 
void LockAllSettingsExceptName ()
 
void LockComponentType ()
 Calling LockType() will prhibit future changes to the Type attribute. More...
 
void LockId ()
 Calling LockModelComponentId() will prhibit future changes to the ModelComponentId attribute. More...
 
void LockIndex ()
 Calling LockModelComponentIndex() will prhibit future changes to the ModelComponentIndex attribute. More...
 
void LockModelComponentStatus ()
 
void LockModelSerialNumber ()
 Calling LockModelSerialNumber() will prohibit future changes to the ModelSerialNumber(), ReferenceModelSerialNumber(), and InstanceDefinitionModelSerialNumber() attributes. More...
 
void LockName ()
 Calling LockName() will prohibit future changes to the Name attribute. More...
 
void LockParentId ()
 
ON_ComponentStatus ModelComponentStatus () const
 
bool ModelComponentStatusIsLocked () const
 
bool ModelComponentStatusIsSet () const
 
ON_UUID ModelObjectId () const override
 All objects in an opennurbs model have an id ( ON_Layer.m_layer_id, ON_Font.m_font_id, ON_Material.m_material_id, ON_3dmObjectAttributes.m_uuid ). More...
 
unsigned int ModelSerialNumber () const
 
bool ModelSerialNumberIsLocked () const
 
bool ModelSerialNumberIsSet () const
 
const ON_wString Name () const
 
const wchar_tNameAsPointer () const
 Expert user function that gets a pointer to the name. More...
 
const ON_NameHashNameHash () const
 Get a platform independent hash of the name suitable for equality testing and binary searching. When testing for equality or doing binary searches, using ON_NameHash values is faster than using the CompareName or ON_wString::CompareAttributeName. More...
 
bool NameIsEmpty () const
 
bool NameIsLocked () const
 
bool NameIsNotEmpty () const
 
bool NameIsSet () const
 
const ON_NameHash NewNameHash (const wchar_t *new_name) const
 
ON_ModelComponentoperator= (const ON_ModelComponent &source)
 
const ON_UUIDParentId () const
 
bool ParentIdIsLocked () const
 
bool ParentIdIsNil () const
 
bool ParentIdIsNotNil () const
 
bool ParentIdIsSet () const
 
bool ReadModelComponentAttributes (class ON_BinaryArchive &archive)
 
unsigned int ReferenceModelSerialNumber () const
 
ON__UINT64 RuntimeSerialNumber () const
 
const ON_UUIDSetAndLockId ()
 Sets the id to a new value created by ON_CreateUuid() and locks the id attribute so it cannot be changed. More...
 
bool SetAsSystemComponent ()
 
bool SetAsUnsetSystemComponent ()
 
bool SetComponentType (ON_ModelComponent::Type component_component_type)
 
bool SetDeletedModelComponentState (bool bDeleted, class ON_ComponentManifest *manifest)
 
void SetHiddenModelComponentState (bool bHidden)
 
bool SetId (const ON_UUID &component_id)
 
const ON_UUIDSetId ()
 Sets the id to a new value created by ON_CreateUuid(). More...
 
bool SetIdentification (const class ON_ComponentManifestItem &manifest_item, const wchar_t *manifest_name, bool bSetId, bool bParentId, bool bSetName, bool bSetIndex)
 Set a component's id, name and index to the manifest_item values. More...
 
bool SetIndex (int component_index)
 
bool SetLocalizedSystemComponentName (const wchar_t *system_component_localized_name)
 
void SetLockedModelComponentState (bool bLocked)
 
bool SetModelComponentStatus (ON_ComponentStatus component_status)
 
bool SetModelSerialNumber (unsigned int model_serial_number)
 Specify the model that is managing this component. More...
 
bool SetModelSerialNumber (unsigned int model_serial_number, unsigned int reference_model_serial_number, unsigned int instance_definition_model_serial_number)
 Specify the model that is managing this component. More...
 
bool SetName (const wchar_t *component_name)
 
bool SetParentId (const ON_UUID &parent_id)
 
unsigned int SizeOf () const override
 
bool UndeleteName ()
 
bool WriteModelComponentAttributes (class ON_BinaryArchive &archive, unsigned int attributes_filter) const
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 Call whenever a component status setting is modifed by directly changing it on a component in a way that will result in any saved information about the parent object's aggretate component status becoming invalid. More...
 
bool AttachUserData (class ON_UserData *pUserData)
 Attach user data to an object. More...
 
unsigned int ClearAllComponentStates () const
 Set all active level component states to ON_ComponentStatus::NoneSet. More...
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 Clear the specified states on every component. More...
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 Clear states on an individual component. More...
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 Expert user tool that copies user data items with positive values of ON_UserData.m_userdata_copycount from source_object to "this. More...
 
void CopyUserData (const ON_Object &source_object)
 Calls CopyUserData(source_object,ON_Object::UserDataConflictResolution::source_object). More...
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 Delete the portions of the object identified in ci_list[]. More...
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. More...
 
bool DetachUserData (class ON_UserData *pUserData)
 Remove user data from an object. More...
 
void EmergencyDestroy ()
 Sets m_user_data_list = 0. More...
 
class ON_UserDataFirstUserData () const
 User data is stored as a linked list of ON_UserData classes. FirstUserData gets the first item in the linked list. This is the most recent item attached using AttachUserData(). Remark: To iterate through all the user data on an object, call FirstUserData() and then use ON_UserData::Next() to traverse the list. More...
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 Get a pointer to user data. More...
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 Get user string from the object. More...
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 Get a list of all user string keys on the object. More...
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 Get a list of all user strings on the object. More...
 
bool IsKindOf (const ON_ClassId *pClassId) const
 Low level tool to test if an object is derived from a specified class. More...
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 Call whenever a component status setting is modifed by directly changing it on a component in a way that will result in any saved information about the parent object's aggretate component status becoming invalid. More...
 
virtual void MemoryRelocate ()
 The MemoryRelocate() function is called when an object's location in memory is changed. For example, if an object resides in a chunk of memory that is grown by calling a realloc that has to allocate a new chunk and copy the contents of the old chunk to the new chunk, then the location of the object's memory changes. In practice this happens when classes derived from ON_Object are stored in dynamic arrays, like the default implementation of ON_ObjectArray<>'s that use realloc to grow the dynamic array. More...
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 Expert user tool that moves user data items from source_object to "this. More...
 
void MoveUserData (ON_Object &source_object)
 Calls MoveUserData(source_object,ON_Object::UserDataConflictResolution::source_object,true). More...
 
virtual ON::object_type ObjectType () const
 Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on. More...
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 PurgeUserData() removes all user data from object. More...
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 Set states on an individual component. More...
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 Copy status settings to an individual component. More...
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 Attach a user string to the object. This information will perisist through copy construction, operator=, and file IO. More...
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 Append entries to the user string list More...
 
void TransformUserData (const class ON_Xform &xform)
 Objects derived from ON_Geometry must call TransformUserData() in their Transform() member function. More...
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 Uses the destination_manifest to update references to other components. This is typically done when a component's references came from a "source" context and are being updated to the "destination" context. For example, inserting one model into another when index, id, and name conflicts need to be resolved at the time of insertion. More...
 
int UserStringCount () const
 

Static Public Member Functions

static ON_DimStyle::angle_format AngleFormatFromUnsigned (unsigned int format_as_unsigned)
 
static ON_DimStyle::centermark_style CentermarkStyleFromUnsigned (unsigned int centermark_as_unsigned)
 
static ON_DimStyle::ContentAngleStyle ContentAngleStyleFromUnsigned (unsigned int alignment_as_unsigned)
 
static ON_DimStyleCreateFromFont (const ON_Font *font_characteristics, double model_space_text_scale, const ON_DimStyle *dimstyle_settings, const class ON_ComponentManifest *manifest, ON_DimStyle *destination)
 Create a clean dimension style that has the specified font. With the exception of the name, the resulting dimension style will have an unset ON_ModelComponent properties (id, index, ...). More...
 
static const ON_DimStyle CreateFromProperties (const ON_DimStyle &parent_dim_style, ON::AnnotationType annotation_type, const ON_Font *font, double model_space_text_scale, double text_height, ON::LengthUnitSystem text_height_unit_system, ON::TextVerticalAlignment valign, ON::TextHorizontalAlignment halign)
 Get an ON_DimStyle with the specified properties. More...
 
static const ON_DimStyle CreateFromProperties (const ON_DimStyle &parent_dim_style, ON::AnnotationType annotation_type, const ON_Font *font, double model_space_text_scale, double text_height, ON::LengthUnitSystem text_height_unit_system, ON::TextVerticalAlignment valign, ON::TextHorizontalAlignment halign, ON::TextOrientation orientation, ON_DimStyle::TextLocation dim_text_location)
 
static const ON_DimStyle CreateFromProperties (const ON_DimStyle &parent_dim_style, ON::AnnotationType annotation_type, const ON_Font *font, double model_space_text_scale, double text_height, ON::LengthUnitSystem text_height_unit_system)
 
static const class ON_DimStyleDimStyleOrDefault (const class ON_DimStyle *dimstyle)
 
static ON::OBSOLETE_DistanceDisplayMode DistanceDisplayModeFromLengthFormat (ON_DimStyle::OBSOLETE_length_format)
 convert ON_DimStyle::OBSOLETE_length_format enum to ON::OBSOLETE_DistanceDisplayMode enum More...
 
static ON_DimStyle::field FieldFromUnsigned (unsigned int field_as_unsigned)
 
static const ON_DimStyleFromModelComponentRef (const class ON_ModelComponentReference &model_component_reference, const ON_DimStyle *none_return_value)
 
static ON_DimStyle::leader_curve_type LeaderCurveTypeFromUnsigned (unsigned int type_as_unsigned)
 
static ON_DimStyle::LengthDisplay LengthDisplayFromUnitsAndFormat (ON::LengthUnitSystem units, ON_DimStyle::OBSOLETE_length_format lengthformat)
 
static ON_DimStyle::LengthDisplay LengthDisplayFromUnsigned (unsigned int length_display_as_unsigned)
 
static bool LengthDisplayIsDecimal (ON_DimStyle::LengthDisplay dimension_length_display)
 
static ON_DimStyle::OBSOLETE_length_format LengthFormatFromDistanceDisplayMode (ON::OBSOLETE_DistanceDisplayMode)
 convert ON::OBSOLETE_DistanceDisplayMode enum to ON_DimStyle::OBSOLETE_length_format enum More...
 
static ON::LengthUnitSystem LengthUnitSystemFromLengthDisplay (ON_DimStyle::LengthDisplay dimension_length_display)
 
static ON_DimStyle::OBSOLETE_length_format OBSOLETE_LengthFormatFromLengthDisplay (ON_DimStyle::LengthDisplay dimension_length_display, unsigned int model_serial_number)
 
static ON_DimStyle::OBSOLETE_length_format OBSOLETE_LengthFormatFromLengthDisplay (ON_DimStyle::LengthDisplay dimension_length_display, ON::LengthUnitSystem model_unit_system)
 
static ON_DimStyle::OBSOLETE_length_format OBSOLETE_LengthFormatFromUnsigned (unsigned int format_as_unsigned)
 
static ON_DimStyle::stack_format StackFormatFromUnsigned (unsigned int format_as_unsigned)
 
static const ON_DimStyleSystemDimstyleFromContentHash (const ON_SHA1_Hash &content_hash)
 
static const ON_DimStyleSystemDimstyleFromId (ON_UUID id)
 
static const ON_DimStyleSystemDimstyleFromIndex (int index)
 
static const ON_DimStyleSystemDimstyleFromName (const ON_NameHash &name_hash)
 
static ON_DimStyle::TextLocation TextLocationFromUnsigned (unsigned int dim_text_location_as_unsigned)
 
static ON_DimStyle::tolerance_format ToleranceFormatFromUnsigned (unsigned int format_as_unsigned)
 
static int V5AngleFormat (ON_DimStyle::angle_format v6format)
 
static int V5ArrowType (ON_Arrowhead::arrow_type v6type)
 For converting to and from V5 Dimstyles. More...
 
static int V5LengthFormat (ON_DimStyle::OBSOLETE_length_format v6format)
 
static int V5MaskColorSourceFromV6MaskType (ON_TextMask::MaskType mask_type)
 
static int V5ToleranceFormat (ON_DimStyle::tolerance_format v6format)
 
static ON_DimStyle::angle_format V6AngleFormat (int v5format)
 
static ON_Arrowhead::arrow_type V6ArrowType (int v5type)
 
static ON_DimStyle::OBSOLETE_length_format V6LengthFormat (int v5format)
 
static ON_TextMask::MaskType V6MaskTypeFromV5MaskColorSource (int v5_mask_color_source)
 
static ON_DimStyle::tolerance_format V6ToleranceFormat (int v5format)
 
static ON_DimStyle::suppress_zero ZeroSuppressFromUnsigned (unsigned int suppress_ero_as_unsigned)
 
static bool ZeroSuppressMatchesLengthDisplay (ON_DimStyle::suppress_zero zero_suppress, ON_DimStyle::LengthDisplay length_display)
 The valid choices for ON_DimStyle::suppress_zero depend on the dimension length display. More...
 
- Static Public Member Functions inherited from ON_ModelComponent
static int CompareId (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareIdAndName (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareName (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareNameAndId (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareNameExact (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static ON_ModelComponent::Type ComponentTypeFromUnsigned (unsigned int component_type_as_unsigned)
 
static bool ComponentTypeIsValid (ON_ModelComponent::Type component_type)
 
static bool ComponentTypeIsValidAndNotMixed (ON_ModelComponent::Type component_type)
 
static const ON_wString ComponentTypeToString (ON_ModelComponent::Type)
 
static bool IndexRequired (ON_ModelComponent::Type component_type)
 
static unsigned int Internal_SystemComponentHelper ()
 For internal use. Never call this function. More...
 
static const wchar_tIsNamePathSeparator (const wchar_t *s)
 Test a string to see if its beginning matches the string returned by ON_ModelComponent::NamePathSeparator. More...
 
*</code > *</example > *static const wchar_tIsReferencePrefixDelimiter (const wchar_t *s)
 Test a string to see if its beginning matches the string returned by ON_ModelComponent::NameReferenceDelimiter. More...
 
static const wchar_tIsReferencePrefixSeparator (const wchar_t *s)
 Test a string to see if its beginning matches the string returned by ON_ModelComponent::NameReferenceSeparator. More...
 
static bool IsValidComponentName (const wchar_t *candidate_component_name)
 
static bool IsValidComponentName (const ON_wString &candidate_component_name)
 
static bool IsValidComponentName (size_t length, const wchar_t *candidate_component_name)
 
static bool IsValidComponentName (const class ON_ComponentManifest &model_manfest, const ON_ModelComponent &model_component, bool bPermitReferencePrefix, ON_wString &valid_name)
 
static bool IsValidComponentNameFirstCodePoint (ON__UINT32 unicode_code_point)
 
static bool IsValidComponentNameFirstCodePoint (int length, const wchar_t *candidate_component_name)
 
static const ON_wString NameLeaf (const wchar_t *name)
 
static const ON_wString NameParent (const wchar_t *name, bool bIncludeReference)
 
static const ON_wString NameReferencePrefix (const wchar_t *name)
 
static const ON_wString RemoveAllReferencePrefixDelimiters (const wchar_t *name)
 Remove all occurances of ON::NameReferenceDelimiter() from name. More...
 
static const ON_wString RemoveReferencePrefix (const wchar_t *name)
 
static const ON_wString RemoveTrailingNamePathSeparator (const wchar_t *name)
 Remove any trailing occurance of ON_ModelComponent::NamePathSeparator from name. More...
 
static const ON_wString RemoveTrailingReferencePrefixDelimiter (const wchar_t *name)
 Remove any trailing occurance of ON_ModelComponent::NameReferenceDelimiter from name. More...
 
static const ON_wString RemoveTrailingReferencePrefixSeparator (const wchar_t *name)
 Remove any trailing occurance of ON_ModelComponent::NameReferenceSeparator from name. More...
 
static void SplitName (const wchar_t *name, ON_wString &reference_prefix, ON_wString &name_parent, ON_wString &name_leaf)
 
static bool UniqueNameIgnoresCase (ON_ModelComponent::Type component_type)
 
static bool UniqueNameIncludesParent (ON_ModelComponent::Type component_type)
 
static bool UniqueNameRequired (ON_ModelComponent::Type component_type)
 

Static Public Attributes

static const ON_DimStyle Default
 
static const ON_DimStyle DefaultFootInchArchitecture
 
static const ON_DimStyle DefaultInchDecimal
 
static const ON_DimStyle DefaultInchFractional
 
static const ON_DimStyle DefaultMillimeterArchitecture
 
static const ON_DimStyle DefaultMillimeterLarge
 
static const ON_DimStyle DefaultMillimeterSmall
 
static const ON_DimStyle Unset
 Predefined default dimension styles always available. More...
 
- Static Public Attributes inherited from ON_ModelComponent
static const ON_wString NamePathSeparator
 Returns the string "::". This is the string Rhino uses in layer full path names to separate the names of individual layers. More...
 
static const ON_wString ReferencePrefixDelimiter
 Returns the string " : ". This is the string Rhino uses to separate the reference file names from and model component names read from those files. More...
 
static const ON_wString ReferencePrefixSeparator
 Returns the string ">". This is the string Rhino uses to separate the block definition name and linked file name in grandparent layers. More...
 
static const ON_ModelComponent Unset
 
*static const ON_wString WorksessionReferencePrefix *const wchar_t
 

Friends

class ON_V5x_DimStyle
 

Additional Inherited Members

- Protected Member Functions inherited from ON_ModelComponent
void IncrementContentVersionNumber () const
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int
Enumerator
FieldCount 

must be 1 + the maximum value of an ON_DimStyle::field enum value.

◆ angle_format

enum ON_DimStyle::angle_format : unsigned char
strong

Display format for angles

Enumerator
DecimalDegrees 

Decimal Degrees

DegMinSec 

Degrees Minutes Seconds

Radians 

Decimal Radians

Grads 

Decimal Gradians

◆ centermark_style

enum ON_DimStyle::centermark_style : unsigned char
strong

Style for drawing centermark for Radial dimensions and Centermark objects

Enumerator
None 

No centermark display

Mark 
  • mark only
MarkAndLines 
  • mark and lines to radius

◆ ContentAngleStyle

enum ON_DimStyle::ContentAngleStyle : unsigned char
strong

Angle for text or other leader or dimension content

Enumerator
Horizontal 

Annotation text is horizontal in annotation object's plane

Aligned 

Aligned with last leader direction or dimension line

Rotated 

Explicit angle

◆ field

enum ON_DimStyle::field : unsigned int
strong

Field identifiers used for file i/o and getting/setting values

Don't change these enum values. They are used in file reading and writing.

Enumerator
Unset 
Name 

Dimension style Name property. Cannot be inherited from parent.

Index 

Dimension style runtime model component index property. Cannot be inherited from parent.

ExtensionLineExtension 
ExtensionLineOffset 
Arrowsize 
LeaderArrowsize 
Centermark 
TextGap 
TextHeight 
DimTextLocation 

Linear, angular, and ordinate dimension text location above/in/below

LengthResolution 

OBSOLETE_LengthFormat_ = 11,.

AngleFormat 
AngleResolution 
Font 
LengthFactor 

LengthFactor is a rarely used. It applies when a model is being drawn to a scale and the dimension length values should be reverse scaled. For example, if a model is drawn at 1/4 scale, a line 5 units long indicates the real world line is 20 units long. In this case setting LengthFactor to 4 would cause a linear dimension applied to that line to display a value of 20.

Alternate 
AlternateLengthFactor 

AlternateLengthFactor is a rarely used. See Length factor for a discription of this property.

AlternateLengthResolution 

OBSOLETE_AlternateLengthFormat_ = 19,.

Prefix 
Suffix 
AlternatePrefix 
AlternateSuffix 
DimensionLineExtension 
SuppressExtension1 
SuppressExtension2 
ExtLineColorSource 
DimLineColorSource 
ArrowColorSource 
TextColorSource 
ExtLineColor 
DimLineColor 
ArrowColor 
TextColor 
ExtLinePlotColorSource 
DimLinePlotColorSource 
ArrowPlotColorSource 
TextPlotColorSource 
ExtLinePlotColor 
DimLinePlotColor 
ArrowPlotColor 
TextPlotColor 
ExtLinePlotWeightSource 
DimLinePlotWeightSource 
ExtLinePlotWeight_mm 
DimLinePlotWeight_mm 
ToleranceFormat 
ToleranceResolution 
ToleranceUpperValue 
ToleranceLowerValue 
AltToleranceResolution 
ToleranceHeightScale 
BaselineSpacing 
DrawMask 
MaskColorSource 
MaskColor 
MaskBorder 
DimensionScale 
DimscaleSource 
FixedExtensionLength 
FixedExtensionOn 
TextRotation 
SuppressArrow1 
SuppressArrow2 
TextmoveLeader 
ArclengthSymbol 
StackTextheightScale 
StackFormat 
AltRound 
Round 
AngularRound 
AltZeroSuppress 
AngleZeroSuppress 

OBSOLETE ToleranceZeroSuppress = 74,.

ZeroSuppress 
AltBelow 
ArrowType1 
ArrowType2 
LeaderArrowType 
ArrowBlockId1 
ArrowBlockId2 
LeaderArrowBlock 
DimRadialTextLocation 

Radial dimension text location above/in/below

TextVerticalAlignment 
LeaderTextVerticalAlignment 
LeaderContentAngleStyle 
LeaderCurveType 
LeaderContentAngle 
LeaderHasLanding 
LeaderLandingLength 
MaskFlags 
CentermarkStyle 
TextHorizontalAlignment 
LeaderTextHorizontalAlignment 
DrawForward 
SignedOrdinate 
UnitSystem 

Unit system for dimension rendering sizes like TextHeight, TextGap, ArrowSize, ExtOffset, and dozens of other properties that control the appearance and placement of the components used to render a dimension.

TextMask 
TextOrientation 
LeaderTextOrientation 
DimTextOrientation 
DimRadialTextOrientation 
DimTextAngleStyle 
DimRadialTextAngleStyle 
TextUnderlined 
DimensionLengthDisplay 

Dimension length display. See ON_DimStyle::DimensionLengthDisplay() for a descpription of this parameter.

AlternateDimensionLengthDisplay 

Alternate dimension length display. See ON_DimStyle::AlternateDimensionLengthDisplay() for a descpription of this parameter.

Count 

Every enum UINT value that identifies a valid dimension style property is less than the UINT value of Count.

◆ leader_curve_type

enum ON_DimStyle::leader_curve_type : unsigned char
strong

Type of leader curve

Enumerator
None 
Polyline 
Spline 

◆ LengthDisplay

enum ON_DimStyle::LengthDisplay : unsigned int
strong

Interface.

Dimension display length unit system and style

Enumerator
ModelUnits 

Decimal current model units

Millmeters 

Decimal Millimeters

Centimeters 

Decimal Centimeters

Meters 

Decimal Meters

Kilometers 

Decimal Kilometers

InchesDecimal 

Decimal Inches

InchesFractional 

Fractional Inches ( 1.75 inches displays as 1-3/4 )

FeetDecimal 

Decimal Feet

FeetAndInches 

Feet and Inches ( 14.75 inches displays as 1'-2-3/4" )

Miles 

Decimal Miles

◆ OBSOLETE_length_format

enum ON_DimStyle::OBSOLETE_length_format : unsigned char
strong

Obsolete format for length display - use ON_DimStyle::DimensionLengthDisplay instead

Enumerator
Decimal 

Obsolete - use ON_DimStyle::DimensionLengthDisplay::ModelUnits.

Fractional 

Obsolete - use ON_DimStyle::DimensionLengthDisplay::InchesFractional

FeetInches 

Obsolete - use ON_DimStyle::DimensionLengthDisplay::FeetAndInches

FeetDecimalInches 

Obsolete - use ON_DimStyle::DimensionLengthDisplay::FeetAndInches enum.

◆ stack_format

enum ON_DimStyle::stack_format : unsigned char
strong

Format of stacked fractions

Enumerator
None 

No stacking

StackHorizontal 

Stack with horizontal line

StackDiagonal 

Stack with angled line

◆ suppress_zero

enum ON_DimStyle::suppress_zero : unsigned char
strong

Marks leading and trailing zeros for removal.

Enumerator
None 

No zero suppression.

SuppressLeading 

Suppress leading zeros.

SuppressTrailing 

Suppress trailing zeros.

SuppressLeadingAndTrailing 

Suppress leading and trailing zeros.

SuppressZeroFeet 

Suppress zero feet.

SuppressZeroInches 

Suppress zero inches.

SuppressZeroFeetAndZeroInches 

Suppress zero feet and zero inches.

◆ TextLocation

enum ON_DimStyle::TextLocation : unsigned char
strong

The location of text in linear, angular, radial, and ordinate dimensions.

Enumerator
AboveDimLine 

Text is above dimension line.

InDimLine 

Text is centered in dimension line.

BelowDimLine 

Text is below dimension line.

◆ tolerance_format

enum ON_DimStyle::tolerance_format : unsigned char
strong

Style of tolerance display for dimensions

Enumerator
None 

No tolerance display

Symmetrical 

Symmetrical +/- tolerance

Deviation 

Distance +tol, -tol

Limits 

Distance upper and lower limits

Constructor & Destructor Documentation

◆ ON_DimStyle() [1/4]

ON_DimStyle::ON_DimStyle ( )

Default constructor result is identical to ON_DimStyle::Unset;.

◆ ~ON_DimStyle()

ON_DimStyle::~ON_DimStyle ( )
default

◆ ON_DimStyle() [2/4]

ON_DimStyle::ON_DimStyle ( const ON_DimStyle src)
default

◆ ON_DimStyle() [3/4]

ON_DimStyle::ON_DimStyle ( ON::LengthUnitSystem  model_length_unit_system,
const class ON_V5x_DimStyle src 
)

Used when reading V5 and earlier archives.

◆ ON_DimStyle() [4/4]

ON_DimStyle::ON_DimStyle ( const ON_3dmAnnotationSettings src)

Member Function Documentation

◆ Alternate()

bool ON_DimStyle::Alternate ( ) const

Additional measurement display toggle.

◆ AlternateBelow()

bool ON_DimStyle::AlternateBelow ( ) const

◆ AlternateDimensionLengthDisplay()

ON_DimStyle::LengthDisplay ON_DimStyle::AlternateDimensionLengthDisplay ( ) const

Set dimension length units and format

◆ AlternateDimensionLengthDisplayUnit()

ON::LengthUnitSystem ON_DimStyle::AlternateDimensionLengthDisplayUnit ( unsigned int  model_sn) const

Parameters: model_sn - 0, a model serial number, or ON_UNSET_UINT_INDEX to use the dimstyle's ModelSerialNumber() value. Returns Unit system for dimension length display. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn > 0, then the value of ON::LengthUnitSystemFromModelSerialNumber(model_sn) is returned. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn == 0, then ON::LengthUnitSystem::None is returned.

◆ AlternateLengthFactor()

double ON_DimStyle::AlternateLengthFactor ( ) const

AlternateLengthFactor is a rarely used. See Length factor for a discription of this property.

Distance scale factor for alternate display

◆ AlternateLengthResolution()

int ON_DimStyle::AlternateLengthResolution ( ) const

Display resolution for alternate length measurements.

◆ AlternatePrefix()

const ON_wString& ON_DimStyle::AlternatePrefix ( ) const

Dimension alternate prefix text.

◆ AlternateRoundOff()

double ON_DimStyle::AlternateRoundOff ( ) const

◆ AlternateSuffix()

const ON_wString& ON_DimStyle::AlternateSuffix ( ) const

Dimension alternate suffix text.

◆ AlternateToleranceResolution()

int ON_DimStyle::AlternateToleranceResolution ( ) const

◆ AlternateZeroSuppress()

ON_DimStyle::suppress_zero ON_DimStyle::AlternateZeroSuppress ( ) const

◆ AngleFormat()

angle_format ON_DimStyle::AngleFormat ( ) const

◆ AngleFormatFromUnsigned()

static ON_DimStyle::angle_format ON_DimStyle::AngleFormatFromUnsigned ( unsigned int  format_as_unsigned)
static

◆ AngleResolution()

int ON_DimStyle::AngleResolution ( ) const

Display resolution for angle measurements.

◆ AngleRoundOff()

double ON_DimStyle::AngleRoundOff ( ) const

◆ AngleZeroSuppress()

ON_DimStyle::suppress_zero ON_DimStyle::AngleZeroSuppress ( ) const

◆ ArcLengthSymbol()

int ON_DimStyle::ArcLengthSymbol ( ) const

◆ ArrowBlockId1()

ON_UUID ON_DimStyle::ArrowBlockId1 ( ) const

◆ ArrowBlockId2()

ON_UUID ON_DimStyle::ArrowBlockId2 ( ) const

◆ ArrowColor()

ON_Color ON_DimStyle::ArrowColor ( ) const

◆ ArrowColorSource()

ON::object_color_source ON_DimStyle::ArrowColorSource ( ) const

◆ ArrowPlotColor()

ON_Color ON_DimStyle::ArrowPlotColor ( ) const

◆ ArrowPlotColorSource()

ON::plot_color_source ON_DimStyle::ArrowPlotColorSource ( ) const

◆ ArrowSize()

double ON_DimStyle::ArrowSize ( ) const

Arrow size.

◆ ArrowType1()

ON_Arrowhead::arrow_type ON_DimStyle::ArrowType1 ( ) const

◆ ArrowType2()

ON_Arrowhead::arrow_type ON_DimStyle::ArrowType2 ( ) const

◆ BaselineSpacing()

double ON_DimStyle::BaselineSpacing ( ) const

◆ CenterMark()

double ON_DimStyle::CenterMark ( ) const

Centermark size.

◆ CenterMarkStyle()

ON_DimStyle::centermark_style ON_DimStyle::CenterMarkStyle ( ) const

Centermark style.

◆ CentermarkStyleFromUnsigned()

static ON_DimStyle::centermark_style ON_DimStyle::CentermarkStyleFromUnsigned ( unsigned int  centermark_as_unsigned)
static

◆ ClearAllFieldOverrides()

void ON_DimStyle::ClearAllFieldOverrides ( )

All dimension style settings identified the ON_DimStyle::field enum, except Name and Id, are inherited from the parent dimension style.

◆ CompareDimstyle()

bool ON_DimStyle::CompareDimstyle ( const ON_DimStyle src) const
Returns
True: "this" and src have identical names, dimension style appearance attributes, and identical atttributes inherited from the same parent dimension style. ON_ModelComponent settings other than Name() and ParentId() are not compared. Remaraks: A better name for this function would be EqualForAllPracticalPurposes().

◆ CompareFields()

bool ON_DimStyle::CompareFields ( const ON_DimStyle src) const
Returns
True if this and src have identical dimension style appearance attributes and the same parent dimension style id. CompareFields() ignores Name, Index, Id() values. CompareFields() ignores differences in IsOverride(field_id) values. Remaraks: A better name for this function would be EqualAppearanceSettings().

◆ ContentAngleStyleFromUnsigned()

static ON_DimStyle::ContentAngleStyle ON_DimStyle::ContentAngleStyleFromUnsigned ( unsigned int  alignment_as_unsigned)
static

◆ ContentHash()

const class ON_SHA1_Hash& ON_DimStyle::ContentHash ( ) const

Two dimension styles have identical content if and only if they have identical values of ContentHash().

Returns
A SHA-1 hash of the information that controls annotation appearance.

Independent of id, parent id, name, and index.

◆ CreateFromFont()

static ON_DimStyle* ON_DimStyle::CreateFromFont ( const ON_Font font_characteristics,
double  model_space_text_scale,
const ON_DimStyle dimstyle_settings,
const class ON_ComponentManifest manifest,
ON_DimStyle destination 
)
static

Create a clean dimension style that has the specified font. With the exception of the name, the resulting dimension style will have an unset ON_ModelComponent properties (id, index, ...).

Parameters
font_characteristics[in] If nullptr, then &ON_Font::Default is used.
model_space_text_scale[in] If model_space_text_scale is > 0.0, then it is used to set the DimScale() value.
dimstyle_settings[in] Setting for non-font dimstyle properties. If nullptr, then &ON_DimStyle::Default is used.
manifest[in] If manifest is not nullptr, then it is used to generate a unique name.
destination[in] If destination is not nullptr, the result is stored here. Otherwise operator new is used to construct an ON_DimStyle on the heap.

◆ CreateFromProperties() [1/3]

static const ON_DimStyle ON_DimStyle::CreateFromProperties ( const ON_DimStyle parent_dim_style,
ON::AnnotationType  annotation_type,
const ON_Font font,
double  model_space_text_scale,
double  text_height,
ON::LengthUnitSystem  text_height_unit_system,
ON::TextVerticalAlignment  valign,
ON::TextHorizontalAlignment  halign 
)
static

Get an ON_DimStyle with the specified properties.

Parameters
parent_dim_style[in] If you are getting ready to modify and existing annotation object, a good options for this paramter is the dimstyle returned by ON_Annotation.DimStyle(); If you are getting ready to create a new annotation object, then get an ON_DimStyleContext class and pass ON_DimStyleContext.CurrentDimStyle(). In Rhino, use CRhinoDoc.DimStyleContext() to get an ON_DimStyleContext. In an ONX_Model, use ONX_Model.DimStyleContext() to get an ON_DimStyleContext. In other situations, you can pass on of the system dimstyles like ON_DimStyle::DefaultMillimeterSmall or ON_DimStyle::DefaultMillimeterArchitecture. The worst possible choices are ON_DimStyle::Default or ON_DimStyle::Unset.
annotation_type[in] ON::AnnotationType::Unset if style will be used for multiple types of annotation or a specific type. For example, if you are making a text object, pass ON::AnnotationType::Text; if you are making a leader, pass ON::AnnotationType::Leader, and so on.
font[in] nullptr for current default or specify the font you want. When in doubt, pass nullptr
model_space_text_scale[in] If > 0, then ON_DimStyle.DimScale() is set, otherwise current default is used. When in doubt, pass ON_UNSET_VALUE.
text_height[in]
text_height_unit_system[in] If text_height > 0, then ON_DimStyle.TextHeight() is set, otherwise current default is used. When in doubt, pass ON_UNSET_VALUE.
valign[in]
halign[in] valign and halign control placement of text in text objects and leaders. The value of the annotation_type parameter determines which objects use the valign and halign settings.
text_orientation[in]
dim_text_location[in] Controls placement of text in linear, angular, radial and ordinate dimensions. When in doubt, pass parent_dim_style.DimTextLocation().
Returns
A dimstyle with the specified text properties.

This is a useful tool for creating the dimension style parameters to CRhinoDoc.AddTextObject() and CRhinoDoc.AddLeaderObject().

◆ CreateFromProperties() [2/3]

static const ON_DimStyle ON_DimStyle::CreateFromProperties ( const ON_DimStyle parent_dim_style,
ON::AnnotationType  annotation_type,
const ON_Font font,
double  model_space_text_scale,
double  text_height,
ON::LengthUnitSystem  text_height_unit_system,
ON::TextVerticalAlignment  valign,
ON::TextHorizontalAlignment  halign,
ON::TextOrientation  orientation,
ON_DimStyle::TextLocation  dim_text_location 
)
static

◆ CreateFromProperties() [3/3]

static const ON_DimStyle ON_DimStyle::CreateFromProperties ( const ON_DimStyle parent_dim_style,
ON::AnnotationType  annotation_type,
const ON_Font font,
double  model_space_text_scale,
double  text_height,
ON::LengthUnitSystem  text_height_unit_system 
)
static

◆ CreateOverrideCandidate()

const ON_DimStyle ON_DimStyle::CreateOverrideCandidate ( ) const

Create a dimstyle from this that is configured to be customized for use in creating a new annotation object.

Returns
An ON_DimStyle configured to be modified and used as an override dimstyle for annotation objects.
ON_DimStyleContext = dim_style_context = ...;
ON_DimStyle my_dim_style = dim_style_context.CurrentDimStyle().CreateOverrideCandidate().
// Customize my_dim_style
my_dim_style.Set...(...);

◆ DimensionLengthDisplay()

ON_DimStyle::LengthDisplay ON_DimStyle::DimensionLengthDisplay ( ) const

Dimension length units and format

◆ DimensionLengthDisplayUnit()

ON::LengthUnitSystem ON_DimStyle::DimensionLengthDisplayUnit ( unsigned int  model_sn) const

Parameters: model_sn - 0, a model serial number, or ON_UNSET_UINT_INDEX to use the dimstyle's ModelSerialNumber() value. Returns Unit system for dimension length display. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn > 0, then the value of ON::LengthUnitSystemFromModelSerialNumber(model_sn) is returned. If DimensionLengthDisplay() == ON_DimStyle::LengthDisplay::ModelUnits and model_sn == 0, then ON::LengthUnitSystem::None is returned.

◆ DimensionLineColor()

ON_Color ON_DimStyle::DimensionLineColor ( ) const

◆ DimensionLineColorSource()

ON::object_color_source ON_DimStyle::DimensionLineColorSource ( ) const

◆ DimensionLinePlotColor()

ON_Color ON_DimStyle::DimensionLinePlotColor ( ) const

◆ DimensionLinePlotColorSource()

ON::plot_color_source ON_DimStyle::DimensionLinePlotColorSource ( ) const

◆ DimensionLinePlotWeight()

double ON_DimStyle::DimensionLinePlotWeight ( ) const

◆ DimensionLinePlotWeightSource()

ON::plot_weight_source ON_DimStyle::DimensionLinePlotWeightSource ( ) const

◆ DimExtension()

double ON_DimStyle::DimExtension ( ) const

Extension of dimension line past extension lines.

◆ DimRadialTextAngleStyle()

ON_DimStyle::ContentAngleStyle ON_DimStyle::DimRadialTextAngleStyle ( ) const

◆ DimRadialTextLocation()

ON_DimStyle::TextLocation ON_DimStyle::DimRadialTextLocation ( ) const

The location of text relative to the dimension line in radial dimensions.

◆ DimRadialTextOrientation()

ON::TextOrientation ON_DimStyle::DimRadialTextOrientation ( ) const

◆ DimScale()

double ON_DimStyle::DimScale ( ) const

◆ DimScaleSource()

int ON_DimStyle::DimScaleSource ( ) const

◆ DimStyleOrDefault()

static const class ON_DimStyle& ON_DimStyle::DimStyleOrDefault ( const class ON_DimStyle dimstyle)
static
Parameters
dimstyle[in]
Returns
If dimstyle not nullptr, then dimstyle is returned. Otherwise a non-null pointer to a persistent dimstyle is returned. A null pointer is never returned.

This function is used when a dimension style is required.

◆ DimTextAngleStyle()

ON_DimStyle::ContentAngleStyle ON_DimStyle::DimTextAngleStyle ( ) const

◆ DimTextLocation()

ON_DimStyle::TextLocation ON_DimStyle::DimTextLocation ( ) const

The location of text relative to the dimension line in linear, angular, and ordinate dimensions.

◆ DimTextOrientation()

ON::TextOrientation ON_DimStyle::DimTextOrientation ( ) const

◆ DistanceDisplayModeFromLengthFormat()

static ON::OBSOLETE_DistanceDisplayMode ON_DimStyle::DistanceDisplayModeFromLengthFormat ( ON_DimStyle::OBSOLETE_length_format  )
static

convert ON_DimStyle::OBSOLETE_length_format enum to ON::OBSOLETE_DistanceDisplayMode enum

◆ DrawForward()

bool ON_DimStyle::DrawForward ( ) const

◆ DrawTextMask()

bool ON_DimStyle::DrawTextMask ( ) const

Determines whether or not to draw a Text Mask.

◆ Dump()

void ON_DimStyle::Dump ( ON_TextLog ) const
overridevirtual

virtual

Reimplemented from ON_Object.

◆ EmergencyDestroy()

void ON_DimStyle::EmergencyDestroy ( )

Interface.

◆ ExtensionLineColor()

ON_Color ON_DimStyle::ExtensionLineColor ( ) const

◆ ExtensionLineColorSource()

ON::object_color_source ON_DimStyle::ExtensionLineColorSource ( ) const

◆ ExtensionLinePlotColor()

ON_Color ON_DimStyle::ExtensionLinePlotColor ( ) const

◆ ExtensionLinePlotColorSource()

ON::plot_color_source ON_DimStyle::ExtensionLinePlotColorSource ( ) const

◆ ExtensionLinePlotWeight()

double ON_DimStyle::ExtensionLinePlotWeight ( ) const

◆ ExtensionLinePlotWeightSource()

ON::plot_weight_source ON_DimStyle::ExtensionLinePlotWeightSource ( ) const

◆ ExtExtension()

double ON_DimStyle::ExtExtension ( ) const

Extension line extension.

◆ ExtOffset()

double ON_DimStyle::ExtOffset ( ) const

Extension line offset.

◆ FieldFromUnsigned()

static ON_DimStyle::field ON_DimStyle::FieldFromUnsigned ( unsigned int  field_as_unsigned)
static

◆ FixedExtensionLen()

double ON_DimStyle::FixedExtensionLen ( ) const

◆ FixedExtensionLenOn()

bool ON_DimStyle::FixedExtensionLenOn ( ) const

◆ Font()

const class ON_Font& ON_DimStyle::Font ( ) const
Returns
The managed font used to render text.

◆ FontCharacteristics()

const class ON_Font& ON_DimStyle::FontCharacteristics ( ) const
Returns
A copy of the font_characteristics information.

You probably want to use Font(). This function is only useful in isolated situations and is typically used to study font substitutions when a model moves between computers or platforms.

◆ FontSubstituted()

const bool ON_DimStyle::FontSubstituted ( ) const
Returns
True if the font returned by Font() is a substitute for the font passed to SetFont().

Font substitution can occur when a model is moved between computers that have different fonts installed.

◆ FromModelComponentRef()

static const ON_DimStyle* ON_DimStyle::FromModelComponentRef ( const class ON_ModelComponentReference model_component_reference,
const ON_DimStyle none_return_value 
)
static
Parameters
model_component_reference[in]
none_return_value[in] value to return if ON_DimStyle::Cast(model_component_ref.ModelComponent()) is nullptr
Returns
If ON_DimStyle::Cast(model_component_ref.ModelComponent()) is not nullptr, that pointer is returned. Otherwise, none_return_value is returned.

◆ HasOverrides()

bool ON_DimStyle::HasOverrides ( ) const
Returns
false: (default) Every setting identified by a ON_DimStyle::field enum value, except name and id, is inherited from the parent dimension style identified by ParentId(). true: At least one setting identified by a ON_DimStyle::field enum value is is independent of any parent dimension style.

◆ InheritFields()

void ON_DimStyle::InheritFields ( const ON_DimStyle parent)
Parameters
parent[in] If this->IsFieldOverride(field_id) is false, then the dimension style property value corresponding to field_id is copied from parent to "this".

Identical to calling this->OverrideFields(*this,parent).

◆ IsChildDimstyle()

bool ON_DimStyle::IsChildDimstyle ( ) const

Test if this dimstyle is the child of any other dimstyle.

◆ IsChildOf()

bool ON_DimStyle::IsChildOf ( const ON_UUID parent_id) const
Returns
True if parent_id is not nil and parent_id == this->ParentId().

◆ IsFieldOverride()

bool ON_DimStyle::IsFieldOverride ( ON_DimStyle::field  field_id) const
Parameters
field_id[in]
Returns
false: (default) The setting identified by field_id is inherited from the parent dimension style identified by ParentId(). true: The setting identified by field_id is independet of any parent dimension style.

◆ IsOverrideDimStyleCandidate()

bool ON_DimStyle::IsOverrideDimStyleCandidate ( ON_UUID  parent_id,
bool  bRequireSetOverrides,
ON_wString error_description = nullptr 
) const

◆ IsValid()

bool ON_DimStyle::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

virtual

Reimplemented from ON_Object.

◆ LeaderArrowBlockId()

ON_UUID ON_DimStyle::LeaderArrowBlockId ( ) const

◆ LeaderArrowSize()

double ON_DimStyle::LeaderArrowSize ( ) const

Arrow size.

◆ LeaderArrowType()

ON_Arrowhead::arrow_type ON_DimStyle::LeaderArrowType ( ) const

◆ LeaderContentAngleDegrees()

double ON_DimStyle::LeaderContentAngleDegrees ( ) const

◆ LeaderContentAngleRadians()

double ON_DimStyle::LeaderContentAngleRadians ( ) const

◆ LeaderContentAngleStyle()

ON_DimStyle::ContentAngleStyle ON_DimStyle::LeaderContentAngleStyle ( ) const

◆ LeaderCurveType()

ON_DimStyle::leader_curve_type ON_DimStyle::LeaderCurveType ( ) const

◆ LeaderCurveTypeFromUnsigned()

static ON_DimStyle::leader_curve_type ON_DimStyle::LeaderCurveTypeFromUnsigned ( unsigned int  type_as_unsigned)
static

◆ LeaderHasLanding()

bool ON_DimStyle::LeaderHasLanding ( ) const

◆ LeaderLandingLength()

double ON_DimStyle::LeaderLandingLength ( ) const

◆ LeaderTextHorizontalAlignment()

ON::TextHorizontalAlignment ON_DimStyle::LeaderTextHorizontalAlignment ( ) const

◆ LeaderTextOrientation()

ON::TextOrientation ON_DimStyle::LeaderTextOrientation ( ) const

◆ LeaderTextVerticalAlignment()

ON::TextVerticalAlignment ON_DimStyle::LeaderTextVerticalAlignment ( ) const

◆ LengthDisplayFromUnitsAndFormat()

static ON_DimStyle::LengthDisplay ON_DimStyle::LengthDisplayFromUnitsAndFormat ( ON::LengthUnitSystem  units,
ON_DimStyle::OBSOLETE_length_format  lengthformat 
)
static

◆ LengthDisplayFromUnsigned()

static ON_DimStyle::LengthDisplay ON_DimStyle::LengthDisplayFromUnsigned ( unsigned int  length_display_as_unsigned)
static

◆ LengthDisplayIsDecimal()

static bool ON_DimStyle::LengthDisplayIsDecimal ( ON_DimStyle::LengthDisplay  dimension_length_display)
static
Returns
true if length_display selects a decimal format. false if length_display is ON_DimStyle::LengthDisplay::FeetAndInches or ON_DimStyle::LengthDisplay::InchesFractional.

◆ LengthFactor()

double ON_DimStyle::LengthFactor ( ) const

LengthFactor is a rarely used. It applies when a model is being drawn to a scale and the dimension length values should be reverse scaled. For example, if a model is drawn at 1/4 scale, a line 5 units long indicates the real world line is 20 units long. In this case setting LengthFactor to 4 would cause a linear dimension applied to that line to display a value of 20.

◆ LengthFormatFromDistanceDisplayMode()

static ON_DimStyle::OBSOLETE_length_format ON_DimStyle::LengthFormatFromDistanceDisplayMode ( ON::OBSOLETE_DistanceDisplayMode  )
static

convert ON::OBSOLETE_DistanceDisplayMode enum to ON_DimStyle::OBSOLETE_length_format enum

◆ LengthResolution()

int ON_DimStyle::LengthResolution ( ) const

Display resolution for distance measurements.

◆ LengthUnitSystemFromLengthDisplay()

static ON::LengthUnitSystem ON_DimStyle::LengthUnitSystemFromLengthDisplay ( ON_DimStyle::LengthDisplay  dimension_length_display)
static

◆ MaskBorder()

double ON_DimStyle::MaskBorder ( ) const

◆ MaskColor()

ON_Color ON_DimStyle::MaskColor ( ) const

◆ MaskFillType()

ON_TextMask::MaskType ON_DimStyle::MaskFillType ( ) const

Determines where to get the color to draw a Text Mask.

◆ OBSOLETE_LengthFormatFromLengthDisplay() [1/2]

static ON_DimStyle::OBSOLETE_length_format ON_DimStyle::OBSOLETE_LengthFormatFromLengthDisplay ( ON_DimStyle::LengthDisplay  dimension_length_display,
unsigned int  model_serial_number 
)
static
Parameters
dimension_length_display[in]
model_serial_number[in] 0: Ignore model settings >0: dimstyle.ModelSerialNumber()

◆ OBSOLETE_LengthFormatFromLengthDisplay() [2/2]

static ON_DimStyle::OBSOLETE_length_format ON_DimStyle::OBSOLETE_LengthFormatFromLengthDisplay ( ON_DimStyle::LengthDisplay  dimension_length_display,
ON::LengthUnitSystem  model_unit_system 
)
static

◆ OBSOLETE_LengthFormatFromUnsigned()

static ON_DimStyle::OBSOLETE_length_format ON_DimStyle::OBSOLETE_LengthFormatFromUnsigned ( unsigned int  format_as_unsigned)
static

◆ operator=()

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

◆ OverrideFields()

void ON_DimStyle::OverrideFields ( const ON_DimStyle source,
const ON_DimStyle parent 
)

For every dimension style property identified by a field_id ON_DimStyle::field enum, except Name and Index, do the following:

if ( source.IsFieldOverride(field_id) ) copy corresponding value from source to this else copy corresponding value from parent to this

Set this->ParentId() = parent.Id().

Parameters
src[in] It is permitted for src to be this.
parent[in] It is permitted for parent to be this.

◆ OverrideFieldsWithDifferentValues()

void ON_DimStyle::OverrideFieldsWithDifferentValues ( const ON_DimStyle source,
const ON_DimStyle parent 
)

For every dimension style property identified by a field_id ON_DimStyle::field enum, except Name and Index, if source and parent have different values, then set the field overide for that property to true.

Parameters
src[in] It is permitted for src to be this.
parent[in] It is permitted for parent to be this.

◆ ParentContentHash()

const ON_SHA1_Hash& ON_DimStyle::ParentContentHash ( ) const
Returns
The content hash of the parent dimstyle. If there is no parent dimstyle, then ON_SHA1_Hash::EmptyContent is returned.

◆ Prefix()

const ON_wString& ON_DimStyle::Prefix ( ) const

Dimension prefix text.

◆ Read()

bool ON_DimStyle::Read ( ON_BinaryArchive )
overridevirtual

virtual

Reimplemented from ON_Object.

◆ RoundOff()

double ON_DimStyle::RoundOff ( ) const

◆ Scale()

void ON_DimStyle::Scale ( double  scale)

◆ ScaleLeftLength_mm()

double ON_DimStyle::ScaleLeftLength_mm ( ) const

◆ ScaleRightLength_mm()

double ON_DimStyle::ScaleRightLength_mm ( ) const

◆ ScaleValue()

const ON_ScaleValue& ON_DimStyle::ScaleValue ( ) const

◆ SetAlternate()

void ON_DimStyle::SetAlternate ( bool  )

◆ SetAlternateBelow()

void ON_DimStyle::SetAlternateBelow ( bool  below)

◆ SetAlternateDimensionLengthDisplay()

void ON_DimStyle::SetAlternateDimensionLengthDisplay ( ON_DimStyle::LengthDisplay  length_display)

Set alternate dimension length units and format

◆ SetAlternateLengthFactor()

void ON_DimStyle::SetAlternateLengthFactor ( double  )

AlternateLengthFactor is a rarely used. See Length factor for a discription of this property.

◆ SetAlternateLengthResolution()

void ON_DimStyle::SetAlternateLengthResolution ( int  )

◆ SetAlternatePrefix()

void ON_DimStyle::SetAlternatePrefix ( const wchar_t )

◆ SetAlternateRoundOff()

void ON_DimStyle::SetAlternateRoundOff ( double  r)

◆ SetAlternateSuffix()

void ON_DimStyle::SetAlternateSuffix ( const wchar_t )

◆ SetAlternateToleranceResolution()

void ON_DimStyle::SetAlternateToleranceResolution ( int  r)

◆ SetAlternateZeroSuppress()

void ON_DimStyle::SetAlternateZeroSuppress ( ON_DimStyle::suppress_zero  s)

◆ SetAngleFormat()

void ON_DimStyle::SetAngleFormat ( angle_format  format)

◆ SetAngleResolution()

void ON_DimStyle::SetAngleResolution ( int  )

◆ SetAngleRoundOff()

void ON_DimStyle::SetAngleRoundOff ( double  r)

◆ SetAngleZeroSuppress()

void ON_DimStyle::SetAngleZeroSuppress ( ON_DimStyle::suppress_zero  s)

◆ SetArcLengthSymbol()

void ON_DimStyle::SetArcLengthSymbol ( int  m)

◆ SetArrowBlockId1()

void ON_DimStyle::SetArrowBlockId1 ( ON_UUID  id)

◆ SetArrowBlockId2()

void ON_DimStyle::SetArrowBlockId2 ( ON_UUID  id)

◆ SetArrowColor()

void ON_DimStyle::SetArrowColor ( ON_Color  c)

◆ SetArrowColorSource()

void ON_DimStyle::SetArrowColorSource ( const ON::object_color_source  src)

◆ SetArrowPlotColor()

void ON_DimStyle::SetArrowPlotColor ( ON_Color  c)

◆ SetArrowPlotColorSource()

void ON_DimStyle::SetArrowPlotColorSource ( const ON::plot_color_source  src)

◆ SetArrowSize()

void ON_DimStyle::SetArrowSize ( const double  )

◆ SetArrowType1()

void ON_DimStyle::SetArrowType1 ( ON_Arrowhead::arrow_type  )

◆ SetArrowType1And2()

void ON_DimStyle::SetArrowType1And2 ( ON_Arrowhead::arrow_type  )

◆ SetArrowType2()

void ON_DimStyle::SetArrowType2 ( ON_Arrowhead::arrow_type  )

◆ SetBaselineSpacing()

void ON_DimStyle::SetBaselineSpacing ( double  spacing)

◆ SetCenterMark()

void ON_DimStyle::SetCenterMark ( const double  )

◆ SetCenterMarkStyle()

void ON_DimStyle::SetCenterMarkStyle ( ON_DimStyle::centermark_style  style)

◆ SetDimensionLengthDisplay()

void ON_DimStyle::SetDimensionLengthDisplay ( ON_DimStyle::LengthDisplay  length_display)

Alternate dimension length units and format

◆ SetDimensionLineColor()

void ON_DimStyle::SetDimensionLineColor ( ON_Color  c)

◆ SetDimensionLineColorSource()

void ON_DimStyle::SetDimensionLineColorSource ( const ON::object_color_source  src)

◆ SetDimensionLinePlotColor()

void ON_DimStyle::SetDimensionLinePlotColor ( ON_Color  c)

◆ SetDimensionLinePlotColorSource()

void ON_DimStyle::SetDimensionLinePlotColorSource ( const ON::plot_color_source  src)

◆ SetDimensionLinePlotWeight()

void ON_DimStyle::SetDimensionLinePlotWeight ( double  w)

◆ SetDimensionLinePlotWeightSource()

void ON_DimStyle::SetDimensionLinePlotWeightSource ( const ON::plot_weight_source  src)

◆ SetDimExtension()

void ON_DimStyle::SetDimExtension ( const double  e)

◆ SetDimRadialTextAngleStyle()

void ON_DimStyle::SetDimRadialTextAngleStyle ( ON_DimStyle::ContentAngleStyle  style)

◆ SetDimRadialTextLocation()

void ON_DimStyle::SetDimRadialTextLocation ( ON_DimStyle::TextLocation  )

◆ SetDimRadialTextOrientation()

void ON_DimStyle::SetDimRadialTextOrientation ( ON::TextOrientation  )

◆ SetDimScale() [1/3]

void ON_DimStyle::SetDimScale ( ON_ScaleValue  sv)

◆ SetDimScale() [2/3]

void ON_DimStyle::SetDimScale ( double  left_val,
ON::LengthUnitSystem  left_us,
double  right_val,
ON::LengthUnitSystem  right_us 
)

◆ SetDimScale() [3/3]

void ON_DimStyle::SetDimScale ( double  scale)

◆ SetDimScaleSource()

void ON_DimStyle::SetDimScaleSource ( int  source)

◆ SetDimTextAngleStyle()

void ON_DimStyle::SetDimTextAngleStyle ( ON_DimStyle::ContentAngleStyle  style)

◆ SetDimTextLocation()

void ON_DimStyle::SetDimTextLocation ( ON_DimStyle::TextLocation  )

◆ SetDimTextOrientation()

void ON_DimStyle::SetDimTextOrientation ( ON::TextOrientation  )

◆ SetDrawForward()

void ON_DimStyle::SetDrawForward ( bool  drawforward)

◆ SetDrawTextMask()

void ON_DimStyle::SetDrawTextMask ( bool  bDraw)

◆ SetExtensionLineColor()

void ON_DimStyle::SetExtensionLineColor ( ON_Color  c)

◆ SetExtensionLineColorSource()

void ON_DimStyle::SetExtensionLineColorSource ( const ON::object_color_source  src)

◆ SetExtensionLinePlotColor()

void ON_DimStyle::SetExtensionLinePlotColor ( ON_Color  c)

◆ SetExtensionLinePlotColorSource()

void ON_DimStyle::SetExtensionLinePlotColorSource ( const ON::plot_color_source  src)

◆ SetExtensionLinePlotWeight()

void ON_DimStyle::SetExtensionLinePlotWeight ( double  w)

◆ SetExtensionLinePlotWeightSource()

void ON_DimStyle::SetExtensionLinePlotWeightSource ( const ON::plot_weight_source  src)

◆ SetExtExtension()

void ON_DimStyle::SetExtExtension ( const double  )

◆ SetExtOffset()

void ON_DimStyle::SetExtOffset ( const double  )

◆ SetFieldOverride()

void ON_DimStyle::SetFieldOverride ( ON_DimStyle::field  field_id,
bool  bOverrideParent 
)
Parameters
field_id[in]
bOverrideParent[in] false: The setting identified by field_id is inherited from the parent dimension style identified by ParentId(). true: The setting identified by field_id is independent of any parent dimension style.

◆ SetFieldOverrideAll()

void ON_DimStyle::SetFieldOverrideAll ( bool  bOverrideParent)
Parameters
bOverrideParent[in]
trueif a field permits overriding, set it to true.
falseset all field override values to false.

◆ SetFixedExtensionLen()

void ON_DimStyle::SetFixedExtensionLen ( double  l)

◆ SetFixedExtensionLenOn()

void ON_DimStyle::SetFixedExtensionLenOn ( bool  on)

◆ SetFont()

void ON_DimStyle::SetFont ( const class ON_Font font_characteristics)

Set the font used to render text.

Parameters
font_characteristics[in] This parameter does not have to be a managed font.

If the parameter is a managed font (font_characteristics.IsManagedFont() is true), then the identical value is returned by ON_DimStyle.Font(). If the parameter is not a managed font (font_characteristics.IsManagedFont() is false), then the ON_Font::GetManagedFont(font_characteristics) will be returned by ON_DimStyle.Font().

◆ SetLeaderArrowBlockId()

void ON_DimStyle::SetLeaderArrowBlockId ( ON_UUID  id)

◆ SetLeaderArrowSize()

void ON_DimStyle::SetLeaderArrowSize ( const double  )

◆ SetLeaderArrowType()

void ON_DimStyle::SetLeaderArrowType ( ON_Arrowhead::arrow_type  )

◆ SetLeaderContentAngleDegrees()

void ON_DimStyle::SetLeaderContentAngleDegrees ( double  angle_degrees)

◆ SetLeaderContentAngleRadians()

void ON_DimStyle::SetLeaderContentAngleRadians ( double  angle_radians)

◆ SetLeaderContentAngleStyle()

void ON_DimStyle::SetLeaderContentAngleStyle ( ON_DimStyle::ContentAngleStyle  style)

◆ SetLeaderCurveType()

void ON_DimStyle::SetLeaderCurveType ( ON_DimStyle::leader_curve_type  type)

◆ SetLeaderHasLanding()

void ON_DimStyle::SetLeaderHasLanding ( bool  landing)

◆ SetLeaderLandingLength()

void ON_DimStyle::SetLeaderLandingLength ( double  length)

◆ SetLeaderTextHorizontalAlignment()

void ON_DimStyle::SetLeaderTextHorizontalAlignment ( ON::TextHorizontalAlignment  halign)

◆ SetLeaderTextOrientation()

void ON_DimStyle::SetLeaderTextOrientation ( ON::TextOrientation  )

◆ SetLeaderTextVerticalAlignment()

void ON_DimStyle::SetLeaderTextVerticalAlignment ( ON::TextVerticalAlignment  style)

◆ SetLengthFactor()

void ON_DimStyle::SetLengthFactor ( double  )

LengthFactor is a rarely used. It applies when a model is being drawn to a scale and the dimension length values should be reverse scaled. For example, if a model is drawn at 1/4 scale, a line 5 units long indicates the real world line is 20 units long. In this case setting LengthFactor to 4 would cause a linear dimension applied to that line to display a value of 20.

◆ SetLengthResolution()

void ON_DimStyle::SetLengthResolution ( int  )

◆ SetMaskBorder()

void ON_DimStyle::SetMaskBorder ( double  offset)

◆ SetMaskColor()

void ON_DimStyle::SetMaskColor ( ON_Color  color)

Does not return viewport background color.

◆ SetMaskFillType()

void ON_DimStyle::SetMaskFillType ( ON_TextMask::MaskType  source)

◆ SetPrefix()

void ON_DimStyle::SetPrefix ( const wchar_t )

◆ SetRoundOff()

void ON_DimStyle::SetRoundOff ( double  r)

◆ SetSignedOrdinate()

void ON_DimStyle::SetSignedOrdinate ( bool  allowsigned)

◆ SetSourceDimstyle()

void ON_DimStyle::SetSourceDimstyle ( ON_UUID  source_uuid)

◆ SetStackFractionFormat()

void ON_DimStyle::SetStackFractionFormat ( ON_DimStyle::stack_format  f)

◆ SetStackHeightScale()

void ON_DimStyle::SetStackHeightScale ( double  f)

◆ SetSuffix()

void ON_DimStyle::SetSuffix ( const wchar_t )

◆ SetSuppressArrow1()

void ON_DimStyle::SetSuppressArrow1 ( bool  s)

◆ SetSuppressArrow2()

void ON_DimStyle::SetSuppressArrow2 ( bool  s)

◆ SetSuppressExtension1()

void ON_DimStyle::SetSuppressExtension1 ( bool  )

◆ SetSuppressExtension2()

void ON_DimStyle::SetSuppressExtension2 ( bool  )

◆ SetTextColor()

void ON_DimStyle::SetTextColor ( ON_Color  c)

◆ SetTextColorSource()

void ON_DimStyle::SetTextColorSource ( const ON::object_color_source  src)

◆ SetTextGap()

void ON_DimStyle::SetTextGap ( double  gap)

◆ SetTextHeight()

void ON_DimStyle::SetTextHeight ( double  height)

◆ SetTextHorizontalAlignment()

void ON_DimStyle::SetTextHorizontalAlignment ( ON::TextHorizontalAlignment  halign)

◆ SetTextMask()

void ON_DimStyle::SetTextMask ( const ON_TextMask text_mask)

◆ SetTextMoveLeader()

void ON_DimStyle::SetTextMoveLeader ( int  m)

◆ SetTextOrientation()

void ON_DimStyle::SetTextOrientation ( ON::TextOrientation  )

◆ SetTextPlotColor()

void ON_DimStyle::SetTextPlotColor ( ON_Color  c)

◆ SetTextPlotColorSource()

void ON_DimStyle::SetTextPlotColorSource ( const ON::object_color_source  src)

◆ SetTextRotation()

void ON_DimStyle::SetTextRotation ( double  r)

◆ SetTextUnderlined()

void ON_DimStyle::SetTextUnderlined ( bool  underlined)

◆ SetTextVerticalAlignment()

void ON_DimStyle::SetTextVerticalAlignment ( ON::TextVerticalAlignment  style)

◆ SetToleranceFormat()

void ON_DimStyle::SetToleranceFormat ( ON_DimStyle::tolerance_format  format)

◆ SetToleranceHeightScale()

void ON_DimStyle::SetToleranceHeightScale ( double  scale)

◆ SetToleranceLowerValue()

void ON_DimStyle::SetToleranceLowerValue ( double  lower_value)

◆ SetToleranceResolution()

void ON_DimStyle::SetToleranceResolution ( int  resolution)

◆ SetToleranceUpperValue()

void ON_DimStyle::SetToleranceUpperValue ( double  upper_value)

◆ SetToleranceZeroSuppress()

void ON_DimStyle::SetToleranceZeroSuppress ( ON_DimStyle::suppress_zero  s)

◆ SetUnitSystem()

void ON_DimStyle::SetUnitSystem ( ON::LengthUnitSystem  us)

Unit system for dimension rendering sizes like TextHeight, TextGap, ArrowSize, ExtOffset, and dozens of other properties that control the appearance and placement of the components used to render a dimension.

◆ SetUnitSystemFromContext()

void ON_DimStyle::SetUnitSystemFromContext ( bool  bUseName,
ON::LengthUnitSystem  source_unit_system,
ON::LengthUnitSystem  destination_unit_system 
)

When a dimension style unit system is not set, this function examines the context the dimension style is being used in and sets the unit system.

Parameters
bUseName[in] Consider the name when assinging a unit system. For example, a dimension style name "Millimters Small" would be assinged a unit system of millimeters.
source_unit_system[in] unit system in the model or file where the dimension style originated.
destination_unit_system[in] unit system in the model or file where the dimension style will be used.

◆ SetZeroSuppress()

void ON_DimStyle::SetZeroSuppress ( ON_DimStyle::suppress_zero  s)

◆ SignedOrdinate()

bool ON_DimStyle::SignedOrdinate ( ) const

◆ SourceDimstyle()

ON_UUID ON_DimStyle::SourceDimstyle ( ) const

◆ StackFormatFromUnsigned()

static ON_DimStyle::stack_format ON_DimStyle::StackFormatFromUnsigned ( unsigned int  format_as_unsigned)
static

◆ StackFractionFormat()

ON_DimStyle::stack_format ON_DimStyle::StackFractionFormat ( ) const

◆ StackHeightScale()

double ON_DimStyle::StackHeightScale ( ) const

◆ Suffix()

const ON_wString& ON_DimStyle::Suffix ( ) const

Dimension suffix text.

◆ SuppressArrow1()

bool ON_DimStyle::SuppressArrow1 ( ) const

◆ SuppressArrow2()

bool ON_DimStyle::SuppressArrow2 ( ) const

◆ SuppressExtension1()

bool ON_DimStyle::SuppressExtension1 ( ) const

Suppress first dimension extension line.

◆ SuppressExtension2()

bool ON_DimStyle::SuppressExtension2 ( ) const

Suppress second dimension extension line.

◆ SystemDimstyleFromContentHash()

static const ON_DimStyle& ON_DimStyle::SystemDimstyleFromContentHash ( const ON_SHA1_Hash content_hash)
static
Parameters
name_hash[in]
Returns
If the id is not nil and identifies one of the above system dimstyles, that dimstyle is returned. Otherwise, ON_DimStyle::Unset is returned.

◆ SystemDimstyleFromId()

static const ON_DimStyle& ON_DimStyle::SystemDimstyleFromId ( ON_UUID  id)
static
Parameters
id[in]
Returns
If the id is not nil and identifies one of the above system dimstyles, that dimstyle is returned. Otherwise, ON_DimStyle::Unset is returned.

◆ SystemDimstyleFromIndex()

static const ON_DimStyle& ON_DimStyle::SystemDimstyleFromIndex ( int  index)
static
Parameters
index[in]
Returns
If the id is not nil and identifies one of the above system dimstyles, that dimstyle is returned. Otherwise, ON_DimStyle::Unset is returned.

◆ SystemDimstyleFromName()

static const ON_DimStyle& ON_DimStyle::SystemDimstyleFromName ( const ON_NameHash name_hash)
static
Parameters
name_hash[in]
Returns
If the id is not nil and identifies one of the above system dimstyles, that dimstyle is returned. Otherwise, ON_DimStyle::Unset is returned.

◆ TextColor()

ON_Color ON_DimStyle::TextColor ( ) const

◆ TextColorSource()

ON::object_color_source ON_DimStyle::TextColorSource ( ) const

◆ TextGap()

double ON_DimStyle::TextGap ( ) const

Distance from dimension lines to text.

◆ TextHeight()

double ON_DimStyle::TextHeight ( ) const

Height of dimension text.

◆ TextHorizontalAlignment()

ON::TextHorizontalAlignment ON_DimStyle::TextHorizontalAlignment ( ) const

◆ TextLocationFromUnsigned()

static ON_DimStyle::TextLocation ON_DimStyle::TextLocationFromUnsigned ( unsigned int  dim_text_location_as_unsigned)
static

◆ TextMask()

const ON_TextMask& ON_DimStyle::TextMask ( ) const

◆ TextMoveLeader()

int ON_DimStyle::TextMoveLeader ( ) const

◆ TextOrientation()

ON::TextOrientation ON_DimStyle::TextOrientation ( ) const

◆ TextPlotColor()

ON_Color ON_DimStyle::TextPlotColor ( ) const

◆ TextPlotColorSource()

ON::object_color_source ON_DimStyle::TextPlotColorSource ( ) const

◆ TextPositionPropertiesHash()

const class ON_SHA1_Hash ON_DimStyle::TextPositionPropertiesHash ( ) const

Two dimension styles have identical text orientation, glyph content, and size parameters if and only if the have identical values of TextPositionPropertiesHash().

Returns
A SHA-1 hash of the information that controls text position and size.

Independent of id, parent id, name, and index.

◆ TextRotation()

double ON_DimStyle::TextRotation ( ) const

◆ TextUnderlined()

bool ON_DimStyle::TextUnderlined ( ) const

◆ TextVerticalAlignment()

ON::TextVerticalAlignment ON_DimStyle::TextVerticalAlignment ( ) const

◆ ToleranceFormat()

tolerance_format ON_DimStyle::ToleranceFormat ( ) const

◆ ToleranceFormatFromUnsigned()

static ON_DimStyle::tolerance_format ON_DimStyle::ToleranceFormatFromUnsigned ( unsigned int  format_as_unsigned)
static

◆ ToleranceHeightScale()

double ON_DimStyle::ToleranceHeightScale ( ) const

◆ ToleranceLowerValue()

double ON_DimStyle::ToleranceLowerValue ( ) const

◆ ToleranceResolution()

int ON_DimStyle::ToleranceResolution ( ) const

◆ ToleranceUpperValue()

double ON_DimStyle::ToleranceUpperValue ( ) const

◆ ToleranceZeroSuppress()

ON_DimStyle::suppress_zero ON_DimStyle::ToleranceZeroSuppress ( ) const

◆ UnitSystem()

ON::LengthUnitSystem ON_DimStyle::UnitSystem ( ) const

Unit system for dimension rendering sizes like TextHeight, TextGap, ArrowSize, ExtOffset, and dozens of other properties that control the appearance and placement of the components used to render a dimension.

◆ UnitSystemIsSet()

bool ON_DimStyle::UnitSystemIsSet ( ) const
Returns
true if the unit system is set to an explicit valid length unit.

◆ V5AngleFormat()

static int ON_DimStyle::V5AngleFormat ( ON_DimStyle::angle_format  v6format)
static

◆ V5ArrowType()

static int ON_DimStyle::V5ArrowType ( ON_Arrowhead::arrow_type  v6type)
static

For converting to and from V5 Dimstyles.

◆ V5LengthFormat()

static int ON_DimStyle::V5LengthFormat ( ON_DimStyle::OBSOLETE_length_format  v6format)
static

◆ V5MaskColorSourceFromV6MaskType()

static int ON_DimStyle::V5MaskColorSourceFromV6MaskType ( ON_TextMask::MaskType  mask_type)
static

◆ V5ToleranceFormat()

static int ON_DimStyle::V5ToleranceFormat ( ON_DimStyle::tolerance_format  v6format)
static

◆ V6AngleFormat()

static ON_DimStyle::angle_format ON_DimStyle::V6AngleFormat ( int  v5format)
static

◆ V6ArrowType()

static ON_Arrowhead::arrow_type ON_DimStyle::V6ArrowType ( int  v5type)
static

◆ V6LengthFormat()

static ON_DimStyle::OBSOLETE_length_format ON_DimStyle::V6LengthFormat ( int  v5format)
static

◆ V6MaskTypeFromV5MaskColorSource()

static ON_TextMask::MaskType ON_DimStyle::V6MaskTypeFromV5MaskColorSource ( int  v5_mask_color_source)
static

◆ V6ToleranceFormat()

static ON_DimStyle::tolerance_format ON_DimStyle::V6ToleranceFormat ( int  v5format)
static

◆ Write()

bool ON_DimStyle::Write ( ON_BinaryArchive ) const
overridevirtual

virtual

Reimplemented from ON_Object.

◆ ZeroSuppress()

ON_DimStyle::suppress_zero ON_DimStyle::ZeroSuppress ( ) const

◆ ZeroSuppressFromUnsigned()

static ON_DimStyle::suppress_zero ON_DimStyle::ZeroSuppressFromUnsigned ( unsigned int  suppress_ero_as_unsigned)
static

◆ ZeroSuppressMatchesLengthDisplay()

static bool ON_DimStyle::ZeroSuppressMatchesLengthDisplay ( ON_DimStyle::suppress_zero  zero_suppress,
ON_DimStyle::LengthDisplay  length_display 
)
static

The valid choices for ON_DimStyle::suppress_zero depend on the dimension length display.

Parameters
zero_suppress[in]
length_display[in]
Returns
True if zero_suppression is a valid setting when DimensionLengthDiplay = dimension_length_display

LengthDisplay: Inch fractional – No zero suppression matches LengthDisplay : FeetAndInches – Zero suppress can be None, Suppress zero feet, Suppress zero inches or Suppress zero feet and zero inches. LengthDisplay : ModelUnits or any Decimal mode – Zero suppress can be None, Suppress leading, Suppress trailing or Suppress leading and trailing.

Friends And Related Function Documentation

◆ ON_V5x_DimStyle

friend class ON_V5x_DimStyle
friend

Member Data Documentation

◆ Default

const ON_DimStyle ON_DimStyle::Default
static

◆ DefaultFootInchArchitecture

const ON_DimStyle ON_DimStyle::DefaultFootInchArchitecture
static

◆ DefaultInchDecimal

const ON_DimStyle ON_DimStyle::DefaultInchDecimal
static

◆ DefaultInchFractional

const ON_DimStyle ON_DimStyle::DefaultInchFractional
static

◆ DefaultMillimeterArchitecture

const ON_DimStyle ON_DimStyle::DefaultMillimeterArchitecture
static

◆ DefaultMillimeterLarge

const ON_DimStyle ON_DimStyle::DefaultMillimeterLarge
static

◆ DefaultMillimeterSmall

const ON_DimStyle ON_DimStyle::DefaultMillimeterSmall
static

◆ Unset

const ON_DimStyle ON_DimStyle::Unset
static

Predefined default dimension styles always available.