@itwin/core-geometry 4.10.0-dev.26 → 4.10.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/core-geometry.d.ts +1 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +2 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +3 -3
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +2 -2
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +3 -2
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +7 -6
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +3 -2
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +4 -4
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +26 -16
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +34 -16
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +2 -2
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +2 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/Newton.d.ts +3 -0
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +2 -5
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +22 -178
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +62 -360
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +164 -0
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/cjs/numerics/SmallSystem.js +321 -0
- package/lib/cjs/numerics/SmallSystem.js.map +1 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +7 -7
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +2 -2
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js +2 -2
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +1 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +2 -2
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +2 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +1 -1
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +2 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +2 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +2 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +26 -16
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +34 -16
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +2 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/Newton.d.ts +3 -0
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +1 -4
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +22 -178
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +62 -359
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +164 -0
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/esm/numerics/SmallSystem.js +317 -0
- package/lib/esm/numerics/SmallSystem.js.map +1 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +4 -4
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +1 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/package.json +3 -3
|
@@ -2497,8 +2497,8 @@ export class Matrix3d {
|
|
|
2497
2497
|
return Math.sqrt(sumLow) <= Geometry.smallAngleRadians * (1.0 + Math.sqrt(sumAll));
|
|
2498
2498
|
}
|
|
2499
2499
|
/**
|
|
2500
|
-
* If the matrix is diagonal
|
|
2501
|
-
*
|
|
2500
|
+
* If the matrix is diagonal with almost equal diagonal entries, return the first diagonal entry.
|
|
2501
|
+
* Otherwise return `undefined`.
|
|
2502
2502
|
*/
|
|
2503
2503
|
sameDiagonalScale() {
|
|
2504
2504
|
const sumAll = this.sumSquares();
|
|
@@ -2511,32 +2511,31 @@ export class Matrix3d {
|
|
|
2511
2511
|
return undefined;
|
|
2512
2512
|
}
|
|
2513
2513
|
/**
|
|
2514
|
-
* Test if all rows and columns are unit length and
|
|
2515
|
-
* a
|
|
2516
|
-
* *
|
|
2514
|
+
* Test if all rows and columns are unit length and perpendicular to each other.
|
|
2515
|
+
* * If so, the matrix is either a rotation (determinant is +1) or a mirror (determinant is -1).
|
|
2516
|
+
* * Such a matrix is called "orthogonal" and its inverse is its transpose.
|
|
2517
2517
|
*/
|
|
2518
2518
|
testPerpendicularUnitRowsAndColumns() {
|
|
2519
2519
|
const product = this.multiplyMatrixMatrixTranspose(this);
|
|
2520
2520
|
return product.isIdentity;
|
|
2521
2521
|
}
|
|
2522
2522
|
/**
|
|
2523
|
-
* Test if the matrix is a
|
|
2524
|
-
* pairwise perpendicular and
|
|
2525
|
-
*
|
|
2523
|
+
* Test if the matrix is a rigid matrix.
|
|
2524
|
+
* * A rigid matrix is a rotation: its columns and rows are unit length and pairwise perpendicular, and its
|
|
2525
|
+
* determinant is +1.
|
|
2526
|
+
* @param allowMirror whether to widen the test to also return true if the matrix is a mirror (determinant is -1).
|
|
2526
2527
|
*/
|
|
2527
2528
|
isRigid(allowMirror = false) {
|
|
2528
2529
|
return this.testPerpendicularUnitRowsAndColumns() && (allowMirror || this.determinant() > 0);
|
|
2529
2530
|
}
|
|
2530
2531
|
/**
|
|
2531
|
-
* Test if
|
|
2532
|
-
*
|
|
2533
|
-
* the
|
|
2532
|
+
* Test if the instance is the product of a rigid matrix and a signed scale, and return both.
|
|
2533
|
+
* * Specifically, this is a test of whether the instance rows and columns are pairwise perpendicular and have equal
|
|
2534
|
+
* length. If so, the scale factor is this length, or its negative if the instance is a mirror, and dividing the
|
|
2535
|
+
* columns by this scale factor produces a rigid matrix (a rotation).
|
|
2534
2536
|
* @param result optional pre-allocated object to populate and return
|
|
2535
|
-
* @returns
|
|
2536
|
-
*
|
|
2537
|
-
* * Note that determinant of a rigid matrix is +1.
|
|
2538
|
-
* * The context for this method is to determine if the matrix is the product a `rotation` matrix and a uniform
|
|
2539
|
-
* `scale` matrix (diagonal matrix with all diagonal entries the same nonzero number).
|
|
2537
|
+
* @returns the factorization `{ rigidAxes, scale }` where `rigidAxes` is the instance matrix with `scale` factor
|
|
2538
|
+
* removed, or undefined if the factorization failed.
|
|
2540
2539
|
*/
|
|
2541
2540
|
factorRigidWithSignedScale(result) {
|
|
2542
2541
|
const product = this.multiplyMatrixMatrixTranspose(this);
|
|
@@ -2547,6 +2546,25 @@ export class Matrix3d {
|
|
|
2547
2546
|
const scaleInverse = 1.0 / scale;
|
|
2548
2547
|
return { rigidAxes: this.scaleColumns(scaleInverse, scaleInverse, scaleInverse, result), scale };
|
|
2549
2548
|
}
|
|
2549
|
+
/**
|
|
2550
|
+
* Compute the factorization M = R*G, where R is rigid (a rotation) and G is whatever is left over (skew, scale,
|
|
2551
|
+
* mirror, etc).
|
|
2552
|
+
* * The rotation is computed from the instance by passing `axisOrder` into [[createRigidFromMatrix3d]].
|
|
2553
|
+
* @param rotation the rigid factor R
|
|
2554
|
+
* @param skew the non-rotation factor G = R^t * M (since R transposed is its inverse)
|
|
2555
|
+
* @param axisOrder optional cross product ordering for computing R
|
|
2556
|
+
* @return whether [[createRigidFromMatrix3d]] succeeded; if not, `rotation` is set to the identity, and `skew` is
|
|
2557
|
+
* set to this instance.
|
|
2558
|
+
*/
|
|
2559
|
+
factorRigidSkew(rotation, skew, axisOrder = AxisOrder.XYZ) {
|
|
2560
|
+
if (Matrix3d.createRigidFromMatrix3d(this, axisOrder, rotation)) {
|
|
2561
|
+
rotation.multiplyMatrixTransposeMatrix(this, skew);
|
|
2562
|
+
return true;
|
|
2563
|
+
}
|
|
2564
|
+
rotation.setIdentity();
|
|
2565
|
+
skew.setFrom(this);
|
|
2566
|
+
return false;
|
|
2567
|
+
}
|
|
2550
2568
|
/** Test if `this` matrix reorders and/or negates the columns of the `identity` matrix. */
|
|
2551
2569
|
get isSignedPermutation() {
|
|
2552
2570
|
let count = 0;
|