visual3d:documentation:pipeline:signal_commands:compute_distance_map
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:signal_commands:compute_distance_map [2024/06/17 18:22] – created sgranger | visual3d:documentation:pipeline:signal_commands:compute_distance_map [2024/07/17 15:46] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Compute Distance Map ====== | ||
- | + | ===== Compute Distance Map ===== | |
- | + | ||
- | + | ||
- | ====== Compute Distance Map ====== | + | |
This command will color two regions of interest (ROI) on opposing segments, and calculate the weighted-average contact point on each one. The ROIs are defined in OBJ files created with DSX. | This command will color two regions of interest (ROI) on opposing segments, and calculate the weighted-average contact point on each one. The ROIs are defined in OBJ files created with DSX. | ||
Line 19: | Line 17: | ||
- | ===== Background | + | ==== Background ==== |
A polygonal surface mesh is defined by a set of faces, each of which is defined by a set of vertices connected by edges. Before computing distances, the Compute Distance Map command divides all faces of the ROIs into triangles, for easier processing and to guarantee that all faces are planar. In the image below, the left image highlights the vertices used to define a surface and the right image displays the triangles that define the surface: | A polygonal surface mesh is defined by a set of faces, each of which is defined by a set of vertices connected by edges. Before computing distances, the Compute Distance Map command divides all faces of the ROIs into triangles, for easier processing and to guarantee that all faces are planar. In the image below, the left image highlights the vertices used to define a surface and the right image displays the triangles that define the surface: | ||
- | [[compute_distance_map_vertex_triangles.png]] | + | {{:compute_distance_map_vertex_triangles.png}} |
A normal vector is defined for each triangle, vertex and edge: | A normal vector is defined for each triangle, vertex and edge: | ||
- | [[https:// | + | {{: |
- | ===== Command Output | + | ==== Command Output ==== |
**** | **** | ||
**** | **** | ||
- | |For every Result Name specified, there will be 6 results:\\ \\ * ResultName_SegmentName[[# | + | |For every Result Name specified, there will be 6 results:\\ \\ * ResultName_SegmentName[[# |
**** | **** | ||
Line 41: | Line 39: | ||
The result for _Min and _Contact will have 4 components. The first three components are X Y Z location of the contact point in the segment coordinate system, and the fourth component is the minimum distance. You can use the [[Visual3D: | The result for _Min and _Contact will have 4 components. The first three components are X Y Z location of the contact point in the segment coordinate system, and the fourth component is the minimum distance. You can use the [[Visual3D: | ||
- | ==== Minimum Distance | + | === Minimum Distance === |
- | |The minimum distance between each triangle on one segment' | + | |The minimum distance between each triangle on one segment' |
- | ==== Contact Point ==== | + | === Contact Point === |
The weighted minimum distance between the two segments. | The weighted minimum distance between the two segments. | ||
Line 51: | Line 49: | ||
* Once each triangle has been assigned a minimum distance, a preliminary contact point is found by calculating a weighted average of all the triangle centers. Each center is weighted by the triangle' | * Once each triangle has been assigned a minimum distance, a preliminary contact point is found by calculating a weighted average of all the triangle centers. Each center is weighted by the triangle' | ||
- | ==== Min Vertex Distances | + | === Min Vertex Distances === |
This is the minimum distance value that is used to color each vertex in the OBJ. | This is the minimum distance value that is used to color each vertex in the OBJ. | ||
Line 57: | Line 55: | ||
**Note:** Do not click on this signal and open the data view, Visual3D will not be able to open the data view due to the number of columns. | **Note:** Do not click on this signal and open the data view, Visual3D will not be able to open the data view due to the number of columns. | ||
- | ==== Sign of the Minimum Distance | + | === Sign of the Minimum Distance === |
Any of the distances calculated by this command can be positive (the opposing ROI surfaces do not intersect) or negative (the surfaces intersect). The sign of each distance is calculated using the appropriate normal vector (triangle, edge, or vertex). For example, to determine which side of a triangle a given vertex is on, the vector from the vertex to the triangle is compared to the normal of the triangle. | Any of the distances calculated by this command can be positive (the opposing ROI surfaces do not intersect) or negative (the surfaces intersect). The sign of each distance is calculated using the appropriate normal vector (triangle, edge, or vertex). For example, to determine which side of a triangle a given vertex is on, the vector from the vertex to the triangle is compared to the normal of the triangle. | ||
- | ===== Command Dialog | + | ==== Command Dialog ==== |
- | |**Result Signal Information: | + | |**Result Signal Information: |
- | ===== Drawing the Contact Path ===== | + | ==== Drawing the Contact Path ==== |
- | |You can draw the contact point and its path on the surface: | + | |You can draw the contact point and its path on the surface: |
- | ==== Steps ==== | + | === Steps === |
- | |For every Result Name specified, there will be 6 results:\\ \\ * ResultName_SegmentName[[# | + | |For every Result Name specified, there will be 6 results:\\ \\ * ResultName_SegmentName[[# |
- | |* Target Size: | + | |* Target Size: |
**NOTE:** If the contact point is still too large, go to **Settings -> Modify Scale of 3D Graphics** and decrease the Target Size. | **NOTE:** If the contact point is still too large, go to **Settings -> Modify Scale of 3D Graphics** and decrease the Target Size. | ||
- | ==== Camera Settings | + | === Camera Settings === |
The skeleton toggle button on the toolbar turns segment drawings on/off: | The skeleton toggle button on the toolbar turns segment drawings on/off: | ||
Line 95: | Line 93: | ||
You can set the camera perspective to lock onto a segment by going to View -> Set Camera Perspective. | You can set the camera perspective to lock onto a segment by going to View -> Set Camera Perspective. | ||
- | |||
- | |||
visual3d/documentation/pipeline/signal_commands/compute_distance_map.1718648560.txt.gz · Last modified: 2024/06/17 18:22 by sgranger