@itwin/ecschema-rpcinterface-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.
@@ -88207,6 +88207,10 @@ class IModelApp {
88207
88207
  IModelApp.requestNextAnimation();
88208
88208
  }, IModelApp.animationInterval.milliseconds);
88209
88209
  }
88210
+ /** Return true if the main event processing loop has been started.
88211
+ * @internal
88212
+ */
88213
+ static get isEventLoopStarted() { return IModelApp._wantEventLoop; }
88210
88214
  /** @internal */
88211
88215
  static startEventLoop() {
88212
88216
  if (!IModelApp._wantEventLoop) {
@@ -181775,6 +181779,9 @@ class ToolAdmin {
181775
181779
  * @internal
181776
181780
  */
181777
181781
  static addEvent(ev, vp) {
181782
+ // Don't add events to queue if event loop hasn't been started to process them...
181783
+ if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.isEventLoopStarted)
181784
+ return;
181778
181785
  if (!ToolAdmin.tryReplace(ev, vp)) // see if this event replaces the last event in the queue
181779
181786
  this._toolEvents.push({ ev, vp }); // otherwise put it at the end of the queue.
181780
181787
  _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.requestNextAnimation(); // wake up event loop, if
@@ -200372,25 +200379,25 @@ __webpack_require__.r(__webpack_exports__);
200372
200379
  /* harmony export */ EllipticalArcSampleMethod: () => (/* binding */ EllipticalArcSampleMethod)
200373
200380
  /* harmony export */ });
200374
200381
  /* harmony import */ var _Constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constant */ "../../core/geometry/lib/esm/Constant.js");
200375
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
200376
- /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
200377
- /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
200378
- /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
200382
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
200383
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
200384
+ /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
200385
+ /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
200379
200386
  /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
200380
- /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
200387
+ /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
200381
200388
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
200382
200389
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
200383
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
200390
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
200384
200391
  /* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
200385
- /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
200392
+ /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
200386
200393
  /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
200387
200394
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
200388
200395
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
200389
200396
  /* harmony import */ var _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/CurveOffsetXYHandler */ "../../core/geometry/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js");
200390
200397
  /* harmony import */ var _internalContexts_EllipticalArcApproximationContext__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./internalContexts/EllipticalArcApproximationContext */ "../../core/geometry/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js");
200391
200398
  /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
200392
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
200393
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
200399
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
200400
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
200394
200401
  /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
200395
200402
  /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
200396
200403
  /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
@@ -200575,6 +200582,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200575
200582
  static _workVectorU = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
200576
200583
  static _workVectorV = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
200577
200584
  static _workVectorW = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
200585
+ static _workRay0 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
200586
+ static _workRay1 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
200587
+ static _workRay2 = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
200578
200588
  /** Read/write the center. Getter returns clone. */
200579
200589
  get center() {
200580
200590
  return this._center.clone();
@@ -200681,7 +200691,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200681
200691
  if (sweep)
200682
200692
  sweep.clampToFullCircle(this._sweep);
200683
200693
  else
200684
- _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.create360(0, this._sweep);
200694
+ _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.create360(0, this._sweep);
200685
200695
  return this;
200686
200696
  }
200687
200697
  /** Copy center, matrix, and sweep from other Arc3d. */
@@ -200705,7 +200715,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200705
200715
  static createRefs(center, matrix, sweep, result) {
200706
200716
  if (result)
200707
200717
  return result.set(center, matrix, sweep);
200708
- return new Arc3d(center ?? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.createZero(), matrix ?? _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createIdentity(), sweep ?? _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.create360());
200718
+ 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());
200709
200719
  }
200710
200720
  /**
200711
200721
  * Create an arc from center, x column to be scaled, and y column to be scaled.
@@ -200730,7 +200740,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200730
200740
  * @param result optional preallocated result.
200731
200741
  */
200732
200742
  static createCenterNormalRadius(center, normal, radius, result) {
200733
- const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidHeadsUp(normal);
200743
+ const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidHeadsUp(normal);
200734
200744
  return Arc3d.createScaledXYColumns(center, frame, radius, radius, undefined, result);
200735
200745
  }
200736
200746
  /**
@@ -200743,7 +200753,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200743
200753
  */
200744
200754
  static create(center, vector0, vector90, sweep, result) {
200745
200755
  const normal = vector0.unitCrossProductWithDefault(vector90, 0, 0, 0); // normal will be 000 for degenerate case
200746
- const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createColumns(vector0, vector90, normal, result?._matrix);
200756
+ const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(vector0, vector90, normal, result?._matrix);
200747
200757
  if (result)
200748
200758
  return result.set(center, matrix, sweep);
200749
200759
  return this.createRefs(center?.clone(), matrix, sweep?.clone());
@@ -200771,8 +200781,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200771
200781
  const vector90 = normal.unitCrossProductWithDefault(vector0, 0, 0, 0);
200772
200782
  const v1DotV90 = vector1.dotProduct(vector90);
200773
200783
  // solve the standard ellipse equation for the unknown axis length, given local coords of middle (v0.v1/||v0||, v90.v1)
200774
- const v90Len = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.safeDivideFraction(v0Len2 * v1DotV90, Math.sqrt(v0Len2 * v0Len2 - v0DotV1 * v0DotV1), 0);
200775
- if (_Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistanceSquared(v90Len)) // tighter than smallMetricDistance to allow flatter long elliptical arcs
200784
+ const v90Len = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.safeDivideFraction(v0Len2 * v1DotV90, Math.sqrt(v0Len2 * v0Len2 - v0DotV1 * v0DotV1), 0);
200785
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistanceSquared(v90Len)) // tighter than smallMetricDistance to allow flatter long elliptical arcs
200776
200786
  return undefined;
200777
200787
  vector90.scaleInPlace(v90Len);
200778
200788
  return Arc3d.create(center, vector0, vector90, sweep, result);
@@ -200785,11 +200795,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200785
200795
  static createCircularStartTangentEnd(start, tangentAtStart, end, result) {
200786
200796
  // see itwinjs-core\core\geometry\internaldocs\Arc3d.md to clarify below algorithm
200787
200797
  const startToEnd = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(start, end);
200788
- const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidFromColumns(tangentAtStart, startToEnd, _Geometry__WEBPACK_IMPORTED_MODULE_5__.AxisOrder.XYZ);
200798
+ const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidFromColumns(tangentAtStart, startToEnd, _Geometry__WEBPACK_IMPORTED_MODULE_6__.AxisOrder.XYZ);
200789
200799
  if (frame !== undefined) {
200790
200800
  const vv = startToEnd.dotProduct(startToEnd);
200791
200801
  const vw = frame.dotColumnY(startToEnd);
200792
- const radius = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.conditionalDivideCoordinate(vv, 2 * vw);
200802
+ const radius = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.conditionalDivideCoordinate(vv, 2 * vw);
200793
200803
  if (radius !== undefined) {
200794
200804
  const vector0 = frame.columnY();
200795
200805
  vector0.scaleInPlace(-radius); // center to start
@@ -200801,11 +200811,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200801
200811
  if (tangentAtStart.dotProduct(centerToEnd) < 0.0) // sweepRadians is the wrong way
200802
200812
  sweepRadians = 2.0 * Math.PI - sweepRadians;
200803
200813
  const center = start.plusScaled(vector0, -1.0);
200804
- const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(0.0, sweepRadians);
200814
+ const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0.0, sweepRadians);
200805
200815
  return Arc3d.create(center, vector0, vector90, sweep, result);
200806
200816
  }
200807
200817
  }
200808
- return _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d.create(start, end);
200818
+ return _LineSegment3d__WEBPACK_IMPORTED_MODULE_7__.LineSegment3d.create(start, end);
200809
200819
  }
200810
200820
  /**
200811
200821
  * Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep.
@@ -200826,7 +200836,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200826
200836
  // reverse the A-to-center vector and bring it up to scale
200827
200837
  vector0.scaleInPlace(-radius);
200828
200838
  const vector90 = tangentAtStart.scaleToLength(Math.abs(radius)); // cannot fail; prior unitCrossProduct would have failed first
200829
- return Arc3d.create(center, vector0, vector90, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.create(sweep));
200839
+ return Arc3d.create(center, vector0, vector90, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.create(sweep));
200830
200840
  }
200831
200841
  /**
200832
200842
  * Create a circular arc defined by start and end points and radius.
@@ -200858,9 +200868,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200858
200868
  start.interpolate(0.5, end, center).addInPlace(vecToCenter);
200859
200869
  const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, start, this._workVectorW);
200860
200870
  const endVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, end, this._workVectorV); // reuse static
200861
- const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(0, vector0.signedRadiansTo(endVector, normal), result?.sweep);
200871
+ const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0, vector0.signedRadiansTo(endVector, normal), result?.sweep);
200862
200872
  const vector90 = normal.crossProduct(vector0, this._workVectorV); // has length radius (reuse static)
200863
- const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createColumns(vector0, vector90, normal, result?.matrixRef);
200873
+ const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(vector0, vector90, normal, result?.matrixRef);
200864
200874
  return this.createRefs(center, matrix, sweep, result);
200865
200875
  }
200866
200876
  /**
@@ -200892,7 +200902,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200892
200902
  const magX = this._matrix.columnXMagnitude();
200893
200903
  const magY = this._matrix.columnYMagnitude();
200894
200904
  const jacobian = this._matrix.columnXYCrossProductMagnitude();
200895
- const largeAxis = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.maxXY(magX, magY);
200905
+ const largeAxis = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.maxXY(magX, magY);
200896
200906
  return jacobian / (largeAxis * largeAxis);
200897
200907
  }
200898
200908
  /**
@@ -200906,23 +200916,23 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200906
200916
  const ac2 = vectorAC.magnitudeSquared();
200907
200917
  const normal = vectorAB.sizedCrossProduct(vectorAC, Math.sqrt(Math.sqrt(ab2 * ac2)));
200908
200918
  if (normal) {
200909
- const vectorToCenter = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.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)
200919
+ 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)
200910
200920
  0.5 * ab2, // vectorToCenter DOT vectorAB = ab2 / 2 (ensure the projection of vectorToCenter on AB bisects AB)
200911
200921
  0.5 * ac2);
200912
200922
  if (vectorToCenter) { // i.e., the negative of vectorX
200913
200923
  const center = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(pointA.x, pointA.y, pointA.z).plus(vectorToCenter);
200914
200924
  const vectorX = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, pointA);
200915
- const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createRotateVectorAroundVector(vectorX, normal, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.createDegrees(90));
200925
+ const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createRotateVectorAroundVector(vectorX, normal, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.createDegrees(90));
200916
200926
  if (vectorY) {
200917
200927
  const vectorCenterToC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(center, pointC);
200918
200928
  const sweepAngle = vectorX.signedAngleTo(vectorCenterToC, normal);
200919
200929
  if (sweepAngle.radians < 0.0)
200920
200930
  sweepAngle.addMultipleOf2PiInPlace(1.0);
200921
- return Arc3d.create(center, vectorX, vectorY, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(0.0, sweepAngle.radians), result);
200931
+ return Arc3d.create(center, vectorX, vectorY, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(0.0, sweepAngle.radians), result);
200922
200932
  }
200923
200933
  }
200924
200934
  }
200925
- return _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create(pointA, pointB, pointC);
200935
+ return _LineString3d__WEBPACK_IMPORTED_MODULE_10__.LineString3d.create(pointA, pointB, pointC);
200926
200936
  }
200927
200937
  /** The arc has simple proportional arc length if and only if it is a circular arc. */
200928
200938
  getFractionToDistanceScale() {
@@ -200969,7 +200979,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200969
200979
  fractionToPointAnd2Derivatives(fraction, result) {
200970
200980
  const radians = this._sweep.fractionToRadians(fraction);
200971
200981
  if (!result)
200972
- result = _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_10__.Plane3dByOriginAndVectors.createXYPlane();
200982
+ result = _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndVectors.createXYPlane();
200973
200983
  const c = Math.cos(radians);
200974
200984
  const s = Math.sin(radians);
200975
200985
  this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
@@ -200985,7 +200995,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
200985
200995
  * @param result optional preallocated ray.
200986
200996
  */
200987
200997
  radiansToPointAndDerivative(radians, result) {
200988
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_11__.Ray3d.createZero();
200998
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
200989
200999
  const c = Math.cos(radians);
200990
201000
  const s = Math.sin(radians);
200991
201001
  this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
@@ -201013,7 +201023,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201013
201023
  * @param result optional preallocated plane.
201014
201024
  */
201015
201025
  radiansToRotatedBasis(radians, result) {
201016
- result = result ? result : _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_10__.Plane3dByOriginAndVectors.createXYPlane();
201026
+ result = result ? result : _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndVectors.createXYPlane();
201017
201027
  const c = Math.cos(radians);
201018
201028
  const s = Math.sin(radians);
201019
201029
  result.origin.setFromPoint3d(this.center);
@@ -201027,7 +201037,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201027
201037
  * @param result optional preallocated ray.
201028
201038
  */
201029
201039
  angleToPointAndDerivative(theta, result) {
201030
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_11__.Ray3d.createZero();
201040
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
201031
201041
  const c = theta.cos();
201032
201042
  const s = theta.sin();
201033
201043
  this._matrix.originPlusMatrixTimesXY(this._center, c, s, result.origin);
@@ -201132,7 +201142,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201132
201142
  if (!this.isCircular) // suppress extension !!!
201133
201143
  return super.moveSignedDistanceFromFractionGeneric(startFraction, signedDistance, allowExtension, result);
201134
201144
  const totalLength = this.curveLength();
201135
- const signedFractionMove = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.conditionalDivideFraction(signedDistance, totalLength);
201145
+ const signedFractionMove = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.conditionalDivideFraction(signedDistance, totalLength);
201136
201146
  if (signedFractionMove === undefined) {
201137
201147
  return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPointDistanceCurveSearchStatus(this, startFraction, this.fractionToPoint(startFraction), 0.0, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveSearchStatus.error);
201138
201148
  }
@@ -201179,7 +201189,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201179
201189
  allRadians.push(this._sweep.endRadians);
201180
201190
  }
201181
201191
  // hm... logically there must at least two angles there ... but if it happens return the start point ...
201182
- const workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_11__.Ray3d.createZero();
201192
+ const workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createZero();
201183
201193
  if (allRadians.length === 0) {
201184
201194
  result.setFR(0.0, this.radiansToPointAndDerivative(this._sweep.startRadians, workRay));
201185
201195
  result.a = spacePoint.distance(result.point);
@@ -201207,7 +201217,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201207
201217
  const centerToPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(this.centerRef, spacePoint);
201208
201218
  let centerToLocalPoint;
201209
201219
  if (options?.vectorToEye) {
201210
- const arcToView = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createColumns(this.matrixRef.getColumn(0), this.matrixRef.getColumn(1), options.vectorToEye);
201220
+ const arcToView = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createColumns(this.matrixRef.getColumn(0), this.matrixRef.getColumn(1), options.vectorToEye);
201211
201221
  centerToLocalPoint = arcToView.multiplyInverse(centerToPoint);
201212
201222
  }
201213
201223
  else {
@@ -201227,7 +201237,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201227
201237
  const distanceToTangency = Math.sqrt(hypotenuseSquared - 1.0);
201228
201238
  const alpha = Math.atan2(centerToLocalPoint.y, centerToLocalPoint.x);
201229
201239
  const beta = Math.atan2(distanceToTangency, 1);
201230
- const angles = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallAngleRadians(beta) ? [alpha] : [alpha + beta, alpha - beta];
201240
+ const angles = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallAngleRadians(beta) ? [alpha] : [alpha + beta, alpha - beta];
201231
201241
  for (const theta of angles) {
201232
201242
  const f = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveRadiansToValidSweepFraction(options?.extend ?? false, theta, this.sweep);
201233
201243
  if (f.isValid) {
@@ -201258,16 +201268,16 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201258
201268
  isInPlane(plane) {
201259
201269
  const normal = plane.getNormalRef();
201260
201270
  // The ellipse vectors are full-length -- true distance comparisons say things.
201261
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistance(plane.altitude(this._center))
201262
- && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistance(this._matrix.dotColumnX(normal))
201263
- && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistance(this._matrix.dotColumnY(normal));
201271
+ return _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(plane.altitude(this._center))
201272
+ && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(this._matrix.dotColumnX(normal))
201273
+ && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(this._matrix.dotColumnY(normal));
201264
201274
  }
201265
201275
  /** Return true if the vector0 and vector90 are of equal length and perpendicular. */
201266
201276
  get isCircular() {
201267
201277
  const axx = this._matrix.columnXMagnitudeSquared();
201268
201278
  const ayy = this._matrix.columnYMagnitudeSquared();
201269
201279
  const axy = this._matrix.columnXDotColumnY();
201270
- return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.isPerpendicularDotSet(axx, ayy, axy) && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinateSquared(axx, ayy);
201280
+ return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isPerpendicularDotSet(axx, ayy, axy) && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSameCoordinateSquared(axx, ayy);
201271
201281
  }
201272
201282
  /** Return radius if the vector0 and vector90 are of equal length and perpendicular. Ignores z. */
201273
201283
  circularRadiusXY() {
@@ -201275,11 +201285,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201275
201285
  const uy = this._matrix.at(1, 0);
201276
201286
  const vx = this._matrix.at(0, 1);
201277
201287
  const vy = this._matrix.at(1, 1);
201278
- const dotUU = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.dotProductXYXY(ux, uy, ux, uy);
201279
- const dotVV = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.dotProductXYXY(vx, vy, vx, vy);
201280
- const dotUV = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.dotProductXYXY(ux, uy, vx, vy);
201281
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.isPerpendicularDotSet(dotUU, dotVV, dotUV) && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinateSquared(dotUU, dotVV))
201282
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.hypotenuseXY(ux, uy);
201288
+ const dotUU = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(ux, uy, ux, uy);
201289
+ const dotVV = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(vx, vy, vx, vy);
201290
+ const dotUV = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.dotProductXYXY(ux, uy, vx, vy);
201291
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isPerpendicularDotSet(dotUU, dotVV, dotUV) && _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSameCoordinateSquared(dotUU, dotVV))
201292
+ return _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.hypotenuseXY(ux, uy);
201283
201293
  return undefined;
201284
201294
  }
201285
201295
  /** If the arc is circular, return its radius. Otherwise return undefined. */
@@ -201300,7 +201310,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201300
201310
  const coffs = this._matrix.coffs;
201301
201311
  const cosCoff = plane.velocityXYZ(coffs[0], coffs[3], coffs[6]);
201302
201312
  const sinCoff = plane.velocityXYZ(coffs[1], coffs[4], coffs[7]);
201303
- const trigPoints = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.solveTrigForm(constCoff, cosCoff, sinCoff);
201313
+ const trigPoints = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.solveTrigForm(constCoff, cosCoff, sinCoff);
201304
201314
  let numIntersection = 0;
201305
201315
  if (trigPoints !== undefined) {
201306
201316
  numIntersection = trigPoints.length;
@@ -201310,9 +201320,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201310
201320
  const fraction = this._sweep.radiansToPositivePeriodicFraction(radians);
201311
201321
  const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
201312
201322
  detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolated;
201313
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.startRadians))
201323
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.startRadians))
201314
201324
  detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolatedAtVertex;
201315
- else if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.endRadians))
201325
+ else if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, this._sweep.endRadians))
201316
201326
  detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.isolatedAtVertex;
