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

@ -406,7 +406,7 @@ void CmdSketcherIncreaseDegree::activated(int iMsg)
selection[0].getFeatName(),GeoId);
}
}
commitCommand();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");

View File

@ -3619,7 +3619,12 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
if(curvaturelist[i] > maxcurv)
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();