@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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"}
|
|
@@ -8,8 +8,8 @@ exports.MomentData = void 0;
|
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Numerics
|
|
10
10
|
*/
|
|
11
|
-
// import { Point2d } from "./Geometry2d";
|
|
12
11
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12
|
+
// cspell:word ABAT
|
|
13
13
|
const Geometry_1 = require("../Geometry");
|
|
14
14
|
const Matrix3d_1 = require("../geometry3d/Matrix3d");
|
|
15
15
|
const Point3dVector3d_1 = require("../geometry3d/Point3dVector3d");
|
|
@@ -22,58 +22,55 @@ const Point4d_1 = require("./Point4d");
|
|
|
22
22
|
* * origin = local origin used as moments are summed.
|
|
23
23
|
* * sums = array of summed moments.
|
|
24
24
|
* * The [i,j] entry of the sums is a summed or integrated moment for product of axis i and j.
|
|
25
|
-
* * axes 0,1,2 are x,y,z
|
|
25
|
+
* * axes 0,1,2 are x,y,z.
|
|
26
26
|
* * e.g. entry [0,1] is summed product xy
|
|
27
27
|
* * axis 3 is "w", which is 1 in sums.
|
|
28
|
-
* * e.g. entry 03 is summed x
|
|
29
|
-
* * In this level
|
|
28
|
+
* * e.g. entry 03 is summed x.
|
|
29
|
+
* * In this level:
|
|
30
30
|
* * the `absoluteQuantity` member is undefined.
|
|
31
31
|
* * the `localToWorldMap` and `radiiOfGyration` are created by have undefined contents.
|
|
32
|
-
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
32
|
+
* * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
|
|
33
|
+
* `radiiOfGyration` are filled in.
|
|
33
34
|
* @public
|
|
34
35
|
*/
|
|
35
36
|
class MomentData {
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
37
|
+
/**
|
|
38
|
+
* Return the lower-right (3,3) entry in the sums.
|
|
39
|
+
* * This is the quantity (i.e. length, area, or volume) summed.
|
|
38
40
|
*/
|
|
39
|
-
get quantitySum() {
|
|
40
|
-
|
|
41
|
+
get quantitySum() {
|
|
42
|
+
return this.sums.atIJ(3, 3);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Return a scale factor to make these sums match the target orientation sign.
|
|
41
46
|
* * 1.0 if `this.quantitySum` has the same sign as `targetSign`.
|
|
42
47
|
* * -1.0 if `this.quantitySum` has the opposite sign from `targetSign`
|
|
43
48
|
*/
|
|
44
49
|
signFactor(targetSign) {
|
|
45
50
|
return targetSign * this.quantitySum > 0 ? 1.0 : -1.0;
|
|
46
51
|
}
|
|
47
|
-
/**
|
|
48
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
52
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
51
53
|
setOriginIfNeeded(origin) {
|
|
52
54
|
if (this.needOrigin) {
|
|
53
55
|
this.origin.setFromPoint3d(origin);
|
|
54
56
|
this.needOrigin = false;
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
/**
|
|
58
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
59
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
61
60
|
setOriginFromGrowableXYZArrayIfNeeded(points) {
|
|
62
61
|
if (this.needOrigin && points.length > 0) {
|
|
63
62
|
points.getPoint3dAtCheckedPointIndex(0, this.origin);
|
|
64
63
|
this.needOrigin = false;
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
/**
|
|
68
|
-
* If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag.
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
66
|
+
/** If `this.needOrigin` flag is set, copy `origin` to `this.origin` and clear the flag. */
|
|
71
67
|
setOriginXYZIfNeeded(x, y, z) {
|
|
72
68
|
if (this.needOrigin) {
|
|
73
69
|
this.origin.set(x, y, z);
|
|
74
70
|
this.needOrigin = false;
|
|
75
71
|
}
|
|
76
72
|
}
|
|
73
|
+
/** Constructor. */
|
|
77
74
|
constructor() {
|
|
78
75
|
this._point0 = Point3dVector3d_1.Point3d.create();
|
|
79
76
|
this._point1 = Point3dVector3d_1.Point3d.create();
|
|
@@ -85,12 +82,13 @@ class MomentData {
|
|
|
85
82
|
this.absoluteQuantity = 0.1; // so optimizer sees its type
|
|
86
83
|
this.absoluteQuantity = undefined;
|
|
87
84
|
}
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
85
|
+
/**
|
|
86
|
+
* Create moments with optional origin.
|
|
87
|
+
* * Origin and needOrigin are quirky.
|
|
90
88
|
* * (undefined, true) sets up to use first incoming point as origin.
|
|
91
|
-
* * (origin) sets up to use that durable origin, set needsOrigin flag false
|
|
92
|
-
* * (origin, true) the "true" is meaningless
|
|
93
|
-
* * (undefined, false) makes 000 the durable origin
|
|
89
|
+
* * (origin) sets up to use that durable origin, set needsOrigin flag false.
|
|
90
|
+
* * (origin, true) the "true" is meaningless.
|
|
91
|
+
* * (undefined, false) makes 000 the durable origin.
|
|
94
92
|
*/
|
|
95
93
|
static create(origin, needOrigin = false) {
|
|
96
94
|
const data = new MomentData();
|
|
@@ -102,8 +100,8 @@ class MomentData {
|
|
|
102
100
|
return data;
|
|
103
101
|
}
|
|
104
102
|
/**
|
|
105
|
-
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]
|
|
106
|
-
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]
|
|
103
|
+
* Return the formal tensor of integrated values `[yy+zz,xy,xz][yx,xx+zz,yz][zx,xy,xx+yy]`.
|
|
104
|
+
* @param products matrix of (integrated) `[xx,xy,xz][yx,yy,yz][zx,xy,zz]`.
|
|
107
105
|
*/
|
|
108
106
|
static momentTensorFromInertiaProducts(products) {
|
|
109
107
|
const rr = products.sumDiagonal();
|
|
@@ -136,7 +134,7 @@ class MomentData {
|
|
|
136
134
|
}
|
|
137
135
|
/**
|
|
138
136
|
* Return the principal moment data for an array of points.
|
|
139
|
-
* @param points array of points
|
|
137
|
+
* @param points array of points.
|
|
140
138
|
*/
|
|
141
139
|
static pointsToPrincipalAxes(points) {
|
|
142
140
|
const moments = new MomentData();
|
|
@@ -147,12 +145,12 @@ class MomentData {
|
|
|
147
145
|
return this.inertiaProductsToPrincipalAxes(moments.origin, moments.sums);
|
|
148
146
|
}
|
|
149
147
|
/**
|
|
150
|
-
* Compute principal axes from inertial products
|
|
151
|
-
* * The radii of gyration are sorted smallest to largest
|
|
152
|
-
* * Hence x axis is long direction
|
|
153
|
-
* * Hence planar data generates large moment as Z
|
|
148
|
+
* Compute principal axes from inertial products.
|
|
149
|
+
* * The radii of gyration are sorted smallest to largest.
|
|
150
|
+
* * Hence x axis is long direction.
|
|
151
|
+
* * Hence planar data generates large moment as Z.
|
|
154
152
|
* @param origin The origin used for the inertia products.
|
|
155
|
-
* @param inertiaProducts The inertia products
|
|
153
|
+
* @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].
|
|
156
154
|
*/
|
|
157
155
|
static inertiaProductsToPrincipalAxes(origin, inertiaProducts) {
|
|
158
156
|
const moments = new MomentData();
|
|
@@ -180,18 +178,19 @@ class MomentData {
|
|
|
180
178
|
return moments;
|
|
181
179
|
}
|
|
182
180
|
/**
|
|
183
|
-
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes
|
|
184
|
-
* * The members considered are
|
|
185
|
-
* * origin of local to world map (i.e. centroid)
|
|
186
|
-
* * radius of gyration
|
|
181
|
+
* Test for match among selected members as they exist after `inertiaProductsToPrincipalAxes`.
|
|
182
|
+
* * The members considered are:
|
|
183
|
+
* * origin of local to world map (i.e. centroid),
|
|
184
|
+
* * radius of gyration,
|
|
187
185
|
* * axes of localToWorldMap.
|
|
188
186
|
* * Axis direction tests allow these quirks:
|
|
189
187
|
* * opposite orientation is considered matched.
|
|
190
188
|
* * Full xyz symmetry: If x,y,z radii are matched, axes are not tested.
|
|
191
|
-
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely.
|
|
189
|
+
* * Symmetry in xy plane: If x and y radii are matched, the x and y axes area allowed to spin freely. Only Z direction
|
|
190
|
+
* is tested.
|
|
192
191
|
* * If either or both are undefined, returns false.
|
|
193
|
-
* @param dataA first set of moments
|
|
194
|
-
* @param dataB second set of moments
|
|
192
|
+
* @param dataA first set of moments.
|
|
193
|
+
* @param dataB second set of moments.
|
|
195
194
|
*/
|
|
196
195
|
static areEquivalentPrincipalAxes(dataA, dataB) {
|
|
197
196
|
if (dataA && dataB
|
|
@@ -239,7 +238,7 @@ class MomentData {
|
|
|
239
238
|
this.sums.addMomentsInPlace(p.x - this.origin.x, p.y - this.origin.y, p.z - this.origin.z, 1.0);
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
|
-
/**
|
|
241
|
+
/** Revise the accumulated sums to be "around the centroid". */
|
|
243
242
|
shiftOriginAndSumsToCentroidOfSums() {
|
|
244
243
|
const xyz = this.sums.columnW().realPoint();
|
|
245
244
|
if (xyz) {
|
|
@@ -248,7 +247,8 @@ class MomentData {
|
|
|
248
247
|
}
|
|
249
248
|
return false;
|
|
250
249
|
}
|
|
251
|
-
/**
|
|
250
|
+
/**
|
|
251
|
+
* Revise the accumulated sums.
|
|
252
252
|
* * add ax,ay,ax to the origin coordinates.
|
|
253
253
|
* * apply the negative translation to the sums.
|
|
254
254
|
*/
|
|
@@ -256,11 +256,12 @@ class MomentData {
|
|
|
256
256
|
this.origin.addXYZInPlace(ax, ay, az);
|
|
257
257
|
this.sums.multiplyTranslationSandwichInPlace(-ax, -ay, -az);
|
|
258
258
|
}
|
|
259
|
-
/**
|
|
259
|
+
/** Revise the accumulated sums so they are based at a specified origin. */
|
|
260
260
|
shiftOriginAndSumsToNewOrigin(newOrigin) {
|
|
261
261
|
this.shiftOriginAndSumsByXYZ(newOrigin.x - this.origin.x, newOrigin.y - this.origin.y, newOrigin.z - this.origin.z);
|
|
262
262
|
}
|
|
263
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Compute moments of a triangle from the origin to the given line.
|
|
264
265
|
* Accumulate them to this.sums.
|
|
265
266
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
266
267
|
* * If `this.needOrigin` is set, pointB is used
|
|
@@ -292,7 +293,7 @@ class MomentData {
|
|
|
292
293
|
this.sums.addScaledOuterProductInPlace(vectorC, vectorC, r1_12);
|
|
293
294
|
}
|
|
294
295
|
}
|
|
295
|
-
/**
|
|
296
|
+
/** Add scaled outer product of (4d, unit weight) point to this.sums. */
|
|
296
297
|
accumulateScaledOuterProduct(point, scaleFactor) {
|
|
297
298
|
this.setOriginXYZIfNeeded(point.x, point.y, 0.0);
|
|
298
299
|
const vectorA = MomentData._vectorA = Point4d_1.Point4d.create(point.x - this.origin.x, point.y - this.origin.y, point.z - this.origin.z, 1.0, MomentData._vectorA);
|
|
@@ -314,7 +315,8 @@ class MomentData {
|
|
|
314
315
|
this.sums.addScaledOuterProductInPlace(vectorB, vectorA, r1_6);
|
|
315
316
|
this.sums.addScaledOuterProductInPlace(vectorB, vectorB, r1_3);
|
|
316
317
|
}
|
|
317
|
-
/**
|
|
318
|
+
/**
|
|
319
|
+
* Compute moments of triangles from a base point to the given linestring.
|
|
318
320
|
* Accumulate them to this.sums.
|
|
319
321
|
* * If `pointA` is undefined, use `this.origin` as pointA.
|
|
320
322
|
* * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
|
|
@@ -331,18 +333,18 @@ class MomentData {
|
|
|
331
333
|
}
|
|
332
334
|
}
|
|
333
335
|
}
|
|
334
|
-
// cspell:word ABAT
|
|
335
336
|
/**
|
|
336
337
|
* * 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].
|
|
337
|
-
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
338
|
+
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
|
|
339
|
+
* parts of vectors).
|
|
338
340
|
* * scale by detJ for the xy-only determinant of the vectors.
|
|
339
341
|
* @param productXX
|
|
340
342
|
* @param productXY
|
|
341
343
|
* @param productYY
|
|
342
|
-
* @param area Area in caller's system
|
|
343
|
-
* @param origin Caller's origin
|
|
344
|
-
* @param vectorU Caller's U axis (not necessarily unit)
|
|
345
|
-
* @param vectorV Caller's V axis (not necessarily unit)
|
|
344
|
+
* @param area Area in caller's system.
|
|
345
|
+
* @param origin Caller's origin.
|
|
346
|
+
* @param vectorU Caller's U axis (not necessarily unit).
|
|
347
|
+
* @param vectorV Caller's V axis (not necessarily unit).
|
|
346
348
|
*/
|
|
347
349
|
accumulateXYProductsInCentroidalFrame(productXX, productXY, productYY, area, origin, vectorU, vectorV) {
|
|
348
350
|
const centroidalProducts = Matrix4d_1.Matrix4d.createRowValues(productXX, productXY, 0, 0, productXY, productYY, 0, 0, 0, 0, 0, 0, 0, 0, 0, area);
|
|
@@ -354,27 +356,23 @@ class MomentData {
|
|
|
354
356
|
}
|
|
355
357
|
/**
|
|
356
358
|
* Accumulate sums from other moments.
|
|
357
|
-
* *
|
|
358
|
-
* *
|
|
359
|
-
* *
|
|
359
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
360
|
+
* * Pull the origin from `other` if `this` needs an origin.
|
|
360
361
|
*/
|
|
361
362
|
accumulateProducts(other, scale) {
|
|
362
363
|
this.setOriginIfNeeded(other.origin);
|
|
363
364
|
this.sums.addTranslationSandwichInPlace(other.sums, this.origin.x - other.origin.x, this.origin.y - other.origin.y, this.origin.z - other.origin.z, scale);
|
|
364
365
|
}
|
|
365
366
|
/**
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
*/
|
|
367
|
+
* Accumulate sums from Matrix4d and origin.
|
|
368
|
+
* * Scale by given scaleFactor (e.g. sign to correct orientation).
|
|
369
|
+
* * Trap the origin if `this` needs an origin.
|
|
370
|
+
*/
|
|
371
371
|
accumulateProductsFromOrigin(origin, products, scale) {
|
|
372
372
|
this.setOriginIfNeeded(origin);
|
|
373
373
|
this.sums.addTranslationSandwichInPlace(products, this.origin.x - origin.x, this.origin.y - origin.y, this.origin.z - origin.z, scale);
|
|
374
374
|
}
|
|
375
|
-
/**
|
|
376
|
-
* Convert to a json data object with:
|
|
377
|
-
*/
|
|
375
|
+
/** Convert to a json data object. */
|
|
378
376
|
toJSON() {
|
|
379
377
|
return {
|
|
380
378
|
origin: this.origin,
|