@itwin/rpcinterface-full-stack-tests 5.0.0-dev.104 → 5.0.0-dev.105

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.
@@ -104288,6 +104288,7 @@ __webpack_require__.r(__webpack_exports__);
104288
104288
  /* harmony import */ var _tools_Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tools/Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
104289
104289
  /* harmony import */ var _tools_ToolSettings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tools/ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
104290
104290
  /* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
104291
+ /* harmony import */ var _AccuDraw__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AccuDraw */ "../../core/frontend/lib/esm/AccuDraw.js");
104291
104292
  /*---------------------------------------------------------------------------------------------
104292
104293
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
104293
104294
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -104304,6 +104305,7 @@ __webpack_require__.r(__webpack_exports__);
104304
104305
 
104305
104306
 
104306
104307
 
104308
+
104307
104309
  // cspell:ignore dont primitivetools
104308
104310
  /** Virtual cursor for using AccuSnap with touch input.
104309
104311
  * @internal
@@ -104842,6 +104844,61 @@ class AccuSnap {
104842
104844
  intersect.primitive = tpSegment; // Just save single segment that was intersected for line strings/shapes...
104843
104845
  return intersect;
104844
104846
  }
104847
+ static perpendicularPoint(snap) {
104848
+ const accuDraw = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuDraw;
104849
+ if (!accuDraw.isEnabled || accuDraw.isDeactivated)
104850
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Disabled; // AccuDraw is require for this snap mode...
104851
+ if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.HitGeomType.Surface === snap.geomType)
104852
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible; // Only valid for edge and curve hits...
104853
+ const curve = snap.getCurvePrimitive();
104854
+ if (undefined === curve)
104855
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104856
+ const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDraw.getSnapRotation(snap, snap.viewport);
104857
+ if (undefined === rMatrix)
104858
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104859
+ // Compute perpendicular from AccuDraw origin when active or set AccuDraw rotation if accepted...
104860
+ if (!accuDraw.isActive) {
104861
+ const origin = snap.getPoint();
104862
+ accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawFlags.SetRMatrix | _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawFlags.AlwaysSetOrigin, origin, rMatrix);
104863
+ accuDraw.adjustPoint(origin, snap.viewport, false); // Update internals for new snap location...
104864
+ snap.setSnapPoint(origin, _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapHeat.InRange); // Force hot snap...
104865
+ snap.setSnapMode(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint);
104866
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success;
104867
+ }
104868
+ const zVec = rMatrix.rowZ(); // This is a row matrix...
104869
+ const spacePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(accuDraw.origin, snap.getPoint(), zVec, snap.viewport, true);
104870
+ if (undefined === spacePoint)
104871
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104872
+ const detail = curve.closestPoint(spacePoint, true);
104873
+ if (undefined === detail?.curve)
104874
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104875
+ // Close point may not be perpendicular when curve can't be extended (CurveExtendMode.OnTangent isn't supported for all curve types)...
104876
+ if (!curve.isExtensibleFractionSpace) {
104877
+ const curvePlanePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(accuDraw.origin, detail.point, zVec, snap.viewport, true);
104878
+ if (undefined === curvePlanePoint)
104879
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104880
+ const curveNormal = detail.point.vectorTo(curvePlanePoint);
104881
+ const curveTangent = curve.fractionToPointAndUnitTangent(detail.fraction);
104882
+ if (!curveTangent.getDirectionRef().isPerpendicularTo(curveNormal)) {
104883
+ const curveExtensionPoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToLineInView(accuDraw.origin, curveTangent.getOriginRef(), curveTangent.getDirectionRef(), snap.viewport, true);
104884
+ if (undefined === curveExtensionPoint)
104885
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104886
+ detail.point.setFrom(curveExtensionPoint);
104887
+ }
104888
+ }
104889
+ const point = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accuDraw.origin, zVec, snap.viewport, true);
104890
+ if (undefined === point)
104891
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104892
+ const xVec = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
104893
+ if (accuDraw.origin.vectorTo(point).normalizeWithLength(xVec).mag < _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians)
104894
+ xVec.setFrom(rMatrix.rowX()); // Closest point and compass origin coincide...
104895
+ const yVec = xVec.unitCrossProduct(zVec);
104896
+ if (undefined === yVec)
104897
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
104898
+ snap.setSnapPoint(point, _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapHeat.InRange); // Force hot snap...
104899
+ snap.setSnapMode(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint);
104900
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success;
104901
+ }
104845
104902
  /** @internal */
104846
104903
  static async requestSnap(thisHit, snapModes, hotDistanceInches, keypointDivisor, hitList, out) {
104847
104904
  if (thisHit.isModelHit || thisHit.isMapHit || thisHit.isClassifier) {
@@ -104878,6 +104935,14 @@ class AccuSnap {
104878
104935
  return undefined;
104879
104936
  }
104880
104937
  }
104938
+ const doPerpPointSnap = snapModes.includes(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint);
104939
+ if (doPerpPointSnap) {
104940
+ // NOTE: This is not a valid backend snap mode. Instead make the snap request using nearest
104941
+ // snap in order to get the candidate curve to use to compute the snap point...
104942
+ snapModes = snapModes.filter(snapMode => snapMode !== _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint);
104943
+ if (!snapModes.includes(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest))
104944
+ snapModes.push(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest);
104945
+ }
104881
104946
  const requestProps = {
104882
104947
  id: thisHit.sourceId,
104883
104948
  testPoint: thisHit.testPoint,
@@ -104965,6 +105030,11 @@ class AccuSnap {
104965
105030
  displayTransform?.matrix.multiplyVector(snap.normal, snap.normal);
104966
105031
  snap.normal.normalizeInPlace();
104967
105032
  }
105033
+ if (doPerpPointSnap && _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest === result.snapMode) {
105034
+ if (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== this.perpendicularPoint(snap))
105035
+ return undefined;
105036
+ return snap;
105037
+ }
104968
105038
  if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Intersection !== snap.snapMode)
104969
105039
  return snap;
104970
105040
  if (undefined === result.intersectId)
@@ -105165,7 +105235,9 @@ class AccuSnap {
105165
105235
  }
105166
105236
  }
105167
105237
  /** @internal */
105168
- onPreButtonEvent(ev) { return (undefined !== this.touchCursor) ? this.touchCursor.isButtonHandled(ev) : false; }
105238
+ onPreButtonEvent(ev) {
105239
+ return (undefined !== this.touchCursor) ? this.touchCursor.isButtonHandled(ev) : false;
105240
+ }
105169
105241
  /** @internal */
105170
105242
  onTouchStart(ev) {
105171
105243
  if (undefined !== this.touchCursor)
@@ -111612,6 +111684,7 @@ var SnapMode;
111612
111684
  SnapMode[SnapMode["Origin"] = 16] = "Origin";
111613
111685
  SnapMode[SnapMode["Bisector"] = 32] = "Bisector";
111614
111686
  SnapMode[SnapMode["Intersection"] = 64] = "Intersection";
111687
+ SnapMode[SnapMode["PerpendicularPoint"] = 128] = "PerpendicularPoint";
111615
111688
  })(SnapMode || (SnapMode = {}));
111616
111689
  /**
111617
111690
  * @public
@@ -111886,6 +111959,11 @@ class SnapDetail extends HitDetail {
111886
111959
  this.adjustedPoint.setFrom(point);
111887
111960
  this.heat = heat;
111888
111961
  }
111962
+ /** Change the snap mode. */
111963
+ setSnapMode(snapMode) {
111964
+ this.snapMode = snapMode;
111965
+ this.sprite = _Sprites__WEBPACK_IMPORTED_MODULE_4__.IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));
111966
+ }
111889
111967
  /** Set curve primitive and HitGeometryType for this SnapDetail. */
