PolyfaceQuery Class

PolyfaceQuery is a static class whose methods implement queries on a polyface or polyface visitor provided as a parameter to each method.

Methods

Name Description
announceSweepLinestringToConvexPolyfaceXY(linestringPoints: GrowableXYZArray, polyface: Polyface, announce: AnnounceDrapePanel): any Static Find segments (within the linestring) which project to facets.  
boundaryEdges(source: Polyface, includeDanglers: boolean = true, includeMismatch: boolean = true, includeNull: boolean = true): CurveCollection | undefined Static Test if the facets in source occur in perfectly mated pairs, as is required for a closed manifold volume.  
clonePartitions(polyface: Polyface | PolyfaceVisitor, partitions: number[][]): Polyface[] Static Clone the facets in each partition to a separate polyface.  
cloneWithColinearEdgeFixup(polyface: Polyface): Polyface Static Clone the facets, inserting removing points that are simply within colinear edges.  
cloneWithTVertexFixup(polyface: Polyface): Polyface Static Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices impinge within edges.  
collectRangeLengthData(polyface: Polyface | PolyfaceVisitor): RangeLengthData Static Find segments (within the linestring) which project to facets.  
computePrincipalAreaMoments(source: Polyface): MomentData | undefined Static Compute area moments for the mesh.  
computePrincipalVolumeMoments(source: Polyface): MomentData | undefined Static Compute area moments for the mesh.  
indexedPolyfaceToLoops(polyface: Polyface): BagOfCurves Static Create a linestring loop for each facet of the polyface.  
isPolyfaceClosedByEdgePairing(source: Polyface): boolean Static Test if the facets in source occur in perfectly mated pairs, as is required for a closed manifold volume.  
partitionFacetIndicesByEdgeConnectedComponent(polyface: Polyface | PolyfaceVisitor): number[][] Static Search the facets for facet subsets that are connected with at least edge contact.  
partitionFacetIndicesByVertexConnectedComponent(polyface: Polyface | PolyfaceVisitor): number[][] Static Search the facets for facet subsets that are connected with at least vertex contact.  
sumFacetAreas(source: Polyface | PolyfaceVisitor): number Static Return the sum of all facets areas.  
sumFacetSecondAreaMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d Static Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all all facets, as viewed from origin.  
sumFacetSecondVolumeMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d Static Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all tetrahedral volumes from origin  
sumTetrahedralVolumes(source: Polyface | PolyfaceVisitor, origin?: Point3d): number Static sum volumes of tetrahedra from origin to all facets.  
sumVolumeBetweenFacetsAndPlane(source: Polyface | PolyfaceVisitor, plane: Plane3dByOriginAndUnitNormal): FacetProjectedVolumeSums Static sum (signed) volumes between facets and a plane.  
sweepLinestringToFacetsXYReturnChains(linestringPoints: GrowableXYZArray, polyface: Polyface): LineString3d[] Static Find segments (within the linestring) which project to facets.  
sweepLinestringToFacetsXYReturnLines(linestringPoints: GrowableXYZArray, polyface: Polyface): LineSegment3d[] Static Find segments (within the linestring) which project to facets.  
sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints: GrowableXYZArray, polyface: Polyface): Polyface Static Find segments (within the linestring) which project to facets.  
visitorToLoop(visitor: PolyfaceVisitor): Loop Static copy the points from a visitor into a Linestring3d in a Loop object  

Defined in

Last Updated: 01 November, 2019