@itwin/core-geometry 4.2.0-dev.9 → 4.3.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -1
- package/lib/cjs/Geometry.d.ts +4 -4
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +2 -2
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +4 -3
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.d.ts +4 -3
- package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +2 -1
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +17 -11
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +14 -8
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts +6 -5
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +3 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +1 -3
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +1 -3
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +4 -4
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +93 -91
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +171 -152
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +19 -19
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +20 -22
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +47 -30
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +81 -46
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +17 -5
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +14 -2
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +1 -2
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +2 -2
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.d.ts +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/{CurveChain.d.ts → CurveTypes.d.ts} +6 -6
- package/lib/cjs/curve/CurveTypes.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveChain.js → CurveTypes.js} +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -0
- package/lib/cjs/curve/CurveWireMomentsXYZ.d.ts +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.d.ts +3 -3
- package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
- package/lib/cjs/curve/ParityRegion.js +2 -2
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts +3 -2
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +2 -2
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.d.ts +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.d.ts +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.d.ts +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +54 -5
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +154 -3
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +20 -11
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +22 -11
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.d.ts +3 -3
- package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
- package/lib/cjs/curve/UnionRegion.js +2 -2
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +2 -2
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +233 -0
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +299 -202
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
- package/lib/{esm/curve → cjs/curve/internalContexts}/CurveCurveIntersectXY.d.ts +45 -51
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +104 -115
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +18 -18
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +134 -108
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts +2 -2
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js +9 -5
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +1 -0
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js +1 -0
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts +28 -11
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +57 -45
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts +15 -26
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +23 -32
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +0 -8
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +0 -16
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +4 -4
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +12 -0
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +3 -6
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -2
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +0 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +2 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +2 -3
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +1 -1
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +3 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +4 -3
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +2 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +4 -6
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.d.ts +14 -8
- package/lib/cjs/geometry4d/Map4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js +38 -16
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +4 -2
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +2 -2
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +2 -2
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +18 -6
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +55 -25
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +16 -7
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +38 -7
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +5 -39
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +7 -41
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +10 -8
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +64 -18
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +6 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +68 -2
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +35 -26
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +84 -100
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +29 -11
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +45 -26
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.d.ts +2 -2
- package/lib/cjs/topology/HalfEdgeMarkSet.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js +4 -4
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +3 -0
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +19 -5
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +15 -7
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +89 -47
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +4 -4
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +2 -2
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +4 -3
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.d.ts +4 -3
- package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +2 -1
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +17 -11
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +14 -8
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts +6 -5
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +3 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -3
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +1 -3
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +4 -4
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +93 -91
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +171 -152
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +19 -19
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +19 -20
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +47 -30
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +81 -46
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +17 -5
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +12 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +1 -2
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +2 -2
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.d.ts +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/{CurveChain.d.ts → CurveTypes.d.ts} +6 -6
- package/lib/esm/curve/CurveTypes.d.ts.map +1 -0
- package/lib/esm/curve/{CurveChain.js → CurveTypes.js} +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -0
- package/lib/esm/curve/CurveWireMomentsXYZ.d.ts +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/ParityRegion.d.ts +3 -3
- package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
- package/lib/esm/curve/ParityRegion.js +2 -2
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts +3 -2
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.d.ts +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.d.ts +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.d.ts +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +54 -5
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +153 -3
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +20 -11
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +22 -11
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.d.ts +3 -3
- package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
- package/lib/esm/curve/UnionRegion.js +2 -2
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +2 -2
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +233 -0
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +299 -202
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
- package/lib/{cjs/curve → esm/curve/internalContexts}/CurveCurveIntersectXY.d.ts +45 -51
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +103 -113
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +18 -18
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +134 -108
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts +2 -2
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js +9 -5
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts +1 -0
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js +1 -0
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts +28 -11
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +57 -45
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts +15 -26
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +23 -32
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +0 -8
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +0 -16
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +4 -4
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +12 -0
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +3 -6
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -2
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +0 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +2 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +2 -3
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +1 -1
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +3 -1
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +4 -3
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts +2 -1
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +4 -6
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.d.ts +14 -8
- package/lib/esm/geometry4d/Map4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Map4d.js +38 -16
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +4 -2
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +2 -2
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +2 -2
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +18 -6
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +55 -25
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +16 -7
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +38 -7
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +5 -39
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +7 -41
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +10 -8
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +64 -18
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +6 -0
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +68 -2
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +35 -26
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +84 -100
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +29 -11
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +45 -26
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.d.ts +2 -2
- package/lib/esm/topology/HalfEdgeMarkSet.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js +2 -2
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +3 -0
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +19 -5
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +15 -7
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +89 -47
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +4 -4
- package/lib/cjs/curve/CurveChain.d.ts.map +0 -1
- package/lib/cjs/curve/CurveChain.js.map +0 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +0 -175
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +0 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +0 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +0 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +0 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +0 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +0 -1
- package/lib/esm/curve/CurveChain.d.ts.map +0 -1
- package/lib/esm/curve/CurveChain.js.map +0 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +0 -175
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +0 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +0 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +0 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +0 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +0 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +0 -1
package/lib/cjs/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts}
RENAMED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Curve
|
|
3
3
|
*/
|
|
4
|
-
import { BSplineCurve3d } from "
|
|
5
|
-
import { BSplineCurve3dH } from "
|
|
6
|
-
import { NullGeometryHandler } from "
|
|
7
|
-
import { Plane3dByOriginAndUnitNormal } from "
|
|
8
|
-
import { Point3d, Vector3d } from "
|
|
9
|
-
import { Arc3d } from "
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { LineSegment3d } from "
|
|
13
|
-
import { LineString3d } from "
|
|
4
|
+
import { BSplineCurve3d } from "../../bspline/BSplineCurve";
|
|
5
|
+
import { BSplineCurve3dH } from "../../bspline/BSplineCurve3dH";
|
|
6
|
+
import { NullGeometryHandler } from "../../geometry3d/GeometryHandler";
|
|
7
|
+
import { Plane3dByOriginAndUnitNormal } from "../../geometry3d/Plane3dByOriginAndUnitNormal";
|
|
8
|
+
import { Point3d, Vector3d } from "../../geometry3d/Point3dVector3d";
|
|
9
|
+
import { Arc3d } from "../Arc3d";
|
|
10
|
+
import { CurveLocationDetailPair } from "../CurveLocationDetail";
|
|
11
|
+
import { AnyCurve } from "../CurveTypes";
|
|
12
|
+
import { LineSegment3d } from "../LineSegment3d";
|
|
13
|
+
import { LineString3d } from "../LineString3d";
|
|
14
14
|
/**
|
|
15
15
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
16
|
-
* * **NOTE:** GeometryQuery input (_geometryB) should really be AnyCurve.
|
|
17
16
|
* * Instances are initialized and called from CurveCurve.
|
|
18
17
|
* * geometryB is saved for later reference.
|
|
19
18
|
* @internal
|
|
@@ -28,18 +27,17 @@ export declare class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
28
27
|
private static _workPointAA1;
|
|
29
28
|
private static _workPointBB0;
|
|
30
29
|
private static _workPointBB1;
|
|
31
|
-
private reinitialize;
|
|
32
30
|
/**
|
|
33
31
|
* @param extendA flag to enable using extension of the other geometry.
|
|
34
32
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
35
33
|
* @param extendB flag for extension of geometryB.
|
|
36
34
|
*/
|
|
37
|
-
constructor(extendA: boolean, geometryB:
|
|
35
|
+
constructor(extendA: boolean, geometryB: AnyCurve, extendB: boolean);
|
|
38
36
|
/**
|
|
39
|
-
*
|
|
37
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
|
|
40
38
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
41
39
|
*/
|
|
42
|
-
|
|
40
|
+
grabPairedResults(reinitialize?: boolean): CurveLocationDetailPair[];
|
|
43
41
|
private acceptFraction;
|
|
44
42
|
/**
|
|
45
43
|
* Compute intersection of two line segments.
|
|
@@ -65,7 +63,7 @@ export declare class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
65
63
|
* @param origin plane origin
|
|
66
64
|
* @param vectorA vector which must be in the plane.
|
|
67
65
|
* @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
|
|
68
|
-
*
|
|
66
|
+
* passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
|
|
69
67
|
* @param vectorB first candidate for additional in-plane vector
|
|
70
68
|
* @param vectorC second candidate for additional in-plane vector
|
|
71
69
|
*/
|
|
@@ -82,13 +80,15 @@ export declare class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
82
80
|
computeSegmentLineString(lsA: LineSegment3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any;
|
|
83
81
|
/** Detail computation for arc intersecting linestring. */
|
|
84
82
|
computeArcLineString(arcA: Arc3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any;
|
|
83
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
84
|
+
private computeLineStringLineString;
|
|
85
85
|
/** Double dispatch handler for strongly typed segment. */
|
|
86
86
|
handleLineSegment3d(segmentA: LineSegment3d): any;
|
|
87
|
-
/** double dispatch handler for strongly typed linestring
|
|
87
|
+
/** double dispatch handler for strongly typed linestring. */
|
|
88
88
|
handleLineString3d(lsA: LineString3d): any;
|
|
89
89
|
/** Double dispatch handler for strongly typed arc. */
|
|
90
90
|
handleArc3d(arc0: Arc3d): any;
|
|
91
|
-
/** Double dispatch handler for strongly typed bspline curve
|
|
91
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
92
92
|
handleBSplineCurve3d(curve: BSplineCurve3d): any;
|
|
93
93
|
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
94
94
|
handleBSplineCurve3dH(_curve: BSplineCurve3dH): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurveCurveIntersectXYZ.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CurveCurveIntersectXYZ.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAA0C,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEzG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,MAAM,CAAC,cAAc,CAAqB;IAClD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAChD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAChD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAChD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAChD;;;;OAIG;gBACgB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;IAO1E;;;OAGG;IACI,iBAAiB,CAAC,YAAY,GAAE,OAAe,GAAG,uBAAuB,EAAE;IAMlF,OAAO,CAAC,cAAc;IAOtB;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IA4CrC;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IA2B/B,OAAO,CAAC,sBAAsB;IAuB9B;;;;;;;;;;;;;OAaG;IACI,qCAAqC,CAC1C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAC5F,4BAA4B,GAAG,SAAS;IAe3C,OAAO,CAAC,kBAAkB;IAyC1B,OAAO,CAAC,qBAAqB;IA0B7B,OAAO,CAAC,cAAc;IAqCtB,OAAO,CAAC,yBAAyB;IA6LjC,OAAO,CAAC,oCAAoC;IAkE5C,OAAO,CAAC,2BAA2B;IAqCnC,yEAAyE;IAClE,8BAA8B,CACnC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GACpG,GAAG;IAsBN,8DAA8D;IACvD,wBAAwB,CAC7B,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAC3F,GAAG;IAwBN,0DAA0D;IACnD,oBAAoB,CACzB,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GACpF,GAAG;IAqBN,iEAAiE;IACjE,OAAO,CAAC,2BAA2B;IAmCnC,0DAA0D;IAC1C,mBAAmB,CAAC,QAAQ,EAAE,aAAa,GAAG,GAAG;IAuBjE,6DAA6D;IAC7C,kBAAkB,CAAC,GAAG,EAAE,YAAY,GAAG,GAAG;IAa1D,sDAAsD;IACtC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,GAAG;IAe7C,gEAAgE;IAChD,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG;IAehE,4EAA4E;IAC5D,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,GAAG;CAgBpE"}
|
package/lib/cjs/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js}
RENAMED
|
@@ -8,30 +8,25 @@ exports.CurveCurveIntersectXYZ = void 0;
|
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Curve
|
|
10
10
|
*/
|
|
11
|
-
const BSplineCurve_1 = require("
|
|
12
|
-
const Geometry_1 = require("
|
|
13
|
-
const GeometryHandler_1 = require("
|
|
14
|
-
const Plane3dByOriginAndUnitNormal_1 = require("
|
|
15
|
-
const Point2dVector2d_1 = require("
|
|
16
|
-
const Point3dVector3d_1 = require("
|
|
17
|
-
const Polynomials_1 = require("
|
|
18
|
-
const Arc3d_1 = require("
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const LineString3d_1 = require("./LineString3d");
|
|
11
|
+
const BSplineCurve_1 = require("../../bspline/BSplineCurve");
|
|
12
|
+
const Geometry_1 = require("../../Geometry");
|
|
13
|
+
const GeometryHandler_1 = require("../../geometry3d/GeometryHandler");
|
|
14
|
+
const Plane3dByOriginAndUnitNormal_1 = require("../../geometry3d/Plane3dByOriginAndUnitNormal");
|
|
15
|
+
const Point2dVector2d_1 = require("../../geometry3d/Point2dVector2d");
|
|
16
|
+
const Point3dVector3d_1 = require("../../geometry3d/Point3dVector3d");
|
|
17
|
+
const Polynomials_1 = require("../../numerics/Polynomials");
|
|
18
|
+
const Arc3d_1 = require("../Arc3d");
|
|
19
|
+
const CurveLocationDetail_1 = require("../CurveLocationDetail");
|
|
20
|
+
const LineSegment3d_1 = require("../LineSegment3d");
|
|
21
|
+
const LineString3d_1 = require("../LineString3d");
|
|
23
22
|
// cspell:word XYRR
|
|
24
23
|
/**
|
|
25
24
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
26
|
-
* * **NOTE:** GeometryQuery input (_geometryB) should really be AnyCurve.
|
|
27
25
|
* * Instances are initialized and called from CurveCurve.
|
|
28
26
|
* * geometryB is saved for later reference.
|
|
29
27
|
* @internal
|
|
30
28
|
*/
|
|
31
29
|
class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
32
|
-
reinitialize() {
|
|
33
|
-
this._results = new CurveCurveIntersectXY_1.CurveLocationDetailArrayPair();
|
|
34
|
-
}
|
|
35
30
|
/**
|
|
36
31
|
* @param extendA flag to enable using extension of the other geometry.
|
|
37
32
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -42,16 +37,16 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
42
37
|
this._extendA = extendA;
|
|
43
38
|
this._geometryB = geometryB;
|
|
44
39
|
this._extendB = extendB;
|
|
45
|
-
this.
|
|
40
|
+
this._results = [];
|
|
46
41
|
}
|
|
47
42
|
/**
|
|
48
|
-
*
|
|
43
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
|
|
49
44
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
50
45
|
*/
|
|
51
|
-
|
|
46
|
+
grabPairedResults(reinitialize = false) {
|
|
52
47
|
const result = this._results;
|
|
53
48
|
if (reinitialize)
|
|
54
|
-
this.
|
|
49
|
+
this._results = [];
|
|
55
50
|
return result;
|
|
56
51
|
}
|
|
57
52
|
acceptFraction(extend0, fraction, extend1) {
|
|
@@ -67,15 +62,14 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
67
62
|
* Reject if evaluated points do not match coordinates (e.g. close approach point).
|
|
68
63
|
* Record with fraction mapping.
|
|
69
64
|
*/
|
|
70
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
71
|
-
cpB, fractionB0, fractionB1, reversed) {
|
|
65
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed) {
|
|
72
66
|
const globalFractionA = Geometry_1.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
73
67
|
const globalFractionB = Geometry_1.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
74
68
|
// ignore duplicate of most recent point . ..
|
|
75
|
-
const numPrevious = this._results.
|
|
69
|
+
const numPrevious = this._results.length;
|
|
76
70
|
if (numPrevious > 0) {
|
|
77
|
-
const topFractionA = this._results
|
|
78
|
-
const topFractionB = this._results
|
|
71
|
+
const topFractionA = this._results[numPrevious - 1].detailA.fraction;
|
|
72
|
+
const topFractionB = this._results[numPrevious - 1].detailB.fraction;
|
|
79
73
|
if (reversed) {
|
|
80
74
|
if (Geometry_1.Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
|
|
81
75
|
Geometry_1.Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
|
|
@@ -96,12 +90,12 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
96
90
|
const detailB = CurveLocationDetail_1.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
|
|
97
91
|
detailB.setIntervalRole(CurveLocationDetail_1.CurveIntervalRole.isolated);
|
|
98
92
|
if (reversed) {
|
|
99
|
-
|
|
100
|
-
this._results.
|
|
93
|
+
const pair = new CurveLocationDetail_1.CurveLocationDetailPair(detailB, detailA);
|
|
94
|
+
this._results.push(pair);
|
|
101
95
|
}
|
|
102
96
|
else {
|
|
103
|
-
|
|
104
|
-
this._results.
|
|
97
|
+
const pair = new CurveLocationDetail_1.CurveLocationDetailPair(detailA, detailB);
|
|
98
|
+
this._results.push(pair);
|
|
105
99
|
}
|
|
106
100
|
}
|
|
107
101
|
/**
|
|
@@ -117,8 +111,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
117
111
|
}
|
|
118
112
|
}
|
|
119
113
|
// Caller accesses data from a line segment and passes to here.
|
|
120
|
-
//
|
|
121
|
-
// allow all combinations to be passed in
|
|
114
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
115
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
122
116
|
// This method applies transform.
|
|
123
117
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
124
118
|
this.computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed);
|
|
@@ -133,7 +127,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
133
127
|
* @param origin plane origin
|
|
134
128
|
* @param vectorA vector which must be in the plane.
|
|
135
129
|
* @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
|
|
136
|
-
*
|
|
130
|
+
* passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
|
|
137
131
|
* @param vectorB first candidate for additional in-plane vector
|
|
138
132
|
* @param vectorC second candidate for additional in-plane vector
|
|
139
133
|
*/
|
|
@@ -148,8 +142,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
148
142
|
return undefined;
|
|
149
143
|
}
|
|
150
144
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
151
|
-
//
|
|
152
|
-
// allow all combinations to be passed in
|
|
145
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
146
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
153
147
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
154
148
|
const lineVector = Point3dVector3d_1.Vector3d.createStartEnd(pointA0, pointA1);
|
|
155
149
|
const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);
|
|
@@ -184,7 +178,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
184
178
|
Polynomials_1.TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(otherVectors.center.x, otherVectors.center.y, 1.0, otherVectors.vector0.x, otherVectors.vector0.y, 0.0, otherVectors.vector90.x, otherVectors.vector90.y, 0.0, ellipseRadians, circleRadians);
|
|
185
179
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
186
180
|
const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
187
|
-
const fractionB =
|
|
181
|
+
const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
188
182
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
189
183
|
if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
190
184
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
@@ -193,13 +187,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
193
187
|
}
|
|
194
188
|
}
|
|
195
189
|
// Caller accesses data from two arcs.
|
|
196
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
197
|
-
// Solves the arc-arc equations
|
|
190
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
191
|
+
// Solves the arc-arc equations.
|
|
198
192
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
199
193
|
// If arcs are in different planes:
|
|
200
194
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
201
195
|
// 2) accept points that appear in both intersection sets.
|
|
202
|
-
// If arcs are in parallel planes -- no intersections
|
|
196
|
+
// If arcs are in parallel planes -- no intersections.
|
|
203
197
|
// If arcs are in the same plane -- xy intersection in that plane.
|
|
204
198
|
const planeA = Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);
|
|
205
199
|
const planeB = Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);
|
|
@@ -207,7 +201,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
207
201
|
return;
|
|
208
202
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
209
203
|
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {
|
|
210
|
-
// coplanar
|
|
204
|
+
// coplanar
|
|
211
205
|
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
212
206
|
}
|
|
213
207
|
}
|
|
@@ -229,8 +223,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
225
|
// Caller accesses data from two arcs.
|
|
232
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
233
|
-
// Solves the arc-arc equations
|
|
226
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
227
|
+
// Solves the arc-arc equations.
|
|
234
228
|
dispatchArcBsplineCurve3d(_arc, _extendA, _cpB, _extendB, _reversed) {
|
|
235
229
|
/*
|
|
236
230
|
// Arc: X = C + cU + sV
|
|
@@ -238,7 +232,9 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
238
232
|
let matrixA: Matrix3d;
|
|
239
233
|
if (this._worldToLocalPerspective) {
|
|
240
234
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
241
|
-
matrixA = Matrix3d.createColumnsXYW(
|
|
235
|
+
matrixA = Matrix3d.createColumnsXYW(
|
|
236
|
+
dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w,
|
|
237
|
+
);
|
|
242
238
|
} else {
|
|
243
239
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
244
240
|
matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
@@ -250,12 +246,21 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
250
246
|
const matrixAInverse = matrixA.inverse();
|
|
251
247
|
if (matrixAInverse) {
|
|
252
248
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
253
|
-
const orderG = 2 * orderF - 1;
|
|
249
|
+
const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
|
|
254
250
|
const coffF = new Float64Array(orderF);
|
|
255
251
|
const univariateBezierG = new UnivariateBezier(orderG);
|
|
256
|
-
const axx = matrixAInverse.at(0, 0);
|
|
257
|
-
const
|
|
258
|
-
const
|
|
252
|
+
const axx = matrixAInverse.at(0, 0);
|
|
253
|
+
const axy = matrixAInverse.at(0, 1);
|
|
254
|
+
const axz = 0.0;
|
|
255
|
+
const axw = matrixAInverse.at(0, 2);
|
|
256
|
+
const ayx = matrixAInverse.at(1, 0);
|
|
257
|
+
const ayy = matrixAInverse.at(1, 1);
|
|
258
|
+
const ayz = 0.0;
|
|
259
|
+
const ayw = matrixAInverse.at(1, 2);
|
|
260
|
+
const awx = matrixAInverse.at(2, 0);
|
|
261
|
+
const awy = matrixAInverse.at(2, 1);
|
|
262
|
+
const awz = 0.0;
|
|
263
|
+
const aww = matrixAInverse.at(2, 2);
|
|
259
264
|
|
|
260
265
|
if (matrixAInverse) {
|
|
261
266
|
let bezier: BezierCurve3dH | undefined;
|
|
@@ -282,9 +287,11 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
282
287
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
283
288
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
284
289
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
285
|
-
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
286
|
-
this.
|
|
287
|
-
|
|
290
|
+
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
291
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
292
|
+
this.recordPointWithLocalFractions(
|
|
293
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
294
|
+
);
|
|
288
295
|
}
|
|
289
296
|
}
|
|
290
297
|
}
|
|
@@ -294,8 +301,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
294
301
|
*/
|
|
295
302
|
}
|
|
296
303
|
/*
|
|
297
|
-
//
|
|
298
|
-
private transformBeziers(beziers: BezierCurve3dH[]) {
|
|
304
|
+
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
305
|
+
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
299
306
|
if (this._worldToLocalAffine) {
|
|
300
307
|
for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);
|
|
301
308
|
} else if (this._worldToLocalPerspective) {
|
|
@@ -312,11 +319,6 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
312
319
|
}
|
|
313
320
|
return ranges;
|
|
314
321
|
}
|
|
315
|
-
private _xyzwA0?: Point4d;
|
|
316
|
-
private _xyzwA1?: Point4d;
|
|
317
|
-
private _xyzwPlane?: Point4d;
|
|
318
|
-
private _xyzwB?: Point4d;
|
|
319
|
-
|
|
320
322
|
private dispatchBezierBezierStrokeFirst(
|
|
321
323
|
bezierA: BezierCurve3dH,
|
|
322
324
|
bcurveA: BSplineCurve3dBase,
|
|
@@ -325,11 +327,16 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
325
327
|
bcurveB: BSplineCurve3dBase,
|
|
326
328
|
_strokeCountB: number,
|
|
327
329
|
univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.
|
|
328
|
-
reversed: boolean
|
|
329
|
-
|
|
330
|
-
if (!this.
|
|
331
|
-
|
|
332
|
-
if (!this.
|
|
330
|
+
reversed: boolean,
|
|
331
|
+
) {
|
|
332
|
+
if (!this._xyzwA0)
|
|
333
|
+
this._xyzwA0 = Point4d.create();
|
|
334
|
+
if (!this._xyzwA1)
|
|
335
|
+
this._xyzwA1 = Point4d.create();
|
|
336
|
+
if (!this._xyzwPlane)
|
|
337
|
+
this._xyzwPlane = Point4d.create();
|
|
338
|
+
if (!this._xyzwB)
|
|
339
|
+
this._xyzwB = Point4d.create();
|
|
333
340
|
const roots = univariateBezierG.roots(0.0, true);
|
|
334
341
|
if (roots) {
|
|
335
342
|
for (const root of roots) {
|
|
@@ -340,8 +347,9 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
340
347
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
341
348
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
342
349
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
343
|
-
this.recordPointWithLocalFractions(
|
|
344
|
-
fractionB, cpB, 0, 1, reversed
|
|
350
|
+
this.recordPointWithLocalFractions(
|
|
351
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
352
|
+
);
|
|
345
353
|
}
|
|
346
354
|
}
|
|
347
355
|
bezierA.fractionToPoint4d(0.0, this._xyzwA0);
|
|
@@ -353,7 +361,9 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
353
361
|
f1 = i * df;
|
|
354
362
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
355
363
|
Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
356
|
-
bezierB.poleProductsXYZW(
|
|
364
|
+
bezierB.poleProductsXYZW(
|
|
365
|
+
univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w,
|
|
366
|
+
);
|
|
357
367
|
let errors = 0;
|
|
358
368
|
const roots = univariateBezierB.roots(0.0, true);
|
|
359
369
|
if (roots)
|
|
@@ -363,7 +373,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
363
373
|
const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
|
|
364
374
|
if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
|
|
365
375
|
const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);
|
|
366
|
-
|
|
376
|
+
// TODO implement newton search
|
|
367
377
|
const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);
|
|
368
378
|
const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
369
379
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
@@ -388,9 +398,11 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
388
398
|
errors++;
|
|
389
399
|
if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
|
|
390
400
|
errors++;
|
|
391
|
-
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
392
|
-
this.
|
|
393
|
-
|
|
401
|
+
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
402
|
+
this.acceptFraction(false, bcurveBFraction, false)) {
|
|
403
|
+
this.recordPointWithLocalFractions(
|
|
404
|
+
bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed,
|
|
405
|
+
);
|
|
394
406
|
}
|
|
395
407
|
}
|
|
396
408
|
}
|
|
@@ -398,8 +410,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
398
410
|
}
|
|
399
411
|
*/
|
|
400
412
|
// Caller accesses data from two arcs.
|
|
401
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
402
|
-
// Solves the arc-arc equations
|
|
413
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
414
|
+
// Solves the arc-arc equations.
|
|
403
415
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
404
416
|
/*
|
|
405
417
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -420,9 +432,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
420
432
|
const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();
|
|
421
433
|
const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();
|
|
422
434
|
if (strokeCountA < strokeCountB)
|
|
423
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
435
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
436
|
+
bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, _reversed,
|
|
437
|
+
);
|
|
424
438
|
else
|
|
425
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
439
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
440
|
+
bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, !_reversed,
|
|
441
|
+
);
|
|
426
442
|
}
|
|
427
443
|
}
|
|
428
444
|
}
|
|
@@ -430,9 +446,9 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
430
446
|
}
|
|
431
447
|
/*
|
|
432
448
|
/**
|
|
433
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
449
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
434
450
|
* @param xyz xyz parts of input point.
|
|
435
|
-
* @param w
|
|
451
|
+
* @param w weight to use for homogeneous effects.
|
|
436
452
|
*/
|
|
437
453
|
/*
|
|
438
454
|
private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {
|
|
@@ -469,16 +485,19 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
469
485
|
// NOW .. we have a plane in world space. Intersect it with the bspline:
|
|
470
486
|
const intersections: CurveLocationDetail[] = [];
|
|
471
487
|
bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);
|
|
472
|
-
// intersections has WORLD points with bspline fractions.
|
|
488
|
+
// intersections has WORLD points with bspline fractions.
|
|
489
|
+
// (the bspline fractions are all good 0..1 fractions within the spline).
|
|
473
490
|
// accept those that are within the segment range.
|
|
474
491
|
for (const detail of intersections) {
|
|
475
492
|
const fractionB = detail.fraction;
|
|
476
493
|
const curvePoint = detail.point;
|
|
477
494
|
const curvePointH = this.projectPoint(curvePoint);
|
|
478
495
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
479
|
-
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
480
|
-
this.
|
|
481
|
-
|
|
496
|
+
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
497
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
498
|
+
this.recordPointWithLocalFractions(
|
|
499
|
+
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
500
|
+
);
|
|
482
501
|
}
|
|
483
502
|
}
|
|
484
503
|
*/
|
|
@@ -495,7 +514,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
495
514
|
const pointA0 = CurveCurveIntersectXYZ._workPointA0;
|
|
496
515
|
const pointA1 = CurveCurveIntersectXYZ._workPointA1;
|
|
497
516
|
lsA.pointAt(0, pointA0);
|
|
498
|
-
for (let iA = 1; iA < numA; iA
|
|
517
|
+
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
499
518
|
lsA.pointAt(iA, pointA1);
|
|
500
519
|
fA1 = iA * dfA;
|
|
501
520
|
this.dispatchSegmentBsplineCurve(
|
|
@@ -546,6 +565,38 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
546
565
|
}
|
|
547
566
|
return undefined;
|
|
548
567
|
}
|
|
568
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
569
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
570
|
+
const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
|
|
571
|
+
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
572
|
+
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
573
|
+
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
574
|
+
const numA = lsA.numPoints();
|
|
575
|
+
const numB = lsB.numPoints();
|
|
576
|
+
if (numA > 1 && numB > 1) {
|
|
577
|
+
lsA.pointAt(0, pointA0);
|
|
578
|
+
const dfA = 1.0 / (numA - 1);
|
|
579
|
+
const dfB = 1.0 / (numB - 1);
|
|
580
|
+
let fA0 = 0.0;
|
|
581
|
+
let fB0;
|
|
582
|
+
let fA1;
|
|
583
|
+
let fB1;
|
|
584
|
+
const extendA = this._extendA;
|
|
585
|
+
const extendB = this._extendB;
|
|
586
|
+
lsA.pointAt(0, pointA0);
|
|
587
|
+
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
588
|
+
fA1 = ia * dfA;
|
|
589
|
+
fB0 = 0.0;
|
|
590
|
+
lsA.pointAt(ia, pointA1);
|
|
591
|
+
lsB.pointAt(0, pointB0);
|
|
592
|
+
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
593
|
+
lsB.pointAt(ib, pointB1);
|
|
594
|
+
fB1 = ib * dfB;
|
|
595
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
549
600
|
/** Double dispatch handler for strongly typed segment. */
|
|
550
601
|
handleLineSegment3d(segmentA) {
|
|
551
602
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
@@ -561,38 +612,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
561
612
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
|
|
562
613
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
563
614
|
}
|
|
615
|
+
return undefined;
|
|
564
616
|
}
|
|
565
|
-
/** double dispatch handler for strongly typed linestring
|
|
617
|
+
/** double dispatch handler for strongly typed linestring. */
|
|
566
618
|
handleLineString3d(lsA) {
|
|
567
619
|
if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
568
620
|
const lsB = this._geometryB;
|
|
569
|
-
|
|
570
|
-
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
571
|
-
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
572
|
-
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
573
|
-
const numA = lsA.numPoints();
|
|
574
|
-
const numB = lsB.numPoints();
|
|
575
|
-
if (numA > 1 && numB > 1) {
|
|
576
|
-
lsA.pointAt(0, pointA0);
|
|
577
|
-
const dfA = 1.0 / (numA - 1);
|
|
578
|
-
const dfB = 1.0 / (numB - 1);
|
|
579
|
-
let fA0 = 0.0;
|
|
580
|
-
let fA1, fB0, fB1;
|
|
581
|
-
const extendA = this._extendA;
|
|
582
|
-
const extendB = this._extendB;
|
|
583
|
-
lsA.pointAt(0, pointA0);
|
|
584
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
585
|
-
fA1 = ia * dfA;
|
|
586
|
-
fB0 = 0.0;
|
|
587
|
-
lsA.pointAt(ia, pointA1);
|
|
588
|
-
lsB.pointAt(0, pointB0);
|
|
589
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
590
|
-
lsB.pointAt(ib, pointB1);
|
|
591
|
-
fB1 = ib * dfB;
|
|
592
|
-
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, false);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
621
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
596
622
|
}
|
|
597
623
|
else if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
598
624
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -621,7 +647,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.NullGeometryHandler {
|
|
|
621
647
|
}
|
|
622
648
|
return undefined;
|
|
623
649
|
}
|
|
624
|
-
/** Double dispatch handler for strongly typed bspline curve
|
|
650
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
625
651
|
handleBSplineCurve3d(curve) {
|
|
626
652
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
627
653
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
|