Hide menu
Loading...
Searching...
No Matches
cadex::Drawing::LinearDimension Class Reference

Linear dimensions with horizontal, vertical, and aligned dimension lines. More...

#include <cadex/Drawing/Dimension.hxx>

Inheritance diagram for cadex::Drawing::LinearDimension:
cadex::Drawing::Dimension cadex::Drawing::Element cadex::BaseObject

Public Types

enum class  RotationType { Horizontal , Vertical , Aligned }
 
- Public Types inherited from cadex::Drawing::Dimension
enum class  ArrowType {
  Undefined = 0 , ClosedFilled = 1 , ClosedBlank = 2 , Closed = 3 ,
  Dot = 4 , ArchitecturalTick = 5 , Oblique = 6 , Open = 7 ,
  OriginIndicator = 8 , OriginIndicator2 = 9 , RightAngle = 10 , Open30 = 11 ,
  DotSmall = 12 , DotBlank = 13 , DotSmallBlank = 14 , Box = 15 ,
  BoxFilled = 16 , DatumTriangle = 17 , DatumTriangleFilled = 18 , Integral = 19
}
 the arrow type. More...
 
enum class  ArrowheadPlacementType { Internal , External }
 
- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 

Public Member Functions

 LinearDimension ()
 Constructor.
 
 LinearDimension (const Geom::Point2d &theFirstReferencePoint, const Geom::Point2d &theSecondReferencePoint, const Geom::Point2d &theDimensionLinePoint, double theMeasurementValue, RotationType theRotation=RotationType::Horizontal)
 Constructor.
 
const Geom::Point2dFirstReferencePoint () const
 Returns the first reference point.
 
void SetFirstReferencePoint (const Geom::Point2d &theFirstReferencePoint)
 Sets the first reference point.
 
const Geom::Point2dSecondReferencePoint () const
 Returns the second reference point.
 
void SetSecondReferencePoint (const Geom::Point2d &theSecondReferencePoint)
 Sets the second reference point.
 
const Geom::Point2dDimensionLinePoint () const
 Returns the dimension line point.
 
void SetDimensionLinePoint (const Geom::Point2d &theDimensionLinePoint)
 Sets the dimension line point.
 
RotationType Rotation () const
 Returns the rotation of the dimension.
 
void SetRotation (RotationType theRotation)
 Sets the rotation of the dimension.
 
- Public Member Functions inherited from cadex::Drawing::Dimension
ArrowType FirstArrowType () const
 Returns type of the first arrow of dimension.
 
void SetFirstArrowType (ArrowType theFirstArrowType)
 Sets type of the first arrow of dimension.
 
ArrowType SecondArrowType () const
 Returns type of the second arrow of dimension.
 
void SetSecondArrowType (ArrowType theSecondArrowType)
 Sets type of the second arrow of dimension.
 
ArrowheadPlacementType ArrowheadPlacement () const
 Returns the arrowhead placement.
 
void SetArrowheadPlacement (ArrowheadPlacementType theArrowheadPlacement)
 Sets the arrowhead placement.
 
bool AlignTextHorizontally () const
 Returns true if the measurement text is align horizontally.
 
void SetAlignTextHorizontally (bool theAlignTextHorizontally)
 
double MeasurementValue () const
 Returns the actual measurement.
 
void SetMeasurementValue (double theMeasurementValue)
 Sets the actual measurement.
 
cadex::Drawing::Text Text () const
 Returns the dimension text.
 
void SetText (const cadex::Drawing::Text &theText)
 Sets the dimension text.
 
- Public Member Functions inherited from cadex::Drawing::Element
void SetUuid (const Uuid &theUuid)
 
cadex::Uuid Uuid () const
 
void Accept (ElementVisitor &theVisitor) const
 
- Public Member Functions inherited from cadex::BaseObject
size_t Id () const
 Return unique identifier of public object.
 
internal::BaseObjectImpl * Impl () const
 
bool IsNull () const
 
 operator bool () const
 
template<typename T >
bool IsOfType () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static bool CompareType (const BaseObject &theObject)
 
- Static Public Member Functions inherited from cadex::Drawing::Dimension
static bool CompareType (const BaseObject &theObject)
 
- Static Public Member Functions inherited from cadex::Drawing::Element
static bool CompareType (const BaseObject &theObject)
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::Drawing::Dimension
 Dimension (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::Drawing::Element
 Element (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Detailed Description

Linear dimensions with horizontal, vertical, and aligned dimension lines.

Horizontal linear dimension describes the distance between two points along OX axis.

Example of horizontal linear dimension

Vertical linear dimension describes the distance between two points along OY axis.

Example of vertical linear dimension

Aligned linear dimension describes the distance between two points.

Example of aligned linear dimension

FirstReferencePoint and SecondReferencePoint refer to points on the drawing geometry that are being measured. Two parallel extension lines come out of these points. DimensionLinePoint defines the dimension line, which is perpendicular to both extension lines.

Member Enumeration Documentation

◆ RotationType

Represents the rotation of linear dimension.

Member Function Documentation

◆ DimensionLinePoint()

const Geom::Point2d & cadex::Drawing::LinearDimension::DimensionLinePoint ( ) const

Returns the dimension line point.

Dimension line point specified the position of dimension line. It can be any point on the dimension line.

◆ Rotation()

LinearDimension::RotationType cadex::Drawing::LinearDimension::Rotation ( ) const

Returns the rotation of the dimension.

Rotation determines the type of linear dimention.