ENH: new cuttingPlane cutting scheme

- takes a direct approach of determining which cells are cut and walks
  the cell faces directly to build the resulting surface.

- better handling of corner cases.
  * Avoids redundant points when the cut passes exactly through a
    mesh point.
  * Supresses generation of duplicates faces when the plane cut
    coincides exactly with a mesh face.

- for severely concave cells where the plane cuts a face multiple times
  there is currently no remedial action taken, except to note the
  failure and unwind the insertion of the corresponding points and
  faces.
This commit is contained in:
Mark Olesen
2018-08-07 22:23:16 +02:00
parent 544941b961
commit 7bb68b4dea
3 changed files with 370 additions and 226 deletions

View File

@ -26,6 +26,23 @@ debug
}
}
_plane
{
type plane;
source cells;
triangulate false;
planeType pointAndNormal;
pointAndNormalDict
{
normal (-1 0 0);
point (-0.042 0 0);
// point (-0.0425 0 0); // between faces
}
}
surfaces
(
angledPlane
@ -46,6 +63,20 @@ debug
regularise true;
interpolate true;
}
// Top channel
plane1
{
${_plane}
bounds (-1 0 -1) (0 1 1);
}
// Bottom channel
plane2
{
${_plane}
bounds (-1 -1 -1) (0 0 1);
}
);
}