@itwin/core-geometry 4.10.0-dev.2 → 4.10.0-dev.22
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 +31 -1
- package/lib/cjs/Geometry.d.ts +2 -2
- package/lib/cjs/Geometry.js +2 -2
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +21 -10
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +64 -37
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +10 -12
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +16 -43
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +2 -2
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +33 -59
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +128 -68
- 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 +14 -11
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +5 -5
- package/lib/cjs/geometry3d/Angle.js +5 -5
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +101 -13
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +156 -57
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +9 -15
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +21 -15
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +2 -2
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +4 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +4 -2
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.d.ts +5 -5
- package/lib/cjs/geometry4d/Map4d.js +5 -5
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +4 -7
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +37 -36
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +90 -105
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/Geometry.d.ts +2 -2
- package/lib/esm/Geometry.js +2 -2
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +21 -10
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +64 -37
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +10 -12
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +16 -43
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +2 -2
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +33 -59
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +128 -68
- 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 +14 -11
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +5 -5
- package/lib/esm/geometry3d/Angle.js +5 -5
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +101 -13
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +156 -57
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +9 -15
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +21 -15
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +2 -2
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +4 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +4 -2
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.d.ts +5 -5
- package/lib/esm/geometry4d/Map4d.js +5 -5
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +4 -7
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +37 -36
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +90 -105
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/package.json +7 -19
|
@@ -766,7 +766,8 @@ export class Matrix3d {
|
|
|
766
766
|
static createColumns(vectorU, vectorV, vectorW, result) {
|
|
767
767
|
return Matrix3d.createRowValues(vectorU.x, vectorV.x, vectorW.x, vectorU.y, vectorV.y, vectorW.y, vectorU.z, vectorV.z, vectorW.z, result);
|
|
768
768
|
}
|
|
769
|
-
/**
|
|
769
|
+
/**
|
|
770
|
+
* Create a matrix with each column's _x,y_ parts given `XAndY` and separate numeric z values.
|
|
770
771
|
* ```
|
|
771
772
|
* equation
|
|
772
773
|
* \begin{bmatrix}U_x & V_x & W_x \\ U_y & V_y & W_y \\ u & v & w \end{bmatrix}
|
|
@@ -1491,23 +1492,28 @@ export class Matrix3d {
|
|
|
1491
1492
|
return Matrix3d.createUniformScale(scale);
|
|
1492
1493
|
}
|
|
1493
1494
|
/**
|
|
1494
|
-
* Create a matrix which sweeps a vector along `sweepVector` until it hits the plane through the origin with the
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
* * `U1 = U0 - W * N DOT U0 / W DOT N`
|
|
1502
|
-
* * Write vector dot expression N DOT U0 as a matrix product (^T indicates transpose):
|
|
1503
|
-
* * `U1 = U0 - W * N^T * U0 / W DOT N`
|
|
1504
|
-
* * Note W * N^T is an outer product, i.e. a 3x3 matrix. By associativity of matrix multiplication:
|
|
1505
|
-
* * `U1 = (I - W * N^T / W DOT N) * U0`
|
|
1506
|
-
* * and the matrix to do the sweep for any vector in place of U0 is `I - W * N^T / W DOT N`.
|
|
1507
|
-
* @param sweepVector sweep direction
|
|
1495
|
+
* Create a matrix which sweeps a vector along `sweepVector` until it hits the plane through the origin with the
|
|
1496
|
+
* given normal.
|
|
1497
|
+
* * Geometrically, the returned matrix `M` acts on a vector `u` by rotating and scaling it to lie in the plane.
|
|
1498
|
+
* Specifically, `Mu = u + sw` is perpendicular to `n` for some scalar `s`, where `w` is the sweep direction, and
|
|
1499
|
+
* `n` is the plane normal.
|
|
1500
|
+
* * Symbolically, `M = I - w⊗n / w.n`, where `I` is the identity, and ⊗ is the vector outer product.
|
|
1501
|
+
* @param sweepVector sweep direction. If same as `planeNormal`, the resulting matrix flattens to the plane.
|
|
1508
1502
|
* @param planeNormal normal to the target plane
|
|
1509
1503
|
*/
|
|
1510
1504
|
static createFlattenAlongVectorToPlane(sweepVector, planeNormal) {
|
|
1505
|
+
// To sweep an arbitrary vector U0 along direction W to the vector U1 in the plane through the origin with normal N:
|
|
1506
|
+
// `U1 = U0 + W * alpha`
|
|
1507
|
+
// `U1 DOT N = (U0 + W * alpha) DOT N = 0`
|
|
1508
|
+
// `U0 DOT N = - alpha * W DOT N`
|
|
1509
|
+
// `alpha = - U0 DOT N / W DOT N`
|
|
1510
|
+
// Insert the alpha definition in U1:
|
|
1511
|
+
// `U1 = U0 - W * N DOT U0 / W DOT N`
|
|
1512
|
+
// Write W * N DOT U0 in terms of a vector outer product (^T indicates transpose):
|
|
1513
|
+
// `U1 = U0 - W * N^T * U0 / W DOT N`
|
|
1514
|
+
// Note W * N^T is a 3x3 matrix. By associativity of matrix multiplication:
|
|
1515
|
+
// `U1 = (I - W * N^T / W DOT N) * U0`
|
|
1516
|
+
// and the matrix to do the sweep for any vector in place of U0 is `I - W * N^T / W DOT N`.
|
|
1511
1517
|
const result = Matrix3d.createIdentity();
|
|
1512
1518
|
const dot = sweepVector.dotProduct(planeNormal);
|
|
1513
1519
|
const inverse = Geometry.conditionalDivideCoordinate(1.0, -dot);
|