Sketcher: Fix zero curvature normal exception

This commit is contained in:
Abdullah Tahiri 2017-02-16 23:52:34 +01:00 committed by wmayer
parent ca05f86f6e
commit 4fe4792f4d
2 changed files with 7 additions and 2 deletions

View File

@ -3619,7 +3619,12 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
if(curvaturelist[i] > maxcurv) if(curvaturelist[i] > maxcurv)
maxcurv = curvaturelist[i]; maxcurv = curvaturelist[i];
spline->normalAt(paramlist[i],normallist[i]); try {
spline->normalAt(paramlist[i],normallist[i]);
}
catch(Base::Exception) {
normallist[i] = Base::Vector3d(0,0,0);
}
double temp = ( pointatcurvelist[i] - midp ).Length(); double temp = ( pointatcurvelist[i] - midp ).Length();