@itwin/core-geometry 5.2.0-dev.7 → 5.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 +30 -10
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +74 -10
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.d.ts +19 -6
- package/lib/cjs/bspline/AkimaCurve3d.d.ts.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js +21 -5
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +3 -3
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +6 -6
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +2 -2
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +4 -6
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.d.ts +27 -17
- package/lib/cjs/bspline/InterpolationCurve3d.d.ts.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js +17 -7
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +19 -6
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +17 -2
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +14 -1
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +21 -3
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +14 -11
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +23 -16
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +20 -3
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +22 -5
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +27 -17
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +61 -35
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +1 -0
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +1 -0
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +8 -7
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +51 -1
- package/lib/cjs/curve/CurveOps.d.ts.map +1 -1
- package/lib/cjs/curve/CurveOps.js +97 -3
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +4 -4
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +8 -8
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -3
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +6 -2
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +12 -7
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +9 -4
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +10 -5
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +2 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +4 -4
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +21 -18
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +30 -50
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +2 -2
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +6 -2
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +2 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +6 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +5 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +0 -3
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +6 -2
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +12 -3
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts +2 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +14 -18
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +18 -2
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +37 -4
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +1 -0
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.d.ts +8 -0
- package/lib/cjs/geometry3d/PointStreaming.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js +18 -2
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +18 -9
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +53 -26
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +8 -2
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +10 -4
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +14 -3
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +20 -4
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +34 -32
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +28 -21
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts +16 -6
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js +28 -4
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +3 -4
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +1 -1
- package/lib/cjs/geometry3d/Transform.js +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.d.ts +12 -1
- package/lib/cjs/geometry3d/XYZProps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js +17 -2
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +16 -0
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +26 -0
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +5 -9
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +13 -7
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/cjs/numerics/SmallSystem.js +13 -7
- package/lib/cjs/numerics/SmallSystem.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +1 -3
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +2 -6
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +25 -6
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +59 -8
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +2 -0
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +7 -3
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +8 -10
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +8 -5
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +8 -4
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +3 -3
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +4 -2
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +9 -12
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +8 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +13 -6
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +2 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +2 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +38 -12
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +91 -23
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +5 -4
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +6 -5
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +20 -11
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +43 -39
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +7 -4
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +16 -11
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +13 -11
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +40 -36
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/Voronoi.d.ts +195 -0
- package/lib/cjs/topology/Voronoi.d.ts.map +1 -0
- package/lib/cjs/topology/Voronoi.js +700 -0
- package/lib/cjs/topology/Voronoi.js.map +1 -0
- package/lib/cjs/topology/XYParitySearchContext.d.ts +1 -1
- package/lib/cjs/topology/XYParitySearchContext.d.ts.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Geometry.d.ts +30 -10
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +74 -10
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.d.ts +19 -6
- package/lib/esm/bspline/AkimaCurve3d.d.ts.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js +21 -5
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +3 -3
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +6 -6
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +2 -2
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +4 -6
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.d.ts +27 -17
- package/lib/esm/bspline/InterpolationCurve3d.d.ts.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js +17 -7
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +19 -6
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +17 -2
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +14 -1
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +21 -3
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +14 -11
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +23 -16
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +20 -3
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +22 -5
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +27 -17
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +61 -35
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +1 -0
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +1 -0
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +8 -7
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +51 -1
- package/lib/esm/curve/CurveOps.d.ts.map +1 -1
- package/lib/esm/curve/CurveOps.js +98 -4
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +4 -4
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +8 -8
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -3
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +6 -2
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +12 -7
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +9 -4
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +10 -5
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +2 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +4 -4
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +21 -18
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +30 -50
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +2 -2
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +6 -2
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +2 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +6 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +5 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +0 -3
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +6 -2
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +12 -3
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts +2 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +14 -18
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +1 -1
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +18 -2
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +37 -4
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +1 -0
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.d.ts +8 -0
- package/lib/esm/geometry3d/PointStreaming.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js +18 -2
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +18 -9
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +53 -26
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +8 -2
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +10 -4
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +14 -3
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +20 -4
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +34 -32
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +28 -21
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts +16 -6
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js +28 -4
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +3 -4
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +1 -1
- package/lib/esm/geometry3d/Transform.js +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.d.ts +12 -1
- package/lib/esm/geometry3d/XYZProps.d.ts.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js +16 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +16 -0
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +26 -0
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +5 -9
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +13 -7
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/esm/numerics/SmallSystem.js +13 -7
- package/lib/esm/numerics/SmallSystem.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +1 -3
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +2 -6
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +25 -6
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +59 -8
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +2 -0
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +7 -3
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +8 -10
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +8 -5
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +8 -4
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +3 -3
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +4 -2
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +9 -12
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +8 -3
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +13 -6
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +2 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +2 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +38 -12
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +92 -24
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +5 -4
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +6 -5
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +20 -11
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +43 -39
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +7 -4
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +17 -12
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +13 -11
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +40 -36
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/Voronoi.d.ts +195 -0
- package/lib/esm/topology/Voronoi.d.ts.map +1 -0
- package/lib/esm/topology/Voronoi.js +696 -0
- package/lib/esm/topology/Voronoi.js.map +1 -0
- package/lib/esm/topology/XYParitySearchContext.d.ts +1 -1
- package/lib/esm/topology/XYParitySearchContext.d.ts.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAgBlD;;;;;;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AI,YAAY;oBACd,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD;;;;;;OAMG;IACa,YAAY,CAC1B,UAAmB,EAAE,SAAsC,KAAK,EAAE,MAA4B;QAE9F,IAAI,OAAwC,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClC,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;oBACjD,OAAO,GAAG,MAAM,GAAG,mBAAmB,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive, TangentOptions } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\nimport { AnnounceTangentStrokeHandler } from \"./internalContexts/AnnounceTangentStrokeHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /**\n * Announce all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to\n * the contained curves in the view defined by `options.vectorToEye`.\n * * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve\n * tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to\n * `options.vectorToEye`.\n * @param spacePoint point in space.\n * @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused\n * internally, so it should be cloned in the callback if it needs to be saved.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n */\n public emitTangents(\n spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions,\n ): void {\n const strokeHandler = new AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.emitStrokableParts(strokeHandler, options?.strokeOptions);\n else if (child instanceof CurveCollection)\n child.emitTangents(spacePoint, announceTangent, options);\n }\n }\n }\n /**\n * Return all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns an array of details of all tangent points or undefined if no tangent was found.\n */\n public allTangents(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail[] | undefined {\n const tangents: CurveLocationDetail[] = [];\n this.emitTangents(spacePoint, (t: CurveLocationDetail) => tangents.push(t.clone()), options);\n return (tangents.length === 0) ? undefined : tangents;\n }\n /**\n * Return the point `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns the detail of the closest tangent point or undefined if no tangent was found.\n */\n public closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined {\n const hint = options?.hintPoint ?? spacePoint;\n let toLocal: Matrix3d | undefined;\n if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))\n toLocal = Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);\n const measureHintDist2 = (pt: Point3d): number => { // measure distance to hint in view plane coordinates\n return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);\n };\n let closestTangent: CurveLocationDetail | undefined;\n let closestDist2 = Geometry.largeCoordinateResult;\n const collectClosestTangent = (tangent: CurveLocationDetail) => {\n const dist2 = measureHintDist2(tangent.point);\n if (!closestTangent || dist2 < closestDist2) {\n closestTangent = tangent.clone(closestTangent);\n closestDist2 = dist2;\n }\n };\n this.emitTangents(spacePoint, collectClosestTangent, options);\n return closestTangent;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n /** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */\n public findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined {\n for (const child of this.children) {\n if (child === descendant)\n return this;\n if (child instanceof CurveCollection) {\n const parent = child.findParentOfDescendant(descendant);\n if (parent)\n return parent;\n }\n }\n return undefined;\n };\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Whether the chain start and end points are defined and within tolerance.\n * * Does not check for planarity or degeneracy.\n * @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])\n * @param xyOnly if true, ignore z coordinate (default is `false`)\n */\n public isPhysicallyClosedCurve(tolerance: number = Geometry.smallMetricDistance, xyOnly: boolean = false): boolean {\n const p0 = this.startPoint();\n const p1 = this.endPoint();\n return p0 !== undefined && p1 !== undefined && (xyOnly ? p0.isAlmostEqualXY(p1, tolerance) : p0.isAlmostEqual(p1, tolerance));\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MA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Ac;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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive, TangentOptions } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\nimport { AnnounceTangentStrokeHandler } from \"./internalContexts/AnnounceTangentStrokeHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /**\n * Announce all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to\n * the contained curves in the view defined by `options.vectorToEye`.\n * * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve\n * tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to\n * `options.vectorToEye`.\n * @param spacePoint point in space.\n * @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused\n * internally, so it should be cloned in the callback if it needs to be saved.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n */\n public emitTangents(\n spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions,\n ): void {\n const strokeHandler = new AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.emitStrokableParts(strokeHandler, options?.strokeOptions);\n else if (child instanceof CurveCollection)\n child.emitTangents(spacePoint, announceTangent, options);\n }\n }\n }\n /**\n * Return all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns an array of details of all tangent points or undefined if no tangent was found.\n */\n public allTangents(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail[] | undefined {\n const tangents: CurveLocationDetail[] = [];\n this.emitTangents(spacePoint, (t: CurveLocationDetail) => tangents.push(t.clone()), options);\n return (tangents.length === 0) ? undefined : tangents;\n }\n /**\n * Return the point `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns the detail of the closest tangent point or undefined if no tangent was found.\n */\n public closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined {\n const hint = options?.hintPoint ?? spacePoint;\n let toLocal: Matrix3d | undefined;\n if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))\n toLocal = Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);\n const measureHintDist2 = (pt: Point3d): number => { // measure distance to hint in view plane coordinates\n return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);\n };\n let closestTangent: CurveLocationDetail | undefined;\n let closestDist2 = Geometry.largeCoordinateResult;\n const collectClosestTangent = (tangent: CurveLocationDetail) => {\n const dist2 = measureHintDist2(tangent.point);\n if (!closestTangent || dist2 < closestDist2) {\n closestTangent = tangent.clone(closestTangent);\n closestDist2 = dist2;\n }\n };\n this.emitTangents(spacePoint, collectClosestTangent, options);\n return closestTangent;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n /** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */\n public findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined {\n for (const child of this.children) {\n if (child === descendant)\n return this;\n if (child instanceof CurveCollection) {\n const parent = child.findParentOfDescendant(descendant);\n if (parent)\n return parent;\n }\n }\n return undefined;\n };\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Whether the chain start and end points are defined and within tolerance.\n * * Does not check for planarity or degeneracy.\n * @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])\n * @param xyOnly if true, ignore z coordinate (default is `false`)\n */\n public isPhysicallyClosedCurve(tolerance: number = Geometry.smallMetricDistance, xyOnly: boolean = false): boolean {\n const p0 = this.startPoint();\n const p1 = this.endPoint();\n return p0 !== undefined && p1 !== undefined && (xyOnly ? p0.isAlmostEqualXY(p1, tolerance) : p0.isAlmostEqual(p1, tolerance));\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n * @param cyclic whether to employ modulo operator for wrap-around indexing. Default is `true`.\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
2
2
|
import { Ray3d } from "../geometry3d/Ray3d";
|
|
3
3
|
import { Transform } from "../geometry3d/Transform";
|
|
4
|
+
import { XYAndZ } from "../geometry3d/XYZProps";
|
|
4
5
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
5
6
|
/**
|
|
6
7
|
* An enumeration of special conditions being described by a CurveLocationDetail.
|
|
@@ -104,7 +105,7 @@ export declare class CurveLocationDetail {
|
|
|
104
105
|
* @param vector (optional) vector to install.
|
|
105
106
|
* @param a (optional) numeric value to install.
|
|
106
107
|
*/
|
|
107
|
-
setFP(fraction: number, point:
|
|
108
|
+
setFP(fraction: number, point: XYAndZ, vector?: Vector3d, a?: number): void;
|
|
108
109
|
/**
|
|
109
110
|
* Updated in this instance.
|
|
110
111
|
* * Note that if caller omits a`, that field is updated to the call-list default (NOT left as-is)
|
|
@@ -117,15 +118,15 @@ export declare class CurveLocationDetail {
|
|
|
117
118
|
/** Set the CurvePrimitive pointer, leaving all other properties untouched. */
|
|
118
119
|
setCurve(curve: CurvePrimitive): void;
|
|
119
120
|
/** Record the distance from the CurveLocationDetail's point to the parameter point. */
|
|
120
|
-
setDistanceTo(point:
|
|
121
|
+
setDistanceTo(point: XYAndZ): void;
|
|
121
122
|
/** Create with a CurvePrimitive pointer but no coordinate data. */
|
|
122
123
|
static create(curve?: CurvePrimitive, result?: CurveLocationDetail): CurveLocationDetail;
|
|
123
124
|
/** Create a new detail using CurvePrimitive pointer, fraction, and point coordinates. */
|
|
124
|
-
static createCurveFractionPoint(curve: CurvePrimitive | undefined, fraction: number, point:
|
|
125
|
+
static createCurveFractionPoint(curve: CurvePrimitive | undefined, fraction: number, point: XYAndZ, result?: CurveLocationDetail): CurveLocationDetail;
|
|
125
126
|
/** Create a new detail with only ray, fraction, and point. */
|
|
126
|
-
static createRayFractionPoint(ray: Ray3d, fraction: number, point:
|
|
127
|
+
static createRayFractionPoint(ray: Ray3d, fraction: number, point: XYAndZ, result?: CurveLocationDetail): CurveLocationDetail;
|
|
127
128
|
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
128
|
-
static createCurveFractionPointDistanceCurveSearchStatus(curve: CurvePrimitive | undefined, fraction: number, point:
|
|
129
|
+
static createCurveFractionPointDistanceCurveSearchStatus(curve: CurvePrimitive | undefined, fraction: number, point: XYAndZ, distance: number, status: CurveSearchStatus, result?: CurveLocationDetail): CurveLocationDetail;
|
|
129
130
|
/** Create with curveSearchStatus affected by allowExtension. */
|
|
130
131
|
static createConditionalMoveSignedDistance(allowExtension: boolean, curve: CurvePrimitive, startFraction: number, endFraction: number, requestedSignedDistance: number, result?: CurveLocationDetail): CurveLocationDetail;
|
|
131
132
|
/** Create with CurvePrimitive pointer and fraction for evaluation. */
|
|
@@ -135,7 +136,7 @@ export declare class CurveLocationDetail {
|
|
|
135
136
|
/** Create with CurvePrimitive pointer and 2 fractions for evaluation. */
|
|
136
137
|
static createCurveEvaluatedFractionFraction(curve: CurvePrimitive, fraction0: number, fraction1: number, result?: CurveLocationDetail): CurveLocationDetail;
|
|
137
138
|
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
138
|
-
static createCurveFractionPointDistance(curve: CurvePrimitive, fraction: number, point:
|
|
139
|
+
static createCurveFractionPointDistance(curve: CurvePrimitive, fraction: number, point: XYAndZ, a: number, result?: CurveLocationDetail): CurveLocationDetail;
|
|
139
140
|
/**
|
|
140
141
|
* Update or create if closer than current contents.
|
|
141
142
|
* @param curve candidate curve
|
|
@@ -144,7 +145,7 @@ export declare class CurveLocationDetail {
|
|
|
144
145
|
* @param a candidate distance
|
|
145
146
|
* @returns true if the given distance is smaller (and hence this detail was updated)
|
|
146
147
|
*/
|
|
147
|
-
updateIfCloserCurveFractionPointDistance(curve: CurvePrimitive, fraction: number, point:
|
|
148
|
+
updateIfCloserCurveFractionPointDistance(curve: CurvePrimitive, fraction: number, point: XYAndZ, a: number): boolean;
|
|
148
149
|
/**
|
|
149
150
|
* Exchange the (fraction,fraction1) and (point, point1) pairs.
|
|
150
151
|
* * (Skip each swap if its "1" value is undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveLocationDetail.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveLocationDetail.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,+DAA+D;IAC/D,QAAQ,IAAI;IACZ,2CAA2C;IAC3C,gBAAgB,IAAI;IACpB,2CAA2C;IAC3C,aAAa,KAAK;IAClB,gDAAgD;IAChD,gBAAgB,KAAK;IACrB,qCAAqC;IACrC,WAAW,KAAK;CACjB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,0CAA0C;IAC1C,KAAK,IAAA;IACL,iCAAiC;IACjC,OAAO,IAAI;IACX,4FAA4F;IAC5F,iBAAiB,IAAI;CACtB;AAaD;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,iCAAiC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;IAC9B,oBAAoB;IACb,GAAG,CAAC,EAAE,KAAK,CAAC;IACnB,+CAA+C;IACxC,QAAQ,EAAE,MAAM,CAA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AAiB,CAAC;QACzF,OAAO,KAAK,CAAC,OAAO,CAClB,CAAC,IAA6B,EAAE,CAAS,EAAE,GAA8B,EAAE,EAAE;YAC3E,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;oBAC7D,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC5D,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;4BAC5D,OAAO,EAAE,CAAC,CAAE,uBAAuB;wBACrC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAE,yBAAyB;QAC3C,CAAC,CACF,CAAC;IACJ,CAAC;IACD;;;;;OAKG;IACI,mBAAmB,CAAC,SAAoB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpG,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IACvC,8BAA8B;IACvB,KAAK,CAAwB;IACpC,+BAA+B;IACxB,KAAK,CAAwB;IACpC;QACE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry, ICloneable } from \"../Geometry\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\n\n/**\n * An enumeration of special conditions being described by a CurveLocationDetail.\n * @public\n */\nexport enum CurveIntervalRole {\n /** This point is an isolated point NOT at a primary vertex. */\n isolated = 0,\n /** This point is an isolated vertex hit */\n isolatedAtVertex = 1,\n /** This is the beginning of an interval */\n intervalStart = 10,\n /** This is an interior point of an interval. */\n intervalInterior = 11,\n /** This is the end of an interval */\n intervalEnd = 12,\n}\n\n/**\n * Return code for CurvePrimitive method `moveSignedDistanceFromFraction`\n * @public\n */\nexport enum CurveSearchStatus {\n /** Unimplemented or zero length curve */\n error,\n /** Complete success of search */\n success = 1,\n /** Search ended prematurely (e.g. at incomplete distance moved) at start or end of curve */\n stoppedAtBoundary = 2,\n}\n\n/**\n * Use to update a cloneable object when source and/or prior result are possibly undefined.\n * * Any undefined source returns undefined.\n * * For defined source, reuse optional result if available.\n * @param source optional source\n * @param result optional result\n */\nfunction optionalUpdate<T extends ICloneable<T>>(source: T | undefined, result: T | undefined): T | undefined {\n return source ? source.clone(result) : undefined;\n}\n\n/**\n * CurveLocationDetail carries point and parameter data about a point evaluated on a curve.\n * * These are returned by a variety of queries.\n * * Particular contents can vary among the queries.\n * @public\n */\nexport class CurveLocationDetail {\n /** The curve being evaluated. */\n public curve?: CurvePrimitive;\n /** Optional ray. */\n public ray?: Ray3d;\n /** The fractional position along the curve. */\n public fraction: number;\n /** Detail condition of the role this point has in some context. */\n public intervalRole?: CurveIntervalRole;\n /** The point on the curve. */\n public point: Point3d;\n /** A vector (e.g. tangent vector) in context. */\n public vectorInCurveLocationDetail?: Vector3d;\n /** A context-specific numeric value (e.g., a distance). */\n public a: number;\n /**\n * Optional CurveLocationDetail with more detail of location. For instance, a detail for fractional position\n * within a CurveChainWithDistanceIndex returns fraction and distance along the chain as its primary data and\n * further detail of the particular curve within the chain in the childDetail.\n */\n public childDetail?: CurveLocationDetail;\n /**\n * A status indicator for certain searches.\n * * e.g., CurvePrimitive.moveSignedDistanceFromFraction.\n */\n public curveSearchStatus?: CurveSearchStatus;\n /** (Optional) second fraction, e.g. end of interval of coincident curves. */\n public fraction1?: number;\n /** (Optional) second point, e.g. end of interval of coincident curves. */\n public point1?: Point3d;\n /** A context-specific temporary point, e.g. for intermediate calculations. */\n public pointQ: Point3d;\n /** Constructor */\n public constructor() {\n this.pointQ = Point3d.createZero();\n this.fraction = 0;\n this.point = Point3d.createZero();\n this.a = 0.0;\n }\n /** Set the (optional) intervalRole field. */\n public setIntervalRole(value: CurveIntervalRole): void {\n this.intervalRole = value;\n }\n /** Set the `fraction` and `point`, using direct assignment (capture!) to `point`. */\n public captureFractionPoint(fraction: number, point: Point3d): void {\n this.fraction = fraction;\n this.point = point;\n }\n /** Set the (optional) `fraction1` and `point1`, using direct assignment (capture!) to `point1`. */\n public captureFraction1Point1(fraction1: number, point1: Point3d): void {\n this.fraction1 = fraction1;\n this.point1 = point1;\n }\n /** Test if this pair has fraction1 defined. */\n public get hasFraction1(): boolean {\n return this.fraction1 !== undefined;\n }\n /** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex). */\n public get isIsolated(): boolean {\n return this.intervalRole === undefined\n || this.intervalRole === CurveIntervalRole.isolated\n || this.intervalRole === CurveIntervalRole.isolatedAtVertex;\n }\n /** Return the fraction delta. (0 if no fraction1). */\n public get fractionDelta(): number {\n return this.fraction1 !== undefined ? this.fraction1 - this.fraction : 0.0;\n }\n /**\n * If (fraction1, point1) are defined, make them the primary (and only) data.\n * * No action if undefined.\n */\n public collapseToEnd() {\n if (this.fraction1 !== undefined)\n this.fraction = this.fraction1;\n if (this.point1)\n this.point = this.point1;\n this.collapseToStart();\n }\n /** Make (fraction, point) the primary (and only) data. */\n public collapseToStart() {\n this.fraction1 = undefined;\n this.point1 = undefined;\n }\n /**\n * Return a complete copy, WITH CAVEATS.\n * * curve member is copied as a reference.\n * * point and vector members are cloned.\n */\n public clone(result?: CurveLocationDetail): CurveLocationDetail {\n if (result === this)\n return result;\n result = result ? result : new CurveLocationDetail();\n result.curve = this.curve;\n result.fraction = this.fraction;\n result.fraction1 = this.fraction1;\n result.point1 = optionalUpdate<Point3d>(this.point1, result.point1);\n result.point.setFromPoint3d(this.point);\n result.vectorInCurveLocationDetail = optionalUpdate<Vector3d>(this.vectorInCurveLocationDetail, result.vectorInCurveLocationDetail);\n result.a = this.a;\n result.childDetail = optionalUpdate<CurveLocationDetail>(this.childDetail, result.childDetail);\n result.curveSearchStatus = this.curveSearchStatus;\n return result;\n }\n /**\n * Updated in this instance.\n * * Note that if caller omits `vector` and `a`, those fields are updated to the call-list defaults (NOT left as-is)\n * * point and vector updates are by data copy (not capture of pointers).\n * @param fraction (required) fraction to install.\n * @param point (required) point to install.\n * @param vector (optional) vector to install.\n * @param a (optional) numeric value to install.\n */\n public setFP(fraction: number, point: Point3d, vector?: Vector3d, a: number = 0.0): void {\n this.fraction = fraction;\n this.point.setFromPoint3d(point);\n this.vectorInCurveLocationDetail = optionalUpdate<Vector3d>(vector, this.vectorInCurveLocationDetail);\n this.a = a;\n }\n /**\n * Updated in this instance.\n * * Note that if caller omits a`, that field is updated to the call-list default (NOT left as-is)\n * * point and vector updates are by data copy (not capture of the ray members).\n * @param fraction (required) fraction to install.\n * @param ray (required) point and vector to install.\n * @param a (optional) numeric value to install.\n */\n public setFR(fraction: number, ray: Ray3d, a: number = 0): void {\n return this.setFP(fraction, ray.origin, ray.direction, a);\n }\n /** Set the CurvePrimitive pointer, leaving all other properties untouched. */\n public setCurve(curve: CurvePrimitive) {\n this.curve = curve;\n }\n /** Record the distance from the CurveLocationDetail's point to the parameter point. */\n public setDistanceTo(point: Point3d) {\n this.a = this.point.distance(point);\n }\n /** Create with a CurvePrimitive pointer but no coordinate data. */\n public static create(curve?: CurvePrimitive, result?: CurveLocationDetail): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n return result;\n }\n /** Create a new detail using CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPoint(\n curve: CurvePrimitive | undefined, fraction: number, point: Point3d, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create a new detail with only ray, fraction, and point. */\n public static createRayFractionPoint(\n ray: Ray3d, fraction: number, point: Point3d, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.fraction = fraction;\n result.ray = ray;\n result.point.setFromPoint3d(point);\n return result;\n }\n /** Create with CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPointDistanceCurveSearchStatus(\n curve: CurvePrimitive | undefined,\n fraction: number,\n point: Point3d,\n distance: number,\n status: CurveSearchStatus,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = distance;\n result.childDetail = undefined;\n result.curveSearchStatus = status;\n return result;\n }\n /** Create with curveSearchStatus affected by allowExtension. */\n public static createConditionalMoveSignedDistance(\n allowExtension: boolean,\n curve: CurvePrimitive,\n startFraction: number,\n endFraction: number,\n requestedSignedDistance: number,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let a = requestedSignedDistance;\n let status = CurveSearchStatus.success;\n if (!allowExtension && !Geometry.isIn01(endFraction)) {\n // cap the movement at the endpoint\n if (endFraction < 0.0) {\n a = - curve.curveLengthBetweenFractions(startFraction, 0.0);\n endFraction = 0.0;\n status = CurveSearchStatus.stoppedAtBoundary;\n } else if (endFraction > 1.0) {\n endFraction = 1.0;\n a = curve.curveLengthBetweenFractions(startFraction, 1.0);\n status = CurveSearchStatus.stoppedAtBoundary;\n }\n }\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = endFraction;\n curve.fractionToPoint(endFraction, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = a;\n result.childDetail = undefined;\n result.curveSearchStatus = status;\n return result;\n }\n /** Create with CurvePrimitive pointer and fraction for evaluation. */\n public static createCurveEvaluatedFraction(\n curve: CurvePrimitive, fraction: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n curve.fractionToPoint(fraction, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer and fraction for evaluation. */\n public static createCurveEvaluatedFractionPointAndDerivative(\n curve: CurvePrimitive, fraction: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n const ray = curve.fractionToPointAndDerivative(fraction);\n result.point.setFromPoint3d(ray.origin);\n result.vectorInCurveLocationDetail = ray.direction;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer and 2 fractions for evaluation. */\n public static createCurveEvaluatedFractionFraction(\n curve: CurvePrimitive, fraction0: number, fraction1: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction0;\n curve.fractionToPoint(fraction0, result.point);\n result.fraction1 = fraction1;\n result.point1 = curve.fractionToPoint(fraction1, result.point1);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPointDistance(\n curve: CurvePrimitive,\n fraction: number,\n point: Point3d,\n a: number,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = a;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /**\n * Update or create if closer than current contents.\n * @param curve candidate curve\n * @param fraction candidate fraction\n * @param point candidate point\n * @param a candidate distance\n * @returns true if the given distance is smaller (and hence this detail was updated)\n */\n public updateIfCloserCurveFractionPointDistance(\n curve: CurvePrimitive, fraction: number, point: Point3d, a: number,\n ): boolean {\n if (this.a < a)\n return false;\n CurveLocationDetail.createCurveFractionPointDistance(curve, fraction, point, a, this);\n return true;\n }\n /**\n * Exchange the (fraction,fraction1) and (point, point1) pairs.\n * * (Skip each swap if its \"1\" value is undefined)\n */\n public swapFractionsAndPoints(): void {\n if (this.fraction1 !== undefined) {\n const f = this.fraction;\n this.fraction = this.fraction1;\n this.fraction1 = f;\n }\n if (this.point1 !== undefined) {\n const p = this.point;\n this.point = this.point1;\n this.point1 = p;\n }\n }\n /**\n * Return the fraction where f falls between fraction and fraction1.\n * * ASSUME fraction1 defined\n */\n public inverseInterpolateFraction(f: number, defaultFraction: number = 0): number {\n const a = Geometry.inverseInterpolate01(this.fraction, this.fraction1!, f);\n if (a === undefined)\n return defaultFraction;\n return a;\n }\n /**\n * Return the detail with smaller `a` value -- detailA returned if equal.\n * @param detailA first candidate\n * @param detailB second candidate\n */\n public static chooseSmallerA(\n detailA: CurveLocationDetail | undefined, detailB: CurveLocationDetail | undefined,\n ): CurveLocationDetail | undefined {\n if (detailA) {\n if (!detailB)\n return detailA;\n return detailA.a <= detailB.a ? detailA : detailB;\n }\n return detailB;\n }\n /** Compare only the curve and fraction of this detail with `other`. */\n public isSameCurveAndFraction(other: CurveLocationDetail | { curve: CurvePrimitive, fraction: number }): boolean {\n return this.curve === other.curve && Geometry.isAlmostEqualNumber(this.fraction, other.fraction);\n }\n /**\n * Transform the detail in place.\n * * All numerical properties are transformed directly, except:\n * * when `curve` is defined, `point` and `point1` are reset by evaluating the transformed curve at `fraction` and `fraction1`\n * * these properties are untouched: `a`, `fraction`, `fraction1`, `pointQ`\n * @param transform the transform to apply\n * @return true if and only if the transformation was successful. If false, the instance is in an indeterminate\n * state and should not be used.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (this.curve && !this.curve.tryTransformInPlace(transform))\n return false;\n if (this.ray)\n this.ray.transformInPlace(transform);\n if (this.curve)\n this.curve.fractionToPoint(this.fraction, this.point);\n else\n transform.multiplyXYAndZInPlace(this.point);\n if (this.vectorInCurveLocationDetail)\n transform.multiplyVectorInPlace(this.vectorInCurveLocationDetail);\n if (this.childDetail && this.childDetail !== this && !this.childDetail.tryTransformInPlace(transform))\n return false;\n if (this.point1) {\n if (this.curve && this.fraction1)\n this.curve.fractionToPoint(this.fraction1, this.point1);\n else\n transform.multiplyXYAndZInPlace(this.point1);\n }\n return true;\n }\n}\n\n/**\n * Enumeration of configurations for intersections and min/max distance-between-curve\n * @public\n */\nexport enum CurveCurveApproachType {\n /** Intersection at a single point */\n Intersection = 0,\n /** Distinct points on the two curves, with each curve's tangent perpendicular to the chord between the points */\n PerpendicularChord = 1,\n /** Completely coincident geometry */\n CoincidentGeometry = 2,\n /** Completely parallel geometry. */\n ParallelGeometry = 3,\n}\n\n/**\n * A pair of CurveLocationDetail.\n * @public\n */\nexport class CurveLocationDetailPair {\n /** The first of the two details. */\n public detailA: CurveLocationDetail;\n /** The second of the two details. */\n public detailB: CurveLocationDetail;\n /**\n * Enumeration of how the detail pairs relate.\n * * This is set only by certain closeApproach calculations.\n */\n public approachType?: CurveCurveApproachType;\n\n public constructor(detailA?: CurveLocationDetail, detailB?: CurveLocationDetail) {\n this.detailA = detailA ? detailA : new CurveLocationDetail();\n this.detailB = detailB ? detailB : new CurveLocationDetail();\n }\n /** Create a curve detail pair using references to two CurveLocationDetails */\n public static createCapture(\n detailA: CurveLocationDetail, detailB: CurveLocationDetail, result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n result.detailA = detailA;\n result.detailB = detailB;\n return result;\n }\n /**\n * Create a curve detail pair using references to two CurveLocationDetails.\n * * optionally install in reversed positions\n */\n public static createCaptureOptionalReverse(\n detailA: CurveLocationDetail, detailB: CurveLocationDetail, reversed: boolean, result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n if (reversed) {\n result.detailA = detailA;\n result.detailB = detailB;\n\n } else {\n result.detailA = detailA;\n result.detailB = detailB;\n }\n return result;\n }\n /** Make a deep copy of this CurveLocationDetailPair */\n public clone(result?: CurveLocationDetailPair): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n result.detailA = this.detailA.clone();\n result.detailB = this.detailB.clone();\n result.approachType = this.approachType;\n return result;\n }\n /** Swap the details of A, B */\n public swapDetails() {\n const q = this.detailA;\n this.detailA = this.detailB;\n this.detailB = q;\n }\n /**\n * Mutate the input array by removing the second of two adjacent duplicate pairs.\n * * Ignores details representing coincident intervals (e.g., for which `fraction1` is defined).\n * * Comparison is performed by [[CurveLocationDetail.isSameCurveAndFraction]].\n * * No sorting is performed.\n * @param pairs array to de-duplicate in place\n * @param index0 look for duplicates in the tail of the array starting at index0\n * @return reference to input array\n * @internal\n */\n public static removeAdjacentDuplicates(pairs: CurveLocationDetailPair[], index0: number = 0): CurveLocationDetailPair[] {\n return pairs.flatMap(\n (pair: CurveLocationDetailPair, i: number, arr: CurveLocationDetailPair[]) => {\n if (i >= index0 && i > 0) {\n if (!pair.detailA.hasFraction1 && !pair.detailB.hasFraction1) {\n if (pair.detailA.isSameCurveAndFraction(arr[i - 1].detailA)) {\n if (pair.detailB.isSameCurveAndFraction(arr[i - 1].detailB)) {\n return []; // remove the i_th pair\n }\n }\n }\n }\n return [pair]; // preserve the i_th pair\n },\n );\n }\n /**\n * Transform the details in place.\n * @param transform the transform to apply\n * @return true if and only if the transformation was successful on both details.\n * If false, the instance is in an indeterminate state and should not be used.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n return this.detailA.tryTransformInPlace(transform) && this.detailB.tryTransformInPlace(transform);\n }\n}\n\n/**\n * Data bundle for a pair of arrays of CurveLocationDetail structures.\n * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.\n * @public\n */\nexport class CurveLocationDetailArrayPair {\n /** First array of details. */\n public dataA: CurveLocationDetail[];\n /** Second array of details. */\n public dataB: CurveLocationDetail[];\n public constructor() {\n this.dataA = [];\n this.dataB = [];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CurveLocationDetail.js","sourceRoot":"","sources":["../../../src/curve/CurveLocationDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAc,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,EAAY,MAAM,+BAA+B,CAAC;AAMlE;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAWX;AAXD,WAAY,iBAAiB;IAC3B,+DAA+D;IAC/D,iEAAY,CAAA;IACZ,2CAA2C;IAC3C,iFAAoB,CAAA;IACpB,2CAA2C;IAC3C,4EAAkB,CAAA;IAClB,gDAAgD;IAChD,kFAAqB,CAAA;IACrB,qCAAqC;IACrC,wEAAgB,CAAA;AAClB,CAAC,EAXW,iBAAiB,KAAjB,iBAAiB,QAW5B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,0CAA0C;IAC1C,2DAAK,CAAA;IACL,iCAAiC;IACjC,+DAAW,CAAA;IACX,4FAA4F;IAC5F,mFAAqB,CAAA;AACvB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;;;;;GAMG;AACH,SAAS,cAAc,CAA0B,MAA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AAM,CAAC,wBAAwB,CAAC,KAAgC,EAAE,SAAiB,CAAC;QACzF,OAAO,KAAK,CAAC,OAAO,CAClB,CAAC,IAA6B,EAAE,CAAS,EAAE,GAA8B,EAAE,EAAE;YAC3E,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;oBAC7D,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC5D,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;4BAC5D,OAAO,EAAE,CAAC,CAAE,uBAAuB;wBACrC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAE,yBAAyB;QAC3C,CAAC,CACF,CAAC;IACJ,CAAC;IACD;;;;;OAKG;IACI,mBAAmB,CAAC,SAAoB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpG,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IACvC,8BAA8B;IACvB,KAAK,CAAwB;IACpC,+BAA+B;IACxB,KAAK,CAAwB;IACpC;QACE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry, ICloneable } from \"../Geometry\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { XYAndZ } from \"../geometry3d/XYZProps\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\n\n/**\n * An enumeration of special conditions being described by a CurveLocationDetail.\n * @public\n */\nexport enum CurveIntervalRole {\n /** This point is an isolated point NOT at a primary vertex. */\n isolated = 0,\n /** This point is an isolated vertex hit */\n isolatedAtVertex = 1,\n /** This is the beginning of an interval */\n intervalStart = 10,\n /** This is an interior point of an interval. */\n intervalInterior = 11,\n /** This is the end of an interval */\n intervalEnd = 12,\n}\n\n/**\n * Return code for CurvePrimitive method `moveSignedDistanceFromFraction`\n * @public\n */\nexport enum CurveSearchStatus {\n /** Unimplemented or zero length curve */\n error,\n /** Complete success of search */\n success = 1,\n /** Search ended prematurely (e.g. at incomplete distance moved) at start or end of curve */\n stoppedAtBoundary = 2,\n}\n\n/**\n * Use to update a cloneable object when source and/or prior result are possibly undefined.\n * * Any undefined source returns undefined.\n * * For defined source, reuse optional result if available.\n * @param source optional source\n * @param result optional result\n */\nfunction optionalUpdate<T extends ICloneable<T>>(source: T | undefined, result: T | undefined): T | undefined {\n return source ? source.clone(result) : undefined;\n}\n\n/**\n * CurveLocationDetail carries point and parameter data about a point evaluated on a curve.\n * * These are returned by a variety of queries.\n * * Particular contents can vary among the queries.\n * @public\n */\nexport class CurveLocationDetail {\n /** The curve being evaluated. */\n public curve?: CurvePrimitive;\n /** Optional ray. */\n public ray?: Ray3d;\n /** The fractional position along the curve. */\n public fraction: number;\n /** Detail condition of the role this point has in some context. */\n public intervalRole?: CurveIntervalRole;\n /** The point on the curve. */\n public point: Point3d;\n /** A vector (e.g. tangent vector) in context. */\n public vectorInCurveLocationDetail?: Vector3d;\n /** A context-specific numeric value (e.g., a distance). */\n public a: number;\n /**\n * Optional CurveLocationDetail with more detail of location. For instance, a detail for fractional position\n * within a CurveChainWithDistanceIndex returns fraction and distance along the chain as its primary data and\n * further detail of the particular curve within the chain in the childDetail.\n */\n public childDetail?: CurveLocationDetail;\n /**\n * A status indicator for certain searches.\n * * e.g., CurvePrimitive.moveSignedDistanceFromFraction.\n */\n public curveSearchStatus?: CurveSearchStatus;\n /** (Optional) second fraction, e.g. end of interval of coincident curves. */\n public fraction1?: number;\n /** (Optional) second point, e.g. end of interval of coincident curves. */\n public point1?: Point3d;\n /** A context-specific temporary point, e.g. for intermediate calculations. */\n public pointQ: Point3d;\n /** Constructor */\n public constructor() {\n this.pointQ = Point3d.createZero();\n this.fraction = 0;\n this.point = Point3d.createZero();\n this.a = 0.0;\n }\n /** Set the (optional) intervalRole field. */\n public setIntervalRole(value: CurveIntervalRole): void {\n this.intervalRole = value;\n }\n /** Set the `fraction` and `point`, using direct assignment (capture!) to `point`. */\n public captureFractionPoint(fraction: number, point: Point3d): void {\n this.fraction = fraction;\n this.point = point;\n }\n /** Set the (optional) `fraction1` and `point1`, using direct assignment (capture!) to `point1`. */\n public captureFraction1Point1(fraction1: number, point1: Point3d): void {\n this.fraction1 = fraction1;\n this.point1 = point1;\n }\n /** Test if this pair has fraction1 defined. */\n public get hasFraction1(): boolean {\n return this.fraction1 !== undefined;\n }\n /** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex). */\n public get isIsolated(): boolean {\n return this.intervalRole === undefined\n || this.intervalRole === CurveIntervalRole.isolated\n || this.intervalRole === CurveIntervalRole.isolatedAtVertex;\n }\n /** Return the fraction delta. (0 if no fraction1). */\n public get fractionDelta(): number {\n return this.fraction1 !== undefined ? this.fraction1 - this.fraction : 0.0;\n }\n /**\n * If (fraction1, point1) are defined, make them the primary (and only) data.\n * * No action if undefined.\n */\n public collapseToEnd() {\n if (this.fraction1 !== undefined)\n this.fraction = this.fraction1;\n if (this.point1)\n this.point = this.point1;\n this.collapseToStart();\n }\n /** Make (fraction, point) the primary (and only) data. */\n public collapseToStart() {\n this.fraction1 = undefined;\n this.point1 = undefined;\n }\n /**\n * Return a complete copy, WITH CAVEATS.\n * * curve member is copied as a reference.\n * * point and vector members are cloned.\n */\n public clone(result?: CurveLocationDetail): CurveLocationDetail {\n if (result === this)\n return result;\n result = result ? result : new CurveLocationDetail();\n result.curve = this.curve;\n result.fraction = this.fraction;\n result.fraction1 = this.fraction1;\n result.point1 = optionalUpdate<Point3d>(this.point1, result.point1);\n result.point.setFromPoint3d(this.point);\n result.vectorInCurveLocationDetail = optionalUpdate<Vector3d>(this.vectorInCurveLocationDetail, result.vectorInCurveLocationDetail);\n result.a = this.a;\n result.childDetail = optionalUpdate<CurveLocationDetail>(this.childDetail, result.childDetail);\n result.curveSearchStatus = this.curveSearchStatus;\n return result;\n }\n /**\n * Updated in this instance.\n * * Note that if caller omits `vector` and `a`, those fields are updated to the call-list defaults (NOT left as-is)\n * * point and vector updates are by data copy (not capture of pointers).\n * @param fraction (required) fraction to install.\n * @param point (required) point to install.\n * @param vector (optional) vector to install.\n * @param a (optional) numeric value to install.\n */\n public setFP(fraction: number, point: XYAndZ, vector?: Vector3d, a: number = 0.0): void {\n this.fraction = fraction;\n this.point.setFromPoint3d(point);\n this.vectorInCurveLocationDetail = optionalUpdate<Vector3d>(vector, this.vectorInCurveLocationDetail);\n this.a = a;\n }\n /**\n * Updated in this instance.\n * * Note that if caller omits a`, that field is updated to the call-list default (NOT left as-is)\n * * point and vector updates are by data copy (not capture of the ray members).\n * @param fraction (required) fraction to install.\n * @param ray (required) point and vector to install.\n * @param a (optional) numeric value to install.\n */\n public setFR(fraction: number, ray: Ray3d, a: number = 0): void {\n return this.setFP(fraction, ray.origin, ray.direction, a);\n }\n /** Set the CurvePrimitive pointer, leaving all other properties untouched. */\n public setCurve(curve: CurvePrimitive) {\n this.curve = curve;\n }\n /** Record the distance from the CurveLocationDetail's point to the parameter point. */\n public setDistanceTo(point: XYAndZ) {\n this.a = this.point.distance(point);\n }\n /** Create with a CurvePrimitive pointer but no coordinate data. */\n public static create(curve?: CurvePrimitive, result?: CurveLocationDetail): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n return result;\n }\n /** Create a new detail using CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPoint(\n curve: CurvePrimitive | undefined, fraction: number, point: XYAndZ, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create a new detail with only ray, fraction, and point. */\n public static createRayFractionPoint(\n ray: Ray3d, fraction: number, point: XYAndZ, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.fraction = fraction;\n result.ray = ray;\n result.point.setFromPoint3d(point);\n return result;\n }\n /** Create with CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPointDistanceCurveSearchStatus(\n curve: CurvePrimitive | undefined,\n fraction: number,\n point: XYAndZ,\n distance: number,\n status: CurveSearchStatus,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = distance;\n result.childDetail = undefined;\n result.curveSearchStatus = status;\n return result;\n }\n /** Create with curveSearchStatus affected by allowExtension. */\n public static createConditionalMoveSignedDistance(\n allowExtension: boolean,\n curve: CurvePrimitive,\n startFraction: number,\n endFraction: number,\n requestedSignedDistance: number,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let a = requestedSignedDistance;\n let status = CurveSearchStatus.success;\n if (!allowExtension && !Geometry.isIn01(endFraction)) {\n // cap the movement at the endpoint\n if (endFraction < 0.0) {\n a = - curve.curveLengthBetweenFractions(startFraction, 0.0);\n endFraction = 0.0;\n status = CurveSearchStatus.stoppedAtBoundary;\n } else if (endFraction > 1.0) {\n endFraction = 1.0;\n a = curve.curveLengthBetweenFractions(startFraction, 1.0);\n status = CurveSearchStatus.stoppedAtBoundary;\n }\n }\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = endFraction;\n curve.fractionToPoint(endFraction, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = a;\n result.childDetail = undefined;\n result.curveSearchStatus = status;\n return result;\n }\n /** Create with CurvePrimitive pointer and fraction for evaluation. */\n public static createCurveEvaluatedFraction(\n curve: CurvePrimitive, fraction: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n curve.fractionToPoint(fraction, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer and fraction for evaluation. */\n public static createCurveEvaluatedFractionPointAndDerivative(\n curve: CurvePrimitive, fraction: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n const ray = curve.fractionToPointAndDerivative(fraction);\n result.point.setFromPoint3d(ray.origin);\n result.vectorInCurveLocationDetail = ray.direction;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer and 2 fractions for evaluation. */\n public static createCurveEvaluatedFractionFraction(\n curve: CurvePrimitive, fraction0: number, fraction1: number, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction0;\n curve.fractionToPoint(fraction0, result.point);\n result.fraction1 = fraction1;\n result.point1 = curve.fractionToPoint(fraction1, result.point1);\n result.vectorInCurveLocationDetail = undefined;\n result.a = 0.0;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /** Create with CurvePrimitive pointer, fraction, and point coordinates. */\n public static createCurveFractionPointDistance(\n curve: CurvePrimitive,\n fraction: number,\n point: XYAndZ,\n a: number,\n result?: CurveLocationDetail,\n ): CurveLocationDetail {\n result = result ? result : new CurveLocationDetail();\n result.curve = curve;\n result.fraction = fraction;\n result.point.setFromPoint3d(point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = a;\n result.childDetail = undefined;\n result.curveSearchStatus = undefined;\n return result;\n }\n /**\n * Update or create if closer than current contents.\n * @param curve candidate curve\n * @param fraction candidate fraction\n * @param point candidate point\n * @param a candidate distance\n * @returns true if the given distance is smaller (and hence this detail was updated)\n */\n public updateIfCloserCurveFractionPointDistance(\n curve: CurvePrimitive, fraction: number, point: XYAndZ, a: number,\n ): boolean {\n if (this.a < a)\n return false;\n CurveLocationDetail.createCurveFractionPointDistance(curve, fraction, point, a, this);\n return true;\n }\n /**\n * Exchange the (fraction,fraction1) and (point, point1) pairs.\n * * (Skip each swap if its \"1\" value is undefined)\n */\n public swapFractionsAndPoints(): void {\n if (this.fraction1 !== undefined) {\n const f = this.fraction;\n this.fraction = this.fraction1;\n this.fraction1 = f;\n }\n if (this.point1 !== undefined) {\n const p = this.point;\n this.point = this.point1;\n this.point1 = p;\n }\n }\n /**\n * Return the fraction where f falls between fraction and fraction1.\n * * ASSUME fraction1 defined\n */\n public inverseInterpolateFraction(f: number, defaultFraction: number = 0): number {\n const a = Geometry.inverseInterpolate01(this.fraction, this.fraction1!, f);\n if (a === undefined)\n return defaultFraction;\n return a;\n }\n /**\n * Return the detail with smaller `a` value -- detailA returned if equal.\n * @param detailA first candidate\n * @param detailB second candidate\n */\n public static chooseSmallerA(\n detailA: CurveLocationDetail | undefined, detailB: CurveLocationDetail | undefined,\n ): CurveLocationDetail | undefined {\n if (detailA) {\n if (!detailB)\n return detailA;\n return detailA.a <= detailB.a ? detailA : detailB;\n }\n return detailB;\n }\n /** Compare only the curve and fraction of this detail with `other`. */\n public isSameCurveAndFraction(other: CurveLocationDetail | { curve: CurvePrimitive, fraction: number }): boolean {\n return this.curve === other.curve && Geometry.isAlmostEqualNumber(this.fraction, other.fraction);\n }\n /**\n * Transform the detail in place.\n * * All numerical properties are transformed directly, except:\n * * when `curve` is defined, `point` and `point1` are reset by evaluating the transformed curve at `fraction` and `fraction1`\n * * these properties are untouched: `a`, `fraction`, `fraction1`, `pointQ`\n * @param transform the transform to apply\n * @return true if and only if the transformation was successful. If false, the instance is in an indeterminate\n * state and should not be used.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (this.curve && !this.curve.tryTransformInPlace(transform))\n return false;\n if (this.ray)\n this.ray.transformInPlace(transform);\n if (this.curve)\n this.curve.fractionToPoint(this.fraction, this.point);\n else\n transform.multiplyXYAndZInPlace(this.point);\n if (this.vectorInCurveLocationDetail)\n transform.multiplyVectorInPlace(this.vectorInCurveLocationDetail);\n if (this.childDetail && this.childDetail !== this && !this.childDetail.tryTransformInPlace(transform))\n return false;\n if (this.point1) {\n if (this.curve && this.fraction1)\n this.curve.fractionToPoint(this.fraction1, this.point1);\n else\n transform.multiplyXYAndZInPlace(this.point1);\n }\n return true;\n }\n}\n\n/**\n * Enumeration of configurations for intersections and min/max distance-between-curve\n * @public\n */\nexport enum CurveCurveApproachType {\n /** Intersection at a single point */\n Intersection = 0,\n /** Distinct points on the two curves, with each curve's tangent perpendicular to the chord between the points */\n PerpendicularChord = 1,\n /** Completely coincident geometry */\n CoincidentGeometry = 2,\n /** Completely parallel geometry. */\n ParallelGeometry = 3,\n}\n\n/**\n * A pair of CurveLocationDetail.\n * @public\n */\nexport class CurveLocationDetailPair {\n /** The first of the two details. */\n public detailA: CurveLocationDetail;\n /** The second of the two details. */\n public detailB: CurveLocationDetail;\n /**\n * Enumeration of how the detail pairs relate.\n * * This is set only by certain closeApproach calculations.\n */\n public approachType?: CurveCurveApproachType;\n\n public constructor(detailA?: CurveLocationDetail, detailB?: CurveLocationDetail) {\n this.detailA = detailA ? detailA : new CurveLocationDetail();\n this.detailB = detailB ? detailB : new CurveLocationDetail();\n }\n /** Create a curve detail pair using references to two CurveLocationDetails */\n public static createCapture(\n detailA: CurveLocationDetail, detailB: CurveLocationDetail, result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n result.detailA = detailA;\n result.detailB = detailB;\n return result;\n }\n /**\n * Create a curve detail pair using references to two CurveLocationDetails.\n * * optionally install in reversed positions\n */\n public static createCaptureOptionalReverse(\n detailA: CurveLocationDetail, detailB: CurveLocationDetail, reversed: boolean, result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n if (reversed) {\n result.detailA = detailA;\n result.detailB = detailB;\n\n } else {\n result.detailA = detailA;\n result.detailB = detailB;\n }\n return result;\n }\n /** Make a deep copy of this CurveLocationDetailPair */\n public clone(result?: CurveLocationDetailPair): CurveLocationDetailPair {\n result = result ? result : new CurveLocationDetailPair();\n result.detailA = this.detailA.clone();\n result.detailB = this.detailB.clone();\n result.approachType = this.approachType;\n return result;\n }\n /** Swap the details of A, B */\n public swapDetails() {\n const q = this.detailA;\n this.detailA = this.detailB;\n this.detailB = q;\n }\n /**\n * Mutate the input array by removing the second of two adjacent duplicate pairs.\n * * Ignores details representing coincident intervals (e.g., for which `fraction1` is defined).\n * * Comparison is performed by [[CurveLocationDetail.isSameCurveAndFraction]].\n * * No sorting is performed.\n * @param pairs array to de-duplicate in place\n * @param index0 look for duplicates in the tail of the array starting at index0\n * @return reference to input array\n * @internal\n */\n public static removeAdjacentDuplicates(pairs: CurveLocationDetailPair[], index0: number = 0): CurveLocationDetailPair[] {\n return pairs.flatMap(\n (pair: CurveLocationDetailPair, i: number, arr: CurveLocationDetailPair[]) => {\n if (i >= index0 && i > 0) {\n if (!pair.detailA.hasFraction1 && !pair.detailB.hasFraction1) {\n if (pair.detailA.isSameCurveAndFraction(arr[i - 1].detailA)) {\n if (pair.detailB.isSameCurveAndFraction(arr[i - 1].detailB)) {\n return []; // remove the i_th pair\n }\n }\n }\n }\n return [pair]; // preserve the i_th pair\n },\n );\n }\n /**\n * Transform the details in place.\n * @param transform the transform to apply\n * @return true if and only if the transformation was successful on both details.\n * If false, the instance is in an indeterminate state and should not be used.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n return this.detailA.tryTransformInPlace(transform) && this.detailB.tryTransformInPlace(transform);\n }\n}\n\n/**\n * Data bundle for a pair of arrays of CurveLocationDetail structures.\n * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.\n * @public\n */\nexport class CurveLocationDetailArrayPair {\n /** First array of details. */\n public dataA: CurveLocationDetail[];\n /** Second array of details. */\n public dataB: CurveLocationDetail[];\n public constructor() {\n this.dataA = [];\n this.dataB = [];\n }\n}\n"]}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { MultiLineStringDataVariant } from "../geometry3d/IndexedXYZCollection";
|
|
1
2
|
import { Range3d } from "../geometry3d/Range";
|
|
3
|
+
import { Ray3d } from "../geometry3d/Ray3d";
|
|
4
|
+
import { Transform } from "../geometry3d/Transform";
|
|
2
5
|
import { CurveCollection } from "./CurveCollection";
|
|
3
6
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
4
7
|
import { AnyChain, AnyCurve } from "./CurveTypes";
|
|
@@ -7,6 +10,22 @@ import { Loop } from "./Loop";
|
|
|
7
10
|
import { OffsetOptions } from "./OffsetOptions";
|
|
8
11
|
import { Path } from "./Path";
|
|
9
12
|
import { StrokeOptions } from "./StrokeOptions";
|
|
13
|
+
/**
|
|
14
|
+
* Options bundle for use in [[CurveOps.isPlanar]] and [[CurveOps.isColinear]].
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface PlanarColinearOptions {
|
|
18
|
+
/** Maximum allowable distance that geometry can deviate from planarity/colinearity. Default is [[Geometry.smallMetricDistance]]. */
|
|
19
|
+
maxDeviation?: number;
|
|
20
|
+
/** Whether colinearity test ignores z-coordinates. Default is `false`. */
|
|
21
|
+
xyColinear?: boolean;
|
|
22
|
+
/** Radian tolerance for xy-colinearity, measuring maximum angular deviation from a vertical plane. Default is [[Geometry.smallAngleRadians]]. */
|
|
23
|
+
radianTolerance?: number;
|
|
24
|
+
/** Pre-allocated object to populate with the computed plane-to-world transformation and return when planarity test succeeds. */
|
|
25
|
+
localToWorld?: Transform;
|
|
26
|
+
/** Pre-allocated object to populate with the computed line and return when colinear test succeeds. */
|
|
27
|
+
colinearRay?: Ray3d;
|
|
28
|
+
}
|
|
10
29
|
/**
|
|
11
30
|
* Static methods for miscellaneous curve operations.
|
|
12
31
|
* @public
|
|
@@ -15,7 +34,7 @@ export declare class CurveOps {
|
|
|
15
34
|
/** Recursively sum curve lengths, allowing CurvePrimitive, CurveCollection, or array of such at any level. */
|
|
16
35
|
static sumLengths(curves: AnyCurve | AnyCurve[]): number;
|
|
17
36
|
/** Recursively extend the range by each curve's range, allowing CurvePrimitive, CurveCollection, or array of such at any level. */
|
|
18
|
-
static extendRange(range: Range3d, curves: AnyCurve | AnyCurve[]): Range3d;
|
|
37
|
+
static extendRange(range: Range3d, curves: AnyCurve | AnyCurve[], transform?: Transform): Range3d;
|
|
19
38
|
/**
|
|
20
39
|
* Construct a separate xy-offset for each input curve.
|
|
21
40
|
* * For best offset results, the inputs should be parallel to the xy-plane.
|
|
@@ -72,5 +91,36 @@ export declare class CurveOps {
|
|
|
72
91
|
* @param _planeTolerance unused, pass undefined
|
|
73
92
|
*/
|
|
74
93
|
static collectChainsAsLineString3d(fragments: AnyCurve[], announceChain: (chainPoints: LineString3d) => void, strokeOptions?: StrokeOptions, gapTolerance?: number, _planeTolerance?: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* Compute the range of the curves in the local coordinates of a constructed localToWorld frame.
|
|
96
|
+
* @param curves input geometry: curves or points.
|
|
97
|
+
* @param localRange pre-allocated object to populate with the computed local range.
|
|
98
|
+
* @param localToWorld optional pre-allocated object to populate with the computed frame.
|
|
99
|
+
* @returns whether the frame was successfully computed.
|
|
100
|
+
*/
|
|
101
|
+
static computeLocalRange(curves: AnyCurve | MultiLineStringDataVariant, localRange: Range3d, localToWorld?: Transform): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Check whether or not the curves are planar, and if so, return a localToWorld frame.
|
|
104
|
+
* @param curves input geometry: curves or points.
|
|
105
|
+
* @param tolerance optional maximum allowable planar deviation, default [[Geometry.smallMetricDistance]].
|
|
106
|
+
* @param result optional pre-allocated object to populate and return.
|
|
107
|
+
* @returns localToWorld frame `T` for coplanar curves, or undefined if they are not coplanar.
|
|
108
|
+
* `T` satisfies:
|
|
109
|
+
* * `T.origin` is in the plane.
|
|
110
|
+
* * `T.matrix.columnZ()` is the plane unit normal (or its negative).
|
|
111
|
+
* * `T.matrix.isRigid()` returns true.
|
|
112
|
+
* * `T.inverse()` is worldToLocal; apply to input geometry to rotate it into the xy-plane.
|
|
113
|
+
*/
|
|
114
|
+
static isPlanar(curves: AnyCurve | MultiLineStringDataVariant, options?: PlanarColinearOptions): Transform | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Check whether or not the curves lie in a straight line, and if so, return a colinear ray.
|
|
117
|
+
* * This test does not take curve traversal or point order into account.
|
|
118
|
+
* @param curves input geometry: curves or points.
|
|
119
|
+
* @param xyOnly whether to ignore z-coordinates of input geometry.
|
|
120
|
+
* @param tolerance optional maximum allowable linear deviation, default [[Geometry.smallMetricDistance]].
|
|
121
|
+
* @param result optional pre-allocated object to populate and return.
|
|
122
|
+
* @returns ray colinear with input, or undefined if input is not colinear.
|
|
123
|
+
*/
|
|
124
|
+
static isColinear(curves: AnyCurve | MultiLineStringDataVariant, options?: PlanarColinearOptions): Ray3d | undefined;
|
|
75
125
|
}
|
|
76
126
|
//# sourceMappingURL=CurveOps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveOps.d.ts","sourceRoot":"","s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