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