@itwin/core-geometry 5.9.0-dev.8 → 5.9.0-dev.9
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/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +8 -6
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +8 -6
- 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.d.ts +7 -0
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +11 -0
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstrainedCurve2d.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.d.ts +11 -2
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +25 -15
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +15 -6
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +15 -6
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +2 -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.d.ts +21 -0
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +59 -0
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +13 -12
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +12 -11
- 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.d.ts +17 -4
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +114 -18
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +3 -11
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +1 -91
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +13 -6
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +13 -6
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js +1 -2
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +1 -2
- 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.d.ts +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +1 -2
- 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.d.ts +113 -103
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +368 -337
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +2 -3
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +20 -32
- 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/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.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/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.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.d.ts +1 -2
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +9 -3
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +1 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +10 -4
- 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.d.ts +3 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +6 -2
- 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.d.ts +33 -4
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +79 -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.d.ts +9 -6
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +20 -10
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +9 -6
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -10
- 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.d.ts +4 -4
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +5 -4
- 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.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +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.d.ts +44 -13
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +73 -23
- 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.d.ts +14 -14
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +14 -14
- 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 +2 -2
- 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/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.d.ts +15 -15
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +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.d.ts +3 -3
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.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/Voronoi.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.d.ts +8 -6
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +8 -6
- 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.d.ts +7 -0
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +11 -0
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstrainedCurve2d.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.d.ts +11 -2
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +25 -15
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +15 -6
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +15 -6
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +1 -1
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +2 -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.d.ts +21 -0
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +59 -0
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +13 -12
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +12 -11
- 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.d.ts +17 -4
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +116 -20
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +3 -11
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -92
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +13 -6
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +13 -6
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js +1 -2
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +1 -2
- 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.d.ts +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +1 -2
- 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.d.ts +113 -103
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +370 -339
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +2 -3
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +20 -32
- 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/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.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/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.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.d.ts +1 -2
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +9 -3
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +1 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +10 -4
- 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.d.ts +3 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +6 -2
- 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.d.ts +33 -4
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +77 -0
- 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.d.ts +9 -6
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +20 -10
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +9 -6
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +20 -10
- 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.d.ts +4 -4
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +5 -4
- 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.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +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.d.ts +44 -13
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +71 -22
- 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.d.ts +14 -14
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +14 -14
- 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 +2 -2
- 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/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.d.ts +15 -15
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +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.d.ts +3 -3
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.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/Voronoi.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +0 -23
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +0 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +0 -37
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +0 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +0 -23
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +0 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +0 -33
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +0 -1
|
@@ -5,22 +5,26 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Curve
|
|
7
7
|
*/
|
|
8
|
-
import { assert } from "@itwin/core-bentley";
|
|
8
|
+
import { assert, DuplicatePolicy, SortedArray } from "@itwin/core-bentley";
|
|
9
9
|
import { BSplineCurve3d, BSplineCurve3dBase } from "../../bspline/BSplineCurve";
|
|
10
10
|
import { Geometry } from "../../Geometry";
|
|
11
11
|
import { RecurseToCurvesGeometryHandler } from "../../geometry3d/GeometryHandler";
|
|
12
12
|
import { GrowableFloat64Array } from "../../geometry3d/GrowableFloat64Array";
|
|
13
13
|
import { Point3d } from "../../geometry3d/Point3dVector3d";
|
|
14
14
|
import { Range3d } from "../../geometry3d/Range";
|
|
15
|
-
import { CurveCurveCloseApproachXYRRtoRRD,
|
|
15
|
+
import { CurveCurveCloseApproachXYRRtoRRD, Newton2dUnboundedWithDerivative } from "../../numerics/Newton";
|
|
16
16
|
import { AnalyticRoots } from "../../numerics/Polynomials";
|
|
17
17
|
import { SmallSystem } from "../../numerics/SmallSystem";
|
|
18
18
|
import { Arc3d } from "../Arc3d";
|
|
19
19
|
import { CurveChainWithDistanceIndex } from "../CurveChainWithDistanceIndex";
|
|
20
20
|
import { CurveCollection } from "../CurveCollection";
|
|
21
|
+
import { CurveCurve } from "../CurveCurve";
|
|
21
22
|
import { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from "../CurveLocationDetail";
|
|
23
|
+
import { CurvePrimitive } from "../CurvePrimitive";
|
|
22
24
|
import { LineSegment3d } from "../LineSegment3d";
|
|
23
25
|
import { LineString3d } from "../LineString3d";
|
|
26
|
+
import { ProxyCurve } from "../ProxyCurve";
|
|
27
|
+
import { TransitionSpiral3d } from "../spiral/TransitionSpiral3d";
|
|
24
28
|
// cspell:word XYRR currentdFdX
|
|
25
29
|
/**
|
|
26
30
|
* Handler class for XY close approach between _geometryB and another geometry.
|
|
@@ -38,9 +42,6 @@ import { LineString3d } from "../LineString3d";
|
|
|
38
42
|
*/
|
|
39
43
|
export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
40
44
|
_geometryB;
|
|
41
|
-
setGeometryB(geometryB) {
|
|
42
|
-
this._geometryB = geometryB;
|
|
43
|
-
}
|
|
44
45
|
/**
|
|
45
46
|
* Maximum XY distance (z is ignored). Approach larger than this is not interesting.
|
|
46
47
|
* This is caller defined and can be undefined.
|
|
@@ -48,6 +49,8 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
48
49
|
_maxDistanceToAccept;
|
|
49
50
|
/** Squared max distance. Default is [[Geometry.smallMetricDistanceSquared]]. */
|
|
50
51
|
_maxDistanceSquared;
|
|
52
|
+
_xyTolerance;
|
|
53
|
+
_newtonTolerance;
|
|
51
54
|
/**
|
|
52
55
|
* Start and end points of line segments that meet closest approach criteria, i.e., they are perpendicular to
|
|
53
56
|
* both curves and their length is smaller than _maxDistanceToAccept.
|
|
@@ -61,18 +64,28 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
61
64
|
/**
|
|
62
65
|
* Constructor.
|
|
63
66
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
67
|
+
* @param xyTolerance optional tolerance for comparing xy points (default [[Geometry.smallMetricDistance]]).
|
|
68
|
+
* @param newtonTolerance optional relative fraction tolerance for Newton iteration (default [[Geometry.smallNewtonStep]]).
|
|
64
69
|
*/
|
|
65
|
-
constructor(geometryB) {
|
|
70
|
+
constructor(geometryB, xyTolerance = Geometry.smallMetricDistance, newtonTolerance = Geometry.smallNewtonStep) {
|
|
66
71
|
super();
|
|
67
|
-
this.
|
|
72
|
+
this._geometryB = geometryB instanceof ProxyCurve ? geometryB.proxyCurve : geometryB;
|
|
68
73
|
this._maxDistanceSquared = Geometry.smallMetricDistanceSquared;
|
|
69
|
-
this.
|
|
74
|
+
this._xyTolerance = xyTolerance;
|
|
75
|
+
this._newtonTolerance = newtonTolerance;
|
|
76
|
+
const compare = CurveLocationDetailPair.comparePairsByPoints(xyTolerance, true);
|
|
77
|
+
this._results = new SortedArray(compare, DuplicatePolicy.Retain);
|
|
70
78
|
}
|
|
71
79
|
/** Set the (possibly undefined) max XY distance (z is ignored) to accept. */
|
|
72
80
|
set maxDistanceToAccept(value) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this._maxDistanceSquared =
|
|
81
|
+
if (value === undefined) {
|
|
82
|
+
this._maxDistanceToAccept = undefined;
|
|
83
|
+
this._maxDistanceSquared = Geometry.smallMetricDistanceSquared;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this._maxDistanceToAccept = Math.abs(value);
|
|
87
|
+
this._maxDistanceSquared = value * value;
|
|
88
|
+
}
|
|
76
89
|
}
|
|
77
90
|
/** Access the (possibly undefined) max XY distance (z is ignored) to accept. */
|
|
78
91
|
get maxDistanceToAccept() {
|
|
@@ -82,9 +95,14 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
82
95
|
get isMaxDistanceSet() {
|
|
83
96
|
return this._maxDistanceToAccept !== undefined && this._maxDistanceToAccept > 0;
|
|
84
97
|
}
|
|
85
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Reset the geometry.
|
|
100
|
+
* * Undefined inputs are ignored.
|
|
101
|
+
* * All other instance data is unchanged, including accumulated intersections.
|
|
102
|
+
*/
|
|
86
103
|
resetGeometry(geometryB) {
|
|
87
|
-
|
|
104
|
+
if (geometryB)
|
|
105
|
+
this._geometryB = geometryB;
|
|
88
106
|
}
|
|
89
107
|
/** returns true if `fraction` is in [0,1] within tolerance */
|
|
90
108
|
acceptFraction(fraction, fractionTol = 1.0e-12) {
|
|
@@ -94,131 +112,103 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
94
112
|
return false;
|
|
95
113
|
return true;
|
|
96
114
|
}
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*/
|
|
101
|
-
grabPairedResults(reinitialize = false) {
|
|
102
|
-
const result = this._results;
|
|
103
|
-
if (reinitialize)
|
|
104
|
-
this._results = [];
|
|
105
|
-
return result;
|
|
115
|
+
/** Extract (and clear) the results, structured as an array of CurveLocationDetailPair. */
|
|
116
|
+
grabPairedResults() {
|
|
117
|
+
return this._results.extractArray();
|
|
106
118
|
}
|
|
107
119
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
120
|
+
* Create and record a close-approach pair from raw curve/fraction/point data.
|
|
121
|
+
* * If points are undefined, they are computed from the fractions via `fractionToPoint`.
|
|
122
|
+
* * Fractions are global (i.e., relative to the full curve, not a sub-segment).
|
|
123
|
+
* * The pair is recorded only if the XY distance is within `_maxDistanceSquared`.
|
|
124
|
+
* @param cpA first curve
|
|
125
|
+
* @param fA global fraction on cpA
|
|
126
|
+
* @param pointA point on cpA at fA, or undefined to compute from fA
|
|
127
|
+
* @param cpB second curve
|
|
128
|
+
* @param fB global fraction on cpB
|
|
129
|
+
* @param pointB point on cpB at fB, or undefined to compute from fB
|
|
130
|
+
* @param reversed if true, swap detailA and detailB before recording
|
|
110
131
|
*/
|
|
111
|
-
|
|
132
|
+
testAndRecordPointPair(cpA, fA, pointA, cpB, fB, pointB, reversed) {
|
|
133
|
+
if (!pointA)
|
|
134
|
+
pointA = cpA.fractionToPoint(fA);
|
|
135
|
+
if (!pointB)
|
|
136
|
+
pointB = cpB.fractionToPoint(fB);
|
|
112
137
|
const d2 = pointA.distanceSquaredXY(pointB);
|
|
113
|
-
if (d2
|
|
138
|
+
if (d2 <= this._maxDistanceSquared) {
|
|
114
139
|
const d = Math.sqrt(d2);
|
|
115
140
|
const detailA = CurveLocationDetail.createCurveFractionPointDistance(cpA, fA, pointA, d);
|
|
116
141
|
const detailB = CurveLocationDetail.createCurveFractionPointDistance(cpB, fB, pointB, d);
|
|
142
|
+
detailA.setIntervalRole(CurveIntervalRole.isolated);
|
|
143
|
+
detailB.setIntervalRole(CurveIntervalRole.isolated);
|
|
117
144
|
const pair = CurveLocationDetailPair.createCapture(detailA, detailB);
|
|
118
145
|
if (reversed)
|
|
119
146
|
pair.swapDetails();
|
|
120
|
-
this._results.
|
|
147
|
+
this._results.insert(pair);
|
|
121
148
|
}
|
|
122
149
|
}
|
|
123
150
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @param
|
|
128
|
-
* @param
|
|
129
|
-
* @param localFractionB a fraction on second curve
|
|
130
|
-
* @param cpB the second curve
|
|
131
|
-
* @param fractionB0 start of the second curve
|
|
132
|
-
* @param fractionB1 end of the second curve
|
|
133
|
-
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
151
|
+
* Record a pre-built close-approach pair with global fractions already set.
|
|
152
|
+
* * Computes and stores the XY distance on both details.
|
|
153
|
+
* * The pair is recorded only if the XY distance is within `_maxDistanceSquared`.
|
|
154
|
+
* @param pair details with global fractions and points already set; modified in place
|
|
155
|
+
* @param reversed if true, swap detailA and detailB before recording
|
|
134
156
|
*/
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
const globalFractionB = Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
138
|
-
// ignore duplicate of most recent approach
|
|
139
|
-
const numPrevious = this._results.length;
|
|
140
|
-
if (numPrevious > 0) {
|
|
141
|
-
const oldDetailA = this._results[numPrevious - 1].detailA;
|
|
142
|
-
const oldDetailB = this._results[numPrevious - 1].detailB;
|
|
143
|
-
if (reversed) {
|
|
144
|
-
if (oldDetailB.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }) &&
|
|
145
|
-
oldDetailA.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }))
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
if (oldDetailA.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }) &&
|
|
150
|
-
oldDetailB.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }))
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const pointA = cpA.fractionToPoint(globalFractionA);
|
|
155
|
-
const pointB = cpB.fractionToPoint(globalFractionB);
|
|
156
|
-
const d2 = pointA.distanceSquaredXY(pointB);
|
|
157
|
+
testAndRecordPair(pair, reversed) {
|
|
158
|
+
const d2 = pair.detailA.point.distanceSquaredXY(pair.detailB.point);
|
|
157
159
|
if (d2 > this._maxDistanceSquared)
|
|
158
160
|
return;
|
|
159
161
|
const d = Math.sqrt(d2);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
detailB.setIntervalRole(CurveIntervalRole.isolated);
|
|
162
|
+
pair.detailA.a = pair.detailB.a = d;
|
|
163
|
+
pair.detailA.setIntervalRole(CurveIntervalRole.isolated);
|
|
164
|
+
pair.detailB.setIntervalRole(CurveIntervalRole.isolated);
|
|
164
165
|
if (reversed)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this._results.push(new CurveLocationDetailPair(detailA, detailB));
|
|
166
|
+
pair.swapDetails();
|
|
167
|
+
this._results.insert(pair);
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
|
-
*
|
|
171
|
-
* *
|
|
172
|
-
* *
|
|
173
|
-
*
|
|
174
|
-
* @param
|
|
175
|
-
* @param
|
|
176
|
-
* @param
|
|
177
|
-
* @param
|
|
178
|
-
* @param
|
|
179
|
-
* @param
|
|
180
|
-
* @param
|
|
170
|
+
* Convert a close-approach pair from local (sub-segment) fractions to global fractions, then record it.
|
|
171
|
+
* * Local fractions in the pair are interpolated into the global fraction ranges.
|
|
172
|
+
* * Points are recomputed from the parent curves at the global fractions.
|
|
173
|
+
* * The pair is recorded only if the XY distance is within `_maxDistanceSquared`.
|
|
174
|
+
* @param pair local details (curve unspecified); modified in place with global fractions, curves, and points
|
|
175
|
+
* @param cpA parent curve A
|
|
176
|
+
* @param fractionA0 global fraction corresponding to local fraction 0 on curve A
|
|
177
|
+
* @param fractionA1 global fraction corresponding to local fraction 1 on curve A
|
|
178
|
+
* @param cpB parent curve B
|
|
179
|
+
* @param fractionB0 global fraction corresponding to local fraction 0 on curve B
|
|
180
|
+
* @param fractionB1 global fraction corresponding to local fraction 1 on curve B
|
|
181
|
+
* @param reversed if true, swap detailA and detailB before recording
|
|
181
182
|
*/
|
|
182
|
-
|
|
183
|
+
testAndRecordLocalPair(pair, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed) {
|
|
183
184
|
const globalFractionA = Geometry.interpolate(fractionA0, pair.detailA.fraction, fractionA1);
|
|
184
185
|
const globalFractionB = Geometry.interpolate(fractionB0, pair.detailB.fraction, fractionB1);
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
if (oldDetailA.isSameCurveAndFraction({ curve: cpA, fraction: globalFractionA }) &&
|
|
197
|
-
oldDetailB.isSameCurveAndFraction({ curve: cpB, fraction: globalFractionB }))
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// recompute the points just in case
|
|
202
|
-
CurveLocationDetail.createCurveEvaluatedFraction(cpA, globalFractionA, pair.detailA);
|
|
203
|
-
CurveLocationDetail.createCurveEvaluatedFraction(cpB, globalFractionB, pair.detailB);
|
|
204
|
-
pair.detailA.a = pair.detailB.a = pair.detailA.point.distanceXY(pair.detailB.point);
|
|
186
|
+
const pointA = cpA.fractionToPoint(globalFractionA);
|
|
187
|
+
const pointB = cpB.fractionToPoint(globalFractionB);
|
|
188
|
+
const d2 = pointA.distanceSquaredXY(pointB);
|
|
189
|
+
if (d2 > this._maxDistanceSquared)
|
|
190
|
+
return;
|
|
191
|
+
const d = Math.sqrt(d2);
|
|
192
|
+
CurveLocationDetail.createCurveFractionPointDistance(cpA, globalFractionA, pointA, d, pair.detailA);
|
|
193
|
+
CurveLocationDetail.createCurveFractionPointDistance(cpB, globalFractionB, pointB, d, pair.detailB);
|
|
205
194
|
pair.detailA.setIntervalRole(CurveIntervalRole.isolated);
|
|
206
195
|
pair.detailB.setIntervalRole(CurveIntervalRole.isolated);
|
|
207
196
|
if (reversed)
|
|
208
197
|
pair.swapDetails();
|
|
209
|
-
this._results.
|
|
198
|
+
this._results.insert(pair);
|
|
210
199
|
}
|
|
211
|
-
|
|
200
|
+
/** Modify the current closest approach if the inputs are closer. */
|
|
201
|
+
static updatePointToSegmentDistance(closestApproach, fractionA, pointA, fractionB, pointB0, pointB1, maxDistanceSquared) {
|
|
212
202
|
let updated = false;
|
|
213
203
|
if (fractionB < 0)
|
|
214
204
|
fractionB = 0;
|
|
215
205
|
else if (fractionB > 1)
|
|
216
206
|
fractionB = 1;
|
|
217
|
-
|
|
218
|
-
const distanceSquared =
|
|
207
|
+
const pointB = pointB0.interpolate(fractionB, pointB1, this._workPointB);
|
|
208
|
+
const distanceSquared = pointB.distanceSquaredXY(pointA);
|
|
219
209
|
if (distanceSquared <= Math.min(maxDistanceSquared, closestApproach.detailA.a)) {
|
|
220
210
|
closestApproach.detailA.setFP(fractionA, pointA, undefined, distanceSquared);
|
|
221
|
-
closestApproach.detailB.setFP(fractionB,
|
|
211
|
+
closestApproach.detailB.setFP(fractionB, pointB, undefined, distanceSquared);
|
|
222
212
|
updated = true;
|
|
223
213
|
}
|
|
224
214
|
return updated;
|
|
@@ -231,8 +221,9 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
231
221
|
* @param b0 start point of line b
|
|
232
222
|
* @param b1 end point of line b
|
|
233
223
|
* @param maxDistanceSquared maximum distance squared (assumed to be positive)
|
|
234
|
-
* @returns
|
|
235
|
-
|
|
224
|
+
* @returns a pair of details for the closest approach, or `undefined` if no approach is within `maxDistanceSquared`.
|
|
225
|
+
* `detailA.fraction` is the fraction on segment a; `detailB.fraction` is the fraction on segment b. Returned
|
|
226
|
+
* details store the *squared* distance in the `a` property.
|
|
236
227
|
*/
|
|
237
228
|
static segmentSegmentBoundedApproach(a0, a1, b0, b1, maxDistanceSquared) {
|
|
238
229
|
const ux = a1.x - a0.x;
|
|
@@ -261,23 +252,23 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
261
252
|
const uu = Geometry.hypotenuseSquaredXY(ux, uy);
|
|
262
253
|
if (hab0 * hab0 <= maxDistanceSquared * uu) { // test distance of b0 to u
|
|
263
254
|
const fractionA = Geometry.safeDivideFraction(Geometry.dotProductXYXY(ux, uy, e00x, e00y), uu, 0.0);
|
|
264
|
-
if (this.updatePointToSegmentDistance(0, b0, a0, a1,
|
|
255
|
+
if (this.updatePointToSegmentDistance(closestApproach, 0, b0, fractionA, a0, a1, maxDistanceSquared))
|
|
265
256
|
reversed = true;
|
|
266
257
|
}
|
|
267
258
|
if (hab1 * hab1 <= maxDistanceSquared * uu) { // test distance of b1 to u
|
|
268
259
|
const fractionA = Geometry.safeDivideFraction(Geometry.dotProductXYXY(ux, uy, e01x, e01y), uu, 0.0);
|
|
269
|
-
if (this.updatePointToSegmentDistance(1, b1, a0, a1,
|
|
260
|
+
if (this.updatePointToSegmentDistance(closestApproach, 1, b1, fractionA, a0, a1, maxDistanceSquared))
|
|
270
261
|
reversed = true;
|
|
271
262
|
}
|
|
272
263
|
const vv = Geometry.hypotenuseSquaredXY(vx, vy);
|
|
273
264
|
if (hba0 * hba0 <= maxDistanceSquared * vv) { // test distance of a0 to v
|
|
274
265
|
const fractionB = Geometry.safeDivideFraction(-Geometry.dotProductXYXY(vx, vy, e00x, e00y), vv, 0.0);
|
|
275
|
-
if (this.updatePointToSegmentDistance(0, a0, b0, b1,
|
|
266
|
+
if (this.updatePointToSegmentDistance(closestApproach, 0, a0, fractionB, b0, b1, maxDistanceSquared))
|
|
276
267
|
reversed = false;
|
|
277
268
|
}
|
|
278
269
|
if (hba1 * hba1 <= maxDistanceSquared * vv) { // test distance of a1 to v
|
|
279
270
|
const fractionB = Geometry.safeDivideFraction(-Geometry.dotProductXYXY(vx, vy, e10x, e10y), vv, 0.0);
|
|
280
|
-
if (this.updatePointToSegmentDistance(1, a1, b0, b1,
|
|
271
|
+
if (this.updatePointToSegmentDistance(closestApproach, 1, a1, fractionB, b0, b1, maxDistanceSquared))
|
|
281
272
|
reversed = false;
|
|
282
273
|
}
|
|
283
274
|
if (closestApproach.detailA.a > maxDistanceSquared)
|
|
@@ -287,96 +278,30 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
287
278
|
return closestApproach;
|
|
288
279
|
}
|
|
289
280
|
/**
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* Optionally, record close approaches of one curve's points if they fall between the other curve's points.
|
|
293
|
-
* * If an input curve is a LineString3d, then the corresponding fractions must define a segment of the line string.
|
|
281
|
+
* Compute closest approaches from the endpoints of each curve (if open) to the other curve.
|
|
282
|
+
* Record a [[CurveLocationDetailPair]] if such a distance is less than [[maxDistance]].
|
|
294
283
|
* @param cpA curveA
|
|
295
|
-
* @param fA0 fraction0 on curveA
|
|
296
|
-
* @param fA1 fraction1 on curveA
|
|
297
|
-
* @param testProjectionOnA whether to record projections of the given curveB points onto curveA
|
|
298
284
|
* @param cpB curveB
|
|
299
|
-
* @param
|
|
300
|
-
* @param fB1 fraction0 on curveB
|
|
301
|
-
* @param testProjectionOnB whether to record projections of the given curveA points onto curveB
|
|
302
|
-
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
285
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to curveA).
|
|
303
286
|
*/
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
this.testAndRecordPointPairApproach(cpA, fA0, pointA0, cpB, fB1, pointB1, reversed);
|
|
312
|
-
this.testAndRecordPointPairApproach(cpA, fA1, pointA1, cpB, fB1, pointB1, reversed);
|
|
313
|
-
if (testProjectionOnB) {
|
|
314
|
-
this.testAndRecordProjection(cpA, fA0, pointA0, cpB, fB0, fB1, reversed);
|
|
315
|
-
this.testAndRecordProjection(cpA, fA1, pointA1, cpB, fB0, fB1, reversed);
|
|
316
|
-
}
|
|
317
|
-
if (testProjectionOnA) {
|
|
318
|
-
this.testAndRecordProjection(cpB, fB0, pointB0, cpA, fA0, fA1, !reversed);
|
|
319
|
-
this.testAndRecordProjection(cpB, fB1, pointB1, cpA, fA0, fA1, !reversed);
|
|
287
|
+
testAndRecordEndPointApproaches(cpA, cpB, reversed) {
|
|
288
|
+
const pt = CurveCurveCloseApproachXY._workPointB;
|
|
289
|
+
// in closest approach context, endpoints of full sweep arcs are artificial locations, and thus ignored
|
|
290
|
+
const isClosedArc = (curve) => curve instanceof Arc3d && curve.sweep.isFullCircle;
|
|
291
|
+
if (!isClosedArc(cpA)) {
|
|
292
|
+
this.testAndRecordProjection(cpA, 0, cpA.startPoint(pt), cpB, reversed);
|
|
293
|
+
this.testAndRecordProjection(cpA, 1, cpA.endPoint(pt), cpB, reversed);
|
|
320
294
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
* Currently, this function only supports Arc3d and LineSegment.
|
|
325
|
-
* Note that this function doesn't handle endpoints.
|
|
326
|
-
*/
|
|
327
|
-
getPointCurveClosestApproachXYNewton(curveP, pointQ) {
|
|
328
|
-
if (!(curveP instanceof Arc3d) && !(curveP instanceof LineSegment3d)) {
|
|
329
|
-
assert(false, "getPointCurveClosestApproachXYNewton only supports Arc3d and LineSegment");
|
|
330
|
-
}
|
|
331
|
-
const seeds = [0.2, 0.4, 0.6, 0.8]; // HEURISTIC: arcs have up to 4 perpendiculars; lines have only 1
|
|
332
|
-
const newtonEvaluator = new CurvePointCloseApproachXYRtoRD(curveP, pointQ);
|
|
333
|
-
const newtonSearcher = new Newton1dUnbounded(newtonEvaluator, 100); // observed convergence to 1.0e-11 in 66 iters
|
|
334
|
-
let minCloseApproachLength = Geometry.largeCoordinateResult;
|
|
335
|
-
let minCurvePFraction;
|
|
336
|
-
let minPointP;
|
|
337
|
-
for (const seed of seeds) {
|
|
338
|
-
newtonSearcher.setX(seed);
|
|
339
|
-
if (newtonSearcher.runIterations()) {
|
|
340
|
-
const curvePFraction = newtonSearcher.getX();
|
|
341
|
-
if (this.acceptFraction(curvePFraction)) {
|
|
342
|
-
const pointP = curveP.fractionToPoint(curvePFraction);
|
|
343
|
-
const closeApproachLength = pointP.distanceSquaredXY(pointQ);
|
|
344
|
-
if (closeApproachLength < minCloseApproachLength) {
|
|
345
|
-
minCloseApproachLength = closeApproachLength;
|
|
346
|
-
minCurvePFraction = curvePFraction;
|
|
347
|
-
minPointP = pointP;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
295
|
+
if (!isClosedArc(cpB)) {
|
|
296
|
+
this.testAndRecordProjection(cpB, 0, cpB.startPoint(pt), cpA, !reversed);
|
|
297
|
+
this.testAndRecordProjection(cpB, 1, cpB.endPoint(pt), cpA, !reversed);
|
|
351
298
|
}
|
|
352
|
-
if (minCurvePFraction && minPointP)
|
|
353
|
-
return CurveLocationDetail.createCurveFractionPoint(curveP, minCurvePFraction, minPointP);
|
|
354
|
-
return undefined;
|
|
355
299
|
}
|
|
356
|
-
/**
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
*/
|
|
362
|
-
testAndRecordProjection(cpA, fA, pointA, cpB, fB0, fB1, reversed) {
|
|
363
|
-
let detail;
|
|
364
|
-
if (cpB instanceof LineString3d) {
|
|
365
|
-
const segParamsB = cpB.globalFractionToSegmentIndexAndLocalFraction(fB0 <= fB1 ? fB0 : fB1);
|
|
366
|
-
const segIndexB = (segParamsB.fraction < 0.999999) ? segParamsB.index : segParamsB.index + 1;
|
|
367
|
-
const segmentB = cpB.getIndexedSegment(segIndexB);
|
|
368
|
-
if (segmentB && (detail = this.getPointCurveClosestApproachXYNewton(segmentB, pointA)))
|
|
369
|
-
LineString3d.convertLocalToGlobalDetail(detail, segIndexB, cpB.numEdges(), cpB);
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
detail = this.getPointCurveClosestApproachXYNewton(cpB, pointA);
|
|
373
|
-
}
|
|
374
|
-
if (detail) {
|
|
375
|
-
const fB = Geometry.restrictToInterval(detail.fraction, fB0, fB1);
|
|
376
|
-
if (fB === detail.fraction) { // if fraction is within fB0 and fB1
|
|
377
|
-
this.testAndRecordPointPairApproach(cpA, fA, pointA, cpB, detail.fraction, detail.point, reversed);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
300
|
+
/** Find the closest xy approach between `pointA` and `cpB`. */
|
|
301
|
+
testAndRecordProjection(cpA, fA, pointA, cpB, reversed) {
|
|
302
|
+
const detail = cpB.closestPointXY(pointA);
|
|
303
|
+
if (detail)
|
|
304
|
+
this.testAndRecordPointPair(cpA, fA, pointA, cpB, detail.fraction, detail.point, reversed);
|
|
380
305
|
}
|
|
381
306
|
/**
|
|
382
307
|
* Compute closest xy approach of two line segments.
|
|
@@ -384,63 +309,50 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
384
309
|
* Record with fraction mapping.
|
|
385
310
|
* * The fraction mappings allow portions of a linestring to be passed here.
|
|
386
311
|
*/
|
|
387
|
-
|
|
312
|
+
computeSegmentSegment(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed) {
|
|
388
313
|
// compute a pair with fractions local to segments
|
|
389
314
|
const approach = CurveCurveCloseApproachXY.segmentSegmentBoundedApproach(pointA0, pointA1, pointB0, pointB1, this._maxDistanceSquared);
|
|
390
315
|
// adjust the pair to refer to input curves and global fractions, then record it if new
|
|
391
316
|
if (approach) {
|
|
392
317
|
approach.detailA.setCurve(cpA);
|
|
393
318
|
approach.detailB.setCurve(cpB);
|
|
394
|
-
this.
|
|
319
|
+
this.testAndRecordLocalPair(approach, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed);
|
|
395
320
|
}
|
|
396
321
|
}
|
|
397
|
-
/** Low level dispatch of segment with segment. */
|
|
398
|
-
dispatchSegmentSegment(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed) {
|
|
399
|
-
this.computeSegmentSegment3D(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed);
|
|
400
|
-
}
|
|
401
322
|
/**
|
|
402
323
|
* Compute the perpendiculars between a line segment and an arc, without extending either curve.
|
|
403
324
|
* * One or two perpendiculars will be found.
|
|
404
325
|
* * Each perpendicular segment starts or ends on the arc where the arc tangent is parallel to the line tangent.
|
|
405
|
-
*
|
|
406
|
-
* @param
|
|
407
|
-
* @param
|
|
408
|
-
* @param
|
|
409
|
-
* @param pointA1 end point of the segment
|
|
410
|
-
* @param fractionA1 fraction of the end of the segment
|
|
411
|
-
* @param arc the arc
|
|
412
|
-
* @param reversed swap the details in the recorded pair (default: false)
|
|
326
|
+
* @param startA line segment start point
|
|
327
|
+
* @param endA line segment end point
|
|
328
|
+
* @param arcB the arc
|
|
329
|
+
* @param announce callback to receive line and arc fractions and optional points of each perpendicular segment computed.
|
|
413
330
|
*/
|
|
414
|
-
|
|
415
|
-
const dotUT =
|
|
416
|
-
const dotVT =
|
|
331
|
+
announceAllPerpendicularsSegmentArcBounded(startA, endA, arcB, announce) {
|
|
332
|
+
const dotUT = arcB.vector0.crossProductStartEndXY(startA, endA);
|
|
333
|
+
const dotVT = arcB.vector90.crossProductStartEndXY(startA, endA);
|
|
417
334
|
const parallelRadians = Math.atan2(dotVT, dotUT);
|
|
418
335
|
for (const radians1 of [parallelRadians, parallelRadians + Math.PI]) {
|
|
419
|
-
const arcPoint =
|
|
420
|
-
const
|
|
421
|
-
if (this.acceptFraction(
|
|
422
|
-
const
|
|
423
|
-
if (
|
|
424
|
-
|
|
336
|
+
const arcPoint = arcB.radiansToPoint(radians1);
|
|
337
|
+
const arcFraction = arcB.sweep.radiansToSignedPeriodicFraction(radians1);
|
|
338
|
+
if (this.acceptFraction(arcFraction)) { // reject solution outside arc sweep
|
|
339
|
+
const lineFraction = SmallSystem.lineSegment3dXYClosestPointUnbounded(startA, endA, arcPoint);
|
|
340
|
+
if (lineFraction !== undefined && this.acceptFraction(lineFraction))
|
|
341
|
+
announce(lineFraction, undefined, arcFraction, arcPoint);
|
|
425
342
|
}
|
|
426
343
|
}
|
|
427
344
|
}
|
|
428
345
|
/**
|
|
429
|
-
*
|
|
430
|
-
* Find close approaches within maxDistance between a line segments (pointA0, pointA1) and an arc.
|
|
346
|
+
* Find close approaches within maxDistance between a line segment and an arc.
|
|
431
347
|
* To consider:
|
|
432
348
|
* 1) intersection between arc and segment.
|
|
433
|
-
* 2) endpoints to endpoints or endpoints projection to the other curve.
|
|
434
|
-
* 3) arc tangent parallel to line segment
|
|
435
|
-
* @param
|
|
436
|
-
* @param
|
|
437
|
-
* @param
|
|
438
|
-
* @param pointA1 end point of the segment
|
|
439
|
-
* @param fractionA1 fraction of the end of the segment
|
|
440
|
-
* @param arc the arc
|
|
441
|
-
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
349
|
+
* 2) endpoints to endpoints, or endpoints projection to the other curve.
|
|
350
|
+
* 3) arc tangent parallel to line segment
|
|
351
|
+
* @param lineA the line segment
|
|
352
|
+
* @param arcB the arc
|
|
353
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to arcA).
|
|
442
354
|
*/
|
|
443
|
-
|
|
355
|
+
computeSegmentArc(lineA, arcB, reversed) {
|
|
444
356
|
// 1) intersection between arc and line segment (or string).
|
|
445
357
|
// Suppose:
|
|
446
358
|
// Arc: X = C + cU + sV where c = cos(theta) and s = sin(theta)
|
|
@@ -451,45 +363,45 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
451
363
|
// evaluate points.
|
|
452
364
|
// project back to line.
|
|
453
365
|
let intersectionFound = false;
|
|
454
|
-
const data =
|
|
455
|
-
const
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
const beta = Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0); // det(A0, A1, U)
|
|
459
|
-
const gamma = Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0); // det(A0, A1, V)
|
|
366
|
+
const data = arcB.toTransformedVectors();
|
|
367
|
+
const alpha = Geometry.tripleProductXYW(lineA.point0Ref, 1, lineA.point1Ref, 1, data.center, 1); // det(A0, A1, C)
|
|
368
|
+
const beta = Geometry.tripleProductXYW(lineA.point0Ref, 1, lineA.point1Ref, 1, data.vector0, 0); // det(A0, A1, U)
|
|
369
|
+
const gamma = Geometry.tripleProductXYW(lineA.point0Ref, 1, lineA.point1Ref, 1, data.vector90, 0); // det(A0, A1, V)
|
|
460
370
|
const cosines = new GrowableFloat64Array(2);
|
|
461
371
|
const sines = new GrowableFloat64Array(2);
|
|
462
372
|
const radians = new GrowableFloat64Array(2);
|
|
463
|
-
const numRoots = AnalyticRoots.appendImplicitLineUnitCircleIntersections(
|
|
464
|
-
alpha, beta, gamma, cosines, sines, radians);
|
|
373
|
+
const numRoots = AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
465
374
|
for (let i = 0; i < numRoots; i++) {
|
|
466
375
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
467
376
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
377
|
+
if (this.acceptFraction(arcFraction)) { // reject solution outside arc sweep
|
|
378
|
+
const lineFraction = SmallSystem.lineSegment3dXYClosestPointUnbounded(lineA.point0Ref, lineA.point1Ref, arcPoint);
|
|
379
|
+
if (lineFraction !== undefined && this.acceptFraction(lineFraction)) {
|
|
380
|
+
this.testAndRecordPointPair(lineA, lineFraction, undefined, arcB, arcFraction, arcPoint, reversed);
|
|
381
|
+
intersectionFound = true;
|
|
382
|
+
}
|
|
473
383
|
}
|
|
474
384
|
}
|
|
475
385
|
if (intersectionFound)
|
|
476
386
|
return;
|
|
477
|
-
// 2) endpoints to endpoints or endpoints projection to the other curve.
|
|
478
|
-
this.
|
|
479
|
-
// 3) arc tangent parallel to line segment
|
|
387
|
+
// 2) endpoints to endpoints, or endpoints projection to the other curve.
|
|
388
|
+
this.testAndRecordEndPointApproaches(lineA, arcB, reversed);
|
|
389
|
+
// 3) arc tangent parallel to line segment.
|
|
480
390
|
// If line does not intersect the arc, then the closest (and/or the furthest) point on arc to the line is a
|
|
481
391
|
// point where the tangent line on arc at that point is parallel to the line.
|
|
482
|
-
this.
|
|
392
|
+
this.announceAllPerpendicularsSegmentArcBounded(lineA.point0Ref, lineA.point1Ref, arcB, (lineFraction, linePoint, arcFraction, arcPoint) => this.testAndRecordPointPair(lineA, lineFraction, linePoint, arcB, arcFraction, arcPoint, reversed));
|
|
483
393
|
}
|
|
484
394
|
/**
|
|
485
395
|
* Compute segments perpendicular to two elliptical arcs, without extending either curve.
|
|
486
396
|
* * Perpendiculars from an endpoint are not explicitly computed.
|
|
487
397
|
* * Intersections are also found by this search: they are reported as zero-length segments.
|
|
398
|
+
* @param arcA first arc
|
|
399
|
+
* @param arcB second arc
|
|
488
400
|
* @param reversed swap the details in the recorded pair (default: false)
|
|
489
401
|
*/
|
|
490
|
-
allPerpendicularsArcArcBounded(
|
|
491
|
-
const newtonEvaluator = new CurveCurveCloseApproachXYRRtoRRD(
|
|
492
|
-
// HEURISTIC: 2 ellipses have up to 8 perpendiculars
|
|
402
|
+
allPerpendicularsArcArcBounded(arcA, arcB, reversed = false) {
|
|
403
|
+
const newtonEvaluator = new CurveCurveCloseApproachXYRRtoRRD(arcA, arcB);
|
|
404
|
+
// HEURISTIC: 2 ellipses have up to 8 perpendiculars
|
|
493
405
|
const seedDelta = 1 / 10; // denominator 9 fails the unit test
|
|
494
406
|
const seedStart = seedDelta / 2;
|
|
495
407
|
const newtonSearcher = new Newton2dUnboundedWithDerivative(newtonEvaluator, 100); // observed convergence to 1.0e-11 in 49 iters
|
|
@@ -497,10 +409,10 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
497
409
|
for (let seedV = seedStart; seedV < 1; seedV += seedDelta) {
|
|
498
410
|
newtonSearcher.setUV(seedU, seedV);
|
|
499
411
|
if (newtonSearcher.runIterations()) {
|
|
500
|
-
const
|
|
501
|
-
const
|
|
502
|
-
if (this.acceptFraction(
|
|
503
|
-
this.
|
|
412
|
+
const fractionA = newtonSearcher.getU();
|
|
413
|
+
const fractionB = newtonSearcher.getV();
|
|
414
|
+
if (this.acceptFraction(fractionA) && this.acceptFraction(fractionB)) {
|
|
415
|
+
this.testAndRecordPointPair(arcA, fractionA, undefined, arcB, fractionB, undefined, reversed);
|
|
504
416
|
}
|
|
505
417
|
}
|
|
506
418
|
}
|
|
@@ -515,7 +427,7 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
515
427
|
if (!rangeB.intersectsRangeXY(rangeA))
|
|
516
428
|
return;
|
|
517
429
|
// 1) endpoints to endpoints or endpoints projection to the other curve
|
|
518
|
-
this.
|
|
430
|
+
this.testAndRecordEndPointApproaches(cpA, cpB, reversed);
|
|
519
431
|
// 2) perpendicular line between 2 arcs (includes intersections)
|
|
520
432
|
this.allPerpendicularsArcArcBounded(cpA, cpB, reversed);
|
|
521
433
|
}
|
|
@@ -558,7 +470,7 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
558
470
|
const fB1 = (i + 1 === numB - 1) ? 1.0 : (i + 1) * deltaFracB; // make sure we nail the end fraction
|
|
559
471
|
lsB.packedPoints.getPoint3dAtUncheckedPointIndex(i, pointB0);
|
|
560
472
|
lsB.packedPoints.getPoint3dAtUncheckedPointIndex(i + 1, pointB1);
|
|
561
|
-
this.
|
|
473
|
+
this.computeSegmentSegment(segA, pointA0, 0.0, pointA1, 1.0, lsB, pointB0, fB0, pointB1, fB1, reversed);
|
|
562
474
|
}
|
|
563
475
|
}
|
|
564
476
|
/** Detail computation for arc approaching linestring. */
|
|
@@ -569,72 +481,28 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
569
481
|
rangeA.expandInPlace(this._maxDistanceToAccept);
|
|
570
482
|
if (!rangeB.intersectsRangeXY(rangeA))
|
|
571
483
|
return;
|
|
572
|
-
const
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
484
|
+
const v0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
485
|
+
const v1 = CurveCurveCloseApproachXY._workPointBB1;
|
|
486
|
+
// 1. record intersections
|
|
487
|
+
const intersections = CurveCurve.intersectionXYPairs(arcA, false, lsB, false, this._xyTolerance);
|
|
488
|
+
for (const intersection of intersections)
|
|
489
|
+
this.testAndRecordPair(intersection, reversed);
|
|
490
|
+
// 2. record linestring interior vertex projections onto arc
|
|
491
|
+
const fStep = Geometry.safeDivideFraction(1.0, lsB.numEdges(), 0);
|
|
492
|
+
for (let i = 1; i < lsB.numEdges(); ++i)
|
|
493
|
+
this.testAndRecordProjection(lsB, i * fStep, lsB.pointAtUnchecked(i, v0), arcA, !reversed);
|
|
494
|
+
// 3. record arc/linestring endpoint projections onto linestring/arc
|
|
495
|
+
this.testAndRecordEndPointApproaches(arcA, lsB, reversed);
|
|
496
|
+
// 4. record perpendiculars from within a segment to the arc
|
|
497
|
+
lsB.startPoint(v0);
|
|
498
|
+
for (let iSeg = 0; iSeg < lsB.numEdges(); ++iSeg, v0.setFrom(v1)) {
|
|
499
|
+
lsB.pointAtUnchecked(iSeg + 1, v1);
|
|
500
|
+
this.announceAllPerpendicularsSegmentArcBounded(v0, v1, arcA, (lineFraction, linePoint, arcFraction, arcPoint) => {
|
|
501
|
+
const fLineString = lsB.segmentIndexAndLocalFractionToGlobalFraction(iSeg, lineFraction);
|
|
502
|
+
this.testAndRecordPointPair(arcA, arcFraction, arcPoint, lsB, fLineString, linePoint, reversed);
|
|
503
|
+
});
|
|
586
504
|
}
|
|
587
505
|
}
|
|
588
|
-
/** Low level dispatch of curve collection. */
|
|
589
|
-
dispatchCurveCollection(geomA, geomAHandler) {
|
|
590
|
-
const geomB = this._geometryB; // save
|
|
591
|
-
if (!geomB || !geomB.children || !(geomB instanceof CurveCollection))
|
|
592
|
-
return;
|
|
593
|
-
for (const child of geomB.children) {
|
|
594
|
-
this.resetGeometry(child);
|
|
595
|
-
geomAHandler(geomA);
|
|
596
|
-
}
|
|
597
|
-
this._geometryB = geomB; // restore
|
|
598
|
-
}
|
|
599
|
-
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
600
|
-
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
601
|
-
if (!this._geometryB || !(this._geometryB instanceof CurveChainWithDistanceIndex))
|
|
602
|
-
return;
|
|
603
|
-
if (geomA instanceof CurveChainWithDistanceIndex) {
|
|
604
|
-
assert(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
605
|
-
}
|
|
606
|
-
const index0 = this._results.length;
|
|
607
|
-
const geomB = this._geometryB; // save
|
|
608
|
-
for (const child of geomB.path.children) {
|
|
609
|
-
this.resetGeometry(child);
|
|
610
|
-
geomAHandler(geomA);
|
|
611
|
-
}
|
|
612
|
-
this.resetGeometry(geomB); // restore
|
|
613
|
-
this._results = CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
614
|
-
}
|
|
615
|
-
/** Double dispatch handler for strongly typed segment. */
|
|
616
|
-
handleLineSegment3d(segmentA) {
|
|
617
|
-
if (this._geometryB instanceof LineSegment3d) {
|
|
618
|
-
const segmentB = this._geometryB;
|
|
619
|
-
this.dispatchSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
620
|
-
}
|
|
621
|
-
else if (this._geometryB instanceof LineString3d) {
|
|
622
|
-
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
623
|
-
}
|
|
624
|
-
else if (this._geometryB instanceof Arc3d) {
|
|
625
|
-
this.dispatchSegmentArc(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._geometryB, false);
|
|
626
|
-
}
|
|
627
|
-
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
628
|
-
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
629
|
-
}
|
|
630
|
-
else if (this._geometryB instanceof CurveCollection) {
|
|
631
|
-
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
632
|
-
}
|
|
633
|
-
else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
|
|
634
|
-
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
635
|
-
}
|
|
636
|
-
return undefined;
|
|
637
|
-
}
|
|
638
506
|
/**
|
|
639
507
|
* Set bits for comparison to range xy
|
|
640
508
|
* * bit 0x01 => x smaller than range.low.x
|
|
@@ -707,27 +575,86 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
707
575
|
// DO NOT study the segment in detail if both bitB bits are on for any of the 4 planes
|
|
708
576
|
// (i.e., no intersection between rangeA1 and the range around line segment [B0,B1])
|
|
709
577
|
if ((bitB0 & bitB1) === 0)
|
|
710
|
-
this.
|
|
578
|
+
this.computeSegmentSegment(lsA, pointA0, fA0, pointA1, fA1, lsB, pointB0, fB0, pointB1, fB1, reversed);
|
|
711
579
|
}
|
|
712
580
|
}
|
|
713
581
|
}
|
|
714
582
|
}
|
|
715
583
|
}
|
|
584
|
+
/** Low level dispatch of curve collection. */
|
|
585
|
+
dispatchCurveCollection(geomA, geomAHandler) {
|
|
586
|
+
const geomB = this._geometryB; // save
|
|
587
|
+
if (!geomB || !geomB.children || !(geomB instanceof CurveCollection))
|
|
588
|
+
return;
|
|
589
|
+
for (const child of geomB.children) {
|
|
590
|
+
this.resetGeometry(child);
|
|
591
|
+
geomAHandler(geomA);
|
|
592
|
+
}
|
|
593
|
+
this._geometryB = geomB; // restore
|
|
594
|
+
}
|
|
595
|
+
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
596
|
+
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
597
|
+
if (!this._geometryB || !(this._geometryB instanceof CurveChainWithDistanceIndex))
|
|
598
|
+
return;
|
|
599
|
+
if (geomA instanceof CurveChainWithDistanceIndex)
|
|
600
|
+
assert(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
601
|
+
const saveResults = this.grabPairedResults();
|
|
602
|
+
const geomB = this._geometryB;
|
|
603
|
+
for (const child of geomB.path.children) {
|
|
604
|
+
this.resetGeometry(child);
|
|
605
|
+
geomAHandler(geomA);
|
|
606
|
+
}
|
|
607
|
+
this.resetGeometry(geomB);
|
|
608
|
+
const childResults = this._results.extractArray();
|
|
609
|
+
childResults.forEach((pair) => {
|
|
610
|
+
CurveChainWithDistanceIndex.convertChildDetailToChainDetailSingle(pair, undefined, geomB);
|
|
611
|
+
this._results.insert(pair);
|
|
612
|
+
});
|
|
613
|
+
saveResults.forEach((pair) => this._results.insert(pair));
|
|
614
|
+
}
|
|
615
|
+
/** Double dispatch handler for strongly typed segment. */
|
|
616
|
+
handleLineSegment3d(segmentA) {
|
|
617
|
+
if (this._geometryB instanceof LineSegment3d) {
|
|
618
|
+
const segmentB = this._geometryB;
|
|
619
|
+
this.computeSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
620
|
+
}
|
|
621
|
+
else if (this._geometryB instanceof LineString3d) {
|
|
622
|
+
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
623
|
+
}
|
|
624
|
+
else if (this._geometryB instanceof Arc3d) {
|
|
625
|
+
this.computeSegmentArc(segmentA, this._geometryB, false);
|
|
626
|
+
}
|
|
627
|
+
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
628
|
+
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
629
|
+
}
|
|
630
|
+
else if (this._geometryB instanceof TransitionSpiral3d) {
|
|
631
|
+
this.dispatchCurveSpiral(segmentA, this._geometryB, false);
|
|
632
|
+
}
|
|
633
|
+
else if (this._geometryB instanceof CurveCollection) {
|
|
634
|
+
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
635
|
+
}
|
|
636
|
+
else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
|
|
637
|
+
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
638
|
+
}
|
|
639
|
+
return undefined;
|
|
640
|
+
}
|
|
716
641
|
/** Double dispatch handler for strongly typed linestring. */
|
|
717
642
|
handleLineString3d(lsA) {
|
|
718
|
-
if (this._geometryB instanceof
|
|
719
|
-
const lsB = this._geometryB;
|
|
720
|
-
this.computeLineStringLineString(lsA, lsB, false);
|
|
721
|
-
}
|
|
722
|
-
else if (this._geometryB instanceof LineSegment3d) {
|
|
643
|
+
if (this._geometryB instanceof LineSegment3d) {
|
|
723
644
|
this.computeSegmentLineString(this._geometryB, lsA, true);
|
|
724
645
|
}
|
|
646
|
+
else if (this._geometryB instanceof LineString3d) {
|
|
647
|
+
this.computeLineStringLineString(lsA, this._geometryB, false);
|
|
648
|
+
}
|
|
725
649
|
else if (this._geometryB instanceof Arc3d) {
|
|
726
650
|
this.computeArcLineString(this._geometryB, lsA, true);
|
|
727
651
|
}
|
|
728
652
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
729
653
|
this.dispatchLineStringBSplineCurve(lsA, this._geometryB, false);
|
|
730
654
|
}
|
|
655
|
+
else if (this._geometryB instanceof TransitionSpiral3d) {
|
|
656
|
+
this.dispatchCurveSpiral(lsA, this._geometryB, false);
|
|
657
|
+
}
|
|
731
658
|
else if (this._geometryB instanceof CurveCollection) {
|
|
732
659
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
733
660
|
}
|
|
@@ -737,46 +664,146 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
737
664
|
return undefined;
|
|
738
665
|
}
|
|
739
666
|
/** Double dispatch handler for strongly typed arc. */
|
|
740
|
-
handleArc3d(
|
|
667
|
+
handleArc3d(arcA) {
|
|
741
668
|
if (this._geometryB instanceof LineSegment3d) {
|
|
742
|
-
this.
|
|
669
|
+
this.computeSegmentArc(this._geometryB, arcA, true);
|
|
743
670
|
}
|
|
744
671
|
else if (this._geometryB instanceof LineString3d) {
|
|
745
|
-
this.computeArcLineString(
|
|
672
|
+
this.computeArcLineString(arcA, this._geometryB, false);
|
|
746
673
|
}
|
|
747
674
|
else if (this._geometryB instanceof Arc3d) {
|
|
748
|
-
this.dispatchArcArc(
|
|
675
|
+
this.dispatchArcArc(arcA, this._geometryB, false);
|
|
749
676
|
}
|
|
750
677
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
751
|
-
this.dispatchArcBsplineCurve3d(
|
|
678
|
+
this.dispatchArcBsplineCurve3d(arcA, this._geometryB, false);
|
|
679
|
+
}
|
|
680
|
+
else if (this._geometryB instanceof TransitionSpiral3d) {
|
|
681
|
+
this.dispatchCurveSpiral(arcA, this._geometryB, false);
|
|
752
682
|
}
|
|
753
683
|
else if (this._geometryB instanceof CurveCollection) {
|
|
754
|
-
this.dispatchCurveCollection(
|
|
684
|
+
this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
|
|
755
685
|
}
|
|
756
686
|
else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
|
|
757
|
-
this.dispatchCurveChainWithDistanceIndex(
|
|
687
|
+
this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
|
|
758
688
|
}
|
|
759
689
|
return undefined;
|
|
760
690
|
}
|
|
761
691
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
762
|
-
handleBSplineCurve3d(
|
|
692
|
+
handleBSplineCurve3d(curveA) {
|
|
763
693
|
if (this._geometryB instanceof LineSegment3d) {
|
|
764
|
-
this.dispatchSegmentBsplineCurve(this._geometryB,
|
|
694
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, curveA, true);
|
|
765
695
|
}
|
|
766
696
|
else if (this._geometryB instanceof LineString3d) {
|
|
767
|
-
this.dispatchLineStringBSplineCurve(this._geometryB,
|
|
697
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, curveA, true);
|
|
768
698
|
}
|
|
769
699
|
else if (this._geometryB instanceof Arc3d) {
|
|
770
|
-
this.dispatchArcBsplineCurve3d(this._geometryB,
|
|
700
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, curveA, true);
|
|
771
701
|
}
|
|
772
702
|
else if (this._geometryB instanceof BSplineCurve3dBase) {
|
|
773
|
-
this.dispatchBSplineCurve3dBSplineCurve3d(
|
|
703
|
+
this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
|
|
704
|
+
}
|
|
705
|
+
else if (this._geometryB instanceof TransitionSpiral3d) {
|
|
706
|
+
this.dispatchCurveSpiral(curveA, this._geometryB, false);
|
|
774
707
|
}
|
|
775
708
|
else if (this._geometryB instanceof CurveCollection) {
|
|
776
|
-
this.dispatchCurveCollection(
|
|
709
|
+
this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
|
|
777
710
|
}
|
|
778
711
|
else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
|
|
779
|
-
this.dispatchCurveChainWithDistanceIndex(
|
|
712
|
+
this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
|
|
713
|
+
}
|
|
714
|
+
return undefined;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Process seeds for xy close approach between the curve and spiral.
|
|
718
|
+
* * Refine each result via Newton iteration. If it doesn't converge, remove it.
|
|
719
|
+
* @param seeds The initial seed results to refine.
|
|
720
|
+
* @param curveA The other curve primitive. May also be a transition spiral.
|
|
721
|
+
* @param spiralB The transition spiral.
|
|
722
|
+
* @param reversed whether `spiralB` data is in `detailA` of each recorded pair, and `curveA` data in `detailB`.
|
|
723
|
+
*/
|
|
724
|
+
refineSpiralResultsByNewton(seeds, curveA, spiralB, reversed = false) {
|
|
725
|
+
const xyMatchingFunction = new CurveCurveCloseApproachXYRRtoRRD(curveA, spiralB);
|
|
726
|
+
const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction, 50, this._newtonTolerance); // seen: 47
|
|
727
|
+
for (const seed of seeds) {
|
|
728
|
+
const detailA = reversed ? seed.detailB : seed.detailA;
|
|
729
|
+
const detailB = reversed ? seed.detailA : seed.detailB;
|
|
730
|
+
assert(detailB.curve instanceof LineString3d, "Caller has discretized the spiral");
|
|
731
|
+
newtonSearcher.setUV(detailA.fraction, detailB.fraction); // use linestring fraction as spiral param; it generally yields a closer point than fractional length!
|
|
732
|
+
if (newtonSearcher.runIterations()) {
|
|
733
|
+
const fractionA = newtonSearcher.getU();
|
|
734
|
+
const fractionB = newtonSearcher.getV();
|
|
735
|
+
if (this.acceptFraction(fractionA) && this.acceptFraction(fractionB))
|
|
736
|
+
this.testAndRecordPointPair(curveA, fractionA, undefined, spiralB, fractionB, undefined, reversed);
|
|
737
|
+
} // ignore failure to converge
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Append stroke points and return the line string.
|
|
742
|
+
* * This is a convenient wrapper for [[CurvePrimitive.emitStrokes]] but the analogous instance method cannot be added
|
|
743
|
+
* to that class due to the ensuing recursion with subclass [[LineString3d]].
|
|
744
|
+
* @param options options for stroking the instance curve.
|
|
745
|
+
* @param result object to receive appended stroke points; if omitted, a new object is created, populated, and returned.
|
|
746
|
+
*/
|
|
747
|
+
strokeCurve(curve, options, result) {
|
|
748
|
+
const ls = result ? result : LineString3d.create();
|
|
749
|
+
curve.emitStrokes(ls, options);
|
|
750
|
+
return ls;
|
|
751
|
+
}
|
|
752
|
+
/** Find and return the close approaches between curveA and the discretization of curveB. */
|
|
753
|
+
computeDiscreteCloseApproachResults(curveA, lsB, reversed) {
|
|
754
|
+
const maxDist = this.maxDistanceToAccept;
|
|
755
|
+
const saveResults = this.grabPairedResults(); // save current results
|
|
756
|
+
const geomB = this._geometryB;
|
|
757
|
+
this.maxDistanceToAccept = maxDist ? maxDist * 1.2 : undefined; // HEURISTIC: allow slack for Newton seeds
|
|
758
|
+
this.resetGeometry(curveA);
|
|
759
|
+
this.handleLineString3d(lsB); // populate empty results with discrete solutions
|
|
760
|
+
if (!reversed) {
|
|
761
|
+
// handleLineString3d put lsB data into detailA, so if we aren't reversing, we need to swap
|
|
762
|
+
for (const result of this._results)
|
|
763
|
+
result.swapDetails();
|
|
764
|
+
}
|
|
765
|
+
this.resetGeometry(geomB);
|
|
766
|
+
this.maxDistanceToAccept = maxDist;
|
|
767
|
+
const discreteResults = this._results.extractArray();
|
|
768
|
+
saveResults.forEach((pair) => this._results.insert(pair)); // restore current results
|
|
769
|
+
return discreteResults;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Compute the XY close approach of a curve and a spiral.
|
|
773
|
+
* @param curveA curve to find its close approach with spiralB. May also be a transition spiral.
|
|
774
|
+
* @param spiralB transition spiral to find its close approach with curveA.
|
|
775
|
+
* @param reversed whether `spiralB` data will be recorded in `detailA` of each result, and `curveA` data in `detailB`.
|
|
776
|
+
*/
|
|
777
|
+
dispatchCurveSpiral(curveA, spiralB, reversed) {
|
|
778
|
+
// explicit search for intersections (Newton converges too slowly on DirectSpiral3d tangent intersections)
|
|
779
|
+
const intersections = CurveCurve.intersectionXYPairs(curveA, false, spiralB, false, this._xyTolerance);
|
|
780
|
+
for (const intersection of intersections)
|
|
781
|
+
this.testAndRecordPair(intersection, reversed);
|
|
782
|
+
// append seeds computed by solving the discretized spiral close approach problem, then refine the seeds via Newton
|
|
783
|
+
let cpA = curveA;
|
|
784
|
+
if (curveA instanceof TransitionSpiral3d)
|
|
785
|
+
cpA = this.strokeCurve(curveA);
|
|
786
|
+
const cpB = this.strokeCurve(spiralB);
|
|
787
|
+
const seeds = this.computeDiscreteCloseApproachResults(cpA, cpB, reversed);
|
|
788
|
+
this.refineSpiralResultsByNewton(seeds, curveA, spiralB, reversed);
|
|
789
|
+
if (curveA instanceof LineString3d) { // explicitly test corners (where Newton converges too slowly)
|
|
790
|
+
const fStep = Geometry.safeDivideFraction(1.0, curveA.numEdges(), 0);
|
|
791
|
+
const v0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
792
|
+
for (let i = 1; i < curveA.numEdges(); ++i)
|
|
793
|
+
this.testAndRecordProjection(curveA, i * fStep, curveA.pointAtUnchecked(i, v0), spiralB, reversed);
|
|
794
|
+
}
|
|
795
|
+
this.testAndRecordEndPointApproaches(curveA, spiralB, reversed);
|
|
796
|
+
}
|
|
797
|
+
/** Double dispatch handler for strongly typed spiral curve. */
|
|
798
|
+
handleTransitionSpiral(spiral) {
|
|
799
|
+
if (this._geometryB instanceof CurveChainWithDistanceIndex) {
|
|
800
|
+
this.dispatchCurveChainWithDistanceIndex(spiral, this.handleTransitionSpiral.bind(this));
|
|
801
|
+
}
|
|
802
|
+
else if (this._geometryB instanceof CurvePrimitive) {
|
|
803
|
+
this.dispatchCurveSpiral(this._geometryB, spiral, true);
|
|
804
|
+
}
|
|
805
|
+
else if (this._geometryB instanceof CurveCollection) {
|
|
806
|
+
this.dispatchCurveCollection(spiral, this.handleTransitionSpiral.bind(this));
|
|
780
807
|
}
|
|
781
808
|
return undefined;
|
|
782
809
|
}
|
|
@@ -784,7 +811,11 @@ export class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
|
|
|
784
811
|
handleCurveChainWithDistanceIndex(chain) {
|
|
785
812
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
786
813
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
787
|
-
|
|
814
|
+
const childResults = this._results.extractArray();
|
|
815
|
+
childResults.forEach((pair) => {
|
|
816
|
+
CurveChainWithDistanceIndex.convertChildDetailToChainDetailSingle(pair, chain, undefined);
|
|
817
|
+
this._results.insert(pair);
|
|
818
|
+
});
|
|
788
819
|
}
|
|
789
820
|
/** Double dispatch handler for strongly typed homogeneous bspline curve .. */
|
|
790
821
|
handleBSplineCurve3dH(_curve) {
|