PolyfaceRangeTreeContext Class

Handler class for searching a range tree containing the facets of a polyface.

  • Facilitates multiple searches for closest point and close approach calculations.

Methods

Name Description
searchForClosestPoint(spacePoint: Readonly<WritableXAndY> | Readonly<WritableXYAndZ>, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetail | FacetLocationDetail[] | undefined Search the range tree for closest facet(s) to spacePoint.  
createCapture(visitor: PolyfaceVisitor | Polyface, maxChildPerNode: number = 4, maxAppDataPerLeaf: number = 4, convexFacets: boolean = false): PolyfaceRangeTreeContext | undefined Static Create a range tree context for the Polyface facets.  
searchForClosestApproach(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetailPair | FacetLocationDetailPair[] | undefined Static Search the range trees for closest approach(es) between the polyfaces.  

Properties

Name Type Description
convexFacets boolean Whether all facets to visit are known to be convex.  
numFacetTest number Diagnostic: number of facet tests.  
numRangeTestFalse number Diagnostic: number of range tests that have been returned false  
numRangeTestTrue number Diagnostic: number of range tests that have returned true.  
numSearch number Diagnostic: number of searches performed.  
visitor PolyfaceVisitor Visitor for the polyface being searched  

Defined in

Last Updated: 04 June, 2026