Part: Improvement to closest parameter determination when the projection does not exist in the trimmer curve

This commit is contained in:
Abdullah Tahiri
2018-07-09 14:12:36 +02:00
committed by wmayer
parent 97f375296b
commit de9e7cc942

View File

@@ -454,6 +454,16 @@ bool GeomCurve::closestParameter(const Base::Vector3d& point, double &u) const
return true;
}
}
catch (StdFail_NotDone e) { // projection does not exist on trimmer curve, let's try basis curve
closestParameterToBasicCurve(point,u);
if(abs(u-c->FirstParameter()) < abs(u-c->LastParameter()))
u = c->FirstParameter();
else
u = c->LastParameter();
return true;
}
catch (Standard_Failure& e) {
throw Base::RuntimeError(e.GetMessageString());