Description:

Finds a point on the Brep that is closest to testPoint. The method searches all Brep faces looking for the one closest to testPoint. When found, if the closest point falls on the inactive region of the face, then the method finds the face's edge that is closest to testPoint.

Syntax:
public bool ClosestPoint(
Point3d testPoint,
out Point3d closestPoint,
out ComponentIndex ci,
out double s,
out double t,
double maximumDistance,
out Vector3d normal
)
Parameters:
  • testPoint
  • Type: Point3d
  • Base point to project to surface.
  • closestPoint
  • Type: Point3d
  • Location of the closest Brep point.
  • ci
  • Type: ComponentIndex
  • Component index of the Brep component that contains the closest point. Possible component index types are ComponentIndexType.BrepEdge and ComponentIndexType.BrepFace.
  • s
  • Type: double
  • If ci.ComponentIndexType == ComponentIndexType.BrepEdge, then s is the parameter of the closest edge point.
  • t
  • Type: double
  • If ci.ComponentIndexType == ComponentIndexType.BrepFace, then (s,t) is the parameter of the closest face point.
  • maximumDistance
  • Type: double
  • If maximumDistance > 0, then only points whose distance is <= maximumDistance will be returned. Using a positive value of maximumDistance can substantially speed up the search.
  • normal
  • Type: Vector3d
  • If ci.ComponentIndexType == ComponentIndexType.BrepEdge, then this is the tangent to the edge at s. If ci.ComponentIndexType == ComponentIndexType.BrepFace, then this is the normal to the face at (s,t).
Returns:
Type: bool
True if the operation succeeded, False otherwise.
Available since:
5.0

Description:

Finds a point on the brep that is closest to testPoint.

Syntax:
public Point3d ClosestPoint(
Point3d testPoint
)
Parameters:
  • testPoint
  • Type: Point3d
  • Base point to project to brep.
Returns:
Type: Point3d
The point on the Brep closest to testPoint or Point3d.Unset if the operation failed.
Available since:
5.0

/
/
/
ClosestPoint

ClosestPoint method

Class:  Rhino.Geometry.Brep

Nothing found