Skip to content
Snippets Groups Projects
Commit 38217260 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

partial revert of r. 15464: this is really too slow

parent 776c398c
No related branches found
No related tags found
No related merge requests found
......@@ -170,19 +170,24 @@ void OCCFace::secondDer(const SPoint2 &param,
GPoint OCCFace::point(double par1, double par2) const
{
double pp[2] = {par1, par2};
#if 1
gp_Pnt val = occface->Value(par1, par2);
return GPoint(val.X(), val.Y(), val.Z(), this, pp);
#else // this is horribly slow!
double umin2, umax2, vmin2, vmax2;
ShapeAnalysis::GetFaceUVBounds(s, umin2, umax2, vmin2, vmax2);
double du = umax2 - umin2;
double dv = vmax2 - vmin2;
if (par1 > (umax2+.1*du) || par1 < (umin2-.1*du) ||
par2 > (vmax2+.1*dv) || par2 < (vmin2-.1*dv))
{
GPoint p(0,0,0, this, pp);
p.setNoSuccess();
return p;
}
par2 > (vmax2+.1*dv) || par2 < (vmin2-.1*dv)){
GPoint p(0,0,0, this, pp);
p.setNoSuccess();
return p;
}
try{
gp_Pnt val;
......@@ -194,6 +199,7 @@ GPoint OCCFace::point(double par1, double par2) const
p.setNoSuccess();
return p;
}
#endif
}
GPoint OCCFace::closestPoint(const SPoint3 &qp, const double initialGuess[2]) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment