7 using namespace entity;
10 const MetaInfo_CSPtr metaInfo,
const Block_CSPtr block)
16 geo::
Circle(other->center(), other->radius()) {
21 geo::
Circle(builder.center(), builder.radius()) {
25 double minDistanceToSnap,
int maxNumberOfSnapPoints)
const {
27 std::vector<EntityCoordinate> points;
31 points.emplace_back(coord, 0);
35 points.emplace_back(coord, 1);
38 points.emplace_back(coord, 2);
41 points.emplace_back(coord, 3);
44 points.emplace_back(coord, 4);
50 points.emplace_back(npoe, -1);
64 newCircle->setID(this->
id());
74 auto newCircle = std::make_shared<Circle>(this->
center().
rotate(rotation_center, rotation_angle), this->
radius(),
76 newCircle->setID(this->
id());
83 auto newCircle = std::make_shared<Circle>(this->
center().
scale(scale_center, scale_factor),
85 newCircle->setID(this->
id());
90 auto newCircle = std::make_shared<Circle>(this->
center().
mirror(axis1, axis2),
92 newCircle->setID(this->
id());
101 CADEntity_CSPtr
Circle::modify(Layer_CSPtr layer,
const MetaInfo_CSPtr metaInfo, Block_CSPtr block)
const {
103 newEntity->setID(this->
id());
Coordinate mirror(const Coordinate &axis1, const Coordinate &axis2) const
mirror a coordinate
virtual const geo::Area boundingBox() const override
boundingBox of the entity
Circle(const geo::Coordinate ¢er, double radius, const Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr)
Circle, Circle Constructor.
virtual std::vector< EntityCoordinate > snapPoints(const geo::Coordinate &coord, const SimpleSnapConstrain &constrain, double minDistanceToSnap, int maxNumberOfSnapPoints) const override
Find a number of snap points the line has available This function returns a ordered list...
static const uint16_t LOGICAL
virtual CADEntity_CSPtr move(const geo::Coordinate &offset) const override
move, moves by an offset
double x() const
Returns x of Coordinate.
static const uint16_t ON_ENTITYPATH
Layer_CSPtr layer() const
layer return the layer this entity is placed on
Coordinate scale(const double &scale_factor) const
MetaInfo_CSPtr metaInfo() const
double radius() const
returns the radius of the circle.
static const uint16_t ON_ENTITY
Coordinate nearestPointOnPath(const Coordinate &coord) const
returns the nearest Point On Path
Coordinate rotate(const Coordinate &angleVector) const
rotate around (0.,0.) with a given angle vector
static void snapPointsCleanup(std::vector< EntityCoordinate > &points, const geo::Coordinate &reference, const unsigned int maxNumberOfSnapPoints, const double minDistanceToSnap)
virtual CADEntity_CSPtr rotate(const geo::Coordinate &rotation_center, const double rotation_angle) const override
rotate, rotate operation
Block_CSPtr block() const
Return the current entity block.
virtual CADEntity_CSPtr scale(const geo::Coordinate &scale_center, const geo::Coordinate &scale_factor) const override
scale, scales the entity
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...
virtual CADEntity_CSPtr copy(const geo::Coordinate &offset) const override
copy, copies by an offset
const uint16_t constrain() const
const Coordinate center() const
Returns the Center of circle.
virtual geo::Coordinate nearestPointOnPath(const geo::Coordinate &coord) const override
Find the nearest point on the path for this entity for the coordinate coord The path of a entity that...
virtual CADEntity_CSPtr mirror(const geo::Coordinate &axis1, const geo::Coordinate &axis2) const override