201317
201327
  result.push(detail);
201318
201328
  }
@@ -201359,7 +201369,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201359
201369
  * * Default implementation returns teh range of the curve from clonePartialCurve.
201360
201370
  */
201361
201371
  rangeBetweenFractions(fraction0, fraction1, transform) {
201362
- const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
201372
+ const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
201363
201373
  const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_15__.Range3d.create();
201364
201374
  this.extendRangeInSweep(range, sweep, transform);
201365
201375
  return range;
@@ -201395,7 +201405,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201395
201405
  * @param result optional preallocated object to populate and return.
201396
201406
  */
201397
201407
  static createXY(center, radius, sweep, result) {
201398
- const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createScale(radius, radius, 1.0, result?.matrixRef);
201408
+ const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createScale(radius, radius, 1.0, result?.matrixRef);
201399
201409
  if (result)
201400
201410
  return result.set(center, matrix, sweep);
201401
201411
  return Arc3d.createRefs(center.clone(), matrix, sweep?.clone());
@@ -201409,7 +201419,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201409
201419
  * @param result optional preallocated object to populate and return.
201410
201420
  */
201411
201421
  static createXYEllipse(center, radiusA, radiusB, sweep, result) {
201412
- const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createScale(radiusA, radiusB, 1.0, result?.matrixRef);
201422
+ const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createScale(radiusA, radiusB, 1.0, result?.matrixRef);
201413
201423
  if (result)
201414
201424
  return result.set(center, matrix, sweep);
201415
201425
  return Arc3d.createRefs(center.clone(), matrix, sweep?.clone());
@@ -201429,13 +201439,13 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201429
201439
  * from which the arc's symmetry is readily apparent.
201430
201440
  */
201431
201441
  toScaledMatrix3d() {
201432
- const angleData = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_8__.Angle.dotProductsToHalfAngleTrigValues(this._matrix.columnXMagnitudeSquared(), this._matrix.columnYMagnitudeSquared(), this._matrix.columnXDotColumnY(), true);
201442
+ const angleData = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_9__.Angle.dotProductsToHalfAngleTrigValues(this._matrix.columnXMagnitudeSquared(), this._matrix.columnYMagnitudeSquared(), this._matrix.columnXDotColumnY(), true);
201433
201443
  const vector0A = this._matrix.multiplyXY(angleData.c, angleData.s);
201434
201444
  const vector90A = this._matrix.multiplyXY(-angleData.s, angleData.c);
201435
- const axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidFromColumns(vector0A, vector90A, _Geometry__WEBPACK_IMPORTED_MODULE_5__.AxisOrder.XYZ);
201445
+ const axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createRigidFromColumns(vector0A, vector90A, _Geometry__WEBPACK_IMPORTED_MODULE_6__.AxisOrder.XYZ);
201436
201446
  return {
201437
201447
  center: this._center.clone(),
201438
- axes: (axes ? axes : _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createIdentity()),
201448
+ axes: (axes ? axes : _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.createIdentity()),
201439
201449
  r0: vector0A.magnitude(),
201440
201450
  r90: vector90A.magnitude(),
201441
201451
  sweep: this.sweep.cloneMinusRadians(angleData.radians),
@@ -201493,7 +201503,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201493
201503
  }
201494
201504
  else {
201495
201505
  this._center.set(0, 0, 0);
201496
- this._matrix.setFrom(_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.identity);
201506
+ this._matrix.setFrom(_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__.Matrix3d.identity);
201497
201507
  this._sweep.setStartEndRadians();
201498
201508
  }
201499
201509
  }
@@ -201510,7 +201520,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201510
201520
  };
201511
201521
  }
201512
201522
  /** Test if this arc is almost equal to another GeometryQuery object. */
201513
- isAlmostEqual(otherGeometry, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallMetricDistance, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallAngleRadians) {
201523
+ isAlmostEqual(otherGeometry, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallAngleRadians) {
201514
201524
  if (otherGeometry instanceof Arc3d) {
201515
201525
  const other = otherGeometry;
201516
201526
  return this._center.isAlmostEqual(other._center, distanceTol)
@@ -201578,7 +201588,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201578
201588
  const s = theta.sin();
201579
201589
  const vector0 = this._matrix.multiplyXY(c, s);
201580
201590
  const vector90 = this._matrix.multiplyXY(-s, c);
201581
- const newSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(this._sweep.startRadians - theta.radians, this._sweep.endRadians - theta.radians);
201591
+ const newSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(this._sweep.startRadians - theta.radians, this._sweep.endRadians - theta.radians);
201582
201592
  const arcB = Arc3d.create(this._center.clone(), vector0, vector90, newSweep);
201583
201593
  return arcB;
201584
201594
  }
@@ -201606,10 +201616,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201606
201616
  const iAxisPt = plane.getNormalRef().dotProduct(this.perpendicularVector.crossProductStartEnd(this.center, axisPts[0].point)) > 0.0 ? 0 : 1;
201607
201617
  const toUnitX = this.sweep.fractionToAngle(axisPts[iAxisPt].fraction);
201608
201618
  const arc1 = this.cloneInRotatedBasis(toUnitX); // rotate in arc's plane
201609
- if (this.perpendicularVector.dotProduct(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ()) < -_Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallAngleRadians) {
201619
+ if (this.perpendicularVector.dotProduct(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ()) < -_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallAngleRadians) {
201610
201620
  if (this.matrixRef.isSingular())
201611
201621
  return undefined;
201612
- const flip = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1); // rotate 180 degrees around arc's local x-axis
201622
+ 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
201613
201623
  arc1.matrixRef.multiplyMatrixMatrix(flip, arc1.matrixRef);
201614
201624
  arc1.sweep.setStartEndDegrees(-arc1.sweep.startDegrees, -arc1.sweep.endDegrees); // rotation alone is insufficient to flip
201615
201625
  }
@@ -201658,7 +201668,6 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201658
201668
  * @param point1 second point of path (the point of inflection).
201659
201669
  * @param point2 third point of path (the point after the point of inflection).
201660
201670
  * @param radius arc radius.
201661
- *
201662
201671
  */
201663
201672
  static createFilletArc(point0, point1, point2, radius) {
201664
201673
  const vector10 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(point1, point0);
@@ -201674,7 +201683,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201674
201683
  const perpendicular = vector12.minus(vector10);
201675
201684
  const perpendicularMagnitude = perpendicular.magnitude(); // == 2 * sin(theta)
201676
201685
  const sinTheta = 0.5 * perpendicularMagnitude;
201677
- if (!_Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallAngleRadians(sinTheta)) { // (for small theta, sinTheta is almost equal to theta)
201686
+ if (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallAngleRadians(sinTheta)) { // for small theta, sinTheta is almost equal to theta
201678
201687
  const cosTheta = Math.sqrt(1 - sinTheta * sinTheta);
201679
201688
  const tanTheta = sinTheta / cosTheta;
201680
201689
  const alphaRadians = Math.acos(sinTheta);
@@ -201685,7 +201694,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201685
201694
  const center = point1.plusScaled(bisector, distanceToCenter);
201686
201695
  bisector.scaleInPlace(-radius);
201687
201696
  perpendicular.scaleInPlace(radius / perpendicularMagnitude);
201688
- const arc02 = Arc3d.create(center, bisector, perpendicular, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_3__.AngleSweep.createStartEndRadians(-alphaRadians, alphaRadians));
201697
+ const arc02 = Arc3d.create(center, bisector, perpendicular, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(-alphaRadians, alphaRadians));
201689
201698
  return { arc: arc02, fraction10: f10, fraction12: f12, point: point1.clone() };
201690
201699
  }
201691
201700
  }
@@ -201698,7 +201707,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201698
201707
  }
201699
201708
  /** Return the (signed) area between (a fractional portion of) the arc and the chord between those points. */
201700
201709
  areaToChordXY(fraction0, fraction1) {
201701
- const detJ = _Geometry__WEBPACK_IMPORTED_MODULE_5__.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
201710
+ 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
201702
201711
  const radians0 = this._sweep.fractionToRadians(fraction0);
201703
201712
  const radians1 = this._sweep.fractionToRadians(fraction1);
201704
201713
  const alpha = 0.5 * (radians1 - radians0); // signed area of local sector
@@ -201720,9 +201729,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201720
201729
  const r0new = r0 - sign * options.leftOffsetDistance;
201721
201730
  const r90 = this.isCircular ? r0 : arcXY.matrixRef.columnYMagnitude();
201722
201731
  const r90new = this.isCircular ? r0new : r90 - sign * options.leftOffsetDistance;
201723
- if (!_Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistance(r0new)
201732
+ if (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(r0new)
201724
201733
  && (r0 * r0new > 0.0)
201725
- && (this.isCircular || (!_Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallMetricDistance(r90new) && (r90 * r90new > 0.0)))) {
201734
+ && (this.isCircular || (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(r90new) && (r90 * r90new > 0.0)))) {
201726
201735
  const factor0 = r0new / r0;
201727
201736
  const factor90 = this.isCircular ? factor0 : r90new / r90;
201728
201737
  arcXY.matrixRef.scaleColumnsInPlace(factor0, factor90, 1.0);
@@ -201760,6 +201769,33 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
201760
201769
  return (this.sweep.isFullCircle && options.forcePath) ? _Path__WEBPACK_IMPORTED_MODULE_22__.Path.create(this) : this;
201761
201770
  return result;
201762
201771
  }
201772
+ /**
201773
+ * Compute the intersection of the tangent vectors at two fractional parameters along the arc.
201774
+ * * In the civil design context of filleting a line string, the default values yield a fillet arc's "point of
201775
+ * intersection", aka _PI_. This point is the line string vertex that was rounded by the fillet arc placed
201776
+ * between the vertex's adjacent segments. In other words, the original line string vertices can be recovered
201777
+ * from the fillets with this method.
201778
+ * @param f0 fractional parameter of one tangent. Default is 0 (the arc's start tangent).
201779
+ * @param f1 fractional parameter of the other tangent. Default is 1 (the arc's end tangent).
201780
+ * @param result optional point to populate and return.
201781
+ * @returns intersection point, or undefined if tangents are zero or parallel.
201782
+ */
201783
+ computeTangentIntersection(f0 = 0, f1 = 1, result) {
201784
+ const localRay0 = this.fractionToPointAndDerivative(f0, Arc3d._workRay0);
201785
+ const localRay1 = this.fractionToPointAndDerivative(f1, Arc3d._workRay1);
201786
+ if (localRay0.direction.isParallelTo(localRay1.direction, true, true))
201787
+ return undefined;
201788
+ const worldRay0 = localRay0.clone(Arc3d._workRay2);
201789
+ if (this.matrixRef.multiplyInverseXYZAsPoint3d(localRay0.origin.x, localRay0.origin.y, localRay0.origin.z, localRay0.origin)
201790
+ && this.matrixRef.multiplyInverseXYZAsPoint3d(localRay1.origin.x, localRay1.origin.y, localRay1.origin.z, localRay1.origin)
201791
+ && this.matrixRef.multiplyInverseXYZAsVector3d(localRay0.direction.x, localRay0.direction.y, localRay0.direction.z, localRay0.direction)
201792
+ && this.matrixRef.multiplyInverseXYZAsVector3d(localRay1.direction.x, localRay1.direction.y, localRay1.direction.z, localRay1.direction)) { // conversion to local coordinates allows us to intersect without z
201793
+ const intersection = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineXYUVTransverseIntersection(localRay0.origin, localRay0.direction, localRay1.origin, localRay1.direction);
201794
+ if (intersection)
201795
+ return worldRay0.fractionToPoint(intersection.x, result); // intersection parameter is an affine invariant
201796
+ }
201797
+ return undefined;
201798
+ }
201763
201799
  }
201764
201800
 
201765
201801
 
@@ -307125,6 +307161,9 @@ class Parser {
307125
307161
  if (unitConversion !== undefined)
307126
307162
  return unitConversion;
307127
307163
  }
307164
+ // if there were unique unit labels but not matched to any units, throw an error
307165
+ if (uniqueUnitLabels.length > 0)
307166
+ 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.`);
307128
307167
  }
307129
307168
  return unitConversion;
307130
307169
  }
@@ -307172,7 +307211,14 @@ class Parser {
307172
307211
  return { ok: false, error: ParseError.UnableToConvertParseTokensToQuantity };
307173
307212
  }
307174
307213
  const defaultUnit = format.units && format.units.length > 0 ? format.units[0][0] : undefined;
307175
- defaultUnitConversion = defaultUnitConversion ? defaultUnitConversion : Parser.getDefaultUnitConversion(tokens, unitsConversions, defaultUnit);
307214
+ try {
307215
+ defaultUnitConversion = defaultUnitConversion ? defaultUnitConversion : Parser.getDefaultUnitConversion(tokens, unitsConversions, defaultUnit);
307216
+ }
307217
+ catch (e) {
307218
+ // If we failed to get the default unit conversion, we need to return an error.
307219
+ if (e instanceof _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError && e.errorNumber === _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.UnitLabelSuppliedButNotMatched)
307220
+ return { ok: false, error: ParseError.UnitLabelSuppliedButNotMatched };
307221
+ }
307176
307222
  if (format.type === _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Bearing && format.units !== undefined && format.units.length > 0) {
307177
307223
  const units = format.units;
307178
307224
  const desiredNumberOfTokens = units.length;
@@ -308550,10 +308596,10 @@ class Settings {
308550
308596
  });
308551
308597
  }
308552
308598
  toString() {
308553
- return `Configurations:
308554
- oidc client id: ${this.oidcClientId},
308555
- oidc scopes: ${this.oidcScopes},
308556
- applicationId: ${this.gprid},
308599
+ return `Configurations:
308600
+ oidc client id: ${this.oidcClientId},
308601
+ oidc scopes: ${this.oidcScopes},
308602
+ applicationId: ${this.gprid},
308557
308603
  log level: ${this.logLevel}`;
308558
308604
  }
308559
308605
  }
@@ -321508,7 +321554,7 @@ var loadLanguages = instance.loadLanguages;
321508
321554
  /***/ ((module) => {
321509
321555
 
321510
321556
  "use strict";
321511
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.3.0-dev.15","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"}}');
321557
+ 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"}}');
321512
321558
 
321513
321559
  /***/ })
321514
321560