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