111890
111968
  setCurvePrimitive(primitive, localToWorld, geomType) {
111891
111969
  this.primitive = primitive;
@@ -111977,6 +112055,7 @@ class SnapDetail extends HitDetail {
111977
112055
  case SnapMode.Origin: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapOrigin.png`;
111978
112056
  case SnapMode.Bisector: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapBisector.png`;
111979
112057
  case SnapMode.Intersection: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapIntersection.png`;
112058
+ case SnapMode.PerpendicularPoint: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;
111980
112059
  }
111981
112060
  return "";
111982
112061
  }
@@ -135511,7 +135590,6 @@ __webpack_require__.r(__webpack_exports__);
135511
135590
  /* harmony export */ AccuDrawRotateCycleTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateCycleTool),
135512
135591
  /* harmony export */ AccuDrawRotateElementTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateElementTool),
135513
135592
  /* harmony export */ AccuDrawRotateFrontTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateFrontTool),
135514
- /* harmony export */ AccuDrawRotatePerpendicularTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotatePerpendicularTool),
135515
135593
  /* harmony export */ AccuDrawRotateSideTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateSideTool),
135516
135594
  /* harmony export */ AccuDrawRotateTopTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateTopTool),
135517
135595
  /* harmony export */ AccuDrawRotateViewTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateViewTool),
@@ -194815,7 +194893,6 @@ __webpack_require__.r(__webpack_exports__);
194815
194893
  /* harmony export */ AccuDrawRotateCycleTool: () => (/* binding */ AccuDrawRotateCycleTool),
194816
194894
  /* harmony export */ AccuDrawRotateElementTool: () => (/* binding */ AccuDrawRotateElementTool),
194817
194895
  /* harmony export */ AccuDrawRotateFrontTool: () => (/* binding */ AccuDrawRotateFrontTool),
194818
- /* harmony export */ AccuDrawRotatePerpendicularTool: () => (/* binding */ AccuDrawRotatePerpendicularTool),
194819
194896
  /* harmony export */ AccuDrawRotateSideTool: () => (/* binding */ AccuDrawRotateSideTool),
194820
194897
  /* harmony export */ AccuDrawRotateTopTool: () => (/* binding */ AccuDrawRotateTopTool),
194821
194898
  /* harmony export */ AccuDrawRotateViewTool: () => (/* binding */ AccuDrawRotateViewTool),
@@ -194838,9 +194915,8 @@ __webpack_require__.r(__webpack_exports__);
194838
194915
  /* harmony import */ var _AccuDraw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AccuDraw */ "../../core/frontend/lib/esm/AccuDraw.js");
194839
194916
  /* harmony import */ var _AccuSnap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../AccuSnap */ "../../core/frontend/lib/esm/AccuSnap.js");
194840
194917
  /* harmony import */ var _AuxCoordSys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AuxCoordSys */ "../../core/frontend/lib/esm/AuxCoordSys.js");
194841
- /* harmony import */ var _HitDetail__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../HitDetail */ "../../core/frontend/lib/esm/HitDetail.js");
194842
- /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
194843
- /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
194918
+ /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
194919
+ /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
194844
194920
  /*---------------------------------------------------------------------------------------------
194845
194921
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
194846
194922
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -194855,7 +194931,6 @@ __webpack_require__.r(__webpack_exports__);
194855
194931
 
194856
194932
 
194857
194933
 
194858
-
194859
194934
  // cSpell:ignore dont unlockedz
194860
194935
  function normalizedDifference(point1, point2, out) {
194861
194936
  return point2.vectorTo(point1).normalizeWithLength(out).mag;
@@ -194871,7 +194946,7 @@ function normalizedCrossProduct(vec1, vec2, out) {
194871
194946
  class AccuDrawShortcuts {
194872
194947
  /** Disable/Enable AccuDraw for the session */
194873
194948
  static sessionToggle() {
194874
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
194949
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194875
194950
  if (accudraw.isEnabled)
194876
194951
  accudraw.disableForSession();
194877
194952
  else
@@ -194879,7 +194954,7 @@ class AccuDrawShortcuts {
194879
194954
  }
194880
194955
  /** Suspend/Unsuspend AccuDraw for the active tool */
194881
194956
  static suspendToggle() {
194882
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
194957
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194883
194958
  if (!accudraw.isEnabled)
194884
194959
  return;
194885
194960
  if (accudraw.isActive)
@@ -194889,7 +194964,7 @@ class AccuDrawShortcuts {
194889
194964
  accudraw.refreshDecorationsAndDynamics();
194890
194965
  }
194891
194966
  static rotateAxesByPoint(isSnapped, aboutCurrentZ) {
194892
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
194967
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194893
194968
  if (!accudraw.isEnabled)
194894
194969
  return false;
194895
194970
  const vp = accudraw.currentView;
@@ -194917,7 +194992,7 @@ class AccuDrawShortcuts {
194917
194992
  return true;
194918
194993
  }
194919
194994
  static updateACSByPoints(acs, vp, points, isDynamics) {
194920
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
194995
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194921
194996
  if (!accudraw.isEnabled)
194922
194997
  return false;
194923
194998
  let accept = false;
@@ -194973,9 +195048,9 @@ class AccuDrawShortcuts {
194973
195048
  }
194974
195049
  return accept;
194975
195050
  }
194976
- static processPendingHints() { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.processHints(); }
195051
+ static processPendingHints() { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.processHints(); }
194977
195052
  static requestInputFocus() {
194978
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195053
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194979
195054
  if (!accudraw.isEnabled)
194980
195055
  return;
194981
195056
  accudraw.grabInputFocus();
@@ -194983,7 +195058,7 @@ class AccuDrawShortcuts {
194983
195058
  }
194984
195059
  // Helper method for GUI implementation...
194985
195060
  static async itemFieldNavigate(index, str, forward) {
194986
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195061
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
194987
195062
  if (!accudraw.isEnabled)
194988
195063
  return;
194989
195064
  if (accudraw.getFieldLock(index))
@@ -195019,10 +195094,10 @@ class AccuDrawShortcuts {
195019
195094
  accudraw.setFocusItem(index);
195020
195095
  accudraw.dontMoveFocus = true;
195021
195096
  }
195022
- static itemFieldNewInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Partial); }
195023
- static itemFieldCompletedInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic); }
195097
+ static itemFieldNewInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Partial); }
195098
+ static itemFieldCompletedInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic); }
195024
195099
  static async itemFieldAcceptInput(index, str) {
195025
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195100
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195026
195101
  await accudraw.processFieldInput(index, str, true);
195027
195102
  accudraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic);
195028
195103
  if (accudraw.getFieldLock(index))
@@ -195060,7 +195135,7 @@ class AccuDrawShortcuts {
195060
195135
  accudraw.setFocusItem(index);
195061
195136
  }
195062
195137
  static itemFieldLockToggle(index) {
195063
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195138
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195064
195139
  if (!accudraw.isEnabled)
195065
195140
  return;
195066
195141
  if (accudraw.getFieldLock(index)) {
@@ -195105,21 +195180,21 @@ class AccuDrawShortcuts {
195105
195180
  accudraw.clearTentative();
195106
195181
  }
195107
195182
  static choosePreviousValue(index) {
195108
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195183
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195109
195184
  accudraw.getSavedValue(index, false);
195110
195185
  accudraw.refreshDecorationsAndDynamics();
195111
195186
  }
195112
195187
  static chooseNextValue(index) {
195113
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195188
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195114
195189
  accudraw.getSavedValue(index, true);
195115
195190
  accudraw.refreshDecorationsAndDynamics();
195116
195191
  }
195117
195192
  static clearSavedValues() {
195118
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195193
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195119
195194
  accudraw.clearSavedValues();
195120
195195
  }
195121
195196
  static itemRotationModeChange(rotation) {
195122
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195197
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195123
195198
  const vp = accudraw.currentView;
195124
195199
  const is3d = vp ? vp.view.is3d() : true;
195125
195200
  if (!is3d && (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Front === rotation || _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Side === rotation))
@@ -195129,7 +195204,7 @@ class AccuDrawShortcuts {
195129
195204
  }
195130
195205
  // Shortcut implementations for GUI entry points...
195131
195206
  static setOrigin(explicitOrigin) {
195132
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195207
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195133
195208
  if (!accudraw.isEnabled)
195134
195209
  return;
195135
195210
  if (explicitOrigin) {
@@ -195144,8 +195219,8 @@ class AccuDrawShortcuts {
195144
195219
  accudraw.flags.haveValidOrigin = true;
195145
195220
  }
195146
195221
  else {
195147
- const ev = new _Tool__WEBPACK_IMPORTED_MODULE_7__.BeButtonEvent();
195148
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.fillEventFromLastDataButton(ev);
195222
+ const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
195223
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.fillEventFromLastDataButton(ev);
195149
195224
  if (ev.viewport) {
195150
195225
  accudraw.published.origin.setFrom(ev.point);
195151
195226
  accudraw.flags.haveValidOrigin = true;
@@ -195174,7 +195249,7 @@ class AccuDrawShortcuts {
195174
195249
  accudraw.refreshDecorationsAndDynamics(); // NOTE: Will already grab input focus through processHints...
195175
195250
  }
195176
195251
  static changeCompassMode() {
195177
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195252
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195178
195253
  if (!accudraw.isEnabled)
195179
195254
  return;
195180
195255
  let axisLockStatus = accudraw.locked & _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.LockedStates.XY_BM;
@@ -195204,10 +195279,10 @@ class AccuDrawShortcuts {
195204
195279
  this.requestInputFocus();
195205
195280
  }
195206
195281
  static lockSmart() {
195207
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195282
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195208
195283
  if (!accudraw.isEnabled)
195209
195284
  return;
195210
- const accuSnap = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap;
195285
+ const accuSnap = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap;
195211
195286
  // Don't want AccuSnap to influence axis or Z...
195212
195287
  if (accuSnap.isHot) {
195213
195288
  accuSnap.clear();
@@ -195289,7 +195364,7 @@ class AccuDrawShortcuts {
195289
195364
  }
195290
195365
  /** Disable indexing when not currently indexed; if indexed, enable respective lock. */
195291
195366
  static lockIndex() {
195292
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195367
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195293
195368
  if (!accudraw.isEnabled)
195294
195369
  return;
195295
195370
  if (accudraw.flags.indexLocked) {
@@ -195329,7 +195404,7 @@ class AccuDrawShortcuts {
195329
195404
  this.requestInputFocus();
195330
195405
  }
195331
195406
  static lockX() {
195332
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195407
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195333
195408
  if (!accudraw.isEnabled)
195334
195409
  return;
195335
195410
  accudraw.clearTentative();
@@ -195353,7 +195428,7 @@ class AccuDrawShortcuts {
195353
195428
  this.requestInputFocus();
195354
195429
  }
195355
195430
  static lockY() {
195356
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195431
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195357
195432
  if (!accudraw.isEnabled)
195358
195433
  return;
195359
195434
  accudraw.clearTentative();
@@ -195377,7 +195452,7 @@ class AccuDrawShortcuts {
195377
195452
  this.requestInputFocus();
195378
195453
  }
195379
195454
  static lockZ() {
195380
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195455
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195381
195456
  if (!accudraw.isEnabled)
195382
195457
  return;
195383
195458
  const vp = accudraw.currentView;
@@ -195399,7 +195474,7 @@ class AccuDrawShortcuts {
195399
195474
  this.requestInputFocus();
195400
195475
  }
195401
195476
  static lockDistance() {
195402
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195477
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195403
195478
  if (!accudraw.isEnabled)
195404
195479
  return;
195405
195480
  const isSnapped = accudraw.clearTentative();
@@ -195425,14 +195500,14 @@ class AccuDrawShortcuts {
195425
195500
  this.requestInputFocus();
195426
195501
  }
195427
195502
  static lockAngle() {
195428
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195503
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195429
195504
  if (!accudraw.isEnabled)
195430
195505
  return;
195431
195506
  accudraw.doLockAngle(accudraw.clearTentative());
195432
195507
  this.requestInputFocus();
195433
195508
  }
195434
195509
  static setStandardRotation(rotation) {
195435
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195510
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195436
195511
  if (!accudraw.isEnabled)
195437
195512
  return;
195438
195513
  if (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context === rotation) {
@@ -195450,7 +195525,7 @@ class AccuDrawShortcuts {
195450
195525
  this.requestInputFocus();
195451
195526
  }
195452
195527
  static alignView() {
195453
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195528
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195454
195529
  if (!accudraw.isEnabled)
195455
195530
  return;
195456
195531
  const vp = accudraw.currentView;
@@ -195468,9 +195543,9 @@ class AccuDrawShortcuts {
195468
195543
  vp.animateFrustumChange();
195469
195544
  this.requestInputFocus();
195470
195545
  }
195471
- static rotateToBase() { this.setStandardRotation(_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.flags.baseRotation); }
195546
+ static rotateToBase() { this.setStandardRotation(_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.flags.baseRotation); }
195472
195547
  static rotateToACS() {
195473
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195548
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195474
195549
  if (!accudraw.isEnabled)
195475
195550
  return;
195476
195551
  // NOTE: Match current ACS orientation..reset auxRotationPlane to top!
@@ -195478,7 +195553,7 @@ class AccuDrawShortcuts {
195478
195553
  this.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.ACS);
195479
195554
  }
195480
195555
  static rotateCycle() {
195481
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195556
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195482
195557
  if (!accudraw.isEnabled)
195483
195558
  return;
195484
195559
  const vp = accudraw.currentView;
@@ -195541,7 +195616,7 @@ class AccuDrawShortcuts {
195541
195616
  this.setStandardRotation(rotation);
195542
195617
  }
195543
195618
  static rotate90(axis) {
195544
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195619
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195545
195620
  if (!accudraw.isEnabled)
195546
195621
  return;
195547
195622
  const newRotation = new _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ThreeAxes();
@@ -195568,22 +195643,19 @@ class AccuDrawShortcuts {
195568
195643
  this.requestInputFocus();
195569
195644
  }
195570
195645
  static async rotateAxes(aboutCurrentZ) {
195571
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotateAxes", aboutCurrentZ);
195646
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.RotateAxes", aboutCurrentZ);
195572
195647
  }
195573
195648
  static async rotateToElement() {
195574
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotateElement");
195575
- }
195576
- static async rotatePerpendicular() {
195577
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotatePerpendicular");
195649
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.RotateElement");
195578
195650
  }
195579
195651
  static async defineACSByElement() {
195580
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.DefineACSByElement");
195652
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.DefineACSByElement");
195581
195653
  }
195582
195654
  static async defineACSByPoints() {
195583
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.DefineACSByPoints");
195655
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.DefineACSByPoints");
195584
195656
  }
195585
195657
  static getACS(acsName, useOrigin, useRotation) {
195586
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195658
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195587
195659
  if (!accudraw.isEnabled)
195588
195660
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
195589
195661
  const vp = accudraw.currentView;
@@ -195642,7 +195714,7 @@ class AccuDrawShortcuts {
195642
195714
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS;
195643
195715
  }
195644
195716
  static writeACS(_acsName) {
195645
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195717
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195646
195718
  if (!accudraw.isEnabled)
195647
195719
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
195648
195720
  const vp = accudraw.currentView;
@@ -195668,13 +195740,13 @@ class AccuDrawShortcuts {
195668
195740
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS;
195669
195741
  }
195670
195742
  static itemFieldUnlockAll() {
195671
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195743
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195672
195744
  if (accudraw.isEnabled)
195673
195745
  accudraw.unlockAllFields();
195674
195746
  }
195675
195747
  }
195676
195748
  /** @beta */
195677
- class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195749
+ class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195678
195750
  static toolId = "AccuDraw.SessionToggle";
195679
195751
  async run() {
195680
195752
  AccuDrawShortcuts.sessionToggle();
@@ -195682,7 +195754,7 @@ class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
195682
195754
  }
195683
195755
  }
195684
195756
  /** @beta */
195685
- class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195757
+ class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195686
195758
  static toolId = "AccuDraw.SuspendToggle";
195687
195759
  async run() {
195688
195760
  AccuDrawShortcuts.suspendToggle();
@@ -195690,7 +195762,7 @@ class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
195690
195762
  }
195691
195763
  }
195692
195764
  /** @beta */
195693
- class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195765
+ class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195694
195766
  static toolId = "AccuDraw.SetOrigin";
195695
195767
  async run() {
195696
195768
  AccuDrawShortcuts.setOrigin();
@@ -195698,7 +195770,7 @@ class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195698
195770
  }
195699
195771
  }
195700
195772
  /** @beta */
195701
- class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195773
+ class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195702
195774
  static toolId = "AccuDraw.LockSmart";
195703
195775
  async run() {
195704
195776
  AccuDrawShortcuts.lockSmart();
@@ -195706,7 +195778,7 @@ class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195706
195778
  }
195707
195779
  }
195708
195780
  /** @beta */
195709
- class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195781
+ class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195710
195782
  static toolId = "AccuDraw.LockIndex";
195711
195783
  async run() {
195712
195784
  AccuDrawShortcuts.lockIndex();
@@ -195714,7 +195786,7 @@ class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195714
195786
  }
195715
195787
  }
195716
195788
  /** @beta */
195717
- class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195789
+ class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195718
195790
  static toolId = "AccuDraw.LockX";
195719
195791
  async run() {
195720
195792
  AccuDrawShortcuts.lockX();
@@ -195722,7 +195794,7 @@ class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195722
195794
  }
195723
195795
  }
195724
195796
  /** @beta */
195725
- class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195797
+ class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195726
195798
  static toolId = "AccuDraw.LockY";
195727
195799
  async run() {
195728
195800
  AccuDrawShortcuts.lockY();
@@ -195730,7 +195802,7 @@ class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195730
195802
  }
195731
195803
  }
195732
195804
  /** @beta */
195733
- class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195805
+ class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195734
195806
  static toolId = "AccuDraw.LockZ";
195735
195807
  async run() {
195736
195808
  AccuDrawShortcuts.lockZ();
@@ -195738,7 +195810,7 @@ class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195738
195810
  }
195739
195811
  }
195740
195812
  /** @beta */
195741
- class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195813
+ class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195742
195814
  static toolId = "AccuDraw.LockDistance";
195743
195815
  async run() {
195744
195816
  AccuDrawShortcuts.lockDistance();
@@ -195746,7 +195818,7 @@ class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Too
195746
195818
  }
195747
195819
  }
195748
195820
  /** @beta */
195749
- class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195821
+ class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195750
195822
  static toolId = "AccuDraw.LockAngle";
195751
195823
  async run() {
195752
195824
  AccuDrawShortcuts.lockAngle();
@@ -195754,7 +195826,7 @@ class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195754
195826
  }
195755
195827
  }
195756
195828
  /** @beta */
195757
- class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195829
+ class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195758
195830
  static toolId = "AccuDraw.ChangeMode";
195759
195831
  async run() {
195760
195832
  AccuDrawShortcuts.changeCompassMode();
@@ -195762,7 +195834,7 @@ class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195762
195834
  }
195763
195835
  }
195764
195836
  /** @beta */
195765
- class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195837
+ class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195766
195838
  static toolId = "AccuDraw.RotateCycle";
195767
195839
  async run() {
195768
195840
  AccuDrawShortcuts.rotateCycle();
@@ -195770,7 +195842,7 @@ class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195770
195842
  }
195771
195843
  }
195772
195844
  /** @beta */
195773
- class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195845
+ class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195774
195846
  static toolId = "AccuDraw.RotateTop";
195775
195847
  async run() {
195776
195848
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Top);
@@ -195778,7 +195850,7 @@ class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195778
195850
  }
195779
195851
  }
195780
195852
  /** @beta */
195781
- class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195853
+ class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195782
195854
  static toolId = "AccuDraw.RotateFront";
195783
195855
  async run() {
195784
195856
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Front);
@@ -195786,7 +195858,7 @@ class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195786
195858
  }
195787
195859
  }
195788
195860
  /** @beta */
195789
- class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195861
+ class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195790
195862
  static toolId = "AccuDraw.RotateSide";
195791
195863
  async run() {
195792
195864
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Side);
@@ -195794,7 +195866,7 @@ class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195794
195866
  }
195795
195867
  }
195796
195868
  /** @beta */
195797
- class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195869
+ class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195798
195870
  static toolId = "AccuDraw.RotateView";
195799
195871
  async run() {
195800
195872
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.View);
@@ -195802,7 +195874,7 @@ class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195802
195874
  }
195803
195875
  }
195804
195876
  /** @beta */
195805
- class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195877
+ class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195806
195878
  static toolId = "AccuDraw.Rotate90AboutX";
195807
195879
  async run() {
195808
195880
  AccuDrawShortcuts.rotate90(0);
@@ -195810,7 +195882,7 @@ class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
195810
195882
  }
195811
195883
  }
195812
195884
  /** @beta */
195813
- class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195885
+ class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195814
195886
  static toolId = "AccuDraw.Rotate90AboutY";
195815
195887
  async run() {
195816
195888
  AccuDrawShortcuts.rotate90(1);
@@ -195818,7 +195890,7 @@ class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
195818
195890
  }
195819
195891
  }
195820
195892
  /** @beta */
195821
- class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
195893
+ class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
195822
195894
  static toolId = "AccuDraw.Rotate90AboutZ";
195823
195895
  async run() {
195824
195896
  AccuDrawShortcuts.rotate90(2);
@@ -195826,13 +195898,13 @@ class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
195826
195898
  }
195827
195899
  }
195828
195900
  /** @internal */
195829
- class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputCollector {
195901
+ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.InputCollector {
195830
195902
  _complete = false;
195831
- get allowShortcut() { return this.wantActivateOnStart ? _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isEnabled : true; }
195903
+ get allowShortcut() { return this.wantActivateOnStart ? _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.isEnabled : true; }
195832
195904
  get wantActivateOnStart() { return false; } // Whether to automatically enable AccuDraw before the 1st data button...
195833
195905
  get wantClearSnapOnStart() { return false; } // Whether to preserve active Tentative/AccuSnap on install...
195834
195906
  get wantManipulationImmediate() { return false; } // Whether additional input is required to process on install...
195835
- get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down (see rotate perpendicular)...
195907
+ get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down...
195836
195908
  async onInstall() {
195837
195909
  if (!this.allowShortcut)
195838
195910
  return false;
@@ -195841,7 +195913,7 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
195841
195913
  async onPostInstall() {
195842
195914
  await super.onPostInstall();
195843
195915
  if (this.wantActivateOnStart)
195844
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.activate();
195916
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.activate();
195845
195917
  this.onManipulationStart();
195846
195918
  if (this.wantManipulationImmediate && this.doManipulation(undefined, false)) {
195847
195919
  this._complete = true;
@@ -195849,18 +195921,18 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
195849
195921
  }
195850
195922
  // NOTE: InputCollector inherits suspended primitive's state, set everything...
195851
195923
  if (this.wantClearSnapOnStart) {
195852
- this.initLocateElements(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_7__.CoordinateLockOverrides.None); // This clears the active Tentative/AccuSnap, some shortcuts have special behavior when invoked with an active snap...
195924
+ this.initLocateElements(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.None); // This clears the active Tentative/AccuSnap, some shortcuts have special behavior when invoked with an active snap...
195853
195925
  }
195854
195926
  else {
195855
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.locateManager.initLocateOptions();
195856
- this.changeLocateState(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_7__.CoordinateLockOverrides.None);
195927
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.initLocateOptions();
195928
+ this.changeLocateState(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.None);
195857
195929
  }
195858
195930
  this.doManipulation(undefined, true);
195859
195931
  ;
195860
195932
  }
195861
195933
  async onCleanup() {
195862
195934
  if (this._complete)
195863
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
195935
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
195864
195936
  }
195865
195937
  async exitTool() {
195866
195938
  await super.exitTool();
@@ -195872,12 +195944,12 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
195872
195944
  if (!this.wantExitOnDataButtonUp)
195873
195945
  await this.exitTool();
195874
195946
  }
195875
- return _Tool__WEBPACK_IMPORTED_MODULE_7__.EventHandled.No;
195947
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
195876
195948
  }
195877
195949
  async onDataButtonUp(_ev) {
195878
195950
  if (this._complete && this.wantExitOnDataButtonUp)
195879
195951
  await this.exitTool();
195880
- return _Tool__WEBPACK_IMPORTED_MODULE_7__.EventHandled.No;
195952
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
195881
195953
  }
195882
195954
  async onMouseMotion(ev) {
195883
195955
  this.doManipulation(ev, true);
@@ -195895,14 +195967,14 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
195895
195967
  this.aboutCurrentZ = aboutCurrentZ;
195896
195968
  }
195897
195969
  /** @internal */
195898
- get allowShortcut() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isActive; } // Require compass to already be active for this shortcut...
195970
+ get allowShortcut() { return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.isActive; } // Require compass to already be active for this shortcut...
195899
195971
  /** @internal */
195900
195972
  get wantActivateOnStart() { return true; } // State is demoted to inactive when a tool install, still need this...
195901
195973
  /** @internal */
195902
195974
  get wantManipulationImmediate() {
195903
195975
  if (_AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.isHot)
195904
195976
  return true;
195905
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
195977
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195906
195978
  if (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.CompassMode.Polar === accudraw.compassMode)
195907
195979
  return accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.ANGLE_Item);
195908
195980
  return accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.X_Item) && accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.Y_Item);
@@ -195910,12 +195982,12 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
195910
195982
  /** @internal */
195911
195983
  onManipulationStart() {
195912
195984
  if (this.aboutCurrentZ)
195913
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Establish current orientation as base for when defining compass rotation by x axis...
195914
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.RotateAxes.Prompts.FirstPoint");
195985
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Establish current orientation as base for when defining compass rotation by x axis...
195986
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.RotateAxes.Prompts.FirstPoint");
195915
195987
  }
195916
195988
  /** @internal */
195917
195989
  doManipulation(ev, isMotion) {
195918
- const vp = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.currentView;
195990
+ const vp = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.currentView;
195919
195991
  if (!vp)
195920
195992
  return false;
195921
195993
  if (!AccuDrawShortcuts.rotateAxesByPoint(_AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.isHot, this.aboutCurrentZ))
@@ -195923,7 +195995,7 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
195923
195995
  vp.invalidateDecorations();
195924
195996
  if (!isMotion) {
195925
195997
  AccuDrawShortcuts.itemFieldUnlockAll();
195926
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.clear(true);
195998
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.clear(true);
195927
195999
  }
195928
196000
  return true;
195929
196001
  }
@@ -195938,15 +196010,15 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
195938
196010
  /** @beta */
195939
196011
  class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
195940
196012
  static toolId = "AccuDraw.RotateElement";
195941
- _moveOrigin = !_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isActive || _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isActive; // Preserve current origin if AccuDraw already active and not tentative snap...
196013
+ _moveOrigin = !_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.isActive || _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.isActive; // Preserve current origin if AccuDraw already active and not tentative snap...
195942
196014
  /** @internal */
195943
196015
  get wantActivateOnStart() { return true; }
195944
196016
  /** @internal */
195945
- get wantManipulationImmediate() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isSnapped; }
196017
+ get wantManipulationImmediate() { return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.isSnapped; }
195946
196018
  /** @internal */
195947
196019
  onManipulationStart() {
195948
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin); // Don't move compass when updateOrientation returns false...
195949
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
196020
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin); // Don't move compass when updateOrientation returns false...
196021
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
195950
196022
  }
195951
196023
  /** @internal */
195952
196024
  onManipulationComplete() {
@@ -195957,7 +196029,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
195957
196029
  }
195958
196030
  /** @internal */
195959
196031
  updateOrientation(snap, viewport, _isMotion) {
195960
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
196032
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
195961
196033
  const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, viewport);
195962
196034
  if (undefined === rMatrix)
195963
196035
  return false;
@@ -195967,7 +196039,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
195967
196039
  }
195968
196040
  /** @internal */
195969
196041
  doManipulation(ev, isMotion) {
195970
- const viewport = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.currentView;
196042
+ const viewport = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.currentView;
195971
196043
  if (!viewport)
195972
196044
  return false;
195973
196045
  const snap = _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.getCurrentSnap(false);
@@ -195976,60 +196048,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
195976
196048
  if (undefined === ev)
195977
196049
  AccuDrawShortcuts.processPendingHints(); // Would normally be processed after button down, necessary when called from post install...
195978
196050
  if (!isMotion)
195979
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Hold temporary rotation for tool duration...
195980
- return true;
195981
- }
195982
- }
195983
- /** @beta */
195984
- class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
195985
- static toolId = "AccuDraw.RotatePerpendicular";
195986
- _location;
195987
- /** @internal */
195988
- get wantExitOnDataButtonUp() { return true; } // Complete on button up since button down clears tentative...
195989
- /** @internal */
195990
- onManipulationComplete() {
195991
- if (undefined !== this._location) {
195992
- // Use tentative to hold adjusted snap location for suspended tool...
195993
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.setPoint(this._location.point);
195994
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.viewport = this._location.viewport;
195995
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.showTentative();
195996
- }
195997
- return _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetRMatrix | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.Disable;
195998
- }
195999
- /** @internal */
196000
- updateOrientation(snap, viewport, isMotion) {
196001
- const curve = snap.getCurvePrimitive();
196002
- if (undefined === curve)
196003
- return false;
196004
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
196005
- const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, viewport);
196006
- if (undefined === rMatrix)
196007
- return false;
196008
- const zVec = rMatrix.getRow(2); // This is a row matrix...
196009
- const spacePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawHintBuilder.projectPointToPlaneInView(accudraw.origin, snap.getPoint(), zVec, viewport, true);
196010
- if (undefined === spacePoint)
196011
- return false;
196012
- const detail = curve.closestPoint(spacePoint, true);
196013
- if (undefined === detail?.curve)
196014
- return false;
196015
- const point = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accudraw.origin, zVec, viewport, true);
196016
- if (undefined === point)
196017
- return false;
196018
- const xVec = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
196019
- if (normalizedDifference(point, accudraw.origin, xVec) < _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians)
196020
- return false;
196021
- ; // Closest point and compass origin coincide...
196022
- const yVec = xVec.unitCrossProduct(zVec);
196023
- if (undefined === yVec)
196024
- return false;
196025
- rMatrix.setColumns(xVec, yVec, zVec);
196026
- _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRigidFromMatrix3d(rMatrix, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.AxisOrder.XZY, rMatrix);
196027
- rMatrix.transposeInPlace();
196028
- snap.setSnapPoint(point, _HitDetail__WEBPACK_IMPORTED_MODULE_5__.SnapHeat.InRange); // Force hot snap so that adjust point uses it for alignments...
196029
- accudraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetRMatrix | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.AlwaysSetOrigin, accudraw.origin, rMatrix);
196030
- accudraw.adjustPoint(point, viewport, false); // Update internals for new snap location...
196031
- if (!isMotion)
196032
- this._location = { point, viewport };
196051
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Hold temporary rotation for tool duration...
196033
196052
  return true;
196034
196053
  }
196035
196054
  }
@@ -196040,7 +196059,7 @@ class DefineACSByElementTool extends AccuDrawShortcutsTool {
196040
196059
  _rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createIdentity();
196041
196060
  _acs;
196042
196061
  /** @internal */
196043
- onManipulationStart() { _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint"); }
196062
+ onManipulationStart() { _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint"); }
196044
196063
  /** @internal */
196045
196064
  updateOrientation(snap, vp) {
196046
196065
  const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, vp);
@@ -196058,7 +196077,7 @@ class DefineACSByElementTool extends AccuDrawShortcutsTool {
196058
196077
  const snapDetail = _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.getCurrentSnap(false);
196059
196078
  if (undefined === snapDetail || !this.updateOrientation(snapDetail, vp))
196060
196079
  return false;
196061
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.viewManager.invalidateDecorationsAllViews();
196080
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.invalidateDecorationsAllViews();
196062
196081
  if (isMotion)
196063
196082
  return true;
196064
196083
  if (!this._acs)
@@ -196086,24 +196105,24 @@ class DefineACSByPointsTool extends AccuDrawShortcutsTool {
196086
196105
  _acs;
196087
196106
  /** @internal */
196088
196107
  onManipulationStart() {
196089
- if (!_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isActive) {
196090
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.FirstPoint");
196108
+ if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.isActive) {
196109
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.FirstPoint");
196091
196110
  return;
196092
196111
  }
196093
- const origin = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.getPoint().clone();
196094
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.SecondPoint");
196095
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetOrigin | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin, origin);
196112
+ const origin = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.getPoint().clone();
196113
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.SecondPoint");
196114
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetOrigin | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin, origin);
196096
196115
  this._points.push(origin);
196097
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.clear(true);
196116
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.clear(true);
196098
196117
  }
196099
196118
  /** @internal */
196100
196119
  doManipulation(ev, isMotion) {
196101
196120
  if (!ev || !ev.viewport)
196102
196121
  return false;
196103
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.viewManager.invalidateDecorationsAllViews();
196122
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.invalidateDecorationsAllViews();
196104
196123
  if (isMotion)
196105
196124
  return false;
196106
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.activate();
196125
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.activate();
196107
196126
  this._points.push(ev.point.clone());
196108
196127
  const vp = ev.viewport;
196109
196128
  if (!this._acs)
@@ -196113,15 +196132,15 @@ class DefineACSByPointsTool extends AccuDrawShortcutsTool {
196113
196132
  AccuDrawShortcuts.rotateToACS();
196114
196133
  return true;
196115
196134
  }
196116
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey(`AccuDraw.DefineACSByPoints.Prompts${1 === this._points.length ? ".SecondPoint" : ".NextPoint"}`);
196135
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey(`AccuDraw.DefineACSByPoints.Prompts${1 === this._points.length ? ".SecondPoint" : ".NextPoint"}`);
196117
196136
  return false;
196118
196137
  }
196119
196138
  /** @internal */
196120
196139
  decorate(context) {
196121
196140
  const tmpPoints = [];
196122
196141
  this._points.forEach((pt) => tmpPoints.push(pt));
196123
- const ev = new _Tool__WEBPACK_IMPORTED_MODULE_7__.BeButtonEvent();
196124
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
196142
+ const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
196143
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
196125
196144
  tmpPoints.push(ev.point);
196126
196145
  const vp = context.viewport;
196127
196146
  if (!this._acs)
@@ -209917,6 +209936,20 @@ class Geometry {
209917
209936
  static isAlmostEqualEitherNumber(a, b, c, tolerance = Geometry.smallAngleRadians) {
209918
209937
  return this.isAlmostEqualNumber(a, b, tolerance) || this.isAlmostEqualNumber(a, c, tolerance);
209919
209938
  }
209939
+ /**
209940
+ * Toleranced test for equality to any of `count` numbers supplied by `iterator`.
209941
+ * @param a value to test
209942
+ * @param values array of values to test against, or an object that provides the i_th value, where 0 <= i < length.
209943
+ * @param tolerance relative tolerance. Default value is [[smallAngleRadians]].
209944
+ * @returns true if and only if `a` is almost equal to at least one value supplied by `iterator`.
209945
+ */
209946
+ static isAlmostEqualAnyNumber(a, values, tolerance = Geometry.smallAngleRadians) {
209947
+ const value = Array.isArray(values) ? (i) => values[i] : values.iter;
209948
+ for (let i = 0; i < values.length; i++)
209949
+ if (this.isAlmostEqualNumber(a, value(i), tolerance))
209950
+ return true;
209951
+ return false;
209952
+ }
209920
209953
  /**
209921
209954
  * Toleranced equality test using tolerance `tolerance * ( 1 + abs(a.x) + abs(a.y) + abs(b.x) + abs(b.y) )`.
209922
209955
  * * [[smallAngleRadians]] is used if tolerance is `undefined`.
@@ -223227,6 +223260,42 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
223227
223260
  }
223228
223261
  return result;
223229
223262
  }
223263
+ /** Override of [[CurvePrimitive.emitTangents]] for Arc3d. */
223264
+ emitTangents(spacePoint, announceTangent, options) {
223265
+ const centerToPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(this.centerRef, spacePoint);
223266
+ let centerToLocalPoint;
223267
+ if (options?.vectorToEye) {
223268
+ const arcToView = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createColumns(this.matrixRef.getColumn(0), this.matrixRef.getColumn(1), options.vectorToEye);
223269
+ centerToLocalPoint = arcToView.multiplyInverse(centerToPoint);
223270
+ }
223271
+ else {
223272
+ centerToLocalPoint = this.matrixRef.multiplyInverse(centerToPoint);
223273
+ }
223274
+ if (centerToLocalPoint === undefined)
223275
+ return;
223276
+ // centerToLocalPoint is a vector in the local coordinate system of the as-viewed arc.
223277
+ // In other words, the local arc is the unit circle.
223278
+ // alpha is the angle from the local x-axis to centerToLocalPoint.
223279
+ // beta is the nonnegative angle from centerToLocalPoint to a tangency radial.
223280
+ // Tangency angles are preserved by local <-> world transformation.
223281
+ if (centerToLocalPoint !== undefined) {
223282
+ const hypotenuseSquared = centerToLocalPoint.magnitudeSquaredXY();
223283
+ if (hypotenuseSquared >= 1.0) { // localPoint lies outside or on the unit circle...
223284
+ // ...and forms a right triangle with unit radial leg to tangent point
223285
+ const distanceToTangency = Math.sqrt(hypotenuseSquared - 1.0);
223286
+ const alpha = Math.atan2(centerToLocalPoint.y, centerToLocalPoint.x);
223287
+ const beta = Math.atan2(distanceToTangency, 1);
223288
+ const angles = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallAngleRadians(beta) ? [alpha] : [alpha + beta, alpha - beta];
223289
+ for (const theta of angles) {
223290
+ const f = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveRadiansToValidSweepFraction(options?.extend ?? false, theta, this.sweep);
223291
+ if (f.isValid) {
223292
+ const tangent = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPoint(this, f.fraction, this.fractionToPoint(f.fraction));
223293
+ announceTangent(tangent);
223294
+ }
223295
+ }
223296
+ }
223297
+ }
223298
+ }
223230
223299
  /** Reverse the sweep of the arc. */
223231
223300
  reverseInPlace() {
223232
223301
  this._sweep.reverseInPlace();
@@ -225541,38 +225610,42 @@ class CurveExtendOptions {
225541
225610
  return fraction;
225542
225611
  }
225543
225612
  /**
225544
- * Adjust a radians value to an angle sweep, allowing the extendParam to affect choice among periodic fractions.
225545
- * * If radians is within the sweep, convert it to a fraction of the sweep.
225546
- * * If radians is outside, use the extendParam to choose among:
225547
- * * fraction below 0.
225548
- * * fraction above 1.
225613
+ * Adjust a radians value to an angle sweep, extending beyond or clamping to [0,1] according to `extendParam`:
225614
+ * * If `radians` is within the sweep, convert it to a fraction of the sweep.
225615
+ * * If `radians` is outside the sweep and `extendParam` does not allow extension at both ends, adjust the fraction:
225616
+ * * fraction below 0 if `extendParam` allows extension only at start
225617
+ * * fraction above 1 if `extendParam` allows extension only at end
225618
+ * * fraction clamped to [0,1] if `extendParam` disallows extension at both ends
225619
+ * @returns adjusted fraction of sweep, and a boolean indicating whether it is valid, i.e. whether `radians` lies in
225620
+ * the sweep extended per `extendParam`.
225549
225621
  */
225550
- static resolveRadiansToSweepFraction(extendParam, radians, sweep) {
225622
+ static resolveRadiansToValidSweepFraction(extendParam, radians, sweep) {
225551
225623
  let fraction = sweep.radiansToSignedPeriodicFraction(radians);
225624
+ let isValid = true;
225552
225625
  if (!sweep.isRadiansInSweep(radians)) {
225553
225626
  const fractionPeriod = sweep.fractionPeriod();
225554
225627
  const mode0 = CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendParam, 0);
225555
225628
  const mode1 = CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendParam, 1);
225556
225629
  if (mode0 !== CurveExtendMode.None) {
225557
- if (mode1 !== CurveExtendMode.None) {
225558
- // both extensions possible; let the sweep resolve to the "closer" end
225559
- fraction = sweep.radiansToSignedPeriodicFraction(radians);
225560
- }
225561
- else {
225562
- // only extend to negative
225630
+ if (mode1 === CurveExtendMode.None) { // only extend to negative
225563
225631
  if (fraction > 1.0)
225564
225632
  fraction -= fractionPeriod;
225565
225633
  }
225566
225634
  }
225567
- else if (mode1 !== CurveExtendMode.None) {
225635
+ else if (mode1 !== CurveExtendMode.None) { // only extend to positive
225568
225636
  if (fraction < 0.0)
225569
225637
  fraction += fractionPeriod;
225570
225638
  }
225571
- else { // both clamped
225639
+ else { // no extension allowed
225572
225640
  fraction = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.clamp(fraction, 0, 1);
225641
+ isValid = false;
225573
225642
  }
225574
225643
  }
225575
- return fraction;
225644
+ return { fraction, isValid };
225645
+ }
225646
+ /** Call [[resolveRadiansToValidSweepFraction]] and return only the fraction. */
225647
+ static resolveRadiansToSweepFraction(extendParam, radians, sweep) {
225648
+ return this.resolveRadiansToValidSweepFraction(extendParam, radians, sweep).fraction;
225576
225649
  }
225577
225650
  }
225578
225651
 
@@ -226992,7 +227065,7 @@ __webpack_require__.r(__webpack_exports__);
226992
227065
  /* harmony export */ CurvePrimitive: () => (/* binding */ CurvePrimitive)
226993
227066
  /* harmony export */ });
226994
227067
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
226995
- /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
227068
+ /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
226996
227069
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
226997
227070
  /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
226998
227071
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
@@ -227001,8 +227074,9 @@ __webpack_require__.r(__webpack_exports__);
227001
227074
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
227002
227075
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
227003
227076
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
227004
- /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
227077
+ /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
227005
227078
  /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
227079
+ /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
227006
227080
  /* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
227007
227081
  /*---------------------------------------------------------------------------------------------
227008
227082
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -227024,6 +227098,7 @@ __webpack_require__.r(__webpack_exports__);
227024
227098
 
227025
227099
 
227026
227100
 
227101
+
227027
227102
  /**
227028
227103
  * A curve primitive is bounded.
227029
227104
  * A curve primitive maps fractions in 0..1 to points in space.
@@ -227412,12 +227487,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
227412
227487
  * * Since CurvePrimitive should always have start and end available as candidate points, this method should always
227413
227488
  * succeed.
227414
227489
  * @param spacePoint point in space.
227415
- * @param extend if applicable, compute the closest point to the curve extended according to variant type:
227416
- * * false: do not extend the curve
227417
- * * true: extend the curve at both start and end
227418
- * * CurveExtendOptions: extend the curve in the specified manner at both start and end
227419
- * * CurveExtendOptions[]: first entry applies to curve start; second, to curve end; any other entries ignored
227420
- * @param result optional pre-allocated detail to populate and return.
227490
+ * @param extend (optional) compute the closest point to the curve extended according to variant type (default false)
227491
+ * @param result (optional) pre-allocated detail to populate and return.
227421
227492
  * @returns details of the closest point.
227422
227493
  */
227423
227494
  closestPoint(spacePoint, extend, result) {
@@ -227425,6 +227496,62 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
227425
227496
  this.emitStrokableParts(strokeHandler);
227426
227497
  return strokeHandler.claimResult();
227427
227498
  }
227499
+ /**
227500
+ * Announce all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
227501
+ * the view defined by `options.vectorToEye`.
227502
+ * * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve
227503
+ * tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to
227504
+ * `options.vectorToEye`.
227505
+ * @param spacePoint point in space.
227506
+ * @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused
227507
+ * internally, so it should be cloned in the callback if it needs to be saved.
227508
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
227509
+ */
227510
+ emitTangents(spacePoint, announceTangent, options) {
227511
+ const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
227512
+ this.emitStrokableParts(strokeHandler, options?.strokeOptions);
227513
+ }
227514
+ /**
227515
+ * Return all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
227516
+ * the view defined by `options.vectorToEye`.
227517
+ * * See [[emitTangents]] for the definition of tangency employed.
227518
+ * @param spacePoint point in space.
227519
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
227520
+ * @returns an array of details of all tangent points or undefined if no tangent was found.
227521
+ */
227522
+ allTangents(spacePoint, options) {
227523
+ const tangents = [];
227524
+ this.emitTangents(spacePoint, (t) => tangents.push(t.clone()), options);
227525
+ return (tangents.length === 0) ? undefined : tangents;
227526
+ }
227527
+ /**
227528
+ * Return the point `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
227529
+ * the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.
227530
+ * * See [[emitTangents]] for the definition of tangency employed.
227531
+ * @param spacePoint point in space.
227532
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
227533
+ * @returns the detail of the closest tangent point or undefined if no tangent was found.
227534
+ */
227535
+ closestTangent(spacePoint, options) {
227536
+ const hint = options?.hintPoint ?? spacePoint;
227537
+ let toLocal;
227538
+ if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))
227539
+ toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);
227540
+ const measureHintDist2 = (pt) => {
227541
+ return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);
227542
+ };
227543
+ let closestTangent;
227544
+ let closestDist2 = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.largeCoordinateResult;
227545
+ const collectClosestTangent = (tangent) => {
227546
+ const dist2 = measureHintDist2(tangent.point);
227547
+ if (!closestTangent || dist2 < closestDist2) {
227548
+ closestTangent = tangent.clone(closestTangent);
227549
+ closestDist2 = dist2;
227550
+ }
227551
+ };
227552
+ this.emitTangents(spacePoint, collectClosestTangent, options);
227553
+ return closestTangent;
227554
+ }
227428
227555
  /**
227429
227556
  * Find intervals of this curvePrimitive that are interior to a clipper
227430
227557
  * @param clipper clip structure (e.g. clip planes)
@@ -227472,7 +227599,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
227472
227599
  * @returns Return the number of CurveLocationDetail's added to the result array.
227473
227600
  */
