@itwin/core-geometry 4.1.0-dev.8 → 4.1.0-dev.81
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 +87 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +2 -2
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +2 -2
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js +11 -11
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +73 -76
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +105 -86
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +112 -54
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +54 -44
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +33 -29
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts +39 -25
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +35 -23
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +5 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +5 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +4 -3
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +7 -5
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +71 -48
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +36 -26
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +46 -39
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +6 -2
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +13 -9
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +67 -3
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +75 -7
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +9 -7
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +77 -0
- package/lib/cjs/curve/CurveOps.d.ts.map +1 -0
- package/lib/cjs/curve/CurveOps.js +160 -0
- package/lib/cjs/curve/CurveOps.js.map +1 -0
- package/lib/cjs/curve/CurvePrimitive.d.ts +26 -18
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +4 -3
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.d.ts +2 -2
- package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js +2 -2
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +7 -5
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +6 -6
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +2 -2
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +3 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +7 -5
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +18 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.d.ts +97 -0
- package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/cjs/curve/OffsetOptions.js +166 -0
- package/lib/cjs/curve/OffsetOptions.js.map +1 -0
- package/lib/cjs/curve/ParityRegion.d.ts +7 -7
- package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
- package/lib/cjs/curve/ParityRegion.js +19 -11
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +6 -6
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +15 -9
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.d.ts +5 -7
- package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js +7 -7
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +76 -56
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +83 -60
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +6 -2
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.d.ts +6 -5
- package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
- package/lib/cjs/curve/UnionRegion.js +17 -8
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/cjs/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +130 -220
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +89 -178
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +2 -2
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +9 -0
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +13 -0
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/cjs/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +51 -55
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +13 -11
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +32 -5
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +41 -32
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +11 -8
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +18 -5
- 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 +5 -5
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +31 -22
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +55 -0
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +134 -94
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +297 -145
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/cjs/geometry3d/Ray2d.js +146 -0
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +10 -3
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +18 -6
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +0 -2
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js +5 -5
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +173 -34
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- 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.d.ts +15 -12
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +104 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +11 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +30 -0
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -1
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -1
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +2 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +2 -2
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +9 -0
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +3 -3
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/esm/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js +28 -28
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js +11 -11
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +73 -76
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +105 -86
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +112 -54
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +54 -44
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +33 -29
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts +39 -25
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +35 -23
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +5 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +5 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +4 -3
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +6 -4
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +70 -47
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +36 -26
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +46 -39
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +6 -2
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +13 -9
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +67 -3
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +74 -6
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +9 -7
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +77 -0
- package/lib/esm/curve/CurveOps.d.ts.map +1 -0
- package/lib/esm/curve/CurveOps.js +156 -0
- package/lib/esm/curve/CurveOps.js.map +1 -0
- package/lib/esm/curve/CurvePrimitive.d.ts +26 -18
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +4 -3
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.d.ts +2 -2
- package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/esm/curve/GeometryQuery.js +2 -2
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +7 -5
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +5 -5
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +2 -2
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +2 -2
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +7 -5
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +18 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.d.ts +97 -0
- package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/esm/curve/OffsetOptions.js +161 -0
- package/lib/esm/curve/OffsetOptions.js.map +1 -0
- package/lib/esm/curve/ParityRegion.d.ts +7 -7
- package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
- package/lib/esm/curve/ParityRegion.js +19 -11
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +6 -6
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +15 -9
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.d.ts +5 -7
- package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/esm/curve/ProxyCurve.js +7 -7
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +76 -56
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +84 -61
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +6 -2
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.d.ts +6 -5
- package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
- package/lib/esm/curve/UnionRegion.js +17 -8
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -218
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +86 -173
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +9 -0
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +13 -0
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/esm/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +51 -55
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +13 -11
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +247 -124
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +32 -5
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +41 -32
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +11 -8
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +18 -5
- 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 +5 -5
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +31 -22
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +56 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +134 -94
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +297 -145
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/esm/geometry3d/Ray2d.js +142 -0
- package/lib/esm/geometry3d/Ray2d.js.map +1 -0
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +10 -3
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +18 -6
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +0 -2
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js +5 -5
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +173 -35
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- 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.d.ts +15 -12
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +102 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +11 -0
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +30 -0
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +2 -7
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -1
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -1
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +2 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +2 -2
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +9 -0
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +3 -3
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +6 -17
- package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
|
@@ -1 +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E;YAC3C,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SAC5F;aAAM,IAAI,IAAI,CAAC,UAAU,YAAY,kBAAkB,EAAE;YACxD,IAAI,CAAC,oCAAoC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAC1E;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,4EAA4E;IAC5D,qBAAqB,CAAC,MAAuB;QAC3D;;;;;;;;;;WAUG;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;;AA/sBc,qCAAc,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;AAshBnC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;SA7jBrC,sBAAsB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { BSplineCurve3d, BSplineCurve3dBase } from \"../bspline/BSplineCurve\";\r\n// import { BezierCurveBase } from \"../bspline/BezierCurveBase\";\r\n// import { BezierCurve3dH } from \"../bspline/BezierCurve3dH\";\r\n// import { UnivariateBezier } from \"../numerics/BezierPolynomials\";\r\nimport { BSplineCurve3dH } from \"../bspline/BSplineCurve3dH\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { NullGeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\n// import { Arc3d } from \"./Arc3d\";\r\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\r\n// import { XYAndZ } from \"../geometry3d/XYZProps\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\n// import { LineString3d } from \"./LineString3d\";\r\nimport { SmallSystem, TrigPolynomial } from \"../numerics/Polynomials\";\r\n// import { Point4d } from \"../geometry4d/Point4d\";\r\n// import { Transform } from \"../geometry3d/Transform\";\r\n// import { Matrix3d } from \"../geometry3d/Matrix3d\";\r\nimport { Arc3d } from \"./Arc3d\";\r\n// import { Range3d } from \"../geometry3d/Range\";\r\nimport { CurveLocationDetailArrayPair } from \"./CurveCurveIntersectXY\";\r\nimport { CurveIntervalRole, CurveLocationDetail } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { LineSegment3d } from \"./LineSegment3d\";\r\nimport { LineString3d } from \"./LineString3d\";\r\n\r\n// cspell:word XYRR\r\n/**\r\n * * Handler class for XYZ intersections.\r\n * * Instances are initialized and called from CurveCurve.\r\n * * Constructor is told two geometry items A and B\r\n * * geometryB is saved for later reference\r\n * * type-specific handler methods will \"see\" geometry A repeatedly.\r\n * * Hence geometryA is NOT saved by the constructor.\r\n * @internal\r\n */\r\nexport class CurveCurveIntersectXYZ extends NullGeometryHandler {\r\n // private geometryA: GeometryQuery; // nb never used -- passed through handlers.\r\n private _extendA: boolean;\r\n private _geometryB: GeometryQuery;\r\n private _extendB: boolean;\r\n private _results!: CurveLocationDetailArrayPair;\r\n private reinitialize() {\r\n this._results = new CurveLocationDetailArrayPair();\r\n }\r\n /**\r\n *\r\n * @param _geometryA first curve for intersection. This is NOT saved.\r\n * @param extendA flag to enable using extension of geometryA.\r\n * @param geometryB second curve for intersection. Saved for reference by specific handler methods.\r\n * @param extendB flag for extension of geometryB.\r\n */\r\n public constructor(_geometryA: GeometryQuery, extendA: boolean, geometryB: GeometryQuery, extendB: boolean) {\r\n super();\r\n // this.geometryA = _geometryA;\r\n this._extendA = extendA;\r\n this._geometryB = geometryB;\r\n this._extendB = extendB;\r\n this.reinitialize();\r\n }\r\n /**\r\n * * Return the results structure for the intersection calculation.\r\n * @param reinitialize if true, a new results structure is created for use by later calls.\r\n *\r\n */\r\n public grabResults(reinitialize: boolean = false): CurveLocationDetailArrayPair {\r\n const result = this._results;\r\n if (reinitialize)\r\n this.reinitialize();\r\n return result;\r\n }\r\n\r\n private static _workVector2dA = Vector2d.create();\r\n\r\n private acceptFraction(extend0: boolean, fraction: number, extend1: boolean) {\r\n if (!extend0 && fraction < 0.0)\r\n return false;\r\n if (!extend1 && fraction > 1.0)\r\n return false;\r\n return true;\r\n }\r\n\r\n /** compute intersection of two line segments.\r\n * filter by extension rules.\r\n * reject if evaluated points do not match coordinates (e.g. close approach point)\r\n * record with fraction mapping.\r\n */\r\n private recordPointWithLocalFractions(\r\n localFractionA: number,\r\n cpA: CurvePrimitive,\r\n fractionA0: number,\r\n fractionA1: number,\r\n localFractionB: number, // Computed intersection fraction\r\n cpB: CurvePrimitive,\r\n fractionB0: number,\r\n fractionB1: number,\r\n reversed: boolean,\r\n ) {\r\n const globalFractionA = Geometry.interpolate(fractionA0, localFractionA, fractionA1);\r\n const globalFractionB = Geometry.interpolate(fractionB0, localFractionB, fractionB1);\r\n // ignore duplicate of most recent point . ..\r\n const numPrevious = this._results.dataA.length;\r\n if (numPrevious > 0) {\r\n const topFractionA = this._results.dataA[numPrevious - 1].fraction;\r\n const topFractionB = this._results.dataB[numPrevious - 1].fraction;\r\n if (reversed) {\r\n if (Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) && Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))\r\n return;\r\n } else {\r\n if (Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) && Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))\r\n return;\r\n }\r\n }\r\n const pointA = cpA.fractionToPoint(globalFractionA);\r\n const pointB = cpB.fractionToPoint(globalFractionB);\r\n if (!pointA.isAlmostEqualMetric(pointB))\r\n return;\r\n\r\n const detailA = CurveLocationDetail.createCurveFractionPoint(cpA,\r\n globalFractionA, pointA);\r\n detailA.setIntervalRole(CurveIntervalRole.isolated);\r\n const detailB = CurveLocationDetail.createCurveFractionPoint(cpB,\r\n globalFractionB, pointB);\r\n detailB.setIntervalRole(CurveIntervalRole.isolated);\r\n if (reversed) {\r\n this._results.dataA.push(detailB);\r\n this._results.dataB.push(detailA);\r\n } else {\r\n this._results.dataA.push(detailA);\r\n this._results.dataB.push(detailB);\r\n }\r\n }\r\n /** compute intersection of two line segments.\r\n * filter by extension rules.\r\n * record with fraction mapping.\r\n */\r\n private computeSegmentSegment3D(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n cpB: CurvePrimitive,\r\n extendB0: boolean,\r\n pointB0: Point3d,\r\n fractionB0: number,\r\n pointB1: Point3d,\r\n fractionB1: number,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ) {\r\n const uv = CurveCurveIntersectXYZ._workVector2dA;\r\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(\r\n pointA0, pointA1,\r\n pointB0, pointB1, uv)\r\n && this.acceptFraction(extendA0, uv.x, extendA1)\r\n && this.acceptFraction(extendB0, uv.y, extendB1)\r\n ) {\r\n this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);\r\n }\r\n }\r\n // Caller accesses data from a line segment and passes to here.\r\n // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters\r\n // allow all combinations to be passed in)\r\n // This method applies transform.\r\n private dispatchSegmentSegment(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n cpB: CurvePrimitive,\r\n extendB0: boolean,\r\n pointB0: Point3d,\r\n fractionB0: number,\r\n pointB1: Point3d,\r\n fractionB1: number,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ) {\r\n this.computeSegmentSegment3D(\r\n cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1,\r\n cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1,\r\n reversed);\r\n }\r\n /**\r\n * Create a plane whose normal is the \"better\" cross product: `vectorA.crossProduct(vectorB)` or `vectorA.crossProduct(vectorC)`\r\n * * The heuristic for \"better\" is:\r\n * * first choice is cross product with `vectorB`, if `vectorA` and `vectorB` are sufficiently far from parallel (or anti-parallel).\r\n * * otherwise use vectorC\r\n * @param origin plane origin\r\n * @param vectorA vector which must be in the plane.\r\n * @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product,\r\n * e.g. passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.\r\n * @param vectorB first candidate for additional in-plane vector\r\n * @param vectorC second candidate for additional in-plane vector\r\n */\r\n public createPlaneWithPreferredPerpendicular(origin: Point3d, vectorA: Vector3d, cosineValue: number, vectorB: Vector3d, vectorC: Vector3d): Plane3dByOriginAndUnitNormal | undefined {\r\n cosineValue = Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - Geometry.smallFraction);\r\n const dotAA = vectorA.magnitudeSquared();\r\n const dotBB = vectorB.magnitudeSquared();\r\n const dotAB = Math.abs(vectorA.dotProduct(vectorB));\r\n const cross = vectorA.unitCrossProduct(dotAB * dotAB <= cosineValue * cosineValue * dotAA * dotBB ? vectorB : vectorC);\r\n if (cross)\r\n return Plane3dByOriginAndUnitNormal.create(origin, cross);\r\n return undefined;\r\n }\r\n // Caller accesses data from a linestring or segment and passes it here.\r\n // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters\r\n // allow all combinations to be passed in)\r\n private dispatchSegmentArc(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n arc: Arc3d,\r\n extendB0: boolean,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ) {\r\n const lineVector = Vector3d.createStartEnd(pointA0, pointA1);\r\n const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);\r\n if (plane !== undefined) {\r\n const candidates: CurveLocationDetail[] = [];\r\n arc.appendPlaneIntersectionPoints(plane, candidates);\r\n let lineFraction;\r\n let linePoint: Point3d | undefined;\r\n for (const c of candidates) {\r\n if (this.acceptFraction(extendB0, c.fraction, extendB1)) {\r\n lineFraction = SmallSystem.lineSegment3dClosestPointUnbounded(pointA0, pointA1, c.point);\r\n if (lineFraction !== undefined) {\r\n linePoint = pointA0.interpolate(lineFraction, pointA1, linePoint);\r\n if (linePoint.isAlmostEqualMetric(c.point)\r\n && this.acceptFraction(extendA0, lineFraction, extendA1)) {\r\n this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1,\r\n c.fraction, arc, 0, 1, reversed);\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Caller promises arcs are coplanar.\r\n // Passes \"other\" as {center, vector0, vector90} in local xy space of cpA\r\n // Solves the arc-arc equations for that local ellipse with unit circle.\r\n // Solution fractions map directly to original arcs.\r\n private dispatchArcArcInPlane(\r\n cpA: Arc3d,\r\n extendA: boolean,\r\n cpB: Arc3d,\r\n extendB: boolean,\r\n reversed: boolean,\r\n ) {\r\n const otherVectors = cpA.otherArcAsLocalVectors(cpB);\r\n if (otherVectors !== undefined) {\r\n const ellipseRadians: number[] = [];\r\n const circleRadians: number[] = [];\r\n TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(\r\n otherVectors.center.x, otherVectors.center.y, 1.0,\r\n otherVectors.vector0.x, otherVectors.vector0.y, 0.0,\r\n otherVectors.vector90.x, otherVectors.vector90.y, 0.0,\r\n ellipseRadians, circleRadians);\r\n for (let i = 0; i < ellipseRadians.length; i++) {\r\n const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);\r\n const fractionB = cpA.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);\r\n // hm .. do we really need to check the fractions? We know they are internal to the beziers\r\n if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(fractionA, cpA, 0, 1,\r\n fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchArcArc(\r\n cpA: Arc3d,\r\n extendA: boolean,\r\n cpB: Arc3d,\r\n extendB: boolean,\r\n reversed: boolean,\r\n ) {\r\n // If arcs are in different planes:\r\n // 1) Intersect each plane with the other arc (quadratic)\r\n // 2) accept points that appear in both intersection sets.\r\n // If arcs are in parallel planes -- no intersections\r\n // If arcs are in the same plane -- xy intersection in that plane.\r\n const planeA = Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);\r\n const planeB = Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);\r\n if (planeA === undefined || planeB === undefined)\r\n return;\r\n\r\n if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {\r\n if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {\r\n // coplanar !!!\r\n this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);\r\n }\r\n } else {\r\n const arcBPoints: CurveLocationDetail[] = [];\r\n cpB.appendPlaneIntersectionPoints(planeA, arcBPoints);\r\n const arcAPoints: CurveLocationDetail[] = [];\r\n cpA.appendPlaneIntersectionPoints(planeB, arcAPoints);\r\n for (const detailB of arcBPoints) {\r\n for (const detailA of arcAPoints) {\r\n if (detailA.point.isAlmostEqual(detailB.point)) {\r\n if (this.acceptFraction(extendA, detailA.fraction, extendA)\r\n && this.acceptFraction(extendB, detailB.fraction, extendB)) {\r\n this.recordPointWithLocalFractions(detailA.fraction, cpA, 0, 1,\r\n detailB.fraction, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchArcBsplineCurve3d(\r\n _: Arc3d,\r\n _extendA: boolean,\r\n _cpB: BSplineCurve3d,\r\n _extendB: boolean,\r\n _reversed: boolean,\r\n ) {\r\n /*\r\n // Arc: X = C + cU + sV\r\n // implicitize the arc as viewed. This \"3d\" matrix is homogeneous \"XYW\" not \"xyz\"\r\n let matrixA: Matrix3d;\r\n if (this._worldToLocalPerspective) {\r\n const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);\r\n matrixA = Matrix3d.createColumnsXYW(dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w);\r\n } else {\r\n const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);\r\n matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);\r\n }\r\n // The worldToLocal has moved the arc vectors into local space.\r\n // matrixA captures the xyw parts (ignoring z)\r\n // for any point in world space,\r\n // THIS CODE ONLY WORKS FOR\r\n const matrixAInverse = matrixA.inverse();\r\n if (matrixAInverse) {\r\n const orderF = cpB.order; // order of the beziers for simple coordinates\r\n const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.\r\n const coffF = new Float64Array(orderF);\r\n const univariateBezierG = new UnivariateBezier(orderG);\r\n const axx = matrixAInverse.at(0, 0); const axy = matrixAInverse.at(0, 1); const axz = 0.0; const axw = matrixAInverse.at(0, 2);\r\n const ayx = matrixAInverse.at(1, 0); const ayy = matrixAInverse.at(1, 1); const ayz = 0.0; const ayw = matrixAInverse.at(1, 2);\r\n const awx = matrixAInverse.at(2, 0); const awy = matrixAInverse.at(2, 1); const awz = 0.0; const aww = matrixAInverse.at(2, 2);\r\n\r\n if (matrixAInverse) {\r\n let bezier: BezierCurve3dH | undefined;\r\n for (let spanIndex = 0; ; spanIndex++) {\r\n bezier = cpB.getSaturatedBezierSpan3dH(spanIndex, bezier);\r\n if (!bezier) break;\r\n if (this._worldToLocalPerspective)\r\n bezier.tryMultiplyMatrix4dInPlace(this._worldToLocalPerspective);\r\n else if (this._worldToLocalAffine)\r\n bezier.tryTransformInPlace(this._worldToLocalAffine);\r\n univariateBezierG.zero();\r\n bezier.poleProductsXYZW(coffF, axx, axy, axz, axw);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);\r\n bezier.poleProductsXYZW(coffF, ayx, ayy, ayz, ayw);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);\r\n bezier.poleProductsXYZW(coffF, awx, awy, awz, aww);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, -1.0);\r\n const roots = univariateBezierG.roots(0.0, true);\r\n if (roots) {\r\n for (const root of roots) {\r\n const fractionB = bezier.fractionToParentFraction(root);\r\n // The univariate bezier (which has been transformed by the view transform) evaluates into xyw space\r\n const bcurvePoint4d = bezier.fractionToPoint4d(root);\r\n const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);\r\n const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);\r\n const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));\r\n if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,\r\n fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n */\r\n }\r\n /*\r\n // apply the transformation to bezier curves. optionally construct ranges.\r\n private transformBeziers(beziers: BezierCurve3dH[]) {\r\n if (this._worldToLocalAffine) {\r\n for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);\r\n } else if (this._worldToLocalPerspective) {\r\n for (const bezier of beziers) bezier.tryMultiplyMatrix4dInPlace(this._worldToLocalPerspective);\r\n }\r\n }\r\n */\r\n /*\r\n private getRanges(beziers: BezierCurveBase[]): Range3d[] {\r\n const ranges: Range3d[] = [];\r\n ranges.length = 0;\r\n for (const b of beziers) {\r\n ranges.push(b.range());\r\n }\r\n return ranges;\r\n }\r\n private _xyzwA0?: Point4d;\r\n private _xyzwA1?: Point4d;\r\n private _xyzwPlane?: Point4d;\r\n private _xyzwB?: Point4d;\r\n\r\n private dispatchBezierBezierStrokeFirst(\r\n bezierA: BezierCurve3dH,\r\n bcurveA: BSplineCurve3dBase,\r\n strokeCountA: number,\r\n bezierB: BezierCurve3dH,\r\n bcurveB: BSplineCurve3dBase,\r\n _strokeCountB: number,\r\n univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.\r\n reversed: boolean) {\r\n if (!this._xyzwA0) this._xyzwA0 = Point4d.create();\r\n if (!this._xyzwA1) this._xyzwA1 = Point4d.create();\r\n if (!this._xyzwPlane) this._xyzwPlane = Point4d.create();\r\n if (!this._xyzwB) this._xyzwB = Point4d.create();\r\n /-*\r\n\r\n const roots = univariateBezierG.roots(0.0, true);\r\n if (roots) {\r\n for (const root of roots) {\r\n const fractionB = bezier.fractionToParentFraction(root);\r\n // The univariate bezier (which has been transformed by the view transform) evaluates into xyw space\r\n const bcurvePoint4d = bezier.fractionToPoint4d(root);\r\n const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);\r\n const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);\r\n const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));\r\n if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,\r\n fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n *-/\r\n bezierA.fractionToPoint4d(0.0, this._xyzwA0);\r\n let f0 = 0.0;\r\n let f1 = 1.0;\r\n const intervalTolerance = 1.0e-5;\r\n const df = 1.0 / strokeCountA;\r\n for (let i = 1; i <= strokeCountA; i++ , f0 = f1, this._xyzwA0.setFrom(this._xyzwA1)) {\r\n f1 = i * df;\r\n bezierA.fractionToPoint4d(f1, this._xyzwA1);\r\n Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);\r\n bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);\r\n let errors = 0;\r\n const roots = univariateBezierB.roots(0.0, true);\r\n if (roots)\r\n for (const r of roots) {\r\n const bezierBFraction = r;\r\n bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);\r\n const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);\r\n if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {\r\n const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);\r\n /*- TODO implement newton search\r\n const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);\r\n const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);\r\n newtonSearcher.setUV(bezierAFraction, bezierBFraction);\r\n if (newtonSearcher.runIterations()) {\r\n bezierAFraction = newtonSearcher.getU();\r\n bezierBFraction = newtonSearcher.getV();\r\n }\r\n *-/\r\n // We have a near intersection at fractions on the two beziers !!!\r\n // Iterate on the curves for a true intersection ....\r\n // NEEDS WORK -- just accept . . .\r\n const bcurveAFraction = bezierA.fractionToParentFraction(bezierAFraction);\r\n const bcurveBFraction = bezierB.fractionToParentFraction(bezierBFraction);\r\n const xyzA0 = bezierA.fractionToPoint(bezierAFraction);\r\n const xyzA1 = bcurveA.fractionToPoint(bcurveAFraction);\r\n const xyzB0 = bezierB.fractionToPoint(bezierBFraction);\r\n const xyzB1 = bcurveB.fractionToPoint(bcurveBFraction);\r\n if (!xyzA0.isAlmostEqualXY(xyzA1))\r\n errors++;\r\n if (!xyzB0.isAlmostEqualXY(xyzB1))\r\n errors++;\r\n if (errors > 0 && !xyzA0.isAlmostEqual(xyzB0))\r\n errors++;\r\n if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))\r\n errors++;\r\n if (this.acceptFraction(false, bcurveAFraction, false) && this.acceptFraction(false, bcurveBFraction, false)) {\r\n this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1,\r\n bcurveBFraction, bcurveB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n */\r\n\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchBSplineCurve3dBSplineCurve3d(\r\n _bcurveA: BSplineCurve3dBase,\r\n _bcurveB: BSplineCurve3dBase,\r\n _reversed: boolean) {\r\n /*\r\n const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];\r\n const bezierSpanB = bcurveB.collectBezierSpans(true) as BezierCurve3dH[];\r\n const numA = bezierSpanA.length;\r\n const numB = bezierSpanB.length;\r\n this.transformBeziers(bezierSpanA);\r\n this.transformBeziers(bezierSpanB);\r\n const rangeA = this.getRanges(bezierSpanA);\r\n const rangeB = this.getRanges(bezierSpanB);\r\n const orderA = bcurveA.order;\r\n const orderB = bcurveB.order;\r\n const univariateCoffsA = new UnivariateBezier(orderA);\r\n const univariateCoffsB = new UnivariateBezier(orderB);\r\n for (let a = 0; a < numA; a++) {\r\n for (let b = 0; b < numB; b++) {\r\n if (rangeA[a].intersectsRangeXY(rangeB[b])) {\r\n const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();\r\n const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();\r\n if (strokeCountA < strokeCountB)\r\n this.dispatchBezierBezierStrokeFirst(bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, !_reversed);\r\n else\r\n this.dispatchBezierBezierStrokeFirst(bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, _reversed);\r\n }\r\n }\r\n }\r\n */\r\n }\r\n\r\n /**\r\n * Apply the projection transform (if any) to (xyz, w)\r\n * @param xyz xyz parts of input point.\r\n * @param w weight to use for homogeneous effects\r\n */\r\n /*\r\n private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {\r\n if (this._worldToLocalPerspective)\r\n return this._worldToLocalPerspective.multiplyPoint3d(xyz, w);\r\n if (this._worldToLocalAffine)\r\n return this._worldToLocalAffine.multiplyXYZW(xyz.x, xyz.y, xyz.z, w);\r\n return Point4d.createFromPointAndWeight(xyz, w);\r\n }\r\n private mapNPCPlaneToWorld(npcPlane: Point4d, worldPlane: Point4d) {\r\n // for NPC pointY, Y^ * H = 0 is \"on\" plane H. (Hat is transpose)\r\n // NPC Y is A*X for our transform A and worldPointX.\r\n // hence (A X)^ * H = 0\r\n // hence X^ * A^ * H = 0\r\n // hence K = A^ * H\r\n if (this._worldToLocalAffine) {\r\n this._worldToLocalAffine.multiplyTransposeXYZW(npcPlane.x, npcPlane.y, npcPlane.z, npcPlane.w, worldPlane);\r\n } else if (this._worldToLocalPerspective) {\r\n this._worldToLocalPerspective.multiplyTransposePoint4d(npcPlane, worldPlane);\r\n } else {\r\n npcPlane.clone(worldPlane);\r\n }\r\n }\r\n */\r\n // Caller accesses data from segment and bsplineCurve\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchSegmentBsplineCurve(\r\n _cpA: CurvePrimitive,\r\n _extendA0: boolean,\r\n _pointA0: Point3d,\r\n _fractionA0: number,\r\n _pointA1: Point3d,\r\n _fractionA1: number,\r\n _extendA1: boolean,\r\n _bcurve: BSplineCurve3d,\r\n _extendB: boolean,\r\n _reversed: boolean,\r\n ) {\r\n /*\r\n const pointA0H = this.projectPoint(pointA0);\r\n const pointA1H = this.projectPoint(pointA1);\r\n const planeCoffs = Point4d.createPlanePointPointZ(pointA0H, pointA1H);\r\n this.mapNPCPlaneToWorld(planeCoffs, planeCoffs);\r\n // NOW .. we have a plane in world space. Intersect it with the bspline:\r\n const intersections: CurveLocationDetail[] = [];\r\n bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);\r\n // intersections has WORLD points with bspline fractions. (The bspline fractions are all good 0..1 fractions within the spline.)\r\n // accept those that are within the segment range.\r\n for (const detail of intersections) {\r\n const fractionB = detail.fraction;\r\n const curvePoint = detail.point;\r\n const curvePointH = this.projectPoint(curvePoint);\r\n const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);\r\n if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1,\r\n fractionB, bcurve, 0, 1, reversed);\r\n }\r\n }\r\n */\r\n }\r\n\r\n private static _workPointAA0 = Point3d.create();\r\n private static _workPointAA1 = Point3d.create();\r\n private static _workPointBB0 = Point3d.create();\r\n private static _workPointBB1 = Point3d.create();\r\n /** low lever bspline curve -- STUB .. */\r\n public dispatchLineStringBSplineCurve(_lsA: LineString3d, _extendA: boolean, _curveB: BSplineCurve3d, _extendB: boolean, _reversed: boolean): any {\r\n /*\r\n const numA = lsA.numPoints();\r\n if (numA > 1) {\r\n const dfA = 1.0 / (numA - 1);\r\n let fA0;\r\n let fA1;\r\n fA0 = 0.0;\r\n const pointA0 = CurveCurveIntersectXYZ._workPointA0;\r\n const pointA1 = CurveCurveIntersectXYZ._workPointA1;\r\n lsA.pointAt(0, pointA0);\r\n for (let iA = 1; iA < numA; iA++ , pointA0.setFrom(pointA1), fA0 = fA1) {\r\n lsA.pointAt(iA, pointA1);\r\n fA1 = iA * dfA;\r\n this.dispatchSegmentBsplineCurve(\r\n lsA, iA === 1 && extendA, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA,\r\n curveB, extendB, reversed);\r\n }\r\n }\r\n return undefined;\r\n */\r\n }\r\n\r\n /** low lever segment intersect linestring .. */\r\n public computeSegmentLineString(lsA: LineSegment3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any {\r\n const pointA0 = lsA.point0Ref;\r\n const pointA1 = lsA.point1Ref;\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numB = lsB.numPoints();\r\n if (numB > 1) {\r\n const dfB = 1.0 / (numB - 1);\r\n let fB0;\r\n let fB1;\r\n fB0 = 0.0;\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentSegment(\r\n lsA, extendA, pointA0, 0.0, pointA1, 1.0, extendA,\r\n lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB,\r\n reversed);\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /** low lever arc intersect linestring .. */\r\n public computeArcLineString(arcA: Arc3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any {\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numB = lsB.numPoints();\r\n if (numB > 1) {\r\n const dfB = 1.0 / (numB - 1);\r\n let fB0;\r\n let fB1;\r\n fB0 = 0.0;\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentArc(\r\n lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB,\r\n arcA, extendA, extendA,\r\n !reversed);\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /** double dispatch handler for strongly typed segment.. */\r\n public override handleLineSegment3d(segmentA: LineSegment3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n const segmentB = this._geometryB;\r\n this.dispatchSegmentSegment(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA,\r\n segmentB, this._extendB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB,\r\n false);\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.computeSegmentLineString(segmentA, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchSegmentArc(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA,\r\n this._geometryB, this._extendB, this._extendB, false);\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA,\r\n this._geometryB, this._extendB, false);\r\n }\r\n }\r\n /** double dispatch handler for strongly typed linestring .. */\r\n public override handleLineString3d(lsA: LineString3d): any {\r\n if (this._geometryB instanceof LineString3d) {\r\n const lsB = this._geometryB;\r\n const pointA0 = CurveCurveIntersectXYZ._workPointAA0;\r\n const pointA1 = CurveCurveIntersectXYZ._workPointAA1;\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numA = lsA.numPoints();\r\n const numB = lsB.numPoints();\r\n if (numA > 1 && numB > 1) {\r\n lsA.pointAt(0, pointA0);\r\n const dfA = 1.0 / (numA - 1);\r\n const dfB = 1.0 / (numB - 1);\r\n let fA0 = 0.0;\r\n let fB0;\r\n let fA1;\r\n let fB1;\r\n const extendA = this._extendA;\r\n const extendB = this._extendB;\r\n lsA.pointAt(0, pointA0);\r\n for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {\r\n fA1 = ia * dfA;\r\n fB0 = 0.0;\r\n lsA.pointAt(ia, pointA1);\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentSegment(\r\n lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA,\r\n lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB,\r\n false);\r\n }\r\n }\r\n }\r\n } else if (this._geometryB instanceof LineSegment3d) {\r\n this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.computeArcLineString(this._geometryB, this._extendB, lsA, this._extendA, true);\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchLineStringBSplineCurve(lsA, this._extendA, this._geometryB, this._extendB, false);\r\n }\r\n return undefined;\r\n }\r\n /** double dispatch handler for strongly typed arc .. */\r\n public override handleArc3d(arc0: Arc3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentArc(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,\r\n arc0, this._extendA, this._extendA, true);\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.computeArcLineString(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcArc(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchArcBsplineCurve3d(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n }\r\n return undefined;\r\n }\r\n /** double dispatch handler for strongly typed bspline curve.. */\r\n public override handleBSplineCurve3d(curve: BSplineCurve3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,\r\n curve, this._extendA, true);\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof BSplineCurve3dBase) {\r\n this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);\r\n }\r\n return undefined;\r\n }\r\n /** double dispatch handler for strongly typed homogeneous bspline curve. */\r\n public override handleBSplineCurve3dH(_curve: BSplineCurve3dH): any {\r\n /* NEEDS WORK -- make \"dispatch\" methods tolerant of both 3d and 3dH ...\"easy\" if both present BezierCurve3dH span loaders\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,\r\n curve, this._extendA, true);\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);\r\n }\r\n */\r\n return undefined;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"CurveCurveIntersectXYZ.js","sourceRoot":"","sources":["../../../src/curve/CurveCurveIntersectXYZ.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;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O,SAAS,CAAC;IACnB,CAAC;IACD,4EAA4E;IAC5D,qBAAqB,CAAC,MAAuB;QAC3D;;;;;;;;;;;;UAYE;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;;AA7tBc,qCAAc,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;AACnC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACjC,oCAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;SAVrC,sBAAsB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { BSplineCurve3d, BSplineCurve3dBase } from \"../bspline/BSplineCurve\";\r\nimport { BSplineCurve3dH } from \"../bspline/BSplineCurve3dH\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { NullGeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { SmallSystem, TrigPolynomial } from \"../numerics/Polynomials\";\r\nimport { Arc3d } from \"./Arc3d\";\r\nimport { CurveLocationDetailArrayPair } from \"./CurveCurveIntersectXY\";\r\nimport { CurveIntervalRole, CurveLocationDetail } from \"./CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { LineSegment3d } from \"./LineSegment3d\";\r\nimport { LineString3d } from \"./LineString3d\";\r\n\r\n// cspell:word XYRR\r\n\r\n/**\r\n * Handler class for XYZ intersections between _geometryB and another geometry.\r\n * * **NOTE:** GeometryQuery input (_geometryB) should really be AnyCurve.\r\n * * Instances are initialized and called from CurveCurve.\r\n * * geometryB is saved for later reference.\r\n * @internal\r\n */\r\nexport class CurveCurveIntersectXYZ extends NullGeometryHandler {\r\n private _extendA: boolean;\r\n private _geometryB: GeometryQuery;\r\n private _extendB: boolean;\r\n private _results!: CurveLocationDetailArrayPair;\r\n\r\n private static _workVector2dA = Vector2d.create();\r\n private static _workPointAA0 = Point3d.create();\r\n private static _workPointAA1 = Point3d.create();\r\n private static _workPointBB0 = Point3d.create();\r\n private static _workPointBB1 = Point3d.create();\r\n\r\n private reinitialize() {\r\n this._results = new CurveLocationDetailArrayPair();\r\n }\r\n /**\r\n * @param extendA flag to enable using extension of the other geometry.\r\n * @param geometryB second curve for intersection. Saved for reference by specific handler methods.\r\n * @param extendB flag for extension of geometryB.\r\n */\r\n public constructor(extendA: boolean, geometryB: GeometryQuery, extendB: boolean) {\r\n super();\r\n this._extendA = extendA;\r\n this._geometryB = geometryB;\r\n this._extendB = extendB;\r\n this.reinitialize();\r\n }\r\n /**\r\n * * Return the results structure for the intersection calculation.\r\n * @param reinitialize if true, a new results structure is created for use by later calls.\r\n */\r\n public grabResults(reinitialize: boolean = false): CurveLocationDetailArrayPair {\r\n const result = this._results;\r\n if (reinitialize)\r\n this.reinitialize();\r\n return result;\r\n }\r\n private acceptFraction(extend0: boolean, fraction: number, extend1: boolean) {\r\n if (!extend0 && fraction < 0.0)\r\n return false;\r\n if (!extend1 && fraction > 1.0)\r\n return false;\r\n return true;\r\n }\r\n /**\r\n * Compute intersection of two line segments.\r\n * Filter by extension rules.\r\n * Reject if evaluated points do not match coordinates (e.g. close approach point).\r\n * Record with fraction mapping.\r\n */\r\n private recordPointWithLocalFractions(\r\n localFractionA: number,\r\n cpA: CurvePrimitive,\r\n fractionA0: number,\r\n fractionA1: number,\r\n localFractionB: number, // Computed intersection fraction\r\n cpB: CurvePrimitive,\r\n fractionB0: number,\r\n fractionB1: number,\r\n reversed: boolean,\r\n ): void {\r\n const globalFractionA = Geometry.interpolate(fractionA0, localFractionA, fractionA1);\r\n const globalFractionB = Geometry.interpolate(fractionB0, localFractionB, fractionB1);\r\n // ignore duplicate of most recent point . ..\r\n const numPrevious = this._results.dataA.length;\r\n if (numPrevious > 0) {\r\n const topFractionA = this._results.dataA[numPrevious - 1].fraction;\r\n const topFractionB = this._results.dataB[numPrevious - 1].fraction;\r\n if (reversed) {\r\n if (Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&\r\n Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))\r\n return;\r\n } else {\r\n if (Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) &&\r\n Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))\r\n return;\r\n }\r\n }\r\n const pointA = cpA.fractionToPoint(globalFractionA);\r\n const pointB = cpB.fractionToPoint(globalFractionB);\r\n if (!pointA.isAlmostEqualMetric(pointB))\r\n return;\r\n\r\n const detailA = CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, pointA);\r\n detailA.setIntervalRole(CurveIntervalRole.isolated);\r\n const detailB = CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);\r\n detailB.setIntervalRole(CurveIntervalRole.isolated);\r\n if (reversed) {\r\n this._results.dataA.push(detailB);\r\n this._results.dataB.push(detailA);\r\n } else {\r\n this._results.dataA.push(detailA);\r\n this._results.dataB.push(detailB);\r\n }\r\n }\r\n /**\r\n * Compute intersection of two line segments.\r\n * Filter by extension rules.\r\n * Record with fraction mapping.\r\n */\r\n private computeSegmentSegment3D(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n cpB: CurvePrimitive,\r\n extendB0: boolean,\r\n pointB0: Point3d,\r\n fractionB0: number,\r\n pointB1: Point3d,\r\n fractionB1: number,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ): void {\r\n const uv = CurveCurveIntersectXYZ._workVector2dA;\r\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(pointA0, pointA1, pointB0, pointB1, uv) &&\r\n this.acceptFraction(extendA0, uv.x, extendA1) && this.acceptFraction(extendB0, uv.y, extendB1)) {\r\n this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);\r\n }\r\n }\r\n // Caller accesses data from a line segment and passes to here.\r\n // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters\r\n // allow all combinations to be passed in)\r\n // This method applies transform.\r\n private dispatchSegmentSegment(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n cpB: CurvePrimitive,\r\n extendB0: boolean,\r\n pointB0: Point3d,\r\n fractionB0: number,\r\n pointB1: Point3d,\r\n fractionB1: number,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ): void {\r\n this.computeSegmentSegment3D(\r\n cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1,\r\n cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1,\r\n reversed,\r\n );\r\n }\r\n /**\r\n * Create a plane whose normal is the \"better\" cross product: `vectorA.crossProduct(vectorB)` or\r\n * `vectorA.crossProduct(vectorC)`\r\n * * The heuristic for \"better\" is:\r\n * * first choice is cross product with `vectorB`, if `vectorA` and `vectorB` are sufficiently far from parallel\r\n * (or anti-parallel).\r\n * * otherwise use vectorC\r\n * @param origin plane origin\r\n * @param vectorA vector which must be in the plane.\r\n * @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.\r\n * passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.\r\n * @param vectorB first candidate for additional in-plane vector\r\n * @param vectorC second candidate for additional in-plane vector\r\n */\r\n public createPlaneWithPreferredPerpendicular(\r\n origin: Point3d, vectorA: Vector3d, cosineValue: number, vectorB: Vector3d, vectorC: Vector3d,\r\n ): Plane3dByOriginAndUnitNormal | undefined {\r\n cosineValue = Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - Geometry.smallFraction);\r\n const dotAA = vectorA.magnitudeSquared();\r\n const dotBB = vectorB.magnitudeSquared();\r\n const dotAB = Math.abs(vectorA.dotProduct(vectorB));\r\n const cross = vectorA.unitCrossProduct(dotAB * dotAB <= cosineValue * cosineValue * dotAA * dotBB ? vectorB : vectorC);\r\n if (cross)\r\n return Plane3dByOriginAndUnitNormal.create(origin, cross);\r\n return undefined;\r\n }\r\n // Caller accesses data from a linestring or segment and passes it here.\r\n // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters\r\n // allow all combinations to be passed in)\r\n private dispatchSegmentArc(\r\n cpA: CurvePrimitive,\r\n extendA0: boolean,\r\n pointA0: Point3d,\r\n fractionA0: number,\r\n pointA1: Point3d,\r\n fractionA1: number,\r\n extendA1: boolean,\r\n arc: Arc3d,\r\n extendB0: boolean,\r\n extendB1: boolean,\r\n reversed: boolean,\r\n ): void {\r\n const lineVector = Vector3d.createStartEnd(pointA0, pointA1);\r\n const plane = this.createPlaneWithPreferredPerpendicular(\r\n pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);\r\n if (plane !== undefined) {\r\n const candidates: CurveLocationDetail[] = [];\r\n arc.appendPlaneIntersectionPoints(plane, candidates);\r\n let lineFraction;\r\n let linePoint: Point3d | undefined;\r\n for (const c of candidates) {\r\n if (this.acceptFraction(extendB0, c.fraction, extendB1)) {\r\n lineFraction = SmallSystem.lineSegment3dClosestPointUnbounded(pointA0, pointA1, c.point);\r\n if (lineFraction !== undefined) {\r\n linePoint = pointA0.interpolate(lineFraction, pointA1, linePoint);\r\n if (linePoint.isAlmostEqualMetric(c.point)\r\n && this.acceptFraction(extendA0, lineFraction, extendA1)) {\r\n this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1,\r\n c.fraction, arc, 0, 1, reversed);\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Caller promises arcs are coplanar.\r\n // Passes \"other\" as {center, vector0, vector90} in local xy space of cpA\r\n // Solves the arc-arc equations for that local ellipse with unit circle.\r\n // Solution fractions map directly to original arcs.\r\n private dispatchArcArcInPlane(\r\n cpA: Arc3d, extendA: boolean, cpB: Arc3d, extendB: boolean, reversed: boolean,\r\n ): void {\r\n const otherVectors = cpA.otherArcAsLocalVectors(cpB);\r\n if (otherVectors !== undefined) {\r\n const ellipseRadians: number[] = [];\r\n const circleRadians: number[] = [];\r\n TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(\r\n otherVectors.center.x, otherVectors.center.y, 1.0,\r\n otherVectors.vector0.x, otherVectors.vector0.y, 0.0,\r\n otherVectors.vector90.x, otherVectors.vector90.y, 0.0,\r\n ellipseRadians, circleRadians,\r\n );\r\n for (let i = 0; i < ellipseRadians.length; i++) {\r\n const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);\r\n const fractionB = cpA.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);\r\n // hm .. do we really need to check the fractions? We know they are internal to the beziers\r\n if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchArcArc(\r\n cpA: Arc3d, extendA: boolean, cpB: Arc3d, extendB: boolean, reversed: boolean,\r\n ): void {\r\n // If arcs are in different planes:\r\n // 1) Intersect each plane with the other arc (quadratic)\r\n // 2) accept points that appear in both intersection sets.\r\n // If arcs are in parallel planes -- no intersections\r\n // If arcs are in the same plane -- xy intersection in that plane.\r\n const planeA = Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);\r\n const planeB = Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);\r\n if (planeA === undefined || planeB === undefined)\r\n return;\r\n if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {\r\n if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {\r\n // coplanar !!!\r\n this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);\r\n }\r\n } else {\r\n const arcBPoints: CurveLocationDetail[] = [];\r\n cpB.appendPlaneIntersectionPoints(planeA, arcBPoints);\r\n const arcAPoints: CurveLocationDetail[] = [];\r\n cpA.appendPlaneIntersectionPoints(planeB, arcAPoints);\r\n for (const detailB of arcBPoints) {\r\n for (const detailA of arcAPoints) {\r\n if (detailA.point.isAlmostEqual(detailB.point)) {\r\n if (this.acceptFraction(extendA, detailA.fraction, extendA)\r\n && this.acceptFraction(extendB, detailB.fraction, extendB)) {\r\n this.recordPointWithLocalFractions(detailA.fraction, cpA, 0, 1, detailB.fraction, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchArcBsplineCurve3d(\r\n _arc: Arc3d, _extendA: boolean, _cpB: BSplineCurve3d, _extendB: boolean, _reversed: boolean,\r\n ): void {\r\n /*\r\n // Arc: X = C + cU + sV\r\n // implicitize the arc as viewed. This \"3d\" matrix is homogeneous \"XYW\" not \"xyz\"\r\n let matrixA: Matrix3d;\r\n if (this._worldToLocalPerspective) {\r\n const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);\r\n matrixA = Matrix3d.createColumnsXYW(dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w);\r\n } else {\r\n const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);\r\n matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);\r\n }\r\n // The worldToLocal has moved the arc vectors into local space.\r\n // matrixA captures the xyw parts (ignoring z)\r\n // for any point in world space,\r\n // THIS CODE ONLY WORKS FOR\r\n const matrixAInverse = matrixA.inverse();\r\n if (matrixAInverse) {\r\n const orderF = cpB.order; // order of the beziers for simple coordinates\r\n const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.\r\n const coffF = new Float64Array(orderF);\r\n const univariateBezierG = new UnivariateBezier(orderG);\r\n const axx = matrixAInverse.at(0, 0); const axy = matrixAInverse.at(0, 1); const axz = 0.0; const axw = matrixAInverse.at(0, 2);\r\n const ayx = matrixAInverse.at(1, 0); const ayy = matrixAInverse.at(1, 1); const ayz = 0.0; const ayw = matrixAInverse.at(1, 2);\r\n const awx = matrixAInverse.at(2, 0); const awy = matrixAInverse.at(2, 1); const awz = 0.0; const aww = matrixAInverse.at(2, 2);\r\n\r\n if (matrixAInverse) {\r\n let bezier: BezierCurve3dH | undefined;\r\n for (let spanIndex = 0; ; spanIndex++) {\r\n bezier = cpB.getSaturatedBezierSpan3dH(spanIndex, bezier);\r\n if (!bezier) break;\r\n if (this._worldToLocalPerspective)\r\n bezier.tryMultiplyMatrix4dInPlace(this._worldToLocalPerspective);\r\n else if (this._worldToLocalAffine)\r\n bezier.tryTransformInPlace(this._worldToLocalAffine);\r\n univariateBezierG.zero();\r\n bezier.poleProductsXYZW(coffF, axx, axy, axz, axw);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);\r\n bezier.poleProductsXYZW(coffF, ayx, ayy, ayz, ayw);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);\r\n bezier.poleProductsXYZW(coffF, awx, awy, awz, aww);\r\n univariateBezierG.addSquaredSquaredBezier(coffF, -1.0);\r\n const roots = univariateBezierG.roots(0.0, true);\r\n if (roots) {\r\n for (const root of roots) {\r\n const fractionB = bezier.fractionToParentFraction(root);\r\n // The univariate bezier (which has been transformed by the view transform) evaluates into xyw space\r\n const bcurvePoint4d = bezier.fractionToPoint4d(root);\r\n const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);\r\n const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);\r\n const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));\r\n if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,\r\n fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n */\r\n }\r\n /*\r\n // apply the transformation to bezier curves. optionally construct ranges.\r\n private transformBeziers(beziers: BezierCurve3dH[]) {\r\n if (this._worldToLocalAffine) {\r\n for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);\r\n } else if (this._worldToLocalPerspective) {\r\n for (const bezier of beziers) bezier.tryMultiplyMatrix4dInPlace(this._worldToLocalPerspective);\r\n }\r\n }\r\n */\r\n /*\r\n private getRanges(beziers: BezierCurveBase[]): Range3d[] {\r\n const ranges: Range3d[] = [];\r\n ranges.length = 0;\r\n for (const b of beziers) {\r\n ranges.push(b.range());\r\n }\r\n return ranges;\r\n }\r\n private _xyzwA0?: Point4d;\r\n private _xyzwA1?: Point4d;\r\n private _xyzwPlane?: Point4d;\r\n private _xyzwB?: Point4d;\r\n\r\n private dispatchBezierBezierStrokeFirst(\r\n bezierA: BezierCurve3dH,\r\n bcurveA: BSplineCurve3dBase,\r\n strokeCountA: number,\r\n bezierB: BezierCurve3dH,\r\n bcurveB: BSplineCurve3dBase,\r\n _strokeCountB: number,\r\n univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.\r\n reversed: boolean) {\r\n if (!this._xyzwA0) this._xyzwA0 = Point4d.create();\r\n if (!this._xyzwA1) this._xyzwA1 = Point4d.create();\r\n if (!this._xyzwPlane) this._xyzwPlane = Point4d.create();\r\n if (!this._xyzwB) this._xyzwB = Point4d.create();\r\n const roots = univariateBezierG.roots(0.0, true);\r\n if (roots) {\r\n for (const root of roots) {\r\n const fractionB = bezier.fractionToParentFraction(root);\r\n // The univariate bezier (which has been transformed by the view transform) evaluates into xyw space\r\n const bcurvePoint4d = bezier.fractionToPoint4d(root);\r\n const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);\r\n const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);\r\n const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));\r\n if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,\r\n fractionB, cpB, 0, 1, reversed);\r\n }\r\n }\r\n bezierA.fractionToPoint4d(0.0, this._xyzwA0);\r\n let f0 = 0.0;\r\n let f1 = 1.0;\r\n const intervalTolerance = 1.0e-5;\r\n const df = 1.0 / strokeCountA;\r\n for (let i = 1; i <= strokeCountA; i++ , f0 = f1, this._xyzwA0.setFrom(this._xyzwA1)) {\r\n f1 = i * df;\r\n bezierA.fractionToPoint4d(f1, this._xyzwA1);\r\n Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);\r\n bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);\r\n let errors = 0;\r\n const roots = univariateBezierB.roots(0.0, true);\r\n if (roots)\r\n for (const r of roots) {\r\n const bezierBFraction = r;\r\n bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);\r\n const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);\r\n if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {\r\n const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);\r\n /*- TODO implement newton search\r\n const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);\r\n const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);\r\n newtonSearcher.setUV(bezierAFraction, bezierBFraction);\r\n if (newtonSearcher.runIterations()) {\r\n bezierAFraction = newtonSearcher.getU();\r\n bezierBFraction = newtonSearcher.getV();\r\n }\r\n // We have a near intersection at fractions on the two beziers !!!\r\n // Iterate on the curves for a true intersection ....\r\n // NEEDS WORK -- just accept . . .\r\n const bcurveAFraction = bezierA.fractionToParentFraction(bezierAFraction);\r\n const bcurveBFraction = bezierB.fractionToParentFraction(bezierBFraction);\r\n const xyzA0 = bezierA.fractionToPoint(bezierAFraction);\r\n const xyzA1 = bcurveA.fractionToPoint(bcurveAFraction);\r\n const xyzB0 = bezierB.fractionToPoint(bezierBFraction);\r\n const xyzB1 = bcurveB.fractionToPoint(bcurveBFraction);\r\n if (!xyzA0.isAlmostEqualXY(xyzA1))\r\n errors++;\r\n if (!xyzB0.isAlmostEqualXY(xyzB1))\r\n errors++;\r\n if (errors > 0 && !xyzA0.isAlmostEqual(xyzB0))\r\n errors++;\r\n if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))\r\n errors++;\r\n if (this.acceptFraction(false, bcurveAFraction, false) && this.acceptFraction(false, bcurveBFraction, false)) {\r\n this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1,\r\n bcurveBFraction, bcurveB, 0, 1, reversed);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n */\r\n // Caller accesses data from two arcs.\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchBSplineCurve3dBSplineCurve3d(\r\n _bcurveA: BSplineCurve3dBase, _bcurveB: BSplineCurve3dBase, _reversed: boolean,\r\n ): void {\r\n /*\r\n const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];\r\n const bezierSpanB = bcurveB.collectBezierSpans(true) as BezierCurve3dH[];\r\n const numA = bezierSpanA.length;\r\n const numB = bezierSpanB.length;\r\n this.transformBeziers(bezierSpanA);\r\n this.transformBeziers(bezierSpanB);\r\n const rangeA = this.getRanges(bezierSpanA);\r\n const rangeB = this.getRanges(bezierSpanB);\r\n const orderA = bcurveA.order;\r\n const orderB = bcurveB.order;\r\n const univariateCoffsA = new UnivariateBezier(orderA);\r\n const univariateCoffsB = new UnivariateBezier(orderB);\r\n for (let a = 0; a < numA; a++) {\r\n for (let b = 0; b < numB; b++) {\r\n if (rangeA[a].intersectsRangeXY(rangeB[b])) {\r\n const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();\r\n const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();\r\n if (strokeCountA < strokeCountB)\r\n this.dispatchBezierBezierStrokeFirst(bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, !_reversed);\r\n else\r\n this.dispatchBezierBezierStrokeFirst(bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, _reversed);\r\n }\r\n }\r\n }\r\n */\r\n }\r\n /*\r\n /**\r\n * Apply the projection transform (if any) to (xyz, w)\r\n * @param xyz xyz parts of input point.\r\n * @param w weight to use for homogeneous effects\r\n */\r\n /*\r\n private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {\r\n if (this._worldToLocalPerspective)\r\n return this._worldToLocalPerspective.multiplyPoint3d(xyz, w);\r\n if (this._worldToLocalAffine)\r\n return this._worldToLocalAffine.multiplyXYZW(xyz.x, xyz.y, xyz.z, w);\r\n return Point4d.createFromPointAndWeight(xyz, w);\r\n }\r\n private mapNPCPlaneToWorld(npcPlane: Point4d, worldPlane: Point4d) {\r\n // for NPC pointY, Y^ * H = 0 is \"on\" plane H. (Hat is transpose)\r\n // NPC Y is A*X for our transform A and worldPointX.\r\n // hence (A X)^ * H = 0\r\n // hence X^ * A^ * H = 0\r\n // hence K = A^ * H\r\n if (this._worldToLocalAffine) {\r\n this._worldToLocalAffine.multiplyTransposeXYZW(npcPlane.x, npcPlane.y, npcPlane.z, npcPlane.w, worldPlane);\r\n } else if (this._worldToLocalPerspective) {\r\n this._worldToLocalPerspective.multiplyTransposePoint4d(npcPlane, worldPlane);\r\n } else {\r\n npcPlane.clone(worldPlane);\r\n }\r\n }\r\n */\r\n // Caller accesses data from segment and bsplineCurve\r\n // Selects the best conditioned arc (in xy parts) as \"circle after inversion\"\r\n // Solves the arc-arc equations\r\n private dispatchSegmentBsplineCurve(\r\n _cpA: CurvePrimitive,\r\n _extendA0: boolean,\r\n _pointA0: Point3d,\r\n _fractionA0: number,\r\n _pointA1: Point3d,\r\n _fractionA1: number,\r\n _extendA1: boolean,\r\n _bcurve: BSplineCurve3d,\r\n _extendB: boolean,\r\n _reversed: boolean,\r\n ): void {\r\n /*\r\n const pointA0H = this.projectPoint(pointA0);\r\n const pointA1H = this.projectPoint(pointA1);\r\n const planeCoffs = Point4d.createPlanePointPointZ(pointA0H, pointA1H);\r\n this.mapNPCPlaneToWorld(planeCoffs, planeCoffs);\r\n // NOW .. we have a plane in world space. Intersect it with the bspline:\r\n const intersections: CurveLocationDetail[] = [];\r\n bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);\r\n // intersections has WORLD points with bspline fractions. (The bspline fractions are all good 0..1 fractions within the spline.)\r\n // accept those that are within the segment range.\r\n for (const detail of intersections) {\r\n const fractionB = detail.fraction;\r\n const curvePoint = detail.point;\r\n const curvePointH = this.projectPoint(curvePoint);\r\n const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);\r\n if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB, fractionB, extendB)) {\r\n this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1,\r\n fractionB, bcurve, 0, 1, reversed);\r\n }\r\n }\r\n */\r\n }\r\n /** Low level dispatch of linestring with (beziers of) a bspline curve */\r\n public dispatchLineStringBSplineCurve(\r\n _lsA: LineString3d, _extendA: boolean, _curveB: BSplineCurve3d, _extendB: boolean, _reversed: boolean,\r\n ): any {\r\n /*\r\n const numA = lsA.numPoints();\r\n if (numA > 1) {\r\n const dfA = 1.0 / (numA - 1);\r\n let fA0;\r\n let fA1;\r\n fA0 = 0.0;\r\n const pointA0 = CurveCurveIntersectXYZ._workPointA0;\r\n const pointA1 = CurveCurveIntersectXYZ._workPointA1;\r\n lsA.pointAt(0, pointA0);\r\n for (let iA = 1; iA < numA; iA++ , pointA0.setFrom(pointA1), fA0 = fA1) {\r\n lsA.pointAt(iA, pointA1);\r\n fA1 = iA * dfA;\r\n this.dispatchSegmentBsplineCurve(\r\n lsA, iA === 1 && extendA, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA,\r\n curveB, extendB, reversed);\r\n }\r\n }\r\n return undefined;\r\n */\r\n }\r\n /** Detail computation for segment intersecting linestring. */\r\n public computeSegmentLineString(\r\n lsA: LineSegment3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean,\r\n ): any {\r\n const pointA0 = lsA.point0Ref;\r\n const pointA1 = lsA.point1Ref;\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numB = lsB.numPoints();\r\n if (numB > 1) {\r\n const dfB = 1.0 / (numB - 1);\r\n let fB0;\r\n let fB1;\r\n fB0 = 0.0;\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentSegment(\r\n lsA, extendA, pointA0, 0.0, pointA1, 1.0, extendA, lsB, ib === 1 && extendB,\r\n pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed,\r\n );\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Detail computation for arc intersecting linestring. */\r\n public computeArcLineString(\r\n arcA: Arc3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean,\r\n ): any {\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numB = lsB.numPoints();\r\n if (numB > 1) {\r\n const dfB = 1.0 / (numB - 1);\r\n let fB0;\r\n let fB1;\r\n fB0 = 0.0;\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentArc(\r\n lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1,\r\n (ib + 1) === numB && extendB, arcA, extendA, extendA, !reversed);\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** Double dispatch handler for strongly typed segment. */\r\n public override handleLineSegment3d(segmentA: LineSegment3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n const segmentB = this._geometryB;\r\n this.dispatchSegmentSegment(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA,\r\n segmentB, this._extendB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB,\r\n false,\r\n );\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.computeSegmentLineString(segmentA, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchSegmentArc(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref,\r\n 1.0, this._extendA, this._geometryB, this._extendB, this._extendB, false,\r\n );\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref,\r\n 1.0, this._extendA, this._geometryB, this._extendB, false,\r\n );\r\n }\r\n }\r\n /** double dispatch handler for strongly typed linestring .. */\r\n public override handleLineString3d(lsA: LineString3d): any {\r\n if (this._geometryB instanceof LineString3d) {\r\n const lsB = this._geometryB;\r\n const pointA0 = CurveCurveIntersectXYZ._workPointAA0;\r\n const pointA1 = CurveCurveIntersectXYZ._workPointAA1;\r\n const pointB0 = CurveCurveIntersectXYZ._workPointBB0;\r\n const pointB1 = CurveCurveIntersectXYZ._workPointBB1;\r\n const numA = lsA.numPoints();\r\n const numB = lsB.numPoints();\r\n if (numA > 1 && numB > 1) {\r\n lsA.pointAt(0, pointA0);\r\n const dfA = 1.0 / (numA - 1);\r\n const dfB = 1.0 / (numB - 1);\r\n let fA0 = 0.0;\r\n let fA1, fB0, fB1;\r\n const extendA = this._extendA;\r\n const extendB = this._extendB;\r\n lsA.pointAt(0, pointA0);\r\n for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {\r\n fA1 = ia * dfA;\r\n fB0 = 0.0;\r\n lsA.pointAt(ia, pointA1);\r\n lsB.pointAt(0, pointB0);\r\n for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {\r\n lsB.pointAt(ib, pointB1);\r\n fB1 = ib * dfB;\r\n this.dispatchSegmentSegment(\r\n lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA,\r\n lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB,\r\n false,\r\n );\r\n }\r\n }\r\n }\r\n } else if (this._geometryB instanceof LineSegment3d) {\r\n this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.computeArcLineString(this._geometryB, this._extendB, lsA, this._extendA, true);\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchLineStringBSplineCurve(lsA, this._extendA, this._geometryB, this._extendB, false);\r\n }\r\n return undefined;\r\n }\r\n /** Double dispatch handler for strongly typed arc. */\r\n public override handleArc3d(arc0: Arc3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentArc(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref,\r\n 1.0, this._extendB, arc0, this._extendA, this._extendA, true,\r\n );\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.computeArcLineString(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcArc(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n } else if (this._geometryB instanceof BSplineCurve3d) {\r\n this.dispatchArcBsplineCurve3d(arc0, this._extendA, this._geometryB, this._extendB, false);\r\n }\r\n return undefined;\r\n }\r\n /** Double dispatch handler for strongly typed bspline curve.. */\r\n public override handleBSplineCurve3d(curve: BSplineCurve3d): any {\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref,\r\n 1.0, this._extendB, curve, this._extendA, true,\r\n );\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof BSplineCurve3dBase) {\r\n this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);\r\n }\r\n return undefined;\r\n }\r\n /** Double dispatch handler for strongly typed homogeneous bspline curve. */\r\n public override handleBSplineCurve3dH(_curve: BSplineCurve3dH): any {\r\n /*\r\n // NEEDS WORK -- make \"dispatch\" methods tolerant of both 3d and 3dH\r\n // \"easy\" if both present BezierCurve3dH span loaders\r\n if (this._geometryB instanceof LineSegment3d) {\r\n this.dispatchSegmentBsplineCurve(\r\n this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,\r\n curve, this._extendA, true);\r\n } else if (this._geometryB instanceof LineString3d) {\r\n this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);\r\n } else if (this._geometryB instanceof Arc3d) {\r\n this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);\r\n }\r\n */\r\n return undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -2,21 +2,69 @@
|
|
|
2
2
|
* @module Curve
|
|
3
3
|
*/
|
|
4
4
|
import { PlaneAltitudeEvaluator } from "../Geometry";
|
|
5
|
+
import { Angle } from "../geometry3d/Angle";
|
|
5
6
|
import { AngleSweep } from "../geometry3d/AngleSweep";
|
|
6
7
|
import { Ellipsoid, GeodesicPathPoint } from "../geometry3d/Ellipsoid";
|
|
7
8
|
import { IndexedXYZCollection } from "../geometry3d/IndexedXYZCollection";
|
|
9
|
+
import { Plane3dByOriginAndUnitNormal } from "../geometry3d/Plane3dByOriginAndUnitNormal";
|
|
8
10
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
11
|
+
import { Ray3d } from "../geometry3d/Ray3d";
|
|
12
|
+
import { XAndY } from "../geometry3d/XYZProps";
|
|
13
|
+
import { IndexedPolyface } from "../polyface/Polyface";
|
|
14
|
+
import { RuledSweep } from "../solid/RuledSweep";
|
|
9
15
|
import { Arc3d } from "./Arc3d";
|
|
16
|
+
import { AnyCurve } from "./CurveChain";
|
|
10
17
|
import { CurveChain } from "./CurveCollection";
|
|
11
18
|
import { CurvePrimitive } from "./CurvePrimitive";
|
|
12
19
|
import { GeometryQuery } from "./GeometryQuery";
|
|
13
20
|
import { LineString3d } from "./LineString3d";
|
|
14
21
|
import { Loop } from "./Loop";
|
|
15
22
|
import { Path } from "./Path";
|
|
16
|
-
import { Angle } from "../geometry3d/Angle";
|
|
17
23
|
import { IntegratedSpiralTypeName } from "./spiral/TransitionSpiral3d";
|
|
18
|
-
import {
|
|
19
|
-
|
|
24
|
+
import { StrokeOptions } from "./StrokeOptions";
|
|
25
|
+
/**
|
|
26
|
+
* Interface to carry parallel arrays of planes and sections, and optional geometry assembled from them, as returned by [CurveFactory.createMiteredSweepSections].
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface SectionSequenceWithPlanes {
|
|
30
|
+
/** the plane of each section */
|
|
31
|
+
planes: Plane3dByOriginAndUnitNormal[];
|
|
32
|
+
/** section curve projected onto the corresponding plane */
|
|
33
|
+
sections: AnyCurve[];
|
|
34
|
+
/**
|
|
35
|
+
* Optional `RuledSweep` generated from the sections.
|
|
36
|
+
* * The `RuledSweep` and sections array refer to the same section objects.
|
|
37
|
+
*/
|
|
38
|
+
ruledSweep?: RuledSweep;
|
|
39
|
+
/** Optional mesh generated from the `RuledSweep` generated from the sections. */
|
|
40
|
+
mesh?: IndexedPolyface;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Enumeration of geometric output for [CurveFactory.createMiteredSweepSections].
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare enum MiteredSweepOutputSelect {
|
|
47
|
+
/** Output only the parallel arrays of planes and sections. */
|
|
48
|
+
Sections = 0,
|
|
49
|
+
/** Output planes and sections, as well as the assembled ruled sweep. */
|
|
50
|
+
AlsoRuledSweep = 1,
|
|
51
|
+
/** Output planes and sections, as well as the assembled ruled sweep and its stroked mesh. */
|
|
52
|
+
AlsoMesh = 2
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Interface bundling options for [CurveFactory.createMiteredSweepSections].
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export interface MiteredSweepOptions {
|
|
59
|
+
/** Whether first and last planes are averaged and equated when the centerline is physically closed. Default value is `false`. */
|
|
60
|
+
wrapIfPhysicallyClosed?: boolean;
|
|
61
|
+
/** Whether to output sections only, or sections plus optional geometry constructed from them. Default value is `MiteredSweepOutputSelect.Sections`. */
|
|
62
|
+
outputSelect?: MiteredSweepOutputSelect;
|
|
63
|
+
/** How to stroke the ruled sweep if outputting a mesh. If undefined, default stroke options are used. */
|
|
64
|
+
strokeOptions?: StrokeOptions;
|
|
65
|
+
/** Whether to cap the ruled sweep if outputting a ruled sweep or mesh. Default value is `false`. */
|
|
66
|
+
capped?: boolean;
|
|
67
|
+
}
|
|
20
68
|
/**
|
|
21
69
|
* The `CurveFactory` class contains methods for specialized curve constructions.
|
|
22
70
|
* @public
|
|
@@ -83,6 +131,22 @@ export declare class CurveFactory {
|
|
|
83
131
|
* @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d
|
|
84
132
|
*/
|
|
85
133
|
static createMiteredPipeSections(centerline: IndexedXYZCollection, sectionData: number | XAndY | Arc3d): Arc3d[];
|
|
134
|
+
/**
|
|
135
|
+
* Sweep the initialSection along each segment of the centerLine until it hits the bisector plane at the next vertex.
|
|
136
|
+
* * The caller should place the initialSection on a plane perpendicular to the first edge.
|
|
137
|
+
* * This plane is commonly (but not necessarily) through the start point itself.
|
|
138
|
+
* * If the geometry is not "on a perpendicular plane", the output geometry will still be flattened onto the various planes.
|
|
139
|
+
* * In the "open path" case (i.e when wrapIfPhysicallyClosed is false or the path does not have matched first and last points)
|
|
140
|
+
* the first/last output plane will be at the start/end of the first/last edge and on a perpendicular plane.
|
|
141
|
+
* * In the "closed path" case, the output plane for the first and last point is the bisector of the start and end planes from the "open path" case,
|
|
142
|
+
* and the first/last section geometry may be different from `initialSection`.
|
|
143
|
+
* * The centerline path does NOT have to be planar, however twisting effects effects will appear in the various bisector planes.
|
|
144
|
+
* @param centerline sweep path, e.g., as stroked from a smooth centerline curve
|
|
145
|
+
* @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the first segment of the centerline.
|
|
146
|
+
* @param options options for computation and output
|
|
147
|
+
* @return array of sections, starting with `initialSection` projected along the first edge to the first plane.
|
|
148
|
+
*/
|
|
149
|
+
static createMiteredSweepSections(centerline: IndexedXYZCollection | Point3d[], initialSection: AnyCurve, options: MiteredSweepOptions): SectionSequenceWithPlanes | undefined;
|
|
86
150
|
/**
|
|
87
151
|
* Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep
|
|
88
152
|
* * The vector from start point to center is in the direction of upVector crossed with tangentA.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveFactory.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveFactory.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAkC,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"CurveFactory.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveFactory.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAkC,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAG1F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CA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AAG,SAAS;IA2CrL;;;;;;;;;OASG;WACW,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS;IAalK;;;;;;;;;OASG;WACW,0BAA0B,CACtC,UAAU,EAAE,wBAAwB,EACpC,UAAU,EAAE,OAAO,EACnB,aAAa,EAAE,OAAO,EACtB,WAAW,EAAE,OAAO,GACnB,aAAa,EAAE,GAAG,SAAS;IAmC9B;;;;;;;;;OASG;WACW,0CAA0C,CACtD,UAAU,EAAE,wBAAwB,EACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,GACnB,aAAa,EAAE,GAAG,SAAS;IAoC9B;;;;;;;;;OASG;WACW,6BAA6B,CACzC,UAAU,EAAE,wBAAwB,EACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,aAAa,EAAE,GAAG,SAAS;IAoD9B;;;;;OAKG;WACW,yBAAyB,CACrC,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,sBAAsB,GAAG,KAAK,GAAG,SAAS;CAuBrF"}
|
|
@@ -7,12 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
// import { Geometry, Angle, AngleSweep } from "../Geometry";
|
|
9
9
|
import { AxisIndex, AxisOrder, Geometry } from "../Geometry";
|
|
10
|
+
import { Angle } from "../geometry3d/Angle";
|
|
10
11
|
import { AngleSweep } from "../geometry3d/AngleSweep";
|
|
11
12
|
import { Matrix3d } from "../geometry3d/Matrix3d";
|
|
13
|
+
import { Vector2d } from "../geometry3d/Point2dVector2d";
|
|
12
14
|
import { Point3dArrayCarrier } from "../geometry3d/Point3dArrayCarrier";
|
|
13
15
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
16
|
+
import { PolylineOps } from "../geometry3d/PolylineOps";
|
|
17
|
+
import { Ray3d } from "../geometry3d/Ray3d";
|
|
18
|
+
import { Segment1d } from "../geometry3d/Segment1d";
|
|
19
|
+
import { Transform } from "../geometry3d/Transform";
|
|
20
|
+
import { SmallSystem } from "../numerics/Polynomials";
|
|
14
21
|
import { PolyfaceBuilder } from "../polyface/PolyfaceBuilder";
|
|
15
22
|
import { Cone } from "../solid/Cone";
|
|
23
|
+
import { RuledSweep } from "../solid/RuledSweep";
|
|
16
24
|
import { TorusPipe } from "../solid/TorusPipe";
|
|
17
25
|
import { Arc3d } from "./Arc3d";
|
|
18
26
|
import { CurveChain } from "./CurveCollection";
|
|
@@ -22,13 +30,20 @@ import { LineSegment3d } from "./LineSegment3d";
|
|
|
22
30
|
import { LineString3d } from "./LineString3d";
|
|
23
31
|
import { Loop } from "./Loop";
|
|
24
32
|
import { Path } from "./Path";
|
|
25
|
-
import { Angle } from "../geometry3d/Angle";
|
|
26
|
-
import { Transform } from "../geometry3d/Transform";
|
|
27
33
|
import { IntegratedSpiral3d } from "./spiral/IntegratedSpiral3d";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Enumeration of geometric output for [CurveFactory.createMiteredSweepSections].
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export var MiteredSweepOutputSelect;
|
|
39
|
+
(function (MiteredSweepOutputSelect) {
|
|
40
|
+
/** Output only the parallel arrays of planes and sections. */
|
|
41
|
+
MiteredSweepOutputSelect[MiteredSweepOutputSelect["Sections"] = 0] = "Sections";
|
|
42
|
+
/** Output planes and sections, as well as the assembled ruled sweep. */
|
|
43
|
+
MiteredSweepOutputSelect[MiteredSweepOutputSelect["AlsoRuledSweep"] = 1] = "AlsoRuledSweep";
|
|
44
|
+
/** Output planes and sections, as well as the assembled ruled sweep and its stroked mesh. */
|
|
45
|
+
MiteredSweepOutputSelect[MiteredSweepOutputSelect["AlsoMesh"] = 2] = "AlsoMesh";
|
|
46
|
+
})(MiteredSweepOutputSelect || (MiteredSweepOutputSelect = {}));
|
|
32
47
|
/**
|
|
33
48
|
* The `CurveFactory` class contains methods for specialized curve constructions.
|
|
34
49
|
* @public
|
|
@@ -331,6 +346,59 @@ export class CurveFactory {
|
|
|
331
346
|
}
|
|
332
347
|
return arcs;
|
|
333
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Sweep the initialSection along each segment of the centerLine until it hits the bisector plane at the next vertex.
|
|
351
|
+
* * The caller should place the initialSection on a plane perpendicular to the first edge.
|
|
352
|
+
* * This plane is commonly (but not necessarily) through the start point itself.
|
|
353
|
+
* * If the geometry is not "on a perpendicular plane", the output geometry will still be flattened onto the various planes.
|
|
354
|
+
* * In the "open path" case (i.e when wrapIfPhysicallyClosed is false or the path does not have matched first and last points)
|
|
355
|
+
* the first/last output plane will be at the start/end of the first/last edge and on a perpendicular plane.
|
|
356
|
+
* * In the "closed path" case, the output plane for the first and last point is the bisector of the start and end planes from the "open path" case,
|
|
357
|
+
* and the first/last section geometry may be different from `initialSection`.
|
|
358
|
+
* * The centerline path does NOT have to be planar, however twisting effects effects will appear in the various bisector planes.
|
|
359
|
+
* @param centerline sweep path, e.g., as stroked from a smooth centerline curve
|
|
360
|
+
* @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the first segment of the centerline.
|
|
361
|
+
* @param options options for computation and output
|
|
362
|
+
* @return array of sections, starting with `initialSection` projected along the first edge to the first plane.
|
|
363
|
+
*/
|
|
364
|
+
static createMiteredSweepSections(centerline, initialSection, options) {
|
|
365
|
+
const sectionData = { sections: [], planes: [] };
|
|
366
|
+
const planes = PolylineOps.createBisectorPlanesForDistinctPoints(centerline, options.wrapIfPhysicallyClosed);
|
|
367
|
+
if (planes !== undefined && planes.length > 1) {
|
|
368
|
+
// Projection to target plane, constructing sweep direction from two given planes.
|
|
369
|
+
// If successful, push the target plane and swept section to the output arrays and return the swept section.
|
|
370
|
+
// If unsuccessful, leave the output arrays alone and return the input section.
|
|
371
|
+
const doSweepToPlane = function (edgePlane0, edgePlane1, targetPlane, section) {
|
|
372
|
+
const sweepVector = Vector3d.createStartEnd(edgePlane0.getOriginRef(), edgePlane1.getOriginRef());
|
|
373
|
+
const transform = Transform.createFlattenAlongVectorToPlane(sweepVector, targetPlane.getOriginRef(), targetPlane.getNormalRef());
|
|
374
|
+
if (transform === undefined)
|
|
375
|
+
return section;
|
|
376
|
+
const section1 = section.cloneTransformed(transform);
|
|
377
|
+
if (section1 === undefined)
|
|
378
|
+
return section;
|
|
379
|
+
sectionData.planes.push(targetPlane);
|
|
380
|
+
sectionData.sections.push(section1);
|
|
381
|
+
return section1;
|
|
382
|
+
};
|
|
383
|
+
let currentSection = doSweepToPlane(planes[0], planes[1], planes[0], initialSection);
|
|
384
|
+
for (let i = 1; i < planes.length; i++) {
|
|
385
|
+
currentSection = doSweepToPlane(planes[i - 1], planes[i], planes[i], currentSection);
|
|
386
|
+
}
|
|
387
|
+
if (options.outputSelect) {
|
|
388
|
+
const ruledSweep = RuledSweep.create(sectionData.sections, options.capped ?? false);
|
|
389
|
+
if (ruledSweep) {
|
|
390
|
+
sectionData.ruledSweep = ruledSweep;
|
|
391
|
+
if (MiteredSweepOutputSelect.AlsoMesh === options.outputSelect) {
|
|
392
|
+
const builder = PolyfaceBuilder.create(options.strokeOptions);
|
|
393
|
+
builder.addRuledSweep(ruledSweep);
|
|
394
|
+
sectionData.mesh = builder.claimPolyface();
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return sectionData;
|
|
399
|
+
}
|
|
400
|
+
return undefined;
|
|
401
|
+
}
|
|
334
402
|
/**
|
|
335
403
|
* Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep
|
|
336
404
|
* * The vector from start point to center is in the direction of upVector crossed with tangentA.
|