use VERY_NEGATIVE and VERY_POSITIVE instead of numeric values which is some cases were 1e-10 instead of -1e10
parent
6c4b075eef
commit
eadeac44f0
|
@ -507,9 +507,9 @@ void SShell::MakeFromExtrusionOf(SBezierLoopSet *sbls, Vector t0, Vector t1, Rgb
|
||||||
Vector n = sbls->normal.ScaledBy(-1);
|
Vector n = sbls->normal.ScaledBy(-1);
|
||||||
Vector u = n.Normal(0), v = n.Normal(1);
|
Vector u = n.Normal(0), v = n.Normal(1);
|
||||||
Vector orig = sbls->point;
|
Vector orig = sbls->point;
|
||||||
double umax = 1e-10, umin = 1e10;
|
double umax = VERY_NEGATIVE, umin = VERY_POSITIVE;
|
||||||
sbls->GetBoundingProjd(u, orig, &umin, &umax);
|
sbls->GetBoundingProjd(u, orig, &umin, &umax);
|
||||||
double vmax = 1e-10, vmin = 1e10;
|
double vmax = VERY_NEGATIVE, vmin = VERY_POSITIVE;
|
||||||
sbls->GetBoundingProjd(v, orig, &vmin, &vmax);
|
sbls->GetBoundingProjd(v, orig, &vmin, &vmax);
|
||||||
// and now fix things up so that all u and v lie between 0 and 1
|
// and now fix things up so that all u and v lie between 0 and 1
|
||||||
orig = orig.Plus(u.ScaledBy(umin));
|
orig = orig.Plus(u.ScaledBy(umin));
|
||||||
|
@ -663,9 +663,9 @@ void SShell::MakeFromHelicalRevolutionOf(SBezierLoopSet *sbls, Vector pt, Vector
|
||||||
Vector n = sbls->normal.ScaledBy(-1);
|
Vector n = sbls->normal.ScaledBy(-1);
|
||||||
Vector u = n.Normal(0), v = n.Normal(1);
|
Vector u = n.Normal(0), v = n.Normal(1);
|
||||||
Vector orig = sbls->point;
|
Vector orig = sbls->point;
|
||||||
double umax = 1e-10, umin = 1e10;
|
double umax = VERY_NEGATIVE, umin = VERY_POSITIVE;
|
||||||
sbls->GetBoundingProjd(u, orig, &umin, &umax);
|
sbls->GetBoundingProjd(u, orig, &umin, &umax);
|
||||||
double vmax = 1e-10, vmin = 1e10;
|
double vmax = VERY_NEGATIVE, vmin = VERY_POSITIVE;
|
||||||
sbls->GetBoundingProjd(v, orig, &vmin, &vmax);
|
sbls->GetBoundingProjd(v, orig, &vmin, &vmax);
|
||||||
// and now fix things up so that all u and v lie between 0 and 1
|
// and now fix things up so that all u and v lie between 0 and 1
|
||||||
orig = orig.Plus(u.ScaledBy(umin));
|
orig = orig.Plus(u.ScaledBy(umin));
|
||||||
|
|
Loading…
Reference in New Issue