M_Rhino_Geometry_Mesh_ClosestMeshPoint - mcneel/rhinocommon-api-docs GitHub Wiki

Mesh.ClosestMeshPoint Method

Gets the point on the mesh that is closest to a given test point. Similar to the ClosestPoint function except this returns a MeshPoint class which includes extra information beyond just the location of the closest point.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public MeshPoint ClosestMeshPoint(
	Point3d testPoint,
	double maximumDistance
)

VB

Public Function ClosestMeshPoint ( 
	testPoint As Point3d,
	maximumDistance As Double
) As MeshPoint

Parameters

 

testPoint
Type: Rhino.Geometry.Point3d
The source of the search.
maximumDistance
Type: System.Double
Optional upper bound on the distance from test point to the mesh. If you are only interested in finding a point Q on the mesh when testPoint.DistanceTo(Q) < maximumDistance, then set maximumDistance to that value. This parameter is ignored if you pass 0.0 for a maximumDistance.

Return Value

Type: MeshPoint
closest point information on success. null on failure.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Mesh Class
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️