closestApproach MethodStatic

Find smallest distance between polygons.

  • For efficiency, input polygons should include closure edge.
  • If searching interiors for close approaches, the polygons are assumed to be convex.

closestApproach(polygonA: IndexedXYZCollection | Point3d[], polygonB: IndexedXYZCollection | Point3d[], dMax: numberNumber.MAX_VALUE, _searchInterior: booleanfalse): undefined | PolygonLocationDetailPair

@returns pair of details, one per polygon. The a field of each detail stores the closest approach distance.

Parameter Type Description
polygonA IndexedXYZCollection | Point3d[] first polygon
polygonB IndexedXYZCollection | Point3d[] second polygon
dMax number optional largest approach distance to consider
_searchInterior boolean If true, include (convex) polygon interiors in computations (currently unimplemented).
If false (default): return closest approach between polygon boundaries only, using closestApproach.

Returns - undefined | PolygonLocationDetailPair

pair of details, one per polygon. The a field of each detail stores the closest approach distance.

Defined in

Last Updated: 17 December, 2024