@itwin/core-geometry 4.0.0-dev.54 → 4.0.0-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +5 -1
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +5 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ChainCollectorContext.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChain.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +29 -34
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +31 -36
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +48 -43
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +5 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +5 -8
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +38 -35
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +84 -67
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +76 -66
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +88 -77
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +15 -16
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js +14 -15
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +72 -58
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +132 -108
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.d.ts +5 -1
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +5 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ChainCollectorContext.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChain.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +29 -34
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +31 -36
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +48 -43
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +5 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +5 -8
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +38 -35
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +84 -67
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +76 -66
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +88 -77
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +15 -16
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js +14 -15
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +72 -58
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +132 -108
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { BeJSONFunctions, PerpParallelOptions } from "../Geometry";
|
|
5
5
|
import { Angle } from "./Angle";
|
|
6
6
|
import { XAndY, XYProps } from "./XYZProps";
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
8
9
|
* * `XY` is not instantiable.
|
|
9
10
|
* * The derived (instantiable) classes are
|
|
10
11
|
* * `Point2d`
|
|
@@ -29,15 +30,15 @@ export declare class XY implements XAndY {
|
|
|
29
30
|
isAlmostEqual(other: XAndY, tol?: number): boolean;
|
|
30
31
|
/** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */
|
|
31
32
|
isAlmostEqualXY(x: number, y: number, tol?: number): boolean;
|
|
32
|
-
/**
|
|
33
|
+
/** Return a json array `[x,y]` */
|
|
33
34
|
toJSON(): XYProps;
|
|
34
|
-
/**
|
|
35
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
35
36
|
toJSONXY(): XYProps;
|
|
36
37
|
/**
|
|
37
38
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
38
39
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
39
40
|
* @param json the JSON input
|
|
40
|
-
|
|
41
|
+
*/
|
|
41
42
|
setFromJSON(json?: XYProps): void;
|
|
42
43
|
/** Return the distance from this point to other */
|
|
43
44
|
distance(other: XAndY): number;
|
|
@@ -45,17 +46,13 @@ export declare class XY implements XAndY {
|
|
|
45
46
|
distanceSquared(other: XAndY): number;
|
|
46
47
|
/** Return the largest absolute distance between corresponding components */
|
|
47
48
|
maxDiff(other: XAndY): number;
|
|
48
|
-
/**
|
|
49
|
-
* Return the x,y component corresponding to 0,1.
|
|
50
|
-
*/
|
|
49
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
51
50
|
at(index: number): number;
|
|
52
|
-
/**
|
|
53
|
-
* Set value at index 0 or 1.
|
|
54
|
-
*/
|
|
51
|
+
/** Set value at index 0 or 1 */
|
|
55
52
|
setAt(index: number, value: number): void;
|
|
56
53
|
/** Return the index (0,1) of the x,y component with largest absolute value */
|
|
57
54
|
indexOfMaxAbs(): number;
|
|
58
|
-
/**
|
|
55
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
59
56
|
get isAlmostZero(): boolean;
|
|
60
57
|
/** Return the largest absolute value of any component */
|
|
61
58
|
maxAbs(): number;
|
|
@@ -63,15 +60,15 @@ export declare class XY implements XAndY {
|
|
|
63
60
|
magnitude(): number;
|
|
64
61
|
/** Return the squared magnitude of the vector. */
|
|
65
62
|
magnitudeSquared(): number;
|
|
66
|
-
/**
|
|
63
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
67
64
|
isExactEqual(other: XAndY): boolean;
|
|
68
|
-
/**
|
|
65
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
69
66
|
isAlmostEqualMetric(other: XAndY, distanceTol?: number): boolean;
|
|
70
67
|
/** Return a (full length) vector from this point to other */
|
|
71
68
|
vectorTo(other: XAndY, result?: Vector2d): Vector2d;
|
|
72
69
|
/** Return a unit vector from this point to other */
|
|
73
70
|
unitVectorTo(other: XAndY, result?: Vector2d): Vector2d | undefined;
|
|
74
|
-
/**
|
|
71
|
+
/** Cross product of vectors from origin to targets */
|
|
75
72
|
static crossProductToPoints(origin: XAndY, targetA: XAndY, targetB: XAndY): number;
|
|
76
73
|
}
|
|
77
74
|
/** 2D point with `x`,`y` as properties
|
|
@@ -80,7 +77,7 @@ export declare class XY implements XAndY {
|
|
|
80
77
|
export declare class Point2d extends XY implements BeJSONFunctions {
|
|
81
78
|
/** Constructor for Point2d */
|
|
82
79
|
constructor(x?: number, y?: number);
|
|
83
|
-
/**
|
|
80
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
84
81
|
clone(result?: Point2d): Point2d;
|
|
85
82
|
/**
|
|
86
83
|
* Return a point (newly created unless result provided) with given x,y coordinates
|
|
@@ -93,20 +90,22 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
93
90
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
94
91
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
95
92
|
* @param json the JSON input
|
|
96
|
-
|
|
93
|
+
*/
|
|
97
94
|
static fromJSON(json?: XYProps): Point2d;
|
|
98
95
|
/** Create (or optionally reuse) a Point2d from another object with fields x and y */
|
|
99
96
|
static createFrom(xy: XAndY | undefined, result?: Point2d): Point2d;
|
|
100
97
|
/** Create a Point2d with both coordinates zero. */
|
|
101
98
|
static createZero(result?: Point2d): Point2d;
|
|
102
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
103
101
|
* to the left by leftFraction of the perpendicular vector length.
|
|
104
102
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
105
103
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
106
104
|
* @param vector the other vector
|
|
107
105
|
*/
|
|
108
106
|
addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d): Point2d;
|
|
109
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
110
109
|
* along the xy perpendicular of the vector between the points.
|
|
111
110
|
*/
|
|
112
111
|
forwardLeftInterpolate(tangentFraction: number, leftFraction: number, point: XAndY): Point2d;
|
|
@@ -138,7 +137,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
138
137
|
* @param target2 target of second vector
|
|
139
138
|
*/
|
|
140
139
|
crossProductToPoints(target1: XAndY, target2: XAndY): number;
|
|
141
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
142
142
|
* line from startPoint to endPoint.
|
|
143
143
|
* @param startPoint start point of line
|
|
144
144
|
* @param endPoint end point of line
|
|
@@ -146,7 +146,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
146
146
|
*/
|
|
147
147
|
fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction?: number): number;
|
|
148
148
|
}
|
|
149
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* 2D vector with `x`,`y` as properties
|
|
150
151
|
* @public
|
|
151
152
|
*/
|
|
152
153
|
export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
@@ -167,13 +168,13 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
167
168
|
static unitY(scale?: number): Vector2d;
|
|
168
169
|
/** Return a Vector2d with components 0,0 */
|
|
169
170
|
static createZero(result?: Vector2d): Vector2d;
|
|
170
|
-
/**
|
|
171
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
171
172
|
static createFrom(data: XAndY | Float64Array, result?: Vector2d): Vector2d;
|
|
172
173
|
/**
|
|
173
174
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
174
175
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
175
176
|
* @param json the JSON input
|
|
176
|
-
|
|
177
|
+
*/
|
|
177
178
|
static fromJSON(json?: XYProps): Vector2d;
|
|
178
179
|
/** Return a new Vector2d from polar coordinates for radius and Angle from x axis */
|
|
179
180
|
static createPolar(r: number, theta: Angle): Vector2d;
|
|
@@ -188,7 +189,8 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
188
189
|
* @param offset offset distance
|
|
189
190
|
*/
|
|
190
191
|
static createOffsetBisector(unitPerpA: Vector2d, unitPerpB: Vector2d, offset: number): Vector2d | undefined;
|
|
191
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
192
194
|
* * return undefined if denominator is zero.
|
|
193
195
|
*/
|
|
194
196
|
safeDivideOrNull(denominator: number, result?: Vector2d): Vector2d | undefined;
|
|
@@ -200,7 +202,7 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
200
202
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
201
203
|
* @param target the target vector
|
|
202
204
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
203
|
-
|
|
205
|
+
*/
|
|
204
206
|
fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number;
|
|
205
207
|
/** Return a new vector with components negated from this instance. */
|
|
206
208
|
negate(result?: Vector2d): Vector2d;
|
|
@@ -210,18 +212,19 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
210
212
|
rotate90CWXY(result?: Vector2d): Vector2d;
|
|
211
213
|
/** Return a unit vector perpendicular to this instance. */
|
|
212
214
|
unitPerpendicularXY(result?: Vector2d): Vector2d;
|
|
213
|
-
/**
|
|
215
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
214
216
|
rotateXY(angle: Angle, result?: Vector2d): Vector2d;
|
|
215
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
216
219
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
217
220
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
218
221
|
* @param vectorB second vector
|
|
219
222
|
* @param result optional preallocated result.
|
|
220
223
|
*/
|
|
221
224
|
interpolate(fraction: number, vectorB: Vector2d, result?: Vector2d): Vector2d;
|
|
222
|
-
/**
|
|
225
|
+
/** Return {this + vector}. */
|
|
223
226
|
plus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
224
|
-
/**
|
|
227
|
+
/** Return {this - vector}. */
|
|
225
228
|
minus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
226
229
|
/** Return {point + vector \* scalar} */
|
|
227
230
|
plusScaled(vector: XAndY, scaleFactor: number, result?: Vector2d): Vector2d;
|
|
@@ -231,21 +234,21 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
231
234
|
plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, vectorC: XAndY, scalarC: number, result?: Vector2d): Vector2d;
|
|
232
235
|
/** Return {this * scale} */
|
|
233
236
|
scale(scale: number, result?: Vector2d): Vector2d;
|
|
234
|
-
/**
|
|
237
|
+
/** Return a vector parallel to this but with specified length */
|
|
235
238
|
scaleToLength(length: number, result?: Vector2d): Vector2d | undefined;
|
|
236
|
-
/**
|
|
239
|
+
/** Return the dot product of this with vectorB */
|
|
237
240
|
dotProduct(vectorB: XAndY): number;
|
|
238
|
-
/**
|
|
241
|
+
/** Dot product with vector from pointA to pointB */
|
|
239
242
|
dotProductStartEnd(pointA: XAndY, pointB: XAndY): number;
|
|
240
|
-
/**
|
|
243
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
241
244
|
crossProduct(vectorB: XAndY): number;
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
246
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
244
247
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
245
248
|
*/
|
|
246
249
|
radiansTo(vectorB: XAndY): number;
|
|
247
250
|
/**
|
|
248
|
-
*
|
|
251
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
249
252
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
250
253
|
*/
|
|
251
254
|
angleTo(vectorB: XAndY): Angle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,aAAa,CA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AQ,EAAE,gCAAgC,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAChG,OAAO;CAUX"}
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* @module CartesianGeometry
|
|
7
7
|
*/
|
|
8
8
|
// cspell:word JSONXY
|
|
9
|
-
// cspell:word CWXY
|
|
9
|
+
// cspell:word CWXY CCWXY
|
|
10
10
|
import { Geometry } from "../Geometry";
|
|
11
11
|
import { Angle } from "./Angle";
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
13
14
|
* * `XY` is not instantiable.
|
|
14
15
|
* * The derived (instantiable) classes are
|
|
15
16
|
* * `Point2d`
|
|
@@ -54,11 +55,11 @@ export class XY {
|
|
|
54
55
|
isAlmostEqualXY(x, y, tol) {
|
|
55
56
|
return Geometry.isSameCoordinate(this.x, x, tol) && Geometry.isSameCoordinate(this.y, y, tol);
|
|
56
57
|
}
|
|
57
|
-
/**
|
|
58
|
+
/** Return a json array `[x,y]` */
|
|
58
59
|
toJSON() {
|
|
59
60
|
return [this.x, this.y];
|
|
60
61
|
}
|
|
61
|
-
/**
|
|
62
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
62
63
|
toJSONXY() {
|
|
63
64
|
return { x: this.x, y: this.y };
|
|
64
65
|
}
|
|
@@ -66,7 +67,7 @@ export class XY {
|
|
|
66
67
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
67
68
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
68
69
|
* @param json the JSON input
|
|
69
|
-
|
|
70
|
+
*/
|
|
70
71
|
setFromJSON(json) {
|
|
71
72
|
if (Array.isArray(json)) {
|
|
72
73
|
this.set(json[0] || 0, json[1] || 0);
|
|
@@ -94,17 +95,13 @@ export class XY {
|
|
|
94
95
|
maxDiff(other) {
|
|
95
96
|
return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));
|
|
96
97
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Return the x,y component corresponding to 0,1.
|
|
99
|
-
*/
|
|
98
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
100
99
|
at(index) {
|
|
101
100
|
if (index < 0.5)
|
|
102
101
|
return this.x;
|
|
103
102
|
return this.y;
|
|
104
103
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Set value at index 0 or 1.
|
|
107
|
-
*/
|
|
104
|
+
/** Set value at index 0 or 1 */
|
|
108
105
|
setAt(index, value) {
|
|
109
106
|
if (index < 0.5)
|
|
110
107
|
this.x = value;
|
|
@@ -121,7 +118,7 @@ export class XY {
|
|
|
121
118
|
}
|
|
122
119
|
return index;
|
|
123
120
|
}
|
|
124
|
-
/**
|
|
121
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
125
122
|
get isAlmostZero() {
|
|
126
123
|
return Geometry.isSmallMetricDistance(this.x) && Geometry.isSmallMetricDistance(this.y);
|
|
127
124
|
}
|
|
@@ -137,11 +134,11 @@ export class XY {
|
|
|
137
134
|
magnitudeSquared() {
|
|
138
135
|
return this.x * this.x + this.y * this.y;
|
|
139
136
|
}
|
|
140
|
-
/**
|
|
137
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
141
138
|
isExactEqual(other) {
|
|
142
139
|
return this.x === other.x && this.y === other.y;
|
|
143
140
|
}
|
|
144
|
-
/**
|
|
141
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
145
142
|
isAlmostEqualMetric(other, distanceTol = Geometry.smallMetricDistance) {
|
|
146
143
|
return this.maxDiff(other) <= distanceTol;
|
|
147
144
|
}
|
|
@@ -153,7 +150,7 @@ export class XY {
|
|
|
153
150
|
unitVectorTo(other, result) {
|
|
154
151
|
return this.vectorTo(other, result).normalize(result);
|
|
155
152
|
}
|
|
156
|
-
/**
|
|
153
|
+
/** Cross product of vectors from origin to targets */
|
|
157
154
|
static crossProductToPoints(origin, targetA, targetB) {
|
|
158
155
|
return Geometry.crossProductXYXY(targetA.x - origin.x, targetA.y - origin.y, targetB.x - origin.x, targetB.y - origin.y);
|
|
159
156
|
}
|
|
@@ -166,7 +163,7 @@ export class Point2d extends XY {
|
|
|
166
163
|
constructor(x = 0, y = 0) {
|
|
167
164
|
super(x, y);
|
|
168
165
|
}
|
|
169
|
-
/**
|
|
166
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
170
167
|
clone(result) {
|
|
171
168
|
return Point2d.create(this.x, this.y, result);
|
|
172
169
|
}
|
|
@@ -188,7 +185,7 @@ export class Point2d extends XY {
|
|
|
188
185
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
189
186
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
190
187
|
* @param json the JSON input
|
|
191
|
-
|
|
188
|
+
*/
|
|
192
189
|
static fromJSON(json) {
|
|
193
190
|
const val = new Point2d();
|
|
194
191
|
val.setFromJSON(json);
|
|
@@ -204,7 +201,8 @@ export class Point2d extends XY {
|
|
|
204
201
|
static createZero(result) {
|
|
205
202
|
return Point2d.create(0, 0, result);
|
|
206
203
|
}
|
|
207
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
208
206
|
* to the left by leftFraction of the perpendicular vector length.
|
|
209
207
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
210
208
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
@@ -215,7 +213,8 @@ export class Point2d extends XY {
|
|
|
215
213
|
const dy = vector.y;
|
|
216
214
|
return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx);
|
|
217
215
|
}
|
|
218
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
219
218
|
* along the xy perpendicular of the vector between the points.
|
|
220
219
|
*/
|
|
221
220
|
forwardLeftInterpolate(tangentFraction, leftFraction, point) {
|
|
@@ -278,7 +277,8 @@ export class Point2d extends XY {
|
|
|
278
277
|
const y2 = target2.y - this.y;
|
|
279
278
|
return x1 * y2 - y1 * x2;
|
|
280
279
|
}
|
|
281
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
282
282
|
* line from startPoint to endPoint.
|
|
283
283
|
* @param startPoint start point of line
|
|
284
284
|
* @param endPoint end point of line
|
|
@@ -292,7 +292,8 @@ export class Point2d extends XY {
|
|
|
292
292
|
return numerator / denominator;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
/**
|
|
295
|
+
/**
|
|
296
|
+
* 2D vector with `x`,`y` as properties
|
|
296
297
|
* @public
|
|
297
298
|
*/
|
|
298
299
|
export class Vector2d extends XY {
|
|
@@ -330,7 +331,7 @@ export class Vector2d extends XY {
|
|
|
330
331
|
static createZero(result) {
|
|
331
332
|
return Vector2d.create(0, 0, result);
|
|
332
333
|
}
|
|
333
|
-
/**
|
|
334
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
334
335
|
static createFrom(data, result) {
|
|
335
336
|
if (data instanceof Float64Array) {
|
|
336
337
|
if (data.length >= 2)
|
|
@@ -345,7 +346,7 @@ export class Vector2d extends XY {
|
|
|
345
346
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
346
347
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
347
348
|
* @param json the JSON input
|
|
348
|
-
|
|
349
|
+
*/
|
|
349
350
|
static fromJSON(json) {
|
|
350
351
|
const val = new Vector2d();
|
|
351
352
|
val.setFromJSON(json);
|
|
@@ -377,7 +378,8 @@ export class Vector2d extends XY {
|
|
|
377
378
|
}
|
|
378
379
|
return undefined;
|
|
379
380
|
}
|
|
380
|
-
/**
|
|
381
|
+
/**
|
|
382
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
381
383
|
* * return undefined if denominator is zero.
|
|
382
384
|
*/
|
|
383
385
|
safeDivideOrNull(denominator, result) {
|
|
@@ -398,7 +400,7 @@ export class Vector2d extends XY {
|
|
|
398
400
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
399
401
|
* @param target the target vector
|
|
400
402
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
401
|
-
|
|
403
|
+
*/
|
|
402
404
|
fractionOfProjectionToVector(target, defaultFraction) {
|
|
403
405
|
/*
|
|
404
406
|
* projection length is (this.target)/||target||
|
|
@@ -453,7 +455,7 @@ export class Vector2d extends XY {
|
|
|
453
455
|
}
|
|
454
456
|
return result;
|
|
455
457
|
}
|
|
456
|
-
/**
|
|
458
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
457
459
|
rotateXY(angle, result) {
|
|
458
460
|
const s = angle.sin();
|
|
459
461
|
const c = angle.cos();
|
|
@@ -465,7 +467,8 @@ export class Vector2d extends XY {
|
|
|
465
467
|
result.y = xx * s + yy * c;
|
|
466
468
|
return result;
|
|
467
469
|
}
|
|
468
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
469
472
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
470
473
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
471
474
|
* @param vectorB second vector
|
|
@@ -488,14 +491,14 @@ export class Vector2d extends XY {
|
|
|
488
491
|
}
|
|
489
492
|
return result;
|
|
490
493
|
}
|
|
491
|
-
/**
|
|
494
|
+
/** Return {this + vector}. */
|
|
492
495
|
plus(vector, result) {
|
|
493
496
|
result = result ? result : new Vector2d();
|
|
494
497
|
result.x = this.x + vector.x;
|
|
495
498
|
result.y = this.y + vector.y;
|
|
496
499
|
return result;
|
|
497
500
|
}
|
|
498
|
-
/**
|
|
501
|
+
/** Return {this - vector}. */
|
|
499
502
|
minus(vector, result) {
|
|
500
503
|
result = result ? result : new Vector2d();
|
|
501
504
|
result.x = this.x - vector.x;
|
|
@@ -530,34 +533,34 @@ export class Vector2d extends XY {
|
|
|
530
533
|
result.y = this.y * scale;
|
|
531
534
|
return result;
|
|
532
535
|
}
|
|
533
|
-
/**
|
|
536
|
+
/** Return a vector parallel to this but with specified length */
|
|
534
537
|
scaleToLength(length, result) {
|
|
535
538
|
const mag = Geometry.correctSmallMetricDistance(this.magnitude());
|
|
536
539
|
if (mag === 0)
|
|
537
540
|
return undefined;
|
|
538
541
|
return this.scale(length / mag, result);
|
|
539
542
|
}
|
|
540
|
-
/**
|
|
543
|
+
/** Return the dot product of this with vectorB */
|
|
541
544
|
dotProduct(vectorB) {
|
|
542
545
|
return this.x * vectorB.x + this.y * vectorB.y;
|
|
543
546
|
}
|
|
544
|
-
/**
|
|
547
|
+
/** Dot product with vector from pointA to pointB */
|
|
545
548
|
dotProductStartEnd(pointA, pointB) {
|
|
546
549
|
return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);
|
|
547
550
|
}
|
|
548
|
-
/**
|
|
551
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
549
552
|
crossProduct(vectorB) {
|
|
550
553
|
return this.x * vectorB.y - this.y * vectorB.x;
|
|
551
554
|
}
|
|
552
555
|
/**
|
|
553
|
-
*
|
|
556
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
554
557
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
555
558
|
*/
|
|
556
559
|
radiansTo(vectorB) {
|
|
557
560
|
return Math.atan2(this.crossProduct(vectorB), this.dotProduct(vectorB));
|
|
558
561
|
}
|
|
559
562
|
/**
|
|
560
|
-
*
|
|
563
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
561
564
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
562
565
|
*/
|
|
563
566
|
angleTo(vectorB) {
|