Commit 10b2f078 authored by laurence's avatar laurence
Browse files

ENH: Add a diff function to triad and a tolerance to edgeDirections

parent 6243c90a
......@@ -136,7 +136,7 @@ Foam::pointField Foam::coupledPolyPatch::getAnchorPoints
{
pointField anchors(faces.size());
if (transform == COINCIDENTFULLMATCH)
if (transform != COINCIDENTFULLMATCH)
{
// Return the first point
forAll(faces, faceI)
......
......@@ -393,7 +393,8 @@ Foam::scalar Foam::diff(const triad& A, const triad& B)
}
scalar cosPhi =
(tmpA[dir] & tmpB[dir])/(mag(tmpA[dir])*mag(tmpA[dir]) + SMALL);
(tmpA[dir] & tmpB[dir])
/(mag(tmpA[dir])*mag(tmpA[dir]) + SMALL);
cosPhi = min(max(cosPhi, -1), 1);
......
......@@ -165,7 +165,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(const IOobject& io)
edgeDirections_[eI] = eds[eI].vec(pts);
}
edgeDirections_ /= mag(edgeDirections_);
edgeDirections_ /= (mag(edgeDirections_) + SMALL);
}
}
......
......@@ -116,7 +116,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection
dir,
faceCentres[index],
points,
intersection::HALF_RAY
intersection::HALF_RAY,
shape.planarTol_
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment