This documentation covers the C# script used in Grasshopper for calculating approximate geodesic distances from a specified point on a mesh to all other vertices. The script is designed to work within the Grasshopper environment and is optimized for performance with large meshes.
The script implements a version of Dijkstra's algorithm using a custom priority queue. It is tailored for use with RhinoCommon's mesh data structures in Grasshopper and is designed to calculate distances efficiently, even for large meshes.
- Input: Mesh (
Mesh
):- 🟦 Type: Rhino.Geometry.Mesh
- 📝 Description: The input mesh on which geodesic distances are to be calculated.
- Input: StartPoint (
Point3d
):- 🔵 Type: Rhino.Geometry.Point3d
- 📝 Description: The starting point on the mesh from which distances to all vertices are calculated.
- Output: U (
object
)- 🟩 Type: Array of Grasshopper.Kernel.Types.GH_Number
- 📝 Description: An array containing the calculated geodesic distances from the
StartPoint
to each vertex in theMesh
. The distances are represented as Grasshopper numbers for compatibility with other Grasshopper components.