From eadeac44f05d16ffea6d2009b928fb4c4ce13fa4 Mon Sep 17 00:00:00 2001 From: phkahler <14852918+phkahler@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:37:30 -0400 Subject: [PATCH] use VERY_NEGATIVE and VERY_POSITIVE instead of numeric values which is some cases were 1e-10 instead of -1e10 --- src/srf/surface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srf/surface.cpp b/src/srf/surface.cpp index 3e97bb2..815aeda 100644 --- a/src/srf/surface.cpp +++ b/src/srf/surface.cpp @@ -507,9 +507,9 @@ void SShell::MakeFromExtrusionOf(SBezierLoopSet *sbls, Vector t0, Vector t1, Rgb Vector n = sbls->normal.ScaledBy(-1); Vector u = n.Normal(0), v = n.Normal(1); Vector orig = sbls->point; - double umax = 1e-10, umin = 1e10; + double umax = VERY_NEGATIVE, umin = VERY_POSITIVE; 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); // and now fix things up so that all u and v lie between 0 and 1 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 u = n.Normal(0), v = n.Normal(1); Vector orig = sbls->point; - double umax = 1e-10, umin = 1e10; + double umax = VERY_NEGATIVE, umin = VERY_POSITIVE; 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); // and now fix things up so that all u and v lie between 0 and 1 orig = orig.Plus(u.ScaledBy(umin));