IBrepClosestPoint(Point3, Point3, ComponentIndex3, Double, Double, Double, Vector3) Method
Finds a point on a 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.
Namespace: Karamba.GeometryAssembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
bool ClosestPoint(
Point3 testPoint,
out Point3 closestPoint,
out ComponentIndex3 ci,
out double s,
out double t,
double maximumDistance,
out Vector3 normal
)
Function ClosestPoint (
testPoint As Point3,
<OutAttribute> ByRef closestPoint As Point3,
<OutAttribute> ByRef ci As ComponentIndex3,
<OutAttribute> ByRef s As Double,
<OutAttribute> ByRef t As Double,
maximumDistance As Double,
<OutAttribute> ByRef normal As Vector3
) As Boolean
bool ClosestPoint(
Point3 testPoint,
[OutAttribute] Point3% closestPoint,
[OutAttribute] ComponentIndex3% ci,
[OutAttribute] double% s,
[OutAttribute] double% t,
double maximumDistance,
[OutAttribute] Vector3% normal
)
abstract ClosestPoint :
testPoint : Point3 *
closestPoint : Point3 byref *
ci : ComponentIndex3 byref *
s : float byref *
t : float byref *
maximumDistance : float *
normal : Vector3 byref -> bool
- testPoint Point3
- base point to project to surface.
- closestPoint Point3
- location of the closest brep point.
- ci ComponentIndex3
- Component index of the brep component that contains
the closest point. Possible types are brep_face, brep_edge or brep_vertex.
- s Double
- If the ci type is brep_edge, then s is the parameter
of the closest edge point.
- t Double
- If the ci type is brep_face, then (s,t) is the parameter
of the closest edge point.
- maximumDistance 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 Vector3
- The normal to the face if ci is a brep_face
and the tangent to the edge if ci is brep_edge.
Booleantrue if the operation succeeded; otherwise, false.