12 Trim::Trim(QList<shared_ptr<const lc::entity::CADEntity> > limitingEntities, shared_ptr<const lc::entity::CADEntity> trimmedShape,
geo::Coordinate trimPoint) : _limitingEntities(limitingEntities), _trimmedShape(trimmedShape), _trimPoint(trimPoint) {
21 QList<geo::Coordinate> points = im.
result();
24 if (points.count() > 0) {
28 for (
int i = 0; i < points.size(); ++i) {
31 this->
_newEntities.append(shared_ptr<const lc::Line>(
new Line(points.at(i + 1), line->end())));
33 }
else if (i == points.size() - 1) {
34 this->
_newEntities.append(shared_ptr<const lc::Line>(
new Line(line->start(), points.at(i - 1))));
37 this->
_newEntities.append(shared_ptr<const lc::Line>(
new Line(line->start(), points.at(i - 1))));
38 this->
_newEntities.append(shared_ptr<const lc::Line>(
new Line(points.at(i + 1), line->end())));
calculate intersection points of many entities
std::vector< geo::Coordinate > result() const
QList< shared_ptr< const lc::entity::CADEntity > > _newEntities
geo::Coordinate _trimPoint
QList< shared_ptr< const lc::entity::CADEntity > > result()
shared_ptr< const lc::entity::CADEntity > trimmedShape() const
virtual void visit(shared_ptr< const lc::Line >)
sort a Collection in order of distance to a specific coordinate
shared_ptr< const lc::entity::CADEntity > _trimmedShape
Trim(QList< shared_ptr< const lc::entity::CADEntity > > limitingEntities, shared_ptr< const lc::entity::CADEntity > trimmedShape, geo::Coordinate trimPoint)
QList< shared_ptr< const lc::entity::CADEntity > > _limitingEntities