LibreCAD
|
#include <dimlinear.h>
Public Member Functions | |
DimLinear (geo::Coordinate const &definitionPoint, geo::Coordinate const &middleOfText, TextConst::AttachmentPoint const &attachmentPoint, double textAngle, double const lineSpacingFactor, TextConst::LineSpacingStyle const &lineSpacingStyle, std::string const &explicitValue, geo::Coordinate const &definitionPoint2, geo::Coordinate const &definitionPoint3, const double angle, const double oblique, const Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr) | |
DimLinear, DimLinear constructor with metatypes. More... | |
DimLinear (const DimLinear_CSPtr other, bool sameID=false) | |
virtual CADEntity_CSPtr | move (const geo::Coordinate &offset) const override |
move, moves by an offset More... | |
virtual CADEntity_CSPtr | copy (const geo::Coordinate &offset) const override |
copy, copies by an offset More... | |
virtual CADEntity_CSPtr | rotate (const geo::Coordinate &rotation_center, const double rotation_angle) const override |
rotate, rotate operation More... | |
virtual CADEntity_CSPtr | scale (const geo::Coordinate &scale_center, const geo::Coordinate &scale_factor) const override |
scale, scales the entity More... | |
virtual CADEntity_CSPtr | mirror (const geo::Coordinate &axis1, const geo::Coordinate &axis2) const override |
virtual const geo::Area | boundingBox () const override |
boundingBox of the entity More... | |
virtual CADEntity_CSPtr | modify (Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo, Block_CSPtr block) const override |
modify Return a new entity with the same ID bit with possible modified metainfo and/pr layer information #return new entity with same ID More... | |
double | oblique () const |
double | angle () const |
const geo::Coordinate & | definitionPoint2 () const noexcept |
const geo::Coordinate & | definitionPoint3 () const noexcept |
virtual void | accept (GeoEntityVisitor &v) const override |
virtual void | dispatch (EntityDispatch &ed) const override |
virtual std::map< unsigned int, lc::geo::Coordinate > | dragPoints () const override |
Get all points of the entity that can be dragged. More... | |
virtual CADEntity_CSPtr | setDragPoints (std::map< unsigned int, lc::geo::Coordinate > dragPoints) const override |
Return modified entity. More... | |
![]() | |
CADEntity () | |
CADEntity (Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr) | |
CADEntity Constructor. More... | |
CADEntity (CADEntity_CSPtr cadEntity, bool sameID) | |
CADEntity (CADEntity_CSPtr cadEntity) | |
virtual | ~CADEntity ()=default |
Layer_CSPtr | layer () const |
layer return the layer this entity is placed on More... | |
template<typename T > | |
const std::shared_ptr< const T > | metaInfo (std::string metaName) const |
MetaInfo_CSPtr | metaInfo () const |
Block_CSPtr | block () const |
Return the current entity block. More... | |
![]() | |
ID () | |
Default constructor, provides a new unique ID to each entity. More... | |
ID (ID_DATATYPE) | |
virtual | ~ID ()=default |
ID_DATATYPE | id () const |
returns the ID of the entity More... | |
bool | operator== (const ID &id) const |
void | setID (ID_DATATYPE id) |
![]() | |
virtual | ~Visitable ()=default |
![]() | |
Dimension (geo::Coordinate const &definitionPoint, geo::Coordinate const &middleOfText, TextConst::AttachmentPoint const &attachmentPoint, double const textAngle, double lineSpacingFactor, TextConst::LineSpacingStyle const &lineSpacingStyle, std::string const &explicitValue) | |
Dimension. More... | |
Dimension (geo::Coordinate const &_definitionPoint, geo::Coordinate const &_middleOfText, TextConst::AttachmentPoint _attachPt, double _angle) | |
Dimension. More... | |
Dimension (Dimension const &other) | |
const geo::Coordinate & | definitionPoint () const noexcept |
move, moves by an offset More... | |
const geo::Coordinate & | middleOfText () const noexcept |
TextConst::AttachmentPoint const & | attachmentPoint () const |
double | textAngle () const |
double | lineSpacingFactor () const |
TextConst::LineSpacingStyle | lineSpacingStyle () const |
std::string | explicitValue () const |
Static Public Member Functions | |
static DimLinear_SPtr | dimAuto (geo::Coordinate const &p1, geo::Coordinate const &p2, geo::Coordinate const &middleOfText, std::string const &explicitValue, const Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr) |
Protected Attributes | |
const double | _angle |
const double | _oblique |
const geo::Coordinate | _definitionPoint2 |
const geo::Coordinate | _definitionPoint3 |
Additional Inherited Members | |
![]() | |
static std::atomic< ID_DATATYPE > | __idCounter |
![]() | |
CADEntity (const lc::builder::CADEntityBuilder &builder) | |
Definition at line 15 of file dimlinear.h.
DimLinear::DimLinear | ( | geo::Coordinate const & | definitionPoint, |
geo::Coordinate const & | middleOfText, | ||
TextConst::AttachmentPoint const & | attachmentPoint, | ||
double | textAngle, | ||
double const | lineSpacingFactor, | ||
TextConst::LineSpacingStyle const & | lineSpacingStyle, | ||
std::string const & | explicitValue, | ||
geo::Coordinate const & | definitionPoint2, | ||
geo::Coordinate const & | definitionPoint3, | ||
const double | angle, | ||
const double | oblique, | ||
const Layer_CSPtr | layer, | ||
const MetaInfo_CSPtr | metaInfo = nullptr , |
||
const Block_CSPtr | block = nullptr |
||
) |
DimLinear, DimLinear constructor with metatypes.
Dimension | dimension |
geo::Coordinate | extension_point1 |
geo::Coordinate | extension_point2 |
double | oblique |
Layer_CSPtr | layer |
Definition at line 6 of file dimlinear.cpp.
DimLinear::DimLinear | ( | const DimLinear_CSPtr | other, |
bool | sameID = false |
||
) |
Definition at line 30 of file dimlinear.cpp.
|
inlineoverridevirtual |
Reimplemented from lc::entity::CADEntity.
Definition at line 120 of file dimlinear.h.
double DimLinear::angle | ( | ) | const |
Definition at line 114 of file dimlinear.cpp.
|
overridevirtual |
boundingBox of the entity
Implements lc::entity::CADEntity.
Definition at line 88 of file dimlinear.cpp.
|
overridevirtual |
copy, copies by an offset
geo::Coordinate | offset |
Implements lc::entity::CADEntity.
Definition at line 71 of file dimlinear.cpp.
|
noexcept |
Definition at line 121 of file dimlinear.cpp.
|
noexcept |
Definition at line 124 of file dimlinear.cpp.
|
static |
Convenient function
Definition at line 39 of file dimlinear.cpp.
|
inlineoverridevirtual |
Implements lc::entity::CADEntity.
Definition at line 122 of file dimlinear.h.
|
overridevirtual |
Get all points of the entity that can be dragged.
Implements lc::Draggable.
Definition at line 128 of file dimlinear.cpp.
|
inlineoverridevirtual |
Implements lc::entity::CADEntity.
Definition at line 90 of file dimlinear.h.
|
overridevirtual |
modify Return a new entity with the same ID bit with possible modified metainfo and/pr layer information #return new entity with same ID
Implements lc::entity::CADEntity.
Definition at line 93 of file dimlinear.cpp.
|
overridevirtual |
move, moves by an offset
geo::Coordinate | offset |
Implements lc::entity::CADEntity.
Definition at line 65 of file dimlinear.cpp.
double DimLinear::oblique | ( | ) | const |
Definition at line 117 of file dimlinear.cpp.
|
overridevirtual |
rotate, rotate operation
geo::Coordinate | rotation_center |
double | rotation_angle |
Implements lc::entity::CADEntity.
Definition at line 76 of file dimlinear.cpp.
|
overridevirtual |
scale, scales the entity
geo::Coordinate | scale_center |
double | scale_factor |
Implements lc::entity::CADEntity.
Definition at line 82 of file dimlinear.cpp.
|
overridevirtual |
Return modified entity.
dragPoints | Modified points |
Implements lc::Draggable.
Definition at line 140 of file dimlinear.cpp.
|
protected |
Definition at line 115 of file dimlinear.h.
|
protected |
Definition at line 117 of file dimlinear.h.
|
protected |
Definition at line 118 of file dimlinear.h.
|
protected |
Definition at line 116 of file dimlinear.h.