Description:

Gets the point on the mesh that is closest to a given test point.

Syntax:
public int ClosestPoint(
Point3d testPoint,
out Point3d pointOnMesh,
double maximumDistance
)
Parameters:
  • testPoint
  • Type: Point3d
  • Point to search for.
  • pointOnMesh
  • Type: Point3d
  • Point on the mesh closest to testPoint.
  • maximumDistance
  • Type: 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.
Returns:
Type: int
Index of face that the closest point lies on if successful. -1 if not successful; the value of pointOnMesh is undefined.
Available since:
5.0

Description:

Gets the point on the mesh that is closest to a given test point.

Syntax:
public int ClosestPoint(
Point3d testPoint,
out Point3d pointOnMesh,
out Vector3d normalAtPoint,
double maximumDistance
)
Parameters:
  • testPoint
  • Type: Point3d
  • Point to search for.
  • pointOnMesh
  • Type: Point3d
  • Point on the mesh closest to testPoint.
  • normalAtPoint
  • Type: Vector3d
  • The normal vector of the mesh at the closest point.
  • maximumDistance
  • Type: 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.
Returns:
Type: int
Index of face that the closest point lies on if successful. -1 if not successful; the value of pointOnMesh is undefined.
Available since:
5.0

Description:

Gets the point on the mesh that is closest to a given test point.

Syntax:
public Point3d ClosestPoint(
Point3d testPoint
)
Parameters:
  • testPoint
  • Type: Point3d
  • Point to search for.
Returns:
Type: Point3d
The point on the mesh closest to testPoint, or Point3d.Unset on failure.
Available since:
5.0

/
/
/
ClosestPoint

ClosestPoint method

Class:  Rhino.Geometry.Mesh

Nothing found