From c33ee508cb9fb332a0217103ea199698872c9648 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Thu, 5 Dec 2024 20:16:37 -0500 Subject: [PATCH] BUG: Sets Face Label for virtual boundary to -1 in SurfaceNetsFilter - This makes the value consistent with QuickMesh - Added documentation on the pros, cons and Face Labels for this filter. Signed-off-by: Michael Jackson --- src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md | 12 +++++++++++- .../SimplnxCore/Filters/Algorithms/SurfaceNets.cpp | 12 ++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md b/src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md index 441dca1613..1b278d6a67 100644 --- a/src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md +++ b/src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md @@ -58,9 +58,19 @@ Nodes that appear on the exterior of a volume have Node Type values starting at ![Exterior Node Types](Images/SurfaceNets_NodeType_Exterior.png) +### Exterior or Boundary Faces + +Triangle faces that bound the virtual volume will have one of the Face Labels components +set to a value of -1. If you want to filter out those triangles, you can set any +triangle face where at least one of the Face Labels = -1 to be filtered out. You can also +run a Threshold Objects (Advanced) filter, those face labels as "TRUE" instead and +then run the "Remove Marked Triangles" filter to remove them from the surface mesh. + ## Notes -This filter should be used in place of the "QuickMesh Surface Filter". +- This filter can be used in place of the "QuickMesh Surface Filter" and "Laplacian Smoothing Filter". +- This filter can use substantially more memory than the QuickMesh Filter + % Auto generated parameter table will be inserted here diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp index 81beb435e0..c76046b790 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp @@ -254,11 +254,11 @@ Result<> SurfaceNets::operator()() const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); if(quadLabels[0] == MMSurfaceNet::Padding) { - quadLabels[0] = 0; + quadLabels[0] = -1; } if(quadLabels[1] == MMSurfaceNet::Padding) { - quadLabels[1] = 0; + quadLabels[1] = -1; } getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); @@ -314,11 +314,11 @@ Result<> SurfaceNets::operator()() const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); /// if(quadLabels[0] == MMSurfaceNet::Padding) { - quadLabels[0] = 0; + quadLabels[0] = -1; } if(quadLabels[1] == MMSurfaceNet::Padding) { - quadLabels[1] = 0; + quadLabels[1] = -1; } getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); t1 = {static_cast(triangleVtxIDs[0]), static_cast(triangleVtxIDs[1]), static_cast(triangleVtxIDs[2])}; @@ -372,11 +372,11 @@ Result<> SurfaceNets::operator()() const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); if(quadLabels[0] == MMSurfaceNet::Padding) { - quadLabels[0] = 0; + quadLabels[0] = -1; } if(quadLabels[1] == MMSurfaceNet::Padding) { - quadLabels[1] = 0; + quadLabels[1] = -1; } getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); t1 = {static_cast(triangleVtxIDs[0]), static_cast(triangleVtxIDs[1]), static_cast(triangleVtxIDs[2])};