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: PolyfaceVisitor | Polyface, 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 the collected line strings.
Parameter | Type | Description |
---|---|---|
lineStringPoints | Point3d[] | GrowableXYZArray | input line string to drape on the mesh. |
polyfaceOrVisitor | PolyfaceVisitor | Polyface | 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[]
the collected line strings.
Defined in
- polyface/PolyfaceQuery.ts Line 1432
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.