@itwin/core-geometry 5.11.0-dev.5 → 5.11.0-dev.7
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 +6 -1
- package/lib/cjs/curve/CurveFactory.d.ts +7 -8
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +10 -10
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +9 -9
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +13 -13
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +13 -13
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +7 -8
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +10 -10
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +9 -9
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +13 -13
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +13 -13
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/package.json +3 -3
|
@@ -294,14 +294,14 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
294
294
|
const cosines = new GrowableFloat64Array_1.GrowableFloat64Array(2);
|
|
295
295
|
const sines = new GrowableFloat64Array_1.GrowableFloat64Array(2);
|
|
296
296
|
const radians = new GrowableFloat64Array_1.GrowableFloat64Array(2);
|
|
297
|
-
// Arc:
|
|
297
|
+
// Arc: X(theta) = C + cos(theta)·U + sin(theta)·V
|
|
298
298
|
// Line: contains points A0,A1
|
|
299
|
-
// Arc point colinear with line if det
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
// project back to line
|
|
299
|
+
// Arc point X is colinear (intersects) with line if det(A0, A1, X) = 0 with homogeneous xyw points and vectors
|
|
300
|
+
// This leads to
|
|
301
|
+
// det(A0, A1, C) + cos(theta) det(A0, A1, U) + sin(theta) det(A0, A1, V) = 0
|
|
302
|
+
// or
|
|
303
|
+
// alpha + beta cos(theta) + gamma sin(theta) = 0
|
|
304
|
+
// solve for theta; evaluate points; project back to line
|
|
305
305
|
if (this._worldToLocalPerspective) {
|
|
306
306
|
const data = arc.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
307
307
|
const radians0 = data.sweep.fractionToRadians(0);
|
|
@@ -313,7 +313,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
313
313
|
const alpha = Geometry_1.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.center);
|
|
314
314
|
const beta = Geometry_1.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector0);
|
|
315
315
|
const gamma = Geometry_1.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector90);
|
|
316
|
-
let numRoots = Polynomials_1.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
316
|
+
let numRoots = Polynomials_1.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
317
317
|
const closeApproach = (0 === numRoots);
|
|
318
318
|
if (closeApproach)
|
|
319
319
|
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|
|
@@ -354,7 +354,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
|
|
|
354
354
|
const alpha = Geometry_1.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1);
|
|
355
355
|
const beta = Geometry_1.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0);
|
|
356
356
|
const gamma = Geometry_1.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0);
|
|
357
|
-
let numRoots = Polynomials_1.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
357
|
+
let numRoots = Polynomials_1.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
358
358
|
const closeApproach = (0 === numRoots);
|
|
359
359
|
if (closeApproach)
|
|
360
360
|
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|