Skip to content
Snippets Groups Projects
Commit f3d9fb59 authored by mattijs's avatar mattijs
Browse files

tolerances

parent 00e865c8
Branches
Tags
No related merge requests found
...@@ -101,8 +101,6 @@ bool Foam::triangleFuncs::intersectAxesBundle ...@@ -101,8 +101,6 @@ bool Foam::triangleFuncs::intersectAxesBundle
// Since direction is coordinate axis there is no need to do projection, // Since direction is coordinate axis there is no need to do projection,
// we can directly check u,v components for inclusion in triangle. // we can directly check u,v components for inclusion in triangle.
scalar localScale = max(max(magSqr(V10), magSqr(V20)), 1.0);
// Get other components // Get other components
label i1 = (i0 + 1) % 3; label i1 = (i0 + 1) % 3;
label i2 = (i1 + 1) % 3; label i2 = (i1 + 1) % 3;
...@@ -113,6 +111,8 @@ bool Foam::triangleFuncs::intersectAxesBundle ...@@ -113,6 +111,8 @@ bool Foam::triangleFuncs::intersectAxesBundle
scalar u2 = V20[i1]; scalar u2 = V20[i1];
scalar v2 = V20[i2]; scalar v2 = V20[i2];
scalar localScale = mag(u1)+mag(v1)+mag(u2)+mag(v2);
scalar det = v2*u1 - u2*v1; scalar det = v2*u1 - u2*v1;
// Fix for V0:(-31.71428 0 -15.10714) // Fix for V0:(-31.71428 0 -15.10714)
...@@ -136,7 +136,7 @@ bool Foam::triangleFuncs::intersectAxesBundle ...@@ -136,7 +136,7 @@ bool Foam::triangleFuncs::intersectAxesBundle
scalar beta = 0; scalar beta = 0;
bool inter = false; bool inter = false;
if (Foam::mag(u1)/localScale < SMALL) if (Foam::mag(u1) < SMALL)
{ {
beta = u0/u2; beta = u0/u2;
if ((beta >= 0) && (beta <= 1)) if ((beta >= 0) && (beta <= 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment