@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
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* @module Curve
|
|
3
3
|
*/
|
|
4
4
|
import { Matrix4d } from "../geometry4d/Matrix4d";
|
|
5
|
-
import { CurveLocationDetailArrayPair } from "./CurveCurveIntersectXY";
|
|
6
5
|
import { CurveLocationDetailPair } from "./CurveLocationDetail";
|
|
7
6
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
8
|
-
import {
|
|
7
|
+
import { AnyCurve } from "./CurveTypes";
|
|
9
8
|
/**
|
|
10
9
|
* `CurveCurve` has static method for various computations that work on a pair of curves or curve collections.
|
|
11
10
|
* @public
|
|
@@ -13,36 +12,35 @@ import { GeometryQuery } from "./GeometryQuery";
|
|
|
13
12
|
export declare class CurveCurve {
|
|
14
13
|
/**
|
|
15
14
|
* Return xy intersections of 2 curves.
|
|
16
|
-
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @param extendB true to allow geometryB to extend
|
|
15
|
+
* @param curveA first curve
|
|
16
|
+
* @param extendA true to allow curveA to extend
|
|
17
|
+
* @param curveB second curve
|
|
18
|
+
* @param extendB true to allow curveB to extend
|
|
21
19
|
* @param tolerance optional distance tolerance for coincidence
|
|
22
20
|
*/
|
|
23
|
-
static intersectionXYPairs(
|
|
21
|
+
static intersectionXYPairs(curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean, tolerance?: number): CurveLocationDetailPair[];
|
|
24
22
|
/**
|
|
25
23
|
* Return xy intersections of 2 projected curves.
|
|
26
|
-
*
|
|
27
|
-
* @param
|
|
28
|
-
* @param extendA true to allow
|
|
29
|
-
* @param
|
|
30
|
-
* @param extendB true to allow
|
|
24
|
+
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.
|
|
25
|
+
* @param curveA first curve
|
|
26
|
+
* @param extendA true to allow curveA to extend
|
|
27
|
+
* @param curveB second curve
|
|
28
|
+
* @param extendB true to allow curveB to extend
|
|
31
29
|
* @param tolerance optional distance tolerance for coincidence
|
|
32
30
|
*/
|
|
33
|
-
static intersectionProjectedXYPairs(worldToLocal: Matrix4d,
|
|
31
|
+
static intersectionProjectedXYPairs(worldToLocal: Matrix4d, curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean, tolerance?: number): CurveLocationDetailPair[];
|
|
34
32
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
static
|
|
33
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
34
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
35
|
+
* * Not Implemented for bspline and bezier curves.
|
|
36
|
+
* @beta
|
|
37
|
+
* @param curveA first curve
|
|
38
|
+
* @param extendA true to allow curveA to extend
|
|
39
|
+
* @param curveB second curve
|
|
40
|
+
* @param extendB true to allow curveB to extend
|
|
41
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
42
|
+
*/
|
|
43
|
+
static intersectionXYZPairs(curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean): CurveLocationDetailPair[];
|
|
46
44
|
/**
|
|
47
45
|
* Return xy intersections of input curves.
|
|
48
46
|
* @param primitives input curves to intersect
|
|
@@ -50,11 +48,30 @@ export declare class CurveCurve {
|
|
|
50
48
|
*/
|
|
51
49
|
static allIntersectionsAmongPrimitivesXY(primitives: CurvePrimitive[], tolerance?: number): CurveLocationDetailPair[];
|
|
52
50
|
/**
|
|
53
|
-
* Return
|
|
54
|
-
* *
|
|
55
|
-
*
|
|
56
|
-
*
|
|
51
|
+
* Return at least one XY close approach between 2 curves.
|
|
52
|
+
* * Close approach xy-distances are measured without regard to z. This is equivalent to their separation distance
|
|
53
|
+
* as seen in the top view, or as measured between their projections onto the xy-plane.
|
|
54
|
+
* * If more than one approach is returned, one of them is the closest approach.
|
|
55
|
+
* * If an input curve is a `CurveCollection`, then close approaches are computed to each `CurvePrimitive` child.
|
|
56
|
+
* This can lead to many returned pairs, especially when both inputs are `CurveCollection`s. If an input curve is
|
|
57
|
+
* an `AnyRegion` then close approaches are computed only to the boundary curves, not to the interior.
|
|
58
|
+
* @param curveA first curve
|
|
59
|
+
* @param curveB second curve
|
|
60
|
+
* @param maxDistance maximum xy-distance to consider between the curves.
|
|
61
|
+
* Close approaches further than this xy-distance are not returned.
|
|
62
|
+
*/
|
|
63
|
+
static closeApproachProjectedXYPairs(curveA: AnyCurve, curveB: AnyCurve, maxDistance: number): CurveLocationDetailPair[];
|
|
64
|
+
/**
|
|
65
|
+
* Convenience method that calls [[closeApproachProjectedXYPairs]] with a large `maxDistance`
|
|
66
|
+
* and returns a detail pair representing the closest xy-approach between the curves.
|
|
67
|
+
* * There may be many detail pairs that represent "closest" xy-approach, including coincident interval pairs,
|
|
68
|
+
* isolated intersections, or close approaches within tolerance of each other. This method makes no attempt to
|
|
69
|
+
* distinguish among them, and returns a pair whose `detail.point` values are separated by the smallest xy distance
|
|
70
|
+
* found among the pairs.
|
|
71
|
+
* @param curveA first curve
|
|
72
|
+
* @param curveB second curve
|
|
73
|
+
* @return detail pair of closest xy-approach, undefined if not found
|
|
57
74
|
*/
|
|
58
|
-
static
|
|
75
|
+
static closestApproachProjectedXYPair(curveA: AnyCurve, curveB: AnyCurve): CurveLocationDetailPair | undefined;
|
|
59
76
|
}
|
|
60
77
|
//# sourceMappingURL=CurveCurve.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCurve.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveCurve.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"CurveCurve.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveCurve.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;GAGG;AACH,qBAAa,UAAU;IACrB;;;;;;;OAOG;WACW,mBAAmB,CAC/B,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,MAAqC,GAC/C,uBAAuB,EAAE;IAa5B;;;;;;;;OAQG;WACW,4BAA4B,CACxC,YAAY,EAAE,QAAQ,EACtB,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,MAAqC,GAC/C,uBAAuB,EAAE;IAK5B;;;;;;;;;;KAUC;WACa,oBAAoB,CAChC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GACrE,uBAAuB,EAAE;IAK5B;;;;OAIG;WACW,iCAAiC,CAC7C,UAAU,EAAE,cAAc,EAAE,EAAE,SAAS,GAAE,MAAqC,GAC7E,uBAAuB,EAAE;IAW5B;;;;;;;;;;;;OAYG;WACW,6BAA6B,CACzC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,GACtD,uBAAuB,EAAE;IAM5B;;;;;;;;;;OAUG;WACW,8BAA8B,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,uBAAuB,GAAG,SAAS;CAkBtH"}
|
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.CurveCurve = void 0;
|
|
11
11
|
const Geometry_1 = require("../Geometry");
|
|
12
12
|
const CurveCollection_1 = require("./CurveCollection");
|
|
13
|
-
const CurveCurveCloseApproachXY_1 = require("./CurveCurveCloseApproachXY");
|
|
14
|
-
const CurveCurveIntersectXY_1 = require("./CurveCurveIntersectXY");
|
|
15
|
-
const CurveCurveIntersectXYZ_1 = require("./CurveCurveIntersectXYZ");
|
|
16
13
|
const CurvePrimitive_1 = require("./CurvePrimitive");
|
|
14
|
+
const CurveCurveCloseApproachXY_1 = require("./internalContexts/CurveCurveCloseApproachXY");
|
|
15
|
+
const CurveCurveIntersectXY_1 = require("./internalContexts/CurveCurveIntersectXY");
|
|
16
|
+
const CurveCurveIntersectXYZ_1 = require("./internalContexts/CurveCurveIntersectXYZ");
|
|
17
17
|
/**
|
|
18
18
|
* `CurveCurve` has static method for various computations that work on a pair of curves or curve collections.
|
|
19
19
|
* @public
|
|
@@ -21,56 +21,55 @@ const CurvePrimitive_1 = require("./CurvePrimitive");
|
|
|
21
21
|
class CurveCurve {
|
|
22
22
|
/**
|
|
23
23
|
* Return xy intersections of 2 curves.
|
|
24
|
-
*
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @param extendB true to allow geometryB to extend
|
|
24
|
+
* @param curveA first curve
|
|
25
|
+
* @param extendA true to allow curveA to extend
|
|
26
|
+
* @param curveB second curve
|
|
27
|
+
* @param extendB true to allow curveB to extend
|
|
29
28
|
* @param tolerance optional distance tolerance for coincidence
|
|
30
29
|
*/
|
|
31
|
-
static intersectionXYPairs(
|
|
32
|
-
const handler = new CurveCurveIntersectXY_1.CurveCurveIntersectXY(undefined, extendA,
|
|
33
|
-
if (
|
|
34
|
-
|
|
30
|
+
static intersectionXYPairs(curveA, extendA, curveB, extendB, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
31
|
+
const handler = new CurveCurveIntersectXY_1.CurveCurveIntersectXY(undefined, extendA, curveB, extendB, tolerance);
|
|
32
|
+
if (curveB instanceof CurvePrimitive_1.CurvePrimitive) {
|
|
33
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
35
34
|
}
|
|
36
|
-
else if (
|
|
37
|
-
const allCurves =
|
|
35
|
+
else if (curveB instanceof CurveCollection_1.CurveCollection) {
|
|
36
|
+
const allCurves = curveB.collectCurvePrimitives();
|
|
38
37
|
for (const child of allCurves) {
|
|
39
38
|
handler.resetGeometry(false, child, false);
|
|
40
|
-
|
|
39
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
return handler.grabPairedResults();
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Return xy intersections of 2 projected curves.
|
|
47
|
-
*
|
|
48
|
-
* @param
|
|
49
|
-
* @param extendA true to allow
|
|
50
|
-
* @param
|
|
51
|
-
* @param extendB true to allow
|
|
46
|
+
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.
|
|
47
|
+
* @param curveA first curve
|
|
48
|
+
* @param extendA true to allow curveA to extend
|
|
49
|
+
* @param curveB second curve
|
|
50
|
+
* @param extendB true to allow curveB to extend
|
|
52
51
|
* @param tolerance optional distance tolerance for coincidence
|
|
53
52
|
*/
|
|
54
|
-
static intersectionProjectedXYPairs(worldToLocal,
|
|
55
|
-
const handler = new CurveCurveIntersectXY_1.CurveCurveIntersectXY(worldToLocal, extendA,
|
|
56
|
-
|
|
53
|
+
static intersectionProjectedXYPairs(worldToLocal, curveA, extendA, curveB, extendB, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
54
|
+
const handler = new CurveCurveIntersectXY_1.CurveCurveIntersectXY(worldToLocal, extendA, curveB, extendB, tolerance);
|
|
55
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
57
56
|
return handler.grabPairedResults();
|
|
58
57
|
}
|
|
59
58
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
static
|
|
71
|
-
const handler = new CurveCurveIntersectXYZ_1.CurveCurveIntersectXYZ(extendA,
|
|
72
|
-
|
|
73
|
-
return handler.
|
|
59
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
60
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
61
|
+
* * Not Implemented for bspline and bezier curves.
|
|
62
|
+
* @beta
|
|
63
|
+
* @param curveA first curve
|
|
64
|
+
* @param extendA true to allow curveA to extend
|
|
65
|
+
* @param curveB second curve
|
|
66
|
+
* @param extendB true to allow curveB to extend
|
|
67
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
68
|
+
*/
|
|
69
|
+
static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
|
|
70
|
+
const handler = new CurveCurveIntersectXYZ_1.CurveCurveIntersectXYZ(extendA, curveB, extendB);
|
|
71
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
72
|
+
return handler.grabPairedResults();
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
76
75
|
* Return xy intersections of input curves.
|
|
@@ -80,26 +79,62 @@ class CurveCurve {
|
|
|
80
79
|
static allIntersectionsAmongPrimitivesXY(primitives, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
81
80
|
const handler = new CurveCurveIntersectXY_1.CurveCurveIntersectXY(undefined, false, undefined, false, tolerance);
|
|
82
81
|
for (let i = 0; i < primitives.length; i++) {
|
|
83
|
-
const
|
|
82
|
+
const curveA = primitives[i];
|
|
84
83
|
for (let j = i + 1; j < primitives.length; j++) {
|
|
85
84
|
handler.resetGeometry(false, primitives[j], false);
|
|
86
|
-
|
|
85
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
return handler.grabPairedResults();
|
|
90
89
|
}
|
|
91
90
|
/**
|
|
92
|
-
* Return
|
|
93
|
-
* *
|
|
94
|
-
*
|
|
95
|
-
*
|
|
91
|
+
* Return at least one XY close approach between 2 curves.
|
|
92
|
+
* * Close approach xy-distances are measured without regard to z. This is equivalent to their separation distance
|
|
93
|
+
* as seen in the top view, or as measured between their projections onto the xy-plane.
|
|
94
|
+
* * If more than one approach is returned, one of them is the closest approach.
|
|
95
|
+
* * If an input curve is a `CurveCollection`, then close approaches are computed to each `CurvePrimitive` child.
|
|
96
|
+
* This can lead to many returned pairs, especially when both inputs are `CurveCollection`s. If an input curve is
|
|
97
|
+
* an `AnyRegion` then close approaches are computed only to the boundary curves, not to the interior.
|
|
98
|
+
* @param curveA first curve
|
|
99
|
+
* @param curveB second curve
|
|
100
|
+
* @param maxDistance maximum xy-distance to consider between the curves.
|
|
101
|
+
* Close approaches further than this xy-distance are not returned.
|
|
96
102
|
*/
|
|
97
|
-
static closeApproachProjectedXYPairs(
|
|
98
|
-
const handler = new CurveCurveCloseApproachXY_1.CurveCurveCloseApproachXY(
|
|
103
|
+
static closeApproachProjectedXYPairs(curveA, curveB, maxDistance) {
|
|
104
|
+
const handler = new CurveCurveCloseApproachXY_1.CurveCurveCloseApproachXY(curveB);
|
|
99
105
|
handler.maxDistanceToAccept = maxDistance;
|
|
100
|
-
|
|
106
|
+
curveA.dispatchToGeometryHandler(handler);
|
|
101
107
|
return handler.grabPairedResults();
|
|
102
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Convenience method that calls [[closeApproachProjectedXYPairs]] with a large `maxDistance`
|
|
111
|
+
* and returns a detail pair representing the closest xy-approach between the curves.
|
|
112
|
+
* * There may be many detail pairs that represent "closest" xy-approach, including coincident interval pairs,
|
|
113
|
+
* isolated intersections, or close approaches within tolerance of each other. This method makes no attempt to
|
|
114
|
+
* distinguish among them, and returns a pair whose `detail.point` values are separated by the smallest xy distance
|
|
115
|
+
* found among the pairs.
|
|
116
|
+
* @param curveA first curve
|
|
117
|
+
* @param curveB second curve
|
|
118
|
+
* @return detail pair of closest xy-approach, undefined if not found
|
|
119
|
+
*/
|
|
120
|
+
static closestApproachProjectedXYPair(curveA, curveB) {
|
|
121
|
+
const range = curveA.range();
|
|
122
|
+
range.extendRange(curveB.range());
|
|
123
|
+
const maxDistance = range.low.distanceXY(range.high);
|
|
124
|
+
const closeApproaches = this.closeApproachProjectedXYPairs(curveA, curveB, maxDistance);
|
|
125
|
+
if (!closeApproaches.length)
|
|
126
|
+
return undefined;
|
|
127
|
+
let iMin = 0;
|
|
128
|
+
let minDistXY = 2 * maxDistance;
|
|
129
|
+
for (let i = 0; i < closeApproaches.length; ++i) {
|
|
130
|
+
const distXY = closeApproaches[i].detailA.point.distanceXY(closeApproaches[i].detailB.point);
|
|
131
|
+
if (distXY < minDistXY) {
|
|
132
|
+
iMin = i;
|
|
133
|
+
minDistXY = distXY;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return closeApproaches[iMin];
|
|
137
|
+
}
|
|
103
138
|
}
|
|
104
139
|
exports.CurveCurve = CurveCurve;
|
|
105
140
|
//# sourceMappingURL=Curve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AW,CAAC;QAC1C,SAAS,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IACrC,CAAC;CACF;AA7FD,gCA6FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { CurveCollection } from \"./CurveCollection\";\r\nimport { CurveCurveCloseApproachXY } from \"./CurveCurveCloseApproachXY\";\r\nimport { CurveCurveIntersectXY, CurveLocationDetailArrayPair } from \"./CurveCurveIntersectXY\";\r\nimport { CurveCurveIntersectXYZ } from \"./CurveCurveIntersectXYZ\";\r\nimport { CurveLocationDetailPair } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\n\r\n/**\r\n * `CurveCurve` has static method for various computations that work on a pair of curves or curve collections.\r\n * @public\r\n */\r\nexport class CurveCurve {\r\n /**\r\n * Return xy intersections of 2 curves.\r\n * * **NOTE:** GeometryQuery inputs should really be AnyCurve.\r\n * @param geometryA first geometry\r\n * @param extendA true to allow geometryA to extend\r\n * @param geometryB second geometry\r\n * @param extendB true to allow geometryB to extend\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static intersectionXYPairs(\r\n geometryA: GeometryQuery, extendA: boolean, geometryB: GeometryQuery, extendB: boolean,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(undefined, extendA, geometryB, extendB, tolerance);\r\n if (geometryB instanceof CurvePrimitive) {\r\n geometryA.dispatchToGeometryHandler(handler);\r\n } else if (geometryB instanceof CurveCollection) {\r\n const allCurves = geometryB.collectCurvePrimitives();\r\n for (const child of allCurves) {\r\n handler.resetGeometry(false, child, false);\r\n geometryA.dispatchToGeometryHandler(handler);\r\n }\r\n }\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return xy intersections of 2 projected curves.\r\n * * **NOTE:** GeometryQuery inputs should really be AnyCurve.\r\n * @param geometryA first geometry\r\n * @param extendA true to allow geometryA to extend\r\n * @param geometryB second geometry\r\n * @param extendB true to allow geometryB to extend\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static intersectionProjectedXYPairs(\r\n worldToLocal: Matrix4d, geometryA: GeometryQuery, extendA: boolean, geometryB: GeometryQuery, extendB: boolean,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(worldToLocal, extendA, geometryB, extendB, tolerance);\r\n geometryA.dispatchToGeometryHandler(handler);\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return full 3d xyz intersections of 2 curves.\r\n * * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.\r\n * * Not Implemented for bspline and bezier curves.\r\n * * **NOTE:** GeometryQuery inputs should really be AnyCurve.\r\n * @beta\r\n * @param geometryA first geometry\r\n * @param extendA true to allow geometryA to extend\r\n * @param geometryB second geometry\r\n * @param extendB true to allow geometryB to extend\r\n */\r\n public static intersectionXYZ(\r\n geometryA: GeometryQuery, extendA: boolean, geometryB: GeometryQuery, extendB: boolean,\r\n ): CurveLocationDetailArrayPair {\r\n const handler = new CurveCurveIntersectXYZ(extendA, geometryB, extendB);\r\n geometryA.dispatchToGeometryHandler(handler);\r\n return handler.grabResults();\r\n }\r\n /**\r\n * Return xy intersections of input curves.\r\n * @param primitives input curves to intersect\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static allIntersectionsAmongPrimitivesXY(\r\n primitives: CurvePrimitive[], tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(undefined, false, undefined, false, tolerance);\r\n for (let i = 0; i < primitives.length; i++) {\r\n const geometryA = primitives[i];\r\n for (let j = i + 1; j < primitives.length; j++) {\r\n handler.resetGeometry(false, primitives[j], false);\r\n geometryA.dispatchToGeometryHandler(handler);\r\n }\r\n }\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return xy close approaches of 2 projected curves.\r\n * * **NOTE:** GeometryQuery inputs should really be AnyCurve.\r\n * @param geometryA first geometry\r\n * @param geometryB second geometry\r\n */\r\n public static closeApproachProjectedXYPairs(\r\n geometryA: GeometryQuery, geometryB: GeometryQuery, maxDistance: number,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveCloseApproachXY(geometryB);\r\n handler.maxDistanceToAccept = maxDistance;\r\n geometryA.dispatchToGeometryHandler(handler);\r\n return handler.grabPairedResults();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"CurveCurve.js","sourceRoot":"","sources":["../../../src/curve/CurveCurve.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0CAAuC;AAEvC,uDAAoD;AAEpD,qDAAkD;AAElD,4FAAyF;AACzF,oFAAiF;AACjF,sFAAmF;AAEnF;;;GAGG;AACH,MAAa,UAAU;IACrB;;;;;;;OAOG;IACI,MAAM,CAAC,mBAAmB,CAC/B,MAAgB,EAChB,OAAgB,EAChB,MAAgB,EAChB,OAAgB,EAChB,YAAoB,mBAAQ,CAAC,mBAAmB;QAEhD,MAAM,OAAO,GAAG,IAAI,6CAAqB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAC1F,IAAI,MAAM,YAAY,+BAAc,EAAE;YACpC,MAAM,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;SAC3C;aAAM,IAAI,MAAM,YAAY,iCAAe,EAAE;YAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,sBAAsB,EAAE,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,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YAC/C,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7F,IAAI,MAAM,GAAG,SAAS,EAAE;gBACtB,IAAI,GAAG,CAAC,CAAC;gBACT,SAAS,GAAG,MAAM,CAAC;aACpB;SACF;QACD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAvID,gCAuIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { CurveCollection } from \"./CurveCollection\";\r\nimport { CurveLocationDetailPair } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { AnyCurve } from \"./CurveTypes\";\r\nimport { CurveCurveCloseApproachXY } from \"./internalContexts/CurveCurveCloseApproachXY\";\r\nimport { CurveCurveIntersectXY } from \"./internalContexts/CurveCurveIntersectXY\";\r\nimport { CurveCurveIntersectXYZ } from \"./internalContexts/CurveCurveIntersectXYZ\";\r\n\r\n/**\r\n * `CurveCurve` has static method for various computations that work on a pair of curves or curve collections.\r\n * @public\r\n */\r\nexport class CurveCurve {\r\n /**\r\n * Return xy intersections of 2 curves.\r\n * @param curveA first curve\r\n * @param extendA true to allow curveA to extend\r\n * @param curveB second curve\r\n * @param extendB true to allow curveB to extend\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static intersectionXYPairs(\r\n curveA: AnyCurve,\r\n extendA: boolean,\r\n curveB: AnyCurve,\r\n extendB: boolean,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(undefined, extendA, curveB, extendB, tolerance);\r\n if (curveB instanceof CurvePrimitive) {\r\n curveA.dispatchToGeometryHandler(handler);\r\n } else if (curveB instanceof CurveCollection) {\r\n const allCurves = curveB.collectCurvePrimitives();\r\n for (const child of allCurves) {\r\n handler.resetGeometry(false, child, false);\r\n curveA.dispatchToGeometryHandler(handler);\r\n }\r\n }\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return xy intersections of 2 projected curves.\r\n * @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.\r\n * @param curveA first curve\r\n * @param extendA true to allow curveA to extend\r\n * @param curveB second curve\r\n * @param extendB true to allow curveB to extend\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static intersectionProjectedXYPairs(\r\n worldToLocal: Matrix4d,\r\n curveA: AnyCurve,\r\n extendA: boolean,\r\n curveB: AnyCurve,\r\n extendB: boolean,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(worldToLocal, extendA, curveB, extendB, tolerance);\r\n curveA.dispatchToGeometryHandler(handler);\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return full 3d xyz intersections of 2 curves.\r\n * * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.\r\n * * Not Implemented for bspline and bezier curves.\r\n * @beta\r\n * @param curveA first curve\r\n * @param extendA true to allow curveA to extend\r\n * @param curveB second curve\r\n * @param extendB true to allow curveB to extend\r\n * @returns array of intersections structured as CurveLocationDetailPair[]\r\n */\r\n public static intersectionXYZPairs(\r\n curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXYZ(extendA, curveB, extendB);\r\n curveA.dispatchToGeometryHandler(handler);\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return xy intersections of input curves.\r\n * @param primitives input curves to intersect\r\n * @param tolerance optional distance tolerance for coincidence\r\n */\r\n public static allIntersectionsAmongPrimitivesXY(\r\n primitives: CurvePrimitive[], tolerance: number = Geometry.smallMetricDistance,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveIntersectXY(undefined, false, undefined, false, tolerance);\r\n for (let i = 0; i < primitives.length; i++) {\r\n const curveA = primitives[i];\r\n for (let j = i + 1; j < primitives.length; j++) {\r\n handler.resetGeometry(false, primitives[j], false);\r\n curveA.dispatchToGeometryHandler(handler);\r\n }\r\n }\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Return at least one XY close approach between 2 curves.\r\n * * Close approach xy-distances are measured without regard to z. This is equivalent to their separation distance\r\n * as seen in the top view, or as measured between their projections onto the xy-plane.\r\n * * If more than one approach is returned, one of them is the closest approach.\r\n * * If an input curve is a `CurveCollection`, then close approaches are computed to each `CurvePrimitive` child.\r\n * This can lead to many returned pairs, especially when both inputs are `CurveCollection`s. If an input curve is\r\n * an `AnyRegion` then close approaches are computed only to the boundary curves, not to the interior.\r\n * @param curveA first curve\r\n * @param curveB second curve\r\n * @param maxDistance maximum xy-distance to consider between the curves.\r\n * Close approaches further than this xy-distance are not returned.\r\n */\r\n public static closeApproachProjectedXYPairs(\r\n curveA: AnyCurve, curveB: AnyCurve, maxDistance: number,\r\n ): CurveLocationDetailPair[] {\r\n const handler = new CurveCurveCloseApproachXY(curveB);\r\n handler.maxDistanceToAccept = maxDistance;\r\n curveA.dispatchToGeometryHandler(handler);\r\n return handler.grabPairedResults();\r\n }\r\n /**\r\n * Convenience method that calls [[closeApproachProjectedXYPairs]] with a large `maxDistance`\r\n * and returns a detail pair representing the closest xy-approach between the curves.\r\n * * There may be many detail pairs that represent \"closest\" xy-approach, including coincident interval pairs,\r\n * isolated intersections, or close approaches within tolerance of each other. This method makes no attempt to\r\n * distinguish among them, and returns a pair whose `detail.point` values are separated by the smallest xy distance\r\n * found among the pairs.\r\n * @param curveA first curve\r\n * @param curveB second curve\r\n * @return detail pair of closest xy-approach, undefined if not found\r\n */\r\n public static closestApproachProjectedXYPair(curveA: AnyCurve, curveB: AnyCurve): CurveLocationDetailPair | undefined {\r\n const range = curveA.range();\r\n range.extendRange(curveB.range());\r\n const maxDistance = range.low.distanceXY(range.high);\r\n const closeApproaches = this.closeApproachProjectedXYPairs(curveA, curveB, maxDistance);\r\n if (!closeApproaches.length)\r\n return undefined;\r\n let iMin = 0;\r\n let minDistXY = 2 * maxDistance;\r\n for (let i = 0; i < closeApproaches.length; ++i) {\r\n const distXY = closeApproaches[i].detailA.point.distanceXY(closeApproaches[i].detailB.point);\r\n if (distXY < minDistXY) {\r\n iMin = i;\r\n minDistXY = distXY;\r\n }\r\n }\r\n return closeApproaches[iMin];\r\n }\r\n}\r\n"]}
|
|
@@ -13,7 +13,7 @@ import { XAndY } from "../geometry3d/XYZProps";
|
|
|
13
13
|
import { IndexedPolyface } from "../polyface/Polyface";
|
|
14
14
|
import { RuledSweep } from "../solid/RuledSweep";
|
|
15
15
|
import { Arc3d } from "./Arc3d";
|
|
16
|
-
import { AnyCurve } from "./
|
|
16
|
+
import { AnyCurve } from "./CurveTypes";
|
|
17
17
|
import { CurveChain } from "./CurveCollection";
|
|
18
18
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
19
19
|
import { GeometryQuery } from "./GeometryQuery";
|