@itwin/ecschema-rpcinterface-tests 5.0.0-dev.104 → 5.0.0-dev.106

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.
@@ -69408,6 +69408,168 @@ function propertyTypeToString(type) {
69408
69408
  }
69409
69409
 
69410
69410
 
69411
+ /***/ }),
69412
+
69413
+ /***/ "../../core/ecschema-metadata/lib/esm/SchemaFormatsProvider.js":
69414
+ /*!*********************************************************************!*\
69415
+ !*** ../../core/ecschema-metadata/lib/esm/SchemaFormatsProvider.js ***!
69416
+ \*********************************************************************/
69417
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
69418
+
69419
+ "use strict";
69420
+ __webpack_require__.r(__webpack_exports__);
69421
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
69422
+ /* harmony export */ SchemaFormatsProvider: () => (/* binding */ SchemaFormatsProvider)
69423
+ /* harmony export */ });
69424
+ /* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Context */ "../../core/ecschema-metadata/lib/esm/Context.js");
69425
+ /* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
69426
+ /* harmony import */ var _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Metadata/SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
69427
+ /* harmony import */ var _Metadata_Format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Metadata/Format */ "../../core/ecschema-metadata/lib/esm/Metadata/Format.js");
69428
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
69429
+ /* harmony import */ var _Metadata_KindOfQuantity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Metadata/KindOfQuantity */ "../../core/ecschema-metadata/lib/esm/Metadata/KindOfQuantity.js");
69430
+ /* harmony import */ var _Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Metadata/OverrideFormat */ "../../core/ecschema-metadata/lib/esm/Metadata/OverrideFormat.js");
69431
+ /*---------------------------------------------------------------------------------------------
69432
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
69433
+ * See LICENSE.md in the project root for license terms and full copyright notice.
69434
+ *--------------------------------------------------------------------------------------------*/
69435
+ /** @packageDocumentation
69436
+ * @module Metadata
69437
+ */
69438
+
69439
+
69440
+
69441
+
69442
+
69443
+
69444
+
69445
+ /**
69446
+ * Provides default formats and kind of quantities from a given SchemaContext or SchemaLocater.
69447
+ * @beta
69448
+ */
69449
+ class SchemaFormatsProvider {
69450
+ _context;
69451
+ _unitSystem;
69452
+ _formatsRetrieved = new Set();
69453
+ onFormatsChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_4__.BeEvent();
69454
+ /**
69455
+ *
69456
+ * @param contextOrLocater The SchemaContext or a different ISchemaLocater implementation used to retrieve the schema. The SchemaContext
69457
+ * class implements the ISchemaLocater interface. If the provided locater is not a SchemaContext instance a new SchemaContext will be
69458
+ * created and the locater will be added.
69459
+ * @param unitSystem Used to lookup a default format through a schema specific algorithm, when the format retrieved is associated with a KindOfQuantity.
69460
+ */
69461
+ constructor(contextOrLocater, unitSystem) {
69462
+ if (contextOrLocater instanceof _Context__WEBPACK_IMPORTED_MODULE_0__.SchemaContext) {
69463
+ this._context = contextOrLocater;
69464
+ }
69465
+ else {
69466
+ this._context = new _Context__WEBPACK_IMPORTED_MODULE_0__.SchemaContext();
69467
+ this._context.addLocater(contextOrLocater);
69468
+ }
69469
+ this._unitSystem = unitSystem;
69470
+ }
69471
+ get context() { return this._context; }
69472
+ get unitSystem() { return this._unitSystem; }
69473
+ set unitSystem(unitSystem) {
69474
+ this._unitSystem = unitSystem;
69475
+ this.clear();
69476
+ }
69477
+ clear() {
69478
+ const formatsChanged = Array.from(this._formatsRetrieved);
69479
+ this._formatsRetrieved.clear();
69480
+ this.onFormatsChanged.raiseEvent({ formatsChanged });
69481
+ }
69482
+ async getKindOfQuantityFormatFromSchema(itemKey) {
69483
+ const kindOfQuantity = await this._context.getSchemaItem(itemKey, _Metadata_KindOfQuantity__WEBPACK_IMPORTED_MODULE_5__.KindOfQuantity);
69484
+ if (!kindOfQuantity) {
69485
+ return undefined;
69486
+ }
69487
+ // Find the first presentation format that matches the provided unit system.
69488
+ const unitSystemGroupNames = getUnitSystemGroupNames(this._unitSystem);
69489
+ const presentationFormats = kindOfQuantity.presentationFormats;
69490
+ for (const system of unitSystemGroupNames) {
69491
+ for (const format of presentationFormats) {
69492
+ const unit = format.units && format.units[0][0];
69493
+ if (!unit) {
69494
+ continue;
69495
+ }
69496
+ const currentUnitSystem = await unit.unitSystem;
69497
+ if (currentUnitSystem && currentUnitSystem.name.toUpperCase() === system) {
69498
+ this._formatsRetrieved.add(itemKey.fullName);
69499
+ return (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(format);
69500
+ }
69501
+ }
69502
+ }
69503
+ // If no matching presentation format was found, use persistence unit format if it matches unit system.
69504
+ const persistenceUnit = await kindOfQuantity.persistenceUnit;
69505
+ const persistenceUnitSystem = await persistenceUnit?.unitSystem;
69506
+ if (persistenceUnitSystem && unitSystemGroupNames.includes(persistenceUnitSystem.name.toUpperCase())) {
69507
+ this._formatsRetrieved.add(itemKey.fullName);
69508
+ return getPersistenceUnitFormatProps(persistenceUnit);
69509
+ }
69510
+ const defaultFormat = kindOfQuantity.defaultPresentationFormat;
69511
+ if (!defaultFormat) {
69512
+ return undefined;
69513
+ }
69514
+ this._formatsRetrieved.add(itemKey.fullName);
69515
+ return (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(defaultFormat);
69516
+ }
69517
+ /**
69518
+ * Retrieves a Format from a SchemaContext. If the format is part of a KindOfQuantity, the first presentation format in the KindOfQuantity that matches the current unit system will be retrieved.
69519
+ * If no presentation format matches the current unit system, the persistence unit format will be retrieved if it matches the current unit system.
69520
+ * Else, the default presentation format will be retrieved.
69521
+ * @param name The full name of the Format or KindOfQuantity.
69522
+ * @returns
69523
+ */
69524
+ async getFormat(name) {
69525
+ const [schemaName, schemaItemName] = _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_2__.SchemaItem.parseFullName(name);
69526
+ const schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_1__.SchemaKey(schemaName);
69527
+ const schema = await this._context.getSchema(schemaKey);
69528
+ if (!schema) {
69529
+ return undefined;
69530
+ }
69531
+ const itemKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_1__.SchemaItemKey(schemaItemName, schema.schemaKey);
69532
+ if (schema.name === "Formats") {
69533
+ const format = await this._context.getSchemaItem(itemKey, _Metadata_Format__WEBPACK_IMPORTED_MODULE_3__.Format);
69534
+ if (!format) {
69535
+ return undefined;
69536
+ }
69537
+ return format.toJSON(true);
69538
+ }
69539
+ return this.getKindOfQuantityFormatFromSchema(itemKey);
69540
+ }
69541
+ }
69542
+ function getUnitSystemGroupNames(unitSystem) {
69543
+ switch (unitSystem) {
69544
+ case "imperial":
69545
+ return ["IMPERIAL", "USCUSTOM", "INTERNATIONAL", "FINANCE"];
69546
+ case "metric":
69547
+ return ["SI", "METRIC", "INTERNATIONAL", "FINANCE"];
69548
+ case "usCustomary":
69549
+ return ["USCUSTOM", "INTERNATIONAL", "FINANCE"];
69550
+ case "usSurvey":
69551
+ return ["USSURVEY", "USCUSTOM", "INTERNATIONAL", "FINANCE"];
69552
+ }
69553
+ return [];
69554
+ }
69555
+ function getPersistenceUnitFormatProps(persistenceUnit) {
69556
+ // Same as Format "DefaultRealU" in Formats ecschema
69557
+ return {
69558
+ formatTraits: ["keepSingleZero", "keepDecimalPoint", "showUnitLabel"],
69559
+ precision: 6,
69560
+ type: "Decimal",
69561
+ composite: {
69562
+ units: [
69563
+ {
69564
+ name: persistenceUnit.fullName,
69565
+ label: persistenceUnit.label,
69566
+ },
69567
+ ],
69568
+ },
69569
+ };
69570
+ }
69571
+
69572
+
69411
69573
  /***/ }),
69412
69574
 
69413
69575
  /***/ "../../core/ecschema-metadata/lib/esm/SchemaJsonLocater.js":
@@ -71006,7 +71168,8 @@ __webpack_require__.r(__webpack_exports__);
71006
71168
  /* harmony export */ Schema: () => (/* reexport safe */ _Metadata_Schema__WEBPACK_IMPORTED_MODULE_25__.Schema),
71007
71169
  /* harmony export */ SchemaCache: () => (/* reexport safe */ _Context__WEBPACK_IMPORTED_MODULE_1__.SchemaCache),
71008
71170
  /* harmony export */ SchemaContext: () => (/* reexport safe */ _Context__WEBPACK_IMPORTED_MODULE_1__.SchemaContext),
71009
- /* harmony export */ SchemaGraph: () => (/* reexport safe */ _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_38__.SchemaGraph),
71171
+ /* harmony export */ SchemaFormatsProvider: () => (/* reexport safe */ _SchemaFormatsProvider__WEBPACK_IMPORTED_MODULE_38__.SchemaFormatsProvider),
71172
+ /* harmony export */ SchemaGraph: () => (/* reexport safe */ _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_39__.SchemaGraph),
71010
71173
  /* harmony export */ SchemaGraphUtil: () => (/* reexport safe */ _Deserialization_SchemaGraphUtil__WEBPACK_IMPORTED_MODULE_3__.SchemaGraphUtil),
71011
71174
  /* harmony export */ SchemaItem: () => (/* reexport safe */ _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_26__.SchemaItem),
71012
71175
  /* harmony export */ SchemaItemKey: () => (/* reexport safe */ _SchemaKey__WEBPACK_IMPORTED_MODULE_31__.SchemaItemKey),
@@ -71086,7 +71249,8 @@ __webpack_require__.r(__webpack_exports__);
71086
71249
  /* harmony import */ var _UnitProvider_SchemaUnitProvider__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UnitProvider/SchemaUnitProvider */ "../../core/ecschema-metadata/lib/esm/UnitProvider/SchemaUnitProvider.js");
71087
71250
  /* harmony import */ var _Validation_SchemaWalker__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Validation/SchemaWalker */ "../../core/ecschema-metadata/lib/esm/Validation/SchemaWalker.js");
71088
71251
  /* harmony import */ var _SchemaPartVisitorDelegate__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./SchemaPartVisitorDelegate */ "../../core/ecschema-metadata/lib/esm/SchemaPartVisitorDelegate.js");
71089
- /* harmony import */ var _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./utils/SchemaGraph */ "../../core/ecschema-metadata/lib/esm/utils/SchemaGraph.js");
71252
+ /* harmony import */ var _SchemaFormatsProvider__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./SchemaFormatsProvider */ "../../core/ecschema-metadata/lib/esm/SchemaFormatsProvider.js");
71253
+ /* harmony import */ var _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./utils/SchemaGraph */ "../../core/ecschema-metadata/lib/esm/utils/SchemaGraph.js");
71090
71254
  /*---------------------------------------------------------------------------------------------
71091
71255
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
71092
71256
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -71128,6 +71292,7 @@ __webpack_require__.r(__webpack_exports__);
71128
71292
 
71129
71293
 
71130
71294
 
71295
+
71131
71296
 
71132
71297
 
71133
71298
  /** @docs-package-description
@@ -74820,6 +74985,7 @@ __webpack_require__.r(__webpack_exports__);
74820
74985
  /* harmony import */ var _tools_Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tools/Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
74821
74986
  /* harmony import */ var _tools_ToolSettings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tools/ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
