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

don't use 0.9, 0.1: it fails with some ruled surfaces

parent cdfc169c
No related branches found
No related tags found
No related merge requests found
......@@ -805,14 +805,15 @@ void GFace::XYZtoUV(double X, double Y, double Z, double &U, double &V,
{
const double Precision = onSurface ? 1.e-8 : 1.e-3;
const int MaxIter = onSurface ? 25 : 10;
const int NumInitGuess = 11;
const int NumInitGuess = 9;
double Unew = 0., Vnew = 0., err, err2;
int iter;
double mat[3][3], jac[3][3];
double umin, umax, vmin, vmax;
double initu[NumInitGuess] = {0.5, 0.6, 0.4, 0.7, 0.3, 0.8, 0.2, 0.9, 0.1, 1., 0.};
double initv[NumInitGuess] = {0.5, 0.6, 0.4, 0.7, 0.3, 0.8, 0.2, 0.9, 0.1, 1., 0.};
// don't use 0.9, 0.1 it fails with ruled surfaces
double initu[NumInitGuess] = {0.5, 0.6, 0.4, 0.7, 0.3, 0.8, 0.2, 1., 0.};
double initv[NumInitGuess] = {0.5, 0.6, 0.4, 0.7, 0.3, 0.8, 0.2, 1., 0.};
Range<double> ru = parBounds(0);
Range<double> rv = parBounds(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment