@itwin/core-geometry 5.1.0-dev.9 → 5.2.0-dev.2
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 +63 -1
- package/lib/cjs/Geometry.d.ts +18 -10
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +13 -3
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +7 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +4 -5
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +9 -5
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +5 -3
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +2 -0
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +2 -0
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +54 -32
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +56 -37
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +40 -1
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +90 -0
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +3 -2
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +6 -5
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +30 -25
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +9 -2
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +11 -0
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.d.ts +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +2 -0
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +4 -0
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +7 -0
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +15 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +129 -33
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js +20 -9
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js +26 -41
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +74 -39
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +146 -46
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +161 -55
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +32 -18
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +6 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +0 -2
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +4 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +66 -26
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +38 -2
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +5 -4
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +18 -10
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +32 -10
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js +0 -1
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +7 -9
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +23 -45
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js +49 -35
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/cjs/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js +48 -43
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +21 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +32 -13
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +27 -16
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +11 -0
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +77 -36
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/cjs/numerics/SmallSystem.js +129 -73
- package/lib/cjs/numerics/SmallSystem.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
- package/lib/cjs/polyface/FacetOrientation.js +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +19 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +18 -2
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +6 -6
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +39 -42
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +2 -3
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js +2 -4
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +3 -3
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +5 -5
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +7 -0
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +6 -0
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +11 -7
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
- package/lib/cjs/solid/RotationalSweep.js +2 -2
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +5 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +6 -3
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +1 -1
- package/lib/cjs/solid/SweepContour.js +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +4 -0
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.d.ts +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +64 -14
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +149 -32
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +0 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +49 -46
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +2 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +9 -14
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +29 -22
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +18 -10
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +13 -3
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/esm/bspline/BSpline1dNd.js +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +7 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +4 -5
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +7 -5
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +9 -5
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +5 -3
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +2 -0
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +2 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +54 -32
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +56 -37
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +40 -1
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +90 -0
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +3 -2
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +6 -5
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +30 -25
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +9 -2
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +11 -0
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveTypes.d.ts +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +2 -0
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +4 -0
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +7 -0
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +15 -3
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +131 -35
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/esm/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js +20 -9
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js +26 -41
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +74 -39
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +146 -46
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +161 -56
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +32 -18
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +6 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +0 -2
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +4 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +66 -26
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +38 -2
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +5 -4
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +18 -10
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +32 -10
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js +0 -1
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +7 -9
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +23 -45
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js +47 -33
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/esm/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js +48 -43
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +21 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +32 -13
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts +8 -5
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +27 -16
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +11 -0
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +77 -36
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/esm/numerics/SmallSystem.js +129 -73
- package/lib/esm/numerics/SmallSystem.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
- package/lib/esm/polyface/FacetOrientation.js +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +19 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +18 -2
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +6 -6
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +39 -42
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceData.js +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +316 -232
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +2 -3
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js +2 -4
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +3 -3
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +5 -5
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +7 -0
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +6 -0
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +11 -7
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -2
- package/lib/esm/solid/RotationalSweep.js +2 -2
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +1 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +5 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +6 -3
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +1 -1
- package/lib/esm/solid/SweepContour.js +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +4 -0
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.d.ts +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +64 -14
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +149 -32
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +0 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +49 -46
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +2 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +9 -14
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +29 -22
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
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;AAKlE;;;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,MAAqB,EAAE,MAAqB;IAC3F,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IAC9B,gCAAgC;IACzB,KAAK,CAAkB;IAC9B,mBAAmB;IACZ,GAAG,CAAS;IACnB,8CAA8C;IACvC,QAAQ,CAAS;IACxB,kEAAkE;IAC3D,YAAY,CAAqB;IACxC,6BAA6B;IACtB,KAAK,CAAU;IACtB,gDAAgD;IACzC,2BAA2B,CAAY;IAC9C,0DAA0D;IACnD,CAAC,CAAS;IACjB;;;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E,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 (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.x. 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;AAK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yB;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"]}
|
|
@@ -73,8 +73,8 @@ export type AnnounceCurvePrimitive = (cp: CurvePrimitive) => void;
|
|
|
73
73
|
*/
|
|
74
74
|
export interface TangentOptions {
|
|
75
75
|
/**
|
|
76
|
-
* The tangent returned by [[CurvePrimitive.closestTangent]] is nearest this point as seen in the view plane.
|
|
77
|
-
* * Default value is `P`.
|
|
76
|
+
* The tangent point returned by [[CurvePrimitive.closestTangent]] is nearest to this point as seen in the view plane.
|
|
77
|
+
* * Default value is the fixed point `P`.
|
|
78
78
|
*/
|
|
79
79
|
hintPoint?: Point3d;
|
|
80
80
|
/**
|
|
@@ -430,6 +430,13 @@ export declare abstract class CurvePrimitive extends GeometryQuery {
|
|
|
430
430
|
startPoint(result?: Point3d): Point3d;
|
|
431
431
|
/** Return the end point of the primitive. The default implementation returns fractionToPoint(1.0) */
|
|
432
432
|
endPoint(result?: Point3d): Point3d;
|
|
433
|
+
/**
|
|
434
|
+
* Whether the start and end points are defined and within tolerance.
|
|
435
|
+
* * Does not check for planarity or degeneracy.
|
|
436
|
+
* @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])
|
|
437
|
+
* @param xyOnly if true, ignore z coordinate (default is `false`)
|
|
438
|
+
*/
|
|
439
|
+
isPhysicallyClosedCurve(tolerance?: number, xyOnly?: boolean): boolean;
|
|
433
440
|
/** Append stroke points to caller-supplied linestring. */
|
|
434
441
|
abstract emitStrokes(dest: LineString3d, options?: StrokeOptions): void;
|
|
435
442
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurvePrimitive.d.ts","sourceRoot":"","sources":["../../../src/curve/CurvePrimitive.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAqB,mBAAmB,EAAqB,MAAM,u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AAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IACvF;;;;;OAKG;aACa,4BAA4B,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IAC7E;;;;;;;;;;;;OAYG;IACI,qCAAqC,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,cAAc;IAQhG;;;;;;;;;;;OAWG;IACI,8BAA8B,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,GAAG,MAAM;IAU5F;;;;;OAKG;WACW,qBAAqB,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,cAAc;IAK/G;;;;;;;;OAQG;IACI,wBAAwB,CAC7B,cAAc,EAAE,cAAc,EAAE,EAAE,2BAA2B,EAAE,OAAO,EAAE,mBAAmB,GAAE,OAAe,GAC3G,IAAI;IAGP;;;;;;;OAOG;IACI,sBAAsB,CAC3B,cAAc,CAAC,EAAE,cAAc,EAAE,EAAE,0BAA0B,GAAE,OAAe,EAAE,kBAAkB,GAAE,OAAe,GAClH,cAAc,EAAE;IAKnB;;;;;;OAMG;aACa,iBAAiB,CAC/B,uBAAuB,EAAE,MAAM,GAAG,aAAa,GAC9C,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;IAEhD;;;;;;;OAOG;IACI,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;CAGhG"}
|
|
@@ -600,6 +600,17 @@ export class CurvePrimitive extends GeometryQuery {
|
|
|
600
600
|
endPoint(result) {
|
|
601
601
|
return this.fractionToPoint(1.0, result);
|
|
602
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Whether the start and end points are defined and within tolerance.
|
|
605
|
+
* * Does not check for planarity or degeneracy.
|
|
606
|
+
* @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])
|
|
607
|
+
* @param xyOnly if true, ignore z coordinate (default is `false`)
|
|
608
|
+
*/
|
|
609
|
+
isPhysicallyClosedCurve(tolerance = Geometry.smallMetricDistance, xyOnly = false) {
|
|
610
|
+
const p0 = this.startPoint();
|
|
611
|
+
const p1 = this.endPoint();
|
|
612
|
+
return p0 !== undefined && p1 !== undefined && (xyOnly ? p0.isAlmostEqualXY(p1, tolerance) : p0.isAlmostEqual(p1, tolerance));
|
|
613
|
+
}
|
|
603
614
|
/**
|
|
604
615
|
* Attach StrokeCountMap structure to this primitive (and recursively to any children)
|
|
605
616
|
* * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and attaches it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurvePrimitive.js","sourceRoot":"","sources":["../../../src/curve/CurvePrimitive.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAA+B,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAiB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAgB,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD;;;;;;;OAOG;IACI,sBAAsB,CAC3B,cAAiC,EAAE,6BAAsC,KAAK,EAAE,qBAA8B,KAAK;QAEnH,MAAM,OAAO,GAAqB,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;QACrF,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;QACvF,OAAO,OAAO,CAAC;IACjB,CAAC;IAYD;;;;;;;OAOG;IACI,uBAAuB,CAAC,IAAsB,EAAE,QAAkB;QACvE,OAAO,SAAS,CAAC,CAAC,6EAA6E;IACjG,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 { assert } from \"@itwin/core-bentley\";\nimport { StrokeCountMap } from \"../curve/Query/StrokeCountMap\";\nimport { AxisOrder, Geometry, type PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Point3d, type Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { type Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { CurveIntervalRole, CurveLocationDetail, CurveSearchStatus } from \"./CurveLocationDetail\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { AppendPlaneIntersectionStrokeHandler } from \"./internalContexts/AppendPlaneIntersectionStrokeHandler\";\nimport { ClosestPointStrokeHandler } from \"./internalContexts/ClosestPointStrokeHandler\";\nimport { AnnounceTangentStrokeHandler } from \"./internalContexts/AnnounceTangentStrokeHandler\";\nimport { CurveLengthContext } from \"./internalContexts/CurveLengthContext\";\nimport { LineString3d } from \"./LineString3d\";\n\nimport type { AkimaCurve3d } from \"../bspline/AkimaCurve3d\";\nimport type { Arc3d } from \"./Arc3d\";\nimport type { BezierCurve3d } from \"../bspline/BezierCurve3d\";\nimport type { BSplineCurve3d } from \"../bspline/BSplineCurve\";\nimport type { Clipper } from \"../clipping/ClipUtils\";\nimport type { CurveChainWithDistanceIndex } from \"./CurveChainWithDistanceIndex\";\nimport type { DirectSpiral3d } from \"./spiral/DirectSpiral3d\";\nimport type { IntegratedSpiral3d } from \"./spiral/IntegratedSpiral3d\";\nimport type { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\nimport type { IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport type { LineSegment3d } from \"./LineSegment3d\";\nimport type { OffsetOptions } from \"./OffsetOptions\";\nimport type { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport type { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport type { StrokeOptions } from \"./StrokeOptions\";\nimport type { VariantCurveExtendParameter } from \"./CurveExtendMode\";\n\n/**\n * Describes the concrete type of a [[CurvePrimitive]]. Each type name maps to a specific subclass and can be used\n * for type-switching in conditional statements.\n * - \"arc\" => [[Arc3d]]\n * - \"lineSegment\" => [[LineSegment3d]]\n * - \"lineString\" => [[LineString3d]]\n * - \"bsplineCurve\" => [[BSplineCurve3dBase]] which is an intermediate class implemented by [[BSplineCurve3d]] and\n * [[BSplineCurve3dH]]\n * - \"bezierCurve\" => [[BezierCurveBase]] which is an intermediate class implemented by [[BezierCurve3d]] and\n * [[BezierCurve3dH]]\n * - \"transitionSpiral\" => [[TransitionSpiral3d]]\n * - \"curveChainWithDistanceIndex\" => [[CurveChainWithDistanceIndex]]\n * @see [Curve Collections]($docs/learning/geometry/CurvePrimitive.md) learning article.\n * @see [[AnyCurvePrimitive]] for a union type that supports compile-time type narrowing.\n * @public\n */\nexport type CurvePrimitiveType = \"arc\" | \"lineSegment\" | \"lineString\" | \"bsplineCurve\" | \"bezierCurve\" | \"transitionSpiral\" | \"curveChainWithDistanceIndex\" | \"interpolationCurve\" | \"akimaCurve\";\n/**\n * Union type for subclasses of [[CurvePrimitive]]. Specific subclasses can be discriminated at compile- or run-time\n * using [[CurvePrimitive.curvePrimitiveType]].\n * @public\n */\nexport type AnyCurvePrimitive = Arc3d | LineSegment3d | LineString3d | BSplineCurve3d | BezierCurve3d | DirectSpiral3d | IntegratedSpiral3d | CurveChainWithDistanceIndex | InterpolationCurve3d | AkimaCurve3d;\n/**\n * Union type for a linear [[CurvePrimitive]].\n * @public\n */\nexport type LinearCurvePrimitive = LineSegment3d | LineString3d;\n/**\n * Function signature for callback which announces a pair of numbers, such as a fractional interval, along with a\n * containing CurvePrimitive.\n * @public\n */\nexport type AnnounceNumberNumberCurvePrimitive = (a0: number, a1: number, cp: CurvePrimitive) => void;\n/**\n * Function signature for a callback which announces a pair of numbers\n * @public\n */\nexport type AnnounceNumberNumber = (a0: number, a1: number) => void;\n/** Function signature for a callback which announces a curve primitive\n * @public\n */\nexport type AnnounceCurvePrimitive = (cp: CurvePrimitive) => void;\n\n/**\n * Options for computing tangents to a curve from a fixed point `P`.\n * See [[CurvePrimitive.emitTangents]], [[CurvePrimitive.allTangents]], and [[CurvePrimitive.closestTangent]].\n * @public\n */\nexport interface TangentOptions {\n /**\n * The tangent returned by [[CurvePrimitive.closestTangent]] is nearest this point as seen in the view plane.\n * * Default value is `P`.\n */\n hintPoint?: Point3d,\n /**\n * Tangents are computed as seen in a view plane perpendicular to this vector.\n * * Default value is (0,0,1), i.e., tangents are computed as seen in the top view.\n */\n vectorToEye?: Vector3d,\n /** Stroke options for default stroke-based implementations. */\n strokeOptions?: StrokeOptions,\n /**\n * Compute tangents to the curve extended according to variant type.\n * * This option is ignored for linear segments and linestrings.\n * * Default value is `false`.\n */\n extend?: VariantCurveExtendParameter,\n /**\n * Distance tolerance, interpreted as follows:\n * * Maximum distance of `P` from the tangent plane at curve point `Q` in order for `Q-P` to be considered a\n * tangent to the curve.\n * * Minimum length of a line/stroke segment for which to consider computing a tangent.\n * * Default value is [[Geometry.smallMetricDistance]].\n */\n distanceTol?: number,\n}\n\n/**\n * A curve primitive is bounded.\n * A curve primitive maps fractions in 0..1 to points in space.\n * As the fraction proceeds from 0 towards 1, the point moves \"forward\" along the curve.\n * True distance along the curve is not always strictly proportional to fraction.\n * * A LineSegment3d always has proportional fraction and distance.\n * * An Arc3d which is true circular has proportional fraction and distance.\n * * A LineString3d is not proportional (except for special case of all segments of equal length).\n * * A Spiral3d is proportional.\n * * A BsplineCurve3d is only proportional for special cases.\n * For fractions outside 0..1, the curve primitive class may either (a) return the near endpoint or (b) evaluate\n * an extended curve.\n * @public\n */\nexport abstract class CurvePrimitive extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curvePrimitive\";\n /** String name for schema properties */\n public abstract readonly curvePrimitiveType: CurvePrimitiveType;\n /** Constructor */\n protected constructor() {\n super();\n }\n /**\n * Data attached during stroking for facets.\n */\n public strokeData?: StrokeCountMap;\n /**\n * Data attached in curve cutting.\n * @internal\n */\n public startCut?: CurveLocationDetail;\n /**\n * Data attached in curve cutting.\n * @internal\n */\n public endCut?: CurveLocationDetail;\n /**\n * Data attached by various algorithms (e.g. Region booleans)\n */\n public parent?: any;\n /**\n * Return the point (x,y,z) on the curve at fractional position.\n * @param fraction fractional position along the geometry.\n * @returns Returns a point on the curve.\n */\n public abstract fractionToPoint(fraction: number, result?: Point3d): Point3d;\n /**\n * Return the point (x,y,z) and derivative on the curve at fractional position.\n * * Note that this derivative is \"derivative of xyz with respect to fraction\".\n * * This derivative shows the speed of the \"fractional point\" moving along the curve.\n * * This is not generally a unit vector. Use fractionToPointAndUnitTangent for a unit vector.\n * @param fraction fractional position along the geometry.\n * @returns Returns a ray whose origin is the curve point and direction is the derivative with respect to the fraction.\n */\n public abstract fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d;\n /**\n * Returns a ray whose origin is the curve point and direction is the unit tangent.\n * @param fraction fractional position on the curve\n * @param result optional preallocated ray.\n */\n public fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d {\n const ray = this.fractionToPointAndDerivative(fraction, result);\n ray.trySetDirectionMagnitudeInPlace(1.0);\n return ray;\n }\n /**\n * Returns the (absolute) curvature magnitude.\n * * Base implementation in CurvePrimitive computes curvature from the first and second derivative vectors.\n * @param fraction fractional position on the curve\n */\n public fractionToCurvature(fraction: number): number | undefined {\n const data = this.fractionToPointAnd2Derivatives(fraction)!;\n const cross = data.vectorU.crossProduct(data.vectorV);\n const a = cross.magnitude();\n const b = data.vectorU.magnitude();\n return Geometry.conditionalDivideFraction(a, b * b * b);\n }\n /**\n * Return a plane with\n * * origin at fractional position along the curve\n * * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to\n * the fraction.\n * * vectorV is the second derivative, i.e. derivative of vectorU which points in the direction of the curve's\n * derivative's change.\n * * **Note:** We are dealing with a parametric equation of the curve (a function f : R -> R^3) so first and\n * second derivatives are in fact derivatives of the parametric equation.\n */\n public abstract fractionToPointAnd2Derivatives(\n fraction: number, result?: Plane3dByOriginAndVectors\n ): Plane3dByOriginAndVectors | undefined;\n /**\n * Construct a frenet frame:\n * * origin at the point on the curve\n * * x axis is unit vector along the curve (tangent)\n * * y axis is perpendicular and in the plane of the osculating circle. y axis is called \"main normal\"\n * * z axis perpendicular to those. z axis is called \"bi-normal\"\n */\n public fractionToFrenetFrame(fraction: number, result?: Transform): Transform | undefined {\n const plane = this.fractionToPointAnd2Derivatives(fraction);\n if (!plane)\n return undefined;\n // first derivative (plane.vectorU) and second derivative (plane.vectorV) are not essentially\n // perpendicular so we use createRigidFromColumns to make 3 perpendicular vectors.\n let axes = Matrix3d.createRigidFromColumns(plane.vectorU, plane.vectorV, AxisOrder.XYZ);\n if (axes)\n return Transform.createRefs(plane.origin, axes, result);\n // 2nd derivative not distinct. for example if curve is linear at fraction so second derivative is 0.\n // in this case we find perpendicular vector to plane.vectorU and pass it to createRigidFromColumns.\n const perpVector = Matrix3d.createPerpendicularVectorFavorXYPlane(plane.vectorU, plane.vectorV);\n axes = Matrix3d.createRigidFromColumns(plane.vectorU, perpVector, AxisOrder.XYZ);\n if (axes)\n return Transform.createRefs(plane.origin, axes, result);\n return undefined;\n }\n /**\n * Construct signed distance from a point on the planar curve to its center of curvature (in xy only).\n * * Positive distance means the center is to the left of the curve at fraction.\n * * Negative distance means the center is to the right of the curve at fraction.\n * * Zero distance means curve is linear at fraction.\n */\n public fractionToSignedXYRadiusOfCurvature(fraction: number): number {\n const plane = this.fractionToPointAnd2Derivatives(fraction);\n if (!plane)\n return 0.0;\n const cross = plane.vectorU.crossProductXY(plane.vectorV);\n const b = plane.vectorU.magnitude();\n if (b === 0.0)\n return 0.0;\n const r = Geometry.conditionalDivideCoordinate(b * b * b, cross);\n if (r !== undefined)\n return r;\n return 0.0;\n }\n /**\n * Construct a point extrapolated along tangent at fraction.\n * @param fraction fractional position on the primitive\n * @param distance (signed) distance to move on the tangent.\n */\n public fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d {\n const ray = this.fractionToPointAndUnitTangent(fraction);\n return ray.fractionToPoint(distance);\n }\n /**\n * Return the length of the curve.\n * * Curve length is always positive.\n */\n public curveLength(): number {\n const context = new CurveLengthContext();\n this.emitStrokableParts(context);\n return context.getSum();\n }\n /**\n * Returns a (high accuracy) length of the curve between fractional positions.\n * * Curve length is always positive.\n * * Default implementation applies a generic Gaussian integration.\n * * Most curve classes (certainly LineSegment, LineString, Arc) are expected to provide efficient implementations.\n */\n public curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n if (fraction0 === fraction1)\n return 0.0;\n const scale = this.getFractionToDistanceScale();\n if (scale !== undefined) {\n // We are in luck! simple proportions determine it all !!!\n // (for example, a LineSegment3d or a circular arc)\n const totalLength = this.curveLength();\n return Math.abs((fraction1 - fraction0) * totalLength);\n }\n const context = new CurveLengthContext(fraction0, fraction1);\n this.emitStrokableParts(context);\n return Math.abs(context.getSum());\n }\n /**\n * Returns the range of the curve between fractional positions.\n * * Default implementation calls [[rangeBetweenFractionsByClone]].\n */\n public rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);\n }\n /** Returns a high accuracy range of the curve between fractional positions using [[clonePartialCurve]]. */\n public rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n if (fraction0 === fraction1)\n return Range3d.create(this.fractionToPoint(fraction0));\n const fragment = this.clonePartialCurve(fraction0, fraction1);\n if (fragment)\n return fragment.range(transform);\n return Range3d.createNull();\n }\n /**\n * Returns an approximate range based on a fixed number of evaluations.\n * * Default implementation returns a range determined by evaluating a specified number of points on the curve.\n * * Optionally evaluate again at interval midpoints and extrapolate any increase.\n * * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So\n * extrapolationFactor of 1/3 speculatively moves closer to the tight range, and larger multipliers increase\n * confidence in being safely larger.\n * * This function is faster to compute the range of a portion of a curve, because some curves can be\n * expensive to compute the partial curve and/or to compute the partial curve's range.\n * @param fraction0 start fraction for evaluation\n * @param fraction1 end fraction for evaluation\n * @param count number of points to evaluate\n * @param transform optional transform to be applied to the curve\n * @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier\n * to any increase in size.\n */\n public rangeBetweenFractionsByCount(\n fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number = 0.0,\n ): Range3d {\n const range = Range3d.createNull();\n const workPoint = Point3d.create();\n range.extendPoint(this.startPoint(workPoint));\n range.extendPoint(this.endPoint(workPoint));\n // Evaluate at count fractions (fraction0 + i * fractionStep)\n const evaluateSteps = (fractionA: number, fractionStep: number, countA: number) => {\n let f = fractionA;\n for (let i = 0; i < countA; i++, f += fractionStep) {\n this.fractionToPoint(f, workPoint);\n if (transform)\n range.extendTransformedPoint(transform, workPoint);\n else\n range.extendPoint(workPoint);\n }\n };\n const interiorCount = count - 2;\n if (interiorCount > 0) {\n const localFraction0 = 1.0 / (interiorCount + 1);\n const globalFractionStep = localFraction0 * (fraction1 - fraction0);\n evaluateSteps(fraction0 + globalFractionStep, globalFractionStep, interiorCount);\n }\n if (extrapolationFactor > 0.0) {\n // Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer\n // excess value. same interior step, but shift to interval midpoints.\n const baseRange = range.clone();\n const interiorCount1 = interiorCount + 1;\n const localFraction0 = 0.5 / interiorCount1; // we only evaluate at new midpoints.\n const globalFractionStep = 2 * localFraction0 * (fraction1 - fraction0); // same as above, but avoids special logic for interiorCount = 0\n evaluateSteps(fraction0 + globalFractionStep * 0.5, globalFractionStep, interiorCount1);\n range.extendWhenLarger(baseRange, extrapolationFactor);\n }\n return range;\n }\n /**\n * Run an integration (with a default Gaussian quadrature) with a fixed fractional step\n * * This is typically called by specific curve type implementations of curveLengthBetweenFractions.\n * * For example, in Arc3d implementation of curveLengthBetweenFractions:\n * * If the Arc3d is true circular, it the arc is true circular, use the direct `arcLength = radius * sweepRadians`\n * * If the Arc3d is not true circular, call this method with an interval count appropriate to eccentricity and\n * sweepRadians.\n * @returns Returns the curve length via an integral estimated by numerical quadrature between the fractional positions.\n * @param fraction0 start fraction for integration\n * @param fraction1 end fraction for integration\n * @param numInterval number of quadrature intervals\n */\n public curveLengthWithFixedIntervalCountQuadrature(\n fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5,\n ): number {\n if (fraction0 > fraction1) {\n const fSave = fraction0;\n fraction0 = fraction1;\n fraction1 = fSave;\n }\n const context = new CurveLengthContext(fraction0, fraction1, numGauss);\n context.announceIntervalForUniformStepStrokes(this, numInterval, fraction0, fraction1);\n return Math.abs(context.getSum());\n }\n /**\n * (Attempt to) find a position on the curve at a signed distance from start fraction.\n * * Return the position as a CurveLocationDetail.\n * * In the `CurveLocationDetail`, record:\n * * `fraction` = fractional position\n * * `point` = coordinates of the point\n * * `a` = (signed!) distance moved. If `allowExtension` is false and the move reached the start or end of the\n * curve, this distance is smaller than the requested signedDistance.\n * * `curveSearchStatus` indicates one of:\n * * `error` (unusual) computation failed not supported for this curve.\n * * `success` full movement completed\n * * `stoppedAtBoundary` partial movement completed. This can be due to either\n * * `allowExtension` parameter sent as `false`\n * * the curve type (e.g. bspline) does not support extended range.\n * * if `allowExtension` is true, movement may still end at the startPoint or end point for curves that do not support\n * extended geometry (specifically bsplines)\n * * if the curve returns a value (i.e. not `undefined`) for `curve.getFractionToDistanceScale()`, the base class\n * carries out the computation\n * and returns a final location.\n * * LineSegment3d relies on this.\n * * If the curve does not implement the computation or the curve has zero length, the returned `CurveLocationDetail`\n * has\n * * `fraction` = the value of `startFraction`\n * * `point` = result of `curve.fractionToPoint(startFraction)`\n * * `a` = 0\n * * `curveStartState` = `CurveSearchStatus.error`\n * @param startFraction fractional position where the move starts\n * @param signedDistance distance to move. Negative distance is backwards in the fraction space\n * @param allowExtension if true, allow the move to go beyond the startPoint or endpoint of the curve. If false,\n * do not allow movement beyond the startPoint or endpoint\n * @param result optional result.\n * @returns A CurveLocationDetail annotated as above. Note that if the curve does not support the calculation, there is\n * still a result which contains the point at the input startFraction, with failure indicated in the `curveStartState`\n * member\n */\n public moveSignedDistanceFromFraction(\n startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n const scale = this.getFractionToDistanceScale();\n if (scale !== undefined) {\n // We are in luck! simple proportions determine it all !!!\n // (for example, a LineSegment3d or a circular arc)\n const totalLength = this.curveLength();\n const signedFractionMove = Geometry.conditionalDivideFraction(signedDistance, totalLength);\n if (signedFractionMove === undefined) {\n return CurveLocationDetail.createCurveFractionPointDistanceCurveSearchStatus(\n this, startFraction, this.fractionToPoint(startFraction), 0.0, CurveSearchStatus.error);\n }\n return CurveLocationDetail.createConditionalMoveSignedDistance(\n allowExtension,\n this,\n startFraction,\n startFraction + signedFractionMove,\n signedDistance,\n result,\n );\n }\n return this.moveSignedDistanceFromFractionGeneric(startFraction, signedDistance, allowExtension, result);\n }\n /**\n * Generic algorithm to search for point at signed distance from a fractional startPoint.\n * * This will work for well for smooth curves.\n * * Curves with tangent or other low-order-derivative discontinuities may need to implement specialized algorithms.\n * * We need to find an endFraction which is the end-of-interval (usually upper) limit of integration of the tangent\n * magnitude from startFraction to endFraction\n * * That integral is a function of endFraction.\n * * The derivative of that integral with respect to end fraction is the tangent magnitude at end fraction.\n * * Use that function and (easily evaluated!) derivative for a Newton iteration\n * * TO ALL WHO HAVE FUZZY MEMORIES OF CALCULUS CLASS: \"The derivative of the integral wrt upper limit is the value\n * of the integrand there\" is the fundamental theorem of integral calculus !!! The fundamental theorem is not just\n * an abstraction !!! It is being used here in its barest possible form !!!\n * * See https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus\n * @param startFraction\n * @param signedDistance\n * @param _allowExtension\n * @param result\n */\n protected moveSignedDistanceFromFractionGeneric(\n startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let limitFraction: number;\n const slackFraction = 0.1; // slack to use when integration would otherwise have no room to work\n if (signedDistance === 0.0)\n return CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result); // no movement, just evaluate at startFraction\n if (signedDistance > 0.0) {\n limitFraction = 1.0;\n if (startFraction >= 1.0) {\n const newStartFraction = 1.0 - slackFraction;\n signedDistance += this.curveLengthBetweenFractions(newStartFraction, startFraction);\n startFraction = newStartFraction;\n }\n } else { // signedDistance < 0.0\n limitFraction = 0.0;\n if (startFraction <= 0.0) {\n const newStartFraction = 0.0 + slackFraction;\n signedDistance -= this.curveLengthBetweenFractions(startFraction, newStartFraction);\n startFraction = newStartFraction;\n }\n }\n const availableLength = this.curveLengthBetweenFractions(startFraction, limitFraction);\n assert(availableLength > 0.0);\n const absDistance = Math.abs(signedDistance);\n if (availableLength < absDistance && !allowExtension)\n return CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, limitFraction, signedDistance, result);\n\n const fractionStep = Geometry.conditionalDivideCoordinate(absDistance, availableLength);\n if (undefined === fractionStep) {\n // no available length!\n result = CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result);\n result.curveSearchStatus = CurveSearchStatus.error;\n return result;\n }\n const directionFactor = signedDistance < 0.0 ? -1.0 : 1.0;\n let fractionB = Geometry.interpolate(startFraction, fractionStep, limitFraction);\n let fractionA = startFraction;\n let distanceA = 0.0;\n const tol = 1.0e-12 * availableLength;\n let numConverged = 0;\n const tangent = Ray3d.createXAxis();\n // on each loop entry:\n // fractionA is the most recent endOfInterval. (It may have been reached by a mixture of forward and backward step.)\n // distanceA is the distance to (the point at) fractionA\n // fractionB is the next end fraction\n for (let iterations = 0; iterations < 10; iterations++) {\n const distanceAB = this.curveLengthBetweenFractions(fractionA, fractionB);\n const directionAB = fractionB > fractionA ? directionFactor : -directionFactor;\n const distance0B = distanceA + directionAB * distanceAB;\n const distanceError = absDistance - distance0B;\n if (Math.abs(distanceError) < tol) {\n numConverged++;\n if (numConverged > 1)\n break;\n } else {\n numConverged = 0;\n }\n this.fractionToPointAndDerivative(fractionB, tangent);\n const tangentMagnitude = tangent.direction.magnitude();\n fractionA = fractionB;\n fractionB = fractionA + directionFactor * distanceError / tangentMagnitude;\n if (fractionA === fractionB) { // YES -- that is an exact equality test. When it happens, there's no need for confirming with another iteration.\n numConverged = 100;\n break;\n }\n distanceA = distance0B;\n }\n if (numConverged > 1)\n return CurveLocationDetail.createConditionalMoveSignedDistance(\n allowExtension, this, startFraction, fractionB, signedDistance, result,\n );\n result = CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result);\n result.curveSearchStatus = CurveSearchStatus.error;\n return result;\n }\n /**\n * * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual\n * fraction space [0,1]). Otherwise, returns false.\n * * Base class default implementation returns false.\n * * These classes (and perhaps others in the future) will return true:\n * * LineSegment3d\n * * LineString3d\n * * Arc3d\n */\n public get isExtensibleFractionSpace(): boolean {\n return false;\n }\n /**\n * Compute a length for curve which may be a fast approximation to the true length.\n * This is expected to be either (a) exact or (b) larger than the actual length, but by no more than\n * a small multiple, perhaps up to PI/2, but commonly much closer to 1.\n *\n * * An example use of this is for setting a tolerance which is a small multiple of the curve length.\n * * Simple line, circular arc, and transition spiral may return exact length\n * * Ellipse may return circumference of some circle or polygon that encloses the ellipse.\n * * bspline curve may return control polygon length\n * *\n */\n public abstract quickLength(): number;\n /**\n * Search for a point on the curve that is closest to the spacePoint.\n * * If the space point is exactly on the curve, this is the reverse of fractionToPoint.\n * * Since CurvePrimitive should always have start and end available as candidate points, this method should always\n * succeed.\n * @param spacePoint point in space.\n * @param extend (optional) compute the closest point to the curve extended according to variant type (default false)\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, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const strokeHandler = new ClosestPointStrokeHandler(spacePoint, extend, result);\n this.emitStrokableParts(strokeHandler);\n return strokeHandler.claimResult();\n }\n /**\n * Announce all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 this.emitStrokableParts(strokeHandler, options?.strokeOptions);\n }\n /**\n * Return all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 /**\n * Find intervals of this curvePrimitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce (optional) function to be called announcing fractional intervals\n * `announce(fraction0, fraction1, curvePrimitive)`\n * @returns true if any \"in\" segments are announced.\n */\n public announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n // DEFAULT IMPLEMENTATION -- no interior parts\n return false;\n }\n /** Return a deep clone. */\n public abstract override clone(): CurvePrimitive;\n /** Return a transformed deep clone. */\n public abstract override cloneTransformed(transform: Transform): CurvePrimitive | undefined;\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param _fractionA [in] start fraction\n * @param _fractionB [in] end fraction\n */\n public clonePartialCurve(_fractionA: number, _fractionB: number): CurvePrimitive | undefined {\n return undefined;\n }\n /**\n * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor.\n * If distance-along-the-curve is not proportional, return undefined.\n * * When defined, the scale factor is always the length of the curve.\n * * This scale factor is typically available for these curve types:\n * * * All `LineSegment3d`\n * * * Arc3d which is a true circular arc (axes perpendicular and of equal length).\n * * * CurveChainWithDistanceIndex\n * * This scale factor is undefined for these curve types:\n * * * Arc3d which is a true ellipse, i.e. unequal lengths of defining vectors or non-perpendicular defining vectors.\n * * * bspline and bezier curves\n * @returns scale factor or undefined\n */\n public getFractionToDistanceScale(): number | undefined {\n return undefined;\n }\n /** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */\n public abstract reverseInPlace(): void;\n /**\n * Compute intersections of the curve with a plane.\n * * The intersections are appended to the result array.\n * * The base class implementation emits strokes to an AppendPlaneIntersectionStrokeHandler object, which uses a\n * Newton iteration to get high-accuracy intersection points within strokes.\n * * Derived classes should override this default implementation if there are easy analytic solutions.\n * * Derived classes are free to implement extended intersections (e.g. arc!!!)\n * @param plane The plane to be intersected.\n * @param result Array to receive intersections\n * @returns Return the number of CurveLocationDetail's added to the result array.\n */\n public appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const strokeHandler = new AppendPlaneIntersectionStrokeHandler(plane, result);\n const n0 = result.length;\n this.emitStrokableParts(strokeHandler);\n return result.length - n0;\n }\n /**\n * Examine contents of an array of CurveLocationDetail.\n * Filter the intersections according to the parameters.\n * @param allowExtend if false, remove points on the extension.\n * @param applySnappedCoordinates if true, change the stored fractions and coordinates to exact end values.\n * Otherwise use the exact values only for purpose of updating the curveIntervalRole.\n * @param startEndFractionTolerance if nonzero, adjust fraction to 0 or 1 with this tolerance.\n * @param startEndXYZTolerance if nonzero, adjust to endpoint with this tolerance.\n * @internal\n */\n public static snapAndRestrictDetails(\n details: CurveLocationDetail[],\n allowExtend: boolean = true,\n applySnappedCoordinates: boolean = false,\n startEndFractionTolerance = Geometry.smallAngleRadians,\n startEndXYZTolerance = Geometry.smallMetricDistance,\n ): void {\n const n0 = details.length;\n let acceptIndex = 0;\n const point0 = Point3d.create();\n const point1 = Point3d.create();\n let snappedCoordinates: Point3d | undefined;\n for (let candidateIndex = 0; candidateIndex < n0; candidateIndex++) {\n snappedCoordinates = undefined;\n const detail = details[candidateIndex];\n let fraction = detail.fraction;\n let accept = allowExtend || Geometry.isIn01(fraction);\n if (detail.curve) {\n detail.curve.startPoint(point0);\n detail.curve.endPoint(point1);\n }\n if (startEndFractionTolerance > 0) {\n if (Math.abs(fraction) < startEndFractionTolerance) {\n fraction = 0.0;\n accept = true;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point0;\n }\n if (Math.abs(fraction - 1.0) < startEndFractionTolerance) {\n fraction = 1.0;\n accept = true;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point1;\n if (detail.curve)\n snappedCoordinates = detail.curve.startPoint(point1);\n }\n }\n if (startEndXYZTolerance > 0 && detail.curve !== undefined) {\n // REMARK: always test both endpoints. If there is a cyclic fraction space, an intersection marked as \"after\" the end might have wrapped all the way to the beginning.\n if (detail.point.distance(point0) <= startEndXYZTolerance) {\n fraction = 0.0;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point0;\n } else if (detail.point.distance(point1) <= startEndXYZTolerance) {\n fraction = 1.0;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point1;\n }\n }\n if (accept) {\n if (applySnappedCoordinates) {\n detail.fraction = fraction;\n if (snappedCoordinates !== undefined)\n detail.point.setFrom(snappedCoordinates);\n }\n if (acceptIndex < candidateIndex)\n details[acceptIndex] = detail;\n acceptIndex++;\n }\n }\n if (acceptIndex < n0)\n details.length = acceptIndex;\n }\n /**\n * Ask if the curve is within tolerance of a plane.\n * @returns Returns true if the curve is completely within tolerance of the plane.\n */\n public abstract isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;\n /** Return the startPoint of the primitive. The default implementation returns fractionToPoint(0.0) */\n public startPoint(result?: Point3d): Point3d {\n return this.fractionToPoint(0.0, result);\n }\n /** Return the end point of the primitive. The default implementation returns fractionToPoint(1.0) */\n public endPoint(result?: Point3d): Point3d {\n return this.fractionToPoint(1.0, result);\n }\n /** Append stroke points to caller-supplied linestring. */\n public abstract emitStrokes(dest: LineString3d, options?: StrokeOptions): void;\n /**\n * Ask the curve to announce points and simple subcurve fragments for stroking.\n * See IStrokeHandler for description of the sequence of the method calls.\n */\n public abstract emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void;\n /**\n * Return the stroke count required for given options.\n * * This returns a single number\n * * See computeComponentStrokeCountForOptions to get structured per-component counts and fraction mappings.\n * @param options StrokeOptions that determine count\n */\n public abstract computeStrokeCountForOptions(options?: StrokeOptions): number;\n /**\n * Attach StrokeCountMap structure to this primitive (and recursively to any children)\n * * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and attaches it.\n * * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.\n * * Subdivided primitives (linestring, bspline curve) implement themselves and attach a StrokeCountMap containing the\n * total count, and also containing an array of StrokeCountMap per component.\n * * For CurvePrimitiveWithDistanceIndex, the top level gets (only) a total count, and each child gets\n * its own StrokeCountMap with appropriate structure.\n * @param options StrokeOptions that determine count\n * @param parentStrokeMap optional map from parent. Its count, curveLength, and a1 values are increased with count\n * and distance from this primitive.\n * @return sum of `a0+this.curveLength()`, for use as `a0` of successor in chain.\n */\n public computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap) {\n const n = this.computeStrokeCountForOptions(options);\n const a = this.curveLength();\n CurvePrimitive.installStrokeCountMap(\n this,\n StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a),\n parentMap);\n }\n /**\n * Evaluate strokes at fractions indicated in a StrokeCountMap.\n * * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and strokes at\n * uniform fractions.\n * * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.\n * * Subdivided primitives (linestring, bspline curve) implement themselves and evaluate within components.\n * * CurvePrimitiveWithDistanceIndex recurses to its children.\n * * if packedFraction and packedDerivative arrays are present in the LineString3d, fill them.\n * @param map = stroke count data.\n * @param linestring = receiver linestring.\n * @return number of strokes added. 0 if any errors matching the map to the curve primitive.\n */\n public addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number {\n const numPoint0 = linestring.numPoints();\n if (map.primitive && map.primitive === this && map.numStroke > 0) {\n for (let i = 0; i <= map.numStroke; i++) {\n const fraction = i / map.numStroke;\n linestring.appendFractionToPoint(this, fraction);\n }\n }\n return linestring.numPoints() - numPoint0;\n }\n /**\n * Final install step to save curveMap in curve. If parentMap is given, update its length, count, and a1 fields\n * @param curve curve to receive the annotation\n * @param map\n * @param parentMap\n */\n public static installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap) {\n if (parentMap)\n parentMap.addToCountAndLength(curveMap.numStroke, curveMap.curveLength);\n curve.strokeData = curveMap;\n }\n /**\n * Return an array containing only the curve primitives.\n * * This DEFAULT implementation simply pushes `this` to the collectorArray.\n * @param collectorArray array to receive primitives (pushed -- the array is not cleared)\n * @param smallestPossiblePrimitives if true, a [[CurvePrimitiveWithDistanceIndex]] recurses on its (otherwise hidden)\n * children. If false, it returns only itself.\n * @param explodeLinestrings if true, push a [[LineSegment3d]] for each segment of a [[LineString3d]]. If false,\n * push only the [[LineString3d]].\n */\n public collectCurvePrimitivesGo(\n collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false,\n ): void {\n collectorArray.push(this);\n }\n /**\n * Return an array containing only the curve primitives.\n * * This DEFAULT implementation captures the optional collector and calls [[collectCurvePrimitivesGo]].\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 * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * * No attempt is made to join the offsets of smaller constituent primitives. To construct a fully joined offset\n * for an aggregate instance (e.g., LineString3d, CurveChainWithDistanceIndex), use [[CurveOps.constructCurveXYOffset]]\n * instead.\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public abstract constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions\n ): CurvePrimitive | CurvePrimitive[] | undefined;\n\n /**\n * Project instance geometry (via dispatch) onto the line of the given ray, and return the extreme fractional\n * parameters 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 undefined; // common implementation delegated to subclasses to av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AK;QAE5G,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD;;;;;;;OAOG;IACI,sBAAsB,CAC3B,cAAiC,EAAE,6BAAsC,KAAK,EAAE,qBAA8B,KAAK;QAEnH,MAAM,OAAO,GAAqB,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;QACrF,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;QACvF,OAAO,OAAO,CAAC;IACjB,CAAC;IAYD;;;;;;;OAOG;IACI,uBAAuB,CAAC,IAAsB,EAAE,QAAkB;QACvE,OAAO,SAAS,CAAC,CAAC,6EAA6E;IACjG,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 { assert } from \"@itwin/core-bentley\";\nimport { StrokeCountMap } from \"../curve/Query/StrokeCountMap\";\nimport { AxisOrder, Geometry, type PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Point3d, type Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { type Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { CurveIntervalRole, CurveLocationDetail, CurveSearchStatus } from \"./CurveLocationDetail\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { AppendPlaneIntersectionStrokeHandler } from \"./internalContexts/AppendPlaneIntersectionStrokeHandler\";\nimport { ClosestPointStrokeHandler } from \"./internalContexts/ClosestPointStrokeHandler\";\nimport { AnnounceTangentStrokeHandler } from \"./internalContexts/AnnounceTangentStrokeHandler\";\nimport { CurveLengthContext } from \"./internalContexts/CurveLengthContext\";\nimport { LineString3d } from \"./LineString3d\";\n\nimport type { AkimaCurve3d } from \"../bspline/AkimaCurve3d\";\nimport type { Arc3d } from \"./Arc3d\";\nimport type { BezierCurve3d } from \"../bspline/BezierCurve3d\";\nimport type { BSplineCurve3d } from \"../bspline/BSplineCurve\";\nimport type { Clipper } from \"../clipping/ClipUtils\";\nimport type { CurveChainWithDistanceIndex } from \"./CurveChainWithDistanceIndex\";\nimport type { DirectSpiral3d } from \"./spiral/DirectSpiral3d\";\nimport type { IntegratedSpiral3d } from \"./spiral/IntegratedSpiral3d\";\nimport type { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\nimport type { IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport type { LineSegment3d } from \"./LineSegment3d\";\nimport type { OffsetOptions } from \"./OffsetOptions\";\nimport type { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport type { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport type { StrokeOptions } from \"./StrokeOptions\";\nimport type { VariantCurveExtendParameter } from \"./CurveExtendMode\";\n\n/**\n * Describes the concrete type of a [[CurvePrimitive]]. Each type name maps to a specific subclass and can be used\n * for type-switching in conditional statements.\n * - \"arc\" => [[Arc3d]]\n * - \"lineSegment\" => [[LineSegment3d]]\n * - \"lineString\" => [[LineString3d]]\n * - \"bsplineCurve\" => [[BSplineCurve3dBase]] which is an intermediate class implemented by [[BSplineCurve3d]] and\n * [[BSplineCurve3dH]]\n * - \"bezierCurve\" => [[BezierCurveBase]] which is an intermediate class implemented by [[BezierCurve3d]] and\n * [[BezierCurve3dH]]\n * - \"transitionSpiral\" => [[TransitionSpiral3d]]\n * - \"curveChainWithDistanceIndex\" => [[CurveChainWithDistanceIndex]]\n * @see [Curve Collections]($docs/learning/geometry/CurvePrimitive.md) learning article.\n * @see [[AnyCurvePrimitive]] for a union type that supports compile-time type narrowing.\n * @public\n */\nexport type CurvePrimitiveType = \"arc\" | \"lineSegment\" | \"lineString\" | \"bsplineCurve\" | \"bezierCurve\" | \"transitionSpiral\" | \"curveChainWithDistanceIndex\" | \"interpolationCurve\" | \"akimaCurve\";\n/**\n * Union type for subclasses of [[CurvePrimitive]]. Specific subclasses can be discriminated at compile- or run-time\n * using [[CurvePrimitive.curvePrimitiveType]].\n * @public\n */\nexport type AnyCurvePrimitive = Arc3d | LineSegment3d | LineString3d | BSplineCurve3d | BezierCurve3d | DirectSpiral3d | IntegratedSpiral3d | CurveChainWithDistanceIndex | InterpolationCurve3d | AkimaCurve3d;\n/**\n * Union type for a linear [[CurvePrimitive]].\n * @public\n */\nexport type LinearCurvePrimitive = LineSegment3d | LineString3d;\n/**\n * Function signature for callback which announces a pair of numbers, such as a fractional interval, along with a\n * containing CurvePrimitive.\n * @public\n */\nexport type AnnounceNumberNumberCurvePrimitive = (a0: number, a1: number, cp: CurvePrimitive) => void;\n/**\n * Function signature for a callback which announces a pair of numbers\n * @public\n */\nexport type AnnounceNumberNumber = (a0: number, a1: number) => void;\n/** Function signature for a callback which announces a curve primitive\n * @public\n */\nexport type AnnounceCurvePrimitive = (cp: CurvePrimitive) => void;\n\n/**\n * Options for computing tangents to a curve from a fixed point `P`.\n * See [[CurvePrimitive.emitTangents]], [[CurvePrimitive.allTangents]], and [[CurvePrimitive.closestTangent]].\n * @public\n */\nexport interface TangentOptions {\n /**\n * The tangent point returned by [[CurvePrimitive.closestTangent]] is nearest to this point as seen in the view plane.\n * * Default value is the fixed point `P`.\n */\n hintPoint?: Point3d,\n /**\n * Tangents are computed as seen in a view plane perpendicular to this vector.\n * * Default value is (0,0,1), i.e., tangents are computed as seen in the top view.\n */\n vectorToEye?: Vector3d,\n /** Stroke options for default stroke-based implementations. */\n strokeOptions?: StrokeOptions,\n /**\n * Compute tangents to the curve extended according to variant type.\n * * This option is ignored for linear segments and linestrings.\n * * Default value is `false`.\n */\n extend?: VariantCurveExtendParameter,\n /**\n * Distance tolerance, interpreted as follows:\n * * Maximum distance of `P` from the tangent plane at curve point `Q` in order for `Q-P` to be considered a\n * tangent to the curve.\n * * Minimum length of a line/stroke segment for which to consider computing a tangent.\n * * Default value is [[Geometry.smallMetricDistance]].\n */\n distanceTol?: number,\n}\n\n/**\n * A curve primitive is bounded.\n * A curve primitive maps fractions in 0..1 to points in space.\n * As the fraction proceeds from 0 towards 1, the point moves \"forward\" along the curve.\n * True distance along the curve is not always strictly proportional to fraction.\n * * A LineSegment3d always has proportional fraction and distance.\n * * An Arc3d which is true circular has proportional fraction and distance.\n * * A LineString3d is not proportional (except for special case of all segments of equal length).\n * * A Spiral3d is proportional.\n * * A BsplineCurve3d is only proportional for special cases.\n * For fractions outside 0..1, the curve primitive class may either (a) return the near endpoint or (b) evaluate\n * an extended curve.\n * @public\n */\nexport abstract class CurvePrimitive extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curvePrimitive\";\n /** String name for schema properties */\n public abstract readonly curvePrimitiveType: CurvePrimitiveType;\n /** Constructor */\n protected constructor() {\n super();\n }\n /**\n * Data attached during stroking for facets.\n */\n public strokeData?: StrokeCountMap;\n /**\n * Data attached in curve cutting.\n * @internal\n */\n public startCut?: CurveLocationDetail;\n /**\n * Data attached in curve cutting.\n * @internal\n */\n public endCut?: CurveLocationDetail;\n /**\n * Data attached by various algorithms (e.g. Region booleans)\n */\n public parent?: any;\n /**\n * Return the point (x,y,z) on the curve at fractional position.\n * @param fraction fractional position along the geometry.\n * @returns Returns a point on the curve.\n */\n public abstract fractionToPoint(fraction: number, result?: Point3d): Point3d;\n /**\n * Return the point (x,y,z) and derivative on the curve at fractional position.\n * * Note that this derivative is \"derivative of xyz with respect to fraction\".\n * * This derivative shows the speed of the \"fractional point\" moving along the curve.\n * * This is not generally a unit vector. Use fractionToPointAndUnitTangent for a unit vector.\n * @param fraction fractional position along the geometry.\n * @returns Returns a ray whose origin is the curve point and direction is the derivative with respect to the fraction.\n */\n public abstract fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d;\n /**\n * Returns a ray whose origin is the curve point and direction is the unit tangent.\n * @param fraction fractional position on the curve\n * @param result optional preallocated ray.\n */\n public fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d {\n const ray = this.fractionToPointAndDerivative(fraction, result);\n ray.trySetDirectionMagnitudeInPlace(1.0);\n return ray;\n }\n /**\n * Returns the (absolute) curvature magnitude.\n * * Base implementation in CurvePrimitive computes curvature from the first and second derivative vectors.\n * @param fraction fractional position on the curve\n */\n public fractionToCurvature(fraction: number): number | undefined {\n const data = this.fractionToPointAnd2Derivatives(fraction)!;\n const cross = data.vectorU.crossProduct(data.vectorV);\n const a = cross.magnitude();\n const b = data.vectorU.magnitude();\n return Geometry.conditionalDivideFraction(a, b * b * b);\n }\n /**\n * Return a plane with\n * * origin at fractional position along the curve\n * * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to\n * the fraction.\n * * vectorV is the second derivative, i.e. derivative of vectorU which points in the direction of the curve's\n * derivative's change.\n * * **Note:** We are dealing with a parametric equation of the curve (a function f : R -> R^3) so first and\n * second derivatives are in fact derivatives of the parametric equation.\n */\n public abstract fractionToPointAnd2Derivatives(\n fraction: number, result?: Plane3dByOriginAndVectors\n ): Plane3dByOriginAndVectors | undefined;\n /**\n * Construct a frenet frame:\n * * origin at the point on the curve\n * * x axis is unit vector along the curve (tangent)\n * * y axis is perpendicular and in the plane of the osculating circle. y axis is called \"main normal\"\n * * z axis perpendicular to those. z axis is called \"bi-normal\"\n */\n public fractionToFrenetFrame(fraction: number, result?: Transform): Transform | undefined {\n const plane = this.fractionToPointAnd2Derivatives(fraction);\n if (!plane)\n return undefined;\n // first derivative (plane.vectorU) and second derivative (plane.vectorV) are not essentially\n // perpendicular so we use createRigidFromColumns to make 3 perpendicular vectors.\n let axes = Matrix3d.createRigidFromColumns(plane.vectorU, plane.vectorV, AxisOrder.XYZ);\n if (axes)\n return Transform.createRefs(plane.origin, axes, result);\n // 2nd derivative not distinct. for example if curve is linear at fraction so second derivative is 0.\n // in this case we find perpendicular vector to plane.vectorU and pass it to createRigidFromColumns.\n const perpVector = Matrix3d.createPerpendicularVectorFavorXYPlane(plane.vectorU, plane.vectorV);\n axes = Matrix3d.createRigidFromColumns(plane.vectorU, perpVector, AxisOrder.XYZ);\n if (axes)\n return Transform.createRefs(plane.origin, axes, result);\n return undefined;\n }\n /**\n * Construct signed distance from a point on the planar curve to its center of curvature (in xy only).\n * * Positive distance means the center is to the left of the curve at fraction.\n * * Negative distance means the center is to the right of the curve at fraction.\n * * Zero distance means curve is linear at fraction.\n */\n public fractionToSignedXYRadiusOfCurvature(fraction: number): number {\n const plane = this.fractionToPointAnd2Derivatives(fraction);\n if (!plane)\n return 0.0;\n const cross = plane.vectorU.crossProductXY(plane.vectorV);\n const b = plane.vectorU.magnitude();\n if (b === 0.0)\n return 0.0;\n const r = Geometry.conditionalDivideCoordinate(b * b * b, cross);\n if (r !== undefined)\n return r;\n return 0.0;\n }\n /**\n * Construct a point extrapolated along tangent at fraction.\n * @param fraction fractional position on the primitive\n * @param distance (signed) distance to move on the tangent.\n */\n public fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d {\n const ray = this.fractionToPointAndUnitTangent(fraction);\n return ray.fractionToPoint(distance);\n }\n /**\n * Return the length of the curve.\n * * Curve length is always positive.\n */\n public curveLength(): number {\n const context = new CurveLengthContext();\n this.emitStrokableParts(context);\n return context.getSum();\n }\n /**\n * Returns a (high accuracy) length of the curve between fractional positions.\n * * Curve length is always positive.\n * * Default implementation applies a generic Gaussian integration.\n * * Most curve classes (certainly LineSegment, LineString, Arc) are expected to provide efficient implementations.\n */\n public curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n if (fraction0 === fraction1)\n return 0.0;\n const scale = this.getFractionToDistanceScale();\n if (scale !== undefined) {\n // We are in luck! simple proportions determine it all !!!\n // (for example, a LineSegment3d or a circular arc)\n const totalLength = this.curveLength();\n return Math.abs((fraction1 - fraction0) * totalLength);\n }\n const context = new CurveLengthContext(fraction0, fraction1);\n this.emitStrokableParts(context);\n return Math.abs(context.getSum());\n }\n /**\n * Returns the range of the curve between fractional positions.\n * * Default implementation calls [[rangeBetweenFractionsByClone]].\n */\n public rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);\n }\n /** Returns a high accuracy range of the curve between fractional positions using [[clonePartialCurve]]. */\n public rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n if (fraction0 === fraction1)\n return Range3d.create(this.fractionToPoint(fraction0));\n const fragment = this.clonePartialCurve(fraction0, fraction1);\n if (fragment)\n return fragment.range(transform);\n return Range3d.createNull();\n }\n /**\n * Returns an approximate range based on a fixed number of evaluations.\n * * Default implementation returns a range determined by evaluating a specified number of points on the curve.\n * * Optionally evaluate again at interval midpoints and extrapolate any increase.\n * * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So\n * extrapolationFactor of 1/3 speculatively moves closer to the tight range, and larger multipliers increase\n * confidence in being safely larger.\n * * This function is faster to compute the range of a portion of a curve, because some curves can be\n * expensive to compute the partial curve and/or to compute the partial curve's range.\n * @param fraction0 start fraction for evaluation\n * @param fraction1 end fraction for evaluation\n * @param count number of points to evaluate\n * @param transform optional transform to be applied to the curve\n * @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier\n * to any increase in size.\n */\n public rangeBetweenFractionsByCount(\n fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number = 0.0,\n ): Range3d {\n const range = Range3d.createNull();\n const workPoint = Point3d.create();\n range.extendPoint(this.startPoint(workPoint));\n range.extendPoint(this.endPoint(workPoint));\n // Evaluate at count fractions (fraction0 + i * fractionStep)\n const evaluateSteps = (fractionA: number, fractionStep: number, countA: number) => {\n let f = fractionA;\n for (let i = 0; i < countA; i++, f += fractionStep) {\n this.fractionToPoint(f, workPoint);\n if (transform)\n range.extendTransformedPoint(transform, workPoint);\n else\n range.extendPoint(workPoint);\n }\n };\n const interiorCount = count - 2;\n if (interiorCount > 0) {\n const localFraction0 = 1.0 / (interiorCount + 1);\n const globalFractionStep = localFraction0 * (fraction1 - fraction0);\n evaluateSteps(fraction0 + globalFractionStep, globalFractionStep, interiorCount);\n }\n if (extrapolationFactor > 0.0) {\n // Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer\n // excess value. same interior step, but shift to interval midpoints.\n const baseRange = range.clone();\n const interiorCount1 = interiorCount + 1;\n const localFraction0 = 0.5 / interiorCount1; // we only evaluate at new midpoints.\n const globalFractionStep = 2 * localFraction0 * (fraction1 - fraction0); // same as above, but avoids special logic for interiorCount = 0\n evaluateSteps(fraction0 + globalFractionStep * 0.5, globalFractionStep, interiorCount1);\n range.extendWhenLarger(baseRange, extrapolationFactor);\n }\n return range;\n }\n /**\n * Run an integration (with a default Gaussian quadrature) with a fixed fractional step\n * * This is typically called by specific curve type implementations of curveLengthBetweenFractions.\n * * For example, in Arc3d implementation of curveLengthBetweenFractions:\n * * If the Arc3d is true circular, it the arc is true circular, use the direct `arcLength = radius * sweepRadians`\n * * If the Arc3d is not true circular, call this method with an interval count appropriate to eccentricity and\n * sweepRadians.\n * @returns Returns the curve length via an integral estimated by numerical quadrature between the fractional positions.\n * @param fraction0 start fraction for integration\n * @param fraction1 end fraction for integration\n * @param numInterval number of quadrature intervals\n */\n public curveLengthWithFixedIntervalCountQuadrature(\n fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5,\n ): number {\n if (fraction0 > fraction1) {\n const fSave = fraction0;\n fraction0 = fraction1;\n fraction1 = fSave;\n }\n const context = new CurveLengthContext(fraction0, fraction1, numGauss);\n context.announceIntervalForUniformStepStrokes(this, numInterval, fraction0, fraction1);\n return Math.abs(context.getSum());\n }\n /**\n * (Attempt to) find a position on the curve at a signed distance from start fraction.\n * * Return the position as a CurveLocationDetail.\n * * In the `CurveLocationDetail`, record:\n * * `fraction` = fractional position\n * * `point` = coordinates of the point\n * * `a` = (signed!) distance moved. If `allowExtension` is false and the move reached the start or end of the\n * curve, this distance is smaller than the requested signedDistance.\n * * `curveSearchStatus` indicates one of:\n * * `error` (unusual) computation failed not supported for this curve.\n * * `success` full movement completed\n * * `stoppedAtBoundary` partial movement completed. This can be due to either\n * * `allowExtension` parameter sent as `false`\n * * the curve type (e.g. bspline) does not support extended range.\n * * if `allowExtension` is true, movement may still end at the startPoint or end point for curves that do not support\n * extended geometry (specifically bsplines)\n * * if the curve returns a value (i.e. not `undefined`) for `curve.getFractionToDistanceScale()`, the base class\n * carries out the computation\n * and returns a final location.\n * * LineSegment3d relies on this.\n * * If the curve does not implement the computation or the curve has zero length, the returned `CurveLocationDetail`\n * has\n * * `fraction` = the value of `startFraction`\n * * `point` = result of `curve.fractionToPoint(startFraction)`\n * * `a` = 0\n * * `curveStartState` = `CurveSearchStatus.error`\n * @param startFraction fractional position where the move starts\n * @param signedDistance distance to move. Negative distance is backwards in the fraction space\n * @param allowExtension if true, allow the move to go beyond the startPoint or endpoint of the curve. If false,\n * do not allow movement beyond the startPoint or endpoint\n * @param result optional result.\n * @returns A CurveLocationDetail annotated as above. Note that if the curve does not support the calculation, there is\n * still a result which contains the point at the input startFraction, with failure indicated in the `curveStartState`\n * member\n */\n public moveSignedDistanceFromFraction(\n startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n const scale = this.getFractionToDistanceScale();\n if (scale !== undefined) {\n // We are in luck! simple proportions determine it all !!!\n // (for example, a LineSegment3d or a circular arc)\n const totalLength = this.curveLength();\n const signedFractionMove = Geometry.conditionalDivideFraction(signedDistance, totalLength);\n if (signedFractionMove === undefined) {\n return CurveLocationDetail.createCurveFractionPointDistanceCurveSearchStatus(\n this, startFraction, this.fractionToPoint(startFraction), 0.0, CurveSearchStatus.error);\n }\n return CurveLocationDetail.createConditionalMoveSignedDistance(\n allowExtension,\n this,\n startFraction,\n startFraction + signedFractionMove,\n signedDistance,\n result,\n );\n }\n return this.moveSignedDistanceFromFractionGeneric(startFraction, signedDistance, allowExtension, result);\n }\n /**\n * Generic algorithm to search for point at signed distance from a fractional startPoint.\n * * This will work for well for smooth curves.\n * * Curves with tangent or other low-order-derivative discontinuities may need to implement specialized algorithms.\n * * We need to find an endFraction which is the end-of-interval (usually upper) limit of integration of the tangent\n * magnitude from startFraction to endFraction\n * * That integral is a function of endFraction.\n * * The derivative of that integral with respect to end fraction is the tangent magnitude at end fraction.\n * * Use that function and (easily evaluated!) derivative for a Newton iteration\n * * TO ALL WHO HAVE FUZZY MEMORIES OF CALCULUS CLASS: \"The derivative of the integral wrt upper limit is the value\n * of the integrand there\" is the fundamental theorem of integral calculus !!! The fundamental theorem is not just\n * an abstraction !!! It is being used here in its barest possible form !!!\n * * See https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus\n * @param startFraction\n * @param signedDistance\n * @param _allowExtension\n * @param result\n */\n protected moveSignedDistanceFromFractionGeneric(\n startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let limitFraction: number;\n const slackFraction = 0.1; // slack to use when integration would otherwise have no room to work\n if (signedDistance === 0.0)\n return CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result); // no movement, just evaluate at startFraction\n if (signedDistance > 0.0) {\n limitFraction = 1.0;\n if (startFraction >= 1.0) {\n const newStartFraction = 1.0 - slackFraction;\n signedDistance += this.curveLengthBetweenFractions(newStartFraction, startFraction);\n startFraction = newStartFraction;\n }\n } else { // signedDistance < 0.0\n limitFraction = 0.0;\n if (startFraction <= 0.0) {\n const newStartFraction = 0.0 + slackFraction;\n signedDistance -= this.curveLengthBetweenFractions(startFraction, newStartFraction);\n startFraction = newStartFraction;\n }\n }\n const availableLength = this.curveLengthBetweenFractions(startFraction, limitFraction);\n assert(availableLength > 0.0);\n const absDistance = Math.abs(signedDistance);\n if (availableLength < absDistance && !allowExtension)\n return CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, limitFraction, signedDistance, result);\n\n const fractionStep = Geometry.conditionalDivideCoordinate(absDistance, availableLength);\n if (undefined === fractionStep) {\n // no available length!\n result = CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result);\n result.curveSearchStatus = CurveSearchStatus.error;\n return result;\n }\n const directionFactor = signedDistance < 0.0 ? -1.0 : 1.0;\n let fractionB = Geometry.interpolate(startFraction, fractionStep, limitFraction);\n let fractionA = startFraction;\n let distanceA = 0.0;\n const tol = 1.0e-12 * availableLength;\n let numConverged = 0;\n const tangent = Ray3d.createXAxis();\n // on each loop entry:\n // fractionA is the most recent endOfInterval. (It may have been reached by a mixture of forward and backward step.)\n // distanceA is the distance to (the point at) fractionA\n // fractionB is the next end fraction\n for (let iterations = 0; iterations < 10; iterations++) {\n const distanceAB = this.curveLengthBetweenFractions(fractionA, fractionB);\n const directionAB = fractionB > fractionA ? directionFactor : -directionFactor;\n const distance0B = distanceA + directionAB * distanceAB;\n const distanceError = absDistance - distance0B;\n if (Math.abs(distanceError) < tol) {\n numConverged++;\n if (numConverged > 1)\n break;\n } else {\n numConverged = 0;\n }\n this.fractionToPointAndDerivative(fractionB, tangent);\n const tangentMagnitude = tangent.direction.magnitude();\n fractionA = fractionB;\n fractionB = fractionA + directionFactor * distanceError / tangentMagnitude;\n if (fractionA === fractionB) { // YES -- that is an exact equality test. When it happens, there's no need for confirming with another iteration.\n numConverged = 100;\n break;\n }\n distanceA = distance0B;\n }\n if (numConverged > 1)\n return CurveLocationDetail.createConditionalMoveSignedDistance(\n allowExtension, this, startFraction, fractionB, signedDistance, result,\n );\n result = CurveLocationDetail.createCurveEvaluatedFraction(this, startFraction, result);\n result.curveSearchStatus = CurveSearchStatus.error;\n return result;\n }\n /**\n * * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual\n * fraction space [0,1]). Otherwise, returns false.\n * * Base class default implementation returns false.\n * * These classes (and perhaps others in the future) will return true:\n * * LineSegment3d\n * * LineString3d\n * * Arc3d\n */\n public get isExtensibleFractionSpace(): boolean {\n return false;\n }\n /**\n * Compute a length for curve which may be a fast approximation to the true length.\n * This is expected to be either (a) exact or (b) larger than the actual length, but by no more than\n * a small multiple, perhaps up to PI/2, but commonly much closer to 1.\n *\n * * An example use of this is for setting a tolerance which is a small multiple of the curve length.\n * * Simple line, circular arc, and transition spiral may return exact length\n * * Ellipse may return circumference of some circle or polygon that encloses the ellipse.\n * * bspline curve may return control polygon length\n * *\n */\n public abstract quickLength(): number;\n /**\n * Search for a point on the curve that is closest to the spacePoint.\n * * If the space point is exactly on the curve, this is the reverse of fractionToPoint.\n * * Since CurvePrimitive should always have start and end available as candidate points, this method should always\n * succeed.\n * @param spacePoint point in space.\n * @param extend (optional) compute the closest point to the curve extended according to variant type (default false)\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, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const strokeHandler = new ClosestPointStrokeHandler(spacePoint, extend, result);\n this.emitStrokableParts(strokeHandler);\n return strokeHandler.claimResult();\n }\n /**\n * Announce all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 this.emitStrokableParts(strokeHandler, options?.strokeOptions);\n }\n /**\n * Return all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 curve such that the line containing `spacePoint` and `P` is tangent to the curve in\n * 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 /**\n * Find intervals of this curvePrimitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce (optional) function to be called announcing fractional intervals\n * `announce(fraction0, fraction1, curvePrimitive)`\n * @returns true if any \"in\" segments are announced.\n */\n public announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n // DEFAULT IMPLEMENTATION -- no interior parts\n return false;\n }\n /** Return a deep clone. */\n public abstract override clone(): CurvePrimitive;\n /** Return a transformed deep clone. */\n public abstract override cloneTransformed(transform: Transform): CurvePrimitive | undefined;\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param _fractionA [in] start fraction\n * @param _fractionB [in] end fraction\n */\n public clonePartialCurve(_fractionA: number, _fractionB: number): CurvePrimitive | undefined {\n return undefined;\n }\n /**\n * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor.\n * If distance-along-the-curve is not proportional, return undefined.\n * * When defined, the scale factor is always the length of the curve.\n * * This scale factor is typically available for these curve types:\n * * * All `LineSegment3d`\n * * * Arc3d which is a true circular arc (axes perpendicular and of equal length).\n * * * CurveChainWithDistanceIndex\n * * This scale factor is undefined for these curve types:\n * * * Arc3d which is a true ellipse, i.e. unequal lengths of defining vectors or non-perpendicular defining vectors.\n * * * bspline and bezier curves\n * @returns scale factor or undefined\n */\n public getFractionToDistanceScale(): number | undefined {\n return undefined;\n }\n /** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */\n public abstract reverseInPlace(): void;\n /**\n * Compute intersections of the curve with a plane.\n * * The intersections are appended to the result array.\n * * The base class implementation emits strokes to an AppendPlaneIntersectionStrokeHandler object, which uses a\n * Newton iteration to get high-accuracy intersection points within strokes.\n * * Derived classes should override this default implementation if there are easy analytic solutions.\n * * Derived classes are free to implement extended intersections (e.g. arc!!!)\n * @param plane The plane to be intersected.\n * @param result Array to receive intersections\n * @returns Return the number of CurveLocationDetail's added to the result array.\n */\n public appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const strokeHandler = new AppendPlaneIntersectionStrokeHandler(plane, result);\n const n0 = result.length;\n this.emitStrokableParts(strokeHandler);\n return result.length - n0;\n }\n /**\n * Examine contents of an array of CurveLocationDetail.\n * Filter the intersections according to the parameters.\n * @param allowExtend if false, remove points on the extension.\n * @param applySnappedCoordinates if true, change the stored fractions and coordinates to exact end values.\n * Otherwise use the exact values only for purpose of updating the curveIntervalRole.\n * @param startEndFractionTolerance if nonzero, adjust fraction to 0 or 1 with this tolerance.\n * @param startEndXYZTolerance if nonzero, adjust to endpoint with this tolerance.\n * @internal\n */\n public static snapAndRestrictDetails(\n details: CurveLocationDetail[],\n allowExtend: boolean = true,\n applySnappedCoordinates: boolean = false,\n startEndFractionTolerance = Geometry.smallAngleRadians,\n startEndXYZTolerance = Geometry.smallMetricDistance,\n ): void {\n const n0 = details.length;\n let acceptIndex = 0;\n const point0 = Point3d.create();\n const point1 = Point3d.create();\n let snappedCoordinates: Point3d | undefined;\n for (let candidateIndex = 0; candidateIndex < n0; candidateIndex++) {\n snappedCoordinates = undefined;\n const detail = details[candidateIndex];\n let fraction = detail.fraction;\n let accept = allowExtend || Geometry.isIn01(fraction);\n if (detail.curve) {\n detail.curve.startPoint(point0);\n detail.curve.endPoint(point1);\n }\n if (startEndFractionTolerance > 0) {\n if (Math.abs(fraction) < startEndFractionTolerance) {\n fraction = 0.0;\n accept = true;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point0;\n }\n if (Math.abs(fraction - 1.0) < startEndFractionTolerance) {\n fraction = 1.0;\n accept = true;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point1;\n if (detail.curve)\n snappedCoordinates = detail.curve.startPoint(point1);\n }\n }\n if (startEndXYZTolerance > 0 && detail.curve !== undefined) {\n // REMARK: always test both endpoints. If there is a cyclic fraction space, an intersection marked as \"after\" the end might have wrapped all the way to the beginning.\n if (detail.point.distance(point0) <= startEndXYZTolerance) {\n fraction = 0.0;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point0;\n } else if (detail.point.distance(point1) <= startEndXYZTolerance) {\n fraction = 1.0;\n detail.intervalRole = CurveIntervalRole.isolatedAtVertex;\n snappedCoordinates = point1;\n }\n }\n if (accept) {\n if (applySnappedCoordinates) {\n detail.fraction = fraction;\n if (snappedCoordinates !== undefined)\n detail.point.setFrom(snappedCoordinates);\n }\n if (acceptIndex < candidateIndex)\n details[acceptIndex] = detail;\n acceptIndex++;\n }\n }\n if (acceptIndex < n0)\n details.length = acceptIndex;\n }\n /**\n * Ask if the curve is within tolerance of a plane.\n * @returns Returns true if the curve is completely within tolerance of the plane.\n */\n public abstract isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;\n /** Return the startPoint of the primitive. The default implementation returns fractionToPoint(0.0) */\n public startPoint(result?: Point3d): Point3d {\n return this.fractionToPoint(0.0, result);\n }\n /** Return the end point of the primitive. The default implementation returns fractionToPoint(1.0) */\n public endPoint(result?: Point3d): Point3d {\n return this.fractionToPoint(1.0, result);\n }\n /**\n * Whether the 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 /** Append stroke points to caller-supplied linestring. */\n public abstract emitStrokes(dest: LineString3d, options?: StrokeOptions): void;\n /**\n * Ask the curve to announce points and simple subcurve fragments for stroking.\n * See IStrokeHandler for description of the sequence of the method calls.\n */\n public abstract emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void;\n /**\n * Return the stroke count required for given options.\n * * This returns a single number\n * * See computeComponentStrokeCountForOptions to get structured per-component counts and fraction mappings.\n * @param options StrokeOptions that determine count\n */\n public abstract computeStrokeCountForOptions(options?: StrokeOptions): number;\n /**\n * Attach StrokeCountMap structure to this primitive (and recursively to any children)\n * * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and attaches it.\n * * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.\n * * Subdivided primitives (linestring, bspline curve) implement themselves and attach a StrokeCountMap containing the\n * total count, and also containing an array of StrokeCountMap per component.\n * * For CurvePrimitiveWithDistanceIndex, the top level gets (only) a total count, and each child gets\n * its own StrokeCountMap with appropriate structure.\n * @param options StrokeOptions that determine count\n * @param parentStrokeMap optional map from parent. Its count, curveLength, and a1 values are increased with count\n * and distance from this primitive.\n * @return sum of `a0+this.curveLength()`, for use as `a0` of successor in chain.\n */\n public computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap) {\n const n = this.computeStrokeCountForOptions(options);\n const a = this.curveLength();\n CurvePrimitive.installStrokeCountMap(\n this,\n StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a),\n parentMap);\n }\n /**\n * Evaluate strokes at fractions indicated in a StrokeCountMap.\n * * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and strokes at\n * uniform fractions.\n * * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.\n * * Subdivided primitives (linestring, bspline curve) implement themselves and evaluate within components.\n * * CurvePrimitiveWithDistanceIndex recurses to its children.\n * * if packedFraction and packedDerivative arrays are present in the LineString3d, fill them.\n * @param map = stroke count data.\n * @param linestring = receiver linestring.\n * @return number of strokes added. 0 if any errors matching the map to the curve primitive.\n */\n public addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number {\n const numPoint0 = linestring.numPoints();\n if (map.primitive && map.primitive === this && map.numStroke > 0) {\n for (let i = 0; i <= map.numStroke; i++) {\n const fraction = i / map.numStroke;\n linestring.appendFractionToPoint(this, fraction);\n }\n }\n return linestring.numPoints() - numPoint0;\n }\n /**\n * Final install step to save curveMap in curve. If parentMap is given, update its length, count, and a1 fields\n * @param curve curve to receive the annotation\n * @param map\n * @param parentMap\n */\n public static installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap) {\n if (parentMap)\n parentMap.addToCountAndLength(curveMap.numStroke, curveMap.curveLength);\n curve.strokeData = curveMap;\n }\n /**\n * Return an array containing only the curve primitives.\n * * This DEFAULT implementation simply pushes `this` to the collectorArray.\n * @param collectorArray array to receive primitives (pushed -- the array is not cleared)\n * @param smallestPossiblePrimitives if true, a [[CurvePrimitiveWithDistanceIndex]] recurses on its (otherwise hidden)\n * children. If false, it returns only itself.\n * @param explodeLinestrings if true, push a [[LineSegment3d]] for each segment of a [[LineString3d]]. If false,\n * push only the [[LineString3d]].\n */\n public collectCurvePrimitivesGo(\n collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false,\n ): void {\n collectorArray.push(this);\n }\n /**\n * Return an array containing only the curve primitives.\n * * This DEFAULT implementation captures the optional collector and calls [[collectCurvePrimitivesGo]].\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 * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * * No attempt is made to join the offsets of smaller constituent primitives. To construct a fully joined offset\n * for an aggregate instance (e.g., LineString3d, CurveChainWithDistanceIndex), use [[CurveOps.constructCurveXYOffset]]\n * instead.\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public abstract constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions\n ): CurvePrimitive | CurvePrimitive[] | undefined;\n\n /**\n * Project instance geometry (via dispatch) onto the line of the given ray, and return the extreme fractional\n * parameters 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 undefined; // common implementation delegated to subclasses to avoid circular dependency\n }\n}\n"]}
|
|
@@ -20,7 +20,7 @@ export type AnyRegion = Loop | ParityRegion | UnionRegion;
|
|
|
20
20
|
/**
|
|
21
21
|
* Union type for a general curve chain, or a `BagOfCurves` understood to be a collection of unrelated chains.
|
|
22
22
|
* @public
|
|
23
|
-
* @deprecated in 4.
|
|
23
|
+
* @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use AnyChain | undefined.
|
|
24
24
|
*/
|
|
25
25
|
export type ChainTypes = CurvePrimitive | Path | BagOfCurves | Loop | undefined;
|
|
26
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveTypes.js","sourceRoot":"","sources":["../../../src/curve/CurveTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","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 */\n\nimport type { BagOfCurves, CurveCollection } from \"./CurveCollection\";\nimport type { CurvePrimitive } from \"./CurvePrimitive\";\nimport type { Loop } from \"./Loop\";\nimport type { Path } from \"./Path\";\nimport type { ParityRegion } from \"./ParityRegion\";\nimport type { UnionRegion } from \"./UnionRegion\";\n\n/**\n * Union type for `GeometryQuery` classes that have contain curves, either as individual parameter space or as collections.\n * @public\n */\nexport type AnyCurve = CurvePrimitive | CurveCollection;\n\n/**\n * Union type for `GeometryQuery` classes that bound (planar) regions.\n * @public\n */\nexport type AnyRegion = Loop | ParityRegion | UnionRegion;\n\n/**\n * Union type for a general curve chain, or a `BagOfCurves` understood to be a collection of unrelated chains.\n * @public\n * @deprecated in 4.
|
|
1
|
+
{"version":3,"file":"CurveTypes.js","sourceRoot":"","sources":["../../../src/curve/CurveTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","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 */\n\nimport type { BagOfCurves, CurveCollection } from \"./CurveCollection\";\nimport type { CurvePrimitive } from \"./CurvePrimitive\";\nimport type { Loop } from \"./Loop\";\nimport type { Path } from \"./Path\";\nimport type { ParityRegion } from \"./ParityRegion\";\nimport type { UnionRegion } from \"./UnionRegion\";\n\n/**\n * Union type for `GeometryQuery` classes that have contain curves, either as individual parameter space or as collections.\n * @public\n */\nexport type AnyCurve = CurvePrimitive | CurveCollection;\n\n/**\n * Union type for `GeometryQuery` classes that bound (planar) regions.\n * @public\n */\nexport type AnyRegion = Loop | ParityRegion | UnionRegion;\n\n/**\n * Union type for a general curve chain, or a `BagOfCurves` understood to be a collection of unrelated chains.\n * @public\n * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use AnyChain | undefined.\n */\nexport type ChainTypes = CurvePrimitive | Path | BagOfCurves | Loop | undefined;\n\n/**\n * Union type for a general curve chain, or a `BagOfCurves` understood to be a collection of unrelated chains.\n * @public\n */\nexport type AnyChain = CurvePrimitive | Path | BagOfCurves | Loop;\n"]}
|
|
@@ -46,6 +46,8 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
|
|
|
46
46
|
* * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.
|
|
47
47
|
*/
|
|
48
48
|
get point1Ref(): Point3d;
|
|
49
|
+
/** Return a copy of the start and end points in an array. */
|
|
50
|
+
get points(): Point3d[];
|
|
49
51
|
/** A LineSegment3d extends along its infinite line. */
|
|
50
52
|
get isExtensibleFractionSpace(): boolean;
|
|
51
53
|
/**
|