@itwin/core-geometry 5.1.0-dev.9 → 5.2.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -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
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AAE,CAAC;QAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,SAAS,GAAG,WAAW,CAAC,cAAc,CAC1C,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjG,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { AxisIndex, AxisOrder, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { AngleSweep } from \"../geometry3d/AngleSweep\";\nimport { Ellipsoid, GeodesicPathPoint } from \"../geometry3d/Ellipsoid\";\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3dArrayCarrier } from \"../geometry3d/Point3dArrayCarrier\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolylineOps } from \"../geometry3d/PolylineOps\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Segment1d } from \"../geometry3d/Segment1d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { XAndY } from \"../geometry3d/XYZProps\";\nimport { SmallSystem } from \"../numerics/SmallSystem\";\nimport { IndexedPolyface } from \"../polyface/Polyface\";\nimport { PolyfaceBuilder } from \"../polyface/PolyfaceBuilder\";\nimport { Cone } from \"../solid/Cone\";\nimport { RuledSweep } from \"../solid/RuledSweep\";\nimport { TorusPipe } from \"../solid/TorusPipe\";\nimport { Arc3d, ArcBlendData } from \"./Arc3d\";\nimport { CurveChain } from \"./CurveCollection\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { AnyCurve, AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { LineSegment3d } from \"./LineSegment3d\";\nimport { LineString3d } from \"./LineString3d\";\nimport { Loop } from \"./Loop\";\nimport { Path } from \"./Path\";\nimport { RegionOps } from \"./RegionOps\";\nimport { IntegratedSpiral3d } from \"./spiral/IntegratedSpiral3d\";\nimport { IntegratedSpiralTypeName } from \"./spiral/TransitionSpiral3d\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n// cspell:word CCWXY\n\n/**\n * Interface to carry parallel arrays of planes and sections, and optional geometry assembled from them,\n * as returned by [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport interface SectionSequenceWithPlanes {\n /** The plane of each section. */\n planes: Plane3dByOriginAndUnitNormal[];\n /** Section curve projected onto the corresponding plane. */\n sections: AnyCurve[];\n /**\n * Optional `RuledSweep` generated from the sections.\n * * The `RuledSweep` and sections array refer to the same section objects.\n */\n ruledSweep?: RuledSweep;\n /** Optional mesh generated from the `RuledSweep` generated from the sections. */\n mesh?: IndexedPolyface;\n}\n\n/**\n * Enumeration of geometric output for [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport enum MiteredSweepOutputSelect {\n /** Output only the parallel arrays of planes and sections. */\n Sections = 0,\n /** Output planes and sections, as well as the assembled ruled sweep. */\n AlsoRuledSweep = 1,\n /** Output planes and sections, as well as the assembled ruled sweep and its stroked mesh. */\n AlsoMesh = 2,\n}\n\n/**\n * Interface bundling options for [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport interface MiteredSweepOptions {\n /** Whether first and last planes are averaged and equated when the centerline is physically closed. Default value is `false`. */\n wrapIfPhysicallyClosed?: boolean;\n /** Whether to output sections only, or sections plus optional geometry constructed from them. Default value is `MiteredSweepOutputSelect.Sections`. */\n outputSelect?: MiteredSweepOutputSelect;\n /** How to stroke smooth input curves. If undefined, default stroke options are used. */\n strokeOptions?: StrokeOptions;\n /** Whether to cap the ruled sweep if outputting a ruled sweep or mesh. Default value is `false`. */\n capped?: boolean;\n /** The first section's normal is aligned to this vector, typically the start tangent of the smooth curve stroked for the centerline. */\n startTangent?: Vector3d;\n /** The last section's normal is aligned to this vector, typically the end tangent of the smooth curve stroked for the centerline. */\n endTangent?: Vector3d;\n}\n\n/**\n * Curve strokes plus start/end tangents.\n * @internal\n*/\ninterface SmoothCurveData {\n /** Samples along a curve. */\n strokes: IndexedXYZCollection;\n /** Start tangent (unnormalized). May be undefined if the curve is linear. */\n startTangent?: Vector3d;\n /** End tangent (unnormalized). May be undefined if the curve is linear. */\n endTangent?: Vector3d;\n};\n\n/**\n * The `CurveFactory` class contains methods for specialized curve constructions.\n * @public\n */\nexport class CurveFactory {\n /** (Cautiously) construct and save a line segment between fractional positions. */\n private static addPartialSegment(\n path: Path, allowBackup: boolean,\n pointA: Point3d | undefined, pointB: Point3d | undefined,\n fraction0: number, fraction1: number,\n ) {\n if (allowBackup || (fraction1 > fraction0)) {\n if (pointA !== undefined && pointB !== undefined && !Geometry.isAlmostEqualNumber(fraction0, fraction1))\n path.tryAddChild(LineSegment3d.create(pointA.interpolate(fraction0, pointB), pointA.interpolate(fraction1, pointB)));\n }\n }\n /**\n * Create a circular arc defined by start point, tangent at start point, and end point.\n * * The circular arc is swept from start to end toward direction of the `tangentAtStart`.\n * * If tangent is parallel to line segment from start to end, return `undefined`.\n */\n public static createArcPointTangentPoint(start: Point3d, tangentAtStart: Vector3d, end: Point3d): Arc3d | undefined {\n const ret = Arc3d.createCircularStartTangentEnd(start, tangentAtStart, end);\n if (ret instanceof Arc3d)\n return ret;\n else\n return undefined;\n }\n /**\n * Construct a sequence of alternating lines and arcs with the arcs creating tangent transition between consecutive edges.\n * * If the radius parameter is a number, that radius is used throughout.\n * * If the radius parameter is an array of numbers, `radius[i]` is applied at `point[i]`.\n * * Note that since no fillet is constructed at the initial or final point, those entries in `radius[]` are never referenced.\n * * A zero radius for any point indicates to leave the as a simple corner.\n * @param points point source\n * @param radius fillet radius or array of radii indexed to correspond to the points.\n * @param allowBackupAlongEdge true to allow edges to be created going \"backwards\" along edges if needed to create the blend.\n */\n public static createFilletsInLineString(\n points: LineString3d | IndexedXYZCollection | Point3d[],\n radius: number | number[],\n allowBackupAlongEdge: boolean = true,\n ): Path | undefined {\n if (Array.isArray(points))\n return this.createFilletsInLineString(new Point3dArrayCarrier(points), radius, allowBackupAlongEdge);\n if (points instanceof LineString3d)\n return this.createFilletsInLineString(points.packedPoints, radius, allowBackupAlongEdge);\n const n = points.length;\n if (n <= 1)\n return undefined;\n const pointA = points.getPoint3dAtCheckedPointIndex(0)!;\n const pointB = points.getPoint3dAtCheckedPointIndex(1)!;\n // remark: n=2 and n=3 cases should fall out from loop logic\n const blendArray: ArcBlendData[] = [];\n // build one-sided blends at each end . .\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointA.clone() });\n for (let i = 1; i + 1 < n; i++) {\n const pointC = points.getPoint3dAtCheckedPointIndex(i + 1)!;\n let thisRadius = 0;\n if (Array.isArray(radius)) {\n if (i < radius.length)\n thisRadius = radius[i];\n } else if (Number.isFinite(radius))\n thisRadius = radius;\n if (thisRadius !== 0.0)\n blendArray.push(Arc3d.createFilletArc(pointA, pointB, pointC, thisRadius));\n else\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointB.clone() });\n pointA.setFromPoint3d(pointB);\n pointB.setFromPoint3d(pointC);\n }\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointB.clone() });\n if (!allowBackupAlongEdge) {\n // suppress arcs that have overlap with both neighbors or flood either neighbor ..\n for (let i = 1; i + 1 < n; i++) {\n const b = blendArray[i];\n if (b.fraction10 > 1.0\n || b.fraction12 > 1.0\n || 1.0 - b.fraction10 < blendArray[i - 1].fraction12\n || b.fraction12 > 1.0 - blendArray[i + 1].fraction10) {\n b.fraction10 = 0.0;\n b.fraction12 = 0.0;\n blendArray[i].arc = undefined;\n }\n }\n /* The \"1-b\" logic above prevents this loop from ever doing anything.\n // on edge with conflict, suppress the arc with larger fraction\n for (let i = 1; i < n; i++) {\n const b0 = blendArray[i - 1];\n const b1 = blendArray[i];\n if (b0.fraction12 > 1 - b1.fraction10) {\n const b = b0.fraction12 > b1.fraction12 ? b1 : b0;\n b.fraction10 = 0.0;\n b.fraction12 = 0.0;\n blendArray[i].arc = undefined;\n }\n } */\n }\n const path = Path.create();\n this.addPartialSegment(\n path, allowBackupAlongEdge,\n blendArray[0].point, blendArray[1].point,\n blendArray[0].fraction12, 1.0 - blendArray[1].fraction10,\n );\n // add each path and successor edge ...\n for (let i = 1; i + 1 < points.length; i++) {\n const b0 = blendArray[i];\n const b1 = blendArray[i + 1];\n path.tryAddChild(b0.arc);\n this.addPartialSegment(path, allowBackupAlongEdge, b0.point, b1.point, b0.fraction12, 1.0 - b1.fraction10);\n }\n return path;\n }\n /**\n * Create a `Loop` with given xy corners and fixed z.\n * * The corners always proceed counter clockwise from lower left.\n * * If the radius is too large for the outer rectangle size, it is reduced to half of the the smaller x or y size.\n */\n public static createRectangleXY(\n x0: number, y0: number, x1: number, y1: number, z: number = 0, filletRadius?: number,\n ): Loop {\n let radius = Geometry.correctSmallMetricDistance(filletRadius);\n const xMin = Math.min(x0, x1);\n const xMax = Math.max(x0, x1);\n const yMin = Math.min(y0, y1);\n const yMax = Math.max(y0, y1);\n radius = Math.min(Math.abs(radius), 0.5 * (xMax - xMin), 0.5 * (yMax - yMin));\n if (radius === 0.0)\n return Loop.createPolygon([\n Point3d.create(xMin, yMin, z),\n Point3d.create(xMax, yMin, z),\n Point3d.create(xMax, yMax, z),\n Point3d.create(xMin, yMax, z),\n Point3d.create(xMin, yMin, z),\n ]);\n else {\n const vectorU = Vector3d.create(radius, 0, 0);\n const vectorV = Vector3d.create(0, radius, 0);\n const x0A = xMin + radius;\n const y0A = yMin + radius;\n const x1A = xMax - radius;\n const y1A = yMax - radius;\n const centers = [\n Point3d.create(x1A, y1A, z),\n Point3d.create(x0A, y1A, z),\n Point3d.create(x0A, y0A, z),\n Point3d.create(x1A, y0A, z),\n ];\n const loop = Loop.create();\n for (let i = 0; i < 4; i++) {\n const center = centers[i];\n const nextCenter = centers[(i + 1) % 4];\n const edgeVector = Vector3d.createStartEnd(center, nextCenter);\n const arc = Arc3d.create(center, vectorU, vectorV, AngleSweep.createStartEndDegrees(0, 90));\n loop.tryAddChild(arc);\n const arcEnd = arc.endPoint();\n if (!edgeVector.isAlmostZero)\n loop.tryAddChild(LineSegment3d.create(arcEnd, arcEnd.plus(edgeVector)));\n vectorU.rotate90CCWXY(vectorU);\n vectorV.rotate90CCWXY(vectorV);\n }\n return loop;\n }\n }\n /**\n * If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB`\n * * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.\n * @param arcA first arc, modified in place.\n * @param arcB second arc, unmodified.\n * @param allowReversed whether to consolidate even when second arc is reversed.\n * @returns whether `arcA` was modified.\n */\n public static appendToArcInPlace(arcA: Arc3d, arcB: Arc3d, allowReverse: boolean = false): boolean {\n if (arcA.center.isAlmostEqual(arcB.center)) {\n const sweepSign = Geometry.split3WaySign(arcA.sweep.sweepRadians * arcB.sweep.sweepRadians, -1, 0, 1);\n // evaluate derivatives wrt radians (not fraction!), but adjust direction for sweep signs\n const endA = arcA.angleToPointAndDerivative(arcA.sweep.fractionToAngle(1.0));\n if (arcA.sweep.sweepRadians < 0)\n endA.direction.scaleInPlace(-1.0);\n const startB = arcB.angleToPointAndDerivative(arcB.sweep.fractionToAngle(0.0));\n if (arcB.sweep.sweepRadians < 0)\n startB.direction.scaleInPlace(-1.0);\n if (endA.isAlmostEqual(startB)) {\n arcA.sweep.setStartEndRadians(\n arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians + sweepSign * arcB.sweep.sweepRadians,\n );\n return true;\n }\n // Also ok if negated tangent\n if (allowReverse) {\n startB.direction.scaleInPlace(-1.0);\n if (endA.isAlmostEqual(startB)) {\n arcA.sweep.setStartEndRadians(\n arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians - sweepSign * arcB.sweep.sweepRadians,\n );\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Return a `Path` containing arcs are on the surface of an ellipsoid and pass through a sequence of points.\n * * Each arc passes through the two given endpoints and in the plane containing the true surface normal at\n * given `fractionForIntermediateNormal`\n * @param ellipsoid\n * @param pathPoints\n * @param fractionForIntermediateNormal fractional position for surface normal used to create the section plane.\n */\n public static assembleArcChainOnEllipsoid(\n ellipsoid: Ellipsoid, pathPoints: GeodesicPathPoint[], fractionForIntermediateNormal: number = 0.5,\n ): Path {\n const arcPath = Path.create();\n for (let i = 0; i + 1 < pathPoints.length; i++) {\n const arc = ellipsoid.sectionArcWithIntermediateNormal(\n pathPoints[i].toAngles(),\n fractionForIntermediateNormal,\n pathPoints[i + 1].toAngles());\n arcPath.tryAddChild(arc);\n }\n return arcPath;\n }\n private static appendGeometryQueryArray(candidate: GeometryQuery | GeometryQuery[] | undefined, result: GeometryQuery[]) {\n if (candidate instanceof GeometryQuery)\n result.push(candidate);\n else if (Array.isArray(candidate)) {\n for (const p of candidate)\n this.appendGeometryQueryArray(p, result);\n }\n }\n /**\n * Create solid primitives for pipe segments (e.g. Cone or TorusPipe) around line and arc primitives.\n * @param centerline centerline geometry.\n * @param pipeRadius radius of pipe.\n */\n public static createPipeSegments(\n centerline: CurvePrimitive | CurveChain, pipeRadius: number,\n ): GeometryQuery | GeometryQuery[] | undefined {\n if (centerline instanceof LineSegment3d) {\n return Cone.createAxisPoints(centerline.startPoint(), centerline.endPoint(), pipeRadius, pipeRadius, false);\n } else if (centerline instanceof Arc3d) {\n return TorusPipe.createAlongArc(centerline, pipeRadius, false);\n } else if (centerline instanceof CurvePrimitive) {\n const builder = PolyfaceBuilder.create();\n builder.addMiteredPipes(centerline, pipeRadius);\n return builder.claimPolyface();\n } else if (centerline instanceof CurveChain) {\n const result: GeometryQuery[] = [];\n for (const p of centerline.children) {\n const pipe = this.createPipeSegments(p, pipeRadius);\n this.appendGeometryQueryArray(pipe, result);\n }\n return result;\n }\n return undefined;\n }\n /** Get start point and tangent for variant curve data. */\n private static startPointAndTangent(curve: IndexedXYZCollection | Point3d[] | CurvePrimitive): Ray3d | undefined {\n if (curve instanceof CurvePrimitive)\n return curve.fractionToPointAndDerivative(0.0);\n if (curve.length < 2)\n return undefined;\n if (Array.isArray(curve))\n curve = new Point3dArrayCarrier(curve);\n const ray = Ray3d.createZero();\n curve.getPoint3dAtUncheckedPointIndex(0, ray.origin);\n curve.vectorIndexIndex(0, 1, ray.direction);\n return ray;\n };\n /** Create an [[Arc3d]] from `sectionData` that has its center at the start point of the centerline. */\n public static createArcFromSectionData(\n centerline: IndexedXYZCollection | Point3d[] | CurvePrimitive, sectionData: number | XAndY | Arc3d,\n ): Arc3d | undefined {\n const ray = CurveFactory.startPointAndTangent(centerline);\n if (!ray)\n return undefined;\n let arc: Arc3d;\n if (sectionData instanceof Arc3d) {\n arc = sectionData.clone();\n arc.center = ray.origin;\n } else {\n const vector0 = Vector3d.create();\n const vector90 = Vector3d.create();\n const length0 = (typeof sectionData === \"number\") ? sectionData : sectionData.x;\n const length90 = (typeof sectionData === \"number\") ? sectionData : sectionData.y;\n const baseFrame = Matrix3d.createRigidHeadsUp(ray.direction, AxisOrder.ZXY);\n baseFrame.columnX(vector0).scaleInPlace(length0);\n baseFrame.columnY(vector90).scaleInPlace(length90);\n arc = Arc3d.create(ray.origin, vector0, vector90);\n }\n if (arc.binormalVector().dotProduct(ray.direction) < 0.0)\n arc.reverseInPlace();\n return arc;\n }\n /**\n * Create section arcs for mitered pipe.\n * * At the end of each pipe segment, the pipe is mitered by the plane that bisects the angle between successive\n * centerline segments.\n * * The section arcs are constructed so that lines between corresponding fractional positions on the arcs are\n * axial lines on the pipes.\n * * This means that the initial arc's vector0 and vector90 lengths and angular separation are _not_ preserved in\n * the section arcs.\n * * Circular or elliptical pipe cross sections can be specified by supplying either a radius, a pair of semi-axis\n * lengths, or an Arc3d:\n * * For semi-axis length input, x and y correspond to ellipse local axes perpendicular to each other and to the\n * start tangent.\n * * For Arc3d input, the center is translated to the centerline start point. For best results, ensure this arc\n * is perpendicular to the centerline start tangent.\n * * This function internally calls [[createMiteredSweepSections]] with default options.\n * @param centerline centerline of pipe. For best results, ensure no successive duplicate points with e.g.,\n * [[GrowableXYZArray.createCompressed]].\n * @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d (if not full, function makes it full).\n * @returns array of sections or empty array if section creation failed.\n */\n public static createMiteredPipeSections(centerline: IndexedXYZCollection, sectionData: number | XAndY | Arc3d): Arc3d[] {\n const arc = CurveFactory.createArcFromSectionData(centerline, sectionData);\n if (!arc)\n return [];\n const miteredSweeps = CurveFactory.createMiteredSweepSections(centerline, arc);\n if (miteredSweeps)\n return miteredSweeps.sections as Arc3d[];\n return [];\n }\n\n /** For a smooth curve, stroke and return unnormalized start/end tangents. */\n private static strokeSmoothCurve(\n curve: IndexedXYZCollection | Point3d[] | CurvePrimitive | CurveChain,\n options?: StrokeOptions,\n ): SmoothCurveData | undefined {\n let startTangent, endTangent: Vector3d | undefined;\n if (curve instanceof CurvePrimitive) {\n startTangent = curve.fractionToPointAndDerivative(0.0).direction;\n endTangent = curve.fractionToPointAndDerivative(1.0).direction;\n const strokes = LineString3d.create();\n curve.emitStrokes(strokes, options);\n curve = strokes.packedPoints;\n } else if (curve instanceof CurveChain) {\n startTangent = curve.startPointAndDerivative()?.direction;\n endTangent = curve.endPointAndDerivative()?.direction;\n const strokes = curve.getPackedStrokes(options);\n if (!strokes)\n return undefined;\n curve = strokes;\n } else if (Array.isArray(curve))\n curve = new Point3dArrayCarrier(curve);\n return { strokes: curve, startTangent, endTangent };\n }\n\n /**\n * Align two bisector plane normals to given smooth rail tangents or optional overrides.\n * * Optionally average the normals for physically closed rail.\n */\n private static alignFirstAndLastBisectorPlanes(\n firstPlane: Plane3dByOriginAndUnitNormal,\n lastPlane: Plane3dByOriginAndUnitNormal,\n smoothRailData?: SmoothCurveData,\n options?: MiteredSweepOptions,\n ) {\n const normal0 = options?.startTangent ?? (smoothRailData?.startTangent ?? firstPlane.getNormalRef());\n const normal1 = options?.endTangent ?? (smoothRailData?.endTangent ?? lastPlane.getNormalRef());\n if (options?.wrapIfPhysicallyClosed && firstPlane.getOriginRef().isAlmostEqual(lastPlane.getOriginRef())) {\n const avgNormal = normal0.plus(normal1);\n if (avgNormal.tryNormalizeInPlace()) { // ignore cusp at seam\n firstPlane.getNormalRef().setFrom(avgNormal);\n lastPlane.getNormalRef().setFrom(avgNormal);\n return;\n }\n }\n if (normal0.tryNormalizeInPlace())\n firstPlane.getNormalRef().setFrom(normal0);\n if (normal1.tryNormalizeInPlace())\n lastPlane.getNormalRef().setFrom(normal1);\n }\n\n /** Reverse a closed curve or region if necessary so that its orientation is CCW with respect to the plane normal. */\n private static alignClosedCurveToPlane(curve: AnyCurve, planeNormal: Vector3d) {\n let closedCurve: AnyRegion | undefined;\n if (curve instanceof CurvePrimitive) {\n if (curve.startPoint().isAlmostEqual(curve.endPoint()))\n closedCurve = Loop.create(curve);\n } else if (curve.isAnyRegion())\n closedCurve = curve;\n if (closedCurve) {\n // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.\n const toLocal = Matrix3d.createRigidHeadsUp(planeNormal).transpose();\n const projection = closedCurve.cloneTransformed(Transform.createOriginAndMatrix(undefined, toLocal));\n if (projection) { // now we can ignore z-coords\n const areaXY = RegionOps.computeXYArea(projection as AnyRegion);\n if (areaXY && areaXY < 0)\n curve.reverseInPlace();\n }\n }\n }\n\n /**\n * Projection to target plane, constructing sweep direction from two given planes.\n * * If successful, push the target plane and swept section to the output arrays and return the swept section.\n * * If unsuccessful, leave the output arrays alone and return the input section.\n */\n private static doSweepToPlane(\n output: SectionSequenceWithPlanes,\n edgePlane0: Plane3dByOriginAndUnitNormal,\n edgePlane1: Plane3dByOriginAndUnitNormal,\n targetPlane: Plane3dByOriginAndUnitNormal,\n section: AnyCurve,\n ): AnyCurve {\n const sweepVector = Vector3d.createStartEnd(edgePlane0.getOriginRef(), edgePlane1.getOriginRef());\n const transform = Transform.createFlattenAlongVectorToPlane(\n sweepVector, targetPlane.getOriginRef(), targetPlane.getNormalRef(),\n );\n if (transform === undefined)\n return section;\n const transformedSection = section.cloneTransformed(transform);\n if (transformedSection === undefined)\n return section;\n output.planes.push(targetPlane);\n output.sections.push(transformedSection);\n return transformedSection;\n }\n\n /**\n * Sweep the `initialSection` along each segment of the (stroked) `centerline` until it hits the bisector plane at\n * the next vertex.\n * * For best results, the caller should place `initialSection` in a plane perpendicular to the `centerline`\n * start tangent.\n * * This plane is commonly (but not necessarily) through the centerline start point itself.\n * * To compute the sections, `initialSection` is projected in the direction of the centerline start tangent onto\n * the first bisector plane at the centerline start. The result of this projection will be likewise projected onto\n * the second plane, and so on in sequence.\n * * By default, the first/last bisector plane normals are set to the centerline start/end tangents. The caller can\n * override these with tangents supplied in `options`. If the centerline is physically closed and\n * `options.wrapIfPhysicallyClosed` is true, the first and last plane normals are averaged and equated.\n * * The centerline path does NOT have to be planar, however non-planarity will result in twisting of the sections\n * in the bisector planes.\n * @param centerline sweep path. Will be stroked if smooth.\n * @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the\n * centerline start tangent.\n * @param options options for computation and output.\n * @return array of sections, formed from projecting `initialSection` successively onto the bisector planes.\n */\n public static createMiteredSweepSections(\n centerline: IndexedXYZCollection | Point3d[] | CurvePrimitive | CurveChain,\n initialSection: AnyCurve,\n options?: MiteredSweepOptions,\n ): SectionSequenceWithPlanes | undefined {\n if (!options)\n options = {};\n const rail = this.strokeSmoothCurve(centerline, options.strokeOptions);\n if (!rail)\n return undefined;\n const planes = PolylineOps.createBisectorPlanesForDistinctPoints(rail.strokes);\n if (!planes || planes.length < 2)\n return undefined;\n this.alignFirstAndLastBisectorPlanes(planes[0], planes[planes.length - 1], rail, options);\n\n // RuledSweep facet construction assumes the contours are oriented CCW with respect to the sweep direction so that\n // facet normals point outward. We only have to align the first contour; the rest will inherit its orientation.\n this.alignClosedCurveToPlane(initialSection, planes[0].getNormalRef());\n\n const sectionData: SectionSequenceWithPlanes = { sections: [], planes: [] };\n let currentSection = this.doSweepToPlane(sectionData, planes[0], planes[1], planes[0], initialSection);\n for (let i = 1; i < planes.length; i++)\n currentSection = this.doSweepToPlane(sectionData, planes[i - 1], planes[i], planes[i], currentSection);\n\n if (options.outputSelect) {\n const ruledSweep = RuledSweep.create(sectionData.sections, options.capped ?? false);\n if (ruledSweep) {\n sectionData.ruledSweep = ruledSweep;\n if (MiteredSweepOutputSelect.AlsoMesh === options.outputSelect) {\n const builder = PolyfaceBuilder.create(options.strokeOptions);\n builder.addRuledSweep(ruledSweep);\n sectionData.mesh = builder.claimPolyface();\n }\n }\n }\n return sectionData;\n }\n /**\n * Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep.\n * * The vector from start point to center is in the direction of upVector crossed with tangentA.\n * @param start start point.\n * @param tangentAtStart vector in tangent direction at the start.\n * @param radius signed radius.\n * @param upVector optional out-of-plane vector. Defaults to positive Z.\n * @param sweep angular range. If single `Angle` is given, start angle is at 0 degrees (the start point).\n */\n public static createArcPointTangentRadius(\n start: Point3d, tangentAtStart: Vector3d, radius: number, upVector?: Vector3d, sweep?: Angle | AngleSweep,\n ): Arc3d | undefined {\n return Arc3d.createCircularStartTangentRadius(start, tangentAtStart, radius, upVector, sweep);\n }\n /**\n * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.\n * * First spiral begins at given start point.\n * * first tangent aims at shoulder.\n * * outbound spiral joins line from shoulder to target.\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param startPoint inbound start point.\n * @param shoulder point target point for (both) spiral-to-line tangencies.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralSpiralLine(\n spiralType: IntegratedSpiralTypeName,\n startPoint: Point3d,\n shoulderPoint: Point3d,\n targetPoint: Point3d,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(startPoint, shoulderPoint);\n const vectorBC0 = Vector3d.createStartEnd(shoulderPoint, targetPoint);\n const referenceLength = vectorAB.magnitude();\n const radiansAB = Math.atan2(vectorAB.y, vectorAB.x);\n const lineTurnRadians = vectorAB.angleToXY(vectorBC0);\n const spiralTurnRadians = 0.5 * lineTurnRadians.radians;\n const radiansBC = radiansAB + lineTurnRadians.radians;\n const axesA = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansAB));\n const frameA = Transform.createRefs(startPoint.clone(), axesA);\n // We know how much it has to turn, and but not the length or end radius.\n // make a spiral of referenceLength and scale it back to the junction line\n const spiralARefLength = IntegratedSpiral3d.createFrom4OutOf5(spiralType, 0.0, undefined,\n Angle.createRadians(0), Angle.createRadians(spiralTurnRadians), referenceLength, undefined, frameA);\n if (spiralARefLength) {\n const midPlanePerpendicularRadians = radiansAB + spiralTurnRadians;\n const midPlanePerpendicularVector = Vector3d.createPolar(1.0, Angle.createRadians(midPlanePerpendicularRadians));\n const altitudeB = midPlanePerpendicularVector.dotProductStartEnd(startPoint, shoulderPoint);\n const altitudeSpiralEnd = midPlanePerpendicularVector.dotProductStartEnd(startPoint, spiralARefLength.endPoint());\n const scaleFactor = altitudeB / altitudeSpiralEnd;\n const spiralA = IntegratedSpiral3d.createFrom4OutOf5(spiralType, 0.0, undefined,\n Angle.createRadians(0), Angle.createRadians(spiralTurnRadians), referenceLength * scaleFactor, undefined, frameA)!;\n const distanceAB = vectorAB.magnitude();\n const vectorBC = Vector3d.createStartEnd(shoulderPoint, targetPoint);\n vectorBC.scaleToLength(distanceAB, vectorBC);\n const pointC = shoulderPoint.plus(vectorBC);\n const axesC = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansBC + Math.PI));\n const frameC = Transform.createRefs(pointC, axesC);\n const spiralC = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, -spiralA.radius01.x1, Angle.zero(), undefined, spiralA.curveLength(), Segment1d.create(1, 0), frameC)!;\n return [spiralA, spiralC];\n }\n return undefined;\n }\n /**\n * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.\n * * Spiral length is given.\n * * tangency points float on both lines.\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param pointA inbound start point.\n * @param shoulder point target point for (both) spiral-to-line tangencies.\n * @param spiralLength for each part of the spiral pair.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralSpiralLineWithSpiralLength(\n spiralType: IntegratedSpiralTypeName,\n pointA: Point3d,\n pointB: Point3d,\n pointC: Point3d,\n spiralLength: number,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(pointA, pointB);\n const vectorBC = Vector3d.createStartEnd(pointB, pointC);\n const radiansAB = Math.atan2(vectorAB.y, vectorAB.x);\n const lineTurnAngle = vectorAB.angleToXY(vectorBC);\n const spiralTurnRadians = 0.5 * lineTurnAngle.radians;\n const bisectorRadians = 0.5 * (Math.PI - lineTurnAngle.radians);\n const radiansCB = Math.atan2(-vectorBC.y, -vectorBC.x);\n const spiralAB0 = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(spiralTurnRadians),\n spiralLength, undefined, Transform.createIdentity(),\n );\n if (spiralAB0) {\n const localEndPoint = spiralAB0.fractionToPoint(1);\n const distanceAB = pointA.distance(pointB);\n const distanceCB = pointC.distance(pointB);\n // The spiral eventually has to end on the bisector, at localEndPoint.y height from the inbound line\n // distance from shoulder to projection of that point to point E on the inbound line is\n const distanceBE = localEndPoint.y / Math.tan(bisectorRadians);\n const xFractionAB = Geometry.conditionalDivideFraction(distanceAB - distanceBE - localEndPoint.x, distanceAB);\n const xFractionCB = Geometry.conditionalDivideFraction(distanceCB - distanceBE - localEndPoint.x, distanceCB);\n if (xFractionAB !== undefined && xFractionCB !== undefined) {\n const axesA = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansAB));\n const frameAOrigin = pointA.interpolate(xFractionAB, pointB);\n const frameA = Transform.createRefs(frameAOrigin, axesA);\n const spiralAB = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(spiralTurnRadians),\n spiralLength, undefined, frameA,\n )!;\n const axesB = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansCB));\n const frameBOrigin = pointC.interpolate(xFractionCB, pointB);\n const frameB = Transform.createRefs(frameBOrigin, axesB);\n const spiralBC = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(-spiralTurnRadians),\n spiralLength, undefined, frameB,\n )!;\n return [spiralAB, spiralBC];\n }\n }\n return undefined;\n }\n /**\n * Compute 2 spirals and an arc (all in XY) for a symmetric line-to-line transition.\n * Spiral lengths and arc radius are given (e.g., from design speed standards).\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param pointA inbound start point.\n * @param pointB shoulder (target) point for (both) spiral-to-line tangencies.\n * @param lengthA inbound spiral length.\n * @param lengthB outbound spiral length.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralArcSpiralLine(\n spiralType: IntegratedSpiralTypeName,\n pointA: Point3d,\n pointB: Point3d,\n pointC: Point3d,\n lengthA: number,\n lengthB: number,\n arcRadius: number,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(pointA, pointB); vectorAB.z = 0;\n const vectorCB = Vector3d.createStartEnd(pointC, pointB); vectorCB.z = 0;\n const unitAB = vectorAB.normalize();\n const unitCB = vectorCB.normalize();\n if (unitAB === undefined || unitCB === undefined)\n return undefined;\n const unitPerpAB = unitAB.unitPerpendicularXY();\n const unitPerpCB = unitCB.unitPerpendicularXY();\n const thetaABC = vectorAB.angleToXY(vectorCB);\n const sideA = Geometry.split3WaySign(thetaABC.radians, 1, -1, -1);\n const sideB = - sideA;\n const radiusA = sideA * Math.abs(arcRadius);\n const radiusB = sideB * Math.abs(arcRadius);\n const spiralA = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, radiusA, Angle.zero(), undefined, lengthA, undefined, Transform.createIdentity())!;\n const spiralB = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, radiusB, Angle.zero(), undefined, lengthB, undefined, Transform.createIdentity())!;\n const spiralEndA = spiralA.fractionToPointAndUnitTangent(1.0);\n const spiralEndB = spiralB.fractionToPointAndUnitTangent(1.0);\n // From the end of spiral, step away to arc center (and this is in local coordinates of each spiral)\n const sA = spiralEndA.origin.x - radiusA * spiralEndA.direction.y;\n const tA = spiralEndA.origin.y + radiusA * spiralEndA.direction.x;\n const sB = spiralEndB.origin.x - radiusB * spiralEndB.direction.y;\n const tB = spiralEndB.origin.y + radiusB * spiralEndB.direction.x;\n // Those local coordinates are rotated to unitAB and unitBC ...\n const vectorA = Vector3d.createAdd2Scaled(unitAB, sA, unitPerpAB, tA);\n const vectorB = Vector3d.createAdd2Scaled(unitCB, sB, unitPerpCB, tB);\n const uv = Vector2d.create();\n if (SmallSystem.linearSystem2d(\n unitAB.x, -unitCB.x,\n unitAB.y, -unitCB.y,\n vectorB.x - vectorA.x, vectorB.y - vectorA.y, uv)) {\n const tangencyAB = pointB.plusScaled(unitAB, uv.x);\n const tangencyCB = pointB.plusScaled(unitCB, uv.y);\n const frameA = Transform.createOriginAndMatrixColumns(tangencyAB, unitAB, unitPerpAB, Vector3d.unitZ());\n const frameB = Transform.createOriginAndMatrixColumns(tangencyCB, unitCB, unitPerpCB, Vector3d.unitZ());\n spiralA.tryTransformInPlace(frameA);\n spiralB.tryTransformInPlace(frameB);\n const rayA1 = spiralA.fractionToPointAndUnitTangent(1.0);\n const rayB0 = spiralB.fractionToPointAndUnitTangent(1.0);\n rayB0.direction.scaleInPlace(-1.0);\n const sweep = rayA1.direction.angleToXY(rayB0.direction);\n if (radiusA < 0)\n sweep.setRadians(- sweep.radians);\n const arc = CurveFactory.createArcPointTangentRadius(rayA1.origin, rayA1.direction, radiusA, undefined, sweep)!;\n return [spiralA, arc, spiralB];\n }\n return undefined;\n }\n /** Return the intersection point of 3 planes. */\n public static planePlaneIntersectionRay(\n planeA: PlaneAltitudeEvaluator, planeB: PlaneAltitudeEvaluator): Ray3d | undefined {\n const altitudeA = planeA.altitudeXYZ(0, 0, 0);\n const altitudeB = planeB.altitudeXYZ(0, 0, 0);\n const normalAx = planeA.normalX();\n const normalAy = planeA.normalY();\n const normalAz = planeA.normalZ();\n const normalBx = planeB.normalX();\n const normalBy = planeB.normalY();\n const normalBz = planeB.normalZ();\n const normalCx = Geometry.crossProductXYXY(normalAy, normalAz, normalBy, normalBz);\n const normalCy = Geometry.crossProductXYXY(normalAz, normalAx, normalBz, normalBx);\n const normalCz = Geometry.crossProductXYXY(normalAx, normalAy, normalBx, normalBy);\n const rayOrigin = SmallSystem.linearSystem3d(\n normalAx, normalAy, normalAz,\n normalBx, normalBy, normalBz,\n normalCx, normalCy, normalCz,\n -altitudeA, -altitudeB, 0.0);\n if (rayOrigin !== undefined) {\n return Ray3d.createXYZUVW(rayOrigin.x, rayOrigin.y, rayOrigin.z, normalCx, normalCy, normalCz);\n }\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CurveFactory.js","sourceRoot":"","sources":["../../../src/curve/CurveFactory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAA0B,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAg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QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,MAAM,SAAS,GAAG,WAAW,CAAC,cAAc,CAC1C,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAC5B,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjG,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { AxisIndex, AxisOrder, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { AngleSweep } from \"../geometry3d/AngleSweep\";\nimport { Ellipsoid, GeodesicPathPoint } from \"../geometry3d/Ellipsoid\";\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3dArrayCarrier } from \"../geometry3d/Point3dArrayCarrier\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolylineOps } from \"../geometry3d/PolylineOps\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Segment1d } from \"../geometry3d/Segment1d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { XAndY } from \"../geometry3d/XYZProps\";\nimport { SmallSystem } from \"../numerics/SmallSystem\";\nimport { IndexedPolyface } from \"../polyface/Polyface\";\nimport { PolyfaceBuilder } from \"../polyface/PolyfaceBuilder\";\nimport { Cone } from \"../solid/Cone\";\nimport { RuledSweep } from \"../solid/RuledSweep\";\nimport { TorusPipe } from \"../solid/TorusPipe\";\nimport { Arc3d, ArcBlendData } from \"./Arc3d\";\nimport { CurveChain } from \"./CurveCollection\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { AnyCurve, AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { LineSegment3d } from \"./LineSegment3d\";\nimport { LineString3d } from \"./LineString3d\";\nimport { Loop } from \"./Loop\";\nimport { Path } from \"./Path\";\nimport { RegionOps } from \"./RegionOps\";\nimport { IntegratedSpiral3d } from \"./spiral/IntegratedSpiral3d\";\nimport { IntegratedSpiralTypeName } from \"./spiral/TransitionSpiral3d\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n/**\n * Interface to carry parallel arrays of planes and sections, and optional geometry assembled from them,\n * as returned by [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport interface SectionSequenceWithPlanes {\n /** The plane of each section. */\n planes: Plane3dByOriginAndUnitNormal[];\n /** Section curve projected onto the corresponding plane. */\n sections: AnyCurve[];\n /**\n * Optional `RuledSweep` generated from the sections.\n * * The `RuledSweep` and sections array refer to the same section objects.\n */\n ruledSweep?: RuledSweep;\n /** Optional mesh generated from the `RuledSweep` generated from the sections. */\n mesh?: IndexedPolyface;\n}\n\n/**\n * Enumeration of geometric output for [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport enum MiteredSweepOutputSelect {\n /** Output only the parallel arrays of planes and sections. */\n Sections = 0,\n /** Output planes and sections, as well as the assembled ruled sweep. */\n AlsoRuledSweep = 1,\n /** Output planes and sections, as well as the assembled ruled sweep and its stroked mesh. */\n AlsoMesh = 2,\n}\n\n/**\n * Interface bundling options for [CurveFactory.createMiteredSweepSections].\n * @public\n */\nexport interface MiteredSweepOptions {\n /** Whether first and last planes are averaged and equated when the centerline is physically closed. Default value is `false`. */\n wrapIfPhysicallyClosed?: boolean;\n /** Whether to output sections only, or sections plus optional geometry constructed from them. Default value is `MiteredSweepOutputSelect.Sections`. */\n outputSelect?: MiteredSweepOutputSelect;\n /** How to stroke smooth input curves. If undefined, default stroke options are used. */\n strokeOptions?: StrokeOptions;\n /** Whether to cap the ruled sweep if outputting a ruled sweep or mesh. Default value is `false`. */\n capped?: boolean;\n /** The first section's normal is aligned to this vector, typically the start tangent of the smooth curve stroked for the centerline. */\n startTangent?: Vector3d;\n /** The last section's normal is aligned to this vector, typically the end tangent of the smooth curve stroked for the centerline. */\n endTangent?: Vector3d;\n}\n\n/**\n * Curve strokes plus start/end tangents.\n * @internal\n*/\ninterface SmoothCurveData {\n /** Samples along a curve. */\n strokes: IndexedXYZCollection;\n /** Start tangent (unnormalized). May be undefined if the curve is linear. */\n startTangent?: Vector3d;\n /** End tangent (unnormalized). May be undefined if the curve is linear. */\n endTangent?: Vector3d;\n};\n\n/**\n * The `CurveFactory` class contains methods for specialized curve constructions.\n * @public\n */\nexport class CurveFactory {\n /** (Cautiously) construct and save a line segment between fractional positions. */\n private static addPartialSegment(\n path: Path, allowBackup: boolean,\n pointA: Point3d | undefined, pointB: Point3d | undefined,\n fraction0: number, fraction1: number,\n ) {\n if (allowBackup || (fraction1 > fraction0)) {\n if (pointA !== undefined && pointB !== undefined && !Geometry.isAlmostEqualNumber(fraction0, fraction1))\n path.tryAddChild(LineSegment3d.create(pointA.interpolate(fraction0, pointB), pointA.interpolate(fraction1, pointB)));\n }\n }\n /**\n * Create a circular arc defined by start point, tangent at start point, and end point.\n * * The circular arc is swept from start to end toward direction of the `tangentAtStart`.\n * * If tangent is parallel to line segment from start to end, return `undefined`.\n */\n public static createArcPointTangentPoint(start: Point3d, tangentAtStart: Vector3d, end: Point3d): Arc3d | undefined {\n const ret = Arc3d.createCircularStartTangentEnd(start, tangentAtStart, end);\n if (ret instanceof Arc3d)\n return ret;\n else\n return undefined;\n }\n /**\n * Construct a sequence of alternating lines and arcs with the arcs creating tangent transition between consecutive edges.\n * * If the radius parameter is a number, that radius is used throughout.\n * * If the radius parameter is an array of numbers, `radius[i]` is applied at `point[i]`.\n * * Note that since no fillet is constructed at the initial or final point, those entries in `radius[]` are never referenced.\n * * A zero radius for any point indicates to leave the as a simple corner.\n * @param points point source\n * @param radius fillet radius or array of radii indexed to correspond to the points.\n * @param allowBackupAlongEdge true to allow edges to be created going \"backwards\" along edges if needed to create the blend.\n */\n public static createFilletsInLineString(\n points: LineString3d | IndexedXYZCollection | Point3d[],\n radius: number | number[],\n allowBackupAlongEdge: boolean = true,\n ): Path | undefined {\n if (Array.isArray(points))\n return this.createFilletsInLineString(new Point3dArrayCarrier(points), radius, allowBackupAlongEdge);\n if (points instanceof LineString3d)\n return this.createFilletsInLineString(points.packedPoints, radius, allowBackupAlongEdge);\n const n = points.length;\n if (n <= 1)\n return undefined;\n const pointA = points.getPoint3dAtCheckedPointIndex(0)!;\n const pointB = points.getPoint3dAtCheckedPointIndex(1)!;\n // remark: n=2 and n=3 cases should fall out from loop logic\n const blendArray: ArcBlendData[] = [];\n // build one-sided blends at each end . .\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointA.clone() });\n for (let i = 1; i + 1 < n; i++) {\n const pointC = points.getPoint3dAtCheckedPointIndex(i + 1)!;\n let thisRadius = 0;\n if (Array.isArray(radius)) {\n if (i < radius.length)\n thisRadius = radius[i];\n } else if (Number.isFinite(radius))\n thisRadius = radius;\n if (thisRadius !== 0.0)\n blendArray.push(Arc3d.createFilletArc(pointA, pointB, pointC, thisRadius));\n else\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointB.clone() });\n pointA.setFromPoint3d(pointB);\n pointB.setFromPoint3d(pointC);\n }\n blendArray.push({ fraction10: 0.0, fraction12: 0.0, point: pointB.clone() });\n if (!allowBackupAlongEdge) {\n // suppress arcs that have overlap with both neighbors or flood either neighbor ..\n for (let i = 1; i + 1 < n; i++) {\n const b = blendArray[i];\n if (b.fraction10 > 1.0\n || b.fraction12 > 1.0\n || 1.0 - b.fraction10 < blendArray[i - 1].fraction12\n || b.fraction12 > 1.0 - blendArray[i + 1].fraction10) {\n b.fraction10 = 0.0;\n b.fraction12 = 0.0;\n blendArray[i].arc = undefined;\n }\n }\n /* The \"1-b\" logic above prevents this loop from ever doing anything.\n // on edge with conflict, suppress the arc with larger fraction\n for (let i = 1; i < n; i++) {\n const b0 = blendArray[i - 1];\n const b1 = blendArray[i];\n if (b0.fraction12 > 1 - b1.fraction10) {\n const b = b0.fraction12 > b1.fraction12 ? b1 : b0;\n b.fraction10 = 0.0;\n b.fraction12 = 0.0;\n blendArray[i].arc = undefined;\n }\n } */\n }\n const path = Path.create();\n this.addPartialSegment(\n path, allowBackupAlongEdge,\n blendArray[0].point, blendArray[1].point,\n blendArray[0].fraction12, 1.0 - blendArray[1].fraction10,\n );\n // add each path and successor edge ...\n for (let i = 1; i + 1 < points.length; i++) {\n const b0 = blendArray[i];\n const b1 = blendArray[i + 1];\n path.tryAddChild(b0.arc);\n this.addPartialSegment(path, allowBackupAlongEdge, b0.point, b1.point, b0.fraction12, 1.0 - b1.fraction10);\n }\n return path;\n }\n /**\n * Create a `Loop` with given xy corners and fixed z.\n * * The corners always proceed counter clockwise from lower left.\n * * If the radius is too large for the outer rectangle size, it is reduced to half of the the smaller x or y size.\n */\n public static createRectangleXY(\n x0: number, y0: number, x1: number, y1: number, z: number = 0, filletRadius?: number,\n ): Loop {\n let radius = Geometry.correctSmallMetricDistance(filletRadius);\n const xMin = Math.min(x0, x1);\n const xMax = Math.max(x0, x1);\n const yMin = Math.min(y0, y1);\n const yMax = Math.max(y0, y1);\n radius = Math.min(Math.abs(radius), 0.5 * (xMax - xMin), 0.5 * (yMax - yMin));\n if (radius === 0.0)\n return Loop.createPolygon([\n Point3d.create(xMin, yMin, z),\n Point3d.create(xMax, yMin, z),\n Point3d.create(xMax, yMax, z),\n Point3d.create(xMin, yMax, z),\n Point3d.create(xMin, yMin, z),\n ]);\n else {\n const vectorU = Vector3d.create(radius, 0, 0);\n const vectorV = Vector3d.create(0, radius, 0);\n const x0A = xMin + radius;\n const y0A = yMin + radius;\n const x1A = xMax - radius;\n const y1A = yMax - radius;\n const centers = [\n Point3d.create(x1A, y1A, z),\n Point3d.create(x0A, y1A, z),\n Point3d.create(x0A, y0A, z),\n Point3d.create(x1A, y0A, z),\n ];\n const loop = Loop.create();\n for (let i = 0; i < 4; i++) {\n const center = centers[i];\n const nextCenter = centers[(i + 1) % 4];\n const edgeVector = Vector3d.createStartEnd(center, nextCenter);\n const arc = Arc3d.create(center, vectorU, vectorV, AngleSweep.createStartEndDegrees(0, 90));\n loop.tryAddChild(arc);\n const arcEnd = arc.endPoint();\n if (!edgeVector.isAlmostZero)\n loop.tryAddChild(LineSegment3d.create(arcEnd, arcEnd.plus(edgeVector)));\n vectorU.rotate90CCWXY(vectorU);\n vectorV.rotate90CCWXY(vectorV);\n }\n return loop;\n }\n }\n /**\n * If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB`\n * * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.\n * @param arcA first arc, modified in place.\n * @param arcB second arc, unmodified.\n * @param allowReversed whether to consolidate even when second arc is reversed (default is `false`).\n * @param tolerance optional coordinate tolerance for point equality (default is `Geometry.smallMetricDistance`).\n * @returns whether `arcA` was modified.\n */\n public static appendToArcInPlace(arcA: Arc3d, arcB: Arc3d, allowReverse: boolean = false, tolerance: number = Geometry.smallMetricDistance): boolean {\n if (arcA.center.isAlmostEqual(arcB.center, tolerance)) {\n const sweepSign = Geometry.split3WaySign(arcA.sweep.sweepRadians * arcB.sweep.sweepRadians, -1, 0, 1);\n // evaluate derivatives wrt radians (not fraction!), but adjust direction for sweep signs\n const endA = arcA.angleToPointAndDerivative(arcA.sweep.fractionToAngle(1.0));\n if (arcA.sweep.sweepRadians < 0)\n endA.direction.scaleInPlace(-1.0);\n const startB = arcB.angleToPointAndDerivative(arcB.sweep.fractionToAngle(0.0));\n if (arcB.sweep.sweepRadians < 0)\n startB.direction.scaleInPlace(-1.0);\n if (endA.isAlmostEqual(startB, tolerance)) {\n arcA.sweep.setStartEndRadians(\n arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians + sweepSign * arcB.sweep.sweepRadians,\n );\n return true;\n }\n // Also ok if negated tangent\n if (allowReverse) {\n startB.direction.scaleInPlace(-1.0);\n if (endA.isAlmostEqual(startB, tolerance)) {\n arcA.sweep.setStartEndRadians(\n arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians - sweepSign * arcB.sweep.sweepRadians,\n );\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Return a `Path` containing arcs are on the surface of an ellipsoid and pass through a sequence of points.\n * * Each arc passes through the two given endpoints and in the plane containing the true surface normal at\n * given `fractionForIntermediateNormal`\n * @param ellipsoid\n * @param pathPoints\n * @param fractionForIntermediateNormal fractional position for surface normal used to create the section plane.\n */\n public static assembleArcChainOnEllipsoid(\n ellipsoid: Ellipsoid, pathPoints: GeodesicPathPoint[], fractionForIntermediateNormal: number = 0.5,\n ): Path {\n const arcPath = Path.create();\n for (let i = 0; i + 1 < pathPoints.length; i++) {\n const arc = ellipsoid.sectionArcWithIntermediateNormal(\n pathPoints[i].toAngles(),\n fractionForIntermediateNormal,\n pathPoints[i + 1].toAngles());\n arcPath.tryAddChild(arc);\n }\n return arcPath;\n }\n private static appendGeometryQueryArray(candidate: GeometryQuery | GeometryQuery[] | undefined, result: GeometryQuery[]) {\n if (candidate instanceof GeometryQuery)\n result.push(candidate);\n else if (Array.isArray(candidate)) {\n for (const p of candidate)\n this.appendGeometryQueryArray(p, result);\n }\n }\n /**\n * Create solid primitives for pipe segments (e.g. Cone or TorusPipe) around line and arc primitives.\n * @param centerline centerline geometry.\n * @param pipeRadius radius of pipe.\n */\n public static createPipeSegments(\n centerline: CurvePrimitive | CurveChain, pipeRadius: number,\n ): GeometryQuery | GeometryQuery[] | undefined {\n if (centerline instanceof LineSegment3d) {\n return Cone.createAxisPoints(centerline.startPoint(), centerline.endPoint(), pipeRadius, pipeRadius, false);\n } else if (centerline instanceof Arc3d) {\n return TorusPipe.createAlongArc(centerline, pipeRadius, false);\n } else if (centerline instanceof CurvePrimitive) {\n const builder = PolyfaceBuilder.create();\n builder.addMiteredPipes(centerline, pipeRadius);\n return builder.claimPolyface();\n } else if (centerline instanceof CurveChain) {\n const result: GeometryQuery[] = [];\n for (const p of centerline.children) {\n const pipe = this.createPipeSegments(p, pipeRadius);\n this.appendGeometryQueryArray(pipe, result);\n }\n return result;\n }\n return undefined;\n }\n /** Get start point and tangent for variant curve data. */\n private static startPointAndTangent(curve: IndexedXYZCollection | Point3d[] | CurvePrimitive): Ray3d | undefined {\n if (curve instanceof CurvePrimitive)\n return curve.fractionToPointAndDerivative(0.0);\n if (curve.length < 2)\n return undefined;\n if (Array.isArray(curve))\n curve = new Point3dArrayCarrier(curve);\n const ray = Ray3d.createZero();\n curve.getPoint3dAtUncheckedPointIndex(0, ray.origin);\n curve.vectorIndexIndex(0, 1, ray.direction);\n return ray;\n };\n /** Create an [[Arc3d]] from `sectionData` that has its center at the start point of the centerline. */\n public static createArcFromSectionData(\n centerline: IndexedXYZCollection | Point3d[] | CurvePrimitive, sectionData: number | XAndY | Arc3d,\n ): Arc3d | undefined {\n const ray = CurveFactory.startPointAndTangent(centerline);\n if (!ray)\n return undefined;\n let arc: Arc3d;\n if (sectionData instanceof Arc3d) {\n arc = sectionData.clone();\n arc.center = ray.origin;\n } else {\n const vector0 = Vector3d.create();\n const vector90 = Vector3d.create();\n const length0 = (typeof sectionData === \"number\") ? sectionData : sectionData.x;\n const length90 = (typeof sectionData === \"number\") ? sectionData : sectionData.y;\n const baseFrame = Matrix3d.createRigidHeadsUp(ray.direction, AxisOrder.ZXY);\n baseFrame.columnX(vector0).scaleInPlace(length0);\n baseFrame.columnY(vector90).scaleInPlace(length90);\n arc = Arc3d.create(ray.origin, vector0, vector90);\n }\n if (arc.binormalVector().dotProduct(ray.direction) < 0.0)\n arc.reverseInPlace();\n return arc;\n }\n /**\n * Create section arcs for mitered pipe.\n * * At the end of each pipe segment, the pipe is mitered by the plane that bisects the angle between successive\n * centerline segments.\n * * The section arcs are constructed so that lines between corresponding fractional positions on the arcs are\n * axial lines on the pipes.\n * * This means that the initial arc's vector0 and vector90 lengths and angular separation are _not_ preserved in\n * the section arcs.\n * * Circular or elliptical pipe cross sections can be specified by supplying either a radius, a pair of semi-axis\n * lengths, or an Arc3d:\n * * For semi-axis length input, x and y correspond to ellipse local axes perpendicular to each other and to the\n * start tangent.\n * * For Arc3d input, the center is translated to the centerline start point. For best results, ensure this arc\n * is perpendicular to the centerline start tangent.\n * * This function internally calls [[createMiteredSweepSections]] with default options.\n * @param centerline centerline of pipe. For best results, ensure no successive duplicate points with e.g.,\n * [[GrowableXYZArray.createCompressed]].\n * @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d (if not full, function makes it full).\n * @returns array of sections or empty array if section creation failed.\n */\n public static createMiteredPipeSections(centerline: IndexedXYZCollection, sectionData: number | XAndY | Arc3d): Arc3d[] {\n const arc = CurveFactory.createArcFromSectionData(centerline, sectionData);\n if (!arc)\n return [];\n const miteredSweeps = CurveFactory.createMiteredSweepSections(centerline, arc);\n if (miteredSweeps)\n return miteredSweeps.sections as Arc3d[];\n return [];\n }\n\n /** For a smooth curve, stroke and return unnormalized start/end tangents. */\n private static strokeSmoothCurve(\n curve: IndexedXYZCollection | Point3d[] | CurvePrimitive | CurveChain,\n options?: StrokeOptions,\n ): SmoothCurveData | undefined {\n let startTangent, endTangent: Vector3d | undefined;\n if (curve instanceof CurvePrimitive) {\n startTangent = curve.fractionToPointAndDerivative(0.0).direction;\n endTangent = curve.fractionToPointAndDerivative(1.0).direction;\n const strokes = LineString3d.create();\n curve.emitStrokes(strokes, options);\n curve = strokes.packedPoints;\n } else if (curve instanceof CurveChain) {\n startTangent = curve.startPointAndDerivative()?.direction;\n endTangent = curve.endPointAndDerivative()?.direction;\n const strokes = curve.getPackedStrokes(options);\n if (!strokes)\n return undefined;\n curve = strokes;\n } else if (Array.isArray(curve))\n curve = new Point3dArrayCarrier(curve);\n return { strokes: curve, startTangent, endTangent };\n }\n\n /**\n * Align two bisector plane normals to given smooth rail tangents or optional overrides.\n * * Optionally average the normals for physically closed rail.\n */\n private static alignFirstAndLastBisectorPlanes(\n firstPlane: Plane3dByOriginAndUnitNormal,\n lastPlane: Plane3dByOriginAndUnitNormal,\n smoothRailData?: SmoothCurveData,\n options?: MiteredSweepOptions,\n ) {\n const normal0 = options?.startTangent ?? (smoothRailData?.startTangent ?? firstPlane.getNormalRef());\n const normal1 = options?.endTangent ?? (smoothRailData?.endTangent ?? lastPlane.getNormalRef());\n if (options?.wrapIfPhysicallyClosed && firstPlane.getOriginRef().isAlmostEqual(lastPlane.getOriginRef())) {\n const avgNormal = normal0.plus(normal1);\n if (avgNormal.tryNormalizeInPlace()) { // ignore cusp at seam\n firstPlane.getNormalRef().setFrom(avgNormal);\n lastPlane.getNormalRef().setFrom(avgNormal);\n return;\n }\n }\n if (normal0.tryNormalizeInPlace())\n firstPlane.getNormalRef().setFrom(normal0);\n if (normal1.tryNormalizeInPlace())\n lastPlane.getNormalRef().setFrom(normal1);\n }\n\n /** Reverse a closed curve or region if necessary so that its orientation is CCW with respect to the plane normal. */\n private static alignClosedCurveToPlane(curve: AnyCurve, planeNormal: Vector3d) {\n let closedCurve: AnyRegion | undefined;\n if (curve instanceof CurvePrimitive) {\n if (curve.startPoint().isAlmostEqual(curve.endPoint()))\n closedCurve = Loop.create(curve);\n } else if (curve.isAnyRegion())\n closedCurve = curve;\n if (closedCurve) {\n // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.\n const toLocal = Matrix3d.createRigidHeadsUp(planeNormal).transpose();\n const projection = closedCurve.cloneTransformed(Transform.createOriginAndMatrix(undefined, toLocal));\n if (projection) { // now we can ignore z-coords\n const areaXY = RegionOps.computeXYArea(projection as AnyRegion);\n if (areaXY && areaXY < 0)\n curve.reverseInPlace();\n }\n }\n }\n\n /**\n * Projection to target plane, constructing sweep direction from two given planes.\n * * If successful, push the target plane and swept section to the output arrays and return the swept section.\n * * If unsuccessful, leave the output arrays alone and return the input section.\n */\n private static doSweepToPlane(\n output: SectionSequenceWithPlanes,\n edgePlane0: Plane3dByOriginAndUnitNormal,\n edgePlane1: Plane3dByOriginAndUnitNormal,\n targetPlane: Plane3dByOriginAndUnitNormal,\n section: AnyCurve,\n ): AnyCurve {\n const sweepVector = Vector3d.createStartEnd(edgePlane0.getOriginRef(), edgePlane1.getOriginRef());\n const transform = Transform.createFlattenAlongVectorToPlane(\n sweepVector, targetPlane.getOriginRef(), targetPlane.getNormalRef(),\n );\n if (transform === undefined)\n return section;\n const transformedSection = section.cloneTransformed(transform);\n if (transformedSection === undefined)\n return section;\n output.planes.push(targetPlane);\n output.sections.push(transformedSection);\n return transformedSection;\n }\n\n /**\n * Sweep the `initialSection` along each segment of the (stroked) `centerline` until it hits the bisector plane at\n * the next vertex.\n * * For best results, the caller should place `initialSection` in a plane perpendicular to the `centerline`\n * start tangent.\n * * This plane is commonly (but not necessarily) through the centerline start point itself.\n * * To compute the sections, `initialSection` is projected in the direction of the centerline start tangent onto\n * the first bisector plane at the centerline start. The result of this projection will be likewise projected onto\n * the second plane, and so on in sequence.\n * * By default, the first/last bisector plane normals are set to the centerline start/end tangents. The caller can\n * override these with tangents supplied in `options`. If the centerline is physically closed and\n * `options.wrapIfPhysicallyClosed` is true, the first and last plane normals are averaged and equated.\n * * The centerline path does NOT have to be planar, however non-planarity will result in twisting of the sections\n * in the bisector planes.\n * @param centerline sweep path. Will be stroked if smooth.\n * @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the\n * centerline start tangent.\n * @param options options for computation and output.\n * @return array of sections, formed from projecting `initialSection` successively onto the bisector planes.\n */\n public static createMiteredSweepSections(\n centerline: IndexedXYZCollection | Point3d[] | CurvePrimitive | CurveChain,\n initialSection: AnyCurve,\n options?: MiteredSweepOptions,\n ): SectionSequenceWithPlanes | undefined {\n if (!options)\n options = {};\n const rail = this.strokeSmoothCurve(centerline, options.strokeOptions);\n if (!rail)\n return undefined;\n const planes = PolylineOps.createBisectorPlanesForDistinctPoints(rail.strokes);\n if (!planes || planes.length < 2)\n return undefined;\n this.alignFirstAndLastBisectorPlanes(planes[0], planes[planes.length - 1], rail, options);\n\n // RuledSweep facet construction assumes the contours are oriented CCW with respect to the sweep direction so that\n // facet normals point outward. We only have to align the first contour; the rest will inherit its orientation.\n this.alignClosedCurveToPlane(initialSection, planes[0].getNormalRef());\n\n const sectionData: SectionSequenceWithPlanes = { sections: [], planes: [] };\n let currentSection = this.doSweepToPlane(sectionData, planes[0], planes[1], planes[0], initialSection);\n for (let i = 1; i < planes.length; i++)\n currentSection = this.doSweepToPlane(sectionData, planes[i - 1], planes[i], planes[i], currentSection);\n\n if (options.outputSelect) {\n const ruledSweep = RuledSweep.create(sectionData.sections, options.capped ?? false);\n if (ruledSweep) {\n sectionData.ruledSweep = ruledSweep;\n if (MiteredSweepOutputSelect.AlsoMesh === options.outputSelect) {\n const builder = PolyfaceBuilder.create(options.strokeOptions);\n builder.addRuledSweep(ruledSweep);\n sectionData.mesh = builder.claimPolyface();\n }\n }\n }\n return sectionData;\n }\n /**\n * Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep.\n * * The vector from start point to center is in the direction of upVector crossed with tangentA.\n * @param start start point.\n * @param tangentAtStart vector in tangent direction at the start.\n * @param radius signed radius.\n * @param upVector optional out-of-plane vector. Defaults to positive Z.\n * @param sweep angular range. If single `Angle` is given, start angle is at 0 degrees (the start point).\n */\n public static createArcPointTangentRadius(\n start: Point3d, tangentAtStart: Vector3d, radius: number, upVector?: Vector3d, sweep?: Angle | AngleSweep,\n ): Arc3d | undefined {\n return Arc3d.createCircularStartTangentRadius(start, tangentAtStart, radius, upVector, sweep);\n }\n /**\n * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.\n * * First spiral begins at given start point.\n * * first tangent aims at shoulder.\n * * outbound spiral joins line from shoulder to target.\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param startPoint inbound start point.\n * @param shoulder point target point for (both) spiral-to-line tangencies.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralSpiralLine(\n spiralType: IntegratedSpiralTypeName,\n startPoint: Point3d,\n shoulderPoint: Point3d,\n targetPoint: Point3d,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(startPoint, shoulderPoint);\n const vectorBC0 = Vector3d.createStartEnd(shoulderPoint, targetPoint);\n const referenceLength = vectorAB.magnitude();\n const radiansAB = Math.atan2(vectorAB.y, vectorAB.x);\n const lineTurnRadians = vectorAB.angleToXY(vectorBC0);\n const spiralTurnRadians = 0.5 * lineTurnRadians.radians;\n const radiansBC = radiansAB + lineTurnRadians.radians;\n const axesA = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansAB));\n const frameA = Transform.createRefs(startPoint.clone(), axesA);\n // We know how much it has to turn, and but not the length or end radius.\n // make a spiral of referenceLength and scale it back to the junction line\n const spiralARefLength = IntegratedSpiral3d.createFrom4OutOf5(spiralType, 0.0, undefined,\n Angle.createRadians(0), Angle.createRadians(spiralTurnRadians), referenceLength, undefined, frameA);\n if (spiralARefLength) {\n const midPlanePerpendicularRadians = radiansAB + spiralTurnRadians;\n const midPlanePerpendicularVector = Vector3d.createPolar(1.0, Angle.createRadians(midPlanePerpendicularRadians));\n const altitudeB = midPlanePerpendicularVector.dotProductStartEnd(startPoint, shoulderPoint);\n const altitudeSpiralEnd = midPlanePerpendicularVector.dotProductStartEnd(startPoint, spiralARefLength.endPoint());\n const scaleFactor = altitudeB / altitudeSpiralEnd;\n const spiralA = IntegratedSpiral3d.createFrom4OutOf5(spiralType, 0.0, undefined,\n Angle.createRadians(0), Angle.createRadians(spiralTurnRadians), referenceLength * scaleFactor, undefined, frameA)!;\n const distanceAB = vectorAB.magnitude();\n const vectorBC = Vector3d.createStartEnd(shoulderPoint, targetPoint);\n vectorBC.scaleToLength(distanceAB, vectorBC);\n const pointC = shoulderPoint.plus(vectorBC);\n const axesC = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansBC + Math.PI));\n const frameC = Transform.createRefs(pointC, axesC);\n const spiralC = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, -spiralA.radius01.x1, Angle.zero(), undefined, spiralA.curveLength(), Segment1d.create(1, 0), frameC)!;\n return [spiralA, spiralC];\n }\n return undefined;\n }\n /**\n * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.\n * * Spiral length is given.\n * * tangency points float on both lines.\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param pointA inbound start point.\n * @param shoulder point target point for (both) spiral-to-line tangencies.\n * @param spiralLength for each part of the spiral pair.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralSpiralLineWithSpiralLength(\n spiralType: IntegratedSpiralTypeName,\n pointA: Point3d,\n pointB: Point3d,\n pointC: Point3d,\n spiralLength: number,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(pointA, pointB);\n const vectorBC = Vector3d.createStartEnd(pointB, pointC);\n const radiansAB = Math.atan2(vectorAB.y, vectorAB.x);\n const lineTurnAngle = vectorAB.angleToXY(vectorBC);\n const spiralTurnRadians = 0.5 * lineTurnAngle.radians;\n const bisectorRadians = 0.5 * (Math.PI - lineTurnAngle.radians);\n const radiansCB = Math.atan2(-vectorBC.y, -vectorBC.x);\n const spiralAB0 = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(spiralTurnRadians),\n spiralLength, undefined, Transform.createIdentity(),\n );\n if (spiralAB0) {\n const localEndPoint = spiralAB0.fractionToPoint(1);\n const distanceAB = pointA.distance(pointB);\n const distanceCB = pointC.distance(pointB);\n // The spiral eventually has to end on the bisector, at localEndPoint.y height from the inbound line\n // distance from shoulder to projection of that point to point E on the inbound line is\n const distanceBE = localEndPoint.y / Math.tan(bisectorRadians);\n const xFractionAB = Geometry.conditionalDivideFraction(distanceAB - distanceBE - localEndPoint.x, distanceAB);\n const xFractionCB = Geometry.conditionalDivideFraction(distanceCB - distanceBE - localEndPoint.x, distanceCB);\n if (xFractionAB !== undefined && xFractionCB !== undefined) {\n const axesA = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansAB));\n const frameAOrigin = pointA.interpolate(xFractionAB, pointB);\n const frameA = Transform.createRefs(frameAOrigin, axesA);\n const spiralAB = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(spiralTurnRadians),\n spiralLength, undefined, frameA,\n )!;\n const axesB = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(radiansCB));\n const frameBOrigin = pointC.interpolate(xFractionCB, pointB);\n const frameB = Transform.createRefs(frameBOrigin, axesB);\n const spiralBC = IntegratedSpiral3d.createFrom4OutOf5(\n spiralType, 0, undefined,\n Angle.zero(), Angle.createRadians(-spiralTurnRadians),\n spiralLength, undefined, frameB,\n )!;\n return [spiralAB, spiralBC];\n }\n }\n return undefined;\n }\n /**\n * Compute 2 spirals and an arc (all in XY) for a symmetric line-to-line transition.\n * Spiral lengths and arc radius are given (e.g., from design speed standards).\n * @param spiralType name of spiral type. THIS MUST BE AN \"Integrated\" SPIRAL TYPE.\n * @param pointA inbound start point.\n * @param pointB shoulder (target) point for (both) spiral-to-line tangencies.\n * @param lengthA inbound spiral length.\n * @param lengthB outbound spiral length.\n * @return array with the computed spirals, or undefined if failure.\n */\n public static createLineSpiralArcSpiralLine(\n spiralType: IntegratedSpiralTypeName,\n pointA: Point3d,\n pointB: Point3d,\n pointC: Point3d,\n lengthA: number,\n lengthB: number,\n arcRadius: number,\n ): GeometryQuery[] | undefined {\n const vectorAB = Vector3d.createStartEnd(pointA, pointB); vectorAB.z = 0;\n const vectorCB = Vector3d.createStartEnd(pointC, pointB); vectorCB.z = 0;\n const unitAB = vectorAB.normalize();\n const unitCB = vectorCB.normalize();\n if (unitAB === undefined || unitCB === undefined)\n return undefined;\n const unitPerpAB = unitAB.unitPerpendicularXY();\n const unitPerpCB = unitCB.unitPerpendicularXY();\n const thetaABC = vectorAB.angleToXY(vectorCB);\n const sideA = Geometry.split3WaySign(thetaABC.radians, 1, -1, -1);\n const sideB = - sideA;\n const radiusA = sideA * Math.abs(arcRadius);\n const radiusB = sideB * Math.abs(arcRadius);\n const spiralA = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, radiusA, Angle.zero(), undefined, lengthA, undefined, Transform.createIdentity())!;\n const spiralB = IntegratedSpiral3d.createFrom4OutOf5(spiralType,\n 0, radiusB, Angle.zero(), undefined, lengthB, undefined, Transform.createIdentity())!;\n const spiralEndA = spiralA.fractionToPointAndUnitTangent(1.0);\n const spiralEndB = spiralB.fractionToPointAndUnitTangent(1.0);\n // From the end of spiral, step away to arc center (and this is in local coordinates of each spiral)\n const sA = spiralEndA.origin.x - radiusA * spiralEndA.direction.y;\n const tA = spiralEndA.origin.y + radiusA * spiralEndA.direction.x;\n const sB = spiralEndB.origin.x - radiusB * spiralEndB.direction.y;\n const tB = spiralEndB.origin.y + radiusB * spiralEndB.direction.x;\n // Those local coordinates are rotated to unitAB and unitBC ...\n const vectorA = Vector3d.createAdd2Scaled(unitAB, sA, unitPerpAB, tA);\n const vectorB = Vector3d.createAdd2Scaled(unitCB, sB, unitPerpCB, tB);\n const uv = Vector2d.create();\n if (SmallSystem.linearSystem2d(\n unitAB.x, -unitCB.x,\n unitAB.y, -unitCB.y,\n vectorB.x - vectorA.x, vectorB.y - vectorA.y, uv)) {\n const tangencyAB = pointB.plusScaled(unitAB, uv.x);\n const tangencyCB = pointB.plusScaled(unitCB, uv.y);\n const frameA = Transform.createOriginAndMatrixColumns(tangencyAB, unitAB, unitPerpAB, Vector3d.unitZ());\n const frameB = Transform.createOriginAndMatrixColumns(tangencyCB, unitCB, unitPerpCB, Vector3d.unitZ());\n spiralA.tryTransformInPlace(frameA);\n spiralB.tryTransformInPlace(frameB);\n const rayA1 = spiralA.fractionToPointAndUnitTangent(1.0);\n const rayB0 = spiralB.fractionToPointAndUnitTangent(1.0);\n rayB0.direction.scaleInPlace(-1.0);\n const sweep = rayA1.direction.angleToXY(rayB0.direction);\n if (radiusA < 0)\n sweep.setRadians(- sweep.radians);\n const arc = CurveFactory.createArcPointTangentRadius(rayA1.origin, rayA1.direction, radiusA, undefined, sweep)!;\n return [spiralA, arc, spiralB];\n }\n return undefined;\n }\n /** Return the intersection point of 3 planes. */\n public static planePlaneIntersectionRay(\n planeA: PlaneAltitudeEvaluator, planeB: PlaneAltitudeEvaluator): Ray3d | undefined {\n const altitudeA = planeA.altitudeXYZ(0, 0, 0);\n const altitudeB = planeB.altitudeXYZ(0, 0, 0);\n const normalAx = planeA.normalX();\n const normalAy = planeA.normalY();\n const normalAz = planeA.normalZ();\n const normalBx = planeB.normalX();\n const normalBy = planeB.normalY();\n const normalBz = planeB.normalZ();\n const normalCx = Geometry.crossProductXYXY(normalAy, normalAz, normalBy, normalBz);\n const normalCy = Geometry.crossProductXYXY(normalAz, normalAx, normalBz, normalBx);\n const normalCz = Geometry.crossProductXYXY(normalAx, normalAy, normalBx, normalBy);\n const rayOrigin = SmallSystem.linearSystem3d(\n normalAx, normalAy, normalAz,\n normalBx, normalBy, normalBz,\n normalCx, normalCy, normalCz,\n -altitudeA, -altitudeB, 0.0);\n if (rayOrigin !== undefined) {\n return Ray3d.createXYZUVW(rayOrigin.x, rayOrigin.y, rayOrigin.z, normalCx, normalCy, normalCz);\n }\n return undefined;\n }\n}\n"]}
|
|
@@ -37,19 +37,19 @@ export declare enum CurveSearchStatus {
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
export declare class CurveLocationDetail {
|
|
40
|
-
/** The curve being evaluated */
|
|
40
|
+
/** The curve being evaluated. */
|
|
41
41
|
curve?: CurvePrimitive;
|
|
42
|
-
/** Optional ray */
|
|
42
|
+
/** Optional ray. */
|
|
43
43
|
ray?: Ray3d;
|
|
44
|
-
/** The fractional position along the curve */
|
|
44
|
+
/** The fractional position along the curve. */
|
|
45
45
|
fraction: number;
|
|
46
|
-
/** Detail condition of the role this point has in some context */
|
|
46
|
+
/** Detail condition of the role this point has in some context. */
|
|
47
47
|
intervalRole?: CurveIntervalRole;
|
|
48
|
-
/** The point on the curve */
|
|
48
|
+
/** The point on the curve. */
|
|
49
49
|
point: Point3d;
|
|
50
|
-
/** A vector (e.g. tangent vector) in context */
|
|
50
|
+
/** A vector (e.g. tangent vector) in context. */
|
|
51
51
|
vectorInCurveLocationDetail?: Vector3d;
|
|
52
|
-
/** A context-specific numeric value
|
|
52
|
+
/** A context-specific numeric value (e.g., a distance). */
|
|
53
53
|
a: number;
|
|
54
54
|
/**
|
|
55
55
|
* Optional CurveLocationDetail with more detail of location. For instance, a detail for fractional position
|
|
@@ -59,26 +59,28 @@ export declare class CurveLocationDetail {
|
|
|
59
59
|
childDetail?: CurveLocationDetail;
|
|
60
60
|
/**
|
|
61
61
|
* A status indicator for certain searches.
|
|
62
|
-
* * e.g
|
|
62
|
+
* * e.g., CurvePrimitive.moveSignedDistanceFromFraction.
|
|
63
63
|
*/
|
|
64
64
|
curveSearchStatus?: CurveSearchStatus;
|
|
65
|
-
/** (Optional) second fraction, e.g. end of interval of coincident curves */
|
|
65
|
+
/** (Optional) second fraction, e.g. end of interval of coincident curves. */
|
|
66
66
|
fraction1?: number;
|
|
67
|
-
/** (Optional) second point, e.g. end of interval of coincident curves */
|
|
67
|
+
/** (Optional) second point, e.g. end of interval of coincident curves. */
|
|
68
68
|
point1?: Point3d;
|
|
69
69
|
/** A context-specific temporary point, e.g. for intermediate calculations. */
|
|
70
70
|
pointQ: Point3d;
|
|
71
71
|
/** Constructor */
|
|
72
72
|
constructor();
|
|
73
|
-
/** Set the (optional) intervalRole field */
|
|
73
|
+
/** Set the (optional) intervalRole field. */
|
|
74
74
|
setIntervalRole(value: CurveIntervalRole): void;
|
|
75
|
-
/** Set the
|
|
75
|
+
/** Set the `fraction` and `point`, using direct assignment (capture!) to `point`. */
|
|
76
|
+
captureFractionPoint(fraction: number, point: Point3d): void;
|
|
77
|
+
/** Set the (optional) `fraction1` and `point1`, using direct assignment (capture!) to `point1`. */
|
|
76
78
|
captureFraction1Point1(fraction1: number, point1: Point3d): void;
|
|
77
|
-
/** Test if this pair has fraction1 defined */
|
|
79
|
+
/** Test if this pair has fraction1 defined. */
|
|
78
80
|
get hasFraction1(): boolean;
|
|
79
|
-
/** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex) */
|
|
81
|
+
/** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex). */
|
|
80
82
|
get isIsolated(): boolean;
|
|
81
|
-
/** Return the fraction delta. (0 if no fraction1) */
|
|
83
|
+
/** Return the fraction delta. (0 if no fraction1). */
|
|
82
84
|
get fractionDelta(): number;
|
|
83
85
|
/**
|
|
84
86
|
* If (fraction1, point1) are defined, make them the primary (and only) data.
|
|
@@ -88,7 +90,7 @@ export declare class CurveLocationDetail {
|
|
|
88
90
|
/** Make (fraction, point) the primary (and only) data. */
|
|
89
91
|
collapseToStart(): void;
|
|
90
92
|
/**
|
|
91
|
-
* Return a complete copy, WITH CAVEATS
|
|
93
|
+
* Return a complete copy, WITH CAVEATS.
|
|
92
94
|
* * curve member is copied as a reference.
|
|
93
95
|
* * point and vector members are cloned.
|
|
94
96
|
*/
|
|
@@ -96,9 +98,9 @@ export declare class CurveLocationDetail {
|
|
|
96
98
|
/**
|
|
97
99
|
* Updated in this instance.
|
|
98
100
|
* * Note that if caller omits `vector` and `a`, those fields are updated to the call-list defaults (NOT left as-is)
|
|
99
|
-
* * point and vector updates are by data copy (not capture of pointers)
|
|
100
|
-
* @param fraction (required) fraction to install
|
|
101
|
-
* @param point
|
|
101
|
+
* * point and vector updates are by data copy (not capture of pointers).
|
|
102
|
+
* @param fraction (required) fraction to install.
|
|
103
|
+
* @param point (required) point to install.
|
|
102
104
|
* @param vector (optional) vector to install.
|
|
103
105
|
* @param a (optional) numeric value to install.
|
|
104
106
|
*/
|
|
@@ -106,9 +108,9 @@ export declare class CurveLocationDetail {
|
|
|
106
108
|
/**
|
|
107
109
|
* Updated in this instance.
|
|
108
110
|
* * Note that if caller omits a`, that field is updated to the call-list default (NOT left as-is)
|
|
109
|
-
* * point and vector updates are by data copy (not capture of the ray members)
|
|
110
|
-
* @param fraction (required) fraction to install
|
|
111
|
-
* @param ray (required) point and vector to install
|
|
111
|
+
* * point and vector updates are by data copy (not capture of the ray members).
|
|
112
|
+
* @param fraction (required) fraction to install.
|
|
113
|
+
* @param ray (required) point and vector to install.
|
|
112
114
|
* @param a (optional) numeric value to install.
|
|
113
115
|
*/
|
|
114
116
|
setFR(fraction: number, ray: Ray3d, a?: number): void;
|
|
@@ -122,7 +124,7 @@ export declare class CurveLocationDetail {
|
|
|
122
124
|
static createCurveFractionPoint(curve: CurvePrimitive | undefined, fraction: number, point: Point3d, result?: CurveLocationDetail): CurveLocationDetail;
|
|
123
125
|
/** Create a new detail with only ray, fraction, and point. */
|
|
124
126
|
static createRayFractionPoint(ray: Ray3d, fraction: number, point: Point3d, result?: CurveLocationDetail): CurveLocationDetail;
|
|
125
|
-
/** Create with CurvePrimitive pointer, fraction, and point coordinates */
|
|
127
|
+
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
126
128
|
static createCurveFractionPointDistanceCurveSearchStatus(curve: CurvePrimitive | undefined, fraction: number, point: Point3d, distance: number, status: CurveSearchStatus, result?: CurveLocationDetail): CurveLocationDetail;
|
|
127
129
|
/** Create with curveSearchStatus affected by allowExtension. */
|
|
128
130
|
static createConditionalMoveSignedDistance(allowExtension: boolean, curve: CurvePrimitive, startFraction: number, endFraction: number, requestedSignedDistance: number, result?: CurveLocationDetail): CurveLocationDetail;
|
|
@@ -140,7 +142,7 @@ export declare class CurveLocationDetail {
|
|
|
140
142
|
* @param fraction candidate fraction
|
|
141
143
|
* @param point candidate point
|
|
142
144
|
* @param a candidate distance
|
|
143
|
-
* @returns true if the given distance is smaller (and hence this detail was updated
|
|
145
|
+
* @returns true if the given distance is smaller (and hence this detail was updated)
|
|
144
146
|
*/
|
|
145
147
|
updateIfCloserCurveFractionPointDistance(curve: CurvePrimitive, fraction: number, point: Point3d, a: number): boolean;
|
|
146
148
|
/**
|
|
@@ -236,7 +238,7 @@ export declare class CurveLocationDetailPair {
|
|
|
236
238
|
}
|
|
237
239
|
/**
|
|
238
240
|
* Data bundle for a pair of arrays of CurveLocationDetail structures.
|
|
239
|
-
* @deprecated in 4.
|
|
241
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.
|
|
240
242
|
* @public
|
|
241
243
|
*/
|
|
242
244
|
export declare class CurveLocationDetailArrayPair {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveLocationDetail.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveLocationDetail.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,+DAA+D;IAC/D,QAAQ,IAAI;IACZ,2CAA2C;IAC3C,gBAAgB,IAAI;IACpB,2CAA2C;IAC3C,aAAa,KAAK;IAClB,gDAAgD;IAChD,gBAAgB,KAAK;IACrB,qCAAqC;IACrC,WAAW,KAAK;CACjB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,0CAA0C;IAC1C,KAAK,IAAA;IACL,iCAAiC;IACjC,OAAO,IAAI;IACX,4FAA4F;IAC5F,iBAAiB,IAAI;CACtB;AAaD;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,
|
|
1
|
+
{"version":3,"file":"CurveLocationDetail.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveLocationDetail.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,+DAA+D;IAC/D,QAAQ,IAAI;IACZ,2CAA2C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KAAK,EAAE,mBAAmB,EAAE,CAAC;IACpC,+BAA+B;IACxB,KAAK,EAAE,mBAAmB,EAAE,CAAC;;CAKrC"}
|
|
@@ -54,19 +54,19 @@ function optionalUpdate(source, result) {
|
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
56
|
export class CurveLocationDetail {
|
|
57
|
-
/** The curve being evaluated */
|
|
57
|
+
/** The curve being evaluated. */
|
|
58
58
|
curve;
|
|
59
|
-
/** Optional ray */
|
|
59
|
+
/** Optional ray. */
|
|
60
60
|
ray;
|
|
61
|
-
/** The fractional position along the curve */
|
|
61
|
+
/** The fractional position along the curve. */
|
|
62
62
|
fraction;
|
|
63
|
-
/** Detail condition of the role this point has in some context */
|
|
63
|
+
/** Detail condition of the role this point has in some context. */
|
|
64
64
|
intervalRole;
|
|
65
|
-
/** The point on the curve */
|
|
65
|
+
/** The point on the curve. */
|
|
66
66
|
point;
|
|
67
|
-
/** A vector (e.g. tangent vector) in context */
|
|
67
|
+
/** A vector (e.g. tangent vector) in context. */
|
|
68
68
|
vectorInCurveLocationDetail;
|
|
69
|
-
/** A context-specific numeric value
|
|
69
|
+
/** A context-specific numeric value (e.g., a distance). */
|
|
70
70
|
a;
|
|
71
71
|
/**
|
|
72
72
|
* Optional CurveLocationDetail with more detail of location. For instance, a detail for fractional position
|
|
@@ -76,12 +76,12 @@ export class CurveLocationDetail {
|
|
|
76
76
|
childDetail;
|
|
77
77
|
/**
|
|
78
78
|
* A status indicator for certain searches.
|
|
79
|
-
* * e.g
|
|
79
|
+
* * e.g., CurvePrimitive.moveSignedDistanceFromFraction.
|
|
80
80
|
*/
|
|
81
81
|
curveSearchStatus;
|
|
82
|
-
/** (Optional) second fraction, e.g. end of interval of coincident curves */
|
|
82
|
+
/** (Optional) second fraction, e.g. end of interval of coincident curves. */
|
|
83
83
|
fraction1;
|
|
84
|
-
/** (Optional) second point, e.g. end of interval of coincident curves */
|
|
84
|
+
/** (Optional) second point, e.g. end of interval of coincident curves. */
|
|
85
85
|
point1;
|
|
86
86
|
/** A context-specific temporary point, e.g. for intermediate calculations. */
|
|
87
87
|
pointQ;
|
|
@@ -92,26 +92,31 @@ export class CurveLocationDetail {
|
|
|
92
92
|
this.point = Point3d.createZero();
|
|
93
93
|
this.a = 0.0;
|
|
94
94
|
}
|
|
95
|
-
/** Set the (optional) intervalRole field */
|
|
95
|
+
/** Set the (optional) intervalRole field. */
|
|
96
96
|
setIntervalRole(value) {
|
|
97
97
|
this.intervalRole = value;
|
|
98
98
|
}
|
|
99
|
-
/** Set the
|
|
99
|
+
/** Set the `fraction` and `point`, using direct assignment (capture!) to `point`. */
|
|
100
|
+
captureFractionPoint(fraction, point) {
|
|
101
|
+
this.fraction = fraction;
|
|
102
|
+
this.point = point;
|
|
103
|
+
}
|
|
104
|
+
/** Set the (optional) `fraction1` and `point1`, using direct assignment (capture!) to `point1`. */
|
|
100
105
|
captureFraction1Point1(fraction1, point1) {
|
|
101
106
|
this.fraction1 = fraction1;
|
|
102
107
|
this.point1 = point1;
|
|
103
108
|
}
|
|
104
|
-
/** Test if this pair has fraction1 defined */
|
|
109
|
+
/** Test if this pair has fraction1 defined. */
|
|
105
110
|
get hasFraction1() {
|
|
106
111
|
return this.fraction1 !== undefined;
|
|
107
112
|
}
|
|
108
|
-
/** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex) */
|
|
113
|
+
/** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex). */
|
|
109
114
|
get isIsolated() {
|
|
110
115
|
return this.intervalRole === undefined
|
|
111
116
|
|| this.intervalRole === CurveIntervalRole.isolated
|
|
112
117
|
|| this.intervalRole === CurveIntervalRole.isolatedAtVertex;
|
|
113
118
|
}
|
|
114
|
-
/** Return the fraction delta. (0 if no fraction1) */
|
|
119
|
+
/** Return the fraction delta. (0 if no fraction1). */
|
|
115
120
|
get fractionDelta() {
|
|
116
121
|
return this.fraction1 !== undefined ? this.fraction1 - this.fraction : 0.0;
|
|
117
122
|
}
|
|
@@ -132,7 +137,7 @@ export class CurveLocationDetail {
|
|
|
132
137
|
this.point1 = undefined;
|
|
133
138
|
}
|
|
134
139
|
/**
|
|
135
|
-
* Return a complete copy, WITH CAVEATS
|
|
140
|
+
* Return a complete copy, WITH CAVEATS.
|
|
136
141
|
* * curve member is copied as a reference.
|
|
137
142
|
* * point and vector members are cloned.
|
|
138
143
|
*/
|
|
@@ -154,9 +159,9 @@ export class CurveLocationDetail {
|
|
|
154
159
|
/**
|
|
155
160
|
* Updated in this instance.
|
|
156
161
|
* * Note that if caller omits `vector` and `a`, those fields are updated to the call-list defaults (NOT left as-is)
|
|
157
|
-
* * point and vector updates are by data copy (not capture of pointers)
|
|
158
|
-
* @param fraction (required) fraction to install
|
|
159
|
-
* @param point
|
|
162
|
+
* * point and vector updates are by data copy (not capture of pointers).
|
|
163
|
+
* @param fraction (required) fraction to install.
|
|
164
|
+
* @param point (required) point to install.
|
|
160
165
|
* @param vector (optional) vector to install.
|
|
161
166
|
* @param a (optional) numeric value to install.
|
|
162
167
|
*/
|
|
@@ -169,9 +174,9 @@ export class CurveLocationDetail {
|
|
|
169
174
|
/**
|
|
170
175
|
* Updated in this instance.
|
|
171
176
|
* * Note that if caller omits a`, that field is updated to the call-list default (NOT left as-is)
|
|
172
|
-
* * point and vector updates are by data copy (not capture of the ray members)
|
|
173
|
-
* @param fraction (required) fraction to install
|
|
174
|
-
* @param ray (required) point and vector to install
|
|
177
|
+
* * point and vector updates are by data copy (not capture of the ray members).
|
|
178
|
+
* @param fraction (required) fraction to install.
|
|
179
|
+
* @param ray (required) point and vector to install.
|
|
175
180
|
* @param a (optional) numeric value to install.
|
|
176
181
|
*/
|
|
177
182
|
setFR(fraction, ray, a = 0) {
|
|
@@ -211,7 +216,7 @@ export class CurveLocationDetail {
|
|
|
211
216
|
result.point.setFromPoint3d(point);
|
|
212
217
|
return result;
|
|
213
218
|
}
|
|
214
|
-
/** Create with CurvePrimitive pointer, fraction, and point coordinates */
|
|
219
|
+
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
215
220
|
static createCurveFractionPointDistanceCurveSearchStatus(curve, fraction, point, distance, status, result) {
|
|
216
221
|
result = result ? result : new CurveLocationDetail();
|
|
217
222
|
result.curve = curve;
|
|
@@ -307,7 +312,7 @@ export class CurveLocationDetail {
|
|
|
307
312
|
* @param fraction candidate fraction
|
|
308
313
|
* @param point candidate point
|
|
309
314
|
* @param a candidate distance
|
|
310
|
-
* @returns true if the given distance is smaller (and hence this detail was updated
|
|
315
|
+
* @returns true if the given distance is smaller (and hence this detail was updated)
|
|
311
316
|
*/
|
|
312
317
|
updateIfCloserCurveFractionPointDistance(curve, fraction, point, a) {
|
|
313
318
|
if (this.a < a)
|
|
@@ -495,7 +500,7 @@ export class CurveLocationDetailPair {
|
|
|
495
500
|
}
|
|
496
501
|
/**
|
|
497
502
|
* Data bundle for a pair of arrays of CurveLocationDetail structures.
|
|
498
|
-
* @deprecated in 4.
|
|
503
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.
|
|
499
504
|
* @public
|
|
500
505
|
*/
|
|
501
506
|
export class CurveLocationDetailArrayPair {
|