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 | (optional) compute the closest point to the curve extended according to variant type (default false) |
result | CurveLocationDetail | (optional) pre-allocated detail to populate and return. |
Returns - undefined | CurveLocationDetail
details of the closest point.
Defined in
- curve/CurvePrimitive.ts Line 570
Last Updated: 07 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.