So that's why projection into the surface kept failing; was using
the magnitude of the wrong derivative! Fix that, good. [git-p4: depot-paths = "//depot/solvespace/": change = 1908]solver
parent
a754018a44
commit
715a554637
|
@ -535,7 +535,7 @@ void SSurface::ClosestPointTo(Vector p, double *u, double *v) {
|
|||
Vector dp = p.Minus(p0);
|
||||
double du = dp.Dot(tu), dv = dp.Dot(tv);
|
||||
*u += du / (tu.MagSquared());
|
||||
*v += dv / (tu.MagSquared());
|
||||
*v += dv / (tv.MagSquared());
|
||||
}
|
||||
dbp("didn't converge");
|
||||
dbp("have %.3f %.3f %.3f", CO(p0));
|
||||
|
|
Loading…
Reference in New Issue