@itwin/core-geometry 5.1.0-dev.9 → 5.2.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -1
- package/lib/cjs/Geometry.d.ts +18 -10
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +13 -3
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +7 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +4 -5
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +9 -5
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +5 -3
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +2 -0
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +2 -0
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +54 -32
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +56 -37
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +40 -1
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +90 -0
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +3 -2
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +6 -5
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +30 -25
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +9 -2
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +11 -0
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.d.ts +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +2 -0
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +4 -0
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +7 -0
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +15 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +129 -33
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js +20 -9
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js +26 -41
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +74 -39
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +146 -46
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +161 -55
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +32 -18
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +6 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +0 -2
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +4 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +66 -26
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +38 -2
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +5 -4
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +18 -10
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +32 -10
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js +0 -1
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +7 -9
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +23 -45
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js +49 -35
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/cjs/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js +48 -43
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +21 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +32 -13
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +27 -16
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +11 -0
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +77 -36
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/cjs/numerics/SmallSystem.js +129 -73
- package/lib/cjs/numerics/SmallSystem.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
- package/lib/cjs/polyface/FacetOrientation.js +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +19 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +18 -2
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +6 -6
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +39 -42
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +2 -3
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js +2 -4
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +3 -3
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +5 -5
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +7 -0
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +6 -0
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +11 -7
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
- package/lib/cjs/solid/RotationalSweep.js +2 -2
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +5 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +6 -3
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +1 -1
- package/lib/cjs/solid/SweepContour.js +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +4 -0
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.d.ts +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +64 -14
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +149 -32
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +0 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +49 -46
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +2 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +9 -14
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +29 -22
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +18 -10
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +13 -3
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/esm/bspline/BSpline1dNd.js +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +7 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +4 -5
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +7 -5
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +9 -5
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +5 -3
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +2 -0
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +2 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +54 -32
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +56 -37
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +40 -1
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +90 -0
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +3 -2
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +6 -5
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +30 -25
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +9 -2
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +11 -0
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveTypes.d.ts +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +2 -0
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +4 -0
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +7 -0
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +15 -3
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +131 -35
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/esm/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js +20 -9
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js +26 -41
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +74 -39
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +146 -46
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +161 -56
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +32 -18
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +6 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +0 -2
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +4 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +66 -26
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +38 -2
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +5 -4
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +18 -10
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +32 -10
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js +0 -1
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +7 -9
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +23 -45
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js +47 -33
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/esm/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js +48 -43
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +21 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +32 -13
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts +8 -5
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +27 -16
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +11 -0
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +77 -36
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/esm/numerics/SmallSystem.js +129 -73
- package/lib/esm/numerics/SmallSystem.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
- package/lib/esm/polyface/FacetOrientation.js +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +19 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +18 -2
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +6 -6
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +39 -42
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceData.js +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +316 -232
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +2 -3
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js +2 -4
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +3 -3
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +5 -5
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +7 -0
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +6 -0
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +11 -7
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -2
- package/lib/esm/solid/RotationalSweep.js +2 -2
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +1 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +5 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +6 -3
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +1 -1
- package/lib/esm/solid/SweepContour.js +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +4 -0
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.d.ts +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +64 -14
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +149 -32
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +0 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +49 -46
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +2 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +9 -14
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +29 -22
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +7 -6
|
@@ -39,7 +39,6 @@ const SpaceTriangulation_1 = require("../topology/SpaceTriangulation");
|
|
|
39
39
|
const FacetLocationDetail_1 = require("./FacetLocationDetail");
|
|
40
40
|
const FacetOrientation_1 = require("./FacetOrientation");
|
|
41
41
|
const IndexedEdgeMatcher_1 = require("./IndexedEdgeMatcher");
|
|
42
|
-
const IndexedPolyfaceVisitor_1 = require("./IndexedPolyfaceVisitor");
|
|
43
42
|
const BuildAverageNormalsContext_1 = require("./multiclip/BuildAverageNormalsContext");
|
|
44
43
|
const OffsetMeshContext_1 = require("./multiclip/OffsetMeshContext");
|
|
45
44
|
const SweepLineStringToFacetContext_1 = require("./multiclip/SweepLineStringToFacetContext");
|
|
@@ -72,14 +71,27 @@ class SweepLineStringToFacetsOptions {
|
|
|
72
71
|
sideAngle;
|
|
73
72
|
/** Option to assemble lines into chains. */
|
|
74
73
|
assembleChains;
|
|
74
|
+
/**
|
|
75
|
+
* Optional searcher object for vertical sweep speedup. If provided, `vectorToEye` must be the positive Z vector.
|
|
76
|
+
* @example To construct a 5x5 indexed search grid:
|
|
77
|
+
* ````
|
|
78
|
+
* const xyRange = Range2d.createFrom(myPolyface.range());
|
|
79
|
+
* const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
|
|
80
|
+
* for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
|
|
81
|
+
* searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
|
|
82
|
+
* }
|
|
83
|
+
* ````
|
|
84
|
+
*/
|
|
85
|
+
searcher;
|
|
75
86
|
/** Constructor. Captures fully-checked parameters from static create method. */
|
|
76
|
-
constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
|
|
87
|
+
constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
|
|
77
88
|
this.vectorToEye = vectorToEye;
|
|
78
89
|
this.sideAngle = sideAngle;
|
|
79
90
|
this.assembleChains = assembleChains;
|
|
80
91
|
this.collectOnForwardFacets = collectOnForwardFacets;
|
|
81
92
|
this.collectOnSideFacets = collectOnSideFacets;
|
|
82
93
|
this.collectOnRearFacets = collectOnRearFacets;
|
|
94
|
+
this.searcher = searcher;
|
|
83
95
|
}
|
|
84
96
|
/**
|
|
85
97
|
* Create an options structure.
|
|
@@ -88,14 +100,12 @@ class SweepLineStringToFacetsOptions {
|
|
|
88
100
|
* * Default `assembleChains` is `true`.
|
|
89
101
|
* * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
|
|
90
102
|
*/
|
|
91
|
-
static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
|
|
92
|
-
return new SweepLineStringToFacetsOptions(vectorToEye
|
|
103
|
+
static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
|
|
104
|
+
return new SweepLineStringToFacetsOptions((!vectorToEye || searcher) ? Point3dVector3d_1.Vector3d.unitZ() : vectorToEye.clone(), sideAngle?.clone() ?? Angle_1.Angle.createRadians(Geometry_1.Geometry.smallAngleRadians), assembleChains ?? true, collectOnForwardFacets ?? true, collectOnSideFacets ?? true, collectOnRearFacets ?? true, searcher);
|
|
93
105
|
}
|
|
94
106
|
/** Return `true` if all outputs are requested. */
|
|
95
107
|
get collectAll() {
|
|
96
|
-
return this.collectOnForwardFacets
|
|
97
|
-
this.collectOnSideFacets === true &&
|
|
98
|
-
this.collectOnRearFacets === true;
|
|
108
|
+
return this.collectOnForwardFacets && this.collectOnSideFacets && this.collectOnRearFacets;
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
111
|
* Decide if the instance collector flags accept a facet with the given normal.
|
|
@@ -208,21 +218,21 @@ class PolyfaceQuery {
|
|
|
208
218
|
* @param source polyface or visitor.
|
|
209
219
|
* @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
|
|
210
220
|
* If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
|
|
211
|
-
* @returns the sum of all facet areas.
|
|
221
|
+
* @returns the sum of all facet areas.
|
|
212
222
|
*/
|
|
213
223
|
static sumFacetAreas(source, vectorToEye) {
|
|
214
224
|
let sum = 0;
|
|
215
|
-
if (source
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
if (source instanceof Polyface_1.Polyface)
|
|
226
|
+
source = source.createVisitor(1);
|
|
227
|
+
else
|
|
228
|
+
source.setNumWrap(1);
|
|
229
|
+
let unitVectorToEye;
|
|
230
|
+
if (vectorToEye !== undefined)
|
|
231
|
+
unitVectorToEye = vectorToEye.normalize();
|
|
232
|
+
source.reset();
|
|
233
|
+
while (source.moveToNextFacet()) {
|
|
234
|
+
const areaNormal = PolygonOps_1.PolygonOps.areaNormal(source.point.getPoint3dArray());
|
|
235
|
+
sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
|
|
226
236
|
}
|
|
227
237
|
return sum;
|
|
228
238
|
}
|
|
@@ -256,68 +266,46 @@ class PolyfaceQuery {
|
|
|
256
266
|
}
|
|
257
267
|
/**
|
|
258
268
|
* Sum (signed) volumes between facets and a plane.
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
269
|
+
* @param source facet set
|
|
270
|
+
* @param plane infinite plane bounding volume between the input facets and (virtual) side facets perpendicular to the plane.
|
|
271
|
+
* @param skipMoments whether to skip computation of the area moments. Set to `true` if only volume is needed. Default is `false`.
|
|
272
|
+
* @returns a structure with multiple sums:
|
|
273
|
+
* * volume: the sum of (signed) volumes between facets and the plane.
|
|
274
|
+
* * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments: area moment data (centroid, signed area,
|
|
275
|
+
* and second moments with respect to the centroid), separately computed for the input facets that project with
|
|
276
|
+
* positive/negative area onto the plane.
|
|
263
277
|
*/
|
|
264
|
-
static sumVolumeBetweenFacetsAndPlane(source, plane) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
let signedTriangleArea;
|
|
275
|
-
let singleFacetArea;
|
|
276
|
-
const positiveAreaMomentSums = MomentData_1.MomentData.create(undefined, true);
|
|
277
|
-
const negativeAreaMomentSums = MomentData_1.MomentData.create(undefined, true);
|
|
278
|
-
const singleFacetProducts = Matrix4d_1.Matrix4d.createZero();
|
|
279
|
-
const projectToPlane = plane.getProjectionToPlane();
|
|
280
|
-
source.reset();
|
|
278
|
+
static sumVolumeBetweenFacetsAndPlane(source, plane, skipMoments) {
|
|
279
|
+
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
|
|
280
|
+
visitor.setNumWrap(0);
|
|
281
|
+
const workPoint0 = Point3dVector3d_1.Point3d.create();
|
|
282
|
+
const workPoint1 = Point3dVector3d_1.Point3d.create();
|
|
283
|
+
const workVector = Point3dVector3d_1.Vector3d.create();
|
|
284
|
+
const workMatrix = Matrix4d_1.Matrix4d.createZero();
|
|
285
|
+
let signedVolumeTimes6 = 0.0;
|
|
286
|
+
const posSums = skipMoments ? undefined : MomentData_1.MomentData.create(undefined, true);
|
|
287
|
+
const negSums = skipMoments ? undefined : MomentData_1.MomentData.create(undefined, true);
|
|
281
288
|
// For each facet:
|
|
282
289
|
// - form triangles from facet origin to each far edge.
|
|
283
|
-
// - sum signed area and volume contributions.
|
|
284
|
-
// each projected area contribution is twice the area of a triangle.
|
|
285
|
-
// each volume contribution is 3 times the actual volume --
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
facetOrigin.crossProductToPoints(targetA, targetB, triangleNormal);
|
|
297
|
-
hA = plane.altitude(targetA);
|
|
298
|
-
hB = plane.altitude(targetB);
|
|
299
|
-
signedTriangleArea = planeNormal.dotProduct(triangleNormal);
|
|
300
|
-
singleFacetArea += signedTriangleArea;
|
|
301
|
-
signedVolumeSum += signedTriangleArea * (h0 + hA + hB);
|
|
302
|
-
}
|
|
303
|
-
singleFacetProducts.setZero();
|
|
304
|
-
source.point.multiplyTransformInPlace(projectToPlane);
|
|
305
|
-
PolygonOps_1.PolygonOps.addSecondMomentAreaProducts(source.point, facetOrigin, singleFacetProducts);
|
|
306
|
-
if (singleFacetArea > 0) {
|
|
307
|
-
positiveAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
negativeAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
|
|
290
|
+
// - sum signed area and volume contributions (for non-convex facet, signs can be mixed).
|
|
291
|
+
// - each projected area contribution is twice the area of a triangle.
|
|
292
|
+
// - each volume contribution is 3 times the actual volume -- a third of the altitude sum is the centroid altitude.
|
|
293
|
+
const options = { skipMoments, p0: workPoint0, p1: workPoint1, v0: workVector, m0: workMatrix };
|
|
294
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
295
|
+
const facetData = PolygonOps_1.PolygonOps.volumeBetweenPolygonAndPlane(visitor.point, plane, options);
|
|
296
|
+
signedVolumeTimes6 += facetData.volume6;
|
|
297
|
+
if (!skipMoments) {
|
|
298
|
+
(0, core_bentley_1.assert)(posSums !== undefined && negSums !== undefined && facetData.origin !== undefined && facetData.products !== undefined);
|
|
299
|
+
if (facetData.area2 > 0)
|
|
300
|
+
posSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
|
|
301
|
+
else
|
|
302
|
+
negSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
|
|
311
303
|
}
|
|
312
304
|
}
|
|
313
|
-
positiveAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
314
|
-
negativeAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
315
|
-
const positiveAreaMoments = MomentData_1.MomentData.inertiaProductsToPrincipalAxes(positiveAreaMomentSums.origin, positiveAreaMomentSums.sums);
|
|
316
|
-
const negativeAreaMoments = MomentData_1.MomentData.inertiaProductsToPrincipalAxes(negativeAreaMomentSums.origin, negativeAreaMomentSums.sums);
|
|
317
305
|
return {
|
|
318
|
-
volume:
|
|
319
|
-
positiveProjectedFacetAreaMoments:
|
|
320
|
-
negativeProjectedFacetAreaMoments:
|
|
306
|
+
volume: signedVolumeTimes6 / 6.0,
|
|
307
|
+
positiveProjectedFacetAreaMoments: posSums ? MomentData_1.MomentData.inertiaProductsToPrincipalAxes(posSums.origin, posSums.sums) : undefined,
|
|
308
|
+
negativeProjectedFacetAreaMoments: negSums ? MomentData_1.MomentData.inertiaProductsToPrincipalAxes(negSums.origin, negSums.sums) : undefined,
|
|
321
309
|
};
|
|
322
310
|
}
|
|
323
311
|
/** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
|
|
@@ -392,7 +380,7 @@ class PolyfaceQuery {
|
|
|
392
380
|
* Compute a number summarizing the dihedral angles in the mesh.
|
|
393
381
|
* * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
|
|
394
382
|
* product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
|
|
395
|
-
* @param source
|
|
383
|
+
* @param source facets.
|
|
396
384
|
* @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
|
|
397
385
|
* See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
|
|
398
386
|
* connected components.
|
|
@@ -408,19 +396,21 @@ class PolyfaceQuery {
|
|
|
408
396
|
static dihedralAngleSummary(source, ignoreBoundaries = false) {
|
|
409
397
|
// more info can be found at geometry/internaldocs/Polyface.md
|
|
410
398
|
const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
|
|
411
|
-
const
|
|
412
|
-
visitor.
|
|
413
|
-
|
|
399
|
+
const vertices = source instanceof Polyface_1.Polyface ? source.data.point : undefined;
|
|
400
|
+
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(1) : source;
|
|
401
|
+
visitor.setNumWrap(1);
|
|
414
402
|
const centroidNormal = [];
|
|
415
403
|
let normalCounter = 0;
|
|
416
|
-
|
|
404
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
417
405
|
const numEdges = visitor.pointCount - 1;
|
|
418
406
|
const normal = PolygonOps_1.PolygonOps.centroidAreaNormal(visitor.point);
|
|
419
407
|
if (normal === undefined)
|
|
420
408
|
return -2;
|
|
421
409
|
centroidNormal.push(normal);
|
|
422
410
|
for (let i = 0; i < numEdges; i++) {
|
|
423
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
|
|
411
|
+
const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
|
|
412
|
+
if (!vertices) // decorate if we don't have vertices to query later
|
|
413
|
+
edge.edgeVector = Point3dVector3d_1.Vector3d.createStartEnd(visitor.point.getPoint3dAtUncheckedPointIndex(i), visitor.point.getPoint3dAtUncheckedPointIndex(i + 1));
|
|
424
414
|
}
|
|
425
415
|
normalCounter++;
|
|
426
416
|
}
|
|
@@ -438,11 +428,16 @@ class PolyfaceQuery {
|
|
|
438
428
|
let numNegative = 0;
|
|
439
429
|
const edgeVector = Point3dVector3d_1.Vector3d.create();
|
|
440
430
|
for (const cluster of manifoldClusters) {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
431
|
+
if (Array.isArray(cluster) && cluster.length === 2) {
|
|
432
|
+
const sideA = cluster[0];
|
|
433
|
+
const sideB = cluster[1];
|
|
434
|
+
if (vertices)
|
|
435
|
+
vertices.vectorIndexIndex(sideA.startVertex, sideA.endVertex, edgeVector);
|
|
436
|
+
else
|
|
437
|
+
edgeVector.setFrom(sideA.edgeVector);
|
|
438
|
+
const facetNormalA = centroidNormal[sideA.facetIndex].direction;
|
|
439
|
+
const facetNormalB = centroidNormal[sideB.facetIndex].direction;
|
|
440
|
+
const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
|
|
446
441
|
if (dihedralAngle.isAlmostZero)
|
|
447
442
|
numPlanar++;
|
|
448
443
|
else if (dihedralAngle.radians > 0.0)
|
|
@@ -478,26 +473,50 @@ class PolyfaceQuery {
|
|
|
478
473
|
static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
|
|
479
474
|
return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
|
|
480
475
|
}
|
|
476
|
+
/** Helper function to detect a subset visitor. */
|
|
477
|
+
static isSubsetVisitor(visitor) {
|
|
478
|
+
if (visitor instanceof Polyface_1.Polyface)
|
|
479
|
+
return false;
|
|
480
|
+
const parentFacetCount = visitor.clientPolyface()?.facetCount;
|
|
481
|
+
const visitableFacetCount = visitor.getVisitableFacetCount?.();
|
|
482
|
+
if (parentFacetCount === undefined || visitableFacetCount === undefined)
|
|
483
|
+
return false;
|
|
484
|
+
return parentFacetCount > visitableFacetCount;
|
|
485
|
+
}
|
|
481
486
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
|
|
485
|
-
|
|
487
|
+
* Faster version of isPolyfaceManifold for specific input.
|
|
488
|
+
* @returns whether the mesh is manifold, or undefined if unsuccessful.
|
|
489
|
+
*/
|
|
490
|
+
static isPolyfaceManifoldFast(source, allowSimpleBoundaries) {
|
|
491
|
+
if (allowSimpleBoundaries)
|
|
492
|
+
return undefined; // edgeMateIndex does not distinguish boundary edges from non-manifold edges so we can only speed things up if we search for both
|
|
493
|
+
if (this.isSubsetVisitor(source))
|
|
494
|
+
return false; // edgeMateIndex doesn't capture the facet subset boundary
|
|
495
|
+
const parentData = Polyface_1.IndexedPolyface.hasEdgeMateIndex(source);
|
|
496
|
+
if (!parentData)
|
|
497
|
+
return undefined;
|
|
498
|
+
for (const edgeMate of parentData.edgeMateIndex) {
|
|
499
|
+
if (edgeMate === undefined)
|
|
500
|
+
return false; // found a boundary or non-manifold edge
|
|
501
|
+
}
|
|
502
|
+
return true; // this is a 2-manifold closed surface
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Test edge pairing in `source` mesh.
|
|
486
506
|
* * Any edge with 3 or more adjacent facets triggers `false` return.
|
|
487
|
-
* * Any edge with 2 adjacent facets in the same direction triggers
|
|
507
|
+
* * Any edge with 2 adjacent facets in the same direction triggers `false` return.
|
|
508
|
+
* * Null edges are ignored.
|
|
509
|
+
* @param source facet set to examine
|
|
510
|
+
* @param allowSimpleBoundaries if `false` (default), a return value of `true` means the facets form a closed
|
|
511
|
+
* 2-manifold surface; if `true`, a return value of `true` means the facets form a 2-manifold surface which may
|
|
512
|
+
* have a boundary, but is still properly matched internally.
|
|
488
513
|
*/
|
|
489
514
|
static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
while (visitor.moveToNextFacet()) {
|
|
494
|
-
const numEdges = visitor.pointCount - 1;
|
|
495
|
-
for (let i = 0; i < numEdges; i++) {
|
|
496
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
497
|
-
}
|
|
498
|
-
}
|
|
515
|
+
const isManifold = this.isPolyfaceManifoldFast(source, allowSimpleBoundaries);
|
|
516
|
+
if (isManifold !== undefined)
|
|
517
|
+
return isManifold;
|
|
499
518
|
const badClusters = [];
|
|
500
|
-
|
|
519
|
+
this.createIndexedEdges(source).sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
|
|
501
520
|
return badClusters.length === 0;
|
|
502
521
|
}
|
|
503
522
|
/** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
|
|
@@ -505,50 +524,107 @@ class PolyfaceQuery {
|
|
|
505
524
|
return this.isPolyfaceManifold(source, false);
|
|
506
525
|
}
|
|
507
526
|
/**
|
|
508
|
-
*
|
|
509
|
-
*
|
|
527
|
+
* Faster version of announceBoundaryEdges for specific input.
|
|
528
|
+
* @returns true if successfully announced boundary edges.
|
|
529
|
+
*/
|
|
530
|
+
static announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull) {
|
|
531
|
+
if (includeTypical !== includeMismatch)
|
|
532
|
+
return false; // edgeMateIndex does not distinguish boundary edges from non-manifold edges
|
|
533
|
+
if (!includeTypical && !includeNull)
|
|
534
|
+
return true;
|
|
535
|
+
if (this.isSubsetVisitor(source))
|
|
536
|
+
return false; // edgeMateIndex doesn't capture the facet subset boundary
|
|
537
|
+
const parentData = Polyface_1.IndexedPolyface.hasEdgeMateIndex(source);
|
|
538
|
+
if (!parentData)
|
|
539
|
+
return false;
|
|
540
|
+
const pointA = Point3dVector3d_1.Point3d.create();
|
|
541
|
+
const pointB = Point3dVector3d_1.Point3d.create();
|
|
542
|
+
for (let edgeIndex = 0; edgeIndex < parentData.edgeMateIndex.length; edgeIndex++) {
|
|
543
|
+
const edgeMate = parentData.edgeMateIndex[edgeIndex];
|
|
544
|
+
const announceBoundaryOrNonManifoldEdge = includeTypical && edgeMate === undefined;
|
|
545
|
+
const announceNullEdge = includeNull && edgeMate === edgeIndex;
|
|
546
|
+
if (announceBoundaryOrNonManifoldEdge || announceNullEdge) {
|
|
547
|
+
const facetIndex = parentData.parent.edgeIndexToFacetIndex(edgeIndex);
|
|
548
|
+
if (facetIndex !== undefined) { // should always be defined
|
|
549
|
+
const pointIndexA = parentData.parent.data.pointIndex[edgeIndex];
|
|
550
|
+
let nextEdgeIndex = edgeIndex + 1;
|
|
551
|
+
if (nextEdgeIndex >= parentData.parent.facetIndex1(facetIndex))
|
|
552
|
+
nextEdgeIndex = parentData.parent.facetIndex0(facetIndex);
|
|
553
|
+
const pointIndexB = parentData.parent.data.pointIndex[nextEdgeIndex];
|
|
554
|
+
parentData.parent.data.getPoint(pointIndexA, pointA);
|
|
555
|
+
parentData.parent.data.getPoint(pointIndexB, pointB);
|
|
556
|
+
announceEdge(pointA, pointB, pointIndexA, pointIndexB, facetIndex);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return true;
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Announce boundary edges of the facet set as line segments.
|
|
510
564
|
* @param source polyface or visitor.
|
|
511
565
|
* @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
|
|
512
|
-
* start and end indices, and facet index.
|
|
513
|
-
* @param includeTypical true to announce typical boundary edges with a single adjacent facet.
|
|
514
|
-
* @param includeMismatch true to announce edges
|
|
515
|
-
*
|
|
566
|
+
* start and end vertex indices, and facet index.
|
|
567
|
+
* @param includeTypical true to announce typical boundary edges with a single adjacent facet. Default is true.
|
|
568
|
+
* @param includeMismatch true to announce non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
569
|
+
* orientations). Default is true.
|
|
570
|
+
* @param includeNull true to announce edges with identical start and end vertex indices. Default is true.
|
|
571
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
572
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
573
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
516
574
|
*/
|
|
517
575
|
static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
518
|
-
if (source
|
|
576
|
+
if (this.announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull))
|
|
519
577
|
return;
|
|
520
|
-
|
|
578
|
+
if (!includeTypical && !includeMismatch && !includeNull)
|
|
579
|
+
return;
|
|
580
|
+
const vertices = source instanceof Polyface_1.Polyface ? source.data.point : undefined;
|
|
521
581
|
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(1) : source;
|
|
522
582
|
visitor.setNumWrap(1);
|
|
523
|
-
|
|
524
|
-
|
|
583
|
+
const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
|
|
584
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
525
585
|
const numEdges = visitor.pointCount - 1;
|
|
526
586
|
for (let i = 0; i < numEdges; i++) {
|
|
527
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
587
|
+
const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
588
|
+
if (!vertices) { // decorate if we don't have vertices to query later
|
|
589
|
+
edge.pointA = visitor.point.getPoint3dAtUncheckedPointIndex(i);
|
|
590
|
+
edge.pointB = visitor.point.getPoint3dAtUncheckedPointIndex(i + 1);
|
|
591
|
+
}
|
|
528
592
|
}
|
|
529
593
|
}
|
|
530
594
|
const boundaryEdges = [];
|
|
531
|
-
|
|
595
|
+
const typicalEdges = includeTypical ? boundaryEdges : undefined;
|
|
596
|
+
const nullEdges = includeNull ? boundaryEdges : undefined;
|
|
597
|
+
const mismatchEdges = includeMismatch ? boundaryEdges : undefined;
|
|
598
|
+
edges.sortAndCollectClusters(undefined, typicalEdges, nullEdges, mismatchEdges);
|
|
532
599
|
if (boundaryEdges.length === 0)
|
|
533
600
|
return;
|
|
534
|
-
const sourcePolyface = visitor.clientPolyface();
|
|
535
601
|
const pointA = Point3dVector3d_1.Point3d.create();
|
|
536
602
|
const pointB = Point3dVector3d_1.Point3d.create();
|
|
537
603
|
for (const e of boundaryEdges) {
|
|
538
|
-
const e1 = e instanceof IndexedEdgeMatcher_1.SortableEdge ? e : e[0];
|
|
539
|
-
const indexA = e1.
|
|
540
|
-
const indexB = e1.
|
|
541
|
-
if (
|
|
542
|
-
|
|
604
|
+
const e1 = e instanceof IndexedEdgeMatcher_1.SortableEdge ? e : e[0]; // only report the first edge in a cluster!
|
|
605
|
+
const indexA = e1.startVertex;
|
|
606
|
+
const indexB = e1.endVertex;
|
|
607
|
+
if (vertices) {
|
|
608
|
+
vertices.getPoint3dAtUncheckedPointIndex(indexA, pointA);
|
|
609
|
+
vertices.getPoint3dAtUncheckedPointIndex(indexB, pointB);
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
pointA.setFrom(e1.pointA);
|
|
613
|
+
pointB.setFrom(e1.pointB);
|
|
614
|
+
}
|
|
615
|
+
announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
|
|
543
616
|
}
|
|
544
617
|
}
|
|
545
618
|
/**
|
|
546
|
-
*
|
|
547
|
-
* * Each edge is a LineSegment3d.
|
|
619
|
+
* Collect boundary edges of the facet set as an unordered collection of line segments.
|
|
548
620
|
* @param source polyface or visitor.
|
|
549
|
-
* @param includeTypical true to
|
|
550
|
-
* @param includeMismatch true to include edges
|
|
551
|
-
*
|
|
621
|
+
* @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
|
|
622
|
+
* @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
623
|
+
* orientations). Default is true.
|
|
624
|
+
* @param includeNull true to include edges with identical start and end vertex indices. Default is true.
|
|
625
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
626
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
627
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
552
628
|
*/
|
|
553
629
|
static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
554
630
|
const result = new CurveCollection_1.BagOfCurves();
|
|
@@ -561,33 +637,32 @@ class PolyfaceQuery {
|
|
|
561
637
|
return result;
|
|
562
638
|
}
|
|
563
639
|
/**
|
|
564
|
-
* Collect boundary edges.
|
|
565
|
-
* * Return the edges as the simplest collection of chains of line segments.
|
|
640
|
+
* Collect boundary edges of the facet set as the simplest collection of chains of line segments.
|
|
566
641
|
* @param source polyface or visitor.
|
|
567
|
-
* @param includeTypical true to include typical boundary edges with a single adjacent facet.
|
|
568
|
-
* @param includeMismatch true to include edges
|
|
569
|
-
*
|
|
642
|
+
* @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
|
|
643
|
+
* @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
644
|
+
* orientations). Default is true.
|
|
645
|
+
* @param includeNull true to include edges with identical start and end vertex indices. Default is true.
|
|
646
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
647
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
648
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
570
649
|
*/
|
|
571
650
|
static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
572
651
|
const collector = new MultiChainCollector_1.MultiChainCollector(Geometry_1.Geometry.smallMetricDistance, Geometry_1.Geometry.smallMetricDistance);
|
|
573
|
-
|
|
652
|
+
const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
|
|
653
|
+
PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
|
|
574
654
|
return collector.grabResult(true);
|
|
575
655
|
}
|
|
576
656
|
/**
|
|
577
|
-
* Load
|
|
578
|
-
* @param polyface a mesh or
|
|
579
|
-
|
|
657
|
+
* Load an IndexedEdgeMatcher from the edges of a mesh.
|
|
658
|
+
* @param polyface a mesh or visitor
|
|
659
|
+
*/
|
|
580
660
|
static createIndexedEdges(polyface) {
|
|
581
|
-
if (polyface instanceof Polyface_1.Polyface)
|
|
582
|
-
return this.createIndexedEdges(polyface.createVisitor(1));
|
|
583
661
|
const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
|
|
584
|
-
polyface.
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
|
|
589
|
-
}
|
|
590
|
-
}
|
|
662
|
+
const visitor = polyface instanceof Polyface_1.Polyface ? polyface.createVisitor(1) : polyface;
|
|
663
|
+
visitor.setNumWrap(1);
|
|
664
|
+
for (visitor.reset(); visitor.moveToNextFacet();)
|
|
665
|
+
edges.addPath(visitor.pointIndex, visitor.currentReadIndex(), false);
|
|
591
666
|
return edges;
|
|
592
667
|
}
|
|
593
668
|
/**
|
|
@@ -623,8 +698,8 @@ class PolyfaceQuery {
|
|
|
623
698
|
for (const pair of manifoldEdges) {
|
|
624
699
|
if (!Array.isArray(pair) || pair.length !== 2)
|
|
625
700
|
continue;
|
|
626
|
-
const indexA = pair[0].
|
|
627
|
-
const indexB = pair[0].
|
|
701
|
+
const indexA = pair[0].startVertex;
|
|
702
|
+
const indexB = pair[0].endVertex;
|
|
628
703
|
if (!mesh.data.getPoint(indexA, pointA) || !mesh.data.getPoint(indexB, pointB))
|
|
629
704
|
continue;
|
|
630
705
|
const face0 = analyzeFace(pair[0].facetIndex);
|
|
@@ -799,7 +874,7 @@ class PolyfaceQuery {
|
|
|
799
874
|
}
|
|
800
875
|
/**
|
|
801
876
|
* Return the boundary of facets that are facing the eye.
|
|
802
|
-
* @param polyface
|
|
877
|
+
* @param source polyface or visitor. Must be capable of constructing a subset visitor.
|
|
803
878
|
* @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
|
|
804
879
|
* * 0 ==> forward facing
|
|
805
880
|
* * 1 ==> rear facing
|
|
@@ -807,21 +882,29 @@ class PolyfaceQuery {
|
|
|
807
882
|
* @param vectorToEye the vector to eye
|
|
808
883
|
* @param sideAngleTolerance the tolerance of side angle
|
|
809
884
|
*/
|
|
810
|
-
static boundaryOfVisibleSubset(
|
|
811
|
-
const
|
|
885
|
+
static boundaryOfVisibleSubset(source, visibilitySelect, vectorToEye, sideAngleTolerance = Angle_1.Angle.createDegrees(1.0e-3)) {
|
|
886
|
+
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
|
|
887
|
+
if (!visitor.createSubsetVisitor)
|
|
888
|
+
return undefined;
|
|
889
|
+
const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(source, vectorToEye, sideAngleTolerance);
|
|
812
890
|
if (partitionedIndices[visibilitySelect].length === 0)
|
|
813
891
|
return undefined;
|
|
814
|
-
const
|
|
815
|
-
return this.boundaryEdges(
|
|
892
|
+
const subsetVisitor = visitor.createSubsetVisitor(partitionedIndices[visibilitySelect], 1);
|
|
893
|
+
return this.boundaryEdges(subsetVisitor, true, false, false);
|
|
816
894
|
}
|
|
817
895
|
/**
|
|
818
|
-
*
|
|
819
|
-
* *
|
|
820
|
-
*
|
|
896
|
+
* Announce boundary edges of the facet set as linestrings.
|
|
897
|
+
* * Ignores non-manifold interior edges and null edges.
|
|
898
|
+
* @param source polyface or visitor.
|
|
899
|
+
* @param announceChain function to be called with each chain of boundary edges.
|
|
900
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
901
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
902
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
821
903
|
*/
|
|
822
|
-
static announceBoundaryChainsAsLineString3d(
|
|
904
|
+
static announceBoundaryChainsAsLineString3d(source, announceChain) {
|
|
823
905
|
const collector = new MultiChainCollector_1.MultiChainCollector(Geometry_1.Geometry.smallMetricDistance); // no planarity tolerance needed
|
|
824
|
-
|
|
906
|
+
const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
|
|
907
|
+
PolyfaceQuery.announceBoundaryEdges(source, announceEdge, true, false, false);
|
|
825
908
|
collector.announceChainsAsLineString3d(announceChain);
|
|
826
909
|
}
|
|
827
910
|
/**
|
|
@@ -1166,94 +1249,99 @@ class PolyfaceQuery {
|
|
|
1166
1249
|
});
|
|
1167
1250
|
return builder.claimPolyface(true);
|
|
1168
1251
|
}
|
|
1169
|
-
/** @deprecated in 4.
|
|
1252
|
+
/** @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
|
|
1170
1253
|
static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
|
|
1171
1254
|
return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
|
|
1172
1255
|
}
|
|
1173
1256
|
/**
|
|
1174
|
-
* Sweep the line string to intersections with a mesh.
|
|
1175
|
-
* * Return collected line segments.
|
|
1176
|
-
* * If no options are given, the default sweep direction is the z-axis, and chains are assembled and returned.
|
|
1177
|
-
* * See [[SweepLineStringToFacetsOptions]] for input and output options, including filtering by forward/side/rear facets.
|
|
1257
|
+
* Sweep the line string to intersections with a mesh and return collected line segments.
|
|
1178
1258
|
* * Facets are ASSUMED to be convex and planar, and not overlap in the sweep direction.
|
|
1259
|
+
* @param points the linestring to drape onto the mesh.
|
|
1260
|
+
* @param source target facet set. For best results, facets should be convex and planar.
|
|
1261
|
+
* @param options input, filtering, search, and output options.
|
|
1262
|
+
* * If `undefined`, the default sweep direction is the positive z-axis, and chains are assembled and returned.
|
|
1263
|
+
* * For faster _vertical_ sweep, a pre-computed range tree can be supplied in `options.searcher`.
|
|
1264
|
+
* * For faster _non-vertical_ sweep, first transform inputs with the inverse of the transform
|
|
1265
|
+
* `T = Transform.createRigidFromOriginAndVector(undefined, options.vectorToEye)`, construct the searcher on these
|
|
1266
|
+
* local facets, call `sweepLineStringToFacets/XY` with these local inputs (and default sweep direction), and lastly,
|
|
1267
|
+
* transform the returned draped linework back to world coordinates with `T`.
|
|
1179
1268
|
*/
|
|
1180
|
-
static sweepLineStringToFacets(
|
|
1269
|
+
static sweepLineStringToFacets(points, source, options) {
|
|
1181
1270
|
let result = [];
|
|
1182
|
-
// setup default options
|
|
1183
1271
|
if (options === undefined)
|
|
1184
|
-
options = SweepLineStringToFacetsOptions.create(
|
|
1185
|
-
true, true, true, true);
|
|
1272
|
+
options = SweepLineStringToFacetsOptions.create();
|
|
1186
1273
|
let chainContext;
|
|
1187
1274
|
if (options.assembleChains)
|
|
1188
1275
|
chainContext = ChainMerge_1.ChainMergeContext.create();
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1276
|
+
const addSegment = chainContext ? (ptA, ptB) => chainContext.addSegment(ptA, ptB) : (ptA, ptB) => result.push(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
|
|
1277
|
+
const workNormal = Point3dVector3d_1.Vector3d.createZero();
|
|
1278
|
+
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
|
|
1279
|
+
visitor.setNumWrap(0);
|
|
1280
|
+
if (options.searcher && options.vectorToEye.isParallelTo(Point3dVector3d_1.Vector3d.unitZ())) {
|
|
1281
|
+
const searchRange = Range_1.Range3d.createNull();
|
|
1282
|
+
const workPoint0 = Point3dVector3d_1.Point3d.createZero();
|
|
1283
|
+
const workPoint1 = Point3dVector3d_1.Point3d.createZero();
|
|
1284
|
+
let edgeClipper;
|
|
1285
|
+
const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
|
|
1286
|
+
if (visitor.moveToReadIndex(readIndex) && (options.collectAll || options.collectFromThisFacetNormal(PolygonOps_1.PolygonOps.areaNormalGo(visitor.point, workNormal))))
|
|
1287
|
+
edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => addSegment(ptA, ptB));
|
|
1288
|
+
return true;
|
|
1289
|
+
};
|
|
1290
|
+
for (let i = 1; i < points.length; i++) {
|
|
1291
|
+
points.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
|
|
1292
|
+
points.getPoint3dAtUncheckedPointIndex(i, workPoint1);
|
|
1293
|
+
if (edgeClipper = SweepLineStringToFacetContext_1.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, options.vectorToEye)) {
|
|
1294
|
+
searchRange.setNull();
|
|
1295
|
+
searchRange.extend(workPoint0, workPoint1);
|
|
1296
|
+
options.searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
|
|
1205
1297
|
}
|
|
1206
1298
|
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
const context = SweepLineStringToFacetContext_1.ClipSweptLineStringContext.create(points, options.vectorToEye);
|
|
1302
|
+
if (context) {
|
|
1303
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
1304
|
+
if (options.collectAll || options.collectFromThisFacetNormal(PolygonOps_1.PolygonOps.areaNormalGo(visitor.point, workNormal)))
|
|
1305
|
+
context.processPolygon(visitor.point.getArray(), addSegment);
|
|
1306
|
+
}
|
|
1210
1307
|
}
|
|
1211
1308
|
}
|
|
1309
|
+
if (chainContext) {
|
|
1310
|
+
chainContext.clusterAndMergeVerticesXYZ();
|
|
1311
|
+
result = chainContext.collectMaximalChains();
|
|
1312
|
+
}
|
|
1212
1313
|
return result;
|
|
1213
1314
|
}
|
|
1214
1315
|
/**
|
|
1215
1316
|
* Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
|
|
1216
|
-
* @param
|
|
1217
|
-
* @param
|
|
1218
|
-
* @param
|
|
1219
|
-
* @example Using a 5x5 indexed search grid:
|
|
1220
|
-
* ```
|
|
1221
|
-
* const xyRange = Range2d.createFrom(myPolyface.range());
|
|
1222
|
-
* const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
|
|
1223
|
-
* for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
|
|
1224
|
-
* searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
|
|
1225
|
-
* }
|
|
1226
|
-
* const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
|
|
1227
|
-
* ```
|
|
1317
|
+
* @param points the linestring to drape onto the mesh.
|
|
1318
|
+
* @param source target facet set. For best results, facets should be convex and planar.
|
|
1319
|
+
* @param searcher object for searching facet 2D ranges tagged by mesh read index.
|
|
1228
1320
|
* @returns the collected line strings.
|
|
1321
|
+
* @see [[sweepLineStringToFacets]] for further options.
|
|
1229
1322
|
*/
|
|
1230
|
-
static sweepLineStringToFacetsXY(
|
|
1323
|
+
static sweepLineStringToFacetsXY(points, source, searcher) {
|
|
1231
1324
|
const chainContext = ChainMerge_1.ChainMergeContext.create();
|
|
1232
|
-
const
|
|
1325
|
+
const vectorToEye = Point3dVector3d_1.Vector3d.unitZ();
|
|
1233
1326
|
const searchRange = Range_1.Range3d.create();
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1327
|
+
const workPoint0 = Point3dVector3d_1.Point3d.createZero();
|
|
1328
|
+
const workPoint1 = Point3dVector3d_1.Point3d.createZero();
|
|
1329
|
+
const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
|
|
1330
|
+
visitor.setNumWrap(0);
|
|
1331
|
+
let edgeClipper;
|
|
1332
|
+
const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
|
|
1333
|
+
if (visitor.moveToReadIndex(readIndex))
|
|
1334
|
+
edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => chainContext.addSegment(ptA, ptB));
|
|
1335
|
+
return true;
|
|
1336
|
+
};
|
|
1337
|
+
const lineStringSource = Array.isArray(points) ? new Point3dArrayCarrier_1.Point3dArrayCarrier(points) : points;
|
|
1244
1338
|
for (let i = 1; i < lineStringSource.length; i++) {
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
searchRange.extendPoint(point1);
|
|
1252
|
-
searchByReadIndex.searchRange2d(searchRange, (_facetRange, readIndex) => {
|
|
1253
|
-
if (visitor.moveToReadIndex(readIndex))
|
|
1254
|
-
edgeClipper.processPolygon(visitor.point, (pointA, pointB) => chainContext.addSegment(pointA, pointB));
|
|
1255
|
-
return true;
|
|
1256
|
-
});
|
|
1339
|
+
lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
|
|
1340
|
+
lineStringSource.getPoint3dAtUncheckedPointIndex(i, workPoint1);
|
|
1341
|
+
if (edgeClipper = SweepLineStringToFacetContext_1.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, vectorToEye)) {
|
|
1342
|
+
searchRange.setNull();
|
|
1343
|
+
searchRange.extend(workPoint0, workPoint1);
|
|
1344
|
+
searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
|
|
1257
1345
|
}
|
|
1258
1346
|
}
|
|
1259
1347
|
chainContext.clusterAndMergeVerticesXYZ();
|
|
@@ -1264,24 +1352,20 @@ class PolyfaceQuery {
|
|
|
1264
1352
|
* * Return collected line segments.
|
|
1265
1353
|
* * This calls [[sweepLineStringToFacets]] with options created by
|
|
1266
1354
|
* `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
|
|
1267
|
-
* @deprecated in 4.
|
|
1355
|
+
* @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
1268
1356
|
*/
|
|
1269
1357
|
static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
|
|
1270
1358
|
const options = SweepLineStringToFacetsOptions.create(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createSmallAngle(), false, true, true, true);
|
|
1271
|
-
|
|
1272
|
-
return result;
|
|
1359
|
+
return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
1273
1360
|
}
|
|
1274
1361
|
/**
|
|
1275
1362
|
* Find segments (within the linestring) which project to facets.
|
|
1276
1363
|
* * Return chains.
|
|
1277
|
-
* * This calls [[sweepLineStringToFacets]] with options
|
|
1278
|
-
*
|
|
1279
|
-
* @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
1364
|
+
* * This calls [[sweepLineStringToFacets]] with default options.
|
|
1365
|
+
* @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
1280
1366
|
*/
|
|
1281
1367
|
static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
1282
|
-
|
|
1283
|
-
const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
1284
|
-
return result;
|
|
1368
|
+
return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
|
|
1285
1369
|
}
|
|
1286
1370
|
/**
|
|
1287
1371
|
* Find segments (within the linestring) which project to facets.
|
|
@@ -1533,11 +1617,11 @@ class PolyfaceQuery {
|
|
|
1533
1617
|
static setEdgeVisibility(polyface, clusters, value) {
|
|
1534
1618
|
for (const cluster of clusters) {
|
|
1535
1619
|
if (cluster instanceof IndexedEdgeMatcher_1.SortableEdge) {
|
|
1536
|
-
this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.
|
|
1620
|
+
this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.startVertex, value);
|
|
1537
1621
|
}
|
|
1538
1622
|
else if (Array.isArray(cluster)) {
|
|
1539
1623
|
for (const e1 of cluster)
|
|
1540
|
-
this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.
|
|
1624
|
+
this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.startVertex, value);
|
|
1541
1625
|
}
|
|
1542
1626
|
}
|
|
1543
1627
|
}
|
|
@@ -1639,8 +1723,8 @@ class PolyfaceQuery {
|
|
|
1639
1723
|
&& undefined !== PolyfaceQuery.computeFacetUnitNormal(visitor, e1.facetIndex, normal1)) {
|
|
1640
1724
|
const edgeAngle = normal0.smallerUnorientedAngleTo(normal1);
|
|
1641
1725
|
if (edgeAngle.radians > sharpEdgeAngle.radians) {
|
|
1642
|
-
this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.
|
|
1643
|
-
this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.
|
|
1726
|
+
this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.startVertex, true);
|
|
1727
|
+
this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.startVertex, true);
|
|
1644
1728
|
}
|
|
1645
1729
|
}
|
|
1646
1730
|
}
|