@itwin/core-geometry 5.5.0-dev.4 → 5.5.0-dev.6
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
|
@@ -143,7 +143,7 @@ export class PolygonLocationDetailPair {
|
|
|
143
143
|
export class CutLoop {
|
|
144
144
|
/* All points of the loop */
|
|
145
145
|
xyz;
|
|
146
|
-
/* ray within
|
|
146
|
+
/* ray within edge generated by clip */
|
|
147
147
|
edge;
|
|
148
148
|
sortCoordinate0;
|
|
149
149
|
sortCoordinate1;
|
|
@@ -162,8 +162,11 @@ export class CutLoop {
|
|
|
162
162
|
*/
|
|
163
163
|
static createCaptureWithReturnEdge(xyz) {
|
|
164
164
|
const result = new CutLoop(xyz);
|
|
165
|
-
if (xyz.length >= 2)
|
|
166
|
-
|
|
165
|
+
if (xyz.length >= 2) {
|
|
166
|
+
const firstPoint = xyz.getPoint3dAtUncheckedPointIndex(0);
|
|
167
|
+
const lastPoint = xyz.getPoint3dAtUncheckedPointIndex(xyz.length - 1);
|
|
168
|
+
result.edge = Ray3d.createStartEnd(firstPoint, lastPoint);
|
|
169
|
+
}
|
|
167
170
|
return result;
|
|
168
171
|
}
|
|
169
172
|
/**
|
|
@@ -173,6 +176,8 @@ export class CutLoop {
|
|
|
173
176
|
* * Hence sorting on the coordinates puts loops in left-to-right order by the their edge vector leftmost point.
|
|
174
177
|
*/
|
|
175
178
|
setSortCoordinates(ray) {
|
|
179
|
+
if (!this.edge)
|
|
180
|
+
return;
|
|
176
181
|
this.sortDelta = this.edge.direction.dotProduct(ray.direction);
|
|
177
182
|
const a = ray.dotProductToPoint(this.edge.origin);
|
|
178
183
|
if (this.sortDelta >= 0) {
|
|
@@ -211,14 +216,6 @@ export class CutLoop {
|
|
|
211
216
|
const q = loopA.sortCoordinate0 - loopB.sortCoordinate0;
|
|
212
217
|
return q > 0 ? 1 : -1;
|
|
213
218
|
}
|
|
214
|
-
/** Return first point coordinates.
|
|
215
|
-
* * For type checking, assume array is not empty.
|
|
216
|
-
*/
|
|
217
|
-
front(result) { return this.xyz.front(result); }
|
|
218
|
-
/** Return last point coordinates.
|
|
219
|
-
* * For type checking, assume array is not empty.
|
|
220
|
-
*/
|
|
221
|
-
back(result) { return this.xyz.back(result); }
|
|
222
219
|
}
|
|
223
220
|
/**
|
|
224
221
|
* Context to hold an array of input loops and apply sort logic.
|
|
@@ -246,17 +243,19 @@ export class CutLoopMergeContext {
|
|
|
246
243
|
resultPoint.setZero();
|
|
247
244
|
let d;
|
|
248
245
|
for (const loop of this.inputLoops) {
|
|
249
|
-
loop.front(workPoint)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
246
|
+
if (loop.xyz.front(workPoint)) {
|
|
247
|
+
d = workPoint.distanceSquared(point0);
|
|
248
|
+
if (d > dMax) {
|
|
249
|
+
dMax = d;
|
|
250
|
+
resultPoint.setFromPoint3d(workPoint);
|
|
251
|
+
}
|
|
254
252
|
}
|
|
255
|
-
loop.back(workPoint)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
if (loop.xyz.back(workPoint)) {
|
|
254
|
+
d = workPoint.distanceSquared(point0);
|
|
255
|
+
if (d > dMax) {
|
|
256
|
+
dMax = d;
|
|
257
|
+
resultPoint.setFromPoint3d(workPoint);
|
|
258
|
+
}
|
|
260
259
|
}
|
|
261
260
|
}
|
|
262
261
|
}
|
|
@@ -267,7 +266,7 @@ export class CutLoopMergeContext {
|
|
|
267
266
|
*/
|
|
268
267
|
sortInputs() {
|
|
269
268
|
if (this.inputLoops.length > 0 && this.inputLoops[0].xyz.length > 0) {
|
|
270
|
-
const point0 = this.inputLoops[0].xyz.
|
|
269
|
+
const point0 = this.inputLoops[0].xyz.getPoint3dAtUncheckedPointIndex(0);
|
|
271
270
|
const workPoint = Point3d.create();
|
|
272
271
|
const point1 = Point3d.create();
|
|
273
272
|
// point0 could be in the middle. Find the most distant point ...
|
|
@@ -534,9 +533,9 @@ export class PolygonOps {
|
|
|
534
533
|
}
|
|
535
534
|
const n = points.length;
|
|
536
535
|
if (n === 3) {
|
|
537
|
-
const normal = points.
|
|
536
|
+
const normal = points.crossProductUncheckedIndexIndexIndex(0, 1, 2, result?.direction);
|
|
538
537
|
const a = 0.5 * normal.magnitude();
|
|
539
|
-
const centroid = points.
|
|
538
|
+
const centroid = points.getPoint3dAtUncheckedPointIndex(0, result?.origin);
|
|
540
539
|
points.accumulateScaledXYZ(1, 1.0, centroid);
|
|
541
540
|
points.accumulateScaledXYZ(2, 1.0, centroid);
|
|
542
541
|
centroid.scaleInPlace(1.0 / 3.0);
|
|
@@ -553,7 +552,7 @@ export class PolygonOps {
|
|
|
553
552
|
points.accumulateCrossProductIndexIndexIndex(0, i - 1, i, areaNormal);
|
|
554
553
|
}
|
|
555
554
|
areaNormal.normalizeInPlace();
|
|
556
|
-
const origin = points.
|
|
555
|
+
const origin = points.getPoint3dAtUncheckedPointIndex(0);
|
|
557
556
|
const vector0 = Vector3d.create();
|
|
558
557
|
const vector1 = Vector3d.create();
|
|
559
558
|
points.vectorXYAndZIndex(origin, 1, vector0);
|
|
@@ -679,7 +678,7 @@ export class PolygonOps {
|
|
|
679
678
|
const placement = PolygonOps._matrixA;
|
|
680
679
|
const matrixAB = PolygonOps._matrixB;
|
|
681
680
|
const matrixABC = PolygonOps._matrixC;
|
|
682
|
-
const vectorOrigin = points.
|
|
681
|
+
const vectorOrigin = points.vectorXYAndZUncheckedIndex(origin, 0, PolygonOps._vectorOrigin);
|
|
683
682
|
const numPoints = points.length;
|
|
684
683
|
let detJ = 0;
|
|
685
684
|
for (let i2 = 2; i2 < numPoints; i2++) {
|
|
@@ -708,14 +707,14 @@ export class PolygonOps {
|
|
|
708
707
|
/**
|
|
709
708
|
* Compute the signed volume of the truncated prism between a facet and a plane.
|
|
710
709
|
* * Useful for parallel algorithms.
|
|
711
|
-
* @param facetPoints input 3D polygon
|
|
710
|
+
* @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.
|
|
712
711
|
* @param plane infinite plane bounding volume between the facet and (virtual) side facets perpendicular to the plane (unmodified).
|
|
713
712
|
* @param options optional flags and pre-allocated temporary storage.
|
|
714
|
-
* @returns computed data for this facet
|
|
715
|
-
* * `volume6`: six times the signed volume of the truncated prism between the facet and the plane.
|
|
716
|
-
* * `area2`: two times the signed area of the facet's projection onto the plane.
|
|
717
|
-
* * `origin`: origin of the facet used to accumulate area moments.
|
|
718
|
-
* * `products`: raw accumulated second moment area products of the facet's projection onto the plane.
|
|
713
|
+
* @returns computed data for this facet, or defaults if `facetPoints.length < 3`:
|
|
714
|
+
* * `volume6`: six times the signed volume of the truncated prism between the facet and the plane (default 0).
|
|
715
|
+
* * `area2`: two times the signed area of the facet's projection onto the plane (default 0).
|
|
716
|
+
* * `origin`: origin of the facet used to accumulate area moments (default `undefined`).
|
|
717
|
+
* * `products`: raw accumulated second moment area products of the facet's projection onto the plane (default `undefined`).
|
|
719
718
|
* @see [[PolyfaceQuery.sumVolumeBetweenFacetsAndPlane]]
|
|
720
719
|
*/
|
|
721
720
|
static volumeBetweenPolygonAndPlane(facetPoints, plane, options) {
|
|
@@ -723,20 +722,22 @@ export class PolygonOps {
|
|
|
723
722
|
let products;
|
|
724
723
|
let singleProjectedFacetAreaTimes2 = 0.0;
|
|
725
724
|
let signedTruncatedPrismVolumeTimes6 = 0.0;
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
725
|
+
if (facetPoints.length >= 3) {
|
|
726
|
+
const h0 = facetPoints.evaluateUncheckedIndexPlaneAltitude(0, plane);
|
|
727
|
+
for (let i = 1; i + 1 < facetPoints.length; i++) {
|
|
728
|
+
const triangleNormal = facetPoints.crossProductUncheckedIndexIndexIndex(0, i, i + 1, options?.workVector);
|
|
729
|
+
const hA = facetPoints.evaluateUncheckedIndexPlaneAltitude(i, plane);
|
|
730
|
+
const hB = facetPoints.evaluateUncheckedIndexPlaneAltitude(i + 1, plane);
|
|
731
|
+
const signedProjectedTriangleAreaTimes2 = triangleNormal.dotProductXYZ(plane.normalX(), plane.normalY(), plane.normalZ());
|
|
732
|
+
singleProjectedFacetAreaTimes2 += signedProjectedTriangleAreaTimes2;
|
|
733
|
+
signedTruncatedPrismVolumeTimes6 += signedProjectedTriangleAreaTimes2 * (h0 + hA + hB);
|
|
734
|
+
}
|
|
735
|
+
if (!options?.skipMoments) {
|
|
736
|
+
origin = facetPoints.getPoint3dAtUncheckedPointIndex(0, options?.workPoint0);
|
|
737
|
+
products = Matrix4d.createZero(options?.workMatrix);
|
|
738
|
+
facetPoints.mapPoint((x, y, z) => plane.projectXYZToPlane(x, y, z, options?.workPoint1));
|
|
739
|
+
PolygonOps.addSecondMomentAreaProducts(facetPoints, origin, products);
|
|
740
|
+
}
|
|
740
741
|
}
|
|
741
742
|
return { volume6: signedTruncatedPrismVolumeTimes6, area2: singleProjectedFacetAreaTimes2, origin, products };
|
|
742
743
|
}
|
|
@@ -967,7 +968,7 @@ export class PolygonOps {
|
|
|
967
968
|
const distTol2 = distTol * distTol;
|
|
968
969
|
let numPoints = polygon.length;
|
|
969
970
|
while (numPoints > 1) {
|
|
970
|
-
if (polygon.
|
|
971
|
+
if (polygon.distanceSquaredUncheckedIndexIndex(0, numPoints - 1) > distTol2)
|
|
971
972
|
break;
|
|
972
973
|
--numPoints; // ignore closure point
|
|
973
974
|
}
|
|
@@ -995,10 +996,10 @@ export class PolygonOps {
|
|
|
995
996
|
let iEdgeEnd = iEdgeStart + 1;
|
|
996
997
|
if (iEdgeEnd === numPoints)
|
|
997
998
|
iEdgeEnd = 0;
|
|
998
|
-
uDotU = polygon.
|
|
999
|
+
uDotU = polygon.distanceSquaredUncheckedIndexIndex(iEdgeStart, iEdgeEnd);
|
|
999
1000
|
if (uDotU > distTol2) { // nontrivial edge
|
|
1000
|
-
vDotV = polygon.
|
|
1001
|
-
const uDotV = polygon.
|
|
1001
|
+
vDotV = polygon.distanceSquaredUncheckedIndexXYAndZ(iEdgeStart, testPoint);
|
|
1002
|
+
const uDotV = polygon.dotProductUncheckedIndexIndexXYAndZ(iEdgeStart, iEdgeEnd, testPoint);
|
|
1002
1003
|
edgeParam = uDotV / uDotU; // param of projection of testPoint onto edge [iEdgeStart, iEdgeEnd]
|
|
1003
1004
|
isValid = true;
|
|
1004
1005
|
}
|
|
@@ -1022,6 +1023,9 @@ export class PolygonOps {
|
|
|
1022
1023
|
let iNext = iBase + 1;
|
|
1023
1024
|
if (iNext === numPoints)
|
|
1024
1025
|
iNext = 0;
|
|
1026
|
+
assert(() => iBase >= 0 && iBase < numPoints &&
|
|
1027
|
+
iPrev >= 0 && iPrev < numPoints &&
|
|
1028
|
+
iNext >= 0 && iNext < numPoints, "expect iBase, iPrev, iNext are valid indices");
|
|
1025
1029
|
const projData = projectToEdge(iBase);
|
|
1026
1030
|
if (!projData.isValid)
|
|
1027
1031
|
continue; // ignore trivial polygon edge (keep iPrev, projBeyondPrevEdge)
|
|
@@ -1041,7 +1045,7 @@ export class PolygonOps {
|
|
|
1041
1045
|
// update candidate (to edge start) only if testPoint projected beyond previous edge end
|
|
1042
1046
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
1043
1047
|
result.a = Math.sqrt(distToStart2);
|
|
1044
|
-
polygon.
|
|
1048
|
+
polygon.crossProductUncheckedIndexIndexIndex(iBase, iPrev, iNext, result.v);
|
|
1045
1049
|
result.code = PolygonLocation.OnPolygonVertex;
|
|
1046
1050
|
result.closestEdgeIndex = iBase;
|
|
1047
1051
|
result.closestEdgeParam = 0.0;
|
|
@@ -1089,7 +1093,7 @@ export class PolygonOps {
|
|
|
1089
1093
|
// update candidate
|
|
1090
1094
|
polygon.interpolateIndexIndex(iBase, projData.edgeParam, iNext, result.point);
|
|
1091
1095
|
result.a = Math.sqrt(projDist2);
|
|
1092
|
-
polygon.
|
|
1096
|
+
polygon.crossProductUncheckedIndexIndexXYAndZ(iBase, iNext, testPoint, result.v);
|
|
1093
1097
|
result.code = projData.edgeParam < 1.0 ? PolygonLocation.OnPolygonEdgeInterior : PolygonLocation.OnPolygonVertex;
|
|
1094
1098
|
;
|
|
1095
1099
|
result.closestEdgeIndex = iBase;
|
|
@@ -1124,6 +1128,7 @@ export class PolygonOps {
|
|
|
1124
1128
|
if (!this.unitNormal(polygon, this._normal))
|
|
1125
1129
|
return PolygonLocationDetail.create(result); // invalid
|
|
1126
1130
|
const polygonPlane = this._workPlane = Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
1131
|
+
assert(polygonPlane !== undefined, "expect this._normal to be nonzero because unitNormal succeeded");
|
|
1127
1132
|
const planePoint = this._workXYZ = polygonPlane.projectPointToPlane(testPoint, this._workXYZ);
|
|
1128
1133
|
result = this.closestPointOnBoundary(polygon, planePoint, tolerance, result);
|
|
1129
1134
|
if (result.isValid) {
|
|
@@ -1168,6 +1173,7 @@ export class PolygonOps {
|
|
|
1168
1173
|
if (!this.unitNormal(polygon, this._normal))
|
|
1169
1174
|
return PolygonLocationDetail.create(result); // invalid
|
|
1170
1175
|
this._workPlane = Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
1176
|
+
assert(this._workPlane !== undefined, "expect this._normal to be nonzero because unitNormal succeeded");
|
|
1171
1177
|
const intersectionPoint = this._workXYZ = Point3d.createZero(this._workXYZ);
|
|
1172
1178
|
const rayParam = ray.intersectionWithPlane(this._workPlane, intersectionPoint);
|
|
1173
1179
|
if (undefined === rayParam)
|
|
@@ -1226,7 +1232,7 @@ export class PolygonOps {
|
|
|
1226
1232
|
static computeEdgeDataXY(polygon, edgeStartVertexIndex, point, edgeOutwardUnitNormal, tolerance = Geometry.smallMetricDistance, result) {
|
|
1227
1233
|
const i0 = edgeStartVertexIndex % polygon.length;
|
|
1228
1234
|
const i1 = (i0 + 1) % polygon.length;
|
|
1229
|
-
polygon.
|
|
1235
|
+
polygon.vectorUncheckedIndexIndex(i0, i1, edgeOutwardUnitNormal).unitPerpendicularXY(edgeOutwardUnitNormal).negate(edgeOutwardUnitNormal); // z is zero
|
|
1230
1236
|
const hypDeltaX = polygon.getXAtUncheckedPointIndex(i0) - point.x;
|
|
1231
1237
|
const hypDeltaY = polygon.getYAtUncheckedPointIndex(i0) - point.y;
|
|
1232
1238
|
let projDist = Geometry.dotProductXYXY(hypDeltaX, hypDeltaY, edgeOutwardUnitNormal.x, edgeOutwardUnitNormal.y);
|
|
@@ -1301,9 +1307,14 @@ export class PolygonOps {
|
|
|
1301
1307
|
return undefined;
|
|
1302
1308
|
const localToWorld = this._workMatrix3d = Matrix3d.createRigidHeadsUp(this._normal, AxisOrder.ZXY, this._workMatrix3d);
|
|
1303
1309
|
const polygonXY = new GrowableXYZArray(n);
|
|
1304
|
-
for (let i = 0; i < n; ++i)
|
|
1305
|
-
|
|
1306
|
-
|
|
1310
|
+
for (let i = 0; i < n; ++i) {
|
|
1311
|
+
const pt = this._workXYZ = localToWorld.multiplyInverseXYZAsPoint3d(polygon.getXAtUncheckedPointIndex(i), polygon.getYAtUncheckedPointIndex(i), polygon.getZAtUncheckedPointIndex(i), this._workXYZ);
|
|
1312
|
+
assert(pt !== undefined, "expect localToWorld is nonsingular because this._normal is nonzero");
|
|
1313
|
+
polygonXY.push(pt);
|
|
1314
|
+
}
|
|
1315
|
+
assert(this._workXYZ !== undefined, "expect this._workXYZ is allocated because polygon is nonempty");
|
|
1316
|
+
const pointXY = localToWorld.multiplyInverseXYZAsPoint3d(point.x, point.y, point.z, this._workXYZ);
|
|
1317
|
+
assert(pointXY !== undefined, "expect localToWorld is nonsingular because this._normal is nonzero");
|
|
1307
1318
|
// now we know polygon orientation is ccw, its last edge has positive length, and we can ignore z-coords
|
|
1308
1319
|
let iPrev = n - 1;
|
|
1309
1320
|
const outwardUnitNormalOfLastEdge = this._vector0;
|
|
@@ -1329,9 +1340,7 @@ export class PolygonOps {
|
|
|
1329
1340
|
continue; // point is on subsequent colinear edge (ASSUMING interior point, convex polygon!); coords[i] = 0; keep previous edge data
|
|
1330
1341
|
const areaOfNormalParallelogram = Math.abs(outwardUnitNormalOfPrevEdge.crossProductXY(outwardUnitNormalOfEdge));
|
|
1331
1342
|
const coord = Geometry.conditionalDivideCoordinate(areaOfNormalParallelogram, projToPrevEdge.x * projToEdge.x, largestResult);
|
|
1332
|
-
|
|
1333
|
-
assert(false, "unexpectedly small projection distance to an edge"); // shouldn't happen due to chopping in computeEdgeDataXY: area/(dist*dist) <= 1/tol^2 = largestResult
|
|
1334
|
-
}
|
|
1343
|
+
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
|
|
1335
1344
|
coords[i] = coord;
|
|
1336
1345
|
coordSum += coord;
|
|
1337
1346
|
outwardUnitNormalOfPrevEdge.setFrom(outwardUnitNormalOfEdge);
|
|
@@ -1494,78 +1503,71 @@ export class IndexedXYZCollectionPolygonOps {
|
|
|
1494
1503
|
}
|
|
1495
1504
|
}
|
|
1496
1505
|
/**
|
|
1497
|
-
* Clip a polygon to one side of a plane.
|
|
1498
|
-
* * Results with 2 or fewer points are ignored.
|
|
1499
|
-
* * Other than ensuring capacity in the arrays, there are no object allocations during execution of this function.
|
|
1506
|
+
* Clip a polygon to one side of a plane in place.
|
|
1500
1507
|
* * For a convex input polygon, the output polygon is also convex.
|
|
1501
1508
|
* * For non-convex input, the output polygon may have double-back edges along plane intersections. This is still a
|
|
1502
1509
|
* valid clip in a parity sense (overlapping regions cancel).
|
|
1503
|
-
* *
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
* @param
|
|
1510
|
+
* * Output may also consist entirely of (colinear) polygon vertices that lie on the clip plane.
|
|
1511
|
+
* No attempt is made to filter such zero-area output.
|
|
1512
|
+
* * Other than ensuring capacity in the arrays, there are no object allocations during execution of this function.
|
|
1513
|
+
* @param plane altitude evaluator
|
|
1514
|
+
* @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.
|
|
1507
1515
|
* @param work optional work buffer
|
|
1508
1516
|
* @param keepPositive whether the positive side of the plane survives (true, default), or negative side (false).
|
|
1509
1517
|
* @param tolerance tolerance for "on plane" decision. This is a distance if `plane` has unit normal (e.g., [[ClipPlane]]).
|
|
1510
1518
|
* Default value is [[Geometry.smallMetricDistance]].
|
|
1511
|
-
* @return the number of
|
|
1512
|
-
* @see splitConvexPolygonInsideOutsidePlane
|
|
1519
|
+
* @return the number of on-plane vertices and maximal vertex intervals. If this is larger than 2, the input polygon was non-convex.
|
|
1520
|
+
* @see [[splitConvexPolygonInsideOutsidePlane]] for a method that clips to both sides of the plane.
|
|
1513
1521
|
*/
|
|
1514
1522
|
static clipConvexPolygonInPlace(plane, xyz, work, keepPositive = true, tolerance = Geometry.smallMetricDistance) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
work.clear();
|
|
1518
|
-
const s = keepPositive ? 1.0 : -1.0;
|
|
1523
|
+
while (xyz.length > 1 && xyz.getPoint3dAtUncheckedPointIndex(0).isExactEqual(xyz.getPoint3dAtUncheckedPointIndex(xyz.length - 1)))
|
|
1524
|
+
xyz.pop(); // ignore closure point(s)
|
|
1519
1525
|
const n = xyz.length;
|
|
1520
|
-
|
|
1526
|
+
if (n < 3) { // swallow degenerate polygon
|
|
1527
|
+
xyz.clear();
|
|
1528
|
+
return 0;
|
|
1529
|
+
}
|
|
1530
|
+
const s = keepPositive ? 1.0 : -1.0;
|
|
1531
|
+
const computeAltitude = (i) => {
|
|
1532
|
+
const a = s * xyz.evaluateUncheckedIndexPlaneAltitude(i, plane);
|
|
1533
|
+
return (Math.abs(a) < tolerance) ? 0 : a;
|
|
1534
|
+
};
|
|
1521
1535
|
const fractionTol = 1.0e-8;
|
|
1522
|
-
|
|
1523
|
-
let
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
if (
|
|
1535
|
-
|
|
1536
|
-
if (a1 < 0)
|
|
1537
|
-
numNegative++;
|
|
1538
|
-
if (a0 * a1 < 0.0) {
|
|
1539
|
-
// simple crossing . . .
|
|
1540
|
-
const f = -a0 / (a1 - a0);
|
|
1541
|
-
if (f > 1.0 - fractionTol && a1 >= 0.0) {
|
|
1542
|
-
// the endpoint will be saved -- avoid the duplicate
|
|
1543
|
-
}
|
|
1544
|
-
else {
|
|
1545
|
-
work.pushInterpolatedFromGrowableXYZArray(xyz, index0, f, index1);
|
|
1546
|
-
if (a1 > 0)
|
|
1547
|
-
numCrossings++; // "out to in"
|
|
1548
|
-
}
|
|
1536
|
+
let numClippedVertices = 0;
|
|
1537
|
+
let numSimpleCrossings = 0; // # new surviving vertices, each at intersection of plane with polygon edge interior
|
|
1538
|
+
let numTangentRuns = 0; // # on-plane vertices (or maximal runs of such consecutive vertices) whose entrance/exit edges lie on same side of plane
|
|
1539
|
+
const surviving = work ? work : new GrowableXYZArray();
|
|
1540
|
+
surviving.clear();
|
|
1541
|
+
let a1, a0 = computeAltitude(n - 1);
|
|
1542
|
+
for (let index0 = n - 1, index1 = 0; index1 < n; a0 = a1, index0 = index1++) {
|
|
1543
|
+
a1 = computeAltitude(index1);
|
|
1544
|
+
if (a1 < 0)
|
|
1545
|
+
numClippedVertices++;
|
|
1546
|
+
if (a0 * a1 < 0.0) { // simple crossing
|
|
1547
|
+
const f = -a0 / (a1 - a0);
|
|
1548
|
+
if (f > 1.0 - fractionTol && a1 > 0.0) {
|
|
1549
|
+
// don't push end vertex of this edge; it will be pushed later
|
|
1549
1550
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1551
|
+
else {
|
|
1552
|
+
const crossing = xyz.interpolateUncheckedIndexIndex(index0, f, index1, this._xyz0Work);
|
|
1553
|
+
surviving.pushXYZ(crossing.x, crossing.y, crossing.z);
|
|
1554
|
+
numSimpleCrossings++;
|
|
1555
1555
|
}
|
|
1556
|
-
index0 = index1;
|
|
1557
|
-
a0 = a1;
|
|
1558
1556
|
}
|
|
1557
|
+
if (a1 >= 0) {
|
|
1558
|
+
surviving.pushXYZ(xyz.getXAtUncheckedPointIndex(index1), xyz.getYAtUncheckedPointIndex(index1), xyz.getZAtUncheckedPointIndex(index1));
|
|
1559
|
+
if (a1 === 0 && a0 !== 0)
|
|
1560
|
+
numTangentRuns++; // on-plane vertex, or start of on-plane interval
|
|
1561
|
+
}
|
|
1562
|
+
index0 = index1;
|
|
1563
|
+
a0 = a1;
|
|
1559
1564
|
}
|
|
1560
|
-
if (
|
|
1561
|
-
xyz.clear();
|
|
1562
|
-
}
|
|
1563
|
-
else if (numNegative > 0) {
|
|
1565
|
+
if (numClippedVertices > 0) {
|
|
1564
1566
|
xyz.clear();
|
|
1565
|
-
xyz.
|
|
1567
|
+
xyz.pushIndexedXYZCollection(surviving);
|
|
1566
1568
|
}
|
|
1567
|
-
|
|
1568
|
-
return
|
|
1569
|
+
surviving.clear();
|
|
1570
|
+
return numSimpleCrossings + numTangentRuns;
|
|
1569
1571
|
}
|
|
1570
1572
|
/** Return an array containing
|
|
1571
1573
|
* * All points that are exactly on the plane.
|
|
@@ -1638,38 +1640,42 @@ export class IndexedXYZCollectionPolygonOps {
|
|
|
1638
1640
|
return result;
|
|
1639
1641
|
}
|
|
1640
1642
|
/**
|
|
1641
|
-
* * Input the loops from
|
|
1643
|
+
* * Input the loops from [[gatherCutLoopsFromPlaneClip]].
|
|
1642
1644
|
* * Consolidate loops for reentrant configurations.
|
|
1643
1645
|
* * WARNING: The output reuses and modifies input loops whenever possible.
|
|
1644
1646
|
* @internal
|
|
1645
1647
|
*/
|
|
1646
1648
|
static reorderCutLoops(loops) {
|
|
1647
|
-
|
|
1648
|
-
if (loops.inputLoops.length === 1)
|
|
1649
|
+
if (loops.inputLoops.length <= 1)
|
|
1649
1650
|
return;
|
|
1650
1651
|
// Simple cases: 2 loops . . .
|
|
1651
1652
|
if (loops.inputLoops.length === 2) {
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1653
|
+
const edge0 = loops.inputLoops[0].edge;
|
|
1654
|
+
const edge1 = loops.inputLoops[1].edge;
|
|
1655
|
+
if (edge0 && edge1) {
|
|
1656
|
+
if (edge0.direction.dotProduct(edge1.direction) > 0) {
|
|
1657
|
+
// if edges are in the same direction, it must be a pair of unrelated loops
|
|
1658
|
+
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1659
|
+
loops.outputLoops.push(loops.inputLoops[1]);
|
|
1660
|
+
}
|
|
1661
|
+
else {
|
|
1662
|
+
// 2 loops on opposite sides of the plane; twist into 1
|
|
1663
|
+
const source = loops.inputLoops[1].xyz;
|
|
1664
|
+
const dest = loops.inputLoops[0].xyz;
|
|
1665
|
+
dest.pushFromGrowableXYZArray(source);
|
|
1666
|
+
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1667
|
+
}
|
|
1657
1668
|
}
|
|
1658
|
-
// twist the two loops into 1,
|
|
1659
|
-
const source = loops.inputLoops[1].xyz;
|
|
1660
|
-
const dest = loops.inputLoops[0].xyz;
|
|
1661
|
-
dest.pushFromGrowableXYZArray(source);
|
|
1662
|
-
loops.outputLoops.push(loops.inputLoops[0]);
|
|
1663
|
-
return;
|
|
1664
1669
|
}
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1670
|
+
else {
|
|
1671
|
+
// 3 or more loops.
|
|
1672
|
+
loops.sortAndMergeLoops();
|
|
1673
|
+
}
|
|
1668
1674
|
}
|
|
1669
1675
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
* @param range
|
|
1672
|
-
* @param
|
|
1676
|
+
* Clip a convex polygon in place by a range box.
|
|
1677
|
+
* @param range six clipping planes
|
|
1678
|
+
* @param xyz convex polygon, clipped in place
|
|
1673
1679
|
* @return reference to xyz if the polygon still has points; undefined if all points are clipped away.
|
|
1674
1680
|
*/
|
|
1675
1681
|
static intersectRangeConvexPolygonInPlace(range, xyz) {
|
|
@@ -1709,9 +1715,6 @@ export class IndexedXYZCollectionPolygonOps {
|
|
|
1709
1715
|
* @public
|
|
1710
1716
|
*/
|
|
1711
1717
|
export class Point3dArrayPolygonOps {
|
|
1712
|
-
static _xyz0Work = Point3d.create();
|
|
1713
|
-
// private static _xyz1Work: Point3d = Point3d.create();
|
|
1714
|
-
// private static _xyz2Work: Point3d = Point3d.create();
|
|
1715
1718
|
/**
|
|
1716
1719
|
* Split a (convex) polygon into 2 parts.
|
|
1717
1720
|
* @param xyz original polygon
|
|
@@ -1734,53 +1737,17 @@ export class Point3dArrayPolygonOps {
|
|
|
1734
1737
|
return IndexedXYZCollectionPolygonOps.polygonPlaneCrossings(plane, xyzSource, crossings);
|
|
1735
1738
|
}
|
|
1736
1739
|
/**
|
|
1737
|
-
* Clip a polygon
|
|
1740
|
+
* Clip a polygon to one side of a plane in place.
|
|
1741
|
+
* @param plane altitude evaluator
|
|
1738
1742
|
* @param xyz input/output polygon
|
|
1739
|
-
* @param work scratch object
|
|
1743
|
+
* @param work optional scratch object
|
|
1740
1744
|
* @param tolerance tolerance for on-plane decision.
|
|
1745
|
+
* @see [[IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace]]
|
|
1741
1746
|
*/
|
|
1742
1747
|
static convexPolygonClipInPlace(plane, xyz, work, tolerance = Geometry.smallMetricDistance) {
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
let numNegative = 0;
|
|
1747
|
-
const fractionTol = 1.0e-8;
|
|
1748
|
-
const b = -tolerance;
|
|
1749
|
-
if (xyz.length > 2) {
|
|
1750
|
-
let xyz0 = xyz[xyz.length - 1];
|
|
1751
|
-
let a0 = plane.altitude(xyz0);
|
|
1752
|
-
// if (a0 >= 0.0)
|
|
1753
|
-
// work.push_back (xyz0);
|
|
1754
|
-
for (const xyz1 of xyz) {
|
|
1755
|
-
const a1 = plane.altitude(xyz1);
|
|
1756
|
-
if (a1 < 0)
|
|
1757
|
-
numNegative++;
|
|
1758
|
-
if (a0 * a1 < 0.0) {
|
|
1759
|
-
// simple crossing . . .
|
|
1760
|
-
const f = -a0 / (a1 - a0);
|
|
1761
|
-
if (f > 1.0 - fractionTol && a1 >= 0.0) {
|
|
1762
|
-
// the endpoint will be saved -- avoid the duplicate
|
|
1763
|
-
}
|
|
1764
|
-
else {
|
|
1765
|
-
work.push(xyz0.interpolate(f, xyz1));
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
if (a1 >= b)
|
|
1769
|
-
work.push(xyz1);
|
|
1770
|
-
xyz0 = Point3d.createFrom(xyz1);
|
|
1771
|
-
a0 = a1;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
if (work.length <= 2) {
|
|
1775
|
-
xyz.length = 0;
|
|
1776
|
-
}
|
|
1777
|
-
else if (numNegative > 0) {
|
|
1778
|
-
xyz.length = 0;
|
|
1779
|
-
for (const xyzI of work) {
|
|
1780
|
-
xyz.push(xyzI);
|
|
1781
|
-
}
|
|
1782
|
-
work.length = 0;
|
|
1783
|
-
}
|
|
1748
|
+
const xyzSource = new Point3dArrayCarrier(xyz);
|
|
1749
|
+
const workSource = work ? new Point3dArrayCarrier(work) : undefined;
|
|
1750
|
+
return IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane, xyzSource, workSource, true, tolerance);
|
|
1784
1751
|
}
|
|
1785
1752
|
}
|
|
1786
1753
|
//# sourceMappingURL=PolygonOps.js.map
|