@itwin/rpcinterface-full-stack-tests 5.3.0-dev.15 → 5.3.0-dev.17
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/backend/BackendInit.js.map +1 -1
- package/lib/common/Settings.js +12 -12
- package/lib/common/Settings.js.map +1 -1
- package/lib/common/SideChannels.js.map +1 -1
- package/lib/dist/bundled-tests.js +132 -86
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9.bundled-tests.js.map +1 -1
- package/lib/frontend/DevToolsRpc.test.js.map +1 -1
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/IModel.test.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Models.test.js.map +1 -1
- package/lib/frontend/PresentationRpc.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +14 -14
|
@@ -117842,6 +117842,10 @@ class IModelApp {
|
|
|
117842
117842
|
IModelApp.requestNextAnimation();
|
|
117843
117843
|
}, IModelApp.animationInterval.milliseconds);
|
|
117844
117844
|
}
|
|
117845
|
+
/** Return true if the main event processing loop has been started.
|
|
117846
|
+
* @internal
|
|
117847
|
+
*/
|
|
117848
|
+
static get isEventLoopStarted() { return IModelApp._wantEventLoop; }
|
|
117845
117849
|
/** @internal */
|
|
117846
117850
|
static startEventLoop() {
|
|
117847
117851
|
if (!IModelApp._wantEventLoop) {
|
|
@@ -211410,6 +211414,9 @@ class ToolAdmin {
|
|
|
211410
211414
|
* @internal
|
|
211411
211415
|
*/
|
|
211412
211416
|
static addEvent(ev, vp) {
|
|
211417
|
+
// Don't add events to queue if event loop hasn't been started to process them...
|
|
211418
|
+
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.isEventLoopStarted)
|
|
211419
|
+
return;
|
|
211413
211420
|
if (!ToolAdmin.tryReplace(ev, vp)) // see if this event replaces the last event in the queue
|
|
211414
211421
|
this._toolEvents.push({ ev, vp }); // otherwise put it at the end of the queue.
|
|
211415
211422
|
_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.requestNextAnimation(); // wake up event loop, if
|
|
@@ -230007,25 +230014,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
230007
230014
|
/* harmony export */ EllipticalArcSampleMethod: () => (/* binding */ EllipticalArcSampleMethod)
|
|
230008
230015
|
/* harmony export */ });
|
|
230009
230016
|
/* harmony import */ var _Constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constant */ "../../core/geometry/lib/esm/Constant.js");
|
|
230010
|
-
/* harmony import */ var
|
|
230011
|
-
/* harmony import */ var
|
|
230012
|
-
/* harmony import */ var
|
|
230013
|
-
/* harmony import */ var
|
|
230017
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
230018
|
+
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
230019
|
+
/* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
|
|
230020
|
+
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
230014
230021
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
230015
|
-
/* harmony import */ var
|
|
230022
|
+
/* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
230016
230023
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
230017
230024
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
230018
|
-
/* harmony import */ var
|
|
230025
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
230019
230026
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
230020
|
-
/* harmony import */ var
|
|
230027
|
+
/* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
|
|
230021
230028
|
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
230022
230029
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
230023
230030
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
230024
230031
|
/* harmony import */ var _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/CurveOffsetXYHandler */ "../../core/geometry/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js");
|
|
230025
230032
|
/* harmony import */ var _internalContexts_EllipticalArcApproximationContext__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./internalContexts/EllipticalArcApproximationContext */ "../../core/geometry/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js");
|
|
230026
230033
|
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
230027
|
-
/* harmony import */ var
|
|
230028
|
-
/* harmony import */ var
|
|
230034
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
230035
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
230029
230036
|
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
230030
230037
|
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
230031
230038
|
/* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
|
|
@@ -230210,6 +230217,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230210
230217
|
static _workVectorU = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
230211
230218
|
static _workVectorV = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
230212
230219
|
static _workVectorW = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
230220
|
+
static _workRay0 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230221
|
+
static _workRay1 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230222
|
+
static _workRay2 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230213
230223
|
/** Read/write the center. Getter returns clone. */
|
|
230214
230224
|
get center() {
|
|
230215
230225
|
return this._center.clone();
|
|
@@ -230316,7 +230326,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230316
230326
|
if (sweep)
|
|
230317
230327
|
sweep.clampToFullCircle(this._sweep);
|
|
230318
230328
|
else
|
|
230319
|
-
|
|
230329
|
+
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.create360(0, this._sweep);
|
|
230320
230330
|
return this;
|
|
230321
230331
|
}
|
|
230322
230332
|
/** Copy center, matrix, and sweep from other Arc3d. */
|
|
@@ -230340,7 +230350,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230340
230350
|
static createRefs(center, matrix, sweep, result) {
|
|
230341
230351
|
if (result)
|
|
230342
230352
|
return result.set(center, matrix, sweep);
|
|
230343
|
-
return new Arc3d(center ?? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.createZero(), matrix ??
|
|
230353
|
+
return new Arc3d(center ?? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.createZero(), matrix ?? _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createIdentity(), sweep ?? _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.create360());
|
|
230344
230354
|
}
|
|
230345
230355
|
/**
|
|
230346
230356
|
* Create an arc from center, x column to be scaled, and y column to be scaled.
|
|
@@ -230365,7 +230375,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230365
230375
|
* @param result optional preallocated result.
|
|
230366
230376
|
*/
|
|
230367
230377
|
static createCenterNormalRadius(center, normal, radius, result) {
|
|
230368
|
-
const frame =
|
|
230378
|
+
const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidHeadsUp(normal);
|
|
230369
230379
|
return Arc3d.createScaledXYColumns(center, frame, radius, radius, undefined, result);
|
|
230370
230380
|
}
|
|
230371
230381
|
/**
|
|
@@ -230378,7 +230388,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230378
230388
|
*/
|
|
230379
230389
|
static create(center, vector0, vector90, sweep, result) {
|
|
230380
230390
|
const normal = vector0.unitCrossProductWithDefault(vector90, 0, 0, 0); // normal will be 000 for degenerate case
|
|
230381
|
-
const matrix =
|
|
230391
|
+
const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(vector0, vector90, normal, result?._matrix);
|
|
230382
230392
|
if (result)
|
|
230383
230393
|
return result.set(center, matrix, sweep);
|
|
230384
230394
|
return this.createRefs(center?.clone(), matrix, sweep?.clone());
|
|
@@ -230406,8 +230416,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230406
230416
|
const vector90 = normal.unitCrossProductWithDefault(vector0, 0, 0, 0);
|
|
230407
230417
|
const v1DotV90 = vector1.dotProduct(vector90);
|
|
230408
230418
|
// solve the standard ellipse equation for the unknown axis length, given local coords of middle (v0.v1/||v0||, v90.v1)
|
|
230409
|
-
const v90Len =
|
|
230410
|
-
if (
|
|
230419
|
+
const v90Len = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.safeDivideFraction(v0Len2 * v1DotV90, Math.sqrt(v0Len2 * v0Len2 - v0DotV1 * v0DotV1), 0);
|
|
230420
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistanceSquared(v90Len)) // tighter than smallMetricDistance to allow flatter long elliptical arcs
|
|
230411
230421
|
return undefined;
|
|
230412
230422
|
vector90.scaleInPlace(v90Len);
|
|
230413
230423
|
return Arc3d.create(center, vector0, vector90, sweep, result);
|
|
@@ -230420,11 +230430,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230420
230430
|
static createCircularStartTangentEnd(start, tangentAtStart, end, result) {
|
|
230421
230431
|
// see itwinjs-core\core\geometry\internaldocs\Arc3d.md to clarify below algorithm
|
|
230422
230432
|
const startToEnd = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(start, end);
|
|
230423
|
-
const frame =
|
|
230433
|
+
const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidFromColumns(tangentAtStart, startToEnd, _Geometry__WEBPACK_IMPORTED_MODULE_6__.AxisOrder.XYZ);
|
|
230424
230434
|
if (frame !== undefined) {
|
|
230425
230435
|
const vv = startToEnd.dotProduct(startToEnd);
|
|
230426
230436
|
const vw = frame.dotColumnY(startToEnd);
|
|
230427
|
-
const radius =
|
|
230437
|
+
const radius = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.conditionalDivideCoordinate(vv, 2 * vw);
|
|
230428
230438
|
if (radius !== undefined) {
|
|
230429
230439
|
const vector0 = frame.columnY();
|
|
230430
230440
|
vector0.scaleInPlace(-radius); // center to start
|
|
@@ -230436,11 +230446,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230436
230446
|
if (tangentAtStart.dotProduct(centerToEnd) < 0.0) // sweepRadians is the wrong way
|
|
230437
230447
|
sweepRadians = 2.0 * Math.PI - sweepRadians;
|
|
230438
230448
|
const center = start.plusScaled(vector0, -1.0);
|
|
230439
|
-
const sweep =
|
|
230449
|
+
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0.0, sweepRadians);
|
|
230440
230450
|
return Arc3d.create(center, vector0, vector90, sweep, result);
|
|
230441
230451
|
}
|
|
230442
230452
|
}
|
|
230443
|
-
return
|
|
230453
|
+
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_7__.LineSegment3d.create(start, end);
|
|
230444
230454
|
}
|
|
230445
230455
|
/**
|
|
230446
230456
|
* Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep.
|
|
@@ -230461,7 +230471,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230461
230471
|
// reverse the A-to-center vector and bring it up to scale
|
|
230462
230472
|
vector0.scaleInPlace(-radius);
|
|
230463
230473
|
const vector90 = tangentAtStart.scaleToLength(Math.abs(radius)); // cannot fail; prior unitCrossProduct would have failed first
|
|
230464
|
-
return Arc3d.create(center, vector0, vector90,
|
|
230474
|
+
return Arc3d.create(center, vector0, vector90, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.create(sweep));
|
|
230465
230475
|
}
|
|
230466
230476
|
/**
|
|
230467
230477
|
* Create a circular arc defined by start and end points and radius.
|
|
@@ -230493,9 +230503,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230493
230503
|
start.interpolate(0.5, end, center).addInPlace(vecToCenter);
|
|
230494
230504
|
const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, start, this._workVectorW);
|
|
230495
230505
|
const endVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, end, this._workVectorV); // reuse static
|
|
230496
|
-
const sweep =
|
|
230506
|
+
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0, vector0.signedRadiansTo(endVector, normal), result?.sweep);
|
|
230497
230507
|
const vector90 = normal.crossProduct(vector0, this._workVectorV); // has length radius (reuse static)
|
|
230498
|
-
const matrix =
|
|
230508
|
+
const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(vector0, vector90, normal, result?.matrixRef);
|
|
230499
230509
|
return this.createRefs(center, matrix, sweep, result);
|
|
230500
230510
|
}
|
|
230501
230511
|
/**
|
|
@@ -230527,7 +230537,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230527
230537
|
const magX = this._matrix.columnXMagnitude();
|
|
230528
230538
|
const magY = this._matrix.columnYMagnitude();
|
|
230529
230539
|
const jacobian = this._matrix.columnXYCrossProductMagnitude();
|
|
230530
|
-
const largeAxis =
|
|
230540
|
+
const largeAxis = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.maxXY(magX, magY);
|
|
230531
230541
|
return jacobian / (largeAxis * largeAxis);
|
|
230532
230542
|
}
|
|
230533
230543
|
/**
|
|
@@ -230541,23 +230551,23 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230541
230551
|
const ac2 = vectorAC.magnitudeSquared();
|
|
230542
230552
|
const normal = vectorAB.sizedCrossProduct(vectorAC, Math.sqrt(Math.sqrt(ab2 * ac2)));
|
|
230543
230553
|
if (normal) {
|
|
230544
|
-
const vectorToCenter =
|
|
230554
|
+
const vectorToCenter = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.linearSystem3d(normal.x, normal.y, normal.z, vectorAB.x, vectorAB.y, vectorAB.z, vectorAC.x, vectorAC.y, vectorAC.z, 0, // vectorToCenter DOT normal = 0 (ensure normal is perp to the plane of the 3 points)
|
|
230545
230555
|
0.5 * ab2, // vectorToCenter DOT vectorAB = ab2 / 2 (ensure the projection of vectorToCenter on AB bisects AB)
|
|
230546
230556
|
0.5 * ac2);
|
|
230547
230557
|
if (vectorToCenter) { // i.e., the negative of vectorX
|
|
230548
230558
|
const center = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(pointA.x, pointA.y, pointA.z).plus(vectorToCenter);
|
|
230549
230559
|
const vectorX = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, pointA);
|
|
230550
|
-
const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createRotateVectorAroundVector(vectorX, normal,
|
|
230560
|
+
const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createRotateVectorAroundVector(vectorX, normal, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.createDegrees(90));
|
|
230551
230561
|
if (vectorY) {
|
|
230552
230562
|
const vectorCenterToC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, pointC);
|
|
230553
230563
|
const sweepAngle = vectorX.signedAngleTo(vectorCenterToC, normal);
|
|
230554
230564
|
if (sweepAngle.radians < 0.0)
|
|
230555
230565
|
sweepAngle.addMultipleOf2PiInPlace(1.0);
|
|
230556
|
-
return Arc3d.create(center, vectorX, vectorY,
|
|
230566
|
+
return Arc3d.create(center, vectorX, vectorY, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0.0, sweepAngle.radians), result);
|
|
230557
230567
|
}
|
|
230558
230568
|
}
|
|
230559
230569
|
}
|
|
230560
|
-
return
|
|
230570
|
+
return _LineString3d__WEBPACK_IMPORTED_MODULE_10__.LineString3d.create(pointA, pointB, pointC);
|
|
230561
230571
|
}
|
|
230562
230572
|
/** The arc has simple proportional arc length if and only if it is a circular arc. */
|
|
230563
230573
|
getFractionToDistanceScale() {
|
|
@@ -230604,7 +230614,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230604
230614
|
fractionToPointAnd2Derivatives(fraction, result) {
|
|
230605
230615
|
const radians = this._sweep.fractionToRadians(fraction);
|
|
230606
230616
|
if (!result)
|
|
230607
|
-
result =
|
|
230617
|
+
result = _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndVectors.createXYPlane();
|
|
230608
230618
|
const c = Math.cos(radians);
|
|
230609
230619
|
const s = Math.sin(radians);
|
|
230610
230620
|
this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
|
|
@@ -230620,7 +230630,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230620
230630
|
* @param result optional preallocated ray.
|
|
230621
230631
|
*/
|
|
230622
230632
|
radiansToPointAndDerivative(radians, result) {
|
|
230623
|
-
result = result ? result :
|
|
230633
|
+
result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230624
230634
|
const c = Math.cos(radians);
|
|
230625
230635
|
const s = Math.sin(radians);
|
|
230626
230636
|
this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
|
|
@@ -230648,7 +230658,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230648
230658
|
* @param result optional preallocated plane.
|
|
230649
230659
|
*/
|
|
230650
230660
|
radiansToRotatedBasis(radians, result) {
|
|
230651
|
-
result = result ? result :
|
|
230661
|
+
result = result ? result : _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndVectors.createXYPlane();
|
|
230652
230662
|
const c = Math.cos(radians);
|
|
230653
230663
|
const s = Math.sin(radians);
|
|
230654
230664
|
result.origin.setFromPoint3d(this.center);
|
|
@@ -230662,7 +230672,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230662
230672
|
* @param result optional preallocated ray.
|
|
230663
230673
|
*/
|
|
230664
230674
|
angleToPointAndDerivative(theta, result) {
|
|
230665
|
-
result = result ? result :
|
|
230675
|
+
result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230666
230676
|
const c = theta.cos();
|
|
230667
230677
|
const s = theta.sin();
|
|
230668
230678
|
this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
|
|
@@ -230767,7 +230777,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230767
230777
|
if (!this.isCircular) // suppress extension !!!
|
|
230768
230778
|
return super.moveSignedDistanceFromFractionGeneric(startFraction, signedDistance, allowExtension, result);
|
|
230769
230779
|
const totalLength = this.curveLength();
|
|
230770
|
-
const signedFractionMove =
|
|
230780
|
+
const signedFractionMove = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.conditionalDivideFraction(signedDistance, totalLength);
|
|
230771
230781
|
if (signedFractionMove === undefined) {
|
|
230772
230782
|
return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPointDistanceCurveSearchStatus(this, startFraction, this.fractionToPoint(startFraction), 0.0, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveSearchStatus.error);
|
|
230773
230783
|
}
|
|
@@ -230814,7 +230824,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230814
230824
|
allRadians.push(this._sweep.endRadians);
|
|
230815
230825
|
}
|
|
230816
230826
|
// hm... logically there must at least two angles there ... but if it happens return the start point ...
|
|
230817
|
-
const workRay =
|
|
230827
|
+
const workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
|
|
230818
230828
|
if (allRadians.length === 0) {
|
|
230819
230829
|
result.setFR(0.0, this.radiansToPointAndDerivative(this._sweep.startRadians, workRay));
|
|
230820
230830
|
result.a = spacePoint.distance(result.point);
|
|
@@ -230842,7 +230852,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230842
230852
|
const centerToPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(this.centerRef, spacePoint);
|
|
230843
230853
|
let centerToLocalPoint;
|
|
230844
230854
|
if (options?.vectorToEye) {
|
|
230845
|
-
const arcToView =
|
|
230855
|
+
const arcToView = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(this.matrixRef.getColumn(0), this.matrixRef.getColumn(1), options.vectorToEye);
|
|
230846
230856
|
centerToLocalPoint = arcToView.multiplyInverse(centerToPoint);
|
|
230847
230857
|
}
|
|
230848
230858
|
else {
|
|
@@ -230862,7 +230872,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230862
230872
|
const distanceToTangency = Math.sqrt(hypotenuseSquared - 1.0);
|
|
230863
230873
|
const alpha = Math.atan2(centerToLocalPoint.y, centerToLocalPoint.x);
|
|
230864
230874
|
const beta = Math.atan2(distanceToTangency, 1);
|
|
230865
|
-
const angles =
|
|
230875
|
+
const angles = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallAngleRadians(beta) ? [alpha] : [alpha + beta, alpha - beta];
|
|
230866
230876
|
for (const theta of angles) {
|
|
230867
230877
|
const f = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveRadiansToValidSweepFraction(options?.extend ?? false, theta, this.sweep);
|
|
230868
230878
|
if (f.isValid) {
|
|
@@ -230893,16 +230903,16 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230893
230903
|
isInPlane(plane) {
|
|
230894
230904
|
const normal = plane.getNormalRef();
|
|
230895
230905
|
// The ellipse vectors are full-length -- true distance comparisons say things.
|
|
230896
|
-
return
|
|
230897
|
-
&&
|
|
230898
|
-
&&
|
|
230906
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(plane.altitude(this._center))
|
|
230907
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(this._matrix.dotColumnX(normal))
|
|
230908
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(this._matrix.dotColumnY(normal));
|
|
230899
230909
|
}
|
|
230900
230910
|
/** Return true if the vector0 and vector90 are of equal length and perpendicular. */
|
|
230901
230911
|
get isCircular() {
|
|
230902
230912
|
const axx = this._matrix.columnXMagnitudeSquared();
|
|
230903
230913
|
const ayy = this._matrix.columnYMagnitudeSquared();
|
|
230904
230914
|
const axy = this._matrix.columnXDotColumnY();
|
|
230905
|
-
return
|
|
230915
|
+
return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isPerpendicularDotSet(axx, ayy, axy) && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSameCoordinateSquared(axx, ayy);
|
|
230906
230916
|
}
|
|
230907
230917
|
/** Return radius if the vector0 and vector90 are of equal length and perpendicular. Ignores z. */
|
|
230908
230918
|
circularRadiusXY() {
|
|
@@ -230910,11 +230920,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230910
230920
|
const uy = this._matrix.at(1, 0);
|
|
230911
230921
|
const vx = this._matrix.at(0, 1);
|
|
230912
230922
|
const vy = this._matrix.at(1, 1);
|
|
230913
|
-
const dotUU =
|
|
230914
|
-
const dotVV =
|
|
230915
|
-
const dotUV =
|
|
230916
|
-
if (
|
|
230917
|
-
return
|
|
230923
|
+
const dotUU = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(ux, uy, ux, uy);
|
|
230924
|
+
const dotVV = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(vx, vy, vx, vy);
|
|
230925
|
+
const dotUV = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(ux, uy, vx, vy);
|
|
230926
|
+
if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isPerpendicularDotSet(dotUU, dotVV, dotUV) && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSameCoordinateSquared(dotUU, dotVV))
|
|
230927
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.hypotenuseXY(ux, uy);
|
|
230918
230928
|
return undefined;
|
|
230919
230929
|
}
|
|
230920
230930
|
/** If the arc is circular, return its radius. Otherwise return undefined. */
|
|
@@ -230935,7 +230945,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230935
230945
|
const coffs = this._matrix.coffs;
|
|
230936
230946
|
const cosCoff = plane.velocityXYZ(coffs[0], coffs[3], coffs[6]);
|
|
230937
230947
|
const sinCoff = plane.velocityXYZ(coffs[1], coffs[4], coffs[7]);
|
|
230938
|
-
const trigPoints =
|
|
230948
|
+
const trigPoints = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.solveTrigForm(constCoff, cosCoff, sinCoff);
|
|
230939
230949
|
let numIntersection = 0;
|
|
230940
230950
|
if (trigPoints !== undefined) {
|
|
230941
230951
|
numIntersection = trigPoints.length;
|
|
@@ -230945,9 +230955,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230945
230955
|
const fraction = this._sweep.radiansToPositivePeriodicFraction(radians);
|
|
230946
230956
|
const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
|
|
230947
230957
|
detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolated;
|
|
230948
|
-
if (
|
|
230958
|
+
if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.startRadians))
|
|
230949
230959
|
detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolatedAtVertex;
|
|
230950
|
-
else if (
|
|
230960
|
+
else if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.endRadians))
|
|
230951
230961
|
detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolatedAtVertex;
|
|
230952
230962
|
result.push(detail);
|
|
230953
230963
|
}
|
|
@@ -230994,7 +231004,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230994
231004
|
* * Default implementation returns teh range of the curve from clonePartialCurve.
|
|
230995
231005
|
*/
|
|
230996
231006
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
230997
|
-
const sweep =
|
|
231007
|
+
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
|
|
230998
231008
|
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__.Range3d.create();
|
|
230999
231009
|
this.extendRangeInSweep(range, sweep, transform);
|
|
231000
231010
|
return range;
|
|
@@ -231030,7 +231040,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231030
231040
|
* @param result optional preallocated object to populate and return.
|
|
231031
231041
|
*/
|
|
231032
231042
|
static createXY(center, radius, sweep, result) {
|
|
231033
|
-
const matrix =
|
|
231043
|
+
const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createScale(radius, radius, 1.0, result?.matrixRef);
|
|
231034
231044
|
if (result)
|
|
231035
231045
|
return result.set(center, matrix, sweep);
|
|
231036
231046
|
return Arc3d.createRefs(center.clone(), matrix, sweep?.clone());
|
|
@@ -231044,7 +231054,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231044
231054
|
* @param result optional preallocated object to populate and return.
|
|
231045
231055
|
*/
|
|
231046
231056
|
static createXYEllipse(center, radiusA, radiusB, sweep, result) {
|
|
231047
|
-
const matrix =
|
|
231057
|
+
const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createScale(radiusA, radiusB, 1.0, result?.matrixRef);
|
|
231048
231058
|
if (result)
|
|
231049
231059
|
return result.set(center, matrix, sweep);
|
|
231050
231060
|
return Arc3d.createRefs(center.clone(), matrix, sweep?.clone());
|
|
@@ -231064,13 +231074,13 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231064
231074
|
* from which the arc's symmetry is readily apparent.
|
|
231065
231075
|
*/
|
|
231066
231076
|
toScaledMatrix3d() {
|
|
231067
|
-
const angleData =
|
|
231077
|
+
const angleData = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.dotProductsToHalfAngleTrigValues(this._matrix.columnXMagnitudeSquared(), this._matrix.columnYMagnitudeSquared(), this._matrix.columnXDotColumnY(), true);
|
|
231068
231078
|
const vector0A = this._matrix.multiplyXY(angleData.c, angleData.s);
|
|
231069
231079
|
const vector90A = this._matrix.multiplyXY(-angleData.s, angleData.c);
|
|
231070
|
-
const axes =
|
|
231080
|
+
const axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidFromColumns(vector0A, vector90A, _Geometry__WEBPACK_IMPORTED_MODULE_6__.AxisOrder.XYZ);
|
|
231071
231081
|
return {
|
|
231072
231082
|
center: this._center.clone(),
|
|
231073
|
-
axes: (axes ? axes :
|
|
231083
|
+
axes: (axes ? axes : _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createIdentity()),
|
|
231074
231084
|
r0: vector0A.magnitude(),
|
|
231075
231085
|
r90: vector90A.magnitude(),
|
|
231076
231086
|
sweep: this.sweep.cloneMinusRadians(angleData.radians),
|
|
@@ -231128,7 +231138,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231128
231138
|
}
|
|
231129
231139
|
else {
|
|
231130
231140
|
this._center.set(0, 0, 0);
|
|
231131
|
-
this._matrix.setFrom(
|
|
231141
|
+
this._matrix.setFrom(_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.identity);
|
|
231132
231142
|
this._sweep.setStartEndRadians();
|
|
231133
231143
|
}
|
|
231134
231144
|
}
|
|
@@ -231145,7 +231155,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231145
231155
|
};
|
|
231146
231156
|
}
|
|
231147
231157
|
/** Test if this arc is almost equal to another GeometryQuery object. */
|
|
231148
|
-
isAlmostEqual(otherGeometry, distanceTol =
|
|
231158
|
+
isAlmostEqual(otherGeometry, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallAngleRadians) {
|
|
231149
231159
|
if (otherGeometry instanceof Arc3d) {
|
|
231150
231160
|
const other = otherGeometry;
|
|
231151
231161
|
return this._center.isAlmostEqual(other._center, distanceTol)
|
|
@@ -231213,7 +231223,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231213
231223
|
const s = theta.sin();
|
|
231214
231224
|
const vector0 = this._matrix.multiplyXY(c, s);
|
|
231215
231225
|
const vector90 = this._matrix.multiplyXY(-s, c);
|
|
231216
|
-
const newSweep =
|
|
231226
|
+
const newSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(this._sweep.startRadians - theta.radians, this._sweep.endRadians - theta.radians);
|
|
231217
231227
|
const arcB = Arc3d.create(this._center.clone(), vector0, vector90, newSweep);
|
|
231218
231228
|
return arcB;
|
|
231219
231229
|
}
|
|
@@ -231241,10 +231251,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231241
231251
|
const iAxisPt = plane.getNormalRef().dotProduct(this.perpendicularVector.crossProductStartEnd(this.center, axisPts[0].point)) > 0.0 ? 0 : 1;
|
|
231242
231252
|
const toUnitX = this.sweep.fractionToAngle(axisPts[iAxisPt].fraction);
|
|
231243
231253
|
const arc1 = this.cloneInRotatedBasis(toUnitX); // rotate in arc's plane
|
|
231244
|
-
if (this.perpendicularVector.dotProduct(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ()) < -
|
|
231254
|
+
if (this.perpendicularVector.dotProduct(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ()) < -_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallAngleRadians) {
|
|
231245
231255
|
if (this.matrixRef.isSingular())
|
|
231246
231256
|
return undefined;
|
|
231247
|
-
const flip =
|
|
231257
|
+
const flip = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1); // rotate 180 degrees around arc's local x-axis
|
|
231248
231258
|
arc1.matrixRef.multiplyMatrixMatrix(flip, arc1.matrixRef);
|
|
231249
231259
|
arc1.sweep.setStartEndDegrees(-arc1.sweep.startDegrees, -arc1.sweep.endDegrees); // rotation alone is insufficient to flip
|
|
231250
231260
|
}
|
|
@@ -231293,7 +231303,6 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231293
231303
|
* @param point1 second point of path (the point of inflection).
|
|
231294
231304
|
* @param point2 third point of path (the point after the point of inflection).
|
|
231295
231305
|
* @param radius arc radius.
|
|
231296
|
-
*
|
|
231297
231306
|
*/
|
|
231298
231307
|
static createFilletArc(point0, point1, point2, radius) {
|
|
231299
231308
|
const vector10 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(point1, point0);
|
|
@@ -231309,7 +231318,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231309
231318
|
const perpendicular = vector12.minus(vector10);
|
|
231310
231319
|
const perpendicularMagnitude = perpendicular.magnitude(); // == 2 * sin(theta)
|
|
231311
231320
|
const sinTheta = 0.5 * perpendicularMagnitude;
|
|
231312
|
-
if (!
|
|
231321
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallAngleRadians(sinTheta)) { // for small theta, sinTheta is almost equal to theta
|
|
231313
231322
|
const cosTheta = Math.sqrt(1 - sinTheta * sinTheta);
|
|
231314
231323
|
const tanTheta = sinTheta / cosTheta;
|
|
231315
231324
|
const alphaRadians = Math.acos(sinTheta);
|
|
@@ -231320,7 +231329,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231320
231329
|
const center = point1.plusScaled(bisector, distanceToCenter);
|
|
231321
231330
|
bisector.scaleInPlace(-radius);
|
|
231322
231331
|
perpendicular.scaleInPlace(radius / perpendicularMagnitude);
|
|
231323
|
-
const arc02 = Arc3d.create(center, bisector, perpendicular,
|
|
231332
|
+
const arc02 = Arc3d.create(center, bisector, perpendicular, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(-alphaRadians, alphaRadians));
|
|
231324
231333
|
return { arc: arc02, fraction10: f10, fraction12: f12, point: point1.clone() };
|
|
231325
231334
|
}
|
|
231326
231335
|
}
|
|
@@ -231333,7 +231342,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231333
231342
|
}
|
|
231334
231343
|
/** Return the (signed) area between (a fractional portion of) the arc and the chord between those points. */
|
|
231335
231344
|
areaToChordXY(fraction0, fraction1) {
|
|
231336
|
-
const detJ =
|
|
231345
|
+
const detJ = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.crossProductXYXY(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[1], this._matrix.coffs[4]); // area scale factor from local to world
|
|
231337
231346
|
const radians0 = this._sweep.fractionToRadians(fraction0);
|
|
231338
231347
|
const radians1 = this._sweep.fractionToRadians(fraction1);
|
|
231339
231348
|
const alpha = 0.5 * (radians1 - radians0); // signed area of local sector
|
|
@@ -231355,9 +231364,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231355
231364
|
const r0new = r0 - sign * options.leftOffsetDistance;
|
|
231356
231365
|
const r90 = this.isCircular ? r0 : arcXY.matrixRef.columnYMagnitude();
|
|
231357
231366
|
const r90new = this.isCircular ? r0new : r90 - sign * options.leftOffsetDistance;
|
|
231358
|
-
if (!
|
|
231367
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(r0new)
|
|
231359
231368
|
&& (r0 * r0new > 0.0)
|
|
231360
|
-
&& (this.isCircular || (!
|
|
231369
|
+
&& (this.isCircular || (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(r90new) && (r90 * r90new > 0.0)))) {
|
|
231361
231370
|
const factor0 = r0new / r0;
|
|
231362
231371
|
const factor90 = this.isCircular ? factor0 : r90new / r90;
|
|
231363
231372
|
arcXY.matrixRef.scaleColumnsInPlace(factor0, factor90, 1.0);
|
|
@@ -231395,6 +231404,33 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
231395
231404
|
return (this.sweep.isFullCircle && options.forcePath) ? _Path__WEBPACK_IMPORTED_MODULE_22__.Path.create(this) : this;
|
|
231396
231405
|
return result;
|
|
231397
231406
|
}
|
|
231407
|
+
/**
|
|
231408
|
+
* Compute the intersection of the tangent vectors at two fractional parameters along the arc.
|
|
231409
|
+
* * In the civil design context of filleting a line string, the default values yield a fillet arc's "point of
|
|
231410
|
+
* intersection", aka _PI_. This point is the line string vertex that was rounded by the fillet arc placed
|
|
231411
|
+
* between the vertex's adjacent segments. In other words, the original line string vertices can be recovered
|
|
231412
|
+
* from the fillets with this method.
|
|
231413
|
+
* @param f0 fractional parameter of one tangent. Default is 0 (the arc's start tangent).
|
|
231414
|
+
* @param f1 fractional parameter of the other tangent. Default is 1 (the arc's end tangent).
|
|
231415
|
+
* @param result optional point to populate and return.
|
|
231416
|
+
* @returns intersection point, or undefined if tangents are zero or parallel.
|
|
231417
|
+
*/
|
|
231418
|
+
computeTangentIntersection(f0 = 0, f1 = 1, result) {
|
|
231419
|
+
const localRay0 = this.fractionToPointAndDerivative(f0, Arc3d._workRay0);
|
|
231420
|
+
const localRay1 = this.fractionToPointAndDerivative(f1, Arc3d._workRay1);
|
|
231421
|
+
if (localRay0.direction.isParallelTo(localRay1.direction, true, true))
|
|
231422
|
+
return undefined;
|
|
231423
|
+
const worldRay0 = localRay0.clone(Arc3d._workRay2);
|
|
231424
|
+
if (this.matrixRef.multiplyInverseXYZAsPoint3d(localRay0.origin.x, localRay0.origin.y, localRay0.origin.z, localRay0.origin)
|
|
231425
|
+
&& this.matrixRef.multiplyInverseXYZAsPoint3d(localRay1.origin.x, localRay1.origin.y, localRay1.origin.z, localRay1.origin)
|
|
231426
|
+
&& this.matrixRef.multiplyInverseXYZAsVector3d(localRay0.direction.x, localRay0.direction.y, localRay0.direction.z, localRay0.direction)
|
|
231427
|
+
&& this.matrixRef.multiplyInverseXYZAsVector3d(localRay1.direction.x, localRay1.direction.y, localRay1.direction.z, localRay1.direction)) { // conversion to local coordinates allows us to intersect without z
|
|
231428
|
+
const intersection = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineXYUVTransverseIntersection(localRay0.origin, localRay0.direction, localRay1.origin, localRay1.direction);
|
|
231429
|
+
if (intersection)
|
|
231430
|
+
return worldRay0.fractionToPoint(intersection.x, result); // intersection parameter is an affine invariant
|
|
231431
|
+
}
|
|
231432
|
+
return undefined;
|
|
231433
|
+
}
|
|
231398
231434
|
}
|
|
231399
231435
|
|
|
231400
231436
|
|
|
@@ -336760,6 +336796,9 @@ class Parser {
|
|
|
336760
336796
|
if (unitConversion !== undefined)
|
|
336761
336797
|
return unitConversion;
|
|
336762
336798
|
}
|
|
336799
|
+
// if there were unique unit labels but not matched to any units, throw an error
|
|
336800
|
+
if (uniqueUnitLabels.length > 0)
|
|
336801
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.UnitLabelSuppliedButNotMatched, `The unit label(s) ${uniqueUnitLabels.join(", ")} could not be matched to a known unit.`);
|
|
336763
336802
|
}
|
|
336764
336803
|
return unitConversion;
|
|
336765
336804
|
}
|
|
@@ -336807,7 +336846,14 @@ class Parser {
|
|
|
336807
336846
|
return { ok: false, error: ParseError.UnableToConvertParseTokensToQuantity };
|
|
336808
336847
|
}
|
|
336809
336848
|
const defaultUnit = format.units && format.units.length > 0 ? format.units[0][0] : undefined;
|
|
336810
|
-
|
|
336849
|
+
try {
|
|
336850
|
+
defaultUnitConversion = defaultUnitConversion ? defaultUnitConversion : Parser.getDefaultUnitConversion(tokens, unitsConversions, defaultUnit);
|
|
336851
|
+
}
|
|
336852
|
+
catch (e) {
|
|
336853
|
+
// If we failed to get the default unit conversion, we need to return an error.
|
|
336854
|
+
if (e instanceof _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError && e.errorNumber === _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.UnitLabelSuppliedButNotMatched)
|
|
336855
|
+
return { ok: false, error: ParseError.UnitLabelSuppliedButNotMatched };
|
|
336856
|
+
}
|
|
336811
336857
|
if (format.type === _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Bearing && format.units !== undefined && format.units.length > 0) {
|
|
336812
336858
|
const units = format.units;
|
|
336813
336859
|
const desiredNumberOfTokens = units.length;
|
|
@@ -338226,18 +338272,18 @@ class Settings {
|
|
|
338226
338272
|
}
|
|
338227
338273
|
}
|
|
338228
338274
|
toString() {
|
|
338229
|
-
return `Configurations:
|
|
338230
|
-
backend location: ${this.Backend.location},
|
|
338231
|
-
backend name: ${this.Backend.name},
|
|
338232
|
-
backend version: ${this.Backend.version},
|
|
338233
|
-
oidc client id: ${this.oidcClientId},
|
|
338234
|
-
oidc scopes: ${this.oidcScopes},
|
|
338235
|
-
applicationId: ${this.gprid},
|
|
338236
|
-
log level: ${this.logLevel},
|
|
338237
|
-
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
338238
|
-
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
338239
|
-
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
338240
|
-
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
338275
|
+
return `Configurations:
|
|
338276
|
+
backend location: ${this.Backend.location},
|
|
338277
|
+
backend name: ${this.Backend.name},
|
|
338278
|
+
backend version: ${this.Backend.version},
|
|
338279
|
+
oidc client id: ${this.oidcClientId},
|
|
338280
|
+
oidc scopes: ${this.oidcScopes},
|
|
338281
|
+
applicationId: ${this.gprid},
|
|
338282
|
+
log level: ${this.logLevel},
|
|
338283
|
+
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
338284
|
+
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
338285
|
+
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
338286
|
+
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
338241
338287
|
testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
|
|
338242
338288
|
}
|
|
338243
338289
|
}
|
|
@@ -338462,7 +338508,7 @@ class TestContext {
|
|
|
338462
338508
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
338463
338509
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
338464
338510
|
await core_frontend_1.NoRenderApp.startup({
|
|
338465
|
-
applicationVersion: "5.3.0-dev.
|
|
338511
|
+
applicationVersion: "5.3.0-dev.17",
|
|
338466
338512
|
applicationId: this.settings.gprid,
|
|
338467
338513
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
338468
338514
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -351647,13 +351693,13 @@ class FavoritePropertiesManager {
|
|
|
351647
351693
|
if (missingClasses.size === 0) {
|
|
351648
351694
|
return baseClasses;
|
|
351649
351695
|
}
|
|
351650
|
-
const query = `
|
|
351651
|
-
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
351652
|
-
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
351653
|
-
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
351654
|
-
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
351655
|
-
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
351656
|
-
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
351696
|
+
const query = `
|
|
351697
|
+
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
351698
|
+
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
351699
|
+
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
351700
|
+
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
351701
|
+
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
351702
|
+
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
351657
351703
|
WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
|
|
351658
351704
|
const reader = imodel.createQueryReader(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames });
|
|
351659
351705
|
while (await reader.step()) {
|
|
@@ -363729,7 +363775,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
363729
363775
|
/***/ ((module) => {
|
|
363730
363776
|
|
|
363731
363777
|
"use strict";
|
|
363732
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.3.0-dev.
|
|
363778
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.3.0-dev.17","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"5.2.2-dev.2","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
363733
363779
|
|
|
363734
363780
|
/***/ }),
|
|
363735
363781
|
|