9 using namespace entity;
12 const Layer_CSPtr layer,
const MetaInfo_CSPtr metaInfo,
const Block_CSPtr block) :
14 geo::Coordinate(x, y) {
18 const Layer_CSPtr layer,
const MetaInfo_CSPtr metaInfo,
const Block_CSPtr block) :
20 geo::Coordinate(coord) {
23 Point::Point(
const Point_CSPtr other,
bool sameID) :
CADEntity(other, sameID), geo::Coordinate(other->x(), other->y()) {
28 geo::Coordinate(builder.coordinate()) {
32 auto newCoordinate = std::make_shared<Point>(this->
x() + offset.
x(), this->
y() + offset.
y(),
layer());
33 newCoordinate->setID(this->
id());
38 auto newCoordinate = std::make_shared<Point>(this->
x() + offset.
x(), this->
y() + offset.
y(),
layer());
44 auto newCoordinate = std::make_shared<Point>(rotcord.x(), rotcord.y(),
layer());
45 newCoordinate->setID(this->
id());
51 auto newCoordinate = std::make_shared<Point>(rotcord.x(), rotcord.y(),
layer());
52 newCoordinate->setID(this->
id());
58 auto newCoordinate = std::make_shared<Point>(rotcord.x(), rotcord.y(),
layer());
59 newCoordinate->setID(this->
id());
67 CADEntity_CSPtr
Point::modify(Layer_CSPtr layer,
const MetaInfo_CSPtr metaInfo, Block_CSPtr block)
const {
68 auto newEntity = std::make_shared<Point>(this->
x(), this->
y(),
73 newEntity->setID(this->
id());
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
virtual CADEntity_CSPtr rotate(const geo::Coordinate &rotation_center, const double rotation_angle) const override
rotate, rotate operation
double x() const
Returns x of Coordinate.
Layer_CSPtr layer() const
layer return the layer this entity is placed on
double y() const
Returns y of Coordinate.
Coordinate scale(const double &scale_factor) const
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...
MetaInfo_CSPtr metaInfo() const
virtual CADEntity_CSPtr mirror(const geo::Coordinate &axis1, const geo::Coordinate &axis2) const override
Coordinate rotate(const Coordinate &angleVector) const
rotate around (0.,0.) with a given angle vector
Block_CSPtr block() const
Return the current entity block.
Point(geo::Coordinate const &coord, const Layer_CSPtr layer, const MetaInfo_CSPtr metaInfo=nullptr, const Block_CSPtr block=nullptr)
Coordinate, Default Coordinate Constructor.
virtual const geo::Area boundingBox() const override
boundingBox of the entity
virtual CADEntity_CSPtr move(const geo::Coordinate &offset) const override
move, moves by an offset