Commit 6400a2a4 by andy

### ENH: Improved code comments for triangle intersection area calc

parent 76cf75f9
 ... ... @@ -53,9 +53,9 @@ void Foam::faceAreaIntersect::triSliceWithPlane if (mag(d[i]) < matchTol*len) { d[i] = 0.0; nCoPlanar++; copI = i; d[i] = 0.0; } else { ... ... @@ -71,6 +71,9 @@ void Foam::faceAreaIntersect::triSliceWithPlane } } // Determine triangle area contribution if ( (nPos == 3) ... ... @@ -78,6 +81,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane || ((nPos == 1) && (nCoPlanar == 2))) { // all points above cutting plane - add triangle to list // /\ _____ // / \ \ / /\ // /____\ \ / / \ // __________ ____v____ __/____\__ tris[nTris++] = tri; } else if ((nPos == 2) && (nCoPlanar == 0)) ... ... @@ -85,6 +94,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane // 2 points above plane, 1 below // resulting quad above plane split into 2 triangles // ________ // \ / // --\----/-- // \ / // \/ // point under the plane label i0 = negI; ... ... @@ -110,6 +125,11 @@ void Foam::faceAreaIntersect::triSliceWithPlane { // 1 point above plane, 2 below // /\ // / \ // --/----\-- // /______\ // indices of remaining points label i1 = d.fcIndex(i0); label i2 = d.fcIndex(i1); ... ... @@ -126,6 +146,13 @@ void Foam::faceAreaIntersect::triSliceWithPlane { // 1 point above plane, 1 on plane, 1 below // |\ // | \ // __|__\__ // | / // | / // |/ // point indices label i1 = negI; label i2 = copI; ... ... @@ -147,6 +174,13 @@ void Foam::faceAreaIntersect::triSliceWithPlane else { // all points below cutting plane - forget // _________ __________ ___________ // /\ \ / // /\ / \ \ / // / \ /____\ \/ // /____\ } } ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!