diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 5fd5986e4d..52c03cec61 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -2299,23 +2299,21 @@ int SketchObject::addSymmetric(const std::vector &geoIdList, int refGeoId, else if(geosym->getTypeId() == Part::GeomArcOfParabola::getClassTypeId()){ Part::GeomArcOfParabola *geosymaoe = static_cast(geosym); Base::Vector3d cp = geosymaoe->getCenter(); - Base::Vector3d sp = geosymaoe->getStartPoint(true); - Base::Vector3d ep = geosymaoe->getEndPoint(true); //double df= geosymaoe->getFocal(); Base::Vector3d f1 = geosymaoe->getFocus(); Base::Vector3d sf1 = f1+2.0*(f1.Perpendicular(refGeoLine->getStartPoint(),vectline)-f1); Base::Vector3d scp = cp+2.0*(cp.Perpendicular(refGeoLine->getStartPoint(),vectline)-cp); - Base::Vector3d ssp = sp+2.0*(sp.Perpendicular(refGeoLine->getStartPoint(),vectline)-sp); - Base::Vector3d sep = ep+2.0*(ep.Perpendicular(refGeoLine->getStartPoint(),vectline)-ep); geosymaoe->setXAxisDir(sf1-scp); geosymaoe->setCenter(scp); double theta1,theta2; - geosymaoe->closestParameter(sep,theta1); - geosymaoe->closestParameter(ssp,theta2); + geosymaoe->getRange(theta1,theta2,true); + theta1 = -theta1; + theta2 = -theta2; + std::swap(theta1, theta2); geosymaoe->setRange(theta1,theta2,true); isStartEndInverted.insert(std::make_pair(*it, true)); @@ -2542,37 +2540,27 @@ int SketchObject::addSymmetric(const std::vector &geoIdList, int refGeoId, else if(geosym->getTypeId() == Part::GeomArcOfParabola::getClassTypeId()){ Part::GeomArcOfParabola *geosymaoe = static_cast(geosym); Base::Vector3d cp = geosymaoe->getCenter(); - Base::Vector3d sp = geosymaoe->getStartPoint(true); - Base::Vector3d ep = geosymaoe->getEndPoint(true); /*double df= geosymaoe->getFocal();*/ Base::Vector3d f1 = geosymaoe->getFocus(); Base::Vector3d sf1 = f1 + 2.0*(refpoint-f1); Base::Vector3d scp = cp + 2.0*(refpoint-cp); - Base::Vector3d ssp = sp + 2.0*(refpoint-sp); - Base::Vector3d sep = ep + 2.0*(refpoint-ep); geosymaoe->setXAxisDir(sf1-scp); geosymaoe->setCenter(scp); - double theta1,theta2; - geosymaoe->closestParameter(ssp,theta1); - geosymaoe->closestParameter(sep,theta2); - - geosymaoe->setRange(theta1,theta2,true); isStartEndInverted.insert(std::make_pair(*it, false)); } else if(geosym->getTypeId() == Part::GeomBSplineCurve::getClassTypeId()){ Part::GeomBSplineCurve *geosymbsp = static_cast(geosym); - + std::vector poles = geosymbsp->getPoles(); for(std::vector::iterator it = poles.begin(); it != poles.end(); ++it){ - (*it) = (*it) + 2.0*(refpoint-(*it)); } - + geosymbsp->setPoles(poles); //isStartEndInverted.insert(std::make_pair(*it, false));