@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/esm/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/esm/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js}
RENAMED
|
@@ -5,30 +5,25 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Curve
|
|
7
7
|
*/
|
|
8
|
-
import { BSplineCurve3d, BSplineCurve3dBase } from "
|
|
9
|
-
import { Geometry } from "
|
|
10
|
-
import { NullGeometryHandler } from "
|
|
11
|
-
import { Plane3dByOriginAndUnitNormal } from "
|
|
12
|
-
import { Vector2d } from "
|
|
13
|
-
import { Point3d, Vector3d } from "
|
|
14
|
-
import { SmallSystem, TrigPolynomial } from "
|
|
15
|
-
import { Arc3d } from "
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { LineString3d } from "./LineString3d";
|
|
8
|
+
import { BSplineCurve3d, BSplineCurve3dBase } from "../../bspline/BSplineCurve";
|
|
9
|
+
import { Geometry } from "../../Geometry";
|
|
10
|
+
import { NullGeometryHandler } from "../../geometry3d/GeometryHandler";
|
|
11
|
+
import { Plane3dByOriginAndUnitNormal } from "../../geometry3d/Plane3dByOriginAndUnitNormal";
|
|
12
|
+
import { Vector2d } from "../../geometry3d/Point2dVector2d";
|
|
13
|
+
import { Point3d, Vector3d } from "../../geometry3d/Point3dVector3d";
|
|
14
|
+
import { SmallSystem, TrigPolynomial } from "../../numerics/Polynomials";
|
|
15
|
+
import { Arc3d } from "../Arc3d";
|
|
16
|
+
import { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from "../CurveLocationDetail";
|
|
17
|
+
import { LineSegment3d } from "../LineSegment3d";
|
|
18
|
+
import { LineString3d } from "../LineString3d";
|
|
20
19
|
// cspell:word XYRR
|
|
21
20
|
/**
|
|
22
21
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
23
|
-
* * **NOTE:** GeometryQuery input (_geometryB) should really be AnyCurve.
|
|
24
22
|
* * Instances are initialized and called from CurveCurve.
|
|
25
23
|
* * geometryB is saved for later reference.
|
|
26
24
|
* @internal
|
|
27
25
|
*/
|
|
28
26
|
class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
29
|
-
reinitialize() {
|
|
30
|
-
this._results = new CurveLocationDetailArrayPair();
|
|
31
|
-
}
|
|
32
27
|
/**
|
|
33
28
|
* @param extendA flag to enable using extension of the other geometry.
|
|
34
29
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -39,16 +34,16 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
39
34
|
this._extendA = extendA;
|
|
40
35
|
this._geometryB = geometryB;
|
|
41
36
|
this._extendB = extendB;
|
|
42
|
-
this.
|
|
37
|
+
this._results = [];
|
|
43
38
|
}
|
|
44
39
|
/**
|
|
45
|
-
*
|
|
40
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
|
|
46
41
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
47
42
|
*/
|
|
48
|
-
|
|
43
|
+
grabPairedResults(reinitialize = false) {
|
|
49
44
|
const result = this._results;
|
|
50
45
|
if (reinitialize)
|
|
51
|
-
this.
|
|
46
|
+
this._results = [];
|
|
52
47
|
return result;
|
|
53
48
|
}
|
|
54
49
|
acceptFraction(extend0, fraction, extend1) {
|
|
@@ -64,15 +59,14 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
64
59
|
* Reject if evaluated points do not match coordinates (e.g. close approach point).
|
|
65
60
|
* Record with fraction mapping.
|
|
66
61
|
*/
|
|
67
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
68
|
-
cpB, fractionB0, fractionB1, reversed) {
|
|
62
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed) {
|
|
69
63
|
const globalFractionA = Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
70
64
|
const globalFractionB = Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
71
65
|
// ignore duplicate of most recent point . ..
|
|
72
|
-
const numPrevious = this._results.
|
|
66
|
+
const numPrevious = this._results.length;
|
|
73
67
|
if (numPrevious > 0) {
|
|
74
|
-
const topFractionA = this._results
|
|
75
|
-
const topFractionB = this._results
|
|
68
|
+
const topFractionA = this._results[numPrevious - 1].detailA.fraction;
|
|
69
|
+
const topFractionB = this._results[numPrevious - 1].detailB.fraction;
|
|
76
70
|
if (reversed) {
|
|
77
71
|
if (Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
|
|
78
72
|
Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
|
|
@@ -93,12 +87,12 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
93
87
|
const detailB = CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
|
|
94
88
|
detailB.setIntervalRole(CurveIntervalRole.isolated);
|
|
95
89
|
if (reversed) {
|
|
96
|
-
|
|
97
|
-
this._results.
|
|
90
|
+
const pair = new CurveLocationDetailPair(detailB, detailA);
|
|
91
|
+
this._results.push(pair);
|
|
98
92
|
}
|
|
99
93
|
else {
|
|
100
|
-
|
|
101
|
-
this._results.
|
|
94
|
+
const pair = new CurveLocationDetailPair(detailA, detailB);
|
|
95
|
+
this._results.push(pair);
|
|
102
96
|
}
|
|
103
97
|
}
|
|
104
98
|
/**
|
|
@@ -114,8 +108,8 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
110
|
// Caller accesses data from a line segment and passes to here.
|
|
117
|
-
//
|
|
118
|
-
// allow all combinations to be passed in
|
|
111
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
112
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
119
113
|
// This method applies transform.
|
|
120
114
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
121
115
|
this.computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed);
|
|
@@ -130,7 +124,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
130
124
|
* @param origin plane origin
|
|
131
125
|
* @param vectorA vector which must be in the plane.
|
|
132
126
|
* @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
|
|
133
|
-
*
|
|
127
|
+
* passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
|
|
134
128
|
* @param vectorB first candidate for additional in-plane vector
|
|
135
129
|
* @param vectorC second candidate for additional in-plane vector
|
|
136
130
|
*/
|
|
@@ -145,8 +139,8 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
145
139
|
return undefined;
|
|
146
140
|
}
|
|
147
141
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
148
|
-
//
|
|
149
|
-
// allow all combinations to be passed in
|
|
142
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
143
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
150
144
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
151
145
|
const lineVector = Vector3d.createStartEnd(pointA0, pointA1);
|
|
152
146
|
const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);
|
|
@@ -181,7 +175,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
181
175
|
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);
|
|
182
176
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
183
177
|
const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
184
|
-
const fractionB =
|
|
178
|
+
const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
185
179
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
186
180
|
if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
187
181
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
@@ -190,13 +184,13 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
190
184
|
}
|
|
191
185
|
}
|
|
192
186
|
// Caller accesses data from two arcs.
|
|
193
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
194
|
-
// Solves the arc-arc equations
|
|
187
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
188
|
+
// Solves the arc-arc equations.
|
|
195
189
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
196
190
|
// If arcs are in different planes:
|
|
197
191
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
198
192
|
// 2) accept points that appear in both intersection sets.
|
|
199
|
-
// If arcs are in parallel planes -- no intersections
|
|
193
|
+
// If arcs are in parallel planes -- no intersections.
|
|
200
194
|
// If arcs are in the same plane -- xy intersection in that plane.
|
|
201
195
|
const planeA = Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);
|
|
202
196
|
const planeB = Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);
|
|
@@ -204,7 +198,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
204
198
|
return;
|
|
205
199
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
206
200
|
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {
|
|
207
|
-
// coplanar
|
|
201
|
+
// coplanar
|
|
208
202
|
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
209
203
|
}
|
|
210
204
|
}
|
|
@@ -226,8 +220,8 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
226
220
|
}
|
|
227
221
|
}
|
|
228
222
|
// Caller accesses data from two arcs.
|
|
229
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
230
|
-
// Solves the arc-arc equations
|
|
223
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
224
|
+
// Solves the arc-arc equations.
|
|
231
225
|
dispatchArcBsplineCurve3d(_arc, _extendA, _cpB, _extendB, _reversed) {
|
|
232
226
|
/*
|
|
233
227
|
// Arc: X = C + cU + sV
|
|
@@ -235,7 +229,9 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
235
229
|
let matrixA: Matrix3d;
|
|
236
230
|
if (this._worldToLocalPerspective) {
|
|
237
231
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
238
|
-
matrixA = Matrix3d.createColumnsXYW(
|
|
232
|
+
matrixA = Matrix3d.createColumnsXYW(
|
|
233
|
+
dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w,
|
|
234
|
+
);
|
|
239
235
|
} else {
|
|
240
236
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
241
237
|
matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
@@ -247,12 +243,21 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
247
243
|
const matrixAInverse = matrixA.inverse();
|
|
248
244
|
if (matrixAInverse) {
|
|
249
245
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
250
|
-
const orderG = 2 * orderF - 1;
|
|
246
|
+
const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
|
|
251
247
|
const coffF = new Float64Array(orderF);
|
|
252
248
|
const univariateBezierG = new UnivariateBezier(orderG);
|
|
253
|
-
const axx = matrixAInverse.at(0, 0);
|
|
254
|
-
const
|
|
255
|
-
const
|
|
249
|
+
const axx = matrixAInverse.at(0, 0);
|
|
250
|
+
const axy = matrixAInverse.at(0, 1);
|
|
251
|
+
const axz = 0.0;
|
|
252
|
+
const axw = matrixAInverse.at(0, 2);
|
|
253
|
+
const ayx = matrixAInverse.at(1, 0);
|
|
254
|
+
const ayy = matrixAInverse.at(1, 1);
|
|
255
|
+
const ayz = 0.0;
|
|
256
|
+
const ayw = matrixAInverse.at(1, 2);
|
|
257
|
+
const awx = matrixAInverse.at(2, 0);
|
|
258
|
+
const awy = matrixAInverse.at(2, 1);
|
|
259
|
+
const awz = 0.0;
|
|
260
|
+
const aww = matrixAInverse.at(2, 2);
|
|
256
261
|
|
|
257
262
|
if (matrixAInverse) {
|
|
258
263
|
let bezier: BezierCurve3dH | undefined;
|
|
@@ -279,9 +284,11 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
279
284
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
280
285
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
281
286
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
282
|
-
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
283
|
-
this.
|
|
284
|
-
|
|
287
|
+
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
288
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
289
|
+
this.recordPointWithLocalFractions(
|
|
290
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
291
|
+
);
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
294
|
}
|
|
@@ -291,8 +298,8 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
291
298
|
*/
|
|
292
299
|
}
|
|
293
300
|
/*
|
|
294
|
-
//
|
|
295
|
-
private transformBeziers(beziers: BezierCurve3dH[]) {
|
|
301
|
+
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
302
|
+
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
296
303
|
if (this._worldToLocalAffine) {
|
|
297
304
|
for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);
|
|
298
305
|
} else if (this._worldToLocalPerspective) {
|
|
@@ -309,11 +316,6 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
309
316
|
}
|
|
310
317
|
return ranges;
|
|
311
318
|
}
|
|
312
|
-
private _xyzwA0?: Point4d;
|
|
313
|
-
private _xyzwA1?: Point4d;
|
|
314
|
-
private _xyzwPlane?: Point4d;
|
|
315
|
-
private _xyzwB?: Point4d;
|
|
316
|
-
|
|
317
319
|
private dispatchBezierBezierStrokeFirst(
|
|
318
320
|
bezierA: BezierCurve3dH,
|
|
319
321
|
bcurveA: BSplineCurve3dBase,
|
|
@@ -322,11 +324,16 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
322
324
|
bcurveB: BSplineCurve3dBase,
|
|
323
325
|
_strokeCountB: number,
|
|
324
326
|
univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.
|
|
325
|
-
reversed: boolean
|
|
326
|
-
|
|
327
|
-
if (!this.
|
|
328
|
-
|
|
329
|
-
if (!this.
|
|
327
|
+
reversed: boolean,
|
|
328
|
+
) {
|
|
329
|
+
if (!this._xyzwA0)
|
|
330
|
+
this._xyzwA0 = Point4d.create();
|
|
331
|
+
if (!this._xyzwA1)
|
|
332
|
+
this._xyzwA1 = Point4d.create();
|
|
333
|
+
if (!this._xyzwPlane)
|
|
334
|
+
this._xyzwPlane = Point4d.create();
|
|
335
|
+
if (!this._xyzwB)
|
|
336
|
+
this._xyzwB = Point4d.create();
|
|
330
337
|
const roots = univariateBezierG.roots(0.0, true);
|
|
331
338
|
if (roots) {
|
|
332
339
|
for (const root of roots) {
|
|
@@ -337,8 +344,9 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
337
344
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
338
345
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
339
346
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
340
|
-
this.recordPointWithLocalFractions(
|
|
341
|
-
fractionB, cpB, 0, 1, reversed
|
|
347
|
+
this.recordPointWithLocalFractions(
|
|
348
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
349
|
+
);
|
|
342
350
|
}
|
|
343
351
|
}
|
|
344
352
|
bezierA.fractionToPoint4d(0.0, this._xyzwA0);
|
|
@@ -350,7 +358,9 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
350
358
|
f1 = i * df;
|
|
351
359
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
352
360
|
Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
353
|
-
bezierB.poleProductsXYZW(
|
|
361
|
+
bezierB.poleProductsXYZW(
|
|
362
|
+
univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w,
|
|
363
|
+
);
|
|
354
364
|
let errors = 0;
|
|
355
365
|
const roots = univariateBezierB.roots(0.0, true);
|
|
356
366
|
if (roots)
|
|
@@ -360,7 +370,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
360
370
|
const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
|
|
361
371
|
if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
|
|
362
372
|
const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);
|
|
363
|
-
|
|
373
|
+
// TODO implement newton search
|
|
364
374
|
const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);
|
|
365
375
|
const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
366
376
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
@@ -385,9 +395,11 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
385
395
|
errors++;
|
|
386
396
|
if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
|
|
387
397
|
errors++;
|
|
388
|
-
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
389
|
-
this.
|
|
390
|
-
|
|
398
|
+
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
399
|
+
this.acceptFraction(false, bcurveBFraction, false)) {
|
|
400
|
+
this.recordPointWithLocalFractions(
|
|
401
|
+
bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed,
|
|
402
|
+
);
|
|
391
403
|
}
|
|
392
404
|
}
|
|
393
405
|
}
|
|
@@ -395,8 +407,8 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
395
407
|
}
|
|
396
408
|
*/
|
|
397
409
|
// Caller accesses data from two arcs.
|
|
398
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
399
|
-
// Solves the arc-arc equations
|
|
410
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
411
|
+
// Solves the arc-arc equations.
|
|
400
412
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
401
413
|
/*
|
|
402
414
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -417,9 +429,13 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
417
429
|
const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();
|
|
418
430
|
const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();
|
|
419
431
|
if (strokeCountA < strokeCountB)
|
|
420
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
432
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
433
|
+
bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, _reversed,
|
|
434
|
+
);
|
|
421
435
|
else
|
|
422
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
436
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
437
|
+
bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, !_reversed,
|
|
438
|
+
);
|
|
423
439
|
}
|
|
424
440
|
}
|
|
425
441
|
}
|
|
@@ -427,9 +443,9 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
427
443
|
}
|
|
428
444
|
/*
|
|
429
445
|
/**
|
|
430
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
446
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
431
447
|
* @param xyz xyz parts of input point.
|
|
432
|
-
* @param w
|
|
448
|
+
* @param w weight to use for homogeneous effects.
|
|
433
449
|
*/
|
|
434
450
|
/*
|
|
435
451
|
private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {
|
|
@@ -466,16 +482,19 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
466
482
|
// NOW .. we have a plane in world space. Intersect it with the bspline:
|
|
467
483
|
const intersections: CurveLocationDetail[] = [];
|
|
468
484
|
bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);
|
|
469
|
-
// intersections has WORLD points with bspline fractions.
|
|
485
|
+
// intersections has WORLD points with bspline fractions.
|
|
486
|
+
// (the bspline fractions are all good 0..1 fractions within the spline).
|
|
470
487
|
// accept those that are within the segment range.
|
|
471
488
|
for (const detail of intersections) {
|
|
472
489
|
const fractionB = detail.fraction;
|
|
473
490
|
const curvePoint = detail.point;
|
|
474
491
|
const curvePointH = this.projectPoint(curvePoint);
|
|
475
492
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
476
|
-
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
477
|
-
this.
|
|
478
|
-
|
|
493
|
+
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
494
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
495
|
+
this.recordPointWithLocalFractions(
|
|
496
|
+
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
497
|
+
);
|
|
479
498
|
}
|
|
480
499
|
}
|
|
481
500
|
*/
|
|
@@ -492,7 +511,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
492
511
|
const pointA0 = CurveCurveIntersectXYZ._workPointA0;
|
|
493
512
|
const pointA1 = CurveCurveIntersectXYZ._workPointA1;
|
|
494
513
|
lsA.pointAt(0, pointA0);
|
|
495
|
-
for (let iA = 1; iA < numA; iA
|
|
514
|
+
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
496
515
|
lsA.pointAt(iA, pointA1);
|
|
497
516
|
fA1 = iA * dfA;
|
|
498
517
|
this.dispatchSegmentBsplineCurve(
|
|
@@ -543,6 +562,38 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
543
562
|
}
|
|
544
563
|
return undefined;
|
|
545
564
|
}
|
|
565
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
566
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
567
|
+
const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
|
|
568
|
+
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
569
|
+
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
570
|
+
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
571
|
+
const numA = lsA.numPoints();
|
|
572
|
+
const numB = lsB.numPoints();
|
|
573
|
+
if (numA > 1 && numB > 1) {
|
|
574
|
+
lsA.pointAt(0, pointA0);
|
|
575
|
+
const dfA = 1.0 / (numA - 1);
|
|
576
|
+
const dfB = 1.0 / (numB - 1);
|
|
577
|
+
let fA0 = 0.0;
|
|
578
|
+
let fB0;
|
|
579
|
+
let fA1;
|
|
580
|
+
let 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, reversed);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
546
597
|
/** Double dispatch handler for strongly typed segment. */
|
|
547
598
|
handleLineSegment3d(segmentA) {
|
|
548
599
|
if (this._geometryB instanceof LineSegment3d) {
|
|
@@ -558,38 +609,13 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
558
609
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
559
610
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
560
611
|
}
|
|
612
|
+
return undefined;
|
|
561
613
|
}
|
|
562
|
-
/** double dispatch handler for strongly typed linestring
|
|
614
|
+
/** double dispatch handler for strongly typed linestring. */
|
|
563
615
|
handleLineString3d(lsA) {
|
|
564
616
|
if (this._geometryB instanceof LineString3d) {
|
|
565
617
|
const lsB = this._geometryB;
|
|
566
|
-
|
|
567
|
-
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
568
|
-
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
569
|
-
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
570
|
-
const numA = lsA.numPoints();
|
|
571
|
-
const numB = lsB.numPoints();
|
|
572
|
-
if (numA > 1 && numB > 1) {
|
|
573
|
-
lsA.pointAt(0, pointA0);
|
|
574
|
-
const dfA = 1.0 / (numA - 1);
|
|
575
|
-
const dfB = 1.0 / (numB - 1);
|
|
576
|
-
let fA0 = 0.0;
|
|
577
|
-
let fA1, fB0, fB1;
|
|
578
|
-
const extendA = this._extendA;
|
|
579
|
-
const extendB = this._extendB;
|
|
580
|
-
lsA.pointAt(0, pointA0);
|
|
581
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
582
|
-
fA1 = ia * dfA;
|
|
583
|
-
fB0 = 0.0;
|
|
584
|
-
lsA.pointAt(ia, pointA1);
|
|
585
|
-
lsB.pointAt(0, pointB0);
|
|
586
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
587
|
-
lsB.pointAt(ib, pointB1);
|
|
588
|
-
fB1 = ib * dfB;
|
|
589
|
-
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);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
}
|
|
618
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
593
619
|
}
|
|
594
620
|
else if (this._geometryB instanceof LineSegment3d) {
|
|
595
621
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -618,7 +644,7 @@ class CurveCurveIntersectXYZ extends NullGeometryHandler {
|
|
|
618
644
|
}
|
|
619
645
|
return undefined;
|
|
620
646
|
}
|
|
621
|
-
/** Double dispatch handler for strongly typed bspline curve
|
|
647
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
622
648
|
handleBSplineCurve3d(curve) {
|
|
623
649
|
if (this._geometryB instanceof LineSegment3d) {
|
|
624
650
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
|