closestPoint Method
Search for a point on the curve that is closest to the spacePoint.
- If the space point is exactly on the curve, this is the reverse of fractionToPoint.
- Since CurvePrimitive should always have start and end available as candidate points, this method should always succeed.
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): undefined | CurveLocationDetail
@returns details of the closest point.
Parameter | Type | Description |
---|---|---|
spacePoint | Point3d | point in space. |
extend | VariantCurveExtendParameter | if applicable, compute the closest point to the curve extended according to variant type: * false: do not extend the curve * true: extend the curve at both start and end * CurveExtendOptions: extend the curve in the specified manner at both start and end * CurveExtendOptions[]: first entry applies to curve start; second, to curve end; any other entries ignored |
result | CurveLocationDetail | optional pre-allocated detail to populate and return. |
Returns - undefined | CurveLocationDetail
details of the closest point.
Defined in
- curve/CurvePrimitive.ts Line 542
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.