@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
|
@@ -52,8 +52,18 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
|
|
|
52
52
|
* @param tolerance optional distance tolerance for coincidence.
|
|
53
53
|
*/
|
|
54
54
|
constructor(worldToLocal: Matrix4d | undefined, extendA: boolean, geometryB: AnyCurve | undefined, extendB: boolean, tolerance?: number);
|
|
55
|
-
/**
|
|
56
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Reset geometryA extension flags.
|
|
57
|
+
* * Undefined inputs are ignored.
|
|
58
|
+
* * All other instance data is unchanged, including accumulated intersections.
|
|
59
|
+
*/
|
|
60
|
+
resetGeometryA(extendA0?: boolean, extendA1?: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
* Reset geometryB and its extension flags.
|
|
63
|
+
* * Undefined inputs are ignored.
|
|
64
|
+
* * All other instance data is unchanged, including accumulated intersections.
|
|
65
|
+
*/
|
|
66
|
+
resetGeometryB(geometryB?: AnyCurve, extendB0?: boolean, extendB1?: boolean): void;
|
|
57
67
|
/** Accept the fraction if it falls inside (possibly extended) fraction range. */
|
|
58
68
|
private acceptFraction;
|
|
59
69
|
/** Test the fraction by strict parameter, but allow toleranced distance test at ends. */
|
|
@@ -75,6 +85,7 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
|
|
|
75
85
|
* @param fractionB1 end of the subcurve of cpB
|
|
76
86
|
* @param reversed whether to reverse the details in the recorded intersection pair
|
|
77
87
|
* @param intervalDetails optional data for a coincident segment intersection
|
|
88
|
+
* @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults to [[Geometry.smallAngleRadians]].
|
|
78
89
|
*/
|
|
79
90
|
private recordPointWithLocalFractions;
|
|
80
91
|
/**
|
|
@@ -144,8 +155,8 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
|
|
|
144
155
|
*/
|
|
145
156
|
private dispatchCurveChainWithDistanceIndex;
|
|
146
157
|
/**
|
|
147
|
-
* Invoke
|
|
148
|
-
*
|
|
158
|
+
* Invoke dispatch on each child of `g` as "geometryA".
|
|
159
|
+
* * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
|
|
149
160
|
*/
|
|
150
161
|
handleChildren(g: GeometryQuery): any;
|
|
151
162
|
/** Double dispatch handler for strongly typed segment. */
|
|
@@ -153,19 +164,50 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
|
|
|
153
164
|
/** Double dispatch handler for strongly typed linestring. */
|
|
154
165
|
handleLineString3d(lsA: LineString3d): any;
|
|
155
166
|
/** Double dispatch handler for strongly typed arc. */
|
|
156
|
-
handleArc3d(
|
|
167
|
+
handleArc3d(arcA: Arc3d): any;
|
|
157
168
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
158
|
-
handleBSplineCurve3d(
|
|
169
|
+
handleBSplineCurve3d(curveA: BSplineCurve3d): any;
|
|
159
170
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* @param
|
|
164
|
-
* @param
|
|
165
|
-
* @param
|
|
166
|
-
* @param reversed Whether
|
|
171
|
+
* Process tail of `this._results` for xy-intersections between the curve and spiral.
|
|
172
|
+
* * If a result is not already an intersection, refine it via Newton iteration unless it doesn't converge, in which
|
|
173
|
+
* case remove it.
|
|
174
|
+
* @param curveA The other curve primitive. May also be a transition spiral.
|
|
175
|
+
* @param spiralB The transition spiral.
|
|
176
|
+
* @param index0 index of first entry in tail of `this._results` to refine.
|
|
177
|
+
* @param reversed Whether `spiralB` data is in `detailA` of each recorded pair, and `curveA` data in `detailB`.
|
|
167
178
|
*/
|
|
168
179
|
private refineSpiralResultsByNewton;
|
|
180
|
+
/**
|
|
181
|
+
* Append stroke points and return the line string.
|
|
182
|
+
* * This is a convenient wrapper for [[CurvePrimitive.emitStrokes]] but the analogous instance method cannot be added
|
|
183
|
+
* to that class due to the ensuing recursion with subclass [[LineString3d]].
|
|
184
|
+
* @param options options for stroking the instance curve.
|
|
185
|
+
* @param result object to receive appended stroke points; if omitted, a new object is created, populated, and returned.
|
|
186
|
+
*/
|
|
187
|
+
private strokeCurve;
|
|
188
|
+
/** Compute an approximation to the max chord height error of the stroked spiral, and another curve if a spiral. */
|
|
189
|
+
private computeMaxSpiralStrokeError;
|
|
190
|
+
/**
|
|
191
|
+
* Solve the intersection problem for stroked, unextended curveB.
|
|
192
|
+
* * @return the number of results appended.
|
|
193
|
+
*/
|
|
194
|
+
private appendDiscreteIntersectionResults;
|
|
195
|
+
/**
|
|
196
|
+
* Solve the close approach problem for stroked, unextended curveB.
|
|
197
|
+
* * Sort the results shortest projection distance first.
|
|
198
|
+
* @return the number of results appended.
|
|
199
|
+
*/
|
|
200
|
+
private appendDiscreteCloseApproachResults;
|
|
201
|
+
/**
|
|
202
|
+
* Compute the xy-intersection of a curve and a spiral.
|
|
203
|
+
* * When `curveA` is extended, duplicate solutions may be returned.
|
|
204
|
+
* @param curveA curve to intersect with spiralB. May also be a transition spiral.
|
|
205
|
+
* @param extendA0 whether to compute xy-intersections with curveA extended beyond its start.
|
|
206
|
+
* @param extendA1 whether to compute xy-intersections with curveA extended beyond its end.
|
|
207
|
+
* @param spiralB transition spiral to intersect with curveA.
|
|
208
|
+
* @param reversed whether `spiralB` data will be recorded in `detailA` of each result, and `curveA` data in `detailB`.
|
|
209
|
+
*/
|
|
210
|
+
private dispatchCurveSpiral;
|
|
169
211
|
/** Double dispatch handler for strongly typed spiral curve. */
|
|
170
212
|
handleTransitionSpiral(spiral: TransitionSpiral3d): any;
|
|
171
213
|
/** Double dispatch handler for strongly typed CurveChainWithDistanceIndex. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCurveIntersectXY.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CurveCurveIntersectXY.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAOlF,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAMrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"CurveCurveIntersectXY.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CurveCurveIntersectXY.ts"],"names":[],"mappings":"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"}
|
|
@@ -24,6 +24,7 @@ const SmallSystem_1 = require("../../numerics/SmallSystem");
|
|
|
24
24
|
const Arc3d_1 = require("../Arc3d");
|
|
25
25
|
const CurveChainWithDistanceIndex_1 = require("../CurveChainWithDistanceIndex");
|
|
26
26
|
const CurveCollection_1 = require("../CurveCollection");
|
|
27
|
+
const CurveCurve_1 = require("../CurveCurve");
|
|
27
28
|
const CurveLocationDetail_1 = require("../CurveLocationDetail");
|
|
28
29
|
const CurvePrimitive_1 = require("../CurvePrimitive");
|
|
29
30
|
const LineSegment3d_1 = require("../LineSegment3d");
|
|
@@ -90,9 +91,29 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
90
91
|
this._coincidentGeometryContext = CoincidentGeometryOps_1.CoincidentGeometryQuery.create(tolerance);
|
|
91
92
|
this._results = [];
|
|
92
93
|
}
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Reset geometryA extension flags.
|
|
96
|
+
* * Undefined inputs are ignored.
|
|
97
|
+
* * All other instance data is unchanged, including accumulated intersections.
|
|
98
|
+
*/
|
|
99
|
+
resetGeometryA(extendA0, extendA1) {
|
|
100
|
+
if (extendA0 !== undefined)
|
|
101
|
+
this._extendA0 = extendA0;
|
|
102
|
+
if (extendA1 !== undefined)
|
|
103
|
+
this._extendA1 = extendA1;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Reset geometryB and its extension flags.
|
|
107
|
+
* * Undefined inputs are ignored.
|
|
108
|
+
* * All other instance data is unchanged, including accumulated intersections.
|
|
109
|
+
*/
|
|
110
|
+
resetGeometryB(geometryB, extendB0, extendB1) {
|
|
111
|
+
if (geometryB)
|
|
112
|
+
this._geometryB = geometryB;
|
|
113
|
+
if (extendB0 !== undefined)
|
|
114
|
+
this._extendB0 = extendB0;
|
|
115
|
+
if (extendB1 !== undefined)
|
|
116
|
+
this._extendB1 = extendB1;
|
|
96
117
|
}
|
|
97
118
|
/** Accept the fraction if it falls inside (possibly extended) fraction range. */
|
|
98
119
|
acceptFraction(extend0, fraction, extend1, fractionTol = 1.0e-12) {
|
|
@@ -134,14 +155,14 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
134
155
|
* @param fractionB1 end of the subcurve of cpB
|
|
135
156
|
* @param reversed whether to reverse the details in the recorded intersection pair
|
|
136
157
|
* @param intervalDetails optional data for a coincident segment intersection
|
|
158
|
+
* @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults to [[Geometry.smallAngleRadians]].
|
|
137
159
|
*/
|
|
138
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
160
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails, fractionTol) {
|
|
139
161
|
let globalFractionA, globalFractionB;
|
|
140
162
|
let globalFractionA1, globalFractionB1;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (isInterval) {
|
|
163
|
+
let isInterval = false;
|
|
164
|
+
if (intervalDetails && intervalDetails.detailA.isInterval() && intervalDetails.detailB.isInterval()) {
|
|
165
|
+
isInterval = true;
|
|
145
166
|
globalFractionA = Geometry_1.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
|
|
146
167
|
globalFractionB = Geometry_1.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
|
|
147
168
|
globalFractionA1 = Geometry_1.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction1, fractionA1);
|
|
@@ -157,13 +178,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
157
178
|
const oldDetailA = this._results[numPrevious - 1].detailA;
|
|
158
179
|
const oldDetailB = this._results[numPrevious - 1].detailB;
|
|
159
180
|
if (reversed) {
|
|
160
|
-
if (oldDetailB.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }) &&
|
|
161
|
-
oldDetailA.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }))
|
|
181
|
+
if (oldDetailB.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }, fractionTol) &&
|
|
182
|
+
oldDetailA.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }, fractionTol))
|
|
162
183
|
return;
|
|
163
184
|
}
|
|
164
185
|
else {
|
|
165
|
-
if (oldDetailA.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }) &&
|
|
166
|
-
oldDetailB.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }))
|
|
186
|
+
if (oldDetailA.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }, fractionTol) &&
|
|
187
|
+
oldDetailB.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }, fractionTol))
|
|
167
188
|
return;
|
|
168
189
|
}
|
|
169
190
|
}
|
|
@@ -227,6 +248,8 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
227
248
|
* fraction mapping. Assumes caller knows the _worldToLocal is present.
|
|
228
249
|
*/
|
|
229
250
|
computeSegmentSegment3DH(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
251
|
+
if (undefined === this._worldToLocalPerspective)
|
|
252
|
+
return;
|
|
230
253
|
const hA0 = CurveCurveIntersectXY._workPointA0H;
|
|
231
254
|
const hA1 = CurveCurveIntersectXY._workPointA1H;
|
|
232
255
|
const hB0 = CurveCurveIntersectXY._workPointB0H;
|
|
@@ -781,30 +804,30 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
781
804
|
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
782
805
|
*/
|
|
783
806
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
784
|
-
const geomB = this._geometryB;
|
|
807
|
+
const geomB = this._geometryB;
|
|
785
808
|
if (!geomB || !geomB.children || !(geomB instanceof CurveCollection_1.CurveCollection))
|
|
786
809
|
return;
|
|
787
810
|
const children = geomB.children;
|
|
788
|
-
const
|
|
789
|
-
const
|
|
811
|
+
const saveExtendB0 = this._extendB0;
|
|
812
|
+
const saveExtendB1 = this._extendB1;
|
|
790
813
|
for (let i = 0; i < children.length; i++) {
|
|
791
|
-
|
|
814
|
+
let extendB0 = saveExtendB0;
|
|
815
|
+
let extendB1 = saveExtendB1;
|
|
792
816
|
if (geomB instanceof Path_1.Path && children.length > 1) {
|
|
793
817
|
if (i === 0)
|
|
794
|
-
|
|
818
|
+
extendB1 = false; // first child can only extend from start
|
|
795
819
|
else if (i === children.length - 1)
|
|
796
|
-
|
|
820
|
+
extendB0 = false; // last child can only extend from end
|
|
797
821
|
else
|
|
798
|
-
|
|
822
|
+
extendB0 = extendB1 = false; // middle children cannot extend
|
|
799
823
|
}
|
|
800
824
|
else if (geomB instanceof Loop_1.Loop) {
|
|
801
|
-
|
|
825
|
+
extendB0 = extendB1 = false; // Loops cannot extend
|
|
802
826
|
}
|
|
827
|
+
this.resetGeometryB(children[i], extendB0, extendB1);
|
|
803
828
|
geomAHandler(geomA);
|
|
804
|
-
this._extendB0 = extendB0; // restore
|
|
805
|
-
this._extendB1 = extendB1; // restore
|
|
806
829
|
}
|
|
807
|
-
this.
|
|
830
|
+
this.resetGeometryB(geomB, saveExtendB0, saveExtendB1);
|
|
808
831
|
}
|
|
809
832
|
/**
|
|
810
833
|
* Low level dispatch of CurveChainWithDistanceIndex.
|
|
@@ -818,36 +841,39 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
818
841
|
}
|
|
819
842
|
const index0 = this._results.length;
|
|
820
843
|
const geomB = this._geometryB; // save
|
|
821
|
-
this.
|
|
844
|
+
this.resetGeometryB(geomB.path);
|
|
822
845
|
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
823
|
-
this.
|
|
846
|
+
this.resetGeometryB(geomB); // restore
|
|
824
847
|
this._results = CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
825
848
|
}
|
|
826
849
|
/**
|
|
827
|
-
* Invoke
|
|
828
|
-
*
|
|
850
|
+
* Invoke dispatch on each child of `g` as "geometryA".
|
|
851
|
+
* * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
|
|
829
852
|
*/
|
|
830
853
|
handleChildren(g) {
|
|
831
854
|
const children = g.children;
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
else
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
this._extendA1 = extendA1; // restore
|
|
855
|
+
if (!children)
|
|
856
|
+
return;
|
|
857
|
+
const saveExtendA0 = this._extendA0;
|
|
858
|
+
const saveExtendA1 = this._extendA1;
|
|
859
|
+
for (let i = 0; i < children.length; i++) {
|
|
860
|
+
let extendA0 = saveExtendA0;
|
|
861
|
+
let extendA1 = saveExtendA1;
|
|
862
|
+
if (g instanceof Path_1.Path && children.length > 1) {
|
|
863
|
+
if (i === 0)
|
|
864
|
+
extendA1 = false; // first child can only extend from start
|
|
865
|
+
else if (i === children.length - 1)
|
|
866
|
+
extendA0 = false; // last child can only extend from end
|
|
867
|
+
else
|
|
868
|
+
extendA0 = extendA1 = false; // middle children cannot extend
|
|
869
|
+
}
|
|
870
|
+
else if (g instanceof Loop_1.Loop) {
|
|
871
|
+
extendA0 = extendA1 = false; // Loops cannot extend
|
|
850
872
|
}
|
|
873
|
+
this.resetGeometryA(extendA0, extendA1);
|
|
874
|
+
children[i].dispatchToGeometryHandler(this);
|
|
875
|
+
}
|
|
876
|
+
this.resetGeometryA(saveExtendA0, saveExtendA1);
|
|
851
877
|
}
|
|
852
878
|
/** Double dispatch handler for strongly typed segment. */
|
|
853
879
|
handleLineSegment3d(segmentA) {
|
|
@@ -865,12 +891,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
865
891
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
866
892
|
}
|
|
867
893
|
else if (this._geometryB instanceof TransitionSpiral3d_1.TransitionSpiral3d) {
|
|
868
|
-
|
|
869
|
-
this._geometryB.emitStrokes(spiralApproximation);
|
|
870
|
-
const numPreviousResults = this._results.length;
|
|
871
|
-
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, spiralApproximation, false, false, false);
|
|
872
|
-
const numberOfNewResults = this._results.length - numPreviousResults;
|
|
873
|
-
this.refineSpiralResultsByNewton(segmentA, this._geometryB, numberOfNewResults);
|
|
894
|
+
this.dispatchCurveSpiral(segmentA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
874
895
|
}
|
|
875
896
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
876
897
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
@@ -896,12 +917,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
896
917
|
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
897
918
|
}
|
|
898
919
|
else if (this._geometryB instanceof TransitionSpiral3d_1.TransitionSpiral3d) {
|
|
899
|
-
|
|
900
|
-
this._geometryB.emitStrokes(spiralApproximation);
|
|
901
|
-
const numPreviousResults = this._results.length;
|
|
902
|
-
this.computeLineStringLineString(lsA, this._extendA0, this._extendA1, spiralApproximation, false, false, false);
|
|
903
|
-
const numberOfNewResults = this._results.length - numPreviousResults;
|
|
904
|
-
this.refineSpiralResultsByNewton(lsA, this._geometryB, numberOfNewResults);
|
|
920
|
+
this.dispatchCurveSpiral(lsA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
905
921
|
}
|
|
906
922
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
907
923
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
@@ -912,100 +928,212 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
912
928
|
return undefined;
|
|
913
929
|
}
|
|
914
930
|
/** Double dispatch handler for strongly typed arc. */
|
|
915
|
-
handleArc3d(
|
|
931
|
+
handleArc3d(arcA) {
|
|
916
932
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
917
|
-
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1,
|
|
933
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arcA, this._extendA0, this._extendA1, true);
|
|
918
934
|
}
|
|
919
935
|
else if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
920
|
-
this.computeArcLineString(
|
|
936
|
+
this.computeArcLineString(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
921
937
|
}
|
|
922
938
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
923
|
-
this.dispatchArcArc(
|
|
939
|
+
this.dispatchArcArc(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
924
940
|
}
|
|
925
941
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
|
|
926
|
-
this.dispatchArcBsplineCurve3d(
|
|
942
|
+
this.dispatchArcBsplineCurve3d(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
927
943
|
}
|
|
928
944
|
else if (this._geometryB instanceof TransitionSpiral3d_1.TransitionSpiral3d) {
|
|
929
|
-
|
|
930
|
-
this._geometryB.emitStrokes(spiralApproximation);
|
|
931
|
-
const numPreviousResults = this._results.length;
|
|
932
|
-
this.computeArcLineString(arc0, this._extendA0, this._extendA1, spiralApproximation, false, false, false);
|
|
933
|
-
const numberOfNewResults = this._results.length - numPreviousResults;
|
|
934
|
-
this.refineSpiralResultsByNewton(arc0, this._geometryB, numberOfNewResults);
|
|
945
|
+
this.dispatchCurveSpiral(arcA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
935
946
|
}
|
|
936
947
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
937
|
-
this.dispatchCurveCollection(
|
|
948
|
+
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
938
949
|
}
|
|
939
950
|
else if (this._geometryB instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex) {
|
|
940
|
-
this.dispatchCurveChainWithDistanceIndex(
|
|
951
|
+
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
941
952
|
}
|
|
942
953
|
return undefined;
|
|
943
954
|
}
|
|
944
955
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
945
|
-
handleBSplineCurve3d(
|
|
956
|
+
handleBSplineCurve3d(curveA) {
|
|
946
957
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
947
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1,
|
|
958
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
948
959
|
}
|
|
949
960
|
else if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
950
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1,
|
|
961
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
951
962
|
}
|
|
952
963
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
953
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1,
|
|
964
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
|
|
954
965
|
}
|
|
955
966
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3dBase) {
|
|
956
|
-
this.dispatchBSplineCurve3dBSplineCurve3d(
|
|
967
|
+
this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
|
|
957
968
|
}
|
|
958
969
|
else if (this._geometryB instanceof TransitionSpiral3d_1.TransitionSpiral3d) {
|
|
959
|
-
|
|
960
|
-
this._geometryB.emitStrokes(spiralApproximation);
|
|
961
|
-
const numPreviousResults = this._results.length;
|
|
962
|
-
this.dispatchLineStringBSplineCurve(spiralApproximation, false, false, curve, this._extendA0, this._extendA1, true);
|
|
963
|
-
const numberOfNewResults = this._results.length - numPreviousResults;
|
|
964
|
-
this.refineSpiralResultsByNewton(curve, this._geometryB, numberOfNewResults);
|
|
970
|
+
this.dispatchCurveSpiral(curveA, this._extendA0, this._extendA1, this._geometryB, false);
|
|
965
971
|
}
|
|
966
972
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
967
|
-
this.dispatchCurveCollection(
|
|
973
|
+
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
968
974
|
}
|
|
969
975
|
else if (this._geometryB instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex) {
|
|
970
|
-
this.dispatchCurveChainWithDistanceIndex(
|
|
976
|
+
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
971
977
|
}
|
|
972
978
|
return undefined;
|
|
973
979
|
}
|
|
974
980
|
/**
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
* @param
|
|
979
|
-
* @param
|
|
980
|
-
* @param
|
|
981
|
-
* @param reversed Whether
|
|
981
|
+
* Process tail of `this._results` for xy-intersections between the curve and spiral.
|
|
982
|
+
* * If a result is not already an intersection, refine it via Newton iteration unless it doesn't converge, in which
|
|
983
|
+
* case remove it.
|
|
984
|
+
* @param curveA The other curve primitive. May also be a transition spiral.
|
|
985
|
+
* @param spiralB The transition spiral.
|
|
986
|
+
* @param index0 index of first entry in tail of `this._results` to refine.
|
|
987
|
+
* @param reversed Whether `spiralB` data is in `detailA` of each recorded pair, and `curveA` data in `detailB`.
|
|
982
988
|
*/
|
|
983
|
-
refineSpiralResultsByNewton(
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
989
|
+
refineSpiralResultsByNewton(curveA, spiralB, index0, reversed = false) {
|
|
990
|
+
if (index0 >= this._results.length)
|
|
991
|
+
return;
|
|
992
|
+
// ASSUME: seeds in results tail are ordered by most accurate first, as only the first convergence within tolerance is recorded.
|
|
993
|
+
const xyMatchingFunction = new Newton_1.CurveCurveIntersectionXYRRToRRD(curveA, spiralB);
|
|
994
|
+
const maxIterations = 100; // observed 73 iterations to convergence in tangent case
|
|
995
|
+
const newtonSearcher = new Newton_1.Newton2dUnboundedWithDerivative(xyMatchingFunction, maxIterations);
|
|
996
|
+
const fractionTol = 2 * newtonSearcher.stepSizeTolerance; // relative cluster diameter for Newton convergence
|
|
997
|
+
const comparePairs = (a, b) => {
|
|
998
|
+
(0, core_bentley_1.assert)(() => a.detailA.curve === b.detailA.curve && a.detailB.curve === b.detailB.curve, "pairs are compatible");
|
|
999
|
+
// sort on either fraction, then on the point, using appropriate tolerances for each
|
|
1000
|
+
if (Geometry_1.Geometry.isAlmostEqualNumber(a.detailA.fraction, b.detailA.fraction, fractionTol))
|
|
1001
|
+
return 0;
|
|
1002
|
+
if (a.detailA.point.isAlmostEqualXY(b.detailA.point, this._coincidentGeometryContext.tolerance))
|
|
1003
|
+
return 0;
|
|
1004
|
+
return a.detailA.fraction - b.detailA.fraction;
|
|
1005
|
+
};
|
|
1006
|
+
const myResults = new core_bentley_1.SortedArray(comparePairs, core_bentley_1.DuplicatePolicy.Retain);
|
|
1007
|
+
const pushToMyResults = (cpA, fA, cpB, fB) => {
|
|
1008
|
+
const detailA = CurveLocationDetail_1.CurveLocationDetail.createCurveFractionPoint(cpA, fA, cpA.fractionToPoint(fA));
|
|
1009
|
+
const detailB = CurveLocationDetail_1.CurveLocationDetail.createCurveFractionPoint(cpB, fB, cpB.fractionToPoint(fB));
|
|
1010
|
+
detailA.setIntervalRole(CurveLocationDetail_1.CurveIntervalRole.isolated);
|
|
1011
|
+
detailB.setIntervalRole(CurveLocationDetail_1.CurveIntervalRole.isolated);
|
|
1012
|
+
let pushed = false;
|
|
1013
|
+
myResults.insert(new CurveLocationDetail_1.CurveLocationDetailPair(reversed ? detailB : detailA, reversed ? detailA : detailB), () => pushed = true);
|
|
1014
|
+
return pushed;
|
|
1015
|
+
};
|
|
1016
|
+
for (let i = index0; i < this._results.length; i++) {
|
|
1017
|
+
const pair = this._results[i];
|
|
1018
|
+
const detailA = reversed ? pair.detailB : pair.detailA;
|
|
1019
|
+
const detailB = reversed ? pair.detailA : pair.detailB;
|
|
1020
|
+
(0, core_bentley_1.assert)(detailB.curve instanceof LineString3d_1.LineString3d, "Caller has discretized the spiral");
|
|
1021
|
+
const extendA0 = reversed ? this._extendB0 : this._extendA0;
|
|
1022
|
+
const extendA1 = reversed ? this._extendB1 : this._extendA1;
|
|
1023
|
+
newtonSearcher.setUV(detailA.fraction, detailB.fraction); // use linestring fraction as spiral param; it generally yields a closer point than fractional length!
|
|
992
1024
|
if (newtonSearcher.runIterations()) {
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
if (this.acceptFraction(
|
|
996
|
-
|
|
1025
|
+
const fractionA = newtonSearcher.getU();
|
|
1026
|
+
const fractionB = newtonSearcher.getV();
|
|
1027
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(false, fractionB, false))
|
|
1028
|
+
pushToMyResults(curveA, fractionA, spiralB, fractionB);
|
|
1029
|
+
}
|
|
1030
|
+
else if (newtonSearcher.numIterations < 10) {
|
|
1031
|
+
// if Newton failed early due to vanishing (partial) derivative, check for a root there
|
|
1032
|
+
const fractionA = newtonSearcher.getU();
|
|
1033
|
+
const fractionB = newtonSearcher.getV();
|
|
1034
|
+
if (curveA.fractionToPoint(fractionA).isAlmostEqualXY(spiralB.fractionToPoint(fractionB), this._coincidentGeometryContext.tolerance))
|
|
1035
|
+
pushToMyResults(curveA, fractionA, spiralB, fractionB);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
this._results.splice(index0, this._results.length - index0, ...myResults.extractArray());
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Append stroke points and return the line string.
|
|
1042
|
+
* * This is a convenient wrapper for [[CurvePrimitive.emitStrokes]] but the analogous instance method cannot be added
|
|
1043
|
+
* to that class due to the ensuing recursion with subclass [[LineString3d]].
|
|
1044
|
+
* @param options options for stroking the instance curve.
|
|
1045
|
+
* @param result object to receive appended stroke points; if omitted, a new object is created, populated, and returned.
|
|
1046
|
+
*/
|
|
1047
|
+
strokeCurve(curve, options, result) {
|
|
1048
|
+
const ls = result ? result : LineString3d_1.LineString3d.create();
|
|
1049
|
+
curve.emitStrokes(ls, options);
|
|
1050
|
+
return ls;
|
|
1051
|
+
}
|
|
1052
|
+
/** Compute an approximation to the max chord height error of the stroked spiral, and another curve if a spiral. */
|
|
1053
|
+
computeMaxSpiralStrokeError(spiral0, ls0, spiral1, ls1) {
|
|
1054
|
+
let maxError = 0;
|
|
1055
|
+
if (ls0.numEdges() > 0) {
|
|
1056
|
+
// the max error occurs at the spiral end with higher curvature
|
|
1057
|
+
const k0 = spiral0.fractionToCurvature(0);
|
|
1058
|
+
const k1 = spiral0.fractionToCurvature(1);
|
|
1059
|
+
const iChord = (k0 !== undefined && k1 !== undefined && Math.abs(k0) > Math.abs(k1)) ? 0 : ls0.numEdges() - 1;
|
|
1060
|
+
const midPoint = Point3dVector3d_1.Point3d.create();
|
|
1061
|
+
const detail = CurveLocationDetail_1.CurveLocationDetail.create();
|
|
1062
|
+
if (ls0.packedPoints.interpolateIndexIndex(iChord, 0.5, iChord + 1, midPoint)) {
|
|
1063
|
+
if (spiral0.closestPoint(midPoint, false, detail))
|
|
1064
|
+
maxError = detail.a;
|
|
1065
|
+
}
|
|
1066
|
+
if (spiral1 && spiral1 instanceof TransitionSpiral3d_1.TransitionSpiral3d && ls1 && ls1 instanceof LineString3d_1.LineString3d) {
|
|
1067
|
+
const maxError1 = this.computeMaxSpiralStrokeError(spiral1, ls1);
|
|
1068
|
+
if (maxError1 > maxError)
|
|
1069
|
+
maxError = maxError1;
|
|
997
1070
|
}
|
|
998
1071
|
}
|
|
1072
|
+
return maxError;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Solve the intersection problem for stroked, unextended curveB.
|
|
1076
|
+
* * @return the number of results appended.
|
|
1077
|
+
*/
|
|
1078
|
+
appendDiscreteIntersectionResults(curveA, extendA0, extendA1, lsB, reversed) {
|
|
1079
|
+
const i0 = this._results.length;
|
|
1080
|
+
// handleLineString3d requires us to swap geometries:
|
|
1081
|
+
const geomB = this._geometryB;
|
|
1082
|
+
const extendB0 = this._extendB0;
|
|
1083
|
+
const extendB1 = this._extendB1;
|
|
1084
|
+
this.resetGeometryA(false, false); // lsB is never extended
|
|
1085
|
+
this.resetGeometryB(curveA, extendA0, extendA1);
|
|
1086
|
+
this.handleLineString3d(lsB); // this puts lsB data in detailA, as expected when reversed is true
|
|
1087
|
+
if (!reversed) { // swap lsB data to detailB
|
|
1088
|
+
for (let i = i0; i < this._results.length; i++)
|
|
1089
|
+
this._results[i].swapDetails();
|
|
1090
|
+
}
|
|
1091
|
+
this.resetGeometryA(extendA0, extendA1);
|
|
1092
|
+
this.resetGeometryB(geomB, extendB0, extendB1);
|
|
1093
|
+
return this._results.length - i0;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Solve the close approach problem for stroked, unextended curveB.
|
|
1097
|
+
* * Sort the results shortest projection distance first.
|
|
1098
|
+
* @return the number of results appended.
|
|
1099
|
+
*/
|
|
1100
|
+
appendDiscreteCloseApproachResults(curveA, lsB, maxDistance, reversed) {
|
|
1101
|
+
const i0 = this._results.length;
|
|
1102
|
+
const closeApproachPairs = CurveCurve_1.CurveCurve.closeApproachProjectedXYPairs(reversed ? lsB : curveA, reversed ? curveA : lsB, maxDistance);
|
|
1103
|
+
closeApproachPairs.sort((p0, p1) => p0.detailA.a - p1.detailA.a);
|
|
1104
|
+
this._results.push(...closeApproachPairs);
|
|
1105
|
+
return this._results.length - i0;
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Compute the xy-intersection of a curve and a spiral.
|
|
1109
|
+
* * When `curveA` is extended, duplicate solutions may be returned.
|
|
1110
|
+
* @param curveA curve to intersect with spiralB. May also be a transition spiral.
|
|
1111
|
+
* @param extendA0 whether to compute xy-intersections with curveA extended beyond its start.
|
|
1112
|
+
* @param extendA1 whether to compute xy-intersections with curveA extended beyond its end.
|
|
1113
|
+
* @param spiralB transition spiral to intersect with curveA.
|
|
1114
|
+
* @param reversed whether `spiralB` data will be recorded in `detailA` of each result, and `curveA` data in `detailB`.
|
|
1115
|
+
*/
|
|
1116
|
+
dispatchCurveSpiral(curveA, extendA0, extendA1, spiralB, reversed) {
|
|
1117
|
+
let cpA = curveA;
|
|
1118
|
+
if (curveA instanceof TransitionSpiral3d_1.TransitionSpiral3d) {
|
|
1119
|
+
cpA = this.strokeCurve(curveA);
|
|
1120
|
+
extendA0 = extendA1 = false;
|
|
1121
|
+
}
|
|
1122
|
+
const cpB = this.strokeCurve(spiralB);
|
|
1123
|
+
const maxError = 1.01 * this.computeMaxSpiralStrokeError(spiralB, cpB, curveA, cpA);
|
|
1124
|
+
const index0 = this._results.length;
|
|
1125
|
+
// append seeds computed by solving discretized spiral problems, then refine the seeds via Newton
|
|
1126
|
+
this.appendDiscreteIntersectionResults(cpA, extendA0, extendA1, cpB, reversed); // recorded first because more accurate
|
|
1127
|
+
this.appendDiscreteCloseApproachResults(cpA, cpB, maxError, reversed); // seeds for finding tangent intersections
|
|
1128
|
+
this.refineSpiralResultsByNewton(curveA, spiralB, index0, reversed);
|
|
999
1129
|
}
|
|
1000
1130
|
/** Double dispatch handler for strongly typed spiral curve. */
|
|
1001
1131
|
handleTransitionSpiral(spiral) {
|
|
1002
|
-
if (this._geometryB instanceof
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
this.
|
|
1007
|
-
const numberOfNewResults = this._results.length - numPreviousResults;
|
|
1008
|
-
this.refineSpiralResultsByNewton(this._geometryB, spiral, numberOfNewResults, true);
|
|
1132
|
+
if (this._geometryB instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex) {
|
|
1133
|
+
this.dispatchCurveChainWithDistanceIndex(spiral, this.handleTransitionSpiral.bind(this));
|
|
1134
|
+
}
|
|
1135
|
+
else if (this._geometryB instanceof CurvePrimitive_1.CurvePrimitive) {
|
|
1136
|
+
this.dispatchCurveSpiral(this._geometryB, this._extendB0, this._extendB1, spiral, true);
|
|
1009
1137
|
}
|
|
1010
1138
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
1011
1139
|
this.dispatchCurveCollection(spiral, this.handleTransitionSpiral.bind(this));
|