Sketcher: Copy/Clone and Array support for Arcs of Parabola and Hyperbola

This commit is contained in:
Abdullah Tahiri 2016-12-26 23:23:34 +01:00
parent ebfbe29d2f
commit 9d65cc5672

View File

@ -2475,6 +2475,26 @@ int SketchObject::addCopy(const std::vector<int> &geoIdList, const Base::Vector3
if(it == geoIdList.begin()) if(it == geoIdList.begin())
iterfirstpoint = geoaoe->getStartPoint(true); iterfirstpoint = geoaoe->getStartPoint(true);
} }
else if(geocopy->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()){
Part::GeomArcOfHyperbola *geoaoe = static_cast<Part::GeomArcOfHyperbola *>(geocopy);
Base::Vector3d cp = geoaoe->getCenter();
Base::Vector3d scp = cp+double(x)*displacement+double(y)*perpendicularDisplacement;
geoaoe->setCenter(scp);
if(it == geoIdList.begin())
iterfirstpoint = geoaoe->getStartPoint(true);
}
else if(geocopy->getTypeId() == Part::GeomArcOfParabola::getClassTypeId()){
Part::GeomArcOfParabola *geoaoe = static_cast<Part::GeomArcOfParabola *>(geocopy);
Base::Vector3d cp = geoaoe->getCenter();
Base::Vector3d scp = cp+double(x)*displacement+double(y)*perpendicularDisplacement;
geoaoe->setCenter(scp);
if(it == geoIdList.begin())
iterfirstpoint = geoaoe->getStartPoint(true);
}
else if(geocopy->getTypeId() == Part::GeomPoint::getClassTypeId()){ else if(geocopy->getTypeId() == Part::GeomPoint::getClassTypeId()){
Part::GeomPoint *geopoint = static_cast<Part::GeomPoint *>(geocopy); Part::GeomPoint *geopoint = static_cast<Part::GeomPoint *>(geocopy);
Base::Vector3d cp = geopoint->getPoint(); Base::Vector3d cp = geopoint->getPoint();