10.53. Compute Vertex to Triangle Distances
Group (Subgroup)
Sampling (Spatial)
Description
This Filter computes distances between points in a Vertex Geometry and triangles in a Triangle Geometry. Specifically, for each point in the Vertex Geometry, the Euclidean distance to the closest triangle in the Triangle Geometry is stored. This distance is signed: if the point lies on the side of the triangle to which the triangle normal points, then the distance is positive; otherwise, the distance is negative. Additionally, the ID of the closest triangle is stored for each point.
The computed distance is reported in the same length unit as the coordinates of the two input geometries (e.g., microns, millimeters); both geometries must share the same unit system for the result to be meaningful.
The sign of each distance depends on the Triangle Normals. For the sign to be correct, the normals must be present and consistently oriented across the mesh (all pointing to the same “outside”). Inconsistent or flipped normals will produce sign errors even when the distance magnitude is correct.
Required Input Sources
Vertex Geometry – the point cloud whose distances are measured.
Triangle Geometry – the surface mesh measured against, typically produced by a surface-meshing filter such as Quick Surface Mesh or read from a CAD mesh via Read STL File.
Triangle Normals – per-face normals on the Triangle Geometry, produced by Compute Triangle Normals; required for correct distance signs.
Input Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Source Vertex Geometry |
Geometry Selection |
Vertex |
The Vertex Geometry point cloud to map to triangles |
Target Triangle Geometry |
Geometry Selection |
Triangle |
The triangle geometry to compare against |
Triangle Normals |
Array Selection |
Allowed Types: float64 |
The triangle geometry’s normals array |
Output Arrays
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Distances Array |
DataObjectName |
The array to store distance between vertex and triangle |
|
Closest Triangle Ids Array |
DataObjectName |
The array to store the ID of the closest triangle |
License & Copyright
Please see the description file distributed with this plugin.
DREAM3D-NX Help
If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.