sweepLineStringToFacetsXY MethodStatic

Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.

sweepLineStringToFacetsXY(lineStringPoints: Point3d[] | GrowableXYZArray, polyfaceOrVisitor: Polyface | PolyfaceVisitor, searchByReadIndex: Range2dSearchInterface<number>): LineString3d[]

@example Using a 5x5 indexed search grid:

const xyRange = Range2d.createFrom(myPolyface.range());
const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
  searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
}
const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);

@returns collected line strings

Parameter Type Description
lineStringPoints Point3d[] | GrowableXYZArray input line string to drape on the mesh
polyfaceOrVisitor Polyface | PolyfaceVisitor mesh, or mesh visitor to traverse only part of a mesh
searchByReadIndex Range2dSearchInterface<number> object for searching facet 2D ranges tagged by mesh read index

Returns - LineString3d[]

collected line strings

Defined in

Last Updated: 25 April, 2024