Skip to content
Snippets Groups Projects
Commit b1e65376 authored by andy's avatar andy
Browse files

ENH: Updates to faceAreaIntersect

parent e16191b2
Branches
Tags
No related merge requests found
...@@ -78,7 +78,8 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -78,7 +78,8 @@ void Foam::faceAreaIntersect::triSliceWithPlane
( (
(nPos == 3) (nPos == 3)
|| ((nPos == 2) && (nCoPlanar == 1)) || ((nPos == 2) && (nCoPlanar == 1))
|| ((nPos == 1) && (nCoPlanar == 2))) || ((nPos == 1) && (nCoPlanar == 2))
)
{ {
/* /*
/\ _____ /\ _____
...@@ -95,11 +96,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -95,11 +96,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane
else if ((nPos == 2) && (nCoPlanar == 0)) else if ((nPos == 2) && (nCoPlanar == 0))
{ {
/* /*
________ i1________i2
\ / \ /
--\----/-- --\----/--
\ / \ /
\/ \/
i0
2 points above plane, 1 below 2 points above plane, 1 below
- resulting quad above plane split into 2 triangles - resulting quad above plane split into 2 triangles
...@@ -130,10 +132,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -130,10 +132,12 @@ void Foam::faceAreaIntersect::triSliceWithPlane
if (nCoPlanar == 0) if (nCoPlanar == 0)
{ {
/* /*
/\ i0
/ \ /\
--/----\-- / \
/______\ --/----\--
/______\
i2 i1
1 point above plane, 2 below 1 point above plane, 2 below
- keep triangle above intersection plane - keep triangle above intersection plane
...@@ -145,8 +149,8 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -145,8 +149,8 @@ void Foam::faceAreaIntersect::triSliceWithPlane
label i2 = d.fcIndex(i1); label i2 = d.fcIndex(i1);
// determine the two intersection points // determine the two intersection points
point p01 = planeIntersection(d, tri, i0, i1); point p01 = planeIntersection(d, tri, i1, i0);
point p02 = planeIntersection(d, tri, i0, i2); point p02 = planeIntersection(d, tri, i2, i0);
// add triangle above plane to list // add triangle above plane to list
setTriPoints(tri[i0], p01, p02, nTris, tris); setTriPoints(tri[i0], p01, p02, nTris, tris);
...@@ -154,14 +158,14 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -154,14 +158,14 @@ void Foam::faceAreaIntersect::triSliceWithPlane
else else
{ {
/* /*
i0
|\ |\
| \ | \
__|__\__ __|__\_i2_
| / | /
| / | /
|/ |/
i1
1 point above plane, 1 on plane, 1 below 1 point above plane, 1 on plane, 1 below
- keep triangle above intersection plane - keep triangle above intersection plane
...@@ -172,9 +176,9 @@ void Foam::faceAreaIntersect::triSliceWithPlane ...@@ -172,9 +176,9 @@ void Foam::faceAreaIntersect::triSliceWithPlane
label i2 = copI; label i2 = copI;
// determine the intersection point // determine the intersection point
point p01 = planeIntersection(d, tri, i0, i1); point p01 = planeIntersection(d, tri, i1, i0);
// add triangle above plane to list // add triangle above plane to list - clockwise points
if (d.fcIndex(i0) == i1) if (d.fcIndex(i0) == i1)
{ {
setTriPoints(tri[i0], p01, tri[i2], nTris, tris); setTriPoints(tri[i0], p01, tri[i2], nTris, tris);
......
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