4 using namespace entity;
10 double const lineSpacingFactor,
12 std::string
const& explicitValue,
15 const Layer_CSPtr layer,
16 const MetaInfo_CSPtr metaInfo,
17 const Block_CSPtr block) :
19 Dimension(definitionPoint, middleOfText, attachmentPoint, angle, lineSpacingFactor, lineSpacingStyle, explicitValue),
21 _definitionPoint2(definitionPoint2) {
27 double const lineSpacingFactor,
29 std::string
const& explicitValue,
32 const Layer_CSPtr layer,
33 const MetaInfo_CSPtr metaInfo,
34 const Block_CSPtr block):
36 Dimension(definitionPoint, definitionPoint.mid(definitionPoint2), attachmentPoint, 0., lineSpacingFactor, lineSpacingStyle, explicitValue),
38 _definitionPoint2(definitionPoint2) {
46 auto newDimRadial = std::make_shared<DimRadial>(this->
definitionPoint() + offset, this->
middleOfText() + offset, this->
attachmentPoint(), this->
textAngle(), this->
lineSpacingFactor(), this->
lineSpacingStyle(), this->
explicitValue(), this->
_definitionPoint2 + offset, this->
_leader, this->
layer(), this->
metaInfo());
47 newDimRadial->setID(this->
id());
52 auto newDimRadial = std::make_shared<DimRadial>(this->
definitionPoint() + offset, this->
middleOfText() + offset, this->
attachmentPoint(), this->
textAngle(), this->
lineSpacingFactor(), this->
lineSpacingStyle(), this->
explicitValue(), this->
_definitionPoint2 + offset, this->
_leader, this->
layer(), this->
metaInfo());
57 auto newDimRadial = std::make_shared<DimRadial>(this->
definitionPoint().
rotate(rotation_center, rotation_angle),
58 this->
middleOfText().
rotate(rotation_center, rotation_angle), this->
attachmentPoint(), this->
textAngle(), this->
lineSpacingFactor(), this->
lineSpacingStyle(), this->
explicitValue(), this->
_definitionPoint2.
rotate(rotation_center, rotation_angle), this->
_leader, this->
layer(), this->
metaInfo());
63 auto newDimRadial = std::make_shared<DimRadial>(this->
definitionPoint().
scale(scale_center, scale_factor),
64 this->
middleOfText().
scale(scale_center, scale_factor), this->
attachmentPoint(), this->
textAngle(), this->
lineSpacingFactor(), this->
lineSpacingStyle(), this->
explicitValue(), this->
_definitionPoint2.
scale(scale_center, scale_factor), this->
_leader, this->
layer(), this->
metaInfo());
70 this->
middleOfText().
mirror(axis1,axis2), this->
attachmentPoint(), this->
textAngle(), this->
lineSpacingFactor(), this->
lineSpacingStyle(), this->
explicitValue(), this->
_definitionPoint2.
mirror(axis1,axis2), this->
_leader, this->
layer(), this->
metaInfo());
79 CADEntity_CSPtr
DimRadial::modify(Layer_CSPtr layer,
const MetaInfo_CSPtr metaInfo, Block_CSPtr block)
const {
80 auto newDimRadial = std::make_shared<DimRadial>(
106 std::map<unsigned int, geo::Coordinate>
dragPoints;
118 auto newEntity = std::make_shared<DimRadial>(dragPoints.at(0),
129 newEntity->setID(
id());
132 catch(std::out_of_range& e) {
133 return shared_from_this();
Coordinate mirror(const Coordinate &axis1, const Coordinate &axis2) const
mirror a coordinate
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 informat...
TextConst::LineSpacingStyle lineSpacingStyle() const
const geo::Coordinate _definitionPoint2
const geo::Coordinate & definitionPoint() const noexcept
move, moves by an offset
virtual CADEntity_CSPtr move(const geo::Coordinate &offset) const override
move, moves by an offset
virtual std::map< unsigned int, lc::geo::Coordinate > dragPoints() const override
Get all points of the entity that can be dragged.
virtual CADEntity_CSPtr rotate(const geo::Coordinate &rotation_center, const double rotation_angle) const override
rotate, rotate operation
std::string explicitValue() const
Layer_CSPtr layer() const
layer return the layer this entity is placed on
Coordinate scale(const double &scale_factor) const
virtual CADEntity_CSPtr setDragPoints(std::map< unsigned int, lc::geo::Coordinate > dragPoints) const override
Return modified entity.
MetaInfo_CSPtr metaInfo() const
const geo::Coordinate & middleOfText() const noexcept
TextConst::AttachmentPoint const & attachmentPoint() const
Coordinate rotate(const Coordinate &angleVector) const
rotate around (0.,0.) with a given angle vector
double lineSpacingFactor() const
Block_CSPtr block() const
Return the current entity block.
virtual CADEntity_CSPtr mirror(const geo::Coordinate &axis1, const geo::Coordinate &axis2) const override
virtual CADEntity_CSPtr copy(const geo::Coordinate &offset) const override
copy, copies by an offset
virtual CADEntity_CSPtr scale(const geo::Coordinate &scale_center, const geo::Coordinate &scale_factor) const override
scale, scales the entity
geo::Coordinate definitionPoint2() const
virtual const geo::Area boundingBox() const override
boundingBox of the entity
DimRadial(geo::Coordinate const &definitionPoint, geo::Coordinate const &middleOfText, TextConst::AttachmentPoint const &attachmentPoint, double angle, double const lineSpacingFactor, TextConst::LineSpacingStyle const &lineSpacingStyle, std::string const &explicitValue, geo::Coordinate const &definitionPoint2, const double leader, const Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr)
DimRadial.