227474
227601
  appendPlaneIntersectionPoints(plane, result) {
227475
- const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
227602
+ const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.AppendPlaneIntersectionStrokeHandler(plane, result);
227476
227603
  const n0 = result.length;
227477
227604
  this.emitStrokableParts(strokeHandler);
227478
227605
  return result.length - n0;
@@ -227569,7 +227696,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
227569
227696
  computeAndAttachRecursiveStrokeCounts(options, parentMap) {
227570
227697
  const n = this.computeStrokeCountForOptions(options);
227571
227698
  const a = this.curveLength();
227572
- CurvePrimitive.installStrokeCountMap(this, _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_12__.StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a), parentMap);
227699
+ CurvePrimitive.installStrokeCountMap(this, _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_13__.StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a), parentMap);
227573
227700
  }
227574
227701
  /**
227575
227702
  * Evaluate strokes at fractions indicated in a StrokeCountMap.
@@ -229666,9 +229793,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePri
229666
229793
  handler.startCurvePrimitive(this);
229667
229794
  if (n > 1) {
229668
229795
  const df = 1.0 / (n - 1);
229669
- // This is a linestring.
229670
- // There is no need for chordTol and angleTol within a segment.
229671
- // Do NOT apply min strokes per primitive.
229796
+ // this is a line string; there is no need for chordTol and angleTol within a segment
229797
+ // DO NOT apply min strokes per primitive
229672
229798
  if (options && options.hasMaxEdgeLength) {
229673
229799
  for (let i = 1; i < n; i++) {
229674
229800
  const numStroke = options.applyMaxEdgeLength(1, this._points.getPoint3dAtUncheckedPointIndex(i - 1).distance(this._points.getPoint3dAtUncheckedPointIndex(i)));
@@ -234597,6 +234723,204 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
234597
234723
  }
234598
234724
 
234599
234725
 
234726
+ /***/ }),
234727
+
234728
+ /***/ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js":
234729
+ /*!******************************************************************************************!*\
234730
+ !*** ../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js ***!
234731
+ \******************************************************************************************/
234732
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
234733
+
234734
+ "use strict";
234735
+ __webpack_require__.r(__webpack_exports__);
234736
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
234737
+ /* harmony export */ AnnounceTangentStrokeHandler: () => (/* binding */ AnnounceTangentStrokeHandler)
234738
+ /* harmony export */ });
234739
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
234740
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
234741
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234742
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
234743
+ /* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
234744
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
234745
+ /* harmony import */ var _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NewtonRtoRStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js");
234746
+ /*---------------------------------------------------------------------------------------------
234747
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
234748
+ * See LICENSE.md in the project root for license terms and full copyright notice.
234749
+ *--------------------------------------------------------------------------------------------*/
234750
+ /** @packageDocumentation
234751
+ * @module Curve
234752
+ */
234753
+
234754
+
234755
+
234756
+
234757
+
234758
+
234759
+
234760
+ /**
234761
+ * Context for searching for the tangent(s) to a CurvePrimitive.
234762
+ * @internal
234763
+ */
234764
+ class AnnounceTangentStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_1__.NewtonRtoRStrokeHandler {
234765
+ _curve;
234766
+ _announceTangent;
234767
+ _spacePoint;
234768
+ _vectorToEye;
234769
+ _distanceTol;
234770
+ _distanceTolSquared;
234771
+ // fraction and function value on one side of an interval that may bracket a root
234772
+ _fractionA = 0;
234773
+ _functionA = 0;
234774
+ // fraction and function value on the other side of an interval that may bracket a root
234775
+ _fractionB = 0;
234776
+ _functionB = 0;
234777
+ _numThisCurve = 0;
234778
+ // scratch vars to use within methods
234779
+ _fractionMRU;
234780
+ _curveMRU;
234781
+ _workRay;
234782
+ _workDetail;
234783
+ _newtonSolver;
234784
+ /** Constructor */
234785
+ constructor(spacePoint, announceTangent, options) {
234786
+ super();
234787
+ this._announceTangent = announceTangent;
234788
+ this._spacePoint = spacePoint;
234789
+ this._vectorToEye = options?.vectorToEye ?? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ();
234790
+ this._distanceTol = options?.distanceTol ?? _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
234791
+ this._distanceTolSquared = this._distanceTol * this._distanceTol;
234792
+ this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__.Ray3d.createZero();
234793
+ this.startCurvePrimitive(undefined);
234794
+ this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_5__.Newton1dUnboundedApproximateDerivative(this);
234795
+ }
234796
+ /** Specified by IStrokeHandler. */
234797
+ needPrimaryGeometryForStrokes() {
234798
+ return true;
234799
+ }
234800
+ /** Specified by IStrokeHandler. */
234801
+ startCurvePrimitive(curve) {
234802
+ this._curve = curve;
234803
+ this._fractionA = 0.0;
234804
+ this._numThisCurve = 0;
234805
+ this._functionA = 0.0;
234806
+ }
234807
+ /** Specified by IStrokeHandler. */
234808
+ endCurvePrimitive() {
234809
+ }
234810
+ /** Specified by IStrokeHandler. */
234811
+ announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
234812
+ this.startCurvePrimitive(cp);
234813
+ if (numStrokes < 1)
234814
+ numStrokes = 1;
234815
+ const df = 1.0 / numStrokes;
234816
+ for (let i = 0; i <= numStrokes; i++) {
234817
+ const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fraction0, i * df, fraction1);
234818
+ cp.fractionToPointAndDerivative(fraction, this._workRay);
234819
+ this.announceRay(fraction, this._workRay);
234820
+ }
234821
+ }
234822
+ announceCandidate(cp, fraction, point) {
234823
+ if (this._parentCurvePrimitive)
234824
+ cp = this._parentCurvePrimitive;
234825
+ if (this._curveMRU === cp && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualOptional(this._fractionMRU, fraction, _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallFloatingPoint))
234826
+ return; // avoid announcing duplicate tangents in succession (e.g., at interior stroke point)
234827
+ this._workDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(cp, fraction, point, this._workDetail);
234828
+ this._announceTangent(this._workDetail);
234829
+ this._fractionMRU = fraction;
234830
+ this._curveMRU = cp;
234831
+ }
234832
+ /** Specified by IStrokeHandler. */
234833
+ announceSegmentInterval(cp, point0, point1, _numStrokes, fraction0, fraction1) {
234834
+ let fraction;
234835
+ let point;
234836
+ const distance0 = this._spacePoint.distanceSquared(point0);
234837
+ const distance1 = this._spacePoint.distanceSquared(point1);
234838
+ if (distance0 < distance1) {
234839
+ fraction = fraction0;
234840
+ point = point0;
234841
+ }
234842
+ else {
234843
+ fraction = fraction1;
234844
+ point = point1;
234845
+ }
234846
+ // evaluate at midpoint; the endpoints may be at corners, which have ambiguous tangent
234847
+ const value = this.evaluateFunction(undefined, (fraction0 + fraction1) / 2, cp);
234848
+ if (value !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(value, this._distanceTol))
234849
+ this.announceCandidate(cp, fraction, point);
234850
+ }
234851
+ /**
234852
+ * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this
234853
+ * fractional interval.
234854
+ * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and
234855
+ * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke
234856
+ * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,
234857
+ * this method can miss a root of `f`.
234858
+ */
234859
+ searchInterval() {
234860
+ // directly announce at endpoint if we are extra certain it's a root; Newton can miss it if it has multiplicity > 1
234861
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(this._functionA, this._distanceTolSquared))
234862
+ this.announceSolutionFraction(this._fractionA);
234863
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(this._functionB, this._distanceTolSquared))
234864
+ this.announceSolutionFraction(this._fractionB);
234865
+ if (this._functionA * this._functionB < 0) {
234866
+ // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.
234867
+ const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);
234868
+ if (fraction) {
234869
+ this._newtonSolver.setX(fraction);
234870
+ if (this._newtonSolver.runIterations())
234871
+ this.announceSolutionFraction(this._newtonSolver.getX());
234872
+ }
234873
+ }
234874
+ }
234875
+ announceSolutionFraction(fraction) {
234876
+ if (this._curve)
234877
+ this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));
234878
+ }
234879
+ /**
234880
+ * Evaluate the univariate real-valued function for which we are finding roots.
234881
+ * * For finding the tangents to curve `X` from point `Q` as seen in a view plane with normal `N`, this
234882
+ * function is `f(t) := (Q - X(t)) dot (X'(t) cross N)`. The second vector in the dot product defines a
234883
+ * _tangent plane_ at `X(t)`.
234884
+ * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.
234885
+ * @param pointAndDerivative pre-evaluated curve
234886
+ * @param fraction fraction at which to evaluate `curve`
234887
+ * @param curve curve to evaluate at `fraction`
234888
+ * @returns distance of `Q` from the tangent plane at `X(t)`.
234889
+ */
234890
+ evaluateFunction(pointAndDerivative, fraction, curve) {
234891
+ if (pointAndDerivative)
234892
+ this._workRay.setFrom(pointAndDerivative);
234893
+ else if (fraction !== undefined && curve)
234894
+ this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
234895
+ else
234896
+ return undefined;
234897
+ const cross = this._vectorToEye.unitCrossProduct(this._workRay.direction); // normalized so we return true distance
234898
+ return cross ? cross.dotProductStartEnd(this._workRay.origin, this._spacePoint) : undefined;
234899
+ }
234900
+ /** Specified by NewtonRtoRStrokeHandler. */
234901
+ evaluate(fraction) {
234902
+ const curve = this._parentCurvePrimitive ?? this._curve;
234903
+ const value = this.evaluateFunction(undefined, fraction, curve);
234904
+ if (value === undefined)
234905
+ return false;
234906
+ this.currentF = value;
234907
+ return true;
234908
+ }
234909
+ announceRay(fraction, data) {
234910
+ this._functionB = this.evaluateFunction(data);
234911
+ this._fractionB = fraction;
234912
+ if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval
234913
+ this.searchInterval();
234914
+ this._functionA = this._functionB;
234915
+ this._fractionA = this._fractionB;
234916
+ }
234917
+ /** Specified by IStrokeHandler. */
234918
+ announcePointTangent(_point, _fraction, _tangent) {
234919
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "No callers expected. IStrokeHandler probably didn't need to specify this method.");
234920
+ }
234921
+ }
234922
+
234923
+
234600
234924
  /***/ }),
234601
234925
 
234602
234926
  /***/ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js":
@@ -235137,22 +235461,25 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
235137
235461
  _closestPoint;
235138
235462
  _spacePoint;
235139
235463
  _extend;
235464
+ // fraction and function value on one side of an interval that may bracket a root
235140
235465
  _fractionA = 0;
235141
235466
  _functionA = 0;
235142
- _functionB = 0;
235467
+ // fraction and function value on the other side of an interval that may bracket a root
235143
235468
  _fractionB = 0;
235469
+ _functionB = 0;
235144
235470
  _numThisCurve = 0;
235145
- // scratch vars for use within methods.
235471
+ // scratch vars to use within methods
235146
235472
  _workPoint;
235147
235473
  _workRay;
235148
235474
  _newtonSolver;
235475
+ /** Constructor */
235149
235476
  constructor(spacePoint, extend, result) {
235150
235477
  super();
235151
235478
  this._spacePoint = spacePoint;
235152
235479
  this._workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
235153
235480
  this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
235154
235481
  this._closestPoint = result;
235155
- this._extend = extend;
235482
+ this._extend = extend ?? false;
235156
235483
  this.startCurvePrimitive(undefined);
235157
235484
  this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_3__.Newton1dUnboundedApproximateDerivative(this);
235158
235485
  }
@@ -235203,7 +235530,7 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
235203
235530
  }
235204
235531
  announceSegmentInterval(cp, point0, point1, _numStrokes, fraction0, fraction1) {
235205
235532
  let localFraction = this._spacePoint.fractionOfProjectionToLine(point0, point1, 0.0);
235206
- // only consider extending the segment if the immediate caller says we are at endpoints ...
235533
+ // only consider extending the segment if the immediate caller says we are at endpoints
235207
235534
  if (!this._extend)
235208
235535
  localFraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.clampToStartEnd(localFraction, 0.0, 1.0);
235209
235536
  else {
@@ -235216,13 +235543,22 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
235216
235543
  const globalFraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.interpolate(fraction0, localFraction, fraction1);
235217
235544
  this.announceCandidate(cp, globalFraction, this._workPoint);
235218
235545
  }
235546
+ /**
235547
+ * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this
235548
+ * fractional interval.
235549
+ * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and
235550
+ * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke
235551
+ * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,
235552
+ * this method can miss a root of `f`.
235553
+ */
235219
235554
  searchInterval() {
235220
235555
  if (this._functionA * this._functionB > 0)
235221
- return;
235556
+ return; // stroke segment has no root; ASSUME the function has no root either
235222
235557
  if (this._functionA === 0)
235223
235558
  this.announceSolutionFraction(this._fractionA);
235224
235559
  if (this._functionB === 0)
235225
235560
  this.announceSolutionFraction(this._fractionB);
235561
+ // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.
235226
235562
  if (this._functionA * this._functionB < 0) {
235227
235563
  const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);
235228
235564
  if (fraction) {
@@ -235232,28 +235568,41 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
235232
235568
  }
235233
235569
  }
235234
235570
  }
235235
- evaluateB(fractionB, dataB) {
235236
- this._functionB = dataB.dotProductToPoint(this._spacePoint);
235237
- this._fractionB = fractionB;
235238
- }
235239
235571
  announceSolutionFraction(fraction) {
235240
235572
  if (this._curve)
235241
235573
  this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));
235242
235574
  }
235575
+ /**
235576
+ * Evaluate the univariate real-valued function for which we are finding roots.
235577
+ * * For finding the closest point to curve X from point Q, this function is `f(t) := Q-X(t) dot X'(t)`.
235578
+ * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.
235579
+ * @param pointAndDerivative pre-evaluated curve
235580
+ * @param fraction fraction at which to evaluate `curve`
235581
+ * @param curve curve to evaluate at `fraction`
235582
+ */
235583
+ evaluateFunction(pointAndDerivative, fraction, curve) {
235584
+ if (pointAndDerivative)
235585
+ this._workRay.setFrom(pointAndDerivative);
235586
+ else if (fraction !== undefined && curve)
235587
+ this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
235588
+ else
235589
+ return undefined;
235590
+ return this._workRay.dotProductToPoint(this._spacePoint);
235591
+ }
235243
235592
  evaluate(fraction) {
235244
235593
  let curve = this._curve;
235245
235594
  if (this._parentCurvePrimitive)
235246
235595
  curve = this._parentCurvePrimitive;
235247
- if (curve) {
235248
- this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
235249
- this.currentF = this._workRay.dotProductToPoint(this._spacePoint);
235250
- return true;
235251
- }
235252
- return false;
235596
+ const value = this.evaluateFunction(undefined, fraction, curve);
235597
+ if (value === undefined)
235598
+ return false;
235599
+ this.currentF = value;
235600
+ return true;
235253
235601
  }
235254
235602
  announceRay(fraction, data) {
235255
- this.evaluateB(fraction, data);
235256
- if (this._numThisCurve++ > 0)
235603
+ this._functionB = this.evaluateFunction(data);
235604
+ this._fractionB = fraction;
235605
+ if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval
235257
235606
  this.searchInterval();
235258
235607
  this._functionA = this._functionB;
235259
235608
  this._fractionA = this._fractionB;
@@ -239713,7 +240062,8 @@ __webpack_require__.r(__webpack_exports__);
239713
240062
  * @module Curve
239714
240063
  */
239715
240064
 
239716
- /** Intermediate class for managing the parentCurve announcements from an IStrokeHandler.
240065
+ /**
240066
+ * Intermediate class for managing the parentCurve announcements from an IStrokeHandler.
239717
240067
  * @internal
239718
240068
  */
239719
240069
  class NewtonRtoRStrokeHandler extends _numerics_Newton__WEBPACK_IMPORTED_MODULE_0__.NewtonEvaluatorRtoR {
@@ -239722,10 +240072,11 @@ class NewtonRtoRStrokeHandler extends _numerics_Newton__WEBPACK_IMPORTED_MODULE_
239722
240072
  super();
239723
240073
  this._parentCurvePrimitive = undefined;
239724
240074
  }
239725
- /** retain the parentCurvePrimitive.
240075
+ /**
240076
+ * Retain the parentCurvePrimitive.
239726
240077
  * * Calling this method tells the handler that the parent curve is to be used for detail searches.
239727
240078
  * * Example: Transition spiral search is based on linestring first, then the exact spiral.
239728
- * * Example: CurveChainWithDistanceIndex does NOT do this announcement -- the constituents act independently.
240079
+ * * Example: CurveChainWithDistanceIndex does NOT do this announcement; the constituents act independently.
239729
240080
  */
239730
240081
  startParentCurvePrimitive(curve) {
239731
240082
  this._parentCurvePrimitive = curve;
@@ -243896,7 +244247,7 @@ class AngleSweep {
243896
244247
  }
243897
244248
  /** Read-property for signed start-to-end sweep in degrees. */
243898
244249
  get sweepDegrees() {
243899
- return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this._radians1 - this._radians0);
244250
+ return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.sweepRadians);
243900
244251
  }
243901
244252
  /** Read-property for degrees at the start of this AngleSweep. */
243902
244253
  get startRadians() {
@@ -244075,20 +244426,20 @@ class AngleSweep {
244075
244426
  /** Convert fractional position in the sweep to radians. */
244076
244427
  fractionToRadians(fraction) {
244077
244428
  return fraction < 0.5 ?
244078
- this._radians0 + fraction * (this._radians1 - this._radians0) :
244079
- this._radians1 + (fraction - 1.0) * (this._radians1 - this._radians0);
244429
+ this._radians0 + fraction * this.sweepRadians :
244430
+ this._radians1 + (fraction - 1.0) * this.sweepRadians;
244080
244431
  }
244081
244432
  /** Convert fractional position in the sweep to strongly typed Angle object. */
244082
244433
  fractionToAngle(fraction) {
244083
244434
  return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(this.fractionToRadians(fraction));
244084
244435
  }
244085
244436
  /**
244086
- * Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
244437
+ * Return 2PI divided by the sweep radians.
244087
244438
  * * This is the number of fractional intervals required to cover a whole circle.
244088
244439
  * @returns period of the sweep, or 1 if sweep is empty.
244089
244440
  */
244090
244441
  fractionPeriod() {
244091
- return this.isEmpty ? 1.0 : _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.pi2Radians / Math.abs(this._radians1 - this._radians0);
244442
+ return this.isEmpty ? 1.0 : _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.pi2Radians / Math.abs(this.sweepRadians);
244092
244443
  }
244093
244444
  /**
244094
244445
  * Return the fractionalized position of the given angle (as Angle) computed without consideration of
@@ -244104,7 +244455,7 @@ class AngleSweep {
244104
244455
  * @returns unbounded fraction, or 1 if sweep is empty.
244105
244456
  */
244106
244457
  angleToUnboundedFraction(theta) {
244107
- return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / (this._radians1 - this._radians0);
244458
+ return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / this.sweepRadians;
244108
244459
  }
244109
244460
  /**
244110
244461
  * Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero
@@ -244398,7 +244749,7 @@ class AngleSweep {
244398
244749
  isAlmostEqualAllowPeriodShift(other, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
244399
244750
  return this.isCCW === other.isCCW // this rules out equating opposite sweeps like [0,-100] and [0,260]
244400
244751
  && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0, radianTol)
244401
- && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
244752
+ && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
244402
244753
  }
244403
244754
  /**
244404
244755
  * Test if two angle sweeps match within the given tolerance.
@@ -244408,7 +244759,7 @@ class AngleSweep {
244408
244759
  */
244409
244760
  isAlmostEqualNoPeriodShift(other, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
244410
244761
  return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0, radianTol)
244411
- && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
244762
+ && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
244412
244763
  }
244413
244764
  /**
244414
244765
  * Test if start and end angles match with radians tolerance.
@@ -253093,28 +253444,27 @@ class Matrix3d {
253093
253444
  return count === 3;
253094
253445
  }
253095
253446
  /**
253096
- * Adjust the matrix in place to make is a `rigid` matrix so that:
253097
- * * columns are perpendicular and have unit length.
253098
- * * transpose equals inverse.
253099
- * * mirroring is removed.
253100
- * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
253101
- * @param axisOrder how to reorder the matrix columns
253102
- * @return whether the adjusted matrix is `rigid` on return
253447
+ * Adjust the matrix in place to make it rigid:
253448
+ * * Columns are perpendicular and have unit length.
253449
+ * * Transpose equals inverse.
253450
+ * @param axisOrder how to reorder the matrix columns. A left-handed ordering will return a mirror.
253451
+ * @return whether the adjusted matrix is rigid on return
253103
253452
  */
253104
253453
  makeRigid(axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ) {
253105
253454
  const maxAbs = this.maxAbs();
253106
253455
  if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(maxAbs))
253107
253456
  return false;
253108
253457
  const scale = 1.0 / maxAbs;
253109
- this.scaleColumnsInPlace(scale, scale, scale);
253458
+ this.scaleColumnsInPlace(scale, scale, scale); // improve numerical stability
253110
253459
  this.axisOrderCrossProductsInPlace(axisOrder);
253111
253460
  return this.normalizeColumnsInPlace();
253112
253461
  }
253113
253462
  /**
253114
- * Create a new orthogonal matrix (perpendicular columns, unit length, transpose is inverse).
253115
- * * Columns are taken from the source Matrix3d in order indicated by the axis order.
253116
- * * Mirroring in the matrix is removed.
253117
- * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
253463
+ * Create a new orthogonal matrix by calling [[makeRigid]] on a clone of `source`.
253464
+ * @param source input matrix
253465
+ * @param axisOrder how to reorder the matrix columns. A left-handed ordering will return a mirror.
253466
+ * @param result optional preallocated result to populate and return
253467
+ * @returns rigid matrix, or `undefined` if the operation failed.
253118
253468
  */
253119
253469
  static createRigidFromMatrix3d(source, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ, result) {
253120
253470
  result = source.clone(result);
@@ -274164,7 +274514,7 @@ class FacetOrientationFixup {
274164
274514
  _facetOrientation;
274165
274515
  _components;
274166
274516
  _visitor;
274167
- _mesh;
274517
+ _mesh; // we could get by with just a Polyface/Visitor but for the call to reverseSingleFacet
274168
274518
  constructor(mesh) {
274169
274519
  this._visitor = mesh.createVisitor(1);
274170
274520
  this._edges = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_0__.PolyfaceQuery.createIndexedEdges(this._visitor);
@@ -279656,6 +280006,7 @@ class PolyfaceData {
279656
280006
  if (this.colorIndex !== this.pointIndex)
279657
280007
  PolyfaceData.reverseIndices(facetStartIndex, this.colorIndex, true);
279658
280008
  PolyfaceData.reverseIndices(facetStartIndex, this.edgeVisible, false);
280009
+ // TODO: reverse auxData.indices, edgeMateIndex
279659
280010
  }
279660
280011
  }
279661
280012
  /**
@@ -279675,6 +280026,7 @@ class PolyfaceData {
279675
280026
  if (this.colorIndex !== this.pointIndex)
279676
280027
  PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.colorIndex, true);
279677
280028
  PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.edgeVisible, false);
280029
+ // TODO: reverse auxData.indices, edgeMateIndex
279678
280030
  }
279679
280031
  /** Scale all the normals by -1. */
279680
280032
  reverseNormals() {
@@ -305055,12 +305407,12 @@ class Triangulator {
305055
305407
  * * Return false if clearly negative or almost zero.
305056
305408
  * @param nodeA node on the diagonal edge of candidate for edge flip.
305057
305409
  */
305058
- static computeInCircleDeterminantIsStrongPositive(nodeA) {
305410
+ static computeCircumcircleDeterminantIsStrongPositive(nodeA) {
305059
305411
  // Assume triangle A1,A2,B2 is ccw.
305060
305412
  // Shift the triangle to the origin (by negated A coords).
305061
305413
  // The Delaunay condition is computed by projecting the origin and the shifted triangle
305062
305414
  // points up to the paraboloid z = x*x + y*y. Due to the radially symmetric convexity of
305063
- // this surface and the ccw orientation of this triangle, "A is inside triangle A1,A2,B2"
305415
+ // this surface and the ccw orientation of this triangle, "A is inside the circumcircle of triangle A1,A2,B2"
305064
305416
  // is equivalent to "the volume of the parallelepiped formed by the projected points is
305065
305417
  // negative, as computed by the triple product."
305066
305418
  const nodeA1 = nodeA.faceSuccessor;
@@ -305093,7 +305445,7 @@ class Triangulator {
305093
305445
  }
305094
305446
  /**
305095
305447
  * * Visit each node of the graph array
305096
- * * If a flip would be possible, test the results of flipping using incircle condition
305448
+ * * If a flip would be possible, test the results of flipping using circumcircle condition
305097
305449
  * * If revealed to be an improvement, conduct the flip, mark involved nodes as unvisited, and repeat until all nodes are visited
305098
305450
  */
305099
305451
  static flipTriangles(graph) {
@@ -305106,7 +305458,7 @@ class Triangulator {
305106
305458
  }
305107
305459
  /**
305108
305460
  * * Visit each node of the graph array
305109
- * * If a flip would be possible, test the results of flipping using incircle condition
305461
+ * * If a flip would be possible, test the results of flipping using circumcircle condition
305110
305462
  * * If revealed to be an improvement, conduct the flip, mark involved nodes as unvisited, and repeat until all nodes are visited
305111
305463
  */
305112
305464
  static flipTrianglesInEdgeSet(graph, edgeSet) {
@@ -305119,7 +305471,7 @@ class Triangulator {
305119
305471
  while (undefined !== (node = edgeSet.chooseAndRemoveAny())) {
305120
305472
  if (node.isMaskSet(barrierMasks)) // Flip not allowed
305121
305473
  continue;
305122
- if (Triangulator.computeInCircleDeterminantIsStrongPositive(node)) {
305474
+ if (Triangulator.computeCircumcircleDeterminantIsStrongPositive(node)) {
305123
305475
  // Flip the triangles
305124
305476
  Triangulator.flipEdgeBetweenTriangles(node.edgeMate.faceSuccessor, node.edgeMate.facePredecessor, node.edgeMate, node.faceSuccessor, node, node.facePredecessor);
305125
305477
  // keep looking at the 2 faces
@@ -305470,7 +305822,7 @@ class Triangulator {
305470
305822
  // triangle B1 A1 D is on the other side of AB
305471
305823
  // The condition for flipping is:
305472
305824
  // ! both triangles must be TRIANGULATED_NODE_MASK
305473
- // ! incircle condition flags D as in the circle of ABC
305825
+ // ! circumcircle condition flags D as in the circle of ABC
305474
305826
  // after flip, node A moves to the vertex of D, and is the effective "ear", with the cap edge C A1
305475
305827
  // after flip, consider the A1 D (whose nodes are A1 and flipped A!!!)
305476
305828
  //
@@ -305490,7 +305842,7 @@ class Triangulator {
305490
305842
  let a0 = b0.facePredecessor;
305491
305843
  let b1 = a0.edgeMate;
305492
305844
  while (Triangulator.isInteriorTriangle(a0) && Triangulator.isInteriorTriangle(b1)) {
305493
- const detA = Triangulator.computeInCircleDeterminantIsStrongPositive(a0);
305845
+ const detA = Triangulator.computeCircumcircleDeterminantIsStrongPositive(a0);
305494
305846
  if (!detA)
305495
305847
  break;
305496
305848
  // Flip the triangles
@@ -328001,7 +328353,7 @@ class TestContext {
328001
328353
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
328002
328354
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
328003
328355
  await core_frontend_1.NoRenderApp.startup({
328004
- applicationVersion: "5.0.0-dev.104",
328356
+ applicationVersion: "5.0.0-dev.105",
328005
328357
  applicationId: this.settings.gprid,
328006
328358
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
328007
328359
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -353045,7 +353397,7 @@ var loadLanguages = instance.loadLanguages;
353045
353397
  /***/ ((module) => {
353046
353398
 
353047
353399
  "use strict";
353048
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.104","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","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","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","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:*"},"//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/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","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/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
353400
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.105","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","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","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","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:*"},"//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/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","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/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
353049
353401
 
353050
353402
  /***/ }),
353051
353403