|
IBrepClosestPoint Method (Point3, Point3, ComponentIndex3, Double, Double, Double, Vector3)
|
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.Geometry
Assembly:
KarambaCommon (in KarambaCommon.dll) Version: 2.2.0.4 (2.2.0.4)
Syntaxbool 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
Parameters
- testPoint
- Type: Karamba.GeometryPoint3
base point to project to surface. - closestPoint
- Type: Karamba.GeometryPoint3
location of the closest brep point. - ci
- Type: Karamba.GeometryComponentIndex3
Component index of the brep component that contains
the closest point. Possible types are brep_face, brep_edge or brep_vertex. - s
- Type: SystemDouble
If the ci type is brep_edge, then s is the parameter
of the closest edge point. - t
- Type: SystemDouble
If the ci type is brep_face, then (s,t) is the parameter
of the closest edge point. - maximumDistance
- Type: SystemDouble
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: Karamba.GeometryVector3
The normal to the face if ci is a brep_face
and the tangent to the edge if ci is brep_edge.
Return Value
Type:
Booleantrue if the operation succeeded; otherwise, false.
See Also