@itwin/core-geometry 5.1.4 → 5.1.5
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 +6 -1
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineSegment3d.js","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAmB,QAAQ,EAA0B,MAAM,aAAa,C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C,CAAC;YAC1C,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD;;;OAGG;IACa,iBAAiB,CAC/B,uBAA+C;QAE/C,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;YACjC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,UAAU,GAAG,aAAa,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;YAC5E,OAAO,aAAa,CAAC,MAAM,CACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,yBAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,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 { assert } from \"@itwin/core-bentley\";\nimport { Clipper } from \"../clipping/ClipUtils\";\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\nimport { SmallSystem } from \"../numerics/SmallSystem\";\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from \"./CurveLocationDetail\";\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { OffsetOptions } from \"./OffsetOptions\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n/**\n * A LineSegment3d is:\n * * A 3d line segment represented by its start and end coordinates\n * * startPoint\n * * endPoint\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these\n * equivalent forms maps fraction `f` to a point `X(f)`:\n * ```\n * equation\n * X(f) = P_0 + f*(P_1 - P_0)\\newline\n * X(f) = (1-f)*P_0 + f*P_1\n * ```\n * @public\n */\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\n /** String name for schema properties */\n public readonly curvePrimitiveType = \"lineSegment\";\n /** Test if `other` is of class `LineSegment3d` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof LineSegment3d;\n }\n /** Start point of the segment */\n private _point0: Point3d;\n /** End point of the segment */\n private _point1: Point3d;\n /**\n * Return REFERENCE to the start point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.\n */\n public get point0Ref(): Point3d {\n return this._point0;\n }\n /**\n * Return REFERENCE to the end point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.\n */\n public get point1Ref(): Point3d {\n return this._point1;\n }\n /** Return a copy of the start and end points in an array. */\n public get points(): Point3d[] {\n return [this._point0.clone(), this._point1.clone()];\n }\n /** A LineSegment3d extends along its infinite line. */\n public override get isExtensibleFractionSpace(): boolean {\n return true;\n }\n /**\n * CAPTURE point references as a `LineSegment3d`\n * @param point0\n * @param point1\n */\n protected constructor(point0: Point3d, point1: Point3d) {\n super();\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by capturing input references. */\n public setRefs(point0: Point3d, point1: Point3d) {\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by cloning the input parameters. */\n public set(point0: Point3d, point1: Point3d) {\n this._point0 = point0.clone();\n this._point1 = point1.clone();\n }\n /** Copy (clone) data from other */\n public setFrom(other: LineSegment3d) {\n this._point0.setFrom(other._point0);\n this._point1.setFrom(other._point1);\n }\n /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */\n public override startPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point0); return result; }\n return this._point0.clone();\n }\n /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */\n public override endPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point1); return result; }\n return this._point1.clone();\n }\n /** Return the point and derivative vector at fractional position along the line segment. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n result = result ? result : Ray3d.createZero();\n result.direction.setStartEnd(this._point0, this._point1);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /**\n * Construct a plane with\n * * origin at the fractional position along the line segment\n * * x axis is the first derivative, i.e. along the line segment\n * * y axis is the second derivative, i.e. 000\n */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\n result.vectorU.setStartEnd(this._point0, this._point1);\n result.vectorV.set(0, 0, 0);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /** Clone the LineSegment3d */\n public clone(): LineSegment3d {\n return LineSegment3d.create(this._point0, this._point1);\n }\n /** Clone and apply transform to the clone. */\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\n const c = this.clone();\n c.tryTransformInPlace(transform);\n return c;\n }\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\n if (result) {\n result.set(point0, point1); // and this will clone them !!\n return result;\n }\n return new LineSegment3d(point0.clone(), point1.clone());\n }\n /** Create with start and end points. The point contents are CAPTURED into the result */\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\n return new LineSegment3d(point0, point1);\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\n if (result) {\n result._point0.set(x0, y0, z);\n result._point1.set(x1, y1, z);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYZXYZ(\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d,\n ): LineSegment3d {\n if (result) {\n result._point0.set(x0, y0, z0);\n result._point1.set(x1, y1, z1);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\n }\n /** Return the point at fractional position along the line segment. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this._point0.interpolate(fraction, this._point1, result);\n }\n /** Return the length of the segment. */\n public override curveLength(): number {\n return this._point0.distance(this._point1);\n }\n /** Return the length of the partial segment between fractions. */\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\n }\n /** Return the length of the segment. */\n public quickLength(): number {\n return this.curveLength();\n }\n /**\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\n * @param spacePoint point in space\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on\n * the unbounded line that contains the bounded segment.\n * @param result optional pre-allocated object to populate and return\n * @returns detail, with `a` field set to the distance from `spacePoint` to the closest point\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\n result = CurveLocationDetail.create(this, result);\n result.fraction = fraction;\n this._point0.interpolate(fraction, this._point1, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = result.point.distance(spacePoint);\n return result;\n }\n /**\n * Compute the closest approach between a pair of line segments.\n * * The approach distance is returned in the `a` fields of the details.\n * @param segmentA first line segment\n * @param extendA how to extend segmentA forward/backward\n * @param segmentB second line segment\n * @param extendB how to extend segmentB forward/backward\n * @param result optional pre-allocated object to populate and return\n * @returns pair of details, one per segment, each with `a` field set to the closest approach distance\n */\n public static closestApproach(\n segmentA: LineSegment3d,\n extendA: VariantCurveExtendParameter,\n segmentB: LineSegment3d,\n extendB: VariantCurveExtendParameter,\n result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair | undefined {\n const unboundedFractions = Vector2d.create();\n if (result === undefined)\n result = CurveLocationDetailPair.createCapture(CurveLocationDetail.create(), CurveLocationDetail.create());\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {\n // There is a simple approach between the unbounded segments. Maybe its a really easy case ...\n const fractionA = CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);\n const fractionB = CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);\n // if neither fraction was corrected, just accept !!!\n if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // One or both of the fractions were clamped back to an endpoint.\n // Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.\n if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {\n // Fill in (in the result) both individual details with \"projected\" points and distance.\n // The \"loser\" will have its contents replaced.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n if (result.detailA.a <= result.detailB.a) {\n CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);\n } else {\n CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);\n }\n } else if (fractionB !== unboundedFractions.y) {\n // B (only) was clamped.\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n result.detailB.setCurve(segmentB);\n result.detailB.point.setFrom(clampedPointOnB);\n result.detailB.fraction = fractionB;\n } else {\n // fractionA was clamped.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n result.detailA.setCurve(segmentA);\n result.detailA.point.setFrom(clampedPointOnA);\n result.detailA.fraction = fractionA;\n }\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // (probably? certainly?) parallel (possibly coincident) lines.\n // run all 4 endpoint-to-other cases . . . reassemble carefully ...\n const resultSet = [\n segmentA.closestPoint(segmentB._point0, extendA),\n segmentA.closestPoint(segmentB._point1, extendA),\n segmentB.closestPoint(segmentA._point0, extendB),\n segmentB.closestPoint(segmentA._point1, extendB),\n ];\n let dMin = resultSet[0].a;\n let iMin = 0;\n for (let i = 1; i < 4; i++) {\n if (resultSet[i].a < dMin) {\n iMin = i;\n dMin = resultSet[i].a;\n }\n }\n if (iMin === 0) {\n resultSet[0].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 1) {\n resultSet[1].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 2) {\n resultSet[2].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);\n result.detailA.a = result.detailB.a;\n } else {\n assert(iMin === 3);\n resultSet[3].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);\n result.detailA.a = result.detailB.a;\n }\n return result;\n }\n /** Swap the endpoint references. */\n public reverseInPlace(): void {\n const a = this._point0;\n this._point0 = this._point1;\n this._point1 = a;\n }\n /** Transform the two endpoints of this LinSegment. */\n public tryTransformInPlace(transform: Transform): boolean {\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\n return true;\n }\n /** Test if both endpoints are in a plane (within tolerance) */\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\n }\n /**\n * Compute points of simple (transverse) with a plane.\n * * Use isInPlane to test if the line segment is completely in the plane.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const h0 = plane.altitude(this._point0);\n const h1 = plane.altitude(this._point1);\n const fraction = Order2Bezier.solveCoffs(h0, h1);\n let numIntersection = 0;\n if (fraction !== undefined) {\n numIntersection++;\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n }\n return numIntersection;\n }\n /**\n * Extend a range to include the (optionally transformed) line segment\n * @param range range to extend\n * @param transform optional transform to apply to the end points\n */\n public extendRange(range: Range3d, transform?: Transform): void {\n if (transform) {\n range.extendTransformedPoint(transform, this._point0);\n range.extendTransformedPoint(transform, this._point1);\n } else {\n range.extendPoint(this._point0);\n range.extendPoint(this._point1);\n }\n }\n /**\n * Construct a line from either of these json forms:\n *\n * * object with named start and end:\n * `{startPoint: pointValue, endPoint: pointValue}`\n * * array of two point values:\n * `[pointValue, pointValue]`\n * The point values are any values accepted by the Point3d method setFromJSON.\n * @param json data to parse.\n */\n public setFromJSON(json?: any) {\n if (!json) {\n this._point0.set(0, 0, 0);\n this._point1.set(1, 0, 0);\n return;\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\n this._point0.setFromJSON(json.startPoint);\n this._point1.setFromJSON(json.endPoint);\n } else if (Array.isArray(json)\n && json.length > 1) { // [json point, json point]\n this._point0.setFromJSON(json[0]);\n this._point1.setFromJSON(json[1]);\n }\n }\n /** A simple line segment's fraction and distance are proportional. */\n public override getFractionToDistanceScale(): number | undefined {\n return this.curveLength();\n }\n /**\n * Place the lineSegment3d start and points in a json object\n * @return {*} [[x,y,z],[x,y,z]]\n */\n public toJSON(): any {\n return [this._point0.toJSON(), this._point1.toJSON()];\n }\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\n public static fromJSON(json?: any): LineSegment3d {\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\n result.setFromJSON(json);\n return result;\n }\n /** Near equality test with `other`. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LineSegment3d) {\n const ls = other;\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\n }\n return false;\n }\n /** Emit strokes to caller-supplied linestring */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const numStroke = this.computeStrokeCountForOptions(options);\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\n }\n /** Emit strokes to caller-supplied handler */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n handler.startCurvePrimitive(this);\n const numStroke = this.computeStrokeCountForOptions(options);\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\n handler.endCurvePrimitive(this);\n }\n /**\n * Return the stroke count required for given options.\n * @param options StrokeOptions that determine count\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke = 1;\n if (options) {\n if (options.maxEdgeLength)\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n }\n return numStroke;\n }\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLineSegment3d(this);\n }\n /**\n * Find intervals of this curve primitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`\n */\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n return clipper.announceClippedSegmentIntervals(\n 0.0, 1.0, this._point0, this._point1,\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined,\n );\n }\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param fractionA [in] start fraction\n * @param fractionB [in] end fraction\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\n }\n /**\n * Returns a (high accuracy) range of the curve between fractional positions\n * * Default implementation returns teh range of the curve from clonePartialCurve\n */\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n // (This is cheap -- don't bother testing for fraction0===fraction1)\n if (!transform) {\n const range = Range3d.create();\n range.extendInterpolated(this._point0, fraction0, this._point1);\n range.extendInterpolated(this._point0, fraction1, this._point1);\n return range;\n }\n const point0 = this.fractionToPoint(fraction0);\n const point1 = this.fractionToPoint(fraction1);\n if (transform) {\n transform.multiplyPoint3d(point0, point0);\n transform.multiplyPoint3d(point1, point1);\n }\n return Range3d.create(point0, point1);\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public override constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions,\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\n if (offsetVec.normalizeInPlace()) {\n offsetVec.rotate90CCWXY(offsetVec);\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\n return LineSegment3d.create(\n this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist),\n );\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of\n * projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LineSegment3d.js","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AC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,SAAS,EAAE,CAAC;YACd,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC1C,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD;;;OAGG;IACa,iBAAiB,CAC/B,uBAA+C;QAE/C,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;YACjC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,UAAU,GAAG,aAAa,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;YAC5E,OAAO,aAAa,CAAC,MAAM,CACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,yBAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Clipper } from \"../clipping/ClipUtils\";\r\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\r\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\r\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\r\nimport { SmallSystem } from \"../numerics/SmallSystem\";\r\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\r\nimport { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from \"./CurveLocationDetail\";\r\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { OffsetOptions } from \"./OffsetOptions\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A LineSegment3d is:\r\n * * A 3d line segment represented by its start and end coordinates\r\n * * startPoint\r\n * * endPoint\r\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these\r\n * equivalent forms maps fraction `f` to a point `X(f)`:\r\n * ```\r\n * equation\r\n * X(f) = P_0 + f*(P_1 - P_0)\\newline\r\n * X(f) = (1-f)*P_0 + f*P_1\r\n * ```\r\n * @public\r\n */\r\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\r\n /** String name for schema properties */\r\n public readonly curvePrimitiveType = \"lineSegment\";\r\n /** Test if `other` is of class `LineSegment3d` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof LineSegment3d;\r\n }\r\n /** Start point of the segment */\r\n private _point0: Point3d;\r\n /** End point of the segment */\r\n private _point1: Point3d;\r\n /**\r\n * Return REFERENCE to the start point of this segment.\r\n * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.\r\n */\r\n public get point0Ref(): Point3d {\r\n return this._point0;\r\n }\r\n /**\r\n * Return REFERENCE to the end point of this segment.\r\n * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.\r\n */\r\n public get point1Ref(): Point3d {\r\n return this._point1;\r\n }\r\n /** Return a copy of the start and end points in an array. */\r\n public get points(): Point3d[] {\r\n return [this._point0.clone(), this._point1.clone()];\r\n }\r\n /** A LineSegment3d extends along its infinite line. */\r\n public override get isExtensibleFractionSpace(): boolean {\r\n return true;\r\n }\r\n /**\r\n * CAPTURE point references as a `LineSegment3d`\r\n * @param point0\r\n * @param point1\r\n */\r\n protected constructor(point0: Point3d, point1: Point3d) {\r\n super();\r\n this._point0 = point0;\r\n this._point1 = point1;\r\n }\r\n /** Set the start and endpoints by capturing input references. */\r\n public setRefs(point0: Point3d, point1: Point3d) {\r\n this._point0 = point0;\r\n this._point1 = point1;\r\n }\r\n /** Set the start and endpoints by cloning the input parameters. */\r\n public set(point0: Point3d, point1: Point3d) {\r\n this._point0 = point0.clone();\r\n this._point1 = point1.clone();\r\n }\r\n /** Copy (clone) data from other */\r\n public setFrom(other: LineSegment3d) {\r\n this._point0.setFrom(other._point0);\r\n this._point1.setFrom(other._point1);\r\n }\r\n /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */\r\n public override startPoint(result?: Point3d): Point3d {\r\n if (result) { result.setFrom(this._point0); return result; }\r\n return this._point0.clone();\r\n }\r\n /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */\r\n public override endPoint(result?: Point3d): Point3d {\r\n if (result) { result.setFrom(this._point1); return result; }\r\n return this._point1.clone();\r\n }\r\n /** Return the point and derivative vector at fractional position along the line segment. */\r\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\r\n result = result ? result : Ray3d.createZero();\r\n result.direction.setStartEnd(this._point0, this._point1);\r\n this._point0.interpolate(fraction, this._point1, result.origin);\r\n return result;\r\n }\r\n /**\r\n * Construct a plane with\r\n * * origin at the fractional position along the line segment\r\n * * x axis is the first derivative, i.e. along the line segment\r\n * * y axis is the second derivative, i.e. 000\r\n */\r\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\r\n result.vectorU.setStartEnd(this._point0, this._point1);\r\n result.vectorV.set(0, 0, 0);\r\n this._point0.interpolate(fraction, this._point1, result.origin);\r\n return result;\r\n }\r\n /** Clone the LineSegment3d */\r\n public clone(): LineSegment3d {\r\n return LineSegment3d.create(this._point0, this._point1);\r\n }\r\n /** Clone and apply transform to the clone. */\r\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\r\n const c = this.clone();\r\n c.tryTransformInPlace(transform);\r\n return c;\r\n }\r\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\r\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\r\n if (result) {\r\n result.set(point0, point1); // and this will clone them !!\r\n return result;\r\n }\r\n return new LineSegment3d(point0.clone(), point1.clone());\r\n }\r\n /** Create with start and end points. The point contents are CAPTURED into the result */\r\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\r\n return new LineSegment3d(point0, point1);\r\n }\r\n /**\r\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\r\n * @param x0 start point x coordinate.\r\n * @param y0 start point y coordinate.\r\n * @param x1 end point x coordinate.\r\n * @param y1 end point y coordinate.\r\n * @param z z coordinate to use for both points.\r\n * @param result optional existing LineSegment to be reinitialized.\r\n */\r\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\r\n if (result) {\r\n result._point0.set(x0, y0, z);\r\n result._point1.set(x1, y1, z);\r\n return result;\r\n }\r\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\r\n }\r\n /**\r\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\r\n * @param x0 start point x coordinate.\r\n * @param y0 start point y coordinate.\r\n * @param x1 end point x coordinate.\r\n * @param y1 end point y coordinate.\r\n * @param z z coordinate to use for both points.\r\n * @param result optional existing LineSegment to be reinitialized.\r\n */\r\n public static createXYZXYZ(\r\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d,\r\n ): LineSegment3d {\r\n if (result) {\r\n result._point0.set(x0, y0, z0);\r\n result._point1.set(x1, y1, z1);\r\n return result;\r\n }\r\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\r\n }\r\n /** Return the point at fractional position along the line segment. */\r\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\r\n return this._point0.interpolate(fraction, this._point1, result);\r\n }\r\n /** Return the length of the segment. */\r\n public override curveLength(): number {\r\n return this._point0.distance(this._point1);\r\n }\r\n /** Return the length of the partial segment between fractions. */\r\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\r\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\r\n }\r\n /** Return the length of the segment. */\r\n public quickLength(): number {\r\n return this.curveLength();\r\n }\r\n /**\r\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\r\n * @param spacePoint point in space\r\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on\r\n * the unbounded line that contains the bounded segment.\r\n * @param result optional pre-allocated object to populate and return\r\n * @returns detail, with `a` field set to the distance from `spacePoint` to the closest point\r\n */\r\n public override closestPoint(\r\n spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail,\r\n ): CurveLocationDetail {\r\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\r\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\r\n result = CurveLocationDetail.create(this, result);\r\n result.fraction = fraction;\r\n this._point0.interpolate(fraction, this._point1, result.point);\r\n result.vectorInCurveLocationDetail = undefined;\r\n result.a = result.point.distance(spacePoint);\r\n return result;\r\n }\r\n /**\r\n * Compute the closest approach between a pair of line segments.\r\n * * The approach distance is returned in the `a` fields of the details.\r\n * @param segmentA first line segment\r\n * @param extendA how to extend segmentA forward/backward\r\n * @param segmentB second line segment\r\n * @param extendB how to extend segmentB forward/backward\r\n * @param result optional pre-allocated object to populate and return\r\n * @returns pair of details, one per segment, each with `a` field set to the closest approach distance\r\n */\r\n public static closestApproach(\r\n segmentA: LineSegment3d,\r\n extendA: VariantCurveExtendParameter,\r\n segmentB: LineSegment3d,\r\n extendB: VariantCurveExtendParameter,\r\n result?: CurveLocationDetailPair,\r\n ): CurveLocationDetailPair | undefined {\r\n const unboundedFractions = Vector2d.create();\r\n if (result === undefined)\r\n result = CurveLocationDetailPair.createCapture(CurveLocationDetail.create(), CurveLocationDetail.create());\r\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {\r\n // There is a simple approach between the unbounded segments. Maybe its a really easy case ...\r\n const fractionA = CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);\r\n const fractionB = CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);\r\n // if neither fraction was corrected, just accept !!!\r\n if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);\r\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\r\n return result;\r\n }\r\n // One or both of the fractions were clamped back to an endpoint.\r\n // Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.\r\n if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {\r\n // Fill in (in the result) both individual details with \"projected\" points and distance.\r\n // The \"loser\" will have its contents replaced.\r\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\r\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\r\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\r\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\r\n if (result.detailA.a <= result.detailB.a) {\r\n CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);\r\n } else {\r\n CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);\r\n }\r\n } else if (fractionB !== unboundedFractions.y) {\r\n // B (only) was clamped.\r\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\r\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\r\n result.detailB.setCurve(segmentB);\r\n result.detailB.point.setFrom(clampedPointOnB);\r\n result.detailB.fraction = fractionB;\r\n } else {\r\n // fractionA was clamped.\r\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\r\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\r\n result.detailA.setCurve(segmentA);\r\n result.detailA.point.setFrom(clampedPointOnA);\r\n result.detailA.fraction = fractionA;\r\n }\r\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\r\n return result;\r\n }\r\n // (probably? certainly?) parallel (possibly coincident) lines.\r\n // run all 4 endpoint-to-other cases . . . reassemble carefully ...\r\n const resultSet = [\r\n segmentA.closestPoint(segmentB._point0, extendA),\r\n segmentA.closestPoint(segmentB._point1, extendA),\r\n segmentB.closestPoint(segmentA._point0, extendB),\r\n segmentB.closestPoint(segmentA._point1, extendB),\r\n ];\r\n let dMin = resultSet[0].a;\r\n let iMin = 0;\r\n for (let i = 1; i < 4; i++) {\r\n if (resultSet[i].a < dMin) {\r\n iMin = i;\r\n dMin = resultSet[i].a;\r\n }\r\n }\r\n if (iMin === 0) {\r\n resultSet[0].clone(result.detailA);\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);\r\n result.detailB.a = result.detailA.a;\r\n } else if (iMin === 1) {\r\n resultSet[1].clone(result.detailA);\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);\r\n result.detailB.a = result.detailA.a;\r\n } else if (iMin === 2) {\r\n resultSet[2].clone(result.detailB);\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);\r\n result.detailA.a = result.detailB.a;\r\n } else {\r\n assert(iMin === 3);\r\n resultSet[3].clone(result.detailB);\r\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);\r\n result.detailA.a = result.detailB.a;\r\n }\r\n return result;\r\n }\r\n /** Swap the endpoint references. */\r\n public reverseInPlace(): void {\r\n const a = this._point0;\r\n this._point0 = this._point1;\r\n this._point1 = a;\r\n }\r\n /** Transform the two endpoints of this LinSegment. */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\r\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\r\n return true;\r\n }\r\n /** Test if both endpoints are in a plane (within tolerance) */\r\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\r\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\r\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\r\n }\r\n /**\r\n * Compute points of simple (transverse) with a plane.\r\n * * Use isInPlane to test if the line segment is completely in the plane.\r\n */\r\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\r\n const h0 = plane.altitude(this._point0);\r\n const h1 = plane.altitude(this._point1);\r\n const fraction = Order2Bezier.solveCoffs(h0, h1);\r\n let numIntersection = 0;\r\n if (fraction !== undefined) {\r\n numIntersection++;\r\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\r\n detail.intervalRole = CurveIntervalRole.isolated;\r\n result.push(detail);\r\n }\r\n return numIntersection;\r\n }\r\n /**\r\n * Extend a range to include the (optionally transformed) line segment\r\n * @param range range to extend\r\n * @param transform optional transform to apply to the end points\r\n */\r\n public extendRange(range: Range3d, transform?: Transform): void {\r\n if (transform) {\r\n range.extendTransformedPoint(transform, this._point0);\r\n range.extendTransformedPoint(transform, this._point1);\r\n } else {\r\n range.extendPoint(this._point0);\r\n range.extendPoint(this._point1);\r\n }\r\n }\r\n /**\r\n * Construct a line from either of these json forms:\r\n *\r\n * * object with named start and end:\r\n * `{startPoint: pointValue, endPoint: pointValue}`\r\n * * array of two point values:\r\n * `[pointValue, pointValue]`\r\n * The point values are any values accepted by the Point3d method setFromJSON.\r\n * @param json data to parse.\r\n */\r\n public setFromJSON(json?: any) {\r\n if (!json) {\r\n this._point0.set(0, 0, 0);\r\n this._point1.set(1, 0, 0);\r\n return;\r\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\r\n this._point0.setFromJSON(json.startPoint);\r\n this._point1.setFromJSON(json.endPoint);\r\n } else if (Array.isArray(json)\r\n && json.length > 1) { // [json point, json point]\r\n this._point0.setFromJSON(json[0]);\r\n this._point1.setFromJSON(json[1]);\r\n }\r\n }\r\n /** A simple line segment's fraction and distance are proportional. */\r\n public override getFractionToDistanceScale(): number | undefined {\r\n return this.curveLength();\r\n }\r\n /**\r\n * Place the lineSegment3d start and points in a json object\r\n * @return {*} [[x,y,z],[x,y,z]]\r\n */\r\n public toJSON(): any {\r\n return [this._point0.toJSON(), this._point1.toJSON()];\r\n }\r\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\r\n public static fromJSON(json?: any): LineSegment3d {\r\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\r\n result.setFromJSON(json);\r\n return result;\r\n }\r\n /** Near equality test with `other`. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof LineSegment3d) {\r\n const ls = other;\r\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\r\n }\r\n return false;\r\n }\r\n /** Emit strokes to caller-supplied linestring */\r\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\r\n const numStroke = this.computeStrokeCountForOptions(options);\r\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\r\n }\r\n /** Emit strokes to caller-supplied handler */\r\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\r\n handler.startCurvePrimitive(this);\r\n const numStroke = this.computeStrokeCountForOptions(options);\r\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\r\n handler.endCurvePrimitive(this);\r\n }\r\n /**\r\n * Return the stroke count required for given options.\r\n * @param options StrokeOptions that determine count\r\n */\r\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\r\n let numStroke = 1;\r\n if (options) {\r\n if (options.maxEdgeLength)\r\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\r\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\r\n }\r\n return numStroke;\r\n }\r\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLineSegment3d(this);\r\n }\r\n /**\r\n * Find intervals of this curve primitive that are interior to a clipper\r\n * @param clipper clip structure (e.g. clip planes)\r\n * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`\r\n */\r\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n return clipper.announceClippedSegmentIntervals(\r\n 0.0, 1.0, this._point0, this._point1,\r\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined,\r\n );\r\n }\r\n /**\r\n * Return (if possible) a curve primitive which is a portion of this curve.\r\n * @param fractionA [in] start fraction\r\n * @param fractionB [in] end fraction\r\n */\r\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\r\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\r\n }\r\n /**\r\n * Returns a (high accuracy) range of the curve between fractional positions\r\n * * Default implementation returns teh range of the curve from clonePartialCurve\r\n */\r\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\r\n // (This is cheap -- don't bother testing for fraction0===fraction1)\r\n if (!transform) {\r\n const range = Range3d.create();\r\n range.extendInterpolated(this._point0, fraction0, this._point1);\r\n range.extendInterpolated(this._point0, fraction1, this._point1);\r\n return range;\r\n }\r\n const point0 = this.fractionToPoint(fraction0);\r\n const point1 = this.fractionToPoint(fraction1);\r\n if (transform) {\r\n transform.multiplyPoint3d(point0, point0);\r\n transform.multiplyPoint3d(point1, point1);\r\n }\r\n return Range3d.create(point0, point1);\r\n }\r\n /**\r\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\r\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\r\n */\r\n public override constructOffsetXY(\r\n offsetDistanceOrOptions: number | OffsetOptions,\r\n ): CurvePrimitive | CurvePrimitive[] | undefined {\r\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\r\n if (offsetVec.normalizeInPlace()) {\r\n offsetVec.rotate90CCWXY(offsetVec);\r\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\r\n return LineSegment3d.create(\r\n this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist),\r\n );\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of\r\n * projection.\r\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\r\n * @param lowHigh optional receiver for output\r\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\r\n * end of the ray.\r\n */\r\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\r\n }\r\n}\r\n"]}
|