Skip to content

Commit

Permalink
BUG: Sets Face Label for virtual boundary to -1 in SurfaceNetsFilter
Browse files Browse the repository at this point in the history
- This makes the value consistent with QuickMesh
- Added documentation on the pros, cons and Face Labels for this filter.

Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Dec 7, 2024
1 parent 2ba7962 commit c33ee50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion src/Plugins/SimplnxCore/docs/SurfaceNetsFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<usize>(triangleVtxIDs[0]), static_cast<usize>(triangleVtxIDs[1]), static_cast<usize>(triangleVtxIDs[2])};
Expand Down Expand Up @@ -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<usize>(triangleVtxIDs[0]), static_cast<usize>(triangleVtxIDs[1]), static_cast<usize>(triangleVtxIDs[2])};
Expand Down

0 comments on commit c33ee50

Please sign in to comment.