closestApproach MethodStatic
Find smallest distance between polylines.
- For polylines with many points, it is more efficient to use searchForClosestApproach.
closestApproach(pointsA: IndexedXYZCollection | Point3d[], extendA: VariantCurveExtendParameter, pointsB: IndexedXYZCollection | Point3d[], extendB: VariantCurveExtendParameter, dMax: numberNumber.MAX_VALUE, result?: CurveLocationDetailPair): undefined | CurveLocationDetailPair
@returns pair of details, one for each polyline, with field values:
a
is the closest approach distancepoint
is the point of closest approachfraction
is the global polyline fractionchildDetail.a
is the segment indexchildDetail.fraction
is the local segment fraction
Parameter | Type | Description |
---|---|---|
pointsA | IndexedXYZCollection | Point3d[] | first polyline |
extendA | VariantCurveExtendParameter | how to extend polylineA forward/backward |
pointsB | IndexedXYZCollection | Point3d[] | second polyline |
extendB | VariantCurveExtendParameter | how to extend polylineB forward/backward |
dMax | number | largest approach distance to consider |
result | CurveLocationDetailPair | optional pre-allocated object to populate and return |
Returns - undefined | CurveLocationDetailPair
pair of details, one for each polyline, with field values:
a
is the closest approach distancepoint
is the point of closest approachfraction
is the global polyline fractionchildDetail.a
is the segment indexchildDetail.fraction
is the local segment fraction
Defined in
- geometry3d/PolylineOps.ts Line 293
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.