No message if cached points to don't converge. Quiet the terminal.

pull/598/head^2
phkahler 2020-05-08 15:04:27 -04:00
parent a7e0a174e3
commit 7baf58588b
1 changed files with 7 additions and 6 deletions

View File

@ -436,6 +436,13 @@ void SSurface::ClosestPointTo(Vector p, double *u, double *v, bool mustConverge)
}
// If we failed to converge, then at least don't return NaN.
if(mustConverge) {
Vector p0 = PointAt(*u, *v);
dbp("didn't converge");
dbp("have %.3f %.3f %.3f", CO(p0));
dbp("want %.3f %.3f %.3f", CO(p));
dbp("distance = %g", (p.Minus(p0)).Magnitude());
}
if(isnan(*u) || isnan(*v)) {
*u = *v = 0;
}
@ -477,12 +484,6 @@ bool SSurface::ClosestPointNewton(Vector p, double *u, double *v, bool mustConve
}
if(mustConverge) {
dbp("didn't converge");
dbp("have %.3f %.3f %.3f", CO(p0));
dbp("want %.3f %.3f %.3f", CO(p));
dbp("distance = %g", (p.Minus(p0)).Magnitude());
}
return false;
}