74822
74987
  /* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
74988
+ /* harmony import */ var _AccuDraw__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AccuDraw */ "../../core/frontend/lib/esm/AccuDraw.js");
74823
74989
  /*---------------------------------------------------------------------------------------------
74824
74990
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
74825
74991
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -74836,6 +75002,7 @@ __webpack_require__.r(__webpack_exports__);
74836
75002
 
74837
75003
 
74838
75004
 
75005
+
74839
75006
  // cspell:ignore dont primitivetools
74840
75007
  /** Virtual cursor for using AccuSnap with touch input.
74841
75008
  * @internal
@@ -75374,6 +75541,56 @@ class AccuSnap {
75374
75541
  intersect.primitive = tpSegment; // Just save single segment that was intersected for line strings/shapes...
75375
75542
  return intersect;
75376
75543
  }
75544
+ static doPostProcessSnapMode(snap, snapMode) {
75545
+ const accuDraw = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuDraw;
75546
+ if (!accuDraw.isEnabled || accuDraw.isDeactivated)
75547
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Disabled; // AccuDraw is require for this snap mode...
75548
+ if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.HitGeomType.Surface === snap.geomType)
75549
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible; // Only valid for edge and curve hits...
75550
+ const curve = snap.getCurvePrimitive();
75551
+ if (undefined === curve)
75552
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75553
+ const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDraw.getSnapRotation(snap, snap.viewport);
75554
+ if (undefined === rMatrix)
75555
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75556
+ // Compute snap from AccuDraw origin when active or set AccuDraw rotation if accepted...
75557
+ if (!accuDraw.isActive) {
75558
+ accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawFlags.SmartRotation); // Automatically orient compass to snap location if accepted...
75559
+ snap.setSnapMode(snapMode);
75560
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success;
75561
+ }
75562
+ const zVec = rMatrix.rowZ(); // This is a row matrix...
75563
+ const spacePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(accuDraw.origin, snap.getPoint(), zVec, snap.viewport, true);
75564
+ if (undefined === spacePoint)
75565
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75566
+ let detail;
75567
+ if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint === snapMode)
75568
+ detail = curve.closestPoint(spacePoint, true);
75569
+ else
75570
+ detail = curve.closestTangent(spacePoint, { hintPoint: snap.getPoint(), vectorToEye: zVec, extend: true });
75571
+ if (undefined === detail?.curve)
75572
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75573
+ // Close point may not be perpendicular when curve can't be extended...
75574
+ if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint === snapMode && !curve.isExtensibleFractionSpace) {
75575
+ const curvePlanePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(accuDraw.origin, detail.point, zVec, snap.viewport, true);
75576
+ if (undefined === curvePlanePoint)
75577
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75578
+ const curveNormal = detail.point.vectorTo(curvePlanePoint);
75579
+ const curveTangent = curve.fractionToPointAndUnitTangent(detail.fraction);
75580
+ if (!curveTangent.getDirectionRef().isPerpendicularTo(curveNormal)) {
75581
+ const curveExtensionPoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToLineInView(accuDraw.origin, curveTangent.getOriginRef(), curveTangent.getDirectionRef(), snap.viewport, true);
75582
+ if (undefined === curveExtensionPoint)
75583
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75584
+ detail.point.setFrom(curveExtensionPoint);
75585
+ }
75586
+ }
75587
+ const point = _AccuDraw__WEBPACK_IMPORTED_MODULE_9__.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accuDraw.origin, zVec, snap.viewport, true);
75588
+ if (undefined === point)
75589
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoSnapPossible;
75590
+ snap.setSnapPoint(point, _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapHeat.InRange); // Force hot snap...
75591
+ snap.setSnapMode(snapMode);
75592
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success;
75593
+ }
75377
75594
  /** @internal */
75378
75595
  static async requestSnap(thisHit, snapModes, hotDistanceInches, keypointDivisor, hitList, out) {
75379
75596
  if (thisHit.isModelHit || thisHit.isMapHit || thisHit.isClassifier) {
@@ -75410,6 +75627,16 @@ class AccuSnap {
75410
75627
  return undefined;
75411
75628
  }
75412
75629
  }
75630
+ const haveTangentPoint = snapModes.includes(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.TangentPoint);
75631
+ const havePerpendicularPoint = snapModes.includes(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint);
75632
+ const postProcessSnapMode = (havePerpendicularPoint ? _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint : (haveTangentPoint ? _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.TangentPoint : undefined));
75633
+ if (undefined !== postProcessSnapMode) {
75634
+ // NOTE: These are not valid backend snap modes. Instead make the snap request using nearest
75635
+ // snap in order to get the candidate curve to use to compute the desired snap point...
75636
+ snapModes = snapModes.filter(snapMode => (snapMode !== _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.PerpendicularPoint && snapMode !== _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.TangentPoint));
75637
+ if (!snapModes.includes(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest))
75638
+ snapModes.push(_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest);
75639
+ }
75413
75640
  const requestProps = {
75414
75641
  id: thisHit.sourceId,
75415
75642
  testPoint: thisHit.testPoint,
@@ -75497,6 +75724,11 @@ class AccuSnap {
75497
75724
  displayTransform?.matrix.multiplyVector(snap.normal, snap.normal);
75498
75725
  snap.normal.normalizeInPlace();
75499
75726
  }
75727
+ if (undefined !== postProcessSnapMode && _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Nearest === result.snapMode) {
75728
+ if (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== this.doPostProcessSnapMode(snap, postProcessSnapMode))
75729
+ return undefined;
75730
+ return snap;
75731
+ }
75500
75732
  if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Intersection !== snap.snapMode)
75501
75733
  return snap;
75502
75734
  if (undefined === result.intersectId)
@@ -75697,7 +75929,9 @@ class AccuSnap {
75697
75929
  }
75698
75930
  }
75699
75931
  /** @internal */
75700
- onPreButtonEvent(ev) { return (undefined !== this.touchCursor) ? this.touchCursor.isButtonHandled(ev) : false; }
75932
+ onPreButtonEvent(ev) {
75933
+ return (undefined !== this.touchCursor) ? this.touchCursor.isButtonHandled(ev) : false;
75934
+ }
75701
75935
  /** @internal */
75702
75936
  onTouchStart(ev) {
75703
75937
  if (undefined !== this.touchCursor)
@@ -82144,6 +82378,8 @@ var SnapMode;
82144
82378
  SnapMode[SnapMode["Origin"] = 16] = "Origin";
82145
82379
  SnapMode[SnapMode["Bisector"] = 32] = "Bisector";
82146
82380
  SnapMode[SnapMode["Intersection"] = 64] = "Intersection";
82381
+ SnapMode[SnapMode["PerpendicularPoint"] = 128] = "PerpendicularPoint";
82382
+ SnapMode[SnapMode["TangentPoint"] = 256] = "TangentPoint";
82147
82383
  })(SnapMode || (SnapMode = {}));
82148
82384
  /**
82149
82385
  * @public
@@ -82418,6 +82654,11 @@ class SnapDetail extends HitDetail {
82418
82654
  this.adjustedPoint.setFrom(point);
82419
82655
  this.heat = heat;
82420
82656
  }
82657
+ /** Change the snap mode. */
82658
+ setSnapMode(snapMode) {
82659
+ this.snapMode = snapMode;
82660
+ this.sprite = _Sprites__WEBPACK_IMPORTED_MODULE_4__.IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));
82661
+ }
82421
82662
  /** Set curve primitive and HitGeometryType for this SnapDetail. */
