@itwin/core-geometry 5.0.0-dev.4 → 5.0.0-dev.40
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 +29 -1
- package/lib/cjs/Constant.js +17 -17
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js +35 -35
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js +2 -2
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +2 -2
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +3 -3
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +40 -8
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +80 -22
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +4 -4
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +16 -2
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +33 -2
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +87 -53
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +213 -135
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +12 -8
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +34 -13
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +12 -6
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +12 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +4 -4
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +29 -23
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +4 -4
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +2 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +16 -16
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +4 -4
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +54 -16
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +24 -10
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +11 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +36 -34
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +2 -2
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -6
- package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
- package/lib/cjs/geometry3d/Point3dVector3d.js.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 +12 -6
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +117 -70
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +9 -5
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +9 -5
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js +4 -4
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
- package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js +62 -64
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js +13 -13
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +5 -5
- package/lib/cjs/numerics/Polynomials.js +32 -32
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js +20 -20
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/polyface/AuxData.d.ts +2 -2
- package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
- package/lib/cjs/polyface/AuxData.js +11 -3
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js +67 -67
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +27 -20
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +56 -30
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +2 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +3 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +6 -13
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +14 -7
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +59 -64
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +26 -9
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +11 -10
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js +5 -5
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +22 -22
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +112 -112
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts +9 -3
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +10 -5
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts +3 -2
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +3 -3
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +9 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +9 -4
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js +20 -7
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +35 -26
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +41 -28
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
- package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js +8 -5
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts +17 -7
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +22 -16
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +25 -16
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +25 -16
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts +8 -2
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +9 -5
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +4 -4
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js +5 -5
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +2 -2
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +11 -11
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Constant.js +17 -17
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js +35 -35
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js +18 -21
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js +2 -2
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +2 -2
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +3 -3
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +40 -8
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +80 -22
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +4 -4
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +16 -2
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +33 -2
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +87 -53
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +213 -135
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +12 -8
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +34 -13
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +12 -6
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +12 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js +13 -9
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +4 -4
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +29 -23
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +4 -4
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +2 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/Angle.js +16 -16
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +4 -4
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +54 -16
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +24 -10
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +11 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +36 -34
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +2 -2
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -6
- package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
- package/lib/esm/geometry3d/Point3dVector3d.js.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 +12 -6
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +117 -70
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +9 -5
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +9 -5
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js +4 -4
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.d.ts +72 -73
- package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/esm/geometry4d/MomentData.js +62 -64
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js +13 -13
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +5 -5
- package/lib/esm/numerics/Polynomials.js +32 -32
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js +20 -20
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/polyface/AuxData.d.ts +2 -2
- package/lib/esm/polyface/AuxData.d.ts.map +1 -1
- package/lib/esm/polyface/AuxData.js +11 -3
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js +67 -67
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +27 -20
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +56 -30
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +2 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +3 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +6 -13
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +14 -7
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +60 -65
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +26 -9
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +11 -10
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js +5 -5
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +22 -22
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +112 -112
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/solid/Box.d.ts +9 -3
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +10 -5
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts +3 -2
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +3 -3
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +9 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +9 -4
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +15 -4
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js +20 -7
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +35 -26
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +41 -28
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
- package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js +8 -5
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts +17 -7
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +22 -16
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +25 -16
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +25 -16
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts +8 -2
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +9 -5
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js +4 -4
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js +5 -5
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +2 -2
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +11 -11
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +5 -5
|
@@ -10,135 +10,137 @@ import { Matrix4d } from "./Matrix4d";
|
|
|
10
10
|
* * origin = local origin used as moments are summed.
|
|
11
11
|
* * sums = array of summed moments.
|
|
12
12
|
* * The [i,j] entry of the sums is a summed or integrated moment for product of axis i and j.
|
|
13
|
-
* * axes 0,1,2 are x,y,z
|
|
13
|
+
* * axes 0,1,2 are x,y,z.
|
|
14
14
|
* * e.g. entry [0,1] is summed product xy
|
|
15
15
|
* * axis 3 is "w", which is 1 in sums.
|
|
16
|
-
* * e.g. entry 03 is summed x
|
|
17
|
-
* * In this level
|
|
16
|
+
* * e.g. entry 03 is summed x.
|
|
17
|
+
* * In this level:
|
|
18
18
|
* * the `absoluteQuantity` member is undefined.
|
|
19
19
|
* * the `localToWorldMap` and `radiiOfGyration` are created by have undefined contents.
|
|
20
|
-
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
20
|
+
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
21
|
+
* `radiiOfGyration` are filled in.
|
|
21
22
|
* @public
|
|
22
23
|
*/
|
|
23
24
|
export declare class MomentData {
|
|
24
25
|
/** Origin used for sums. */
|
|
25
26
|
origin: Point3d;
|
|
26
|
-
/**
|
|
27
|
+
/** Flag to request deferred origin setup. */
|
|
27
28
|
needOrigin: boolean;
|
|
28
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Moment sums.
|
|
29
31
|
* * Set to zero at initialization and if requested later.
|
|
30
32
|
* * Accumulated during data entry phase.
|
|
31
33
|
*/
|
|
32
34
|
sums: Matrix4d;
|
|
33
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The mapping between principal and world system.
|
|
34
37
|
* * This set up with its inverse already constructed.
|
|
35
38
|
*/
|
|
36
39
|
localToWorldMap: Transform;
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
private static _vectorA?;
|
|
41
|
+
private static _vectorB?;
|
|
42
|
+
private static _vectorC?;
|
|
43
|
+
private _point0;
|
|
44
|
+
private _point1;
|
|
45
|
+
/**
|
|
46
|
+
* Return the lower-right (3,3) entry in the sums.
|
|
47
|
+
* * This is the quantity (i.e. length, area, or volume) summed.
|
|
39
48
|
*/
|
|
40
49
|
get quantitySum(): number;
|
|
41
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Return a scale factor to make these sums match the target orientation sign.
|
|
42
52
|
* * 1.0 if `this.quantitySum` has the same sign as `targetSign`.
|
|
43
53
|
* * -1.0 if `this.quantitySum` has the opposite sign from `targetSign`
|
|
44
54
|
*/
|
|
45
55
|
signFactor(targetSign: number): number;
|
|
46
|
-
/**
|
|
47
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
56
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
50
57
|
setOriginIfNeeded(origin: Point3d): void;
|
|
51
|
-
/**
|
|
52
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
58
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
55
59
|
setOriginFromGrowableXYZArrayIfNeeded(points: GrowableXYZArray): void;
|
|
56
|
-
/**
|
|
57
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
60
61
|
setOriginXYZIfNeeded(x: number, y: number, z: number): void;
|
|
61
|
-
/**
|
|
62
|
-
*/
|
|
62
|
+
/** Radii of gyration (square roots of principal second moments). */
|
|
63
63
|
radiusOfGyration: Vector3d;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
64
|
+
/**
|
|
65
|
+
* Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
|
|
66
|
+
* inertiaProductsToPrincipalAxes.
|
|
66
67
|
*/
|
|
67
68
|
absoluteQuantity?: number;
|
|
69
|
+
/** Constructor. */
|
|
68
70
|
private constructor();
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
+
/**
|
|
72
|
+
* Create moments with optional origin.
|
|
73
|
+
* * Origin and needOrigin are quirky.
|
|
71
74
|
* * (undefined, true) sets up to use first incoming point as origin.
|
|
72
|
-
* * (origin) sets up to use that durable origin, set needsOrigin flag false
|
|
73
|
-
* * (origin, true) the "true" is meaningless
|
|
74
|
-
* * (undefined, false) makes 000 the durable origin
|
|
75
|
+
* * (origin) sets up to use that durable origin, set needsOrigin flag false.
|
|
76
|
+
* * (origin, true) the "true" is meaningless.
|
|
77
|
+
* * (undefined, false) makes 000 the durable origin.
|
|
75
78
|
*/
|
|
76
79
|
static create(origin?: Point3d | undefined, needOrigin?: boolean): MomentData;
|
|
77
80
|
/**
|
|
78
|
-
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]
|
|
79
|
-
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]
|
|
81
|
+
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]`.
|
|
82
|
+
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]`.
|
|
80
83
|
*/
|
|
81
84
|
static momentTensorFromInertiaProducts(products: Matrix3d): Matrix3d;
|
|
82
85
|
/** Sort the columns of the matrix for increasing moments. */
|
|
83
86
|
static sortColumnsForIncreasingMoments(axes: Matrix3d, moments: Vector3d): void;
|
|
84
87
|
/**
|
|
85
88
|
* Return the principal moment data for an array of points.
|
|
86
|
-
* @param points array of points
|
|
89
|
+
* @param points array of points.
|
|
87
90
|
*/
|
|
88
91
|
static pointsToPrincipalAxes(points: Point3d[]): MomentData | undefined;
|
|
89
92
|
/**
|
|
90
|
-
* Compute principal axes from inertial products
|
|
91
|
-
* * The radii of gyration are sorted smallest to largest
|
|
92
|
-
* * Hence x axis is long direction
|
|
93
|
-
* * Hence planar data generates large moment as Z
|
|
93
|
+
* Compute principal axes from inertial products.
|
|
94
|
+
* * The radii of gyration are sorted smallest to largest.
|
|
95
|
+
* * Hence x axis is long direction.
|
|
96
|
+
* * Hence planar data generates large moment as Z.
|
|
94
97
|
* @param origin The origin used for the inertia products.
|
|
95
|
-
* @param inertiaProducts The inertia products
|
|
98
|
+
* @param inertiaProducts The inertia products: sums or integrals of [xx,xy,xz,xw; yx,yy, yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
|
|
96
99
|
*/
|
|
97
100
|
static inertiaProductsToPrincipalAxes(origin: XYZ, inertiaProducts: Matrix4d): MomentData | undefined;
|
|
98
101
|
/**
|
|
99
|
-
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes
|
|
100
|
-
* * The members considered are
|
|
101
|
-
* * origin of local to world map (i.e. centroid)
|
|
102
|
-
* * radius of gyration
|
|
102
|
+
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes`.
|
|
103
|
+
* * The members considered are:
|
|
104
|
+
* * origin of local to world map (i.e. centroid),
|
|
105
|
+
* * radius of gyration,
|
|
103
106
|
* * axes of localToWorldMap.
|
|
104
107
|
* * Axis direction tests allow these quirks:
|
|
105
108
|
* * opposite orientation is considered matched.
|
|
106
109
|
* * Full xyz symmetry: If x,y,z radii are matched, axes are not tested.
|
|
107
|
-
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely.
|
|
110
|
+
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely. Only Z direction
|
|
111
|
+
* is tested.
|
|
108
112
|
* * If either or both are undefined, returns false.
|
|
109
|
-
* @param dataA first set of moments
|
|
110
|
-
* @param dataB second set of moments
|
|
113
|
+
* @param dataA first set of moments.
|
|
114
|
+
* @param dataB second set of moments.
|
|
111
115
|
*/
|
|
112
116
|
static areEquivalentPrincipalAxes(dataA: MomentData | undefined, dataB: MomentData | undefined): boolean;
|
|
113
117
|
/** Clear the MomentData sums to zero, and establish a new origin. */
|
|
114
118
|
clearSums(origin?: Point3d): void;
|
|
115
119
|
/** Accumulate products-of-components for given points. */
|
|
116
120
|
accumulatePointMomentsFromOrigin(points: Point3d[]): void;
|
|
117
|
-
/**
|
|
121
|
+
/** Revise the accumulated sums to be "around the centroid". */
|
|
118
122
|
shiftOriginAndSumsToCentroidOfSums(): boolean;
|
|
119
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Revise the accumulated sums.
|
|
120
125
|
* * add ax,ay,ax to the origin coordinates.
|
|
121
126
|
* * apply the negative translation to the sums.
|
|
122
127
|
*/
|
|
123
128
|
shiftOriginAndSumsByXYZ(ax: number, ay: number, az: number): void;
|
|
124
|
-
/**
|
|
129
|
+
/** Revise the accumulated sums so they are based at a specified origin. */
|
|
125
130
|
shiftOriginAndSumsToNewOrigin(newOrigin: XYAndZ): void;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
private static _vectorC?;
|
|
129
|
-
/** compute moments of a triangle from the origin to the given line.
|
|
131
|
+
/**
|
|
132
|
+
* Compute moments of a triangle from the origin to the given line.
|
|
130
133
|
* Accumulate them to this.sums.
|
|
131
134
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
132
135
|
* * If `this.needOrigin` is set, pointB is used
|
|
133
136
|
*/
|
|
134
137
|
accumulateTriangleMomentsXY(pointA: XAndY | undefined, pointB: XAndY, pointC: XAndY): void;
|
|
135
|
-
/**
|
|
138
|
+
/** Add scaled outer product of (4d, unit weight) point to this.sums. */
|
|
136
139
|
accumulateScaledOuterProduct(point: XYAndZ, scaleFactor: number): void;
|
|
137
140
|
/** Accumulate wire moment integral from pointA to pointB */
|
|
138
141
|
accumulateLineMomentsXYZ(pointA: Point3d, pointB: Point3d): void;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/** compute moments of triangles from a base point to the given linestring.
|
|
142
|
+
/**
|
|
143
|
+
* Compute moments of triangles from a base point to the given linestring.
|
|
142
144
|
* Accumulate them to this.sums.
|
|
143
145
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
144
146
|
* * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
|
|
@@ -147,34 +149,31 @@ export declare class MomentData {
|
|
|
147
149
|
accumulateTriangleToLineStringMomentsXY(sweepBase: XAndY | undefined, points: GrowableXYZArray): void;
|
|
148
150
|
/**
|
|
149
151
|
* * Assemble XX, YY, XY products into a full matrix form [xx,xy,0,0; xy,yy,0,0;0,0,0,0;0,0,0,1].
|
|
150
|
-
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
152
|
+
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
153
|
+
* parts of vectors).
|
|
151
154
|
* * scale by detJ for the xy-only determinant of the vectors.
|
|
152
155
|
* @param productXX
|
|
153
156
|
* @param productXY
|
|
154
157
|
* @param productYY
|
|
155
|
-
* @param area Area in caller's system
|
|
156
|
-
* @param origin Caller's origin
|
|
157
|
-
* @param vectorU Caller's U axis (not necessarily unit)
|
|
158
|
-
* @param vectorV Caller's V axis (not necessarily unit)
|
|
158
|
+
* @param area Area in caller's system.
|
|
159
|
+
* @param origin Caller's origin.
|
|
160
|
+
* @param vectorU Caller's U axis (not necessarily unit).
|
|
161
|
+
* @param vectorV Caller's V axis (not necessarily unit).
|
|
159
162
|
*/
|
|
160
163
|
accumulateXYProductsInCentroidalFrame(productXX: number, productXY: number, productYY: number, area: number, origin: XAndY, vectorU: XAndY, vectorV: XAndY): void;
|
|
161
164
|
/**
|
|
162
165
|
* Accumulate sums from other moments.
|
|
163
|
-
* *
|
|
164
|
-
* *
|
|
165
|
-
* *
|
|
166
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
167
|
+
* * Pull the origin from `other` if `this` needs an origin.
|
|
166
168
|
*/
|
|
167
169
|
accumulateProducts(other: MomentData, scale: number): void;
|
|
168
170
|
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
* *
|
|
173
|
-
*/
|
|
174
|
-
accumulateProductsFromOrigin(origin: Point3d, products: Matrix4d, scale: number): void;
|
|
175
|
-
/**
|
|
176
|
-
* Convert to a json data object with:
|
|
171
|
+
* Accumulate sums from Matrix4d and origin.
|
|
172
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
173
|
+
* * Trap the origin if `this` needs an origin.
|
|
177
174
|
*/
|
|
175
|
+
accumulateProductsFromOrigin(origin: Point3d, products: Matrix4d, scale: number): void;
|
|
176
|
+
/** Convert to a json data object. */
|
|
178
177
|
toJSON(): any;
|
|
179
178
|
}
|
|
180
179
|
//# sourceMappingURL=MomentData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MomentData.d.ts","sourceRoot":"","sources":["../../../src/geometry4d/MomentData.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC
|
|
1
|
+
{"version":3,"file":"MomentData.d.ts","sourceRoot":"","sources":["../../../src/geometry4d/MomentData.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Numerics
|
|
7
7
|
*/
|
|
8
|
-
// import { Point2d } from "./Geometry2d";
|
|
9
8
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9
|
+
// cspell:word ABAT
|
|
10
10
|
import { Geometry } from "../Geometry";
|
|
11
11
|
import { Matrix3d } from "../geometry3d/Matrix3d";
|
|
12
12
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
@@ -19,58 +19,55 @@ import { Point4d } from "./Point4d";
|
|
|
19
19
|
* * origin = local origin used as moments are summed.
|
|
20
20
|
* * sums = array of summed moments.
|
|
21
21
|
* * The [i,j] entry of the sums is a summed or integrated moment for product of axis i and j.
|
|
22
|
-
* * axes 0,1,2 are x,y,z
|
|
22
|
+
* * axes 0,1,2 are x,y,z.
|
|
23
23
|
* * e.g. entry [0,1] is summed product xy
|
|
24
24
|
* * axis 3 is "w", which is 1 in sums.
|
|
25
|
-
* * e.g. entry 03 is summed x
|
|
26
|
-
* * In this level
|
|
25
|
+
* * e.g. entry 03 is summed x.
|
|
26
|
+
* * In this level:
|
|
27
27
|
* * the `absoluteQuantity` member is undefined.
|
|
28
28
|
* * the `localToWorldMap` and `radiiOfGyration` are created by have undefined contents.
|
|
29
|
-
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
29
|
+
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
30
|
+
* `radiiOfGyration` are filled in.
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
32
33
|
export class MomentData {
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
34
|
+
/**
|
|
35
|
+
* Return the lower-right (3,3) entry in the sums.
|
|
36
|
+
* * This is the quantity (i.e. length, area, or volume) summed.
|
|
35
37
|
*/
|
|
36
|
-
get quantitySum() {
|
|
37
|
-
|
|
38
|
+
get quantitySum() {
|
|
39
|
+
return this.sums.atIJ(3, 3);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Return a scale factor to make these sums match the target orientation sign.
|
|
38
43
|
* * 1.0 if `this.quantitySum` has the same sign as `targetSign`.
|
|
39
44
|
* * -1.0 if `this.quantitySum` has the opposite sign from `targetSign`
|
|
40
45
|
*/
|
|
41
46
|
signFactor(targetSign) {
|
|
42
47
|
return targetSign * this.quantitySum > 0 ? 1.0 : -1.0;
|
|
43
48
|
}
|
|
44
|
-
/**
|
|
45
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
49
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
48
50
|
setOriginIfNeeded(origin) {
|
|
49
51
|
if (this.needOrigin) {
|
|
50
52
|
this.origin.setFromPoint3d(origin);
|
|
51
53
|
this.needOrigin = false;
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
/**
|
|
55
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
56
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
58
57
|
setOriginFromGrowableXYZArrayIfNeeded(points) {
|
|
59
58
|
if (this.needOrigin && points.length > 0) {
|
|
60
59
|
points.getPoint3dAtCheckedPointIndex(0, this.origin);
|
|
61
60
|
this.needOrigin = false;
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
|
-
/**
|
|
65
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
63
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
68
64
|
setOriginXYZIfNeeded(x, y, z) {
|
|
69
65
|
if (this.needOrigin) {
|
|
70
66
|
this.origin.set(x, y, z);
|
|
71
67
|
this.needOrigin = false;
|
|
72
68
|
}
|
|
73
69
|
}
|
|
70
|
+
/** Constructor. */
|
|
74
71
|
constructor() {
|
|
75
72
|
this._point0 = Point3d.create();
|
|
76
73
|
this._point1 = Point3d.create();
|
|
@@ -82,12 +79,13 @@ export class MomentData {
|
|
|
82
79
|
this.absoluteQuantity = 0.1; // so optimizer sees its type
|
|
83
80
|
this.absoluteQuantity = undefined;
|
|
84
81
|
}
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
82
|
+
/**
|
|
83
|
+
* Create moments with optional origin.
|
|
84
|
+
* * Origin and needOrigin are quirky.
|
|
87
85
|
* * (undefined, true) sets up to use first incoming point as origin.
|
|
88
|
-
* * (origin) sets up to use that durable origin, set needsOrigin flag false
|
|
89
|
-
* * (origin, true) the "true" is meaningless
|
|
90
|
-
* * (undefined, false) makes 000 the durable origin
|
|
86
|
+
* * (origin) sets up to use that durable origin, set needsOrigin flag false.
|
|
87
|
+
* * (origin, true) the "true" is meaningless.
|
|
88
|
+
* * (undefined, false) makes 000 the durable origin.
|
|
91
89
|
*/
|
|
92
90
|
static create(origin, needOrigin = false) {
|
|
93
91
|
const data = new MomentData();
|
|
@@ -99,8 +97,8 @@ export class MomentData {
|
|
|
99
97
|
return data;
|
|
100
98
|
}
|
|
101
99
|
/**
|
|
102
|
-
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]
|
|
103
|
-
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]
|
|
100
|
+
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]`.
|
|
101
|
+
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]`.
|
|
104
102
|
*/
|
|
105
103
|
static momentTensorFromInertiaProducts(products) {
|
|
106
104
|
const rr = products.sumDiagonal();
|
|
@@ -133,7 +131,7 @@ export class MomentData {
|
|
|
133
131
|
}
|
|
134
132
|
/**
|
|
135
133
|
* Return the principal moment data for an array of points.
|
|
136
|
-
* @param points array of points
|
|
134
|
+
* @param points array of points.
|
|
137
135
|
*/
|
|
138
136
|
static pointsToPrincipalAxes(points) {
|
|
139
137
|
const moments = new MomentData();
|
|
@@ -144,12 +142,12 @@ export class MomentData {
|
|
|
144
142
|
return this.inertiaProductsToPrincipalAxes(moments.origin, moments.sums);
|
|
145
143
|
}
|
|
146
144
|
/**
|
|
147
|
-
* Compute principal axes from inertial products
|
|
148
|
-
* * The radii of gyration are sorted smallest to largest
|
|
149
|
-
* * Hence x axis is long direction
|
|
150
|
-
* * Hence planar data generates large moment as Z
|
|
145
|
+
* Compute principal axes from inertial products.
|
|
146
|
+
* * The radii of gyration are sorted smallest to largest.
|
|
147
|
+
* * Hence x axis is long direction.
|
|
148
|
+
* * Hence planar data generates large moment as Z.
|
|
151
149
|
* @param origin The origin used for the inertia products.
|
|
152
|
-
* @param inertiaProducts The inertia products
|
|
150
|
+
* @param inertiaProducts The inertia products: sums or integrals of [xx,xy,xz,xw; yx,yy, yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
|
|
153
151
|
*/
|
|
154
152
|
static inertiaProductsToPrincipalAxes(origin, inertiaProducts) {
|
|
155
153
|
const moments = new MomentData();
|
|
@@ -177,18 +175,19 @@ export class MomentData {
|
|
|
177
175
|
return moments;
|
|
178
176
|
}
|
|
179
177
|
/**
|
|
180
|
-
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes
|
|
181
|
-
* * The members considered are
|
|
182
|
-
* * origin of local to world map (i.e. centroid)
|
|
183
|
-
* * radius of gyration
|
|
178
|
+
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes`.
|
|
179
|
+
* * The members considered are:
|
|
180
|
+
* * origin of local to world map (i.e. centroid),
|
|
181
|
+
* * radius of gyration,
|
|
184
182
|
* * axes of localToWorldMap.
|
|
185
183
|
* * Axis direction tests allow these quirks:
|
|
186
184
|
* * opposite orientation is considered matched.
|
|
187
185
|
* * Full xyz symmetry: If x,y,z radii are matched, axes are not tested.
|
|
188
|
-
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely.
|
|
186
|
+
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely. Only Z direction
|
|
187
|
+
* is tested.
|
|
189
188
|
* * If either or both are undefined, returns false.
|
|
190
|
-
* @param dataA first set of moments
|
|
191
|
-
* @param dataB second set of moments
|
|
189
|
+
* @param dataA first set of moments.
|
|
190
|
+
* @param dataB second set of moments.
|
|
192
191
|
*/
|
|
193
192
|
static areEquivalentPrincipalAxes(dataA, dataB) {
|
|
194
193
|
if (dataA && dataB
|
|
@@ -236,7 +235,7 @@ export class MomentData {
|
|
|
236
235
|
this.sums.addMomentsInPlace(p.x - this.origin.x, p.y - this.origin.y, p.z - this.origin.z, 1.0);
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
|
-
/**
|
|
238
|
+
/** Revise the accumulated sums to be "around the centroid". */
|
|
240
239
|
shiftOriginAndSumsToCentroidOfSums() {
|
|
241
240
|
const xyz = this.sums.columnW().realPoint();
|
|
242
241
|
if (xyz) {
|
|
@@ -245,7 +244,8 @@ export class MomentData {
|
|
|
245
244
|
}
|
|
246
245
|
return false;
|
|
247
246
|
}
|
|
248
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* Revise the accumulated sums.
|
|
249
249
|
* * add ax,ay,ax to the origin coordinates.
|
|
250
250
|
* * apply the negative translation to the sums.
|
|
251
251
|
*/
|
|
@@ -253,11 +253,12 @@ export class MomentData {
|
|
|
253
253
|
this.origin.addXYZInPlace(ax, ay, az);
|
|
254
254
|
this.sums.multiplyTranslationSandwichInPlace(-ax, -ay, -az);
|
|
255
255
|
}
|
|
256
|
-
/**
|
|
256
|
+
/** Revise the accumulated sums so they are based at a specified origin. */
|
|
257
257
|
shiftOriginAndSumsToNewOrigin(newOrigin) {
|
|
258
258
|
this.shiftOriginAndSumsByXYZ(newOrigin.x - this.origin.x, newOrigin.y - this.origin.y, newOrigin.z - this.origin.z);
|
|
259
259
|
}
|
|
260
|
-
/**
|
|
260
|
+
/**
|
|
261
|
+
* Compute moments of a triangle from the origin to the given line.
|
|
261
262
|
* Accumulate them to this.sums.
|
|
262
263
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
263
264
|
* * If `this.needOrigin` is set, pointB is used
|
|
@@ -289,7 +290,7 @@ export class MomentData {
|
|
|
289
290
|
this.sums.addScaledOuterProductInPlace(vectorC, vectorC, r1_12);
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
|
-
/**
|
|
293
|
+
/** Add scaled outer product of (4d, unit weight) point to this.sums. */
|
|
293
294
|
accumulateScaledOuterProduct(point, scaleFactor) {
|
|
294
295
|
this.setOriginXYZIfNeeded(point.x, point.y, 0.0);
|
|
295
296
|
const vectorA = MomentData._vectorA = Point4d.create(point.x - this.origin.x, point.y - this.origin.y, point.z - this.origin.z, 1.0, MomentData._vectorA);
|
|
@@ -311,7 +312,8 @@ export class MomentData {
|
|
|
311
312
|
this.sums.addScaledOuterProductInPlace(vectorB, vectorA, r1_6);
|
|
312
313
|
this.sums.addScaledOuterProductInPlace(vectorB, vectorB, r1_3);
|
|
313
314
|
}
|
|
314
|
-
/**
|
|
315
|
+
/**
|
|
316
|
+
* Compute moments of triangles from a base point to the given linestring.
|
|
315
317
|
* Accumulate them to this.sums.
|
|
316
318
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
317
319
|
* * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
|
|
@@ -328,18 +330,18 @@ export class MomentData {
|
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
}
|
|
331
|
-
// cspell:word ABAT
|
|
332
333
|
/**
|
|
333
334
|
* * Assemble XX, YY, XY products into a full matrix form [xx,xy,0,0; xy,yy,0,0;0,0,0,0;0,0,0,1].
|
|
334
|
-
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
335
|
+
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
336
|
+
* parts of vectors).
|
|
335
337
|
* * scale by detJ for the xy-only determinant of the vectors.
|
|
336
338
|
* @param productXX
|
|
337
339
|
* @param productXY
|
|
338
340
|
* @param productYY
|
|
339
|
-
* @param area Area in caller's system
|
|
340
|
-
* @param origin Caller's origin
|
|
341
|
-
* @param vectorU Caller's U axis (not necessarily unit)
|
|
342
|
-
* @param vectorV Caller's V axis (not necessarily unit)
|
|
341
|
+
* @param area Area in caller's system.
|
|
342
|
+
* @param origin Caller's origin.
|
|
343
|
+
* @param vectorU Caller's U axis (not necessarily unit).
|
|
344
|
+
* @param vectorV Caller's V axis (not necessarily unit).
|
|
343
345
|
*/
|
|
344
346
|
accumulateXYProductsInCentroidalFrame(productXX, productXY, productYY, area, origin, vectorU, vectorV) {
|
|
345
347
|
const centroidalProducts = Matrix4d.createRowValues(productXX, productXY, 0, 0, productXY, productYY, 0, 0, 0, 0, 0, 0, 0, 0, 0, area);
|
|
@@ -351,27 +353,23 @@ export class MomentData {
|
|
|
351
353
|
}
|
|
352
354
|
/**
|
|
353
355
|
* Accumulate sums from other moments.
|
|
354
|
-
* *
|
|
355
|
-
* *
|
|
356
|
-
* *
|
|
356
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
357
|
+
* * Pull the origin from `other` if `this` needs an origin.
|
|
357
358
|
*/
|
|
358
359
|
accumulateProducts(other, scale) {
|
|
359
360
|
this.setOriginIfNeeded(other.origin);
|
|
360
361
|
this.sums.addTranslationSandwichInPlace(other.sums, this.origin.x - other.origin.x, this.origin.y - other.origin.y, this.origin.z - other.origin.z, scale);
|
|
361
362
|
}
|
|
362
363
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
*/
|
|
364
|
+
* Accumulate sums from Matrix4d and origin.
|
|
365
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
366
|
+
* * Trap the origin if `this` needs an origin.
|
|
367
|
+
*/
|
|
368
368
|
accumulateProductsFromOrigin(origin, products, scale) {
|
|
369
369
|
this.setOriginIfNeeded(origin);
|
|
370
370
|
this.sums.addTranslationSandwichInPlace(products, this.origin.x - origin.x, this.origin.y - origin.y, this.origin.z - origin.z, scale);
|
|
371
371
|
}
|
|
372
|
-
/**
|
|
373
|
-
* Convert to a json data object with:
|
|
374
|
-
*/
|
|
372
|
+
/** Convert to a json data object. */
|
|
375
373
|
toJSON() {
|
|
376
374
|
return {
|
|
377
375
|
origin: this.origin,
|