abort hyperbola creation when angles are NaN

This commit is contained in:
wmayer
2019-10-17 00:22:39 +02:00
parent 432d4f2552
commit eb6a405c17

View File

@@ -3770,6 +3770,12 @@ public:
double endAngle = atanh( (((endPoint.y-centerPoint.y)*cos(phi)-(endPoint.x-centerPoint.x)*sin(phi))*a) /
(((endPoint.x-centerPoint.x)*cos(phi)+(endPoint.y-centerPoint.y)*sin(phi))*b) );
if (boost::math::isnan(startAngle) || boost::math::isnan(endAngle)) {
sketchgui->purgeHandler();
Base::Console().Error("Cannot create arc of hyperbola from invalid angles, try again!\n");
return false;
}
bool isOriginalArcCCW=true;