17 #if !defined(OPENNURBS_DIMENSION_INC_) 18 #define OPENNURBS_DIMENSION_INC_ 20 #if defined(ON_DLL_TEMPLATE) 29 #pragma region RH_C_SHARED_ENUM [ON_Dimension::ForceArrow] [Rhino.Geometry.Dimension.ForceArrow] [nested:int] 45 unsigned int force_arrow_as_unsigned);
47 #pragma region RH_C_SHARED_ENUM [ON_Dimension::ForceText] [Rhino.Geometry.Dimension.ForceText] [nested:int] 65 unsigned int force_text_as_unsigned);
76 void Internal_Destroy();
80 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
83 virtual bool UseDefaultTextPoint()
const;
84 virtual void SetUseDefaultTextPoint(
bool usedefault);
88 void Set2dTextPoint(
const ON_2dPoint& textpoint);
90 const wchar_t* UserText()
const;
91 void SetUserText(
const wchar_t* text);
92 const wchar_t* PlainUserText()
const;
95 virtual double Measurement()
const = 0;
98 double TextRotation()
const;
99 void SetTextRotation(
double rotation_radians);
101 bool ArrowIsFlipped(
int i)
const;
102 void FlipArrow(
int i,
bool flip)
const;
107 ON_UUID DetailMeasured()
const;
108 void SetDetailMeasured(
ON_UUID uuid);
115 double DistanceScale()
const;
116 void SetDistanceScale(
double distance_scale)
const;
126 virtual bool GetTextRect(
ON_3dPoint text_rect[4])
const;
129 virtual bool UpdateDimensionText(
130 ON::LengthUnitSystem units_in,
136 ON::LengthUnitSystem units_in,
138 bool expandanglebrackets
141 virtual bool GetDistanceDisplayText(
142 ON::LengthUnitSystem units_in,
146 static bool GetCentermarkDisplay(
157 static bool GetCentermarkSnapPoints(
171 void SetForceTextPosition(
ForceText force);
175 double m_text_rotation = 0.0;
178 bool m_use_default_text_point =
true;
181 mutable bool m_flip_arrow_1 =
false;
182 mutable bool m_flip_arrow_2 =
false;
183 mutable bool m_text_outside =
false;
191 mutable double m_distance_scale = 1.0;
193 bool Internal_WriteDimension(
197 bool Internal_ReadDimension(
228 const class ON_OBSOLETE_V5_DimLinear& V5_linear_dimension,
242 static bool IsValidLinearDimensionType(
243 ON::AnnotationType annotation_type
253 bool SetLinearDimensionType(
254 ON::AnnotationType linear_dimension_type
265 bool Transform(
const ON_Xform& xform)
override;
268 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
270 bool GetAnnotationBoundingBox(
288 ON::AnnotationType dim_type,
295 double rotation_in_plane = 0.0
359 double Measurement()
const override;
388 bool GetDisplayLines(
431 static bool IsValidAngularDimensionType(
432 ON::AnnotationType annotation_type
442 bool SetAngularDimensionType(
443 ON::AnnotationType angular_dimension_type
447 const class ON_OBSOLETE_V5_DimAngular& V5_dim_angle,
460 bool Transform(
const ON_Xform& xform)
override;
463 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
465 bool GetAnnotationBoundingBox(
545 bool bSetExtensionPoints
569 bool AdjustFromPoints(
577 bool AdjustFromPoints(
586 static bool FindAngleVertex(
593 bool UpdateDimensionText(
const ON_DimStyle* dimstyle)
const;
598 double Measurement()
const override;
600 bool GetAngles(
double* start_ang,
double* end_ang,
double* mid_ang)
const;
601 double Radius()
const;
615 void SetUserTextPoint(
const ON_3dPoint& point);
643 bool GetDisplayLines(
662 bool UpdateDimensionText(
663 ON::LengthUnitSystem units_in,
666 bool GetDistanceDisplayText(
667 ON::LengthUnitSystem units_in,
675 double m_ext_offset_1 = 0.0;
676 double m_ext_offset_2 = 0.0;
709 const class ON_OBSOLETE_V5_DimRadial& V5_radial_dimension,
722 static bool IsValidRadialDimensionType(
723 ON::AnnotationType annotation_type
733 bool SetRadialDimensionType(
734 ON::AnnotationType radial_dimension_type
745 bool Transform(
const ON_Xform& xform)
override;
748 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
750 bool GetAnnotationBoundingBox(
768 ON::AnnotationType type,
776 bool AdjustFromPoints(
783 double Measurement()
const override;
805 bool GetDisplayLines(
853 #pragma region RH_C_SHARED_ENUM [ON_DimOrdinate::MeasuredDirection] [Rhino.Geometry.OrdinateDimension.MeasuredDirection] [nested:byte] 869 unsigned int measured_direction_as_unsigned
873 const class ON_OBSOLETE_V5_DimOrdinate& V5_dim_ordinate,
886 bool Transform(
const ON_Xform& xform)
override;
889 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
891 bool GetAnnotationBoundingBox(
919 bool AdjustFromPoints(
933 double KinkOffset1()
const;
934 double KinkOffset2()
const;
938 void SetKinkOffset1(
double d);
939 void SetKinkOffset2(
double d);
948 ON_3dPoint Get3dKinkPt1(
double default_kink_offset = 1.0)
const;
949 ON_3dPoint Get3dKinkPt2(
double default_kink_offset = 1.0)
const;
957 double default_kink_offset = 1.0)
const;
959 bool GetDisplayLines(
971 double default_kink_offset,
980 MeasuredDirection GetMeasuredDirection()
const;
981 void SetMeasuredDirection(MeasuredDirection direction);
983 double Measurement()
const override;
989 MeasuredDirection m_direction = MeasuredDirection::Unset;
994 double m_kink_offset_1 = ON_UNSET_VALUE;
995 double m_kink_offset_2 = ON_UNSET_VALUE;
1021 bool Transform(
const ON_Xform& xform)
override;
1031 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1033 bool GetAnnotationBoundingBox(
1049 bool AdjustFromPoints(
1054 double Measurement()
const override;
1060 bool GetDisplayLines(
1065 int maxlines)
const;
1067 double Radius()
const;
1068 void SetRadius(
double radius);
1071 double m_radius = 0.0;
Definition: opennurbs_annotationbase.h:23
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
Definition: opennurbs_dimension.h:401
Definition: opennurbs_dimension.h:978
centermark_style
Style for drawing centermark for Radial dimensions and Centermark objects
Definition: opennurbs_dimensionstyle.h:996
An ON_Arc is a subcurve of 3d circle.
Definition: opennurbs_arc.h:33
MeasuredDirection
Ordinate dimension measures x or y direction
Definition: opennurbs_dimension.h:834
Definition: opennurbs_dimension.h:202
Definition: opennurbs_string.h:2020
Definition: opennurbs_dimensionstyle.h:218
Context for an annotation object. This context is required when converting current annotation objects...
Definition: opennurbs_archive.h:1592
ForceArrow
Arrowheads forced Inside, or Outside of extension lines, or moved to fit.
Definition: opennurbs_dimension.h:33
Definition: opennurbs_point.h:277
Definition: opennurbs_text.h:28
ON_wString m_plain_user_text
Definition: opennurbs_dimension.h:176
static const ON_2dVector YAxis
Definition: opennurbs_point.h:854
Definition: opennurbs_dimension.h:665
static const ON_2dVector XAxis
Definition: opennurbs_point.h:853
Definition: opennurbs_dimension.h:24
static const ON_DimLinear Empty
Definition: opennurbs_dimension.h:212
Definition: opennurbs_dimension.h:818
Definition: opennurbs_line.h:20
static const ON_2dPoint UnsetPoint
Definition: opennurbs_point.h:291
Definition: opennurbs_array.h:409
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_viewport.h:31
Definition: opennurbs_point.h:460
Definition: opennurbs_plane.h:20
ForceText
Text forced Inside, Right or Left of extension lines, or moved to fit (Auto).
Definition: opennurbs_dimension.h:51
Definition: opennurbs_point.h:839
Definition: opennurbs_point.h:1152