@itwin/core-geometry 4.2.0-dev.3 → 4.2.0-dev.30
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 +59 -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 +12 -8
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +5 -3
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +20 -8
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +77 -2
- 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 +6 -4
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +3 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +4 -3
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +2 -2
- 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/CoordinateXYZ.d.ts +15 -15
- package/lib/cjs/curve/CoordinateXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js +15 -15
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +4 -17
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +3 -22
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +41 -26
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +73 -40
- 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 +12 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +13 -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/CurveProcessor.d.ts +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.d.ts +19 -0
- 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 +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +1 -1
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +1 -1
- package/lib/cjs/curve/Path.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 +16 -2
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +18 -1
- 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/UnionRegion.d.ts +1 -1
- package/lib/cjs/curve/UnionRegion.js +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +225 -0
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +249 -189
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
- package/lib/{esm/curve → cjs/curve/internalContexts}/CurveCurveIntersectXY.d.ts +14 -27
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +31 -42
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +11 -12
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
- package/lib/cjs/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +12 -14
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
- 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 +57 -36
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +99 -74
- package/lib/cjs/geometry3d/FrameBuilder.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.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 +0 -1
- 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 +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.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/YawPitchRollAngles.js +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.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 +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.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 +1 -1
- package/lib/cjs/solid/SweepContour.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 +12 -8
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +5 -3
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +20 -8
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +77 -2
- 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 +6 -4
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +3 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +4 -3
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +2 -2
- 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/CoordinateXYZ.d.ts +15 -15
- package/lib/esm/curve/CoordinateXYZ.d.ts.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js +15 -15
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +4 -17
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +2 -20
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +41 -26
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +73 -40
- 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 +12 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +11 -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/CurveProcessor.d.ts +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.d.ts +19 -0
- 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 +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +1 -1
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +1 -1
- package/lib/esm/curve/Path.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 +16 -2
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +16 -0
- 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/UnionRegion.d.ts +1 -1
- package/lib/esm/curve/UnionRegion.js +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +225 -0
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +249 -189
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
- package/lib/{cjs/curve → esm/curve/internalContexts}/CurveCurveIntersectXY.d.ts +14 -27
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +30 -40
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +11 -12
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
- package/lib/esm/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +11 -13
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
- 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 +57 -36
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +99 -74
- package/lib/esm/geometry3d/FrameBuilder.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.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 +0 -1
- 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 +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.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/YawPitchRollAngles.js +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.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 +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.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 +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/package.json +3 -3
- package/lib/cjs/curve/CurveChain.d.ts +0 -17
- 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 -164
- 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 +0 -17
- 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 -164
- 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
|
@@ -6,7 +6,8 @@ import { Point3d } from "../geometry3d/Point3dVector3d";
|
|
|
6
6
|
import { Range3d } from "../geometry3d/Range";
|
|
7
7
|
import { Transform } from "../geometry3d/Transform";
|
|
8
8
|
import { GeometryQuery } from "./GeometryQuery";
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
13
|
export declare class CoordinateXYZ extends GeometryQuery {
|
|
@@ -23,29 +24,28 @@ export declare class CoordinateXYZ extends GeometryQuery {
|
|
|
23
24
|
static create(point: Point3d): CoordinateXYZ;
|
|
24
25
|
/** Create a new CoordinateXYZ */
|
|
25
26
|
static createXYZ(x?: number, y?: number, z?: number): CoordinateXYZ;
|
|
26
|
-
/**
|
|
27
|
+
/** Return the range of the point */
|
|
27
28
|
range(): Range3d;
|
|
28
|
-
/**
|
|
29
|
+
/** Extend `rangeToExtend` to include this point (optionally transformed) */
|
|
29
30
|
extendRange(rangeToExtend: Range3d, transform?: Transform): void;
|
|
30
31
|
/** Apply transform to the Coordinate's point. */
|
|
31
32
|
tryTransformInPlace(transform: Transform): boolean;
|
|
32
|
-
/**
|
|
33
|
-
*/
|
|
33
|
+
/** Return a transformed clone */
|
|
34
34
|
cloneTransformed(transform: Transform): GeometryQuery | undefined;
|
|
35
|
-
/**
|
|
35
|
+
/** Return a clone */
|
|
36
36
|
clone(): GeometryQuery | undefined;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* *
|
|
37
|
+
/**
|
|
38
|
+
* Return GeometryQuery children for recursive queries.
|
|
39
|
+
* * Leaf classes do not need to implement.
|
|
40
40
|
*/
|
|
41
|
-
/**
|
|
41
|
+
/** Test if (other instanceof Coordinate). */
|
|
42
42
|
isSameGeometryClass(other: GeometryQuery): boolean;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
43
|
+
/**
|
|
44
|
+
* Test for exact structure and nearly identical geometry.
|
|
45
45
|
* * Leaf classes must implement !!!
|
|
46
|
-
* *
|
|
47
|
-
* *
|
|
48
|
-
* *
|
|
46
|
+
* * Base class implementation recurses through children.
|
|
47
|
+
* * Base implementation is complete for classes with children and no properties.
|
|
48
|
+
* * Classes with both children and properties must implement for properties, call super for children.
|
|
49
49
|
*/
|
|
50
50
|
isAlmostEqual(other: GeometryQuery): boolean;
|
|
51
51
|
/** Second step of double dispatch: call `handler.handleCoordinateXYZ(this)` */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateXYZ.d.ts","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"CoordinateXYZ.d.ts","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,aAAa;IAC9C,2CAA2C;IAC3C,SAAgB,gBAAgB,WAAW;IAE3C,OAAO,CAAC,IAAI,CAAU;IACtB,mDAAmD;IACnD,IAAW,KAAK,YAAwB;IACxC;;OAEG;IACH,OAAO;IAIP,6DAA6D;WAC/C,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa;IAGnD,iCAAiC;WACnB,SAAS,CAAC,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,GAAG,aAAa;IAInF,oCAAoC;IACpB,KAAK,IAAI,OAAO;IAEhC,4EAA4E;IACrE,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI;IAMvE,iDAAiD;IAC1C,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO;IAIzD,iCAAiC;IAC1B,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS;IAKxE,qBAAqB;IACd,KAAK,IAAI,aAAa,GAAG,SAAS;IAGzC;;;OAGG;IAEH,8CAA8C;IACvC,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAGzD;;;;;;OAMG;IACa,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAG5D,gFAAgF;IACzE,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;CAGhE"}
|
|
@@ -4,7 +4,8 @@ exports.CoordinateXYZ = void 0;
|
|
|
4
4
|
const Point3dVector3d_1 = require("../geometry3d/Point3dVector3d");
|
|
5
5
|
const Range_1 = require("../geometry3d/Range");
|
|
6
6
|
const GeometryQuery_1 = require("./GeometryQuery");
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
11
|
class CoordinateXYZ extends GeometryQuery_1.GeometryQuery {
|
|
@@ -27,9 +28,9 @@ class CoordinateXYZ extends GeometryQuery_1.GeometryQuery {
|
|
|
27
28
|
static createXYZ(x = 0, y = 0, z = 0) {
|
|
28
29
|
return new CoordinateXYZ(Point3dVector3d_1.Point3d.create(x, y, z));
|
|
29
30
|
}
|
|
30
|
-
/**
|
|
31
|
+
/** Return the range of the point */
|
|
31
32
|
range() { return Range_1.Range3d.create(this._xyz); }
|
|
32
|
-
/**
|
|
33
|
+
/** Extend `rangeToExtend` to include this point (optionally transformed) */
|
|
33
34
|
extendRange(rangeToExtend, transform) {
|
|
34
35
|
if (transform)
|
|
35
36
|
rangeToExtend.extendTransformedXYZ(transform, this._xyz.x, this._xyz.y, this._xyz.z);
|
|
@@ -41,31 +42,30 @@ class CoordinateXYZ extends GeometryQuery_1.GeometryQuery {
|
|
|
41
42
|
transform.multiplyPoint3d(this._xyz, this._xyz);
|
|
42
43
|
return true;
|
|
43
44
|
}
|
|
44
|
-
/**
|
|
45
|
-
*/
|
|
45
|
+
/** Return a transformed clone */
|
|
46
46
|
cloneTransformed(transform) {
|
|
47
47
|
const result = new CoordinateXYZ(this._xyz.clone());
|
|
48
48
|
result.tryTransformInPlace(transform);
|
|
49
49
|
return result;
|
|
50
50
|
}
|
|
51
|
-
/**
|
|
51
|
+
/** Return a clone */
|
|
52
52
|
clone() {
|
|
53
53
|
return new CoordinateXYZ(this._xyz.clone());
|
|
54
54
|
}
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* *
|
|
55
|
+
/**
|
|
56
|
+
* Return GeometryQuery children for recursive queries.
|
|
57
|
+
* * Leaf classes do not need to implement.
|
|
58
58
|
*/
|
|
59
|
-
/**
|
|
59
|
+
/** Test if (other instanceof Coordinate). */
|
|
60
60
|
isSameGeometryClass(other) {
|
|
61
61
|
return other instanceof CoordinateXYZ;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
63
|
+
/**
|
|
64
|
+
* Test for exact structure and nearly identical geometry.
|
|
65
65
|
* * Leaf classes must implement !!!
|
|
66
|
-
* *
|
|
67
|
-
* *
|
|
68
|
-
* *
|
|
66
|
+
* * Base class implementation recurses through children.
|
|
67
|
+
* * Base implementation is complete for classes with children and no properties.
|
|
68
|
+
* * Classes with both children and properties must implement for properties, call super for children.
|
|
69
69
|
*/
|
|
70
70
|
isAlmostEqual(other) {
|
|
71
71
|
return (other instanceof CoordinateXYZ) && this._xyz.isAlmostEqual(other._xyz);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateXYZ.js","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":";;;AAQA,mEAAwD;AACxD,+CAA8C;AAE9C,mDAAgD;AAEhD
|
|
1
|
+
{"version":3,"file":"CoordinateXYZ.js","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":";;;AAQA,mEAAwD;AACxD,+CAA8C;AAE9C,mDAAgD;AAEhD;;;GAGG;AACH,MAAa,aAAc,SAAQ,6BAAa;IAK9C,mDAAmD;IACnD,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC;;OAEG;IACH,YAAoB,GAAY;QAC9B,KAAK,EAAE,CAAC;QAVV,2CAA2C;QAC3B,qBAAgB,GAAG,OAAO,CAAC;QAUzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IACD,6DAA6D;IACtD,MAAM,CAAC,MAAM,CAAC,KAAc;QACjC,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1C,CAAC;IACD,iCAAiC;IAC1B,MAAM,CAAC,SAAS,CAAC,IAAY,CAAC,EAAE,IAAY,CAAC,EAAE,IAAY,CAAC;QACjE,OAAO,IAAI,aAAa,CAAC,yBAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,oCAAoC;IACpB,KAAK,KAAc,OAAO,eAAO,CAAC,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CAAC;CACF;AAvED,sCAuEC","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\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\n\r\n/**\r\n * A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.\r\n * @public\r\n */\r\nexport class CoordinateXYZ extends GeometryQuery {\r\n /** String name for interface properties */\r\n public readonly geometryCategory = \"point\";\r\n\r\n private _xyz: Point3d;\r\n /** Return a (REFERENCE TO) the coordinate data. */\r\n public get point() { return this._xyz; }\r\n /**\r\n * @param xyz point to be CAPTURED.\r\n */\r\n private constructor(xyz: Point3d) {\r\n super();\r\n this._xyz = xyz;\r\n }\r\n /** Create a new CoordinateXYZ containing a CLONE of point */\r\n public static create(point: Point3d): CoordinateXYZ {\r\n return new CoordinateXYZ(point.clone());\r\n }\r\n /** Create a new CoordinateXYZ */\r\n public static createXYZ(x: number = 0, y: number = 0, z: number = 0): CoordinateXYZ {\r\n return new CoordinateXYZ(Point3d.create(x, y, z));\r\n }\r\n\r\n /** Return the range of the point */\r\n public override range(): Range3d { return Range3d.create(this._xyz); }\r\n\r\n /** Extend `rangeToExtend` to include this point (optionally transformed) */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n if (transform)\r\n rangeToExtend.extendTransformedXYZ(transform, this._xyz.x, this._xyz.y, this._xyz.z);\r\n else\r\n rangeToExtend.extend(this._xyz);\r\n }\r\n /** Apply transform to the Coordinate's point. */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n transform.multiplyPoint3d(this._xyz, this._xyz);\r\n return true;\r\n }\r\n /** Return a transformed clone */\r\n public cloneTransformed(transform: Transform): GeometryQuery | undefined {\r\n const result = new CoordinateXYZ(this._xyz.clone());\r\n result.tryTransformInPlace(transform);\r\n return result;\r\n }\r\n /** Return a clone */\r\n public clone(): GeometryQuery | undefined {\r\n return new CoordinateXYZ(this._xyz.clone());\r\n }\r\n /**\r\n * Return GeometryQuery children for recursive queries.\r\n * * Leaf classes do not need to implement.\r\n */\r\n\r\n /** Test if (other instanceof Coordinate). */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof CoordinateXYZ;\r\n }\r\n /**\r\n * Test for exact structure and nearly identical geometry.\r\n * * Leaf classes must implement !!!\r\n * * Base class implementation recurses through children.\r\n * * Base implementation is complete for classes with children and no properties.\r\n * * Classes with both children and properties must implement for properties, call super for children.\r\n */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n return (other instanceof CoordinateXYZ) && this._xyz.isAlmostEqual(other._xyz);\r\n }\r\n /** Second step of double dispatch: call `handler.handleCoordinateXYZ(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleCoordinateXYZ(this);\r\n }\r\n}\r\n"]}
|
|
@@ -4,12 +4,13 @@ import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
|
4
4
|
import { Range1d, Range3d } from "../geometry3d/Range";
|
|
5
5
|
import { Ray3d } from "../geometry3d/Ray3d";
|
|
6
6
|
import { Transform } from "../geometry3d/Transform";
|
|
7
|
-
import { AnyCurve } from "./
|
|
7
|
+
import { AnyCurve } from "./CurveTypes";
|
|
8
8
|
import { CurveLocationDetail } from "./CurveLocationDetail";
|
|
9
9
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
10
10
|
import { RecursiveCurveProcessor } from "./CurveProcessor";
|
|
11
11
|
import { GeometryQuery } from "./GeometryQuery";
|
|
12
12
|
import { StrokeOptions } from "./StrokeOptions";
|
|
13
|
+
/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */
|
|
13
14
|
/**
|
|
14
15
|
* Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be
|
|
15
16
|
* used in conditional statements for type-switching.
|
|
@@ -140,7 +141,7 @@ export declare abstract class CurveCollection extends GeometryQuery {
|
|
|
140
141
|
/**
|
|
141
142
|
* Shared base class for use by both open and closed paths.
|
|
142
143
|
* * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.
|
|
143
|
-
* * The specific derived classes are `Path` and `Loop
|
|
144
|
+
* * The specific derived classes are `Path` and `Loop`.
|
|
144
145
|
* * `CurveChain` is an intermediate class. It is not instantiable on its own.
|
|
145
146
|
* * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings
|
|
146
147
|
* from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.
|
|
@@ -184,7 +185,7 @@ export declare abstract class CurveChain extends CurveCollection {
|
|
|
184
185
|
/**
|
|
185
186
|
* Return the index where target is found in the array of children.
|
|
186
187
|
* @param alsoSearchProxies whether to also check proxy curves of the children
|
|
187
|
-
|
|
188
|
+
*/
|
|
188
189
|
childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined;
|
|
189
190
|
/** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */
|
|
190
191
|
primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index: number, fraction: number, cyclic?: boolean, result?: CurveLocationDetail): CurveLocationDetail | undefined;
|
|
@@ -225,18 +226,4 @@ export declare class BagOfCurves extends CurveCollection {
|
|
|
225
226
|
/** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */
|
|
226
227
|
dispatchToGeometryHandler(handler: GeometryHandler): any;
|
|
227
228
|
}
|
|
228
|
-
/**
|
|
229
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`
|
|
230
|
-
* @public
|
|
231
|
-
*/
|
|
232
|
-
export declare class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
233
|
-
/** True to consolidated linear geometry (e.g. separate LineSegment3d and LineString3d) into LineString3d */
|
|
234
|
-
consolidateLinearGeometry: boolean;
|
|
235
|
-
/** True to consolidate contiguous arcs */
|
|
236
|
-
consolidateCompatibleArcs: boolean;
|
|
237
|
-
/** Tolerance for collapsing identical points */
|
|
238
|
-
duplicatePointTolerance: number;
|
|
239
|
-
/** Tolerance for removing interior colinear points. */
|
|
240
|
-
colinearPointTolerance: number;
|
|
241
|
-
}
|
|
242
229
|
//# sourceMappingURL=CurveCollection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCollection.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,aAAa,CAAC;AAEnG;;;;;;;;;;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;IACpB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAKhD,8EAA8E;IACvE,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;CAGhE"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.BagOfCurves = exports.CurveChain = exports.CurveCollection = void 0;
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Curve
|
|
10
10
|
*/
|
|
@@ -194,7 +194,7 @@ exports.CurveCollection = CurveCollection;
|
|
|
194
194
|
/**
|
|
195
195
|
* Shared base class for use by both open and closed paths.
|
|
196
196
|
* * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.
|
|
197
|
-
* * The specific derived classes are `Path` and `Loop
|
|
197
|
+
* * The specific derived classes are `Path` and `Loop`.
|
|
198
198
|
* * `CurveChain` is an intermediate class. It is not instantiable on its own.
|
|
199
199
|
* * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings
|
|
200
200
|
* from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.
|
|
@@ -209,8 +209,6 @@ class CurveChain extends CurveCollection {
|
|
|
209
209
|
}
|
|
210
210
|
/** Return the array of `CurvePrimitive` */
|
|
211
211
|
get children() {
|
|
212
|
-
if (this._curves === undefined)
|
|
213
|
-
this._curves = [];
|
|
214
212
|
return this._curves;
|
|
215
213
|
}
|
|
216
214
|
/**
|
|
@@ -285,7 +283,7 @@ class CurveChain extends CurveCollection {
|
|
|
285
283
|
/**
|
|
286
284
|
* Return the index where target is found in the array of children.
|
|
287
285
|
* @param alsoSearchProxies whether to also check proxy curves of the children
|
|
288
|
-
|
|
286
|
+
*/
|
|
289
287
|
childIndex(target, alsoSearchProxies) {
|
|
290
288
|
for (let i = 0; i < this._curves.length; i++) {
|
|
291
289
|
if (this._curves[i] === target)
|
|
@@ -390,21 +388,4 @@ class BagOfCurves extends CurveCollection {
|
|
|
390
388
|
}
|
|
391
389
|
}
|
|
392
390
|
exports.BagOfCurves = BagOfCurves;
|
|
393
|
-
/**
|
|
394
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`
|
|
395
|
-
* @public
|
|
396
|
-
*/
|
|
397
|
-
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
398
|
-
constructor() {
|
|
399
|
-
/** True to consolidated linear geometry (e.g. separate LineSegment3d and LineString3d) into LineString3d */
|
|
400
|
-
this.consolidateLinearGeometry = true;
|
|
401
|
-
/** True to consolidate contiguous arcs */
|
|
402
|
-
this.consolidateCompatibleArcs = true;
|
|
403
|
-
/** Tolerance for collapsing identical points */
|
|
404
|
-
this.duplicatePointTolerance = Geometry_1.Geometry.smallMetricDistance;
|
|
405
|
-
/** Tolerance for removing interior colinear points. */
|
|
406
|
-
this.colinearPointTolerance = Geometry_1.Geometry.smallMetricDistance;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
exports.ConsolidateAdjacentCurvePrimitivesOptions = ConsolidateAdjacentCurvePrimitivesOptions;
|
|
410
391
|
//# sourceMappingURL=CurveCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAuC;AAQvC,+DAA4D;AAC5D,qDAAkD;AAElD,mDAAgD;AAChD,8EAA2E;AAC3E,kGAA+F;AAC/F,oGAAiG;AACjG,0EAAuE;AACvE,4FAAyF;AACzF,4EAAyE;AACzE,wFAAqF;AACrF,iDAA8C;AAC9C,6CAA0C;AAe1C;;;;;;;;;;;;;;GAcG;AACH,MAAsB,eAAgB,SAAQ,6BAAa;IAA3D;;QACE,wCAAwC;QAC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G,mBAAQ,CAAC,mBAAmB,CAAC;QAC9D,uDAAuD;QAChD,2BAAsB,GAAG,mBAAQ,CAAC,mBAAmB,CAAC;IAC/D,CAAC;CAAA;AATD,8FASC","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\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { AnyCurve } from \"./CurveChain\";\r\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\r\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\r\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\r\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\r\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\r\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\r\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { ProxyCurve } from \"./ProxyCurve\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\r\n * used in conditional statements for type-switching.\r\n * - \"loop\" => [[Loop]]\r\n * - \"path\" => [[Path]]\r\n * - \"unionRegion\" => [[UnionRegion]]\r\n * - \"parityRegion\" => [[ParityRegion]]\r\n * - \"bagOfCurves\" => [[BagOfCurves]]\r\n * @public\r\n */\r\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\r\n\r\n/**\r\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\r\n * - `CurveChain` is a (non-instantiable) intermediate class for a sequence of `CurvePrimitive` joining head-to-tail.\r\n * The two instantiable forms of `CurveChain` are\r\n * - `Path` - A chain not required to close and not enclosing a planar area (so curves do not have to be on the\r\n * same plane).\r\n * - `Loop` - A chain required to close from last to first so that a planar area is enclosed (so curves have to\r\n * be on the same plane).\r\n * - `ParityRegion` -- a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\r\n * - `UnionRegion` -- a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\r\n * - `BagOfCurves` -- a collection of `AnyCurve` with no implied structure.\r\n *\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport abstract class CurveCollection extends GeometryQuery {\r\n /** String name for schema properties */\r\n public readonly geometryCategory = \"curveCollection\";\r\n /** Type discriminator. */\r\n public abstract readonly curveCollectionType: CurveCollectionType;\r\n /* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n /** Flag for inner loop status. Only used by `Loop`. */\r\n public isInner: boolean = false;\r\n /** Return the sum of the lengths of all contained curves. */\r\n public sumLengths(): number {\r\n return SumLengthsContext.sumLengths(this);\r\n }\r\n /** Return the closest point on the contained curves */\r\n public closestPoint(spacePoint: Point3d): CurveLocationDetail | undefined {\r\n let detailA: CurveLocationDetail | undefined;\r\n if (this.children !== undefined) {\r\n for (const child of this.children) {\r\n if (child instanceof CurvePrimitive) {\r\n const detailB = child.closestPoint(spacePoint, false);\r\n detailA = CurveLocationDetail.chooseSmallerA(detailA, detailB);\r\n } else if (child instanceof CurveCollection) {\r\n const detailB = child.closestPoint(spacePoint);\r\n detailA = CurveLocationDetail.chooseSmallerA(detailA, detailB);\r\n }\r\n }\r\n }\r\n return detailA;\r\n }\r\n /**\r\n * Return the max gap between adjacent primitives in Path and Loop collections.\r\n * * In a Path, gaps are computed between consecutive primitives.\r\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\r\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\r\n * \"unstructured\" so gaps should not be semantically meaningful.\r\n */\r\n public maxGap(): number {\r\n return GapSearchContext.maxGap(this);\r\n }\r\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\r\n public checkForNonLinearPrimitives(): boolean {\r\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\r\n }\r\n /** Apply transform recursively to children */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\r\n }\r\n /** Return a deep copy. */\r\n public override clone(): CurveCollection {\r\n return CloneCurvesContext.clone(this) as CurveCollection;\r\n }\r\n /** Create a deep copy of transformed curves. */\r\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\r\n return CloneCurvesContext.clone(this, transform);\r\n }\r\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\r\n public cloneWithExpandedLineStrings(): CurveCollection {\r\n return CloneWithExpandedLineStrings.clone(this);\r\n }\r\n /**\r\n * Push all CurvePrimitives contained in the instance onto the `results` array.\r\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\r\n * of the Loop are pushed onto `results`.\r\n */\r\n private collectCurvePrimitivesGo(\r\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\r\n ): void {\r\n if (this.children) {\r\n for (const child of this.children) {\r\n if (child instanceof CurvePrimitive)\r\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\r\n else if (child instanceof CurveCollection)\r\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\r\n }\r\n }\r\n }\r\n /**\r\n * Return an array containing all CurvePrimitives in the instance.\r\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\r\n * the Loop are pushed onto the returned array.\r\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\r\n * clearing the array).\r\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\r\n * it recurses to its (otherwise hidden) children.\r\n */\r\n public collectCurvePrimitives(\r\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\r\n ): CurvePrimitive[] {\r\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\r\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\r\n return results;\r\n }\r\n /**\r\n * Return true for planar region types:\r\n * * `Loop`\r\n * * `ParityRegion`\r\n * * `UnionRegion`\r\n */\r\n public get isAnyRegionType(): boolean {\r\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\r\n }\r\n /** Return true for a `Path`, i.e. a chain of curves joined head-to-tail */\r\n public get isOpenPath(): boolean {\r\n return this.dgnBoundaryType() === 1;\r\n }\r\n /**\r\n * Return true for a single-loop planar region type, i.e. `Loop`.\r\n * * This is NOT a test for physical closure of a `Path`.\r\n */\r\n public get isClosedPath(): boolean {\r\n return this.dgnBoundaryType() === 2;\r\n }\r\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\r\n public abstract cloneStroked(options?: StrokeOptions): AnyCurve;\r\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\r\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\r\n /** Clone an empty collection. */\r\n public abstract cloneEmptyPeer(): CurveCollection;\r\n /**\r\n * Return the boundary type of a corresponding MicroStation CurveVector.\r\n * * Derived class must implement.\r\n */\r\n public abstract dgnBoundaryType(): number;\r\n /**\r\n * Try to add a child.\r\n * @param child child to add.\r\n * @return true if child is an acceptable type for this collection.\r\n */\r\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\r\n /** Return a child identified by by index */\r\n public abstract getChild(i: number): AnyCurve | undefined;\r\n /**\r\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\r\n * @param rangeToExtend the given range.\r\n * @param transform if supplied, the range is extended with transformed curves.\r\n */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n const children = this.children;\r\n if (children) {\r\n for (const c of children) {\r\n c.extendRange(rangeToExtend, transform);\r\n }\r\n }\r\n }\r\n /**\r\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\r\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\r\n * @param source containing `CurvePrimitive` or `CurveCollection`\r\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\r\n */\r\n public static createCurveLocationDetailOnAnyCurvePrimitive(\r\n source: GeometryQuery | undefined, fraction: number = 0.5,\r\n ): CurveLocationDetail | undefined {\r\n if (!source)\r\n return undefined;\r\n if (source instanceof CurvePrimitive) {\r\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\r\n } else if (source instanceof CurveCollection && source.children !== undefined)\r\n for (const child of source.children) {\r\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\r\n if (detail)\r\n return detail;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\r\n * of projection.\r\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\r\n * @param lowHigh optional receiver for output\r\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\r\n * end of the ray.\r\n */\r\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\r\n }\r\n}\r\n\r\n/**\r\n * Shared base class for use by both open and closed paths.\r\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\r\n * * The specific derived classes are `Path` and `Loop`\r\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\r\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\r\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport abstract class CurveChain extends CurveCollection {\r\n /** The curve primitives in the chain. */\r\n protected _curves: CurvePrimitive[];\r\n /** Constructor */\r\n protected constructor() {\r\n super();\r\n this._curves = [];\r\n }\r\n /** Return the array of `CurvePrimitive` */\r\n public override get children(): CurvePrimitive[] {\r\n if (this._curves === undefined)\r\n this._curves = [];\r\n return this._curves;\r\n }\r\n /**\r\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\r\n * * In particular, `-1` is the final curve.\r\n * @param index cyclic index\r\n */\r\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\r\n const n = this.children.length;\r\n if (n === 0)\r\n return undefined;\r\n if (index >= 0 && index < n) // try simplest non-cyclic access first\r\n return this.children[index];\r\n if (cyclic) {\r\n const index2 = Geometry.modulo(index, n);\r\n return this.children[index2];\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Stroke the chain into a simple xyz array.\r\n * @param options tolerance parameters controlling the stroking.\r\n */\r\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\r\n /**\r\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\r\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\r\n * the points of that LineString3d using \"packedPoints\".\r\n */\r\n const tree = this.cloneStroked(options);\r\n if (tree instanceof CurveChain) {\r\n const children = tree.children;\r\n if (children.length === 1) {\r\n const ls = children[0];\r\n if (ls instanceof LineString3d)\r\n return ls.packedPoints;\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Return a structural clone, with CurvePrimitive objects stroked. */\r\n public abstract override cloneStroked(options?: StrokeOptions): AnyCurve;\r\n /**\r\n * Add a child curve.\r\n * * Returns false if the given child is not a CurvePrimitive.\r\n */\r\n public tryAddChild(child: AnyCurve | undefined): boolean {\r\n if (child && child instanceof CurvePrimitive) {\r\n this._curves.push(child);\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** Return a child by index */\r\n public getChild(i: number): CurvePrimitive | undefined {\r\n if (i < this._curves.length) return this._curves[i];\r\n return undefined;\r\n }\r\n /** Invoke `curve.extendRange(range, transform)` for each child */\r\n public override extendRange(range: Range3d, transform?: Transform): void {\r\n for (const curve of this._curves)\r\n curve.extendRange(range, transform);\r\n }\r\n /**\r\n * Reverse each child curve (in place)\r\n * Reverse the order of the children in the CurveChain array.\r\n */\r\n public reverseChildrenInPlace(): void {\r\n for (const curve of this._curves)\r\n curve.reverseInPlace();\r\n this._curves.reverse();\r\n }\r\n /**\r\n * Return the index where target is found in the array of children.\r\n * @param alsoSearchProxies whether to also check proxy curves of the children\r\n */\r\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\r\n for (let i = 0; i < this._curves.length; i++) {\r\n if (this._curves[i] === target)\r\n return i;\r\n }\r\n if (alsoSearchProxies ?? false) {\r\n for (let i = 0; i < this._curves.length; i++) {\r\n const childCurve = this._curves[i];\r\n if (childCurve instanceof ProxyCurve) {\r\n if (childCurve.proxyCurve === target)\r\n return i;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\r\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\r\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\r\n ): CurveLocationDetail | undefined {\r\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\r\n if (primitive) {\r\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\r\n * * A `BagOfCurves` has no implied properties such as being planar.\r\n * @public\r\n */\r\nexport class BagOfCurves extends CurveCollection {\r\n /** String name for schema properties */\r\n public readonly curveCollectionType = \"bagOfCurves\";\r\n /** Test if `other` is an instance of `BagOfCurves` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof BagOfCurves;\r\n }\r\n /**\r\n * Array of children.\r\n * * No restrictions on type.\r\n */\r\n protected _children: AnyCurve[];\r\n /** Construct an empty `BagOfCurves` */\r\n public constructor() {\r\n super();\r\n this._children = [];\r\n }\r\n /** Return the (reference to) array of children */\r\n public override get children(): AnyCurve[] {\r\n return this._children;\r\n }\r\n /** Create with given curves. */\r\n public static create(...data: AnyCurve[]): BagOfCurves {\r\n const result = new BagOfCurves();\r\n for (const child of data) {\r\n result.tryAddChild(child);\r\n }\r\n return result;\r\n }\r\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\r\n public dgnBoundaryType(): number {\r\n return 0;\r\n }\r\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\r\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\r\n return processor.announceBagOfCurves(this, indexInParent);\r\n }\r\n /** Clone all children in stroked form. */\r\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\r\n const clone = new BagOfCurves();\r\n let child;\r\n for (child of this.children) {\r\n if (child instanceof CurvePrimitive) {\r\n const ls = LineString3d.create();\r\n child.emitStrokes(ls, options);\r\n if (ls)\r\n clone.children.push(ls);\r\n } else if (child instanceof CurveCollection) {\r\n const childStrokes = child.cloneStroked(options);\r\n if (childStrokes)\r\n clone.children.push(childStrokes);\r\n }\r\n }\r\n return clone;\r\n }\r\n /** Return an empty `BagOfCurves` */\r\n public cloneEmptyPeer(): BagOfCurves {\r\n return new BagOfCurves();\r\n }\r\n /** Add a child */\r\n public tryAddChild(child: AnyCurve | undefined): boolean {\r\n if (child)\r\n this._children.push(child);\r\n return true;\r\n }\r\n /** Get a child by index */\r\n public getChild(i: number): AnyCurve | undefined {\r\n if (i < this._children.length)\r\n return this._children[i];\r\n return undefined;\r\n }\r\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleBagOfCurves(this);\r\n }\r\n}\r\n\r\n/**\r\n * * Options to control method `RegionOps.consolidateAdjacentPrimitives`\r\n * @public\r\n */\r\nexport class ConsolidateAdjacentCurvePrimitivesOptions {\r\n /** True to consolidated linear geometry (e.g. separate LineSegment3d and LineString3d) into LineString3d */\r\n public consolidateLinearGeometry: boolean = true;\r\n /** True to consolidate contiguous arcs */\r\n public consolidateCompatibleArcs: boolean = true;\r\n /** Tolerance for collapsing identical points */\r\n public duplicatePointTolerance = Geometry.smallMetricDistance;\r\n /** Tolerance for removing interior colinear points. */\r\n public colinearPointTolerance = Geometry.smallMetricDistance;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAuC;AAQvC,+DAA4D;AAC5D,qDAAkD;AAElD,mDAAgD;AAChD,8EAA2E;AAC3E,kGAA+F;AAC/F,oGAAiG;AACjG,0EAAuE;AACvE,4FAAyF;AACzF,4EAAyE;AACzE,wFAAqF;AACrF,iDAA8C;AAC9C,6CAA0C;AAiB1C;;;;;;;;;;;;;;GAcG;AACH,MAAsB,eAAgB,SAAQ,6BAAa;IAA3D;;QACE,wCAAwC;QACxB,qBAAgB,GAAG,iBAAiB,CAAC;QAGrD,mEAAmE;QACnE,uD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BACjC,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC/B,IAAI,EAAE;oBACJ,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAC3B;iBAAM,IAAI,KAAK,YAAY,eAAe,EAAE;gBAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBACjD,IAAI,YAAY;oBACd,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;aACrC;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,oCAAoC;IAC7B,cAAc;QACnB,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;IACD,mBAAmB;IACZ,WAAW,CAAC,KAA2B;QAC5C,IAAI,KAAK;YACP,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2BAA2B;IACpB,QAAQ,CAAC,CAAS;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8EAA8E;IACvE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF;AA3ED,kCA2EC","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\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { AnyCurve } from \"./CurveTypes\";\r\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\r\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\r\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\r\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\r\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\r\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\r\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { ProxyCurve } from \"./ProxyCurve\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\r\n\r\n/**\r\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\r\n * used in conditional statements for type-switching.\r\n * - \"loop\" => [[Loop]]\r\n * - \"path\" => [[Path]]\r\n * - \"unionRegion\" => [[UnionRegion]]\r\n * - \"parityRegion\" => [[ParityRegion]]\r\n * - \"bagOfCurves\" => [[BagOfCurves]]\r\n * @public\r\n */\r\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\r\n\r\n/**\r\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\r\n * - `CurveChain` is a (non-instantiable) intermediate class for a sequence of `CurvePrimitive` joining head-to-tail.\r\n * The two instantiable forms of `CurveChain` are\r\n * - `Path` - A chain not required to close and not enclosing a planar area (so curves do not have to be on the\r\n * same plane).\r\n * - `Loop` - A chain required to close from last to first so that a planar area is enclosed (so curves have to\r\n * be on the same plane).\r\n * - `ParityRegion` -- a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\r\n * - `UnionRegion` -- a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\r\n * - `BagOfCurves` -- a collection of `AnyCurve` with no implied structure.\r\n *\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport abstract class CurveCollection extends GeometryQuery {\r\n /** String name for schema properties */\r\n public readonly geometryCategory = \"curveCollection\";\r\n /** Type discriminator. */\r\n public abstract readonly curveCollectionType: CurveCollectionType;\r\n /* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n /** Flag for inner loop status. Only used by `Loop`. */\r\n public isInner: boolean = false;\r\n /** Return the sum of the lengths of all contained curves. */\r\n public sumLengths(): number {\r\n return SumLengthsContext.sumLengths(this);\r\n }\r\n /** Return the closest point on the contained curves */\r\n public closestPoint(spacePoint: Point3d): CurveLocationDetail | undefined {\r\n let detailA: CurveLocationDetail | undefined;\r\n if (this.children !== undefined) {\r\n for (const child of this.children) {\r\n if (child instanceof CurvePrimitive) {\r\n const detailB = child.closestPoint(spacePoint, false);\r\n detailA = CurveLocationDetail.chooseSmallerA(detailA, detailB);\r\n } else if (child instanceof CurveCollection) {\r\n const detailB = child.closestPoint(spacePoint);\r\n detailA = CurveLocationDetail.chooseSmallerA(detailA, detailB);\r\n }\r\n }\r\n }\r\n return detailA;\r\n }\r\n /**\r\n * Return the max gap between adjacent primitives in Path and Loop collections.\r\n * * In a Path, gaps are computed between consecutive primitives.\r\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\r\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\r\n * \"unstructured\" so gaps should not be semantically meaningful.\r\n */\r\n public maxGap(): number {\r\n return GapSearchContext.maxGap(this);\r\n }\r\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\r\n public checkForNonLinearPrimitives(): boolean {\r\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\r\n }\r\n /** Apply transform recursively to children */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\r\n }\r\n /** Return a deep copy. */\r\n public override clone(): CurveCollection {\r\n return CloneCurvesContext.clone(this) as CurveCollection;\r\n }\r\n /** Create a deep copy of transformed curves. */\r\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\r\n return CloneCurvesContext.clone(this, transform);\r\n }\r\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\r\n public cloneWithExpandedLineStrings(): CurveCollection {\r\n return CloneWithExpandedLineStrings.clone(this);\r\n }\r\n /**\r\n * Push all CurvePrimitives contained in the instance onto the `results` array.\r\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\r\n * of the Loop are pushed onto `results`.\r\n */\r\n private collectCurvePrimitivesGo(\r\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\r\n ): void {\r\n if (this.children) {\r\n for (const child of this.children) {\r\n if (child instanceof CurvePrimitive)\r\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\r\n else if (child instanceof CurveCollection)\r\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\r\n }\r\n }\r\n }\r\n /**\r\n * Return an array containing all CurvePrimitives in the instance.\r\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\r\n * the Loop are pushed onto the returned array.\r\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\r\n * clearing the array).\r\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\r\n * it recurses to its (otherwise hidden) children.\r\n */\r\n public collectCurvePrimitives(\r\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\r\n ): CurvePrimitive[] {\r\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\r\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\r\n return results;\r\n }\r\n /**\r\n * Return true for planar region types:\r\n * * `Loop`\r\n * * `ParityRegion`\r\n * * `UnionRegion`\r\n */\r\n public get isAnyRegionType(): boolean {\r\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\r\n }\r\n /** Return true for a `Path`, i.e. a chain of curves joined head-to-tail */\r\n public get isOpenPath(): boolean {\r\n return this.dgnBoundaryType() === 1;\r\n }\r\n /**\r\n * Return true for a single-loop planar region type, i.e. `Loop`.\r\n * * This is NOT a test for physical closure of a `Path`.\r\n */\r\n public get isClosedPath(): boolean {\r\n return this.dgnBoundaryType() === 2;\r\n }\r\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\r\n public abstract cloneStroked(options?: StrokeOptions): AnyCurve;\r\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\r\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\r\n /** Clone an empty collection. */\r\n public abstract cloneEmptyPeer(): CurveCollection;\r\n /**\r\n * Return the boundary type of a corresponding MicroStation CurveVector.\r\n * * Derived class must implement.\r\n */\r\n public abstract dgnBoundaryType(): number;\r\n /**\r\n * Try to add a child.\r\n * @param child child to add.\r\n * @return true if child is an acceptable type for this collection.\r\n */\r\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\r\n /** Return a child identified by by index */\r\n public abstract getChild(i: number): AnyCurve | undefined;\r\n /**\r\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\r\n * @param rangeToExtend the given range.\r\n * @param transform if supplied, the range is extended with transformed curves.\r\n */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n const children = this.children;\r\n if (children) {\r\n for (const c of children) {\r\n c.extendRange(rangeToExtend, transform);\r\n }\r\n }\r\n }\r\n /**\r\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\r\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\r\n * @param source containing `CurvePrimitive` or `CurveCollection`\r\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\r\n */\r\n public static createCurveLocationDetailOnAnyCurvePrimitive(\r\n source: GeometryQuery | undefined, fraction: number = 0.5,\r\n ): CurveLocationDetail | undefined {\r\n if (!source)\r\n return undefined;\r\n if (source instanceof CurvePrimitive) {\r\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\r\n } else if (source instanceof CurveCollection && source.children !== undefined)\r\n for (const child of source.children) {\r\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\r\n if (detail)\r\n return detail;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\r\n * of projection.\r\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\r\n * @param lowHigh optional receiver for output\r\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\r\n * end of the ray.\r\n */\r\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\r\n }\r\n}\r\n\r\n/**\r\n * Shared base class for use by both open and closed paths.\r\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\r\n * * The specific derived classes are `Path` and `Loop`.\r\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\r\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\r\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport abstract class CurveChain extends CurveCollection {\r\n /** The curve primitives in the chain. */\r\n protected _curves: CurvePrimitive[];\r\n /** Constructor */\r\n protected constructor() {\r\n super();\r\n this._curves = [];\r\n }\r\n /** Return the array of `CurvePrimitive` */\r\n public override get children(): CurvePrimitive[] {\r\n return this._curves;\r\n }\r\n /**\r\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\r\n * * In particular, `-1` is the final curve.\r\n * @param index cyclic index\r\n */\r\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\r\n const n = this.children.length;\r\n if (n === 0)\r\n return undefined;\r\n if (index >= 0 && index < n) // try simplest non-cyclic access first\r\n return this.children[index];\r\n if (cyclic) {\r\n const index2 = Geometry.modulo(index, n);\r\n return this.children[index2];\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Stroke the chain into a simple xyz array.\r\n * @param options tolerance parameters controlling the stroking.\r\n */\r\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\r\n /**\r\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\r\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\r\n * the points of that LineString3d using \"packedPoints\".\r\n */\r\n const tree = this.cloneStroked(options);\r\n if (tree instanceof CurveChain) {\r\n const children = tree.children;\r\n if (children.length === 1) {\r\n const ls = children[0];\r\n if (ls instanceof LineString3d)\r\n return ls.packedPoints;\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Return a structural clone, with CurvePrimitive objects stroked. */\r\n public abstract override cloneStroked(options?: StrokeOptions): AnyCurve;\r\n /**\r\n * Add a child curve.\r\n * * Returns false if the given child is not a CurvePrimitive.\r\n */\r\n public tryAddChild(child: AnyCurve | undefined): boolean {\r\n if (child && child instanceof CurvePrimitive) {\r\n this._curves.push(child);\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** Return a child by index */\r\n public getChild(i: number): CurvePrimitive | undefined {\r\n if (i < this._curves.length) return this._curves[i];\r\n return undefined;\r\n }\r\n /** Invoke `curve.extendRange(range, transform)` for each child */\r\n public override extendRange(range: Range3d, transform?: Transform): void {\r\n for (const curve of this._curves)\r\n curve.extendRange(range, transform);\r\n }\r\n /**\r\n * Reverse each child curve (in place)\r\n * Reverse the order of the children in the CurveChain array.\r\n */\r\n public reverseChildrenInPlace(): void {\r\n for (const curve of this._curves)\r\n curve.reverseInPlace();\r\n this._curves.reverse();\r\n }\r\n /**\r\n * Return the index where target is found in the array of children.\r\n * @param alsoSearchProxies whether to also check proxy curves of the children\r\n */\r\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\r\n for (let i = 0; i < this._curves.length; i++) {\r\n if (this._curves[i] === target)\r\n return i;\r\n }\r\n if (alsoSearchProxies ?? false) {\r\n for (let i = 0; i < this._curves.length; i++) {\r\n const childCurve = this._curves[i];\r\n if (childCurve instanceof ProxyCurve) {\r\n if (childCurve.proxyCurve === target)\r\n return i;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\r\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\r\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\r\n ): CurveLocationDetail | undefined {\r\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\r\n if (primitive) {\r\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\r\n * * A `BagOfCurves` has no implied properties such as being planar.\r\n * @public\r\n */\r\nexport class BagOfCurves extends CurveCollection {\r\n /** String name for schema properties */\r\n public readonly curveCollectionType = \"bagOfCurves\";\r\n /** Test if `other` is an instance of `BagOfCurves` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof BagOfCurves;\r\n }\r\n /**\r\n * Array of children.\r\n * * No restrictions on type.\r\n */\r\n protected _children: AnyCurve[];\r\n /** Construct an empty `BagOfCurves` */\r\n public constructor() {\r\n super();\r\n this._children = [];\r\n }\r\n /** Return the (reference to) array of children */\r\n public override get children(): AnyCurve[] {\r\n return this._children;\r\n }\r\n /** Create with given curves. */\r\n public static create(...data: AnyCurve[]): BagOfCurves {\r\n const result = new BagOfCurves();\r\n for (const child of data) {\r\n result.tryAddChild(child);\r\n }\r\n return result;\r\n }\r\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\r\n public dgnBoundaryType(): number {\r\n return 0;\r\n }\r\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\r\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\r\n return processor.announceBagOfCurves(this, indexInParent);\r\n }\r\n /** Clone all children in stroked form. */\r\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\r\n const clone = new BagOfCurves();\r\n let child;\r\n for (child of this.children) {\r\n if (child instanceof CurvePrimitive) {\r\n const ls = LineString3d.create();\r\n child.emitStrokes(ls, options);\r\n if (ls)\r\n clone.children.push(ls);\r\n } else if (child instanceof CurveCollection) {\r\n const childStrokes = child.cloneStroked(options);\r\n if (childStrokes)\r\n clone.children.push(childStrokes);\r\n }\r\n }\r\n return clone;\r\n }\r\n /** Return an empty `BagOfCurves` */\r\n public cloneEmptyPeer(): BagOfCurves {\r\n return new BagOfCurves();\r\n }\r\n /** Add a child */\r\n public tryAddChild(child: AnyCurve | undefined): boolean {\r\n if (child)\r\n this._children.push(child);\r\n return true;\r\n }\r\n /** Get a child by index */\r\n public getChild(i: number): AnyCurve | undefined {\r\n if (i < this._children.length)\r\n return this._children[i];\r\n return undefined;\r\n }\r\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleBagOfCurves(this);\r\n }\r\n}\r\n"]}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* @module Curve
|
|
3
3
|
*/
|
|
4
4
|
import { Matrix4d } from "../geometry4d/Matrix4d";
|
|
5
|
-
import { CurveLocationDetailArrayPair } from "./
|
|
6
|
-
import { CurveLocationDetailPair } from "./CurveLocationDetail";
|
|
5
|
+
import { CurveLocationDetailArrayPair, 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,33 @@ 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
|
|
29
|
-
* @param
|
|
30
|
-
* @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
|
|
31
28
|
* @param tolerance optional distance tolerance for coincidence
|
|
32
29
|
*/
|
|
33
|
-
static intersectionProjectedXYPairs(worldToLocal: Matrix4d,
|
|
30
|
+
static intersectionProjectedXYPairs(worldToLocal: Matrix4d, curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean, tolerance?: number): CurveLocationDetailPair[];
|
|
34
31
|
/**
|
|
35
32
|
* Return full 3d xyz intersections of 2 curves.
|
|
36
33
|
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
37
34
|
* * Not Implemented for bspline and bezier curves.
|
|
38
|
-
* * **NOTE:** GeometryQuery inputs should really be AnyCurve.
|
|
39
35
|
* @beta
|
|
40
|
-
* @param
|
|
41
|
-
* @param extendA true to allow
|
|
42
|
-
* @param
|
|
43
|
-
* @param extendB true to allow
|
|
36
|
+
* @param curveA first curve
|
|
37
|
+
* @param extendA true to allow curveA to extend
|
|
38
|
+
* @param curveB second curve
|
|
39
|
+
* @param extendB true to allow curveB to extend
|
|
44
40
|
*/
|
|
45
|
-
static intersectionXYZ(
|
|
41
|
+
static intersectionXYZ(curveA: AnyCurve, extendA: boolean, curveB: AnyCurve, extendB: boolean): CurveLocationDetailArrayPair;
|
|
46
42
|
/**
|
|
47
43
|
* Return xy intersections of input curves.
|
|
48
44
|
* @param primitives input curves to intersect
|
|
@@ -50,11 +46,30 @@ export declare class CurveCurve {
|
|
|
50
46
|
*/
|
|
51
47
|
static allIntersectionsAmongPrimitivesXY(primitives: CurvePrimitive[], tolerance?: number): CurveLocationDetailPair[];
|
|
52
48
|
/**
|
|
53
|
-
* Return
|
|
54
|
-
* *
|
|
55
|
-
*
|
|
56
|
-
*
|
|
49
|
+
* Return at least one XY close approach between 2 curves.
|
|
50
|
+
* * Close approach xy-distances are measured without regard to z. This is equivalent to their separation distance
|
|
51
|
+
* as seen in the top view, or as measured between their projections onto the xy-plane.
|
|
52
|
+
* * If more than one approach is returned, one of them is the closest approach.
|
|
53
|
+
* * If an input curve is a `CurveCollection`, then close approaches are computed to each `CurvePrimitive` child.
|
|
54
|
+
* This can lead to many returned pairs, especially when both inputs are `CurveCollection`s. If an input curve is
|
|
55
|
+
* an `AnyRegion` then close approaches are computed only to the boundary curves, not to the interior.
|
|
56
|
+
* @param curveA first curve
|
|
57
|
+
* @param curveB second curve
|
|
58
|
+
* @param maxDistance maximum xy-distance to consider between the curves.
|
|
59
|
+
* Close approaches further than this xy-distance are not returned.
|
|
57
60
|
*/
|
|
58
|
-
static closeApproachProjectedXYPairs(
|
|
61
|
+
static closeApproachProjectedXYPairs(curveA: AnyCurve, curveB: AnyCurve, maxDistance: number): CurveLocationDetailPair[];
|
|
62
|
+
/**
|
|
63
|
+
* Convenience method that calls [[closeApproachProjectedXYPairs]] with a large `maxDistance`
|
|
64
|
+
* and returns a detail pair representing the closest xy-approach between the curves.
|
|
65
|
+
* * There may be many detail pairs that represent "closest" xy-approach, including coincident interval pairs,
|
|
66
|
+
* isolated intersections, or close approaches within tolerance of each other. This method makes no attempt to
|
|
67
|
+
* distinguish among them, and returns a pair whose `detail.point` values are separated by the smallest xy distance
|
|
68
|
+
* found among the pairs.
|
|
69
|
+
* @param curveA first curve
|
|
70
|
+
* @param curveB second curve
|
|
71
|
+
* @return detail pair of closest xy-approach, undefined if not found
|
|
72
|
+
*/
|
|
73
|
+
static closestApproachProjectedXYPair(curveA: AnyCurve, curveB: AnyCurve): CurveLocationDetailPair | undefined;
|
|
59
74
|
}
|
|
60
75
|
//# 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,MA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