closestApproach MethodStatic

Compute the closest approach between a pair of line segments.

  • The approach distance is returned in the a fields of the details.

closestApproach(segmentA: LineSegment3d, extendA: VariantCurveExtendParameter, segmentB: LineSegment3d, extendB: VariantCurveExtendParameter, result?: CurveLocationDetailPair): undefined | CurveLocationDetailPair

@returns pair of details, one per segment, each with a field set to the closest approach distance

Parameter Type Description
segmentA LineSegment3d first line segment
extendA VariantCurveExtendParameter how to extend segmentA forward/backward
segmentB LineSegment3d second line segment
extendB VariantCurveExtendParameter how to extend segmentB forward/backward
result CurveLocationDetailPair optional pre-allocated object to populate and return

Returns - undefined | CurveLocationDetailPair

pair of details, one per segment, each with a field set to the closest approach distance

Defined in

Last Updated: 14 November, 2024