82422
82663
  setCurvePrimitive(primitive, localToWorld, geomType) {
82423
82664
  this.primitive = primitive;
@@ -82509,6 +82750,8 @@ class SnapDetail extends HitDetail {
82509
82750
  case SnapMode.Origin: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapOrigin.png`;
82510
82751
  case SnapMode.Bisector: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapBisector.png`;
82511
82752
  case SnapMode.Intersection: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapIntersection.png`;
82753
+ case SnapMode.PerpendicularPoint: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;
82754
+ case SnapMode.TangentPoint: return `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}sprites/SnapTangentPoint.png`;
82512
82755
  }
82513
82756
  return "";
82514
82757
  }
@@ -106043,7 +106286,6 @@ __webpack_require__.r(__webpack_exports__);
106043
106286
  /* harmony export */ AccuDrawRotateCycleTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateCycleTool),
106044
106287
  /* harmony export */ AccuDrawRotateElementTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateElementTool),
106045
106288
  /* harmony export */ AccuDrawRotateFrontTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateFrontTool),
106046
- /* harmony export */ AccuDrawRotatePerpendicularTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotatePerpendicularTool),
106047
106289
  /* harmony export */ AccuDrawRotateSideTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateSideTool),
106048
106290
  /* harmony export */ AccuDrawRotateTopTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateTopTool),
106049
106291
  /* harmony export */ AccuDrawRotateViewTool: () => (/* reexport safe */ _tools_AccuDrawTool__WEBPACK_IMPORTED_MODULE_99__.AccuDrawRotateViewTool),
@@ -125351,6 +125593,10 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
125351
125593
  return hasAlpha ? "translucent" : opaquePass;
125352
125594
  }
125353
125595
  _wantWoWReversal(target) {
125596
+ if (this.isGlyph) {
125597
+ // Raster text is always subject to white-on-white reversal.
125598
+ return true;
125599
+ }
125354
125600
  const fillFlags = this.fillFlags;
125355
125601
  if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.None !== (fillFlags & _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.Background)) {
125356
125602
  return false; // fill color explicitly from background
@@ -165347,7 +165593,6 @@ __webpack_require__.r(__webpack_exports__);
165347
165593
  /* harmony export */ AccuDrawRotateCycleTool: () => (/* binding */ AccuDrawRotateCycleTool),
165348
165594
  /* harmony export */ AccuDrawRotateElementTool: () => (/* binding */ AccuDrawRotateElementTool),
165349
165595
  /* harmony export */ AccuDrawRotateFrontTool: () => (/* binding */ AccuDrawRotateFrontTool),
165350
- /* harmony export */ AccuDrawRotatePerpendicularTool: () => (/* binding */ AccuDrawRotatePerpendicularTool),
165351
165596
  /* harmony export */ AccuDrawRotateSideTool: () => (/* binding */ AccuDrawRotateSideTool),
165352
165597
  /* harmony export */ AccuDrawRotateTopTool: () => (/* binding */ AccuDrawRotateTopTool),
165353
165598
  /* harmony export */ AccuDrawRotateViewTool: () => (/* binding */ AccuDrawRotateViewTool),
@@ -165370,9 +165615,8 @@ __webpack_require__.r(__webpack_exports__);
165370
165615
  /* harmony import */ var _AccuDraw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AccuDraw */ "../../core/frontend/lib/esm/AccuDraw.js");
165371
165616
  /* harmony import */ var _AccuSnap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../AccuSnap */ "../../core/frontend/lib/esm/AccuSnap.js");
165372
165617
  /* harmony import */ var _AuxCoordSys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AuxCoordSys */ "../../core/frontend/lib/esm/AuxCoordSys.js");
165373
- /* harmony import */ var _HitDetail__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../HitDetail */ "../../core/frontend/lib/esm/HitDetail.js");
165374
- /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
165375
- /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
165618
+ /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
165619
+ /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
165376
165620
  /*---------------------------------------------------------------------------------------------
165377
165621
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
165378
165622
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -165387,7 +165631,6 @@ __webpack_require__.r(__webpack_exports__);
165387
165631
 
165388
165632
 
165389
165633
 
165390
-
165391
165634
  // cSpell:ignore dont unlockedz
165392
165635
  function normalizedDifference(point1, point2, out) {
165393
165636
  return point2.vectorTo(point1).normalizeWithLength(out).mag;
@@ -165403,7 +165646,7 @@ function normalizedCrossProduct(vec1, vec2, out) {
165403
165646
  class AccuDrawShortcuts {
165404
165647
  /** Disable/Enable AccuDraw for the session */
165405
165648
  static sessionToggle() {
165406
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165649
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165407
165650
  if (accudraw.isEnabled)
165408
165651
  accudraw.disableForSession();
165409
165652
  else
@@ -165411,7 +165654,7 @@ class AccuDrawShortcuts {
165411
165654
  }
165412
165655
  /** Suspend/Unsuspend AccuDraw for the active tool */
165413
165656
  static suspendToggle() {
165414
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165657
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165415
165658
  if (!accudraw.isEnabled)
165416
165659
  return;
165417
165660
  if (accudraw.isActive)
@@ -165421,7 +165664,7 @@ class AccuDrawShortcuts {
165421
165664
  accudraw.refreshDecorationsAndDynamics();
165422
165665
  }
165423
165666
  static rotateAxesByPoint(isSnapped, aboutCurrentZ) {
165424
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165667
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165425
165668
  if (!accudraw.isEnabled)
165426
165669
  return false;
165427
165670
  const vp = accudraw.currentView;
@@ -165449,7 +165692,7 @@ class AccuDrawShortcuts {
165449
165692
  return true;
165450
165693
  }
165451
165694
  static updateACSByPoints(acs, vp, points, isDynamics) {
165452
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165695
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165453
165696
  if (!accudraw.isEnabled)
165454
165697
  return false;
165455
165698
  let accept = false;
@@ -165505,9 +165748,9 @@ class AccuDrawShortcuts {
165505
165748
  }
165506
165749
  return accept;
165507
165750
  }
165508
- static processPendingHints() { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.processHints(); }
165751
+ static processPendingHints() { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.processHints(); }
165509
165752
  static requestInputFocus() {
165510
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165753
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165511
165754
  if (!accudraw.isEnabled)
165512
165755
  return;
165513
165756
  accudraw.grabInputFocus();
@@ -165515,7 +165758,7 @@ class AccuDrawShortcuts {
165515
165758
  }
165516
165759
  // Helper method for GUI implementation...
165517
165760
  static async itemFieldNavigate(index, str, forward) {
165518
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165761
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165519
165762
  if (!accudraw.isEnabled)
165520
165763
  return;
165521
165764
  if (accudraw.getFieldLock(index))
@@ -165551,10 +165794,10 @@ class AccuDrawShortcuts {
165551
165794
  accudraw.setFocusItem(index);
165552
165795
  accudraw.dontMoveFocus = true;
165553
165796
  }
165554
- static itemFieldNewInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Partial); }
165555
- static itemFieldCompletedInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic); }
165797
+ static itemFieldNewInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Partial); }
165798
+ static itemFieldCompletedInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic); }
165556
165799
  static async itemFieldAcceptInput(index, str) {
165557
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165800
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165558
165801
  await accudraw.processFieldInput(index, str, true);
165559
165802
  accudraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic);
165560
165803
  if (accudraw.getFieldLock(index))
@@ -165592,7 +165835,7 @@ class AccuDrawShortcuts {
165592
165835
  accudraw.setFocusItem(index);
165593
165836
  }
165594
165837
  static itemFieldLockToggle(index) {
165595
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165838
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165596
165839
  if (!accudraw.isEnabled)
165597
165840
  return;
165598
165841
  if (accudraw.getFieldLock(index)) {
@@ -165637,21 +165880,21 @@ class AccuDrawShortcuts {
165637
165880
  accudraw.clearTentative();
165638
165881
  }
165639
165882
  static choosePreviousValue(index) {
165640
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165883
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165641
165884
  accudraw.getSavedValue(index, false);
165642
165885
  accudraw.refreshDecorationsAndDynamics();
165643
165886
  }
165644
165887
  static chooseNextValue(index) {
165645
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165888
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165646
165889
  accudraw.getSavedValue(index, true);
165647
165890
  accudraw.refreshDecorationsAndDynamics();
165648
165891
  }
165649
165892
  static clearSavedValues() {
165650
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165893
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165651
165894
  accudraw.clearSavedValues();
165652
165895
  }
165653
165896
  static itemRotationModeChange(rotation) {
165654
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165897
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165655
165898
  const vp = accudraw.currentView;
165656
165899
  const is3d = vp ? vp.view.is3d() : true;
165657
165900
  if (!is3d && (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Front === rotation || _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Side === rotation))
@@ -165661,7 +165904,7 @@ class AccuDrawShortcuts {
165661
165904
  }
165662
165905
  // Shortcut implementations for GUI entry points...
165663
165906
  static setOrigin(explicitOrigin) {
165664
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165907
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165665
165908
  if (!accudraw.isEnabled)
165666
165909
  return;
165667
165910
  if (explicitOrigin) {
@@ -165676,8 +165919,8 @@ class AccuDrawShortcuts {
165676
165919
  accudraw.flags.haveValidOrigin = true;
165677
165920
  }
165678
165921
  else {
165679
- const ev = new _Tool__WEBPACK_IMPORTED_MODULE_7__.BeButtonEvent();
165680
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.fillEventFromLastDataButton(ev);
165922
+ const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
165923
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.fillEventFromLastDataButton(ev);
165681
165924
  if (ev.viewport) {
165682
165925
  accudraw.published.origin.setFrom(ev.point);
165683
165926
  accudraw.flags.haveValidOrigin = true;
@@ -165706,7 +165949,7 @@ class AccuDrawShortcuts {
165706
165949
  accudraw.refreshDecorationsAndDynamics(); // NOTE: Will already grab input focus through processHints...
165707
165950
  }
165708
165951
  static changeCompassMode() {
165709
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165952
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165710
165953
  if (!accudraw.isEnabled)
165711
165954
  return;
165712
165955
  let axisLockStatus = accudraw.locked & _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.LockedStates.XY_BM;
@@ -165736,10 +165979,10 @@ class AccuDrawShortcuts {
165736
165979
  this.requestInputFocus();
165737
165980
  }
165738
165981
  static lockSmart() {
165739
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
165982
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165740
165983
  if (!accudraw.isEnabled)
165741
165984
  return;
165742
- const accuSnap = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap;
165985
+ const accuSnap = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap;
165743
165986
  // Don't want AccuSnap to influence axis or Z...
165744
165987
  if (accuSnap.isHot) {
165745
165988
  accuSnap.clear();
@@ -165821,7 +166064,7 @@ class AccuDrawShortcuts {
165821
166064
  }
165822
166065
  /** Disable indexing when not currently indexed; if indexed, enable respective lock. */
165823
166066
  static lockIndex() {
165824
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166067
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165825
166068
  if (!accudraw.isEnabled)
165826
166069
  return;
165827
166070
  if (accudraw.flags.indexLocked) {
@@ -165861,7 +166104,7 @@ class AccuDrawShortcuts {
165861
166104
  this.requestInputFocus();
165862
166105
  }
165863
166106
  static lockX() {
165864
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166107
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165865
166108
  if (!accudraw.isEnabled)
165866
166109
  return;
165867
166110
  accudraw.clearTentative();
@@ -165885,7 +166128,7 @@ class AccuDrawShortcuts {
165885
166128
  this.requestInputFocus();
165886
166129
  }
165887
166130
  static lockY() {
165888
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166131
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165889
166132
  if (!accudraw.isEnabled)
165890
166133
  return;
165891
166134
  accudraw.clearTentative();
@@ -165909,7 +166152,7 @@ class AccuDrawShortcuts {
165909
166152
  this.requestInputFocus();
165910
166153
  }
165911
166154
  static lockZ() {
165912
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166155
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165913
166156
  if (!accudraw.isEnabled)
165914
166157
  return;
165915
166158
  const vp = accudraw.currentView;
@@ -165931,7 +166174,7 @@ class AccuDrawShortcuts {
165931
166174
  this.requestInputFocus();
165932
166175
  }
165933
166176
  static lockDistance() {
165934
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166177
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165935
166178
  if (!accudraw.isEnabled)
165936
166179
  return;
165937
166180
  const isSnapped = accudraw.clearTentative();
@@ -165957,14 +166200,14 @@ class AccuDrawShortcuts {
165957
166200
  this.requestInputFocus();
165958
166201
  }
165959
166202
  static lockAngle() {
165960
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166203
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165961
166204
  if (!accudraw.isEnabled)
165962
166205
  return;
165963
166206
  accudraw.doLockAngle(accudraw.clearTentative());
165964
166207
  this.requestInputFocus();
165965
166208
  }
165966
166209
  static setStandardRotation(rotation) {
165967
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166210
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165968
166211
  if (!accudraw.isEnabled)
165969
166212
  return;
165970
166213
  if (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context === rotation) {
@@ -165982,7 +166225,7 @@ class AccuDrawShortcuts {
165982
166225
  this.requestInputFocus();
165983
166226
  }
165984
166227
  static alignView() {
165985
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166228
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
165986
166229
  if (!accudraw.isEnabled)
165987
166230
  return;
165988
166231
  const vp = accudraw.currentView;
@@ -166000,9 +166243,9 @@ class AccuDrawShortcuts {
166000
166243
  vp.animateFrustumChange();
166001
166244
  this.requestInputFocus();
166002
166245
  }
166003
- static rotateToBase() { this.setStandardRotation(_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.flags.baseRotation); }
166246
+ static rotateToBase() { this.setStandardRotation(_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.flags.baseRotation); }
166004
166247
  static rotateToACS() {
166005
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166248
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166006
166249
  if (!accudraw.isEnabled)
166007
166250
  return;
166008
166251
  // NOTE: Match current ACS orientation..reset auxRotationPlane to top!
@@ -166010,7 +166253,7 @@ class AccuDrawShortcuts {
166010
166253
  this.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.ACS);
166011
166254
  }
166012
166255
  static rotateCycle() {
166013
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166256
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166014
166257
  if (!accudraw.isEnabled)
166015
166258
  return;
166016
166259
  const vp = accudraw.currentView;
@@ -166073,7 +166316,7 @@ class AccuDrawShortcuts {
166073
166316
  this.setStandardRotation(rotation);
166074
166317
  }
166075
166318
  static rotate90(axis) {
166076
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166319
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166077
166320
  if (!accudraw.isEnabled)
166078
166321
  return;
166079
166322
  const newRotation = new _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ThreeAxes();
@@ -166100,22 +166343,19 @@ class AccuDrawShortcuts {
166100
166343
  this.requestInputFocus();
166101
166344
  }
166102
166345
  static async rotateAxes(aboutCurrentZ) {
166103
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotateAxes", aboutCurrentZ);
166346
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.RotateAxes", aboutCurrentZ);
166104
166347
  }
166105
166348
  static async rotateToElement() {
166106
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotateElement");
166107
- }
166108
- static async rotatePerpendicular() {
166109
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.RotatePerpendicular");
166349
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.RotateElement");
166110
166350
  }
166111
166351
  static async defineACSByElement() {
166112
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.DefineACSByElement");
166352
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.DefineACSByElement");
166113
166353
  }
166114
166354
  static async defineACSByPoints() {
166115
- return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tools.run("AccuDraw.DefineACSByPoints");
166355
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run("AccuDraw.DefineACSByPoints");
166116
166356
  }
166117
166357
  static getACS(acsName, useOrigin, useRotation) {
166118
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166358
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166119
166359
  if (!accudraw.isEnabled)
166120
166360
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
166121
166361
  const vp = accudraw.currentView;
@@ -166174,7 +166414,7 @@ class AccuDrawShortcuts {
166174
166414
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS;
166175
166415
  }
166176
166416
  static writeACS(_acsName) {
166177
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166417
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166178
166418
  if (!accudraw.isEnabled)
166179
166419
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
166180
166420
  const vp = accudraw.currentView;
@@ -166200,13 +166440,13 @@ class AccuDrawShortcuts {
166200
166440
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS;
166201
166441
  }
166202
166442
  static itemFieldUnlockAll() {
166203
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166443
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166204
166444
  if (accudraw.isEnabled)
166205
166445
  accudraw.unlockAllFields();
166206
166446
  }
166207
166447
  }
166208
166448
  /** @beta */
166209
- class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166449
+ class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166210
166450
  static toolId = "AccuDraw.SessionToggle";
166211
166451
  async run() {
166212
166452
  AccuDrawShortcuts.sessionToggle();
@@ -166214,7 +166454,7 @@ class AccuDrawSessionToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
166214
166454
  }
166215
166455
  }
166216
166456
  /** @beta */
166217
- class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166457
+ class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166218
166458
  static toolId = "AccuDraw.SuspendToggle";
166219
166459
  async run() {
166220
166460
  AccuDrawShortcuts.suspendToggle();
@@ -166222,7 +166462,7 @@ class AccuDrawSuspendToggleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
166222
166462
  }
166223
166463
  }
166224
166464
  /** @beta */
166225
- class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166465
+ class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166226
166466
  static toolId = "AccuDraw.SetOrigin";
166227
166467
  async run() {
166228
166468
  AccuDrawShortcuts.setOrigin();
@@ -166230,7 +166470,7 @@ class AccuDrawSetOriginTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166230
166470
  }
166231
166471
  }
166232
166472
  /** @beta */
166233
- class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166473
+ class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166234
166474
  static toolId = "AccuDraw.LockSmart";
166235
166475
  async run() {
166236
166476
  AccuDrawShortcuts.lockSmart();
@@ -166238,7 +166478,7 @@ class AccuDrawSetLockSmartTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166238
166478
  }
166239
166479
  }
166240
166480
  /** @beta */
166241
- class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166481
+ class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166242
166482
  static toolId = "AccuDraw.LockIndex";
166243
166483
  async run() {
166244
166484
  AccuDrawShortcuts.lockIndex();
@@ -166246,7 +166486,7 @@ class AccuDrawSetLockIndexTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166246
166486
  }
166247
166487
  }
166248
166488
  /** @beta */
166249
- class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166489
+ class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166250
166490
  static toolId = "AccuDraw.LockX";
166251
166491
  async run() {
166252
166492
  AccuDrawShortcuts.lockX();
@@ -166254,7 +166494,7 @@ class AccuDrawSetLockXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166254
166494
  }
166255
166495
  }
166256
166496
  /** @beta */
166257
- class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166497
+ class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166258
166498
  static toolId = "AccuDraw.LockY";
166259
166499
  async run() {
166260
166500
  AccuDrawShortcuts.lockY();
@@ -166262,7 +166502,7 @@ class AccuDrawSetLockYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166262
166502
  }
166263
166503
  }
166264
166504
  /** @beta */
166265
- class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166505
+ class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166266
166506
  static toolId = "AccuDraw.LockZ";
166267
166507
  async run() {
166268
166508
  AccuDrawShortcuts.lockZ();
@@ -166270,7 +166510,7 @@ class AccuDrawSetLockZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166270
166510
  }
166271
166511
  }
166272
166512
  /** @beta */
166273
- class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166513
+ class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166274
166514
  static toolId = "AccuDraw.LockDistance";
166275
166515
  async run() {
166276
166516
  AccuDrawShortcuts.lockDistance();
@@ -166278,7 +166518,7 @@ class AccuDrawSetLockDistanceTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Too
166278
166518
  }
166279
166519
  }
166280
166520
  /** @beta */
166281
- class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166521
+ class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166282
166522
  static toolId = "AccuDraw.LockAngle";
166283
166523
  async run() {
166284
166524
  AccuDrawShortcuts.lockAngle();
@@ -166286,7 +166526,7 @@ class AccuDrawSetLockAngleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166286
166526
  }
166287
166527
  }
166288
166528
  /** @beta */
166289
- class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166529
+ class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166290
166530
  static toolId = "AccuDraw.ChangeMode";
166291
166531
  async run() {
166292
166532
  AccuDrawShortcuts.changeCompassMode();
@@ -166294,7 +166534,7 @@ class AccuDrawChangeModeTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166294
166534
  }
166295
166535
  }
166296
166536
  /** @beta */
166297
- class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166537
+ class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166298
166538
  static toolId = "AccuDraw.RotateCycle";
166299
166539
  async run() {
166300
166540
  AccuDrawShortcuts.rotateCycle();
@@ -166302,7 +166542,7 @@ class AccuDrawRotateCycleTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166302
166542
  }
166303
166543
  }
166304
166544
  /** @beta */
166305
- class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166545
+ class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166306
166546
  static toolId = "AccuDraw.RotateTop";
166307
166547
  async run() {
166308
166548
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Top);
@@ -166310,7 +166550,7 @@ class AccuDrawRotateTopTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166310
166550
  }
166311
166551
  }
166312
166552
  /** @beta */
166313
- class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166553
+ class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166314
166554
  static toolId = "AccuDraw.RotateFront";
166315
166555
  async run() {
166316
166556
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Front);
@@ -166318,7 +166558,7 @@ class AccuDrawRotateFrontTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166318
166558
  }
166319
166559
  }
166320
166560
  /** @beta */
166321
- class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166561
+ class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166322
166562
  static toolId = "AccuDraw.RotateSide";
166323
166563
  async run() {
166324
166564
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Side);
@@ -166326,7 +166566,7 @@ class AccuDrawRotateSideTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166326
166566
  }
166327
166567
  }
166328
166568
  /** @beta */
166329
- class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166569
+ class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166330
166570
  static toolId = "AccuDraw.RotateView";
166331
166571
  async run() {
166332
166572
  AccuDrawShortcuts.setStandardRotation(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.View);
@@ -166334,7 +166574,7 @@ class AccuDrawRotateViewTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166334
166574
  }
166335
166575
  }
166336
166576
  /** @beta */
166337
- class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166577
+ class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166338
166578
  static toolId = "AccuDraw.Rotate90AboutX";
166339
166579
  async run() {
166340
166580
  AccuDrawShortcuts.rotate90(0);
@@ -166342,7 +166582,7 @@ class AccuDrawRotate90AboutXTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
166342
166582
  }
166343
166583
  }
166344
166584
  /** @beta */
166345
- class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166585
+ class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166346
166586
  static toolId = "AccuDraw.Rotate90AboutY";
166347
166587
  async run() {
166348
166588
  AccuDrawShortcuts.rotate90(1);
@@ -166350,7 +166590,7 @@ class AccuDrawRotate90AboutYTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
166350
166590
  }
166351
166591
  }
166352
166592
  /** @beta */
166353
- class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool {
166593
+ class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.Tool {
166354
166594
  static toolId = "AccuDraw.Rotate90AboutZ";
166355
166595
  async run() {
166356
166596
  AccuDrawShortcuts.rotate90(2);
@@ -166358,13 +166598,13 @@ class AccuDrawRotate90AboutZTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.Tool
166358
166598
  }
166359
166599
  }
166360
166600
  /** @internal */
166361
- class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputCollector {
166601
+ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_6__.InputCollector {
166362
166602
  _complete = false;
166363
- get allowShortcut() { return this.wantActivateOnStart ? _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isEnabled : true; }
166603
+ get allowShortcut() { return this.wantActivateOnStart ? _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.isEnabled : true; }
166364
166604
  get wantActivateOnStart() { return false; } // Whether to automatically enable AccuDraw before the 1st data button...
166365
166605
  get wantClearSnapOnStart() { return false; } // Whether to preserve active Tentative/AccuSnap on install...
166366
166606
  get wantManipulationImmediate() { return false; } // Whether additional input is required to process on install...
166367
- get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down (see rotate perpendicular)...
166607
+ get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down...
166368
166608
  async onInstall() {
166369
166609
  if (!this.allowShortcut)
166370
166610
  return false;
@@ -166373,7 +166613,7 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
166373
166613
  async onPostInstall() {
166374
166614
  await super.onPostInstall();
166375
166615
  if (this.wantActivateOnStart)
166376
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.activate();
166616
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.activate();
166377
166617
  this.onManipulationStart();
166378
166618
  if (this.wantManipulationImmediate && this.doManipulation(undefined, false)) {
166379
166619
  this._complete = true;
@@ -166381,18 +166621,18 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
166381
166621
  }
166382
166622
  // NOTE: InputCollector inherits suspended primitive's state, set everything...
166383
166623
  if (this.wantClearSnapOnStart) {
166384
- 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...
166624
+ 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...
166385
166625
  }
166386
166626
  else {
166387
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.locateManager.initLocateOptions();
166388
- this.changeLocateState(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_7__.CoordinateLockOverrides.None);
166627
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.initLocateOptions();
166628
+ this.changeLocateState(false, true, undefined, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.None);
166389
166629
  }
166390
166630
  this.doManipulation(undefined, true);
166391
166631
  ;
166392
166632
  }
166393
166633
  async onCleanup() {
166394
166634
  if (this._complete)
166395
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
166635
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
166396
166636
  }
166397
166637
  async exitTool() {
166398
166638
  await super.exitTool();
@@ -166404,12 +166644,12 @@ class AccuDrawShortcutsTool extends _Tool__WEBPACK_IMPORTED_MODULE_7__.InputColl
166404
166644
  if (!this.wantExitOnDataButtonUp)
166405
166645
  await this.exitTool();
166406
166646
  }
166407
- return _Tool__WEBPACK_IMPORTED_MODULE_7__.EventHandled.No;
166647
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
166408
166648
  }
166409
166649
  async onDataButtonUp(_ev) {
166410
166650
  if (this._complete && this.wantExitOnDataButtonUp)
166411
166651
  await this.exitTool();
166412
- return _Tool__WEBPACK_IMPORTED_MODULE_7__.EventHandled.No;
166652
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
166413
166653
  }
166414
166654
  async onMouseMotion(ev) {
166415
166655
  this.doManipulation(ev, true);
@@ -166427,14 +166667,14 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
166427
166667
  this.aboutCurrentZ = aboutCurrentZ;
166428
166668
  }
166429
166669
  /** @internal */
166430
- get allowShortcut() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isActive; } // Require compass to already be active for this shortcut...
166670
+ get allowShortcut() { return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.isActive; } // Require compass to already be active for this shortcut...
166431
166671
  /** @internal */
166432
166672
  get wantActivateOnStart() { return true; } // State is demoted to inactive when a tool install, still need this...
166433
166673
  /** @internal */
166434
166674
  get wantManipulationImmediate() {
166435
166675
  if (_AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.isHot)
166436
166676
  return true;
166437
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166677
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166438
166678
  if (_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.CompassMode.Polar === accudraw.compassMode)
166439
166679
  return accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.ANGLE_Item);
166440
166680
  return accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.X_Item) && accudraw.getFieldLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.ItemField.Y_Item);
@@ -166442,12 +166682,12 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
166442
166682
  /** @internal */
166443
166683
  onManipulationStart() {
166444
166684
  if (this.aboutCurrentZ)
166445
- _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...
166446
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.RotateAxes.Prompts.FirstPoint");
166685
+ _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...
166686
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.RotateAxes.Prompts.FirstPoint");
166447
166687
  }
166448
166688
  /** @internal */
166449
166689
  doManipulation(ev, isMotion) {
166450
- const vp = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.currentView;
166690
+ const vp = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.currentView;
166451
166691
  if (!vp)
166452
166692
  return false;
166453
166693
  if (!AccuDrawShortcuts.rotateAxesByPoint(_AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.isHot, this.aboutCurrentZ))
@@ -166455,7 +166695,7 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
166455
166695
  vp.invalidateDecorations();
166456
166696
  if (!isMotion) {
166457
166697
  AccuDrawShortcuts.itemFieldUnlockAll();
166458
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.clear(true);
166698
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.clear(true);
166459
166699
  }
166460
166700
  return true;
166461
166701
  }
@@ -166470,15 +166710,15 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
166470
166710
  /** @beta */
166471
166711
  class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
166472
166712
  static toolId = "AccuDraw.RotateElement";
166473
- _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...
166713
+ _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...
166474
166714
  /** @internal */
166475
166715
  get wantActivateOnStart() { return true; }
166476
166716
  /** @internal */
166477
- get wantManipulationImmediate() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isSnapped; }
166717
+ get wantManipulationImmediate() { return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.isSnapped; }
166478
166718
  /** @internal */
166479
166719
  onManipulationStart() {
166480
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin); // Don't move compass when updateOrientation returns false...
166481
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
166720
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin); // Don't move compass when updateOrientation returns false...
166721
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
166482
166722
  }
166483
166723
  /** @internal */
166484
166724
  onManipulationComplete() {
@@ -166489,7 +166729,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
166489
166729
  }
166490
166730
  /** @internal */
166491
166731
  updateOrientation(snap, viewport, _isMotion) {
166492
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166732
+ const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw;
166493
166733
  const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, viewport);
166494
166734
  if (undefined === rMatrix)
166495
166735
  return false;
@@ -166499,7 +166739,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
166499
166739
  }
166500
166740
  /** @internal */
166501
166741
  doManipulation(ev, isMotion) {
166502
- const viewport = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.currentView;
166742
+ const viewport = ev ? ev.viewport : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.currentView;
166503
166743
  if (!viewport)
166504
166744
  return false;
166505
166745
  const snap = _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.getCurrentSnap(false);
@@ -166508,60 +166748,7 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
166508
166748
  if (undefined === ev)
166509
166749
  AccuDrawShortcuts.processPendingHints(); // Would normally be processed after button down, necessary when called from post install...
166510
166750
  if (!isMotion)
166511
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Hold temporary rotation for tool duration...
166512
- return true;
166513
- }
166514
- }
166515
- /** @beta */
166516
- class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
166517
- static toolId = "AccuDraw.RotatePerpendicular";
166518
- _location;
166519
- /** @internal */
166520
- get wantExitOnDataButtonUp() { return true; } // Complete on button up since button down clears tentative...
166521
- /** @internal */
166522
- onManipulationComplete() {
166523
- if (undefined !== this._location) {
166524
- // Use tentative to hold adjusted snap location for suspended tool...
166525
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.setPoint(this._location.point);
166526
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.viewport = this._location.viewport;
166527
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.showTentative();
166528
- }
166529
- return _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetRMatrix | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.Disable;
166530
- }
166531
- /** @internal */
166532
- updateOrientation(snap, viewport, isMotion) {
166533
- const curve = snap.getCurvePrimitive();
166534
- if (undefined === curve)
166535
- return false;
166536
- const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
166537
- const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, viewport);
166538
- if (undefined === rMatrix)
166539
- return false;
166540
- const zVec = rMatrix.getRow(2); // This is a row matrix...
166541
- const spacePoint = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawHintBuilder.projectPointToPlaneInView(accudraw.origin, snap.getPoint(), zVec, viewport, true);
166542
- if (undefined === spacePoint)
166543
- return false;
166544
- const detail = curve.closestPoint(spacePoint, true);
166545
- if (undefined === detail?.curve)
166546
- return false;
166547
- const point = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accudraw.origin, zVec, viewport, true);
166548
- if (undefined === point)
166549
- return false;
166550
- const xVec = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
166551
- if (normalizedDifference(point, accudraw.origin, xVec) < _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians)
166552
- return false;
166553
- ; // Closest point and compass origin coincide...
166554
- const yVec = xVec.unitCrossProduct(zVec);
166555
- if (undefined === yVec)
166556
- return false;
166557
- rMatrix.setColumns(xVec, yVec, zVec);
166558
- _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRigidFromMatrix3d(rMatrix, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.AxisOrder.XZY, rMatrix);
166559
- rMatrix.transposeInPlace();
166560
- snap.setSnapPoint(point, _HitDetail__WEBPACK_IMPORTED_MODULE_5__.SnapHeat.InRange); // Force hot snap so that adjust point uses it for alignments...
166561
- accudraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetRMatrix | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.AlwaysSetOrigin, accudraw.origin, rMatrix);
166562
- accudraw.adjustPoint(point, viewport, false); // Update internals for new snap location...
166563
- if (!isMotion)
166564
- this._location = { point, viewport };
166751
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.changeBaseRotationMode(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.RotationMode.Context); // Hold temporary rotation for tool duration...
166565
166752
  return true;
166566
166753
  }
166567
166754
  }
@@ -166572,7 +166759,7 @@ class DefineACSByElementTool extends AccuDrawShortcutsTool {
166572
166759
  _rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createIdentity();
166573
166760
  _acs;
166574
166761
  /** @internal */
166575
- onManipulationStart() { _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint"); }
166762
+ onManipulationStart() { _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint"); }
166576
166763
  /** @internal */
166577
166764
  updateOrientation(snap, vp) {
166578
166765
  const rMatrix = _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDraw.getSnapRotation(snap, vp);
@@ -166590,7 +166777,7 @@ class DefineACSByElementTool extends AccuDrawShortcutsTool {
166590
166777
  const snapDetail = _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.getCurrentSnap(false);
166591
166778
  if (undefined === snapDetail || !this.updateOrientation(snapDetail, vp))
166592
166779
  return false;
166593
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.viewManager.invalidateDecorationsAllViews();
166780
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.invalidateDecorationsAllViews();
166594
166781
  if (isMotion)
166595
166782
  return true;
166596
166783
  if (!this._acs)
@@ -166618,24 +166805,24 @@ class DefineACSByPointsTool extends AccuDrawShortcutsTool {
166618
166805
  _acs;
166619
166806
  /** @internal */
166620
166807
  onManipulationStart() {
166621
- if (!_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isActive) {
166622
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.FirstPoint");
166808
+ if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.isActive) {
166809
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.FirstPoint");
166623
166810
  return;
166624
166811
  }
166625
- const origin = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.getPoint().clone();
166626
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.SecondPoint");
166627
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetOrigin | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin, origin);
166812
+ const origin = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.getPoint().clone();
166813
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.SecondPoint");
166814
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.setContext(_AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.SetOrigin | _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.AccuDrawFlags.FixedOrigin, origin);
166628
166815
  this._points.push(origin);
166629
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.clear(true);
166816
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tentativePoint.clear(true);
166630
166817
  }
166631
166818
  /** @internal */
166632
166819
  doManipulation(ev, isMotion) {
166633
166820
  if (!ev || !ev.viewport)
166634
166821
  return false;
166635
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.viewManager.invalidateDecorationsAllViews();
166822
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.invalidateDecorationsAllViews();
166636
166823
  if (isMotion)
166637
166824
  return false;
166638
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.activate();
166825
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuDraw.activate();
166639
166826
  this._points.push(ev.point.clone());
166640
166827
  const vp = ev.viewport;
166641
166828
  if (!this._acs)
@@ -166645,15 +166832,15 @@ class DefineACSByPointsTool extends AccuDrawShortcutsTool {
166645
166832
  AccuDrawShortcuts.rotateToACS();
166646
166833
  return true;
166647
166834
  }
166648
- _Tool__WEBPACK_IMPORTED_MODULE_7__.CoreTools.outputPromptByKey(`AccuDraw.DefineACSByPoints.Prompts${1 === this._points.length ? ".SecondPoint" : ".NextPoint"}`);
166835
+ _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.outputPromptByKey(`AccuDraw.DefineACSByPoints.Prompts${1 === this._points.length ? ".SecondPoint" : ".NextPoint"}`);
166649
166836
  return false;
166650
166837
  }
166651
166838
  /** @internal */
166652
166839
  decorate(context) {
166653
166840
  const tmpPoints = [];
166654
166841
  this._points.forEach((pt) => tmpPoints.push(pt));
166655
- const ev = new _Tool__WEBPACK_IMPORTED_MODULE_7__.BeButtonEvent();
166656
- _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
166842
+ const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
166843
+ _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
166657
166844
  tmpPoints.push(ev.point);
166658
166845
  const vp = context.viewport;
166659
166846
  if (!this._acs)
@@ -180449,6 +180636,20 @@ class Geometry {
180449
180636
  static isAlmostEqualEitherNumber(a, b, c, tolerance = Geometry.smallAngleRadians) {
180450
180637
  return this.isAlmostEqualNumber(a, b, tolerance) || this.isAlmostEqualNumber(a, c, tolerance);
180451
180638
  }
180639
+ /**
180640
+ * Toleranced test for equality to any of `count` numbers supplied by `iterator`.
180641
+ * @param a value to test
180642
+ * @param values array of values to test against, or an object that provides the i_th value, where 0 <= i < length.
180643
+ * @param tolerance relative tolerance. Default value is [[smallAngleRadians]].
180644
+ * @returns true if and only if `a` is almost equal to at least one value supplied by `iterator`.
180645
+ */
180646
+ static isAlmostEqualAnyNumber(a, values, tolerance = Geometry.smallAngleRadians) {
180647
+ const value = Array.isArray(values) ? (i) => values[i] : values.iter;
180648
+ for (let i = 0; i < values.length; i++)
180649
+ if (this.isAlmostEqualNumber(a, value(i), tolerance))
180650
+ return true;
180651
+ return false;
180652
+ }
180452
180653
  /**
180453
180654
  * Toleranced equality test using tolerance `tolerance * ( 1 + abs(a.x) + abs(a.y) + abs(b.x) + abs(b.y) )`.
180454
180655
  * * [[smallAngleRadians]] is used if tolerance is `undefined`.
@@ -193759,6 +193960,42 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
193759
193960
  }
193760
193961
  return result;
193761
193962
  }
193963
+ /** Override of [[CurvePrimitive.emitTangents]] for Arc3d. */
193964
+ emitTangents(spacePoint, announceTangent, options) {
193965
+ const centerToPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(this.centerRef, spacePoint);
193966
+ let centerToLocalPoint;
193967
+ if (options?.vectorToEye) {
193968
+ const arcToView = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createColumns(this.matrixRef.getColumn(0), this.matrixRef.getColumn(1), options.vectorToEye);
193969
+ centerToLocalPoint = arcToView.multiplyInverse(centerToPoint);
193970
+ }
193971
+ else {
193972
+ centerToLocalPoint = this.matrixRef.multiplyInverse(centerToPoint);
193973
+ }
193974
+ if (centerToLocalPoint === undefined)
193975
+ return;
193976
+ // centerToLocalPoint is a vector in the local coordinate system of the as-viewed arc.
193977
+ // In other words, the local arc is the unit circle.
193978
+ // alpha is the angle from the local x-axis to centerToLocalPoint.
193979
+ // beta is the nonnegative angle from centerToLocalPoint to a tangency radial.
193980
+ // Tangency angles are preserved by local <-> world transformation.
193981
+ if (centerToLocalPoint !== undefined) {
193982
+ const hypotenuseSquared = centerToLocalPoint.magnitudeSquaredXY();
193983
+ if (hypotenuseSquared >= 1.0) { // localPoint lies outside or on the unit circle...
193984
+ // ...and forms a right triangle with unit radial leg to tangent point
193985
+ const distanceToTangency = Math.sqrt(hypotenuseSquared - 1.0);
193986
+ const alpha = Math.atan2(centerToLocalPoint.y, centerToLocalPoint.x);
193987
+ const beta = Math.atan2(distanceToTangency, 1);
193988
+ const angles = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSmallAngleRadians(beta) ? [alpha] : [alpha + beta, alpha - beta];
193989
+ for (const theta of angles) {
193990
+ const f = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_14__.CurveExtendOptions.resolveRadiansToValidSweepFraction(options?.extend ?? false, theta, this.sweep);
193991
+ if (f.isValid) {
193992
+ const tangent = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPoint(this, f.fraction, this.fractionToPoint(f.fraction));
193993
+ announceTangent(tangent);
193994
+ }
193995
+ }
193996
+ }
193997
+ }
193998
+ }
193762
193999
  /** Reverse the sweep of the arc. */
193763
194000
  reverseInPlace() {
193764
194001
  this._sweep.reverseInPlace();
@@ -196073,38 +196310,42 @@ class CurveExtendOptions {
196073
196310
  return fraction;
196074
196311
  }
196075
196312
  /**
196076
- * Adjust a radians value to an angle sweep, allowing the extendParam to affect choice among periodic fractions.
196077
- * * If radians is within the sweep, convert it to a fraction of the sweep.
196078
- * * If radians is outside, use the extendParam to choose among:
196079
- * * fraction below 0.
196080
- * * fraction above 1.
196313
+ * Adjust a radians value to an angle sweep, extending beyond or clamping to [0,1] according to `extendParam`:
196314
+ * * If `radians` is within the sweep, convert it to a fraction of the sweep.
196315
+ * * If `radians` is outside the sweep and `extendParam` does not allow extension at both ends, adjust the fraction:
196316
+ * * fraction below 0 if `extendParam` allows extension only at start
196317
+ * * fraction above 1 if `extendParam` allows extension only at end
196318
+ * * fraction clamped to [0,1] if `extendParam` disallows extension at both ends
196319
+ * @returns adjusted fraction of sweep, and a boolean indicating whether it is valid, i.e. whether `radians` lies in
196320
+ * the sweep extended per `extendParam`.
196081
196321
  */
196082
- static resolveRadiansToSweepFraction(extendParam, radians, sweep) {
196322
+ static resolveRadiansToValidSweepFraction(extendParam, radians, sweep) {
196083
196323
  let fraction = sweep.radiansToSignedPeriodicFraction(radians);
196324
+ let isValid = true;
196084
196325
  if (!sweep.isRadiansInSweep(radians)) {
196085
196326
  const fractionPeriod = sweep.fractionPeriod();
196086
196327
  const mode0 = CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendParam, 0);
196087
196328
  const mode1 = CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendParam, 1);
196088
196329
  if (mode0 !== CurveExtendMode.None) {
196089
- if (mode1 !== CurveExtendMode.None) {
196090
- // both extensions possible; let the sweep resolve to the "closer" end
196091
- fraction = sweep.radiansToSignedPeriodicFraction(radians);
196092
- }
196093
- else {
196094
- // only extend to negative
196330
+ if (mode1 === CurveExtendMode.None) { // only extend to negative
196095
196331
  if (fraction > 1.0)
196096
196332
  fraction -= fractionPeriod;
196097
196333
  }
196098
196334
  }
196099
- else if (mode1 !== CurveExtendMode.None) {
196335
+ else if (mode1 !== CurveExtendMode.None) { // only extend to positive
196100
196336
  if (fraction < 0.0)
196101
196337
  fraction += fractionPeriod;
196102
196338
  }
196103
- else { // both clamped
196339
+ else { // no extension allowed
196104
196340
  fraction = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.clamp(fraction, 0, 1);
196341
+ isValid = false;
196105
196342
  }
196106
196343
  }
196107
- return fraction;
196344
+ return { fraction, isValid };
196345
+ }
196346
+ /** Call [[resolveRadiansToValidSweepFraction]] and return only the fraction. */
196347
+ static resolveRadiansToSweepFraction(extendParam, radians, sweep) {
196348
+ return this.resolveRadiansToValidSweepFraction(extendParam, radians, sweep).fraction;
196108
196349
  }
196109
196350
  }
196110
196351
 
@@ -197524,7 +197765,7 @@ __webpack_require__.r(__webpack_exports__);
197524
197765
  /* harmony export */ CurvePrimitive: () => (/* binding */ CurvePrimitive)
197525
197766
  /* harmony export */ });
197526
197767
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
197527
- /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
197768
+ /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
197528
197769
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
197529
197770
  /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
197530
197771
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
@@ -197533,8 +197774,9 @@ __webpack_require__.r(__webpack_exports__);
197533
197774
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
197534
197775
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
197535
197776
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
197536
- /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
197777
+ /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
197537
197778
  /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
197779
+ /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
197538
197780
  /* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
197539
197781
  /*---------------------------------------------------------------------------------------------
197540
197782
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -197556,6 +197798,7 @@ __webpack_require__.r(__webpack_exports__);
197556
197798
 
197557
197799
 
197558
197800
 
197801
+
197559
197802
  /**
197560
197803
  * A curve primitive is bounded.
197561
197804
  * A curve primitive maps fractions in 0..1 to points in space.
@@ -197944,12 +198187,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
197944
198187
  * * Since CurvePrimitive should always have start and end available as candidate points, this method should always
197945
198188
  * succeed.
197946
198189
  * @param spacePoint point in space.
197947
- * @param extend if applicable, compute the closest point to the curve extended according to variant type:
197948
- * * false: do not extend the curve
197949
- * * true: extend the curve at both start and end
197950
- * * CurveExtendOptions: extend the curve in the specified manner at both start and end
197951
- * * CurveExtendOptions[]: first entry applies to curve start; second, to curve end; any other entries ignored
197952
- * @param result optional pre-allocated detail to populate and return.
198190
+ * @param extend (optional) compute the closest point to the curve extended according to variant type (default false)
198191
+ * @param result (optional) pre-allocated detail to populate and return.
197953
198192
  * @returns details of the closest point.
197954
198193
  */
197955
198194
  closestPoint(spacePoint, extend, result) {
@@ -197957,6 +198196,62 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
197957
198196
  this.emitStrokableParts(strokeHandler);
197958
198197
  return strokeHandler.claimResult();
197959
198198
  }
198199
+ /**
198200
+ * Announce all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
198201
+ * the view defined by `options.vectorToEye`.
198202
+ * * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve
198203
+ * tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to
198204
+ * `options.vectorToEye`.
198205
+ * @param spacePoint point in space.
198206
+ * @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused
198207
+ * internally, so it should be cloned in the callback if it needs to be saved.
198208
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
198209
+ */
198210
+ emitTangents(spacePoint, announceTangent, options) {
198211
+ const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
198212
+ this.emitStrokableParts(strokeHandler, options?.strokeOptions);
198213
+ }
198214
+ /**
198215
+ * Return all points `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
198216
+ * the view defined by `options.vectorToEye`.
198217
+ * * See [[emitTangents]] for the definition of tangency employed.
198218
+ * @param spacePoint point in space.
198219
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
198220
+ * @returns an array of details of all tangent points or undefined if no tangent was found.
198221
+ */
198222
+ allTangents(spacePoint, options) {
198223
+ const tangents = [];
198224
+ this.emitTangents(spacePoint, (t) => tangents.push(t.clone()), options);
198225
+ return (tangents.length === 0) ? undefined : tangents;
198226
+ }
198227
+ /**
198228
+ * Return the point `P` on the curve such that the line containing `spacePoint` and `P` is tangent to the curve in
198229
+ * the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.
198230
+ * * See [[emitTangents]] for the definition of tangency employed.
198231
+ * @param spacePoint point in space.
198232
+ * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
198233
+ * @returns the detail of the closest tangent point or undefined if no tangent was found.
198234
+ */
198235
+ closestTangent(spacePoint, options) {
198236
+ const hint = options?.hintPoint ?? spacePoint;
198237
+ let toLocal;
198238
+ if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))
198239
+ toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);
198240
+ const measureHintDist2 = (pt) => {
198241
+ return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);
198242
+ };
198243
+ let closestTangent;
198244
+ let closestDist2 = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.largeCoordinateResult;
198245
+ const collectClosestTangent = (tangent) => {
198246
+ const dist2 = measureHintDist2(tangent.point);
198247
+ if (!closestTangent || dist2 < closestDist2) {
198248
+ closestTangent = tangent.clone(closestTangent);
198249
+ closestDist2 = dist2;
198250
+ }
198251
+ };
198252
+ this.emitTangents(spacePoint, collectClosestTangent, options);
198253
+ return closestTangent;
198254
+ }
197960
198255
  /**
197961
198256
  * Find intervals of this curvePrimitive that are interior to a clipper
197962
198257
  * @param clipper clip structure (e.g. clip planes)
@@ -198004,7 +198299,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
198004
198299
  * @returns Return the number of CurveLocationDetail's added to the result array.
198005
198300
  */
198006
198301
  appendPlaneIntersectionPoints(plane, result) {
198007
- const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
198302
+ const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.AppendPlaneIntersectionStrokeHandler(plane, result);
198008
198303
  const n0 = result.length;
198009
198304
  this.emitStrokableParts(strokeHandler);
198010
198305
  return result.length - n0;
@@ -198101,7 +198396,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
198101
198396
  computeAndAttachRecursiveStrokeCounts(options, parentMap) {
198102
198397
  const n = this.computeStrokeCountForOptions(options);
198103
198398
  const a = this.curveLength();
198104
- CurvePrimitive.installStrokeCountMap(this, _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_12__.StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a), parentMap);
198399
+ CurvePrimitive.installStrokeCountMap(this, _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_13__.StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a), parentMap);
198105
198400
  }
198106
198401
  /**
198107
198402
  * Evaluate strokes at fractions indicated in a StrokeCountMap.
@@ -200198,9 +200493,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePri
200198
200493
  handler.startCurvePrimitive(this);
200199
200494
  if (n > 1) {
200200
200495
  const df = 1.0 / (n - 1);
200201
- // This is a linestring.
200202
- // There is no need for chordTol and angleTol within a segment.
200203
- // Do NOT apply min strokes per primitive.
200496
+ // this is a line string; there is no need for chordTol and angleTol within a segment
200497
+ // DO NOT apply min strokes per primitive
200204
200498
  if (options && options.hasMaxEdgeLength) {
200205
200499
  for (let i = 1; i < n; i++) {
200206
200500
  const numStroke = options.applyMaxEdgeLength(1, this._points.getPoint3dAtUncheckedPointIndex(i - 1).distance(this._points.getPoint3dAtUncheckedPointIndex(i)));
@@ -205129,6 +205423,204 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
205129
205423
  }
205130
205424
 
205131
205425
 
205426
+ /***/ }),
205427
+
205428
+ /***/ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js":
205429
+ /*!******************************************************************************************!*\
205430
+ !*** ../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js ***!
205431
+ \******************************************************************************************/
205432
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
205433
+
205434
+ "use strict";
205435
+ __webpack_require__.r(__webpack_exports__);
205436
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
205437
+ /* harmony export */ AnnounceTangentStrokeHandler: () => (/* binding */ AnnounceTangentStrokeHandler)
205438
+ /* harmony export */ });
205439
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
205440
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
205441
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
205442
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
205443
+ /* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
205444
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
205445
+ /* harmony import */ var _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NewtonRtoRStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js");
205446
+ /*---------------------------------------------------------------------------------------------
205447
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
205448
+ * See LICENSE.md in the project root for license terms and full copyright notice.
205449
+ *--------------------------------------------------------------------------------------------*/
205450
+ /** @packageDocumentation
205451
+ * @module Curve
205452
+ */
205453
+
205454
+
205455
+
205456
+
205457
+
205458
+
205459
+
205460
+ /**
205461
+ * Context for searching for the tangent(s) to a CurvePrimitive.
205462
+ * @internal
205463
+ */
205464
+ class AnnounceTangentStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_1__.NewtonRtoRStrokeHandler {
205465
+ _curve;
205466
+ _announceTangent;
205467
+ _spacePoint;
205468
+ _vectorToEye;
205469
+ _distanceTol;
205470
+ _distanceTolSquared;
205471
+ // fraction and function value on one side of an interval that may bracket a root
205472
+ _fractionA = 0;
205473
+ _functionA = 0;
205474
+ // fraction and function value on the other side of an interval that may bracket a root
205475
+ _fractionB = 0;
205476
+ _functionB = 0;
205477
+ _numThisCurve = 0;
205478
+ // scratch vars to use within methods
205479
+ _fractionMRU;
205480
+ _curveMRU;
205481
+ _workRay;
205482
+ _workDetail;
205483
+ _newtonSolver;
205484
+ /** Constructor */
205485
+ constructor(spacePoint, announceTangent, options) {
205486
+ super();
205487
+ this._announceTangent = announceTangent;
205488
+ this._spacePoint = spacePoint;
205489
+ this._vectorToEye = options?.vectorToEye ?? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ();
205490
+ this._distanceTol = options?.distanceTol ?? _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
205491
+ this._distanceTolSquared = this._distanceTol * this._distanceTol;
205492
+ this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__.Ray3d.createZero();
205493
+ this.startCurvePrimitive(undefined);
205494
+ this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_5__.Newton1dUnboundedApproximateDerivative(this);
205495
+ }
205496
+ /** Specified by IStrokeHandler. */
205497
+ needPrimaryGeometryForStrokes() {
205498
+ return true;
205499
+ }
205500
+ /** Specified by IStrokeHandler. */
205501
+ startCurvePrimitive(curve) {
205502
+ this._curve = curve;
205503
+ this._fractionA = 0.0;
205504
+ this._numThisCurve = 0;
205505
+ this._functionA = 0.0;
205506
+ }
205507
+ /** Specified by IStrokeHandler. */
205508
+ endCurvePrimitive() {
205509
+ }
205510
+ /** Specified by IStrokeHandler. */
205511
+ announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
205512
+ this.startCurvePrimitive(cp);
205513
+ if (numStrokes < 1)
205514
+ numStrokes = 1;
205515
+ const df = 1.0 / numStrokes;
205516
+ for (let i = 0; i <= numStrokes; i++) {
205517
+ const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fraction0, i * df, fraction1);
205518
+ cp.fractionToPointAndDerivative(fraction, this._workRay);
205519
+ this.announceRay(fraction, this._workRay);
205520
+ }
205521
+ }
205522
+ announceCandidate(cp, fraction, point) {
205523
+ if (this._parentCurvePrimitive)
205524
+ cp = this._parentCurvePrimitive;
205525
+ if (this._curveMRU === cp && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualOptional(this._fractionMRU, fraction, _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallFloatingPoint))
205526
+ return; // avoid announcing duplicate tangents in succession (e.g., at interior stroke point)
205527
+ this._workDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(cp, fraction, point, this._workDetail);
205528
+ this._announceTangent(this._workDetail);
205529
+ this._fractionMRU = fraction;
205530
+ this._curveMRU = cp;
205531
+ }
205532
+ /** Specified by IStrokeHandler. */
205533
+ announceSegmentInterval(cp, point0, point1, _numStrokes, fraction0, fraction1) {
205534
+ let fraction;
205535
+ let point;
205536
+ const distance0 = this._spacePoint.distanceSquared(point0);
205537
+ const distance1 = this._spacePoint.distanceSquared(point1);
205538
+ if (distance0 < distance1) {
205539
+ fraction = fraction0;
205540
+ point = point0;
205541
+ }
205542
+ else {
205543
+ fraction = fraction1;
205544
+ point = point1;
205545
+ }
205546
+ // evaluate at midpoint; the endpoints may be at corners, which have ambiguous tangent
205547
+ const value = this.evaluateFunction(undefined, (fraction0 + fraction1) / 2, cp);
205548
+ if (value !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(value, this._distanceTol))
205549
+ this.announceCandidate(cp, fraction, point);
205550
+ }
205551
+ /**
205552
+ * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this
205553
+ * fractional interval.
205554
+ * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and
205555
+ * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke
205556
+ * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,
205557
+ * this method can miss a root of `f`.
205558
+ */
205559
+ searchInterval() {
205560
+ // directly announce at endpoint if we are extra certain it's a root; Newton can miss it if it has multiplicity > 1
205561
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(this._functionA, this._distanceTolSquared))
205562
+ this.announceSolutionFraction(this._fractionA);
205563
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(this._functionB, this._distanceTolSquared))
205564
+ this.announceSolutionFraction(this._fractionB);
205565
+ if (this._functionA * this._functionB < 0) {
205566
+ // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.
205567
+ const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);
205568
+ if (fraction) {
205569
+ this._newtonSolver.setX(fraction);
205570
+ if (this._newtonSolver.runIterations())
205571
+ this.announceSolutionFraction(this._newtonSolver.getX());
205572
+ }
205573
+ }
205574
+ }
205575
+ announceSolutionFraction(fraction) {
205576
+ if (this._curve)
205577
+ this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));
205578
+ }
205579
+ /**
205580
+ * Evaluate the univariate real-valued function for which we are finding roots.
205581
+ * * For finding the tangents to curve `X` from point `Q` as seen in a view plane with normal `N`, this
205582
+ * function is `f(t) := (Q - X(t)) dot (X'(t) cross N)`. The second vector in the dot product defines a
205583
+ * _tangent plane_ at `X(t)`.
205584
+ * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.
205585
+ * @param pointAndDerivative pre-evaluated curve
205586
+ * @param fraction fraction at which to evaluate `curve`
205587
+ * @param curve curve to evaluate at `fraction`
205588
+ * @returns distance of `Q` from the tangent plane at `X(t)`.
205589
+ */
205590
+ evaluateFunction(pointAndDerivative, fraction, curve) {
205591
+ if (pointAndDerivative)
205592
+ this._workRay.setFrom(pointAndDerivative);
205593
+ else if (fraction !== undefined && curve)
205594
+ this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
205595
+ else
205596
+ return undefined;
205597
+ const cross = this._vectorToEye.unitCrossProduct(this._workRay.direction); // normalized so we return true distance
205598
+ return cross ? cross.dotProductStartEnd(this._workRay.origin, this._spacePoint) : undefined;
205599
+ }
205600
+ /** Specified by NewtonRtoRStrokeHandler. */
205601
+ evaluate(fraction) {
205602
+ const curve = this._parentCurvePrimitive ?? this._curve;
205603
+ const value = this.evaluateFunction(undefined, fraction, curve);
205604
+ if (value === undefined)
205605
+ return false;
205606
+ this.currentF = value;
205607
+ return true;
205608
+ }
205609
+ announceRay(fraction, data) {
205610
+ this._functionB = this.evaluateFunction(data);
205611
+ this._fractionB = fraction;
205612
+ if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval
205613
+ this.searchInterval();
205614
+ this._functionA = this._functionB;
205615
+ this._fractionA = this._fractionB;
205616
+ }
205617
+ /** Specified by IStrokeHandler. */
205618
+ announcePointTangent(_point, _fraction, _tangent) {
205619
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "No callers expected. IStrokeHandler probably didn't need to specify this method.");
205620
+ }
205621
+ }
205622
+
205623
+
205132
205624
  /***/ }),
205133
205625
 
205134
205626
  /***/ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js":
@@ -205669,22 +206161,25 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
205669
206161
  _closestPoint;
205670
206162
  _spacePoint;
205671
206163
  _extend;
206164
+ // fraction and function value on one side of an interval that may bracket a root
205672
206165
  _fractionA = 0;
205673
206166
  _functionA = 0;
205674
- _functionB = 0;
206167
+ // fraction and function value on the other side of an interval that may bracket a root
205675
206168
  _fractionB = 0;
206169
+ _functionB = 0;
205676
206170
  _numThisCurve = 0;
205677
- // scratch vars for use within methods.
206171
+ // scratch vars to use within methods
205678
206172
  _workPoint;
205679
206173
  _workRay;
205680
206174
  _newtonSolver;
206175
+ /** Constructor */
205681
206176
  constructor(spacePoint, extend, result) {
205682
206177
  super();
205683
206178
  this._spacePoint = spacePoint;
205684
206179
  this._workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
205685
206180
  this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
205686
206181
  this._closestPoint = result;
205687
- this._extend = extend;
206182
+ this._extend = extend ?? false;
205688
206183
  this.startCurvePrimitive(undefined);
205689
206184
  this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_3__.Newton1dUnboundedApproximateDerivative(this);
205690
206185
  }
@@ -205735,7 +206230,7 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
205735
206230
  }
205736
206231
  announceSegmentInterval(cp, point0, point1, _numStrokes, fraction0, fraction1) {
205737
206232
  let localFraction = this._spacePoint.fractionOfProjectionToLine(point0, point1, 0.0);
205738
- // only consider extending the segment if the immediate caller says we are at endpoints ...
206233
+ // only consider extending the segment if the immediate caller says we are at endpoints
205739
206234
  if (!this._extend)
205740
206235
  localFraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.clampToStartEnd(localFraction, 0.0, 1.0);
205741
206236
  else {
@@ -205748,13 +206243,22 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
205748
206243
  const globalFraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.interpolate(fraction0, localFraction, fraction1);
205749
206244
  this.announceCandidate(cp, globalFraction, this._workPoint);
205750
206245
  }
206246
+ /**
206247
+ * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this
206248
+ * fractional interval.
206249
+ * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and
206250
+ * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke
206251
+ * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,
206252
+ * this method can miss a root of `f`.
206253
+ */
205751
206254
  searchInterval() {
205752
206255
  if (this._functionA * this._functionB > 0)
205753
- return;
206256
+ return; // stroke segment has no root; ASSUME the function has no root either
205754
206257
  if (this._functionA === 0)
205755
206258
  this.announceSolutionFraction(this._fractionA);
205756
206259
  if (this._functionB === 0)
205757
206260
  this.announceSolutionFraction(this._fractionB);
206261
+ // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.
205758
206262
  if (this._functionA * this._functionB < 0) {
205759
206263
  const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);
205760
206264
  if (fraction) {
@@ -205764,28 +206268,41 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
205764
206268
  }
205765
206269
  }
205766
206270
  }
205767
- evaluateB(fractionB, dataB) {
205768
- this._functionB = dataB.dotProductToPoint(this._spacePoint);
205769
- this._fractionB = fractionB;
205770
- }
205771
206271
  announceSolutionFraction(fraction) {
205772
206272
  if (this._curve)
205773
206273
  this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));
205774
206274
  }
206275
+ /**
206276
+ * Evaluate the univariate real-valued function for which we are finding roots.
206277
+ * * For finding the closest point to curve X from point Q, this function is `f(t) := Q-X(t) dot X'(t)`.
206278
+ * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.
206279
+ * @param pointAndDerivative pre-evaluated curve
206280
+ * @param fraction fraction at which to evaluate `curve`
206281
+ * @param curve curve to evaluate at `fraction`
206282
+ */
206283
+ evaluateFunction(pointAndDerivative, fraction, curve) {
206284
+ if (pointAndDerivative)
206285
+ this._workRay.setFrom(pointAndDerivative);
206286
+ else if (fraction !== undefined && curve)
206287
+ this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
206288
+ else
206289
+ return undefined;
206290
+ return this._workRay.dotProductToPoint(this._spacePoint);
206291
+ }
205775
206292
  evaluate(fraction) {
205776
206293
  let curve = this._curve;
205777
206294
  if (this._parentCurvePrimitive)
205778
206295
  curve = this._parentCurvePrimitive;
205779
- if (curve) {
205780
- this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
205781
- this.currentF = this._workRay.dotProductToPoint(this._spacePoint);
205782
- return true;
205783
- }
205784
- return false;
206296
+ const value = this.evaluateFunction(undefined, fraction, curve);
206297
+ if (value === undefined)
206298
+ return false;
206299
+ this.currentF = value;
206300
+ return true;
205785
206301
  }
205786
206302
  announceRay(fraction, data) {
205787
- this.evaluateB(fraction, data);
205788
- if (this._numThisCurve++ > 0)
206303
+ this._functionB = this.evaluateFunction(data);
206304
+ this._fractionB = fraction;
206305
+ if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval
205789
206306
  this.searchInterval();
205790
206307
  this._functionA = this._functionB;
205791
206308
  this._fractionA = this._fractionB;
@@ -210245,7 +210762,8 @@ __webpack_require__.r(__webpack_exports__);
210245
210762
  * @module Curve
210246
210763
  */
210247
210764
 
210248
- /** Intermediate class for managing the parentCurve announcements from an IStrokeHandler.
210765
+ /**
210766
+ * Intermediate class for managing the parentCurve announcements from an IStrokeHandler.
210249
210767
  * @internal
210250
210768
  */
210251
210769
  class NewtonRtoRStrokeHandler extends _numerics_Newton__WEBPACK_IMPORTED_MODULE_0__.NewtonEvaluatorRtoR {
@@ -210254,10 +210772,11 @@ class NewtonRtoRStrokeHandler extends _numerics_Newton__WEBPACK_IMPORTED_MODULE_
210254
210772
  super();
210255
210773
  this._parentCurvePrimitive = undefined;
210256
210774
  }
210257
- /** retain the parentCurvePrimitive.
210775
+ /**
210776
+ * Retain the parentCurvePrimitive.
210258
210777
  * * Calling this method tells the handler that the parent curve is to be used for detail searches.
210259
210778
  * * Example: Transition spiral search is based on linestring first, then the exact spiral.
210260
- * * Example: CurveChainWithDistanceIndex does NOT do this announcement -- the constituents act independently.
210779
+ * * Example: CurveChainWithDistanceIndex does NOT do this announcement; the constituents act independently.
210261
210780
  */
210262
210781
  startParentCurvePrimitive(curve) {
210263
210782
  this._parentCurvePrimitive = curve;
@@ -214428,7 +214947,7 @@ class AngleSweep {
214428
214947
  }
214429
214948
  /** Read-property for signed start-to-end sweep in degrees. */
214430
214949
  get sweepDegrees() {
214431
- return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this._radians1 - this._radians0);
214950
+ return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.sweepRadians);
214432
214951
  }
214433
214952
  /** Read-property for degrees at the start of this AngleSweep. */
214434
214953
  get startRadians() {
@@ -214607,20 +215126,20 @@ class AngleSweep {
214607
215126
  /** Convert fractional position in the sweep to radians. */
214608
215127
  fractionToRadians(fraction) {
214609
215128
  return fraction < 0.5 ?
214610
- this._radians0 + fraction * (this._radians1 - this._radians0) :
214611
- this._radians1 + (fraction - 1.0) * (this._radians1 - this._radians0);
215129
+ this._radians0 + fraction * this.sweepRadians :
215130
+ this._radians1 + (fraction - 1.0) * this.sweepRadians;
214612
215131
  }
214613
215132
  /** Convert fractional position in the sweep to strongly typed Angle object. */
214614
215133
  fractionToAngle(fraction) {
214615
215134
  return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(this.fractionToRadians(fraction));
214616
215135
  }
214617
215136
  /**
214618
- * Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
215137
+ * Return 2PI divided by the sweep radians.
214619
215138
  * * This is the number of fractional intervals required to cover a whole circle.
214620
215139
  * @returns period of the sweep, or 1 if sweep is empty.
214621
215140
  */
214622
215141
  fractionPeriod() {
214623
- return this.isEmpty ? 1.0 : _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.pi2Radians / Math.abs(this._radians1 - this._radians0);
215142
+ return this.isEmpty ? 1.0 : _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.pi2Radians / Math.abs(this.sweepRadians);
214624
215143
  }
214625
215144
  /**
214626
215145
  * Return the fractionalized position of the given angle (as Angle) computed without consideration of
@@ -214636,7 +215155,7 @@ class AngleSweep {
214636
215155
  * @returns unbounded fraction, or 1 if sweep is empty.
214637
215156
  */
214638
215157
  angleToUnboundedFraction(theta) {
214639
- return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / (this._radians1 - this._radians0);
215158
+ return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / this.sweepRadians;
214640
215159
  }
214641
215160
  /**
214642
215161
  * Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero
@@ -214930,7 +215449,7 @@ class AngleSweep {
214930
215449
  isAlmostEqualAllowPeriodShift(other, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
214931
215450
  return this.isCCW === other.isCCW // this rules out equating opposite sweeps like [0,-100] and [0,260]
214932
215451
  && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0, radianTol)
214933
- && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
215452
+ && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
214934
215453
  }
214935
215454
  /**
214936
215455
  * Test if two angle sweeps match within the given tolerance.
@@ -214940,7 +215459,7 @@ class AngleSweep {
214940
215459
  */
214941
215460
  isAlmostEqualNoPeriodShift(other, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
214942
215461
  return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0, radianTol)
214943
- && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
215462
+ && _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
214944
215463
  }
214945
215464
  /**
214946
215465
  * Test if start and end angles match with radians tolerance.
@@ -223625,28 +224144,27 @@ class Matrix3d {
223625
224144
  return count === 3;
223626
224145
  }
223627
224146
  /**
223628
- * Adjust the matrix in place to make is a `rigid` matrix so that:
223629
- * * columns are perpendicular and have unit length.
223630
- * * transpose equals inverse.
223631
- * * mirroring is removed.
223632
- * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
223633
- * @param axisOrder how to reorder the matrix columns
223634
- * @return whether the adjusted matrix is `rigid` on return
224147
+ * Adjust the matrix in place to make it rigid:
224148
+ * * Columns are perpendicular and have unit length.
224149
+ * * Transpose equals inverse.
224150
+ * @param axisOrder how to reorder the matrix columns. A left-handed ordering will return a mirror.
224151
+ * @return whether the adjusted matrix is rigid on return
223635
224152
  */
223636
224153
  makeRigid(axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ) {
223637
224154
  const maxAbs = this.maxAbs();
223638
224155
  if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(maxAbs))
223639
224156
  return false;
223640
224157
  const scale = 1.0 / maxAbs;
223641
- this.scaleColumnsInPlace(scale, scale, scale);
224158
+ this.scaleColumnsInPlace(scale, scale, scale); // improve numerical stability
223642
224159
  this.axisOrderCrossProductsInPlace(axisOrder);
223643
224160
  return this.normalizeColumnsInPlace();
223644
224161
  }
223645
224162
  /**
223646
- * Create a new orthogonal matrix (perpendicular columns, unit length, transpose is inverse).
223647
- * * Columns are taken from the source Matrix3d in order indicated by the axis order.
223648
- * * Mirroring in the matrix is removed.
223649
- * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
224163
+ * Create a new orthogonal matrix by calling [[makeRigid]] on a clone of `source`.
224164
+ * @param source input matrix
224165
+ * @param axisOrder how to reorder the matrix columns. A left-handed ordering will return a mirror.
224166
+ * @param result optional preallocated result to populate and return
224167
+ * @returns rigid matrix, or `undefined` if the operation failed.
223650
224168
  */
223651
224169
  static createRigidFromMatrix3d(source, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ, result) {
223652
224170
  result = source.clone(result);
@@ -244696,7 +245214,7 @@ class FacetOrientationFixup {
244696
245214
  _facetOrientation;
244697
245215
  _components;
244698
245216
  _visitor;
244699
- _mesh;
245217
+ _mesh; // we could get by with just a Polyface/Visitor but for the call to reverseSingleFacet
244700
245218
  constructor(mesh) {
244701
245219
  this._visitor = mesh.createVisitor(1);
244702
245220
  this._edges = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_0__.PolyfaceQuery.createIndexedEdges(this._visitor);
@@ -250188,6 +250706,7 @@ class PolyfaceData {
250188
250706
  if (this.colorIndex !== this.pointIndex)
250189
250707
  PolyfaceData.reverseIndices(facetStartIndex, this.colorIndex, true);
250190
250708
  PolyfaceData.reverseIndices(facetStartIndex, this.edgeVisible, false);
250709
+ // TODO: reverse auxData.indices, edgeMateIndex
250191
250710
  }
250192
250711
  }
250193
250712
  /**
@@ -250207,6 +250726,7 @@ class PolyfaceData {
250207
250726
  if (this.colorIndex !== this.pointIndex)
250208
250727
  PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.colorIndex, true);
250209
250728
  PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.edgeVisible, false);
250729
+ // TODO: reverse auxData.indices, edgeMateIndex
250210
250730
  }
250211
250731
  /** Scale all the normals by -1. */
250212
250732
  reverseNormals() {
@@ -275587,12 +276107,12 @@ class Triangulator {
275587
276107
  * * Return false if clearly negative or almost zero.
275588
276108
  * @param nodeA node on the diagonal edge of candidate for edge flip.
275589
276109
  */
275590
- static computeInCircleDeterminantIsStrongPositive(nodeA) {
276110
+ static computeCircumcircleDeterminantIsStrongPositive(nodeA) {
275591
276111
  // Assume triangle A1,A2,B2 is ccw.
275592
276112
  // Shift the triangle to the origin (by negated A coords).
275593
276113
  // The Delaunay condition is computed by projecting the origin and the shifted triangle
275594
276114
  // points up to the paraboloid z = x*x + y*y. Due to the radially symmetric convexity of
275595
- // this surface and the ccw orientation of this triangle, "A is inside triangle A1,A2,B2"
276115
+ // this surface and the ccw orientation of this triangle, "A is inside the circumcircle of triangle A1,A2,B2"
275596
276116
  // is equivalent to "the volume of the parallelepiped formed by the projected points is
275597
276117
  // negative, as computed by the triple product."
275598
276118
  const nodeA1 = nodeA.faceSuccessor;
@@ -275625,7 +276145,7 @@ class Triangulator {
275625
276145
  }
275626
276146
  /**
275627
276147
  * * Visit each node of the graph array
275628
- * * If a flip would be possible, test the results of flipping using incircle condition
276148
+ * * If a flip would be possible, test the results of flipping using circumcircle condition
275629
276149
  * * If revealed to be an improvement, conduct the flip, mark involved nodes as unvisited, and repeat until all nodes are visited
275630
276150
  */
275631
276151
  static flipTriangles(graph) {
@@ -275638,7 +276158,7 @@ class Triangulator {
275638
276158
  }
275639
276159
  /**
275640
276160
  * * Visit each node of the graph array
275641
- * * If a flip would be possible, test the results of flipping using incircle condition
276161
+ * * If a flip would be possible, test the results of flipping using circumcircle condition
275642
276162
  * * If revealed to be an improvement, conduct the flip, mark involved nodes as unvisited, and repeat until all nodes are visited
275643
276163
  */
275644
276164
  static flipTrianglesInEdgeSet(graph, edgeSet) {
@@ -275651,7 +276171,7 @@ class Triangulator {
275651
276171
  while (undefined !== (node = edgeSet.chooseAndRemoveAny())) {
275652
276172
  if (node.isMaskSet(barrierMasks)) // Flip not allowed
275653
276173
  continue;
275654
- if (Triangulator.computeInCircleDeterminantIsStrongPositive(node)) {
276174
+ if (Triangulator.computeCircumcircleDeterminantIsStrongPositive(node)) {
275655
276175
  // Flip the triangles
275656
276176
  Triangulator.flipEdgeBetweenTriangles(node.edgeMate.faceSuccessor, node.edgeMate.facePredecessor, node.edgeMate, node.faceSuccessor, node, node.facePredecessor);
275657
276177
  // keep looking at the 2 faces
@@ -276002,7 +276522,7 @@ class Triangulator {
276002
276522
  // triangle B1 A1 D is on the other side of AB
276003
276523
  // The condition for flipping is:
276004
276524
  // ! both triangles must be TRIANGULATED_NODE_MASK
276005
- // ! incircle condition flags D as in the circle of ABC
276525
+ // ! circumcircle condition flags D as in the circle of ABC
276006
276526
  // after flip, node A moves to the vertex of D, and is the effective "ear", with the cap edge C A1
276007
276527
  // after flip, consider the A1 D (whose nodes are A1 and flipped A!!!)
276008
276528
  //
@@ -276022,7 +276542,7 @@ class Triangulator {
276022
276542
  let a0 = b0.facePredecessor;
276023
276543
  let b1 = a0.edgeMate;
276024
276544
  while (Triangulator.isInteriorTriangle(a0) && Triangulator.isInteriorTriangle(b1)) {
276025
- const detA = Triangulator.computeInCircleDeterminantIsStrongPositive(a0);
276545
+ const detA = Triangulator.computeCircumcircleDeterminantIsStrongPositive(a0);
276026
276546
  if (!detA)
276027
276547
  break;
276028
276548
  // Flip the triangles
@@ -311078,7 +311598,7 @@ var loadLanguages = instance.loadLanguages;
311078
311598
  /***/ ((module) => {
311079
311599
 
311080
311600
  "use strict";
311081
- 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"}}');
311601
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.106","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"}}');
311082
311602
 
311083
311603
  /***/ })
311084
311604