@itwin/core-geometry 5.5.0-dev.4 → 5.5.0-dev.5
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/lib/cjs/Geometry.d.ts +7 -0
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +9 -0
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +2 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js +4 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js +14 -4
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.d.ts +2 -0
- package/lib/cjs/bspline/BezierCurve3dH.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js +19 -3
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +8 -2
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +10 -4
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +4 -4
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +0 -3
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +9 -2
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +59 -9
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +124 -55
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +12 -8
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +0 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +19 -18
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +4 -5
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +0 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +0 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.js +2 -2
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +12 -4
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +52 -33
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +13 -6
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +13 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +12 -4
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +14 -5
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +5 -4
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +7 -4
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +25 -16
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +90 -72
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +0 -3
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +9 -2
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +25 -31
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts +7 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js +27 -36
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js +7 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +8 -5
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +6 -6
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js +4 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +6 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +5 -21
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +29 -73
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +55 -13
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +238 -110
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +1 -4
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +9 -9
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +11 -14
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +18 -18
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts +7 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.d.ts +19 -7
- package/lib/cjs/geometry3d/Ellipsoid.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +26 -11
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js +11 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +5 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +11 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.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 +49 -8
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +90 -37
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +100 -3
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +125 -0
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +10 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +53 -34
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +49 -2
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +67 -9
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +24 -32
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +147 -180
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +5 -5
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +13 -3
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +0 -3
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +5 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.d.ts +2 -2
- package/lib/cjs/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js +14 -18
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +8 -0
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +15 -9
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.d.ts +4 -2
- package/lib/cjs/numerics/ClusterableArray.d.ts.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js +6 -4
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Newton.d.ts +3 -1
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +5 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/polyface/AuxData.d.ts +1 -4
- package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
- package/lib/cjs/polyface/AuxData.js +5 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +3 -3
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +14 -16
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +84 -28
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +277 -217
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +4 -3
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +11 -4
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +9 -7
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +3 -2
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +2 -2
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +14 -12
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.d.ts +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +10 -6
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +4 -3
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +3 -5
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.d.ts +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js +4 -8
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js +1 -0
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +37 -7
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.d.ts +4 -4
- package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js +24 -40
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +9 -3
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.d.ts +0 -3
- package/lib/cjs/serialization/SerializationHelpers.d.ts.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.js +16 -7
- package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts +2 -2
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts +3 -2
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +4 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js +1 -3
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts +4 -3
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.d.ts +4 -4
- package/lib/cjs/topology/ChainMerge.d.ts.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +11 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +2 -0
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +5 -0
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +2 -0
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js +23 -16
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.d.ts +20 -9
- package/lib/cjs/topology/HalfEdgePositionDetail.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js +17 -13
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js +3 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts +6 -2
- package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js +41 -35
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.d.ts +7 -3
- package/lib/cjs/topology/MaskManager.d.ts.map +1 -1
- package/lib/cjs/topology/MaskManager.js +10 -4
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +2 -1
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +12 -7
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +7 -0
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +9 -0
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +2 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js +4 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js +14 -4
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.d.ts +2 -0
- package/lib/esm/bspline/BezierCurve3dH.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js +19 -3
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +8 -2
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +10 -4
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +4 -4
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +0 -3
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +9 -2
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +59 -9
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +124 -55
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +12 -8
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +0 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +20 -19
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +4 -5
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +0 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +0 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.js +2 -2
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +12 -4
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +53 -34
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +13 -6
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +13 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +12 -4
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +14 -5
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +5 -4
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +7 -4
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +25 -16
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +90 -72
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +0 -3
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +9 -2
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +25 -31
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts +7 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js +27 -36
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js +7 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +8 -5
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +6 -6
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js +4 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +6 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +5 -21
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +29 -73
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +55 -13
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +239 -111
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +1 -4
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +9 -9
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +11 -14
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +18 -18
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts +7 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.d.ts +19 -7
- package/lib/esm/geometry3d/Ellipsoid.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +26 -11
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js +11 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +5 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +11 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.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 +49 -8
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +90 -37
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +100 -3
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +125 -0
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +10 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +53 -34
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +49 -2
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +67 -9
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +24 -32
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +147 -180
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +5 -5
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +13 -3
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +0 -3
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +5 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.d.ts +2 -2
- package/lib/esm/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js +14 -18
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +8 -0
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +15 -9
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.d.ts +4 -2
- package/lib/esm/numerics/ClusterableArray.d.ts.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js +6 -4
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Newton.d.ts +3 -1
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +5 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/polyface/AuxData.d.ts +1 -4
- package/lib/esm/polyface/AuxData.d.ts.map +1 -1
- package/lib/esm/polyface/AuxData.js +5 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +3 -3
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +14 -16
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +84 -28
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +277 -217
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +4 -3
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +11 -4
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +9 -7
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +3 -2
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +2 -2
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +14 -12
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.d.ts +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +10 -6
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +4 -3
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +3 -5
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.d.ts +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js +4 -8
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js +1 -0
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +37 -7
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.d.ts +4 -4
- package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js +24 -40
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +9 -3
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.d.ts +0 -3
- package/lib/esm/serialization/SerializationHelpers.d.ts.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.js +16 -7
- package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
- package/lib/esm/solid/Box.d.ts +2 -2
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts +3 -2
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +4 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +1 -1
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js +1 -3
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts +4 -3
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.d.ts +4 -4
- package/lib/esm/topology/ChainMerge.d.ts.map +1 -1
- package/lib/esm/topology/ChainMerge.js +11 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +2 -0
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +5 -0
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +2 -0
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js +23 -16
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.d.ts +20 -9
- package/lib/esm/topology/HalfEdgePositionDetail.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js +17 -13
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js +4 -2
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.d.ts +6 -2
- package/lib/esm/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js +41 -35
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.d.ts +7 -3
- package/lib/esm/topology/MaskManager.d.ts.map +1 -1
- package/lib/esm/topology/MaskManager.js +10 -4
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +2 -1
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +12 -7
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +3 -3
- package/lib/cjs/serialization/GeometrySamples.d.ts +0 -705
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +0 -1
- package/lib/cjs/serialization/GeometrySamples.js +0 -2433
- package/lib/cjs/serialization/GeometrySamples.js.map +0 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +0 -705
- package/lib/esm/serialization/GeometrySamples.d.ts.map +0 -1
- package/lib/esm/serialization/GeometrySamples.js +0 -2428
- package/lib/esm/serialization/GeometrySamples.js.map +0 -1
|
@@ -148,7 +148,7 @@ exports.PolygonLocationDetailPair = PolygonLocationDetailPair;
|
|
|
148
148
|
class CutLoop {
|
|
149
149
|
/* All points of the loop */
|
|
150
150
|
xyz;
|
|
151
|
-
/* ray within
|
|
151
|
+
/* ray within edge generated by clip */
|
|
152
152
|
edge;
|
|
153
153
|
sortCoordinate0;
|
|
154
154
|
sortCoordinate1;
|
|
@@ -167,8 +167,11 @@ class CutLoop {
|
|
|
167
167
|
*/
|
|
168
168
|
static createCaptureWithReturnEdge(xyz) {
|
|
169
169
|
const result = new CutLoop(xyz);
|
|
170
|
-
if (xyz.length >= 2)
|
|
171
|
-
|
|
170
|
+
if (xyz.length >= 2) {
|
|
171
|
+
const firstPoint = xyz.getPoint3dAtUncheckedPointIndex(0);
|
|
172
|
+
const lastPoint = xyz.getPoint3dAtUncheckedPointIndex(xyz.length - 1);
|
|
173
|
+
result.edge = Ray3d_1.Ray3d.createStartEnd(firstPoint, lastPoint);
|
|
174
|
+
}
|
|
172
175
|
return result;
|
|
173
176
|
}
|
|
174
177
|
/**
|
|
@@ -178,6 +181,8 @@ class CutLoop {
|
|
|
178
181
|
* * Hence sorting on the coordinates puts loops in left-to-right order by the their edge vector leftmost point.
|
|
179
182
|
*/
|
|
180
183
|
setSortCoordinates(ray) {
|
|
184
|
+
if (!this.edge)
|
|
185
|
+
return;
|
|
181
186
|
this.sortDelta = this.edge.direction.dotProduct(ray.direction);
|
|
182
187
|
const a = ray.dotProductToPoint(this.edge.origin);
|
|
183
188
|
if (this.sortDelta >= 0) {
|
|
@@ -216,14 +221,6 @@ class CutLoop {
|
|
|
216
221
|
const q = loopA.sortCoordinate0 - loopB.sortCoordinate0;
|
|
217
222
|
return q > 0 ? 1 : -1;
|
|
218
223
|
}
|
|
219
|
-
/** Return first point coordinates.
|
|
220
|
-
* * For type checking, assume array is not empty.
|
|
221
|
-
*/
|
|
222
|
-
front(result) { return this.xyz.front(result); }
|
|
223
|
-
/** Return last point coordinates.
|
|
224
|
-
* * For type checking, assume array is not empty.
|
|
225
|
-
*/
|
|
226
|
-
back(result) { return this.xyz.back(result); }
|
|
227
224
|
}
|
|
228
225
|
exports.CutLoop = CutLoop;
|
|
229
226
|
/**
|
|
@@ -252,17 +249,19 @@ class CutLoopMergeContext {
|
|
|
252
249
|
resultPoint.setZero();
|
|
253
250
|
let d;
|
|
254
251
|
for (const loop of this.inputLoops) {
|
|
255
|
-
loop.front(workPoint)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
252
|
+
if (loop.xyz.front(workPoint)) {
|
|
253
|
+
d = workPoint.distanceSquared(point0);
|
|
254
|
+
if (d > dMax) {
|
|
255
|
+
dMax = d;
|
|
256
|
+
resultPoint.setFromPoint3d(workPoint);
|
|
257
|
+
}
|
|
260
258
|
}
|
|
261
|
-
loop.back(workPoint)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
259
|
+
if (loop.xyz.back(workPoint)) {
|
|
260
|
+
d = workPoint.distanceSquared(point0);
|
|
261
|
+
if (d > dMax) {
|
|
262
|
+
dMax = d;
|
|
263
|
+
resultPoint.setFromPoint3d(workPoint);
|
|
264
|
+
}
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
}
|
|
@@ -273,7 +272,7 @@ class CutLoopMergeContext {
|
|
|
273
272
|
*/
|
|
274
273
|
sortInputs() {
|
|
275
274
|
if (this.inputLoops.length > 0 && this.inputLoops[0].xyz.length > 0) {
|
|
276
|
-
const point0 = this.inputLoops[0].xyz.
|
|
275
|
+
const point0 = this.inputLoops[0].xyz.getPoint3dAtUncheckedPointIndex(0);
|
|
277
276
|
const workPoint = Point3dVector3d_1.Point3d.create();
|
|
278
277
|
const point1 = Point3dVector3d_1.Point3d.create();
|
|
279
278
|
// point0 could be in the middle. Find the most distant point ...
|
|
@@ -541,9 +540,9 @@ class PolygonOps {
|
|
|
541
540
|
}
|
|
542
541
|
const n = points.length;
|
|
543
542
|
if (n === 3) {
|
|
544
|
-
const normal = points.
|
|
543
|
+
const normal = points.crossProductUncheckedIndexIndexIndex(0, 1, 2, result?.direction);
|
|
545
544
|
const a = 0.5 * normal.magnitude();
|
|
546
|
-
const centroid = points.
|
|
545
|
+
const centroid = points.getPoint3dAtUncheckedPointIndex(0, result?.origin);
|
|
547
546
|
points.accumulateScaledXYZ(1, 1.0, centroid);
|
|
548
547
|
points.accumulateScaledXYZ(2, 1.0, centroid);
|
|
549
548
|
centroid.scaleInPlace(1.0 / 3.0);
|
|
@@ -560,7 +559,7 @@ class PolygonOps {
|
|
|
560
559
|
points.accumulateCrossProductIndexIndexIndex(0, i - 1, i, areaNormal);
|
|
561
560
|
}
|
|
562
561
|
areaNormal.normalizeInPlace();
|
|
563
|
-
const origin = points.
|
|
562
|
+
const origin = points.getPoint3dAtUncheckedPointIndex(0);
|
|
564
563
|
const vector0 = Point3dVector3d_1.Vector3d.create();
|
|
565
564
|
const vector1 = Point3dVector3d_1.Vector3d.create();
|
|
566
565
|
points.vectorXYAndZIndex(origin, 1, vector0);
|
|
@@ -686,7 +685,7 @@ class PolygonOps {
|
|
|
686
685
|
const placement = PolygonOps._matrixA;
|
|
687
686
|
const matrixAB = PolygonOps._matrixB;
|
|
688
687
|
const matrixABC = PolygonOps._matrixC;
|
|
689
|
-
const vectorOrigin = points.
|
|
688
|
+
const vectorOrigin = points.vectorXYAndZUncheckedIndex(origin, 0, PolygonOps._vectorOrigin);
|
|
690
689
|
const numPoints = points.length;
|
|
691
690
|
let detJ = 0;
|
|
692
691
|
for (let i2 = 2; i2 < numPoints; i2++) {
|
|
@@ -715,14 +714,14 @@ class PolygonOps {
|
|
|
715
714
|
/**
|
|
716
715
|
* Compute the signed volume of the truncated prism between a facet and a plane.
|
|
717
716
|
* * Useful for parallel algorithms.
|
|
718
|
-
* @param facetPoints input 3D polygon
|
|
717
|
+
* @param facetPoints input 3D polygon, wraparound point optional. This array is mutated on return if `options.skipMoments === false`: each point is projected onto the plane.
|
|
719
718
|
* @param plane infinite plane bounding volume between the facet and (virtual) side facets perpendicular to the plane (unmodified).
|
|
720
719
|
* @param options optional flags and pre-allocated temporary storage.
|
|
721
|
-
* @returns computed data for this facet
|
|
722
|
-
* * `volume6`: six times the signed volume of the truncated prism between the facet and the plane.
|
|
723
|
-
* * `area2`: two times the signed area of the facet's projection onto the plane.
|
|
724
|
-
* * `origin`: origin of the facet used to accumulate area moments.
|
|
725
|
-
* * `products`: raw accumulated second moment area products of the facet's projection onto the plane.
|
|
720
|
+
* @returns computed data for this facet, or defaults if `facetPoints.length < 3`:
|
|
721
|
+
* * `volume6`: six times the signed volume of the truncated prism between the facet and the plane (default 0).
|
|
722
|
+
* * `area2`: two times the signed area of the facet's projection onto the plane (default 0).
|
|
723
|
+
* * `origin`: origin of the facet used to accumulate area moments (default `undefined`).
|
|
724
|
+
* * `products`: raw accumulated second moment area products of the facet's projection onto the plane (default `undefined`).
|
|
726
725
|
* @see [[PolyfaceQuery.sumVolumeBetweenFacetsAndPlane]]
|
|
727
726
|
*/
|
|
728
727
|
static volumeBetweenPolygonAndPlane(facetPoints, plane, options) {
|
|
@@ -730,20 +729,22 @@ class PolygonOps {
|
|
|
730
729
|
let products;
|
|
731
730
|
let singleProjectedFacetAreaTimes2 = 0.0;
|
|
732
731
|
let signedTruncatedPrismVolumeTimes6 = 0.0;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
732
|
+
if (facetPoints.length >= 3) {
|
|
733
|
+
const h0 = facetPoints.evaluateUncheckedIndexPlaneAltitude(0, plane);
|
|
734
|
+
for (let i = 1; i + 1 < facetPoints.length; i++) {
|
|
735
|
+
const triangleNormal = facetPoints.crossProductUncheckedIndexIndexIndex(0, i, i + 1, options?.workVector);
|
|
736
|
+
const hA = facetPoints.evaluateUncheckedIndexPlaneAltitude(i, plane);
|
|
737
|
+
const hB = facetPoints.evaluateUncheckedIndexPlaneAltitude(i + 1, plane);
|
|
738
|
+
const signedProjectedTriangleAreaTimes2 = triangleNormal.dotProductXYZ(plane.normalX(), plane.normalY(), plane.normalZ());
|
|
739
|
+
singleProjectedFacetAreaTimes2 += signedProjectedTriangleAreaTimes2;
|
|
740
|
+
signedTruncatedPrismVolumeTimes6 += signedProjectedTriangleAreaTimes2 * (h0 + hA + hB);
|
|
741
|
+
}
|
|
742
|
+
if (!options?.skipMoments) {
|
|
743
|
+
origin = facetPoints.getPoint3dAtUncheckedPointIndex(0, options?.workPoint0);
|
|
744
|
+
products = Matrix4d_1.Matrix4d.createZero(options?.workMatrix);
|
|
745
|
+
facetPoints.mapPoint((x, y, z) => plane.projectXYZToPlane(x, y, z, options?.workPoint1));
|
|
746
|
+
PolygonOps.addSecondMomentAreaProducts(facetPoints, origin, products);
|
|
747
|
+
}
|
|
747
748
|
}
|
|
748
749
|
return { volume6: signedTruncatedPrismVolumeTimes6, area2: singleProjectedFacetAreaTimes2, origin, products };
|
|
749
750
|
}
|
|
@@ -974,7 +975,7 @@ class PolygonOps {
|
|
|
974
975
|
const distTol2 = distTol * distTol;
|
|
975
976
|
let numPoints = polygon.length;
|
|
976
977
|
while (numPoints > 1) {
|
|
977
|
-
if (polygon.
|
|
978
|
+
if (polygon.distanceSquaredUncheckedIndexIndex(0, numPoints - 1) > distTol2)
|
|
978
979
|
break;
|
|
979
980
|
--numPoints; // ignore closure point
|
|
980
981
|
}
|
|
@@ -1002,10 +1003,10 @@ class PolygonOps {
|
|
|
1002
1003
|
let iEdgeEnd = iEdgeStart + 1;
|
|
1003
1004
|
if (iEdgeEnd === numPoints)
|
|
1004
1005
|
iEdgeEnd = 0;
|
|
1005
|
-
uDotU = polygon.
|
|
1006
|
+
uDotU = polygon.distanceSquaredUncheckedIndexIndex(iEdgeStart, iEdgeEnd);
|
|
1006
1007
|
if (uDotU > distTol2) { // nontrivial edge
|
|
1007
|
-
vDotV = polygon.
|
|
1008
|
-
const uDotV = polygon.
|
|
1008
|
+
vDotV = polygon.distanceSquaredUncheckedIndexXYAndZ(iEdgeStart, testPoint);
|
|
1009
|
+
const uDotV = polygon.dotProductUncheckedIndexIndexXYAndZ(iEdgeStart, iEdgeEnd, testPoint);
|
|
1009
1010
|
edgeParam = uDotV / uDotU; // param of projection of testPoint onto edge [iEdgeStart, iEdgeEnd]
|
|
1010
1011
|
isValid = true;
|
|
1011
1012
|
}
|
|
@@ -1029,6 +1030,9 @@ class PolygonOps {
|
|
|
1029
1030
|
let iNext = iBase + 1;
|
|
1030
1031
|
if (iNext === numPoints)
|
|
1031
1032
|
iNext = 0;
|
|
1033
|
+
(0, core_bentley_1.assert)(() => iBase >= 0 && iBase < numPoints &&
|
|
1034
|
+
iPrev >= 0 && iPrev < numPoints &&
|
|
1035
|
+
iNext >= 0 && iNext < numPoints, "expect iBase, iPrev, iNext are valid indices");
|
|
1032
1036
|
const projData = projectToEdge(iBase);
|
|
1033
1037
|
if (!projData.isValid)
|
|
1034
1038
|
continue; // ignore trivial polygon edge (keep iPrev, projBeyondPrevEdge)
|
|
@@ -1048,7 +1052,7 @@ class PolygonOps {
|
|
|
1048
1052
|
// update candidate (to edge start) only if testPoint projected beyond previous edge end
|
|
1049
1053
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
1050
1054
|
result.a = Math.sqrt(distToStart2);
|
|
1051
|
-
polygon.
|
|
1055
|
+
polygon.crossProductUncheckedIndexIndexIndex(iBase, iPrev, iNext, result.v);
|
|
1052
1056
|
result.code = Geometry_1.PolygonLocation.OnPolygonVertex;
|
|
1053
1057
|
result.closestEdgeIndex = iBase;
|
|
1054
1058
|
result.closestEdgeParam = 0.0;
|
|
@@ -1096,7 +1100,7 @@ class PolygonOps {
|
|
|
1096
1100
|
// update candidate
|
|
1097
1101
|
polygon.interpolateIndexIndex(iBase, projData.edgeParam, iNext, result.point);
|
|
1098
1102
|
result.a = Math.sqrt(projDist2);
|
|
1099
|
-
polygon.
|
|
1103
|
+
polygon.crossProductUncheckedIndexIndexXYAndZ(iBase, iNext, testPoint, result.v);
|
|
1100
1104
|
result.code = projData.edgeParam < 1.0 ? Geometry_1.PolygonLocation.OnPolygonEdgeInterior : Geometry_1.PolygonLocation.OnPolygonVertex;
|
|
1101
1105
|
;
|
|
1102
1106
|
result.closestEdgeIndex = iBase;
|
|
@@ -1131,6 +1135,7 @@ class PolygonOps {
|
|
|
1131
1135
|
if (!this.unitNormal(polygon, this._normal))
|
|
1132
1136
|
return PolygonLocationDetail.create(result); // invalid
|
|
1133
1137
|
const polygonPlane = this._workPlane = Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
1138
|
+
(0, core_bentley_1.assert)(polygonPlane !== undefined, "expect this._normal to be nonzero because unitNormal succeeded");
|
|
1134
1139
|
const planePoint = this._workXYZ = polygonPlane.projectPointToPlane(testPoint, this._workXYZ);
|
|
1135
1140
|
result = this.closestPointOnBoundary(polygon, planePoint, tolerance, result);
|
|
1136
1141
|
if (result.isValid) {
|
|
@@ -1175,6 +1180,7 @@ class PolygonOps {
|
|
|
1175
1180
|
if (!this.unitNormal(polygon, this._normal))
|
|
1176
1181
|
return PolygonLocationDetail.create(result); // invalid
|
|
1177
1182
|
this._workPlane = Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
1183
|
+
(0, core_bentley_1.assert)(this._workPlane !== undefined, "expect this._normal to be nonzero because unitNormal succeeded");
|
|
1178
1184
|
const intersectionPoint = this._workXYZ = Point3dVector3d_1.Point3d.createZero(this._workXYZ);
|
|
1179
1185
|
const rayParam = ray.intersectionWithPlane(this._workPlane, intersectionPoint);
|
|
1180
1186
|
if (undefined === rayParam)
|
|
@@ -1233,7 +1239,7 @@ class PolygonOps {
|
|
|
1233
1239
|
static computeEdgeDataXY(polygon, edgeStartVertexIndex, point, edgeOutwardUnitNormal, tolerance = Geometry_1.Geometry.smallMetricDistance, result) {
|
|
1234
1240
|
const i0 = edgeStartVertexIndex % polygon.length;
|
|
1235
1241
|
const i1 = (i0 + 1) % polygon.length;
|
|
1236
|
-
polygon.
|
|
1242
|
+
polygon.vectorUncheckedIndexIndex(i0, i1, edgeOutwardUnitNormal).unitPerpendicularXY(edgeOutwardUnitNormal).negate(edgeOutwardUnitNormal); // z is zero
|
|
1237
1243
|
const hypDeltaX = polygon.getXAtUncheckedPointIndex(i0) - point.x;
|
|
1238
1244
|
const hypDeltaY = polygon.getYAtUncheckedPointIndex(i0) - point.y;
|
|
1239
1245
|
let projDist = Geometry_1.Geometry.dotProductXYXY(hypDeltaX, hypDeltaY, edgeOutwardUnitNormal.x, edgeOutwardUnitNormal.y);
|
|
@@ -1308,9 +1314,14 @@ class PolygonOps {
|
|
|
1308
1314
|
return undefined;
|
|
1309
1315
|
const localToWorld = this._workMatrix3d = Matrix3d_1.Matrix3d.createRigidHeadsUp(this._normal, Geometry_1.AxisOrder.ZXY, this._workMatrix3d);
|
|
1310
1316
|
const polygonXY = new GrowableXYZArray_1.GrowableXYZArray(n);
|
|
1311
|
-
for (let i = 0; i < n; ++i)
|
|
1312
|
-
|
|
1313
|
-
|
|
1317
|
+
for (let i = 0; i < n; ++i) {
|
|
1318
|
+
const pt = this._workXYZ = localToWorld.multiplyInverseXYZAsPoint3d(polygon.getXAtUncheckedPointIndex(i), polygon.getYAtUncheckedPointIndex(i), polygon.getZAtUncheckedPointIndex(i), this._workXYZ);
|
|
1319
|
+
(0, core_bentley_1.assert)(pt !== undefined, "expect localToWorld is nonsingular because this._normal is nonzero");
|
|
1320
|
+
polygonXY.push(pt);
|
|
1321
|
+
}
|
|
1322
|
+
(0, core_bentley_1.assert)(this._workXYZ !== undefined, "expect this._workXYZ is allocated because polygon is nonempty");
|
|
1323
|
+
const pointXY = localToWorld.multiplyInverseXYZAsPoint3d(point.x, point.y, point.z, this._workXYZ);
|
|
1324
|
+
(0, core_bentley_1.assert)(pointXY !== undefined, "expect localToWorld is nonsingular because this._normal is nonzero");
|
|
1314
1325
|
// now we know polygon orientation is ccw, its last edge has positive length, and we can ignore z-coords
|
|
1315
1326
|
let iPrev = n - 1;
|
|
1316
1327
|
const outwardUnitNormalOfLastEdge = this._vector0;
|
|
@@ -1336,9 +1347,7 @@ class PolygonOps {
|
|
|
1336
1347
|
continue; // point is on subsequent colinear edge (ASSUMING interior point, convex polygon!); coords[i] = 0; keep previous edge data
|
|
1337
1348
|
const areaOfNormalParallelogram = Math.abs(outwardUnitNormalOfPrevEdge.crossProductXY(outwardUnitNormalOfEdge));
|
|
1338
1349
|
const coord = Geometry_1.Geometry.conditionalDivideCoordinate(areaOfNormalParallelogram, projToPrevEdge.x * projToEdge.x, largestResult);
|
|
1339
|
-
|
|
1340
|
-
(0, core_bentley_1.assert)(false, "unexpectedly small projection distance to an edge"); // shouldn't happen due to chopping in computeEdgeDataXY: area/(dist*dist) <= 1/tol^2 = largestResult
|
|
1341
|
-
}
|
|
1350
|
+
(0, core_bentley_1.assert)(coord !== undefined, "unexpectedly small projection distance to an edge"); // shouldn't happen due to chopping in computeEdgeDataXY: area/(dist*dist) <= 1/tol^2 = largestResult
|
|
1342
1351
|
coords[i] = coord;
|
|
1343
1352
|
coordSum += coord;
|
|
1344
1353
|
outwardUnitNormalOfPrevEdge.setFrom(outwardUnitNormalOfEdge);
|
|
@@ -1502,78 +1511,71 @@ class IndexedXYZCollectionPolygonOps {
|
|
|
1502
1511
|
}
|
|
1503
1512
|
}
|
|
1504
1513
|
/**
|
|
1505
|
-
* Clip a polygon to one side of a plane.
|
|
1506
|
-
* * Results with 2 or fewer points are ignored.
|
|
1507
|
-
* * Other than ensuring capacity in the arrays, there are no object allocations during execution of this function.
|
|
1514
|
+
* Clip a polygon to one side of a plane in place.
|
|
1508
1515
|
* * For a convex input polygon, the output polygon is also convex.
|
|
1509
1516
|
* * For non-convex input, the output polygon may have double-back edges along plane intersections. This is still a
|
|
1510
1517
|
* valid clip in a parity sense (overlapping regions cancel).
|
|
1511
|
-
* *
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
* @param
|
|
1518
|
+
* * Output may also consist entirely of (colinear) polygon vertices that lie on the clip plane.
|
|
1519
|
+
* No attempt is made to filter such zero-area output.
|
|
1520
|
+
* * Other than ensuring capacity in the arrays, there are no object allocations during execution of this function.
|
|
1521
|
+
* @param plane altitude evaluator
|
|
1522
|
+
* @param xyz input polygon, clipped on output. Closure point, if present on input, is removed on output. Fewer than 3 input vertices results in empty output.
|
|
1515
1523
|
* @param work optional work buffer
|
|
1516
1524
|
* @param keepPositive whether the positive side of the plane survives (true, default), or negative side (false).
|
|
1517
1525
|
* @param tolerance tolerance for "on plane" decision. This is a distance if `plane` has unit normal (e.g., [[ClipPlane]]).
|
|
1518
1526
|
* Default value is [[Geometry.smallMetricDistance]].
|
|
1519
|
-
* @return the number of
|
|
1520
|
-
* @see splitConvexPolygonInsideOutsidePlane
|
|
1527
|
+
* @return the number of on-plane vertices and maximal vertex intervals. If this is larger than 2, the input polygon was non-convex.
|
|
1528
|
+
* @see [[splitConvexPolygonInsideOutsidePlane]] for a method that clips to both sides of the plane.
|
|
1521
1529
|
*/
|
|
1522
1530
|
static clipConvexPolygonInPlace(plane, xyz, work, keepPositive = true, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
work.clear();
|
|
1526
|
-
const s = keepPositive ? 1.0 : -1.0;
|
|
1531
|
+
while (xyz.length > 1 && xyz.getPoint3dAtUncheckedPointIndex(0).isExactEqual(xyz.getPoint3dAtUncheckedPointIndex(xyz.length - 1)))
|
|
1532
|
+
xyz.pop(); // ignore closure point(s)
|
|
1527
1533
|
const n = xyz.length;
|
|
1528
|
-
|
|
1534
|
+
if (n < 3) { // swallow degenerate polygon
|
|
1535
|
+
xyz.clear();
|
|
1536
|
+
return 0;
|
|
1537
|
+
}
|
|
1538
|
+
const s = keepPositive ? 1.0 : -1.0;
|
|
1539
|
+
const computeAltitude = (i) => {
|
|
1540
|
+
const a = s * xyz.evaluateUncheckedIndexPlaneAltitude(i, plane);
|
|
1541
|
+
return (Math.abs(a) < tolerance) ? 0 : a;
|
|
1542
|
+
};
|
|
1529
1543
|
const fractionTol = 1.0e-8;
|
|
1530
|
-
|
|
1531
|
-
let
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
if (
|
|
1543
|
-
|
|
1544
|
-
if (a1 < 0)
|
|
1545
|
-
numNegative++;
|
|
1546
|
-
if (a0 * a1 < 0.0) {
|
|
1547
|
-
// simple crossing . . .
|
|
1548
|
-
const f = -a0 / (a1 - a0);
|
|
1549
|
-
if (f > 1.0 - fractionTol && a1 >= 0.0) {
|
|
1550
|
-
// the endpoint will be saved -- avoid the duplicate
|
|
1551
|
-
}
|
|
1552
|
-
else {
|
|
1553
|
-
work.pushInterpolatedFromGrowableXYZArray(xyz, index0, f, index1);
|
|
1554
|
-
if (a1 > 0)
|
|
1555
|
-
numCrossings++; // "out to in"
|
|
1556
|
-
}
|
|
1544
|
+
let numClippedVertices = 0;
|
|
1545
|
+
let numSimpleCrossings = 0; // # new surviving vertices, each at intersection of plane with polygon edge interior
|
|
1546
|
+
let numTangentRuns = 0; // # on-plane vertices (or maximal runs of such consecutive vertices) whose entrance/exit edges lie on same side of plane
|
|
1547
|
+
const surviving = work ? work : new GrowableXYZArray_1.GrowableXYZArray();
|
|
1548
|
+
surviving.clear();
|
|
1549
|
+
let a1, a0 = computeAltitude(n - 1);
|
|
1550
|
+
for (let index0 = n - 1, index1 = 0; index1 < n; a0 = a1, index0 = index1++) {
|
|
1551
|
+
a1 = computeAltitude(index1);
|
|
1552
|
+
if (a1 < 0)
|
|
1553
|
+
numClippedVertices++;
|
|
1554
|
+
if (a0 * a1 < 0.0) { // simple crossing
|
|
1555
|
+
const f = -a0 / (a1 - a0);
|
|
1556
|
+
if (f > 1.0 - fractionTol && a1 > 0.0) {
|
|
1557
|
+
// don't push end vertex of this edge; it will be pushed later
|
|
1557
1558
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
}
|
|
1559
|
+
else {
|
|
1560
|
+
const crossing = xyz.interpolateUncheckedIndexIndex(index0, f, index1, this._xyz0Work);
|
|
1561
|
+
surviving.pushXYZ(crossing.x, crossing.y, crossing.z);
|
|
1562
|
+
numSimpleCrossings++;
|
|
1563
1563
|
}
|
|
1564
|
-
index0 = index1;
|
|
1565
|
-
a0 = a1;
|
|
1566
1564
|
}
|
|
1565
|
+
if (a1 >= 0) {
|
|
1566
|
+
surviving.pushXYZ(xyz.getXAtUncheckedPointIndex(index1), xyz.getYAtUncheckedPointIndex(index1), xyz.getZAtUncheckedPointIndex(index1));
|
|
1567
|
+
if (a1 === 0 && a0 !== 0)
|
|
1568
|
+
numTangentRuns++; // on-plane vertex, or start of on-plane interval
|
|
1569
|
+
}
|
|
1570
|
+
index0 = index1;
|
|
1571
|
+
a0 = a1;
|
|
1567
1572
|
}
|
|
1568
|
-
if (
|
|
1569
|
-
xyz.clear();
|
|
1570
|
-
}
|
|
1571
|
-
else if (numNegative > 0) {
|
|
1573
|
+
if (numClippedVertices > 0) {
|
|
1572
1574
|
xyz.clear();
|
|
1573
|
-
xyz.
|
|
1575
|
+
xyz.pushIndexedXYZCollection(surviving);
|
|
1574
1576
|
}
|
|
1575
|
-
|
|
1576
|
-
return
|
|
1577
|
+
surviving.clear();
|
|
1578
|
+
return numSimpleCrossings + numTangentRuns;
|
|
1577
1579
|
}
|
|
1578
1580
|
/** Return an array containing
|
|
1579
1581
|
* * All points that are exactly on the plane.
|
|
@@ -1646,38 +1648,42 @@ class IndexedXYZCollectionPolygonOps {
|
|
|
1646
1648
|
return result;
|
|
1647
1649
|
}
|
|
1648
1650
|
/**
|
|
1649
|
-
* * Input the loops from
|
|
1651
|
+
* * Input the loops from [[gatherCutLoopsFromPlaneClip]].
|
|
1650
1652
|
* * Consolidate loops for reentrant configurations.
|
|
1651
1653
|
* * WARNING: The output reuses and modifies input loops whenever possible.
|
|
1652
1654
|
* @internal
|
|
1653
1655
|
*/
|
|
1654
1656
|
static reorderCutLoops(loops) {
|
|
1655
|
-
|
|
1656
|
-
if (loops.inputLoops.length === 1)
|
|
1657
|
+
if (loops.inputLoops.length <= 1)
|
|
1657
1658
|
return;
|
|
1658
1659
|
// Simple cases: 2 loops . . .
|
|
1659
1660
|
if (loops.inputLoops.length === 2) {
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1661
|
+
const edge0 = loops.inputLoops[0].edge;
|
|
1662
|
+
const edge1 = loops.inputLoops[1].edge;
|
|
1663
|
+
if (edge0 && edge1) {
|
|
1664
|
+
if (edge0.direction.dotProduct(edge1.direction) > 0) {
|
|
1665
|
+
// if edges are in the same direction, it must be a pair of unrelated loops
|
|
1666
|
+
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1667
|
+
loops.outputLoops.push(loops.inputLoops[1]);
|
|
1668
|
+
}
|
|
1669
|
+
else {
|
|
1670
|
+
// 2 loops on opposite sides of the plane; twist into 1
|
|
1671
|
+
const source = loops.inputLoops[1].xyz;
|
|
1672
|
+
const dest = loops.inputLoops[0].xyz;
|
|
1673
|
+
dest.pushFromGrowableXYZArray(source);
|
|
1674
|
+
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1675
|
+
}
|
|
1665
1676
|
}
|
|
1666
|
-
// twist the two loops into 1,
|
|
1667
|
-
const source = loops.inputLoops[1].xyz;
|
|
1668
|
-
const dest = loops.inputLoops[0].xyz;
|
|
1669
|
-
dest.pushFromGrowableXYZArray(source);
|
|
1670
|
-
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1671
|
-
return;
|
|
1672
1677
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1678
|
+
else {
|
|
1679
|
+
// 3 or more loops.
|
|
1680
|
+
loops.sortAndMergeLoops();
|
|
1681
|
+
}
|
|
1676
1682
|
}
|
|
1677
1683
|
/**
|
|
1678
|
-
*
|
|
1679
|
-
* @param range
|
|
1680
|
-
* @param
|
|
1684
|
+
* Clip a convex polygon in place by a range box.
|
|
1685
|
+
* @param range six clipping planes
|
|
1686
|
+
* @param xyz convex polygon, clipped in place
|
|
1681
1687
|
* @return reference to xyz if the polygon still has points; undefined if all points are clipped away.
|
|
1682
1688
|
*/
|
|
1683
1689
|
static intersectRangeConvexPolygonInPlace(range, xyz) {
|
|
@@ -1718,9 +1724,6 @@ exports.IndexedXYZCollectionPolygonOps = IndexedXYZCollectionPolygonOps;
|
|
|
1718
1724
|
* @public
|
|
1719
1725
|
*/
|
|
1720
1726
|
class Point3dArrayPolygonOps {
|
|
1721
|
-
static _xyz0Work = Point3dVector3d_1.Point3d.create();
|
|
1722
|
-
// private static _xyz1Work: Point3d = Point3d.create();
|
|
1723
|
-
// private static _xyz2Work: Point3d = Point3d.create();
|
|
1724
1727
|
/**
|
|
1725
1728
|
* Split a (convex) polygon into 2 parts.
|
|
1726
1729
|
* @param xyz original polygon
|
|
@@ -1743,53 +1746,17 @@ class Point3dArrayPolygonOps {
|
|
|
1743
1746
|
return IndexedXYZCollectionPolygonOps.polygonPlaneCrossings(plane, xyzSource, crossings);
|
|
1744
1747
|
}
|
|
1745
1748
|
/**
|
|
1746
|
-
* Clip a polygon
|
|
1749
|
+
* Clip a polygon to one side of a plane in place.
|
|
1750
|
+
* @param plane altitude evaluator
|
|
1747
1751
|
* @param xyz input/output polygon
|
|
1748
|
-
* @param work scratch object
|
|
1752
|
+
* @param work optional scratch object
|
|
1749
1753
|
* @param tolerance tolerance for on-plane decision.
|
|
1754
|
+
* @see [[IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace]]
|
|
1750
1755
|
*/
|
|
1751
1756
|
static convexPolygonClipInPlace(plane, xyz, work, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
let numNegative = 0;
|
|
1756
|
-
const fractionTol = 1.0e-8;
|
|
1757
|
-
const b = -tolerance;
|
|
1758
|
-
if (xyz.length > 2) {
|
|
1759
|
-
let xyz0 = xyz[xyz.length - 1];
|
|
1760
|
-
let a0 = plane.altitude(xyz0);
|
|
1761
|
-
// if (a0 >= 0.0)
|
|
1762
|
-
// work.push_back (xyz0);
|
|
1763
|
-
for (const xyz1 of xyz) {
|
|
1764
|
-
const a1 = plane.altitude(xyz1);
|
|
1765
|
-
if (a1 < 0)
|
|
1766
|
-
numNegative++;
|
|
1767
|
-
if (a0 * a1 < 0.0) {
|
|
1768
|
-
// simple crossing . . .
|
|
1769
|
-
const f = -a0 / (a1 - a0);
|
|
1770
|
-
if (f > 1.0 - fractionTol && a1 >= 0.0) {
|
|
1771
|
-
// the endpoint will be saved -- avoid the duplicate
|
|
1772
|
-
}
|
|
1773
|
-
else {
|
|
1774
|
-
work.push(xyz0.interpolate(f, xyz1));
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
if (a1 >= b)
|
|
1778
|
-
work.push(xyz1);
|
|
1779
|
-
xyz0 = Point3dVector3d_1.Point3d.createFrom(xyz1);
|
|
1780
|
-
a0 = a1;
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
if (work.length <= 2) {
|
|
1784
|
-
xyz.length = 0;
|
|
1785
|
-
}
|
|
1786
|
-
else if (numNegative > 0) {
|
|
1787
|
-
xyz.length = 0;
|
|
1788
|
-
for (const xyzI of work) {
|
|
1789
|
-
xyz.push(xyzI);
|
|
1790
|
-
}
|
|
1791
|
-
work.length = 0;
|
|
1792
|
-
}
|
|
1757
|
+
const xyzSource = new Point3dArrayCarrier_1.Point3dArrayCarrier(xyz);
|
|
1758
|
+
const workSource = work ? new Point3dArrayCarrier_1.Point3dArrayCarrier(work) : undefined;
|
|
1759
|
+
return IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane, xyzSource, workSource, true, tolerance);
|
|
1793
1760
|
}
|
|
1794
1761
|
}
|
|
1795
1762
|
exports.Point3dArrayPolygonOps = Point3dArrayPolygonOps;
|