searchForClosestApproach MethodStatic

Search the range trees for closest approach(es) between the polyfaces.

searchForClosestApproach(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior: booleanfalse): undefined | FacetLocationDetailPair | FacetLocationDetailPair[]

@returns closest approach detail pair(s), one per context, with detail.a set to the approach distance

Parameter Type Description
contextA PolyfaceRangeTreeContext first polyface context
contextB PolyfaceRangeTreeContext second polyface context
maxDist number collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
searchFacetInterior boolean whether to include facet interiors in search (context.convexFacets must be true for both contexts). Default is false: just consider facet boundaries.

Returns - undefined | FacetLocationDetailPair | FacetLocationDetailPair[]

closest approach detail pair(s), one per context, with detail.a set to the approach distance

Defined in

Last Updated: 14 November, 2024