@itwin/rpcinterface-full-stack-tests 5.0.0-dev.114 → 5.0.0-dev.116

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.
@@ -200407,6 +200407,7 @@ __webpack_require__.r(__webpack_exports__);
200407
200407
  /* harmony import */ var _SelectTool__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SelectTool */ "../../core/frontend/lib/esm/tools/SelectTool.js");
200408
200408
  /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
200409
200409
  /* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
200410
+ /* harmony import */ var _ToolSettings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
200410
200411
  /*---------------------------------------------------------------------------------------------
200411
200412
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
200412
200413
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -200427,6 +200428,7 @@ __webpack_require__.r(__webpack_exports__);
200427
200428
 
200428
200429
 
200429
200430
 
200431
+
200430
200432
  /** Identifies the source of the elements in the agenda.
200431
200433
  * @public
200432
200434
  */
@@ -200824,12 +200826,105 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
200824
200826
  await this.onAgendaModified();
200825
200827
  return true;
200826
200828
  }
200827
- /** Get element ids to process from drag box or crossing line selection.
200828
- * Sub-classes may override to support selection scopes or apply tool specific filtering.
200829
- */
200830
- async getDragSelectCandidates(vp, origin, corner, method, overlap) {
200829
+ /** Get ids of spatial elements to process from a clip volume created by drag box selection. */
200830
+ static async getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter) {
200831
+ const contents = new Set();
200832
+ if (!vp.view.isSpatialView())
200833
+ return contents;
200834
+ const boxRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range2d.createXYXY(origin.x, origin.y, corner.x, corner.y);
200835
+ if (boxRange.isNull || boxRange.isAlmostZeroX || boxRange.isAlmostZeroY)
200836
+ return contents;
200837
+ const getClipPlane = (viewPt, viewDir, negate) => {
200838
+ const point = vp.viewToWorld(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.createFrom(viewPt));
200839
+ const boresite = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.getBoresite(point, vp);
200840
+ const normal = viewDir.crossProduct(boresite.direction);
200841
+ if (negate)
200842
+ normal.negate(normal);
200843
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlane.createNormalAndPoint(normal, point);
200844
+ };
200845
+ const planeSet = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ConvexClipPlaneSet.createEmpty();
200846
+ planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowX(), true));
200847
+ planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowY(), true));
200848
+ planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowX(), false));
200849
+ planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowY(), false));
200850
+ if (0 === planeSet.planes.length)
200851
+ return contents;
200852
+ const clip = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipVector.createCapture([_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPrimitive.createCapture(planeSet)]);
200853
+ const viewRange = vp.computeViewRange();
200854
+ const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(clip, viewRange);
200855
+ if (range.isNull)
200856
+ return contents;
200857
+ // TODO: Possible to make UnionOfComplexClipPlaneSets from view clip and planes work and remove 2nd containment check?
200858
+ const viewClip = (vp.viewFlags.clipVolume ? vp.view.getViewClip()?.clone() : undefined);
200859
+ if (viewClip) {
200860
+ const viewClipRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(viewClip, viewRange);
200861
+ if (viewClipRange.isNull || !viewClipRange.intersectsRange(range))
200862
+ return contents;
200863
+ }
200864
+ const candidates = [];
200865
+ const categories = new Set();
200866
+ try {
200867
+ const viewedModels = [...vp.view.modelSelector.models].join(",");
200868
+ const viewedCategories = [...vp.view.categorySelector.categories].join(",");
200869
+ const ecsql = `SELECT e.ECInstanceId, Category.Id as category FROM bis.SpatialElement e JOIN bis.SpatialIndex i ON e.ECInstanceId=i.ECInstanceId WHERE Model.Id IN (${viewedModels}) AND Category.Id IN (${viewedCategories}) AND i.MinX <= ${range.xHigh} AND i.MinY <= ${range.yHigh} AND i.MinZ <= ${range.zHigh} AND i.MaxX >= ${range.xLow} AND i.MaxY >= ${range.yLow} AND i.MaxZ >= ${range.zLow}`;
200870
+ const reader = vp.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames });
200871
+ for await (const row of reader) {
200872
+ candidates.push(row.ECInstanceId);
200873
+ categories.add(row.category);
200874
+ }
200875
+ }
200876
+ catch { }
200877
+ if (0 === candidates.length)
200878
+ return contents;
200879
+ let offSubCategories;
200880
+ if (0 !== categories.size) {
200881
+ for (const categoryId of categories) {
200882
+ const subcategories = vp.iModel.subcategories.getSubCategories(categoryId);
200883
+ if (undefined === subcategories)
200884
+ continue;
200885
+ for (const subCategoryId of subcategories) {
200886
+ const appearance = vp.iModel.subcategories.getSubCategoryAppearance(subCategoryId);
200887
+ if (undefined === appearance || (!appearance.invisible && !appearance.dontLocate))
200888
+ continue;
200889
+ if (undefined === offSubCategories)
200890
+ offSubCategories = new Array;
200891
+ offSubCategories.push(subCategoryId);
200892
+ }
200893
+ }
200894
+ }
200895
+ const requestProps = {
200896
+ candidates,
200897
+ clip: clip.toJSON(),
200898
+ allowOverlaps,
200899
+ viewFlags: vp.viewFlags.toJSON(),
200900
+ offSubCategories,
200901
+ };
200902
+ const result = await vp.iModel.getGeometryContainment(requestProps);
200903
+ if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== result.status || undefined === result.candidatesContainment)
200904
+ return contents;
200905
+ result.candidatesContainment.forEach((status, index) => {
200906
+ if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status && (undefined === filter || filter(candidates[index])))
200907
+ contents.add(candidates[index]);
200908
+ });
200909
+ if (0 !== contents.size && viewClip) {
200910
+ requestProps.clip = viewClip.toJSON();
200911
+ requestProps.candidates.length = 0;
200912
+ for (const id of contents)
200913
+ requestProps.candidates.push(id);
200914
+ contents.clear();
200915
+ const resultViewClip = await vp.iModel.getGeometryContainment(requestProps);
200916
+ if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== resultViewClip.status || undefined === resultViewClip.candidatesContainment)
200917
+ return contents;
200918
+ resultViewClip.candidatesContainment.forEach((status, index) => {
200919
+ if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status)
200920
+ contents.add(candidates[index]);
200921
+ });
200922
+ }
200923
+ return contents;
200924
+ }
200925
+ /** Get ids of visible elements to process from drag box or crossing line selection. */
200926
+ static getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter) {
200831
200927
  let contents = new Set();
200832
- // TODO: Include option to use IModelConnection.getGeometryContainment instead of readPixels. No/Yes/2dOnly...
200833
200928
  const pts = [];
200834
200929
  pts[0] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(origin.x + 0.5), Math.floor(origin.y + 0.5));
200835
200930
  pts[1] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(corner.x + 0.5), Math.floor(corner.y + 0.5));
@@ -200852,12 +200947,12 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
200852
200947
  return undefined; // no geometry at this location...
200853
200948
  if (!vp.isPixelSelectable(pixel))
200854
200949
  return undefined; // reality model, terrain, etc - not selectable
200855
- if (!this.isElementIdValid(pixel.elementId, ModifyElementSource.DragSelect))
200950
+ if (undefined !== filter && !filter(pixel.elementId))
200856
200951
  return undefined;
200857
200952
  return pixel.elementId;
200858
200953
  };
200859
200954
  if (_SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method) {
200860
- const outline = overlap ? undefined : new Set();
200955
+ const outline = allowOverlaps ? undefined : new Set();
200861
200956
  const offset = sRange.clone();
200862
200957
  offset.expandInPlace(-2);
200863
200958
  for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
@@ -200899,6 +200994,33 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
200899
200994
  }, true);
200900
200995
  return contents;
200901
200996
  }
200997
+ /** Get ids of elements to process from drag box or crossing line selection using either the depth buffer or clip vector...
200998
+ * @internal
200999
+ */
201000
+ static async getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter, includeDecorationsForVolume) {
201001
+ let contents;
201002
+ if (_ToolSettings__WEBPACK_IMPORTED_MODULE_13__.ToolSettings.enableVolumeSelection && _SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method && vp.view.isSpatialView()) {
201003
+ contents = await ElementSetTool.getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter);
201004
+ // Use area select to identify pickable transients...
201005
+ if (includeDecorationsForVolume) {
201006
+ const acceptTransientsFilter = (id) => { return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id) && (undefined === filter || filter(id)); };
201007
+ const transients = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, acceptTransientsFilter);
201008
+ for (const id of transients)
201009
+ contents.add(id);
201010
+ }
201011
+ }
201012
+ else {
201013
+ contents = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter);
201014
+ }
201015
+ return contents;
201016
+ }
201017
+ /** Get element ids to process from drag box or crossing line selection.
201018
+ * Sub-classes may override to support selection scopes or apply tool specific filtering.
201019
+ */
201020
+ async getDragSelectCandidates(vp, origin, corner, method, overlap) {
201021
+ const filter = (id) => { return this.isElementIdValid(id, ModifyElementSource.DragSelect); };
201022
+ return ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, filter, _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.options.allowDecorations);
201023
+ }
200902
201024
  /** Populate [[ElementSetTool.agenda]] by drag box or crossing line information.
200903
201025
  * @see [[ElementSetTool.getDragSelectCandidates]] to filter or augment the set of elements.
200904
201026
  */
@@ -203222,17 +203344,15 @@ __webpack_require__.r(__webpack_exports__);
203222
203344
  /* harmony export */ SelectionTool: () => (/* binding */ SelectionTool)
203223
203345
  /* harmony export */ });
203224
203346
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
203225
- /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
203226
- /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
203227
- /* harmony import */ var _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/appui-abstract */ "../../ui/appui-abstract/lib/esm/appui-abstract.js");
203228
- /* harmony import */ var _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ElementLocateManager */ "../../core/frontend/lib/esm/ElementLocateManager.js");
203229
- /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
203230
- /* harmony import */ var _render_Pixel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../render/Pixel */ "../../core/frontend/lib/esm/render/Pixel.js");
203231
- /* harmony import */ var _common_ViewRect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/ViewRect */ "../../core/frontend/lib/esm/common/ViewRect.js");
203232
- /* harmony import */ var _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PrimitiveTool */ "../../core/frontend/lib/esm/tools/PrimitiveTool.js");
203233
- /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
203234
- /* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
203235
- /* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
203347
+ /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
203348
+ /* harmony import */ var _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/appui-abstract */ "../../ui/appui-abstract/lib/esm/appui-abstract.js");
203349
+ /* harmony import */ var _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ElementLocateManager */ "../../core/frontend/lib/esm/ElementLocateManager.js");
203350
+ /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
203351
+ /* harmony import */ var _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PrimitiveTool */ "../../core/frontend/lib/esm/tools/PrimitiveTool.js");
203352
+ /* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
203353
+ /* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
203354
+ /* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
203355
+ /* harmony import */ var _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ElementSetTool */ "../../core/frontend/lib/esm/tools/ElementSetTool.js");
203236
203356
  /*---------------------------------------------------------------------------------------------
203237
203357
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
203238
203358
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -203250,8 +203370,6 @@ __webpack_require__.r(__webpack_exports__);
203250
203370
 
203251
203371
 
203252
203372
 
203253
-
203254
-
203255
203373
  // cSpell:ignore buttongroup
203256
203374
  /** The method for choosing elements with the [[SelectionTool]]
203257
203375
  * @public
@@ -203297,7 +203415,7 @@ var SelectionProcessing;
203297
203415
  /** Tool for picking a set of elements of interest, selected by the user.
203298
203416
  * @public
203299
203417
  */
203300
- class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.PrimitiveTool {
203418
+ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool {
203301
203419
  static hidden = false;
203302
203420
  static toolId = "Select";
203303
203421
  static iconSpec = "icon-cursor";
@@ -203316,7 +203434,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203316
203434
  set selectionMethod(method) { this._selectionMethodValue.value = method; }
203317
203435
  get selectionMode() { return this._selectionModeValue.value; }
203318
203436
  set selectionMode(mode) { this._selectionModeValue.value = mode; }
203319
- static methodsMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate(`ElementSet.SelectionMethods.${str}`); }
203437
+ static methodsMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionMethods.${str}`); }
203320
203438
  static _methodsName = "selectionMethods";
203321
203439
  /* The property descriptions used to generate ToolSettings UI. */
203322
203440
  static _getMethodsDescription() {
@@ -203327,14 +203445,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203327
203445
  editor: {
203328
203446
  name: "enum-buttongroup",
203329
203447
  params: [{
203330
- type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.PropertyEditorParamTypes.ButtonGroupData,
203448
+ type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
203331
203449
  buttons: [
203332
203450
  { iconSpec: "icon-select-single" },
203333
203451
  { iconSpec: "icon-select-line" },
203334
203452
  { iconSpec: "icon-select-box" },
203335
203453
  ],
203336
203454
  }, {
203337
- type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.PropertyEditorParamTypes.SuppressEditorLabel,
203455
+ type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
203338
203456
  suppressLabelPlaceholder: true,
203339
203457
  },
203340
203458
  ],
@@ -203348,7 +203466,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203348
203466
  },
203349
203467
  };
203350
203468
  }
203351
- static modesMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate(`ElementSet.SelectionModes.${str}`); }
203469
+ static modesMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionModes.${str}`); }
203352
203470
  static _modesName = "selectionModes";
203353
203471
  /* The property descriptions used to generate ToolSettings UI. */
203354
203472
  static _getModesDescription() {
@@ -203359,20 +203477,20 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203359
203477
  editor: {
203360
203478
  name: "enum-buttongroup",
203361
203479
  params: [{
203362
- type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.PropertyEditorParamTypes.ButtonGroupData,
203480
+ type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
203363
203481
  buttons: [
203364
203482
  { iconSpec: "icon-replace" },
203365
203483
  { iconSpec: "icon-select-plus" },
203366
203484
  {
203367
203485
  iconSpec: "icon-select-minus",
203368
203486
  isEnabledFunction: () => {
203369
- const tool = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.activeTool;
203370
- return tool instanceof _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.PrimitiveTool ? tool.iModel.selectionSet.isActive : false;
203487
+ const tool = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.activeTool;
203488
+ return tool instanceof _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool ? tool.iModel.selectionSet.isActive : false;
203371
203489
  },
203372
203490
  },
203373
203491
  ],
203374
203492
  }, {
203375
- type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.PropertyEditorParamTypes.SuppressEditorLabel,
203493
+ type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
203376
203494
  suppressLabelPlaceholder: true,
203377
203495
  },
203378
203496
  ],
@@ -203399,49 +203517,49 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203399
203517
  mainMsg += (0 === this._points.length ? "StartCorner" : "OppositeCorner");
203400
203518
  break;
203401
203519
  }
203402
- const mainInstruction = _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(this.iconSpec, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate(mainMsg));
203520
+ const mainInstruction = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(this.iconSpec, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(mainMsg));
203403
203521
  const sections = [];
203404
203522
  switch (method) {
203405
203523
  case SelectionMethod.Pick:
203406
203524
  const mousePickInstructions = [];
203407
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203408
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.BoxCorners"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203409
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.RightClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.CrossingLine"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203410
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203525
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203526
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.BoxCorners"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203527
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.RightClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.CrossingLine"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203528
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203411
203529
  if (SelectionMode.Replace === mode) {
203412
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createKeyboardInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.ctrlKeyboardInfo, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203413
- mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.CursorClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.ClearSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203530
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createKeyboardInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKeyboardInfo, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203531
+ mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.CursorClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.ClearSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203414
203532
  }
203415
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(mousePickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203533
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mousePickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203416
203534
  const touchPickInstructions = [];
203417
- if (!_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createTouchCursorInstructions(touchPickInstructions))
203418
- touchPickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.OneTouchTap, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Touch));
203419
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(touchPickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203535
+ if (!_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createTouchCursorInstructions(touchPickInstructions))
203536
+ touchPickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchTap, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
203537
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchPickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203420
203538
  break;
203421
203539
  case SelectionMethod.Line:
203422
203540
  const mouseLineInstructions = [];
203423
- mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203541
+ mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203424
203542
  if (SelectionMode.Replace === mode)
203425
- mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203426
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(mouseLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203543
+ mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203544
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203427
203545
  const touchLineInstructions = [];
203428
- touchLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Touch));
203429
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(touchLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203546
+ touchLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
203547
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203430
203548
  break;
203431
203549
  case SelectionMethod.Box:
203432
203550
  const mouseBoxInstructions = [];
203433
- mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203434
- mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203551
+ mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203552
+ mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203435
203553
  if (SelectionMode.Replace === mode)
203436
- mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Mouse));
203437
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(mouseBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203554
+ mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
203555
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203438
203556
  const touchBoxInstructions = [];
203439
- touchBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistanceInputMethod.Touch));
203440
- sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createSection(touchBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.inputsLabel));
203557
+ touchBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
203558
+ sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
203441
203559
  break;
203442
203560
  }
203443
- const instructions = _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__.ToolAssistance.createInstructions(mainInstruction, sections);
203444
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.notifications.setToolAssistance(instructions);
203561
+ const instructions = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstructions(mainInstruction, sections);
203562
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.notifications.setToolAssistance(instructions);
203445
203563
  }
203446
203564
  initSelectTool() {
203447
203565
  const method = this.selectionMethod;
@@ -203449,8 +203567,8 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203449
203567
  const enableLocate = SelectionMethod.Pick === method;
203450
203568
  this._isSelectByPoints = false;
203451
203569
  this._points.length = 0;
203452
- this.initLocateElements(enableLocate, false, enableLocate ? "default" : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.crossHairCursor, _Tool__WEBPACK_IMPORTED_MODULE_9__.CoordinateLockOverrides.All);
203453
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.options.allowDecorations = true; // Always locate to display tool tip even if we reject for adding to selection set...
203570
+ this.initLocateElements(enableLocate, false, enableLocate ? "default" : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.crossHairCursor, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.All);
203571
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.options.allowDecorations = true; // Always locate to display tool tip even if we reject for adding to selection set...
203454
203572
  this.showPrompt(mode, method);
203455
203573
  }
203456
203574
  processMiss(_ev) {
@@ -203495,13 +203613,13 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203495
203613
  selectByPointsDecorate(context) {
203496
203614
  if (!this._isSelectByPoints)
203497
203615
  return;
203498
- const ev = new _Tool__WEBPACK_IMPORTED_MODULE_9__.BeButtonEvent();
203499
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
203616
+ const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
203617
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
203500
203618
  if (undefined === ev.viewport)
203501
203619
  return;
203502
203620
  const vp = context.viewport;
203503
- const bestContrastIsBlack = (_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.black === vp.getContrastToBackgroundColor());
203504
- const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_9__.BeButton.Reset === ev.button));
203621
+ const bestContrastIsBlack = (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ColorDef.black === vp.getContrastToBackgroundColor());
203622
+ const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button));
203505
203623
  const overlapSelection = (crossingLine || this.useOverlapSelection(ev));
203506
203624
  const position = vp.worldToView(this._points[0]);
203507
203625
  position.x = Math.floor(position.x) + 0.5;
@@ -203529,111 +203647,42 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203529
203647
  };
203530
203648
  context.addCanvasDecoration({ position, drawDecoration });
203531
203649
  }
203532
- selectByPointsProcess(origin, corner, ev, method, overlap) {
203650
+ async selectByPointsProcess(origin, corner, ev, method, overlap) {
203533
203651
  const vp = ev.viewport;
203534
203652
  if (!vp)
203535
- return;
203536
- const pts = [];
203537
- pts[0] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d(Math.floor(origin.x + 0.5), Math.floor(origin.y + 0.5));
203538
- pts[1] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d(Math.floor(corner.x + 0.5), Math.floor(corner.y + 0.5));
203539
- const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createArray(pts);
203540
- const rect = new _common_ViewRect__WEBPACK_IMPORTED_MODULE_7__.ViewRect();
203541
- rect.initFromRange(range);
203542
- const allowTransients = this.wantPickableDecorations();
203543
- vp.readPixels(rect, _render_Pixel__WEBPACK_IMPORTED_MODULE_6__.Pixel.Selector.Feature, (pixels) => {
203544
- if (undefined === pixels)
203545
- return;
203546
- const sRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createNull();
203547
- sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.low.x), vp.cssPixelsToDevicePixels(range.low.y)));
203548
- sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.high.x), vp.cssPixelsToDevicePixels(range.high.y)));
203549
- pts[0].x = vp.cssPixelsToDevicePixels(pts[0].x);
203550
- pts[0].y = vp.cssPixelsToDevicePixels(pts[0].y);
203551
- pts[1].x = vp.cssPixelsToDevicePixels(pts[1].x);
203552
- pts[1].y = vp.cssPixelsToDevicePixels(pts[1].y);
203553
- let contents = new Set();
203554
- const testPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
203555
- const getPixelElementId = (pixel) => {
203556
- if (undefined === pixel.elementId || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(pixel.elementId))
203557
- return undefined; // no geometry at this location...
203558
- if (!allowTransients && _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(pixel.elementId))
203559
- return undefined; // tool didn't request pickable decorations...
203560
- if (!vp.isPixelSelectable(pixel))
203561
- return undefined; // reality model, terrain, etc - not selectable
203562
- return pixel.elementId;
203563
- };
203564
- if (SelectionMethod.Box === method) {
203565
- const outline = overlap ? undefined : new Set();
203566
- const offset = sRange.clone();
203567
- offset.expandInPlace(-2);
203568
- for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
203569
- for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
203570
- const pixel = pixels.getPixel(testPoint.x, testPoint.y);
203571
- const elementId = getPixelElementId(pixel);
203572
- if (undefined === elementId)
203573
- continue;
203574
- if (undefined !== outline && !offset.containsPoint(testPoint))
203575
- outline.add(elementId.toString());
203576
- else
203577
- contents.add(elementId.toString());
203578
- }
203579
- }
203580
- if (undefined !== outline && 0 !== outline.size) {
203581
- const inside = new Set();
203582
- contents.forEach((id) => {
203583
- if (!outline.has(id))
203584
- inside.add(id);
203585
- });
203586
- contents = inside;
203587
- }
203588
- }
203589
- else {
203590
- const closePoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
203591
- for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
203592
- for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
203593
- const pixel = pixels.getPixel(testPoint.x, testPoint.y);
203594
- const elementId = getPixelElementId(pixel);
203595
- if (undefined === elementId)
203596
- continue;
203597
- const fraction = testPoint.fractionOfProjectionToLine(pts[0], pts[1], 0.0);
203598
- pts[0].interpolate(fraction, pts[1], closePoint);
203599
- if (closePoint.distance(testPoint) < 1.5)
203600
- contents.add(elementId.toString());
203601
- }
203602
- }
203603
- }
203604
- if (0 === contents.size) {
203605
- if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
203606
- this.syncSelectionMode();
203607
- return;
203608
- }
203609
- switch (this.selectionMode) {
203610
- case SelectionMode.Replace:
203611
- if (!ev.isControlKey)
203612
- this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement); // eslint-disable-line @typescript-eslint/no-floating-promises
203613
- else
203614
- this.processSelection(contents, SelectionProcessing.InvertElementInSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
203615
- break;
203616
- case SelectionMode.Add:
203617
- this.processSelection(contents, SelectionProcessing.AddElementToSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
203618
- break;
203619
- case SelectionMode.Remove:
203620
- this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
203621
- break;
203653
+ return false;
203654
+ const filter = (id) => { return !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id); };
203655
+ const contents = await _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__.ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, this.wantPickableDecorations() ? undefined : filter, this.wantPickableDecorations());
203656
+ if (0 === contents.size) {
203657
+ if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev)) {
203658
+ this.syncSelectionMode();
203659
+ return true;
203622
203660
  }
203623
- }, true);
203661
+ return false;
203662
+ }
203663
+ switch (this.selectionMode) {
203664
+ case SelectionMode.Replace:
203665
+ if (!ev.isControlKey)
203666
+ return this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement);
203667
+ return this.processSelection(contents, SelectionProcessing.InvertElementInSelection);
203668
+ case SelectionMode.Add:
203669
+ return this.processSelection(contents, SelectionProcessing.AddElementToSelection);
203670
+ case SelectionMode.Remove:
203671
+ return this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection);
203672
+ }
203624
203673
  }
203625
203674
  selectByPointsStart(ev) {
203626
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.BeButton.Data !== ev.button && _Tool__WEBPACK_IMPORTED_MODULE_9__.BeButton.Reset !== ev.button)
203675
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Data !== ev.button && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset !== ev.button)
203627
203676
  return false;
203628
203677
  this._points.length = 0;
203629
203678
  this._points.push(ev.point.clone());
203630
203679
  this._isSelectByPoints = true;
203631
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap.enableLocate(false);
203632
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.setLocateCircleOn(false);
203680
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.enableLocate(false);
203681
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.setLocateCircleOn(false);
203633
203682
  this.showPrompt(this.selectionMode, this.selectionMethod);
203634
203683
  return true;
203635
203684
  }
203636
- selectByPointsEnd(ev) {
203685
+ async selectByPointsEnd(ev) {
203637
203686
  if (!this._isSelectByPoints)
203638
203687
  return false;
203639
203688
  const vp = ev.viewport;
@@ -203643,10 +203692,10 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203643
203692
  }
203644
203693
  const origin = vp.worldToView(this._points[0]);
203645
203694
  const corner = vp.worldToView(ev.point);
203646
- if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_9__.BeButton.Reset === ev.button))
203647
- this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
203695
+ if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button))
203696
+ await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
203648
203697
  else
203649
- this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
203698
+ await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
203650
203699
  this.initSelectTool();
203651
203700
  vp.invalidateDecorations();
203652
203701
  return true;
@@ -203657,14 +203706,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203657
203706
  }
203658
203707
  async selectDecoration(ev, currHit) {
203659
203708
  if (undefined === currHit)
203660
- currHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
203709
+ currHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
203661
203710
  if (undefined !== currHit)
203662
- return (currHit.isElementHit ? _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.overrideElementButtonEvent(currHit, ev) : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.onDecorationButtonEvent(currHit, ev));
203663
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203711
+ return (currHit.isElementHit ? _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.overrideElementButtonEvent(currHit, ev) : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.onDecorationButtonEvent(currHit, ev));
203712
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203664
203713
  }
203665
203714
  async processHit(ev, hit) {
203666
203715
  if (hit.isModelHit || hit.isMapHit)
203667
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No; // model hit = terrain, reality models, background maps, etc - not selectable
203716
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // model hit = terrain, reality models, background maps, etc - not selectable
203668
203717
  switch (this.selectionMode) {
203669
203718
  case SelectionMode.Replace:
203670
203719
  await this.processSelection(hit.sourceId, ev.isControlKey ? SelectionProcessing.InvertElementInSelection : SelectionProcessing.ReplaceSelectionWithElement);
@@ -203676,59 +203725,59 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203676
203725
  await this.processSelection(hit.sourceId, SelectionProcessing.RemoveElementFromSelection);
203677
203726
  break;
203678
203727
  }
203679
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203728
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203680
203729
  }
203681
203730
  async onMouseStartDrag(ev) {
203682
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap.clear(); // Need to test hit at start drag location, not current AccuSnap...
203683
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes === await this.selectDecoration(ev))
203684
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203685
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.InputSource.Touch === ev.inputSource && SelectionMethod.Pick === this.selectionMethod)
203686
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No; // Require method change for line/box selection...allow IdleTool to handle touch move...
203687
- return this.selectByPointsStart(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203731
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.clear(); // Need to test hit at start drag location, not current AccuSnap...
203732
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev))
203733
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203734
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch === ev.inputSource && SelectionMethod.Pick === this.selectionMethod)
203735
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // Require method change for line/box selection...allow IdleTool to handle touch move...
203736
+ return this.selectByPointsStart(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203688
203737
  }
203689
203738
  async onMouseEndDrag(ev) {
203690
- return this.selectByPointsEnd(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203739
+ return await this.selectByPointsEnd(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203691
203740
  }
203692
203741
  async onDataButtonUp(ev) {
203693
203742
  if (undefined === ev.viewport)
203694
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203695
- if (this.selectByPointsEnd(ev))
203696
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203743
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203744
+ if (await this.selectByPointsEnd(ev))
203745
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203697
203746
  if (SelectionMethod.Pick !== this.selectionMethod) {
203698
203747
  if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
203699
203748
  this.syncSelectionMode();
203700
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.InputSource.Touch !== ev.inputSource)
203749
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch !== ev.inputSource)
203701
203750
  this.selectByPointsStart(ev); // Require touch move and not tap to start crossing line/box selection...
203702
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203751
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203703
203752
  }
203704
- const hit = await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
203753
+ const hit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
203705
203754
  if (hit !== undefined) {
203706
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes === await this.selectDecoration(ev, hit))
203707
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203708
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes === await this.processHit(ev, hit))
203709
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203755
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, hit))
203756
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203757
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.processHit(ev, hit))
203758
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203710
203759
  }
203711
203760
  if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
203712
203761
  this.syncSelectionMode();
203713
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203762
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203714
203763
  }
203715
203764
  async onResetButtonUp(ev) {
203716
203765
  if (this._isSelectByPoints) {
203717
203766
  if (undefined !== ev.viewport)
203718
203767
  ev.viewport.invalidateDecorations();
203719
203768
  this.initSelectTool();
203720
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203769
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203721
203770
  }
203722
203771
  // Check for overlapping hits...
203723
- const lastHit = SelectionMode.Remove === this.selectionMode ? undefined : _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.currHit;
203772
+ const lastHit = SelectionMode.Remove === this.selectionMode ? undefined : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.currHit;
203724
203773
  if (lastHit && this.iModel.selectionSet.elements.has(lastHit.sourceId)) {
203725
- const autoHit = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap.currHit;
203774
+ const autoHit = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit;
203726
203775
  // Play nice w/auto-locate, only remove previous hit if not currently auto-locating or over previous hit
203727
203776
  if (undefined === autoHit || autoHit.isSameHit(lastHit)) {
203728
- const response = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateResponse();
203777
+ const response = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse();
203729
203778
  let nextHit;
203730
203779
  do {
203731
- nextHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.doLocate(response, false, ev.point, ev.viewport, ev.inputSource);
203780
+ nextHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(response, false, ev.point, ev.viewport, ev.inputSource);
203732
203781
  } while (undefined !== nextHit && (nextHit.isModelHit || nextHit.isMapHit)); // Ignore reality models, terrain, maps, etc.
203733
203782
  // remove element(s) previously selected if in replace mode, or if we have a next element in add mode
203734
203783
  if (SelectionMode.Replace === this.selectionMode || undefined !== nextHit)
@@ -203736,69 +203785,69 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203736
203785
  // add element(s) located via reset button
203737
203786
  if (undefined !== nextHit)
203738
203787
  await this.processSelection(nextHit.sourceId, SelectionProcessing.AddElementToSelection);
203739
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203788
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203740
203789
  }
203741
203790
  }
203742
- if (_Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes === await this.selectDecoration(ev, _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap.currHit))
203743
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203744
- await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.accuSnap.resetButton();
203745
- return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes;
203791
+ if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit))
203792
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203793
+ await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.resetButton();
203794
+ return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
203746
203795
  }
203747
203796
  async onSuspend() {
203748
203797
  this._isSuspended = true;
203749
203798
  if (this.wantEditManipulators())
203750
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Suspend);
203799
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Suspend);
203751
203800
  }
203752
203801
  async onUnsuspend() {
203753
203802
  this._isSuspended = false;
203754
203803
  if (this.wantEditManipulators())
203755
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Unsuspend);
203804
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Unsuspend);
203756
203805
  this.showPrompt(this.selectionMode, this.selectionMethod);
203757
203806
  }
203758
203807
  async onTouchMoveStart(ev, startEv) {
203759
203808
  if (startEv.isSingleTouch && !this._isSelectByPoints)
203760
- await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);
203761
- return (this._isSuspended || this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203809
+ await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);
203810
+ return (this._isSuspended || this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203762
203811
  }
203763
203812
  async onTouchMove(ev) {
203764
203813
  if (this._isSelectByPoints)
203765
- return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.convertTouchMoveToMotion(ev);
203814
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveToMotion(ev);
203766
203815
  }
203767
203816
  async onTouchComplete(ev) {
203768
203817
  if (this._isSelectByPoints)
203769
- return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);
203818
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);
203770
203819
  }
203771
203820
  async onTouchCancel(ev) {
203772
203821
  if (this._isSelectByPoints)
203773
- return _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, _Tool__WEBPACK_IMPORTED_MODULE_9__.BeButton.Reset);
203822
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset);
203774
203823
  }
203775
203824
  decorate(context) { this.selectByPointsDecorate(context); }
203776
203825
  async onModifierKeyTransition(_wentDown, modifier, _event) {
203777
- return (modifier === _Tool__WEBPACK_IMPORTED_MODULE_9__.BeModifierKeys.Shift && this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
203826
+ return (modifier === _Tool__WEBPACK_IMPORTED_MODULE_6__.BeModifierKeys.Shift && this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
203778
203827
  }
203779
203828
  async filterHit(hit, out) {
203780
203829
  if (!this.wantPickableDecorations() && !hit.isElementHit)
203781
- return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateFilterStatus.Reject;
203830
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject;
203782
203831
  const mode = this.selectionMode;
203783
203832
  if (SelectionMode.Replace === mode)
203784
- return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateFilterStatus.Accept;
203833
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept;
203785
203834
  const isSelected = this.iModel.selectionSet.elements.has(hit.sourceId);
203786
- const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ? _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateFilterStatus.Accept : _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateFilterStatus.Reject);
203787
- if (out && _ElementLocateManager__WEBPACK_IMPORTED_MODULE_4__.LocateFilterStatus.Reject === status)
203788
- out.explanation = _Tool__WEBPACK_IMPORTED_MODULE_9__.CoreTools.translate(`ElementSet.Error.${isSelected ? "AlreadySelected" : "NotSelected"}`);
203835
+ const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ? _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept : _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject);
203836
+ if (out && _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject === status)
203837
+ out.explanation = _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.Error.${isSelected ? "AlreadySelected" : "NotSelected"}`);
203789
203838
  return status;
203790
203839
  }
203791
203840
  async onRestartTool() { return this.exitTool(); }
203792
203841
  async onCleanup() {
203793
203842
  if (this.wantEditManipulators())
203794
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Stop);
203843
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Stop);
203795
203844
  }
203796
203845
  async onPostInstall() {
203797
203846
  await super.onPostInstall();
203798
203847
  if (!this.targetView)
203799
203848
  return;
203800
203849
  if (this.wantEditManipulators())
203801
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Start);
203850
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Start);
203802
203851
  this.initSelectTool();
203803
203852
  }
203804
203853
  static async startTool() { return new SelectionTool().run(); }
@@ -203810,7 +203859,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203810
203859
  }
203811
203860
  if (this.wantToolSettings()) {
203812
203861
  const syncMode = { value: this._selectionModeValue, propertyName: SelectionTool._modesName };
203813
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, syncMode);
203862
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, syncMode);
203814
203863
  this.syncToolSettingsProperties([syncMode]);
203815
203864
  }
203816
203865
  }
@@ -203821,14 +203870,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203821
203870
  if (!this.wantToolSettings())
203822
203871
  return undefined;
203823
203872
  // load latest values from session
203824
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId, [SelectionTool._modesName])?.forEach((value) => {
203873
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId, [SelectionTool._modesName])?.forEach((value) => {
203825
203874
  if (value.propertyName === SelectionTool._modesName)
203826
203875
  this._selectionModeValue = value.value;
203827
203876
  });
203828
203877
  // Make sure a mode of SelectionMode.Remove is valid
203829
203878
  if (SelectionMode.Remove === this.selectionMode && !this.iModel.selectionSet.isActive) {
203830
203879
  this.selectionMode = SelectionMode.Replace;
203831
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
203880
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
203832
203881
  }
203833
203882
  const toolSettings = new Array();
203834
203883
  // generate 3 columns - label will be placed in column 0 and button group editors in columns 1 and 2.
@@ -203847,7 +203896,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203847
203896
  if (this._selectionMethodValue) {
203848
203897
  const currWantManipulators = this.wantEditManipulators();
203849
203898
  if (saveWantManipulators !== currWantManipulators)
203850
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, currWantManipulators ? _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Start : _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__.ManipulatorToolEvent.Stop);
203899
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, currWantManipulators ? _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Start : _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Stop);
203851
203900
  changed = true;
203852
203901
  }
203853
203902
  }
@@ -203855,7 +203904,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
203855
203904
  this._selectionModeValue = updatedValue.value;
203856
203905
  if (this._selectionModeValue) {
203857
203906
  if (this.wantToolSettings())
203858
- _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
203907
+ _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
203859
203908
  changed = true;
203860
203909
  }
203861
203910
  }
@@ -206998,6 +207047,11 @@ class ToolSettings {
206998
207047
  };
206999
207048
  /** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
207000
207049
  static maxOnMotionSnapCallPerSecond = 15;
207050
+ /** If true, drag box selection will accept spatial elements that are inside or overlap a clip volume instead of only what is visible in the view.
207051
+ * @note Enabling is not recommended for web applications.
207052
+ * @beta
207053
+ */
207054
+ static enableVolumeSelection = false;
207001
207055
  }
207002
207056
 
207003
207057
 
@@ -214859,7 +214913,8 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
214859
214913
  knots;
214860
214914
  /** flat array of coordinate data, blocked by poleDimension and row */
214861
214915
  coffs;
214862
- /** Number of components per pole.
214916
+ /**
214917
+ * Number of components per pole.
214863
214918
  * * 3 for conventional xyz surface
214864
214919
  * * 4 for weighted (wx, wy, wz, w) surface.
214865
214920
  */
@@ -220639,11 +220694,13 @@ class ClipUtilities {
220639
220694
  clippedLocalRegion.tryTransformInPlace(localToWorld);
220640
220695
  if (!result)
220641
220696
  result = (clippedLocalRegion instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_8__.UnionRegion) ? clippedLocalRegion : _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_8__.UnionRegion.create(clippedLocalRegion);
220642
- else if (!result.tryAddChild(clippedLocalRegion))
220643
- result.children.push(...clippedLocalRegion.children);
220697
+ if (clippedLocalRegion instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_8__.UnionRegion)
220698
+ result.children.push(...clippedLocalRegion.children); // avoid nested UnionRegions
220699
+ else
220700
+ result.tryAddChild(clippedLocalRegion);
220644
220701
  }
220645
220702
  }
220646
- return result;
220703
+ return result ? _curve_RegionOps__WEBPACK_IMPORTED_MODULE_7__.RegionOps.simplifyRegionType(result) : undefined;
220647
220704
  }
220648
220705
  /**
220649
220706
  * Compute and return portions of the input curve or region that are within the clipper.
@@ -234031,9 +234088,10 @@ __webpack_require__.r(__webpack_exports__);
234031
234088
  /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
234032
234089
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234033
234090
  /* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
234034
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
234035
- /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
234036
- /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
234091
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
234092
+ /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
234093
+ /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
234094
+ /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
234037
234095
  /*---------------------------------------------------------------------------------------------
234038
234096
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
234039
234097
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -234045,6 +234103,7 @@ __webpack_require__.r(__webpack_exports__);
234045
234103
 
234046
234104
 
234047
234105
 
234106
+
234048
234107
  /**
234049
234108
  * Implementation class for computing XY area moments.
234050
234109
  * @internal
@@ -234053,15 +234112,15 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234053
234112
  _activeMomentData;
234054
234113
  _point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
234055
234114
  _point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
234056
- /** Accumulate (independent) integrations over
234057
- * * origin to chord of the arc.
234058
- * * origin to the "cap" between the chord and arc.
234115
+ /**
234116
+ * Accumulate (independent) integrations over:
234117
+ * * The area between the arc and the chord connecting its endpoints.
234118
+ * * The triangle with vertices: origin, arc start, arc end.
234059
234119
  */
234060
234120
  handleArc3d(arc) {
234061
234121
  const momentData = this._activeMomentData;
234062
234122
  const sweepRadians = arc.sweep.sweepRadians;
234063
234123
  const alphaRadians = sweepRadians * 0.5;
234064
- // from https://apps.dtic.mil/dtic/tr/fulltext/u2/274936.pdf page 71 for radius = 1
234065
234124
  let s = Math.sin(alphaRadians);
234066
234125
  let c = Math.cos(alphaRadians);
234067
234126
  let s1 = Math.sin(sweepRadians);
@@ -234088,12 +234147,12 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234088
234147
  const pointC = arc.fractionToPoint(1.0);
234089
234148
  momentData.accumulateTriangleMomentsXY(undefined, pointB, pointC);
234090
234149
  }
234091
- /** Accumulate integrals over the (triangular) areas from the origin to each line segment */
234150
+ /** Accumulate integrals over the (triangular) areas from the origin to each line segment. */
234092
234151
  handleLineString3d(ls) {
234093
234152
  const momentData = this._activeMomentData;
234094
234153
  momentData.accumulateTriangleToLineStringMomentsXY(undefined, ls.packedPoints);
234095
234154
  }
234096
- /** Accumulate integrals over the (triangular) area from the origin to this line segment */
234155
+ /** Accumulate integrals over the (triangular) area from the origin to this line segment. */
234097
234156
  handleLineSegment3d(segment) {
234098
234157
  const momentData = this._activeMomentData;
234099
234158
  segment.startPoint(this._point0);
@@ -234109,50 +234168,15 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234109
234168
  this._activeMomentData = undefined;
234110
234169
  return momentData;
234111
234170
  }
234112
- /**
234113
- * ASSUMPTIONS FOR ORIENTATION AND CONTAINMENT ISSUES
234114
- * * Largest area is outer
234115
- * * All others are interior (and not overlapping)
234116
- * Hence
234117
- * * Outer area sign must be positive -- negate all integrations as needed
234118
- * * Outer area signs must be positive -- negate all integrations as needed
234119
- * @param region
234120
- */
234121
- handleParityRegion(region) {
234122
- const allChildMoments = [];
234123
- let maxAbsArea = 0.0;
234124
- let largestChildMoments;
234125
- for (const child of region.children) {
234126
- if (child instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
234127
- const childMoments = this.handleLoop(child);
234128
- if (childMoments) {
234129
- allChildMoments.push(childMoments);
234130
- const q = Math.abs(childMoments.quantitySum);
234131
- if (q > maxAbsArea) {
234132
- maxAbsArea = q;
234133
- largestChildMoments = childMoments;
234134
- }
234135
- }
234136
- }
234137
- }
234138
- if (largestChildMoments) {
234139
- const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
234140
- const sign0 = largestChildMoments.signFactor(1.0);
234141
- summedMoments.accumulateProducts(largestChildMoments, sign0);
234142
- for (const childMoments of allChildMoments) {
234143
- if (childMoments !== largestChildMoments) {
234144
- const sign1 = childMoments.signFactor(-1.0);
234145
- summedMoments.accumulateProducts(childMoments, sign1);
234146
- }
234147
- }
234148
- return summedMoments;
234149
- }
234150
- return undefined;
234151
- }
234152
- /** Accumulate (as simple addition) products over each component of the union region. */
234153
- handleUnionRegion(region) {
234171
+ handleAnyRegion(region) {
234172
+ // guarantee there is no overlapping children
234173
+ const merged = _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionOps.regionBooleanXY(region, undefined, _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionBinaryOpType.Union);
234174
+ if (!merged)
234175
+ return undefined;
234176
+ if (merged instanceof _Loop__WEBPACK_IMPORTED_MODULE_5__.Loop)
234177
+ return this.handleLoop(merged);
234154
234178
  const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
234155
- for (const child of region.children) {
234179
+ for (const child of merged.children) {
234156
234180
  const childMoments = child.dispatchToGeometryHandler(this);
234157
234181
  if (childMoments) {
234158
234182
  const sign0 = childMoments.signFactor(1.0);
@@ -234161,32 +234185,46 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234161
234185
  }
234162
234186
  return summedMoments;
234163
234187
  }
234188
+ /** Accumulate integrals from origin to the components of the parity region. */
234189
+ handleParityRegion(region) {
234190
+ return this.handleAnyRegion(region);
234191
+ }
234192
+ /** Accumulate integrals from origin to the components of the union region. */
234193
+ handleUnionRegion(region) {
234194
+ return this.handleAnyRegion(region);
234195
+ }
234164
234196
  _strokeOptions;
234165
234197
  getStrokeOptions() {
234166
234198
  if (this._strokeOptions)
234167
234199
  return this._strokeOptions;
234168
- const options = _StrokeOptions__WEBPACK_IMPORTED_MODULE_5__.StrokeOptions.createForCurves();
234200
+ const options = _StrokeOptions__WEBPACK_IMPORTED_MODULE_6__.StrokeOptions.createForCurves();
234169
234201
  // this is unusually fine for stroking, but appropriate for sum.
234170
234202
  options.angleTol = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(5.0);
234171
234203
  this._strokeOptions = options;
234172
234204
  return options;
234173
234205
  }
234174
- /** Single curve primitive (not loop . . .).
234175
- * * stroke the curve
234176
- * * accumulate stroke array.
234206
+ /**
234207
+ * Handle a single curve primitive (not loop).
234208
+ * * Stroke the curve and accumulate stroke array.
234177
234209
  */
234178
234210
  handleCurvePrimitive(cp) {
234179
- const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_6__.LineString3d.create();
234211
+ const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
234180
234212
  const options = this.getStrokeOptions();
234181
234213
  cp.emitStrokes(strokes, options);
234182
234214
  this.handleLineString3d(strokes);
234183
234215
  }
234184
- /** handle strongly typed BSplineCurve3d as generic curve primitive */
234185
- handleBSplineCurve3d(g) { return this.handleCurvePrimitive(g); }
234186
- /** handle strongly typed BSplineCurve3dH as generic curve primitive */
234187
- handleBSplineCurve3dH(g) { return this.handleCurvePrimitive(g); }
234188
- /** handle strongly typed TransitionSpiral as generic curve primitive */
234189
- handleTransitionSpiral(g) { return this.handleCurvePrimitive(g); }
234216
+ /** Handle strongly typed BSplineCurve3d as generic curve primitive. */
234217
+ handleBSplineCurve3d(g) {
234218
+ this.handleCurvePrimitive(g);
234219
+ }
234220
+ /** Handle strongly typed BSplineCurve3dH as generic curve primitive. */
234221
+ handleBSplineCurve3dH(g) {
234222
+ this.handleCurvePrimitive(g);
234223
+ }
234224
+ /** Handle strongly typed TransitionSpiral as generic curve primitive. */
234225
+ handleTransitionSpiral(g) {
234226
+ this.handleCurvePrimitive(g);
234227
+ }
234190
234228
  }
234191
234229
 
234192
234230
 
@@ -234206,41 +234244,44 @@ __webpack_require__.r(__webpack_exports__);
234206
234244
  /* harmony export */ RegionOps: () => (/* binding */ RegionOps)
234207
234245
  /* harmony export */ });
234208
234246
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
234209
- /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
234210
- /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
234211
- /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
234212
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234213
- /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
234214
- /* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
234215
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
234216
- /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
234217
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
234247
+ /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
234248
+ /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
234249
+ /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
234250
+ /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
234251
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234252
+ /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
234253
+ /* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
234254
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
234255
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
234256
+ /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
234257
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
234218
234258
  /* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
234219
- /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
234220
- /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
234221
- /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
234222
- /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
234223
- /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
234224
- /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
234225
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
234226
- /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
234227
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
234259
+ /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
234260
+ /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
234261
+ /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
234262
+ /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
234263
+ /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
234264
+ /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
234265
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
234266
+ /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
234267
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
234228
234268
  /* harmony import */ var _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveWireMomentsXYZ */ "../../core/geometry/lib/esm/curve/CurveWireMomentsXYZ.js");
234229
- /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
234230
- /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
234231
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
234232
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
234233
- /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
234234
- /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
234235
- /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
234236
- /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
234237
- /* harmony import */ var _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Query/ConsolidateAdjacentPrimitivesContext */ "../../core/geometry/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js");
234238
- /* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
234239
- /* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
234240
- /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
234269
+ /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
234270
+ /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
234271
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
234272
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
234273
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
234274
+ /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
234275
+ /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
234276
+ /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
234277
+ /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
234278
+ /* harmony import */ var _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Query/ConsolidateAdjacentPrimitivesContext */ "../../core/geometry/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js");
234279
+ /* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
234280
+ /* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
234281
+ /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
234241
234282
  /* harmony import */ var _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RegionMomentsXY */ "../../core/geometry/lib/esm/curve/RegionMomentsXY.js");
234242
- /* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
234243
- /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
234283
+ /* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
234284
+ /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
234244
234285
  /*---------------------------------------------------------------------------------------------
234245
234286
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
234246
234287
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -234280,6 +234321,9 @@ __webpack_require__.r(__webpack_exports__);
234280
234321
 
234281
234322
 
234282
234323
 
234324
+
234325
+
234326
+
234283
234327
 
234284
234328
 
234285
234329
 
@@ -234311,13 +234355,16 @@ var RegionBinaryOpType;
234311
234355
  class RegionOps {
234312
234356
  /**
234313
234357
  * Return moment sums for a loop, parity region, or union region.
234358
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
234314
234359
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
234315
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
234316
- * @param root any Loop, ParityRegion, or UnionRegion.
234360
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
234361
+ * * `rawMomentData.origin` is the centroid of `region`.
234362
+ * * `rawMomentData.sums.weight()` is the signed area of `region`.
234363
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
234317
234364
  */
234318
- static computeXYAreaMoments(root) {
234365
+ static computeXYAreaMoments(region) {
234319
234366
  const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
234320
- const result = root.dispatchToGeometryHandler(handler);
234367
+ const result = region.dispatchToGeometryHandler(handler);
234321
234368
  if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
234322
234369
  result.shiftOriginAndSumsToCentroidOfSums();
234323
234370
  return result;
@@ -234326,8 +234373,8 @@ class RegionOps {
234326
234373
  }
234327
234374
  /**
234328
234375
  * Return an area tolerance for a given xy-range and optional distance tolerance.
234329
- * @param range range of planar region to tolerance
234330
- * @param distanceTolerance optional absolute distance tolerance
234376
+ * @param range range of planar region to tolerance.
234377
+ * @param distanceTolerance optional absolute distance tolerance.
234331
234378
  */
234332
234379
  static computeXYAreaTolerance(range, distanceTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234333
234380
  // if A = bh and e is distance tolerance, then A' := (b+e/2)(h+e/2) = A + e/2(b+h+e/2), so A'-A = e/2(b+h+e/2).
@@ -234336,19 +234383,13 @@ class RegionOps {
234336
234383
  }
234337
234384
  /**
234338
234385
  * Return a (signed) xy area for a region.
234339
- <<<<<<< HEAD
234340
- * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
234341
- * @param root any Loop, ParityRegion, or UnionRegion.
234342
- =======
234343
234386
  * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
234344
- * * For a non-self-intersecting Loop, the returned area is negative if and only if the Loop is oriented clockwise
234345
- * with respect to the positive z-axis.
234387
+ * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
234346
234388
  * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
234347
- >>>>>>> 168574b454 (Utilize `PolyfaceData.edgeMateIndex` to speed up some `Polyface` methods (#8095))
234348
234389
  */
234349
- static computeXYArea(root) {
234390
+ static computeXYArea(region) {
234350
234391
  const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
234351
- const result = root.dispatchToGeometryHandler(handler);
234392
+ const result = region.dispatchToGeometryHandler(handler);
234352
234393
  if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
234353
234394
  return result.quantitySum;
234354
234395
  }
@@ -234356,49 +234397,88 @@ class RegionOps {
234356
234397
  }
234357
234398
  /**
234358
234399
  * Return MomentData with the sums of wire moments.
234400
+ * * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
234359
234401
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
234360
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
234361
- * @param root any CurveCollection or CurvePrimitive.
234402
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
234403
+ * * `rawMomentData.origin` is the wire centroid of `curve`.
234404
+ * * `rawMomentData.sums.weight()` is the signed length of `curve`.
234405
+ * @param curve any [[CurveCollection]] or [[CurvePrimitive]].
234362
234406
  */
234363
- static computeXYZWireMomentSums(root) {
234407
+ static computeXYZWireMomentSums(curve) {
234364
234408
  const handler = new _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__.CurveWireMomentsXYZ();
234365
- handler.visitLeaves(root);
234409
+ handler.visitLeaves(curve);
234366
234410
  const result = handler.momentData;
234367
234411
  result.shiftOriginAndSumsToCentroidOfSums();
234368
234412
  return result;
234369
234413
  }
234414
+ /**
234415
+ * Return a [[Ray3d]] with:
234416
+ * * `origin` is the centroid of the region,
234417
+ * * `direction` is a unit vector perpendicular to the region plane,
234418
+ * * `a` is the region area.
234419
+ * @param region the region to process. Can lie in any plane.
234420
+ * @param result optional pre-allocated result to populate and return.
234421
+ */
234422
+ static centroidAreaNormal(region, result) {
234423
+ const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__.FrameBuilder.createRightHandedFrame(undefined, region);
234424
+ if (!localToWorld)
234425
+ return undefined;
234426
+ const normal = localToWorld.matrix.columnZ(result?.direction);
234427
+ const regionIsXY = normal.isParallelTo(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.unitZ(), true);
234428
+ let regionXY = region;
234429
+ if (!regionIsXY) { // rotate the region to be parallel to the xy-plane
234430
+ regionXY = region.cloneTransformed(localToWorld.inverse());
234431
+ if (!regionXY)
234432
+ return undefined;
234433
+ }
234434
+ const momentData = RegionOps.computeXYAreaMoments(regionXY);
234435
+ if (!momentData)
234436
+ return undefined;
234437
+ const centroid = momentData.origin.clone(result?.origin);
234438
+ if (!regionIsXY) // rotate centroid back (area is unchanged)
234439
+ localToWorld.multiplyPoint3d(centroid, centroid);
234440
+ let area = momentData.sums.weight();
234441
+ if (area < 0.0) {
234442
+ area = -area;
234443
+ normal.scale(-1.0, normal);
234444
+ }
234445
+ if (!result)
234446
+ result = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__.Ray3d.createCapture(centroid, normal);
234447
+ result.a = area;
234448
+ return result;
234449
+ }
234370
234450
  /**
234371
234451
  * Create loops in the graph.
234372
234452
  * @internal
234373
234453
  */
234374
234454
  static addLoopsToGraph(graph, data, announceIsolatedLoop) {
234375
- if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
234455
+ if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
234376
234456
  const points = data.getPackedStrokes();
234377
234457
  if (points)
234378
234458
  this.addLoopsToGraph(graph, points, announceIsolatedLoop);
234379
234459
  }
234380
- else if (data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_5__.ParityRegion) {
234460
+ else if (data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
234381
234461
  for (const child of data.children) {
234382
234462
  const points = child.getPackedStrokes();
234383
234463
  if (points)
234384
234464
  this.addLoopsToGraph(graph, points, announceIsolatedLoop);
234385
234465
  }
234386
234466
  }
234387
- else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234388
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234467
+ else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234468
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234389
234469
  if (loopSeed !== undefined)
234390
234470
  announceIsolatedLoop(graph, loopSeed);
234391
234471
  }
234392
234472
  else if (Array.isArray(data)) {
234393
234473
  if (data.length > 0) {
234394
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d.isAnyImmediatePointType(data[0])) {
234395
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234474
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(data[0])) {
234475
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234396
234476
  if (loopSeed !== undefined)
234397
234477
  announceIsolatedLoop(graph, loopSeed);
234398
234478
  }
234399
- else if (data[0] instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234479
+ else if (data[0] instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234400
234480
  for (const loop of data) {
234401
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, loop);
234481
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, loop);
234402
234482
  if (loopSeed !== undefined)
234403
234483
  announceIsolatedLoop(graph, loopSeed);
234404
234484
  }
@@ -234438,10 +234518,10 @@ class RegionOps {
234438
234518
  static finishGraphToPolyface(graph, triangulate) {
234439
234519
  if (graph) {
234440
234520
  if (triangulate) {
234441
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.triangulateAllPositiveAreaFaces(graph);
234442
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
234521
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph);
234522
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
234443
234523
  }
234444
- return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__.PolyfaceBuilder.graphToPolyface(graph);
234524
+ return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph);
234445
234525
  }
234446
234526
  return undefined;
234447
234527
  }
@@ -234455,7 +234535,7 @@ class RegionOps {
234455
234535
  * @param triangulate whether to triangulate the result
234456
234536
  */
234457
234537
  static polygonXYAreaIntersectLoopsToPolyface(loopsA, loopsB, triangulate = false) {
234458
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && inB), this._graphCheckPointFunction);
234538
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && inB), this._graphCheckPointFunction);
234459
234539
  return this.finishGraphToPolyface(graph, triangulate);
234460
234540
  }
234461
234541
  /**
@@ -234468,7 +234548,7 @@ class RegionOps {
234468
234548
  * @param triangulate whether to triangulate the result
234469
234549
  */
234470
234550
  static polygonXYAreaUnionLoopsToPolyface(loopsA, loopsB, triangulate = false) {
234471
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA || inB), this._graphCheckPointFunction);
234551
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA || inB), this._graphCheckPointFunction);
234472
234552
  return this.finishGraphToPolyface(graph, triangulate);
234473
234553
  }
234474
234554
  /**
@@ -234481,9 +234561,31 @@ class RegionOps {
234481
234561
  * @param triangulate whether to triangulate the result
234482
234562
  */
234483
234563
  static polygonXYAreaDifferenceLoopsToPolyface(loopsA, loopsB, triangulate = false) {
234484
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
234564
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
234485
234565
  return this.finishGraphToPolyface(graph, triangulate);
234486
234566
  }
234567
+ /**
234568
+ * Simplify the type of the region by stripping redundant parent(s).
234569
+ * * No Boolean operations are performed.
234570
+ * * Invalid inputs (such as childless regions) are not corrected.
234571
+ * @param region region to simplify
234572
+ * @returns
234573
+ * * For a [[UnionRegion]] with exactly one child, return it if it is a [[Loop]],
234574
+ * or if it is a [[ParityRegion]] with multiple children, otherwise return the `ParityRegion`'s `Loop`.
234575
+ * * For a `ParityRegion` with exactly one `Loop`, return it.
234576
+ * * All other inputs returned unchanged.
234577
+ */
234578
+ static simplifyRegionType(region) {
234579
+ if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion) {
234580
+ if (region.children.length === 1)
234581
+ return this.simplifyRegionType(region.children[0]);
234582
+ }
234583
+ else if (region instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
234584
+ if (region.children.length === 1)
234585
+ return region.children[0];
234586
+ }
234587
+ return region;
234588
+ }
234487
234589
  /**
234488
234590
  * Return areas defined by a boolean operation.
234489
234591
  * @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
@@ -234497,10 +234599,8 @@ class RegionOps {
234497
234599
  * to connect interior loops to exterior loops.
234498
234600
  */
234499
234601
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234500
- // Always return UnionRegion for now. But keep return type as AnyRegion:
234501
- // in the future, we might return the *simplest* region type.
234502
- const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion.create();
234503
- const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union);
234602
+ const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion.create();
234603
+ const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union);
234504
234604
  context.addMembers(loopsA, loopsB);
234505
234605
  context.annotateAndMergeCurvesInGraph(mergeTolerance);
234506
234606
  const range = context.groupA.range().union(context.groupB.range());
@@ -234512,12 +234612,12 @@ class RegionOps {
234512
234612
  if (Math.abs(area) < areaTol)
234513
234613
  return;
234514
234614
  if (faceType === 1) {
234515
- const loop = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.createLoopInFace(face);
234615
+ const loop = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.createLoopInFace(face);
234516
234616
  if (loop)
234517
234617
  result.tryAddChild(loop);
234518
234618
  }
234519
234619
  });
234520
- return result;
234620
+ return result ? this.simplifyRegionType(result) : undefined;
234521
234621
  }
234522
234622
  /**
234523
234623
  * Return a polyface whose facets are a boolean operation between the input regions.
@@ -234532,7 +234632,7 @@ class RegionOps {
234532
234632
  * @param triangulate whether to triangulate the result
234533
234633
  */
234534
234634
  static polygonBooleanXYToPolyface(inputA, operation, inputB, triangulate = false) {
234535
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, true);
234635
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, true);
234536
234636
  return this.finishGraphToPolyface(graph, triangulate);
234537
234637
  }
234538
234638
  /**
@@ -234547,18 +234647,18 @@ class RegionOps {
234547
234647
  * @param inputB second set of loops
234548
234648
  */
234549
234649
  static polygonBooleanXYToLoops(inputA, operation, inputB) {
234550
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, true);
234650
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, true);
234551
234651
  if (!graph)
234552
234652
  return undefined;
234553
- const loopEdges = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__.HalfEdgeGraphSearch.collectExtendedBoundaryLoopsInGraph(graph, _topology_Graph__WEBPACK_IMPORTED_MODULE_14__.HalfEdgeMask.EXTERIOR);
234653
+ const loopEdges = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__.HalfEdgeGraphSearch.collectExtendedBoundaryLoopsInGraph(graph, _topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR);
234554
234654
  const allLoops = [];
234555
234655
  for (const graphLoop of loopEdges) {
234556
- const points = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray();
234656
+ const points = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray();
234557
234657
  for (const edge of graphLoop)
234558
234658
  points.pushXYZ(edge.x, edge.y, edge.z);
234559
234659
  points.pushWrap(1);
234560
- const loop = _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.create();
234561
- loop.tryAddChild(_LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d.createCapture(points));
234660
+ const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create();
234661
+ loop.tryAddChild(_LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d.createCapture(points));
234562
234662
  allLoops.push(loop);
234563
234663
  }
234564
234664
  return RegionOps.sortOuterAndHoleLoopsXY(allLoops);
@@ -234576,7 +234676,7 @@ class RegionOps {
234576
234676
  * object.
234577
234677
  */
234578
234678
  static constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions) {
234579
- const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_17__.PolygonWireOffsetContext();
234679
+ const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__.PolygonWireOffsetContext();
234580
234680
  return context.constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions);
234581
234681
  }
234582
234682
  /**
@@ -234588,8 +234688,8 @@ class RegionOps {
234588
234688
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
234589
234689
  */
234590
234690
  static constructCurveXYOffset(curves, offsetDistanceOrOptions) {
234591
- const offsetOptions = _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__.OffsetOptions.create(offsetDistanceOrOptions);
234592
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.constructCurveXYOffset(curves, offsetOptions);
234691
+ const offsetOptions = _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__.OffsetOptions.create(offsetDistanceOrOptions);
234692
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.constructCurveXYOffset(curves, offsetOptions);
234593
234693
  }
234594
234694
  /**
234595
234695
  * Test if point (x,y) is IN, OUT or ON a region.
@@ -234599,7 +234699,7 @@ class RegionOps {
234599
234699
  * @param y y coordinate of point to test
234600
234700
  */
234601
234701
  static testPointInOnOutRegionXY(curves, x, y) {
234602
- return _Query_InOutTests__WEBPACK_IMPORTED_MODULE_20__.PointInOnOutContext.testPointInOnOutRegionXY(curves, x, y);
234702
+ return _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__.PointInOnOutContext.testPointInOnOutRegionXY(curves, x, y);
234603
234703
  }
234604
234704
  /**
234605
234705
  * Create curve collection of subtype determined by gaps between the input curves.
@@ -234623,11 +234723,11 @@ class RegionOps {
234623
234723
  maxGap = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.maxXY(maxGap, curves[i].endPoint().distance(curves[i + 1].startPoint()));
234624
234724
  let collection;
234625
234725
  if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(maxGap)) {
234626
- collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_21__.Path.create();
234726
+ collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_23__.Path.create();
234627
234727
  isPath = true;
234628
234728
  }
234629
234729
  else {
234630
- collection = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.BagOfCurves.create();
234730
+ collection = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create();
234631
234731
  }
234632
234732
  for (const c of curves)
234633
234733
  collection.tryAddChild(c);
@@ -234653,7 +234753,7 @@ class RegionOps {
234653
234753
  * @param cutterCurves input curves to intersect with `curvesToCut`
234654
234754
  */
234655
234755
  static cloneCurvesWithXYSplits(curvesToCut, cutterCurves) {
234656
- return _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_23__.CurveSplitContext.cloneCurvesWithXYSplits(curvesToCut, cutterCurves);
234756
+ return _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__.CurveSplitContext.cloneCurvesWithXYSplits(curvesToCut, cutterCurves);
234657
234757
  }
234658
234758
  /**
234659
234759
  * Create paths assembled from many curves.
@@ -234664,11 +234764,11 @@ class RegionOps {
234664
234764
  static splitToPathsBetweenBreaks(source, makeClones) {
234665
234765
  if (source === undefined)
234666
234766
  return undefined;
234667
- if (source instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive)
234767
+ if (source instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive)
234668
234768
  return source;
234669
234769
  // source is a collection . ..
234670
234770
  const primitives = source.collectCurvePrimitives();
234671
- const chainCollector = new _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_25__.ChainCollectorContext(makeClones);
234771
+ const chainCollector = new _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__.ChainCollectorContext(makeClones);
234672
234772
  for (const primitive of primitives) {
234673
234773
  chainCollector.announceCurvePrimitive(primitive);
234674
234774
  }
@@ -234684,7 +234784,7 @@ class RegionOps {
234684
234784
  * @returns object with named chains, insideOffsets, outsideOffsets
234685
234785
  */
234686
234786
  static collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance) {
234687
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
234787
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
234688
234788
  }
234689
234789
  /**
234690
234790
  * Restructure curve fragments as Paths and Loops.
@@ -234693,7 +234793,7 @@ class RegionOps {
234693
234793
  * @returns chains, possibly wrapped in a [[BagOfCurves]].
234694
234794
  */
234695
234795
  static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234696
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.collectChains(fragments, gapTolerance);
234796
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectChains(fragments, gapTolerance);
234697
234797
  }
234698
234798
  /**
234699
234799
  * Find all intersections among curves in `curvesToCut` against the boundaries of `region` and return fragments
@@ -234705,17 +234805,17 @@ class RegionOps {
234705
234805
  const result = { insideParts: [], outsideParts: [], coincidentParts: [] };
234706
234806
  const pathWithIntersectionMarkup = RegionOps.cloneCurvesWithXYSplits(curvesToCut, region);
234707
234807
  const splitPaths = RegionOps.splitToPathsBetweenBreaks(pathWithIntersectionMarkup, true);
234708
- if (splitPaths instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection) {
234808
+ if (splitPaths instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
234709
234809
  for (const child of splitPaths.children) {
234710
- const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(child);
234810
+ const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(child);
234711
234811
  if (pointOnChild) {
234712
234812
  const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
234713
234813
  pushToInOnOutArrays(child, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
234714
234814
  }
234715
234815
  }
234716
234816
  }
234717
- else if (splitPaths instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive) {
234718
- const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(splitPaths);
234817
+ else if (splitPaths instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
234818
+ const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(splitPaths);
234719
234819
  if (pointOnChild) {
234720
234820
  const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
234721
234821
  pushToInOnOutArrays(splitPaths, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
@@ -234739,10 +234839,10 @@ class RegionOps {
234739
234839
  * normal in z column. If not a rectangle, return undefined.
234740
234840
  */
234741
234841
  static rectangleEdgeTransform(data, requireClosurePoint = true) {
234742
- if (data instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234842
+ if (data instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234743
234843
  return this.rectangleEdgeTransform(data.packedPoints);
234744
234844
  }
234745
- else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234845
+ else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234746
234846
  let dataToUse;
234747
234847
  if (requireClosurePoint && data.length === 5) {
234748
234848
  if (!_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(data.distanceIndexIndex(0, 4)))
@@ -234756,8 +234856,8 @@ class RegionOps {
234756
234856
  return undefined;
234757
234857
  }
234758
234858
  else {
234759
- dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(data);
234760
- _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_26__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
234859
+ dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(data);
234860
+ _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
234761
234861
  if (dataToUse.length < (requireClosurePoint ? 5 : 4))
234762
234862
  return undefined;
234763
234863
  }
@@ -234768,19 +234868,19 @@ class RegionOps {
234768
234868
  if (normalVector.normalizeInPlace()
234769
234869
  && vector12.isAlmostEqual(vector03)
234770
234870
  && vector01.isPerpendicularTo(vector03)) {
234771
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_27__.Transform.createOriginAndMatrixColumns(dataToUse.getPoint3dAtUncheckedPointIndex(0), vector01, vector03, normalVector);
234871
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__.Transform.createOriginAndMatrixColumns(dataToUse.getPoint3dAtUncheckedPointIndex(0), vector01, vector03, normalVector);
234772
234872
  }
234773
234873
  }
234774
234874
  else if (Array.isArray(data)) {
234775
- return this.rectangleEdgeTransform(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__.Point3dArrayCarrier(data), requireClosurePoint);
234875
+ return this.rectangleEdgeTransform(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__.Point3dArrayCarrier(data), requireClosurePoint);
234776
234876
  }
234777
- else if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234877
+ else if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234778
234878
  return this.rectangleEdgeTransform(data.children[0].packedPoints, true);
234779
234879
  }
234780
- else if (data instanceof _Path__WEBPACK_IMPORTED_MODULE_21__.Path && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234880
+ else if (data instanceof _Path__WEBPACK_IMPORTED_MODULE_23__.Path && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234781
234881
  return this.rectangleEdgeTransform(data.children[0].packedPoints, requireClosurePoint);
234782
234882
  }
234783
- else if (data instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveChain) {
234883
+ else if (data instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveChain) {
234784
234884
  if (!data.checkForNonLinearPrimitives()) {
234785
234885
  // const linestring = LineString3d.create();
234786
234886
  const strokes = data.getPackedStrokes();
@@ -234804,7 +234904,7 @@ class RegionOps {
234804
234904
  * @param options options for tolerance and selective simplification.
234805
234905
  */
234806
234906
  static consolidateAdjacentPrimitives(curves, options) {
234807
- const context = new _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_29__.ConsolidateAdjacentCurvePrimitivesContext(options);
234907
+ const context = new _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__.ConsolidateAdjacentCurvePrimitivesContext(options);
234808
234908
  curves.dispatchToGeometryHandler(context);
234809
234909
  }
234810
234910
  /**
@@ -234823,14 +234923,14 @@ class RegionOps {
234823
234923
  static sortOuterAndHoleLoopsXY(loops) {
234824
234924
  const loopAndArea = [];
234825
234925
  for (const candidate of loops) {
234826
- if (candidate instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop)
234827
- _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.pushLoop(loopAndArea, candidate);
234828
- else if (candidate instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234829
- const loop = _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(candidate);
234830
- _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.pushLoop(loopAndArea, loop);
234926
+ if (candidate instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop)
234927
+ _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, candidate);
234928
+ else if (candidate instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234929
+ const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.createPolygon(candidate);
234930
+ _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, loop);
234831
234931
  }
234832
234932
  }
234833
- return _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.sortAsAnyRegion(loopAndArea);
234933
+ return _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.sortAsAnyRegion(loopAndArea);
234834
234934
  }
234835
234935
  /**
234836
234936
  * Find all xy-areas bounded by the unstructured, possibly intersecting curves.
@@ -234853,12 +234953,13 @@ class RegionOps {
234853
234953
  * to the edge and a constituent curve in each.
234854
234954
  */
234855
234955
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234856
- const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
234956
+ let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
234957
+ primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create(...primitives)).children;
234857
234958
  const range = this.curveArrayRange(primitives);
234858
234959
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
234859
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_31__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234860
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
234861
- return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
234960
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_34__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234961
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
234962
+ return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
234862
234963
  }
234863
234964
  /**
234864
234965
  * Collect all `CurvePrimitives` in loosely typed input.
@@ -234873,10 +234974,10 @@ class RegionOps {
234873
234974
  */
234874
234975
  static collectCurvePrimitives(candidates, collectorArray, smallestPossiblePrimitives = false, explodeLinestrings = false) {
234875
234976
  const results = collectorArray === undefined ? [] : collectorArray;
234876
- if (candidates instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive) {
234977
+ if (candidates instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
234877
234978
  candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
234878
234979
  }
234879
- else if (candidates instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection) {
234980
+ else if (candidates instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
234880
234981
  candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
234881
234982
  }
234882
234983
  else if (Array.isArray(candidates)) {
@@ -234895,7 +234996,7 @@ class RegionOps {
234895
234996
  static expandLineStrings(candidates) {
234896
234997
  const result = [];
234897
234998
  for (const c of candidates) {
234898
- if (c instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234999
+ if (c instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234899
235000
  for (let i = 0; i + 1 < c.packedPoints.length; i++) {
234900
235001
  const q = c.getIndexedSegment(i);
234901
235002
  if (q !== undefined)
@@ -234914,16 +235015,16 @@ class RegionOps {
234914
235015
  * @param worldToLocal transform to apply to data before computing its range
234915
235016
  */
234916
235017
  static curveArrayRange(data, worldToLocal) {
234917
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_32__.Range3d.create();
234918
- if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__.GeometryQuery)
235018
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__.Range3d.create();
235019
+ if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
234919
235020
  data.extendRange(range, worldToLocal);
234920
235021
  else if (Array.isArray(data)) {
234921
235022
  for (const c of data) {
234922
- if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__.GeometryQuery)
235023
+ if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
234923
235024
  c.extendRange(range, worldToLocal);
234924
- else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d)
235025
+ else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d)
234925
235026
  range.extendPoint(c, worldToLocal);
234926
- else if (c instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray)
235027
+ else if (c instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray)
234927
235028
  range.extendRange(c.getRange(worldToLocal));
234928
235029
  else if (Array.isArray(c))
234929
235030
  range.extendRange(this.curveArrayRange(c, worldToLocal));
@@ -234942,37 +235043,37 @@ class RegionOps {
234942
235043
  if (polygons.length === 0)
234943
235044
  return undefined;
234944
235045
  const firstEntry = polygons[0];
234945
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d.isAnyImmediatePointType(firstEntry)) {
234946
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
235046
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(firstEntry)) {
235047
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234947
235048
  }
234948
235049
  else if (polygons.length > 1) {
234949
235050
  let writablePolygons;
234950
- if (firstEntry instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedReadWriteXYZCollection) {
235051
+ if (firstEntry instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedReadWriteXYZCollection) {
234951
235052
  writablePolygons = polygons;
234952
235053
  }
234953
235054
  else {
234954
235055
  writablePolygons = [];
234955
235056
  for (const polygon of polygons)
234956
- writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(polygon));
235057
+ writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(polygon));
234957
235058
  }
234958
- const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_34__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
235059
+ const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
234959
235060
  if (sortedPolygons.length === 1) { // below requires exactly one outer loop!
234960
- if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
234961
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
235061
+ if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
235062
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
234962
235063
  }
234963
235064
  }
234964
235065
  else {
234965
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(firstEntry);
235066
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(firstEntry);
234966
235067
  }
234967
235068
  }
234968
235069
  else {
234969
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
235070
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234970
235071
  }
234971
235072
  if (!graph) {
234972
235073
  // Last resort: try full merge. Conveniently, multiple polygons are processed with parity logic.
234973
- if (graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(polygons, [], (inA, _inB) => inA)) {
234974
- if (_topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.triangulateAllPositiveAreaFaces(graph))
234975
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
235074
+ if (graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(polygons, [], (inA, _inB) => inA)) {
235075
+ if (_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph))
235076
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
234976
235077
  }
234977
235078
  }
234978
235079
  return graph;
@@ -234982,13 +235083,13 @@ class RegionOps {
234982
235083
  const strokedComponent = component.cloneStroked(options);
234983
235084
  // package the stroked region as polygons
234984
235085
  const polygons = [];
234985
- if (strokedComponent instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
234986
- if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d)
235086
+ if (strokedComponent instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
235087
+ if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
234987
235088
  polygons.push(strokedComponent.children[0].packedPoints); // expect only 1
234988
235089
  }
234989
- else if (strokedComponent instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_5__.ParityRegion) {
235090
+ else if (strokedComponent instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
234990
235091
  for (const strokedLoop of strokedComponent.children) {
234991
- if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d)
235092
+ if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
234992
235093
  polygons.push(strokedLoop.children[0].packedPoints); // expect only 1
234993
235094
  }
234994
235095
  }
@@ -235016,7 +235117,7 @@ class RegionOps {
235016
235117
  */
235017
235118
  static facetRegionXY(region, options) {
235018
235119
  let graph;
235019
- if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
235120
+ if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion) {
235020
235121
  for (const child of region.children) {
235021
235122
  const childGraph = RegionOps.triangulateRegionComponent(child, options);
235022
235123
  if (childGraph) {
@@ -235038,8 +235139,8 @@ class RegionOps {
235038
235139
  if (!graph)
235039
235140
  return undefined;
235040
235141
  if (options?.maximizeConvexFacets)
235041
- _topology_Merging__WEBPACK_IMPORTED_MODULE_35__.HalfEdgeGraphOps.expandConvexFaces(graph);
235042
- return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__.PolyfaceBuilder.graphToPolyface(graph, options);
235142
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
235143
+ return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph, options);
235043
235144
  }
235044
235145
  /**
235045
235146
  * Decompose a polygon with optional holes into an array of convex polygons.
@@ -235052,11 +235153,11 @@ class RegionOps {
235052
235153
  if (!graph)
235053
235154
  return undefined;
235054
235155
  if (maximize)
235055
- _topology_Merging__WEBPACK_IMPORTED_MODULE_35__.HalfEdgeGraphOps.expandConvexFaces(graph);
235156
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
235056
235157
  const convexPolygons = [];
235057
235158
  graph.announceFaceLoops((_graph, seed) => {
235058
- if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_14__.HalfEdgeMask.EXTERIOR))
235059
- convexPolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(seed.collectAroundFace((node) => { return node.getPoint3d(); })));
235159
+ if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR))
235160
+ convexPolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(seed.collectAroundFace((node) => { return node.getPoint3d(); })));
235060
235161
  return true;
235061
235162
  });
235062
235163
  return convexPolygons;
@@ -235108,24 +235209,25 @@ __webpack_require__.r(__webpack_exports__);
235108
235209
  /* harmony export */ RegionOpsFaceToFaceSearch: () => (/* binding */ RegionOpsFaceToFaceSearch)
235109
235210
  /* harmony export */ });
235110
235211
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
235111
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
235212
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
235112
235213
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
235113
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
235214
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
235114
235215
  /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
235115
235216
  /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
235116
235217
  /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
235117
235218
  /* harmony import */ var _topology_RegularizeFace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../topology/RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
235118
- /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
235119
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
235120
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
235219
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
235220
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
235221
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
235121
235222
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
235122
- /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
235123
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
235223
+ /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
235224
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
235225
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
235124
235226
  /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
235125
235227
  /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
235126
- /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
235228
+ /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
235127
235229
  /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
235128
- /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
235230
+ /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
235129
235231
  /*---------------------------------------------------------------------------------------------
235130
235232
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
235131
235233
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -235152,6 +235254,7 @@ __webpack_require__.r(__webpack_exports__);
235152
235254
 
235153
235255
 
235154
235256
 
235257
+
235155
235258
  /**
235156
235259
  * base class for callbacks during region sweeps.
235157
235260
  * * At start of a component, `startComponent(node)` is called announcing a representative node on the outermost face.
@@ -235468,8 +235571,7 @@ class RegionGroup {
235468
235571
  }
235469
235572
  return range;
235470
235573
  }
235471
- /** Ask if the current _numIn count qualifies as an "in" for this operation type.
235472
- */
235574
+ /** Ask if the current _numIn count qualifies as an "in" for this operation type. */
235473
235575
  getInOut() {
235474
235576
  // UNION is true if one or more members are IN
235475
235577
  if (this.groupOpType === RegionGroupOpType.Union)
@@ -235485,11 +235587,12 @@ class RegionGroup {
235485
235587
  // push new members into the group.
235486
235588
  addMember(data, allowLineSegment = false) {
235487
235589
  if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop || data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_9__.ParityRegion) {
235488
- const cleanerData = data.clone();
235590
+ let cleanerData = data.clone();
235489
235591
  _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.consolidateAdjacentPrimitives(cleanerData);
235592
+ cleanerData = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__.TransferWithSplitArcs.clone(cleanerData);
235490
235593
  this.members.push(new RegionGroupMember(cleanerData, this));
235491
235594
  }
235492
- else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_10__.UnionRegion) {
235595
+ else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
235493
235596
  for (const child of data.children) {
235494
235597
  this.addMember(child);
235495
235598
  }
@@ -235499,7 +235602,7 @@ class RegionGroup {
235499
235602
  this.addMember(item);
235500
235603
  }
235501
235604
  }
235502
- else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
235605
+ else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
235503
235606
  this.members.push(new RegionGroupMember(data, this));
235504
235607
  }
235505
235608
  }
@@ -235516,22 +235619,22 @@ class RegionGroup {
235516
235619
  /**
235517
235620
  * A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
235518
235621
  * * In the binary operation OP (union, intersection, parity, difference), the left and right operands
235519
- * are each a composite union, difference, or parity among multiple inputs, i.e.
235622
+ * are each a composite union, difference, or parity among multiple inputs, i.e.,
235520
235623
  * * (operationA among Ai) OP (operationB among Bi)
235521
235624
  * * where the Ai are one set of regions, being combined by operationA
235522
- * * and the Bi are the another set of regions, being combined by operationB
235523
- * * Each group of Ai and Bi is a `RegionGroup`
235625
+ * * and the Bi are the another set of regions, being combined by operationB.
235626
+ * * Each group of Ai and Bi is a `RegionGroup`.
235524
235627
  * * This is an extremely delicate structure.
235525
235628
  * * Members are public because of the unique variety of queries, but should only be used for queries.
235526
235629
  * * The graph and curves in the booleans are connected by an extended pointer chain:
235527
- * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
235528
- * * (CurveLocationDetail).curve points to a curve
235529
- * * (Curve).parent points to RegionGroupMember
235530
- * * (RegionGroupMember) points to RegionGroup
235531
- * * (RegionGroup) points to RegionBooleanBinaryContext
235532
- * * So..when a graph sweep crosses an edge,
235533
- * * the chain leads to a parity count in the RegionGroupMember
235534
- * * that can change the number of members active in the RegionGroup
235630
+ * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
235631
+ * * (CurveLocationDetail).curve points to a curve.
235632
+ * * (Curve).parent points to RegionGroupMember.
235633
+ * * (RegionGroupMember) points to RegionGroup.
235634
+ * * (RegionGroup) points to RegionBooleanBinaryContext.
235635
+ * * So when a graph sweep crosses an edge
235636
+ * * the chain leads to a parity count in the RegionGroupMember.
235637
+ * * that can change the number of members active in the RegionGroup.
235535
235638
  * * which can change the state of the context.
235536
235639
  * @internal
235537
235640
  */
@@ -235546,7 +235649,7 @@ class RegionBooleanContext {
235546
235649
  this.groupA = new RegionGroup(this, groupTypeA);
235547
235650
  this.groupB = new RegionGroup(this, groupTypeB);
235548
235651
  this.extraGeometry = new RegionGroup(this, RegionGroupOpType.NonBounding);
235549
- this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // it will be revised on can calls.
235652
+ this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // revised in runClassificationSweep
235550
235653
  }
235551
235654
  /**
235552
235655
  * Create a context with both A and B groups empty.
@@ -235565,7 +235668,7 @@ class RegionBooleanContext {
235565
235668
  this.addConnectives();
235566
235669
  }
235567
235670
  _workSegment;
235568
- static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
235671
+ static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
235569
235672
  /**
235570
235673
  * The sweep operations require access to all geometry by edge crossings and face walk.
235571
235674
  * If input loops are non-overlapping, there may be disconnected islands not reachable.
@@ -235580,7 +235683,7 @@ class RegionBooleanContext {
235580
235683
  const rangeAB = rangeA.union(rangeB);
235581
235684
  const areaTol = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYAreaTolerance(rangeAB);
235582
235685
  let margin = 0.1;
235583
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
235686
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
235584
235687
  if (this._workSegment)
235585
235688
  margin *= this._workSegment.point0Ref.distanceXY(this._workSegment.point1Ref); // how much further to extend each bridge ray
235586
235689
  const maxPoints = [];
@@ -235588,7 +235691,7 @@ class RegionBooleanContext {
235588
235691
  const area = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYArea(region);
235589
235692
  if (area === undefined || Math.abs(area) < areaTol)
235590
235693
  return; // avoid bridging trivial faces
235591
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
235694
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
235592
235695
  if (this._workSegment)
235593
235696
  maxPoints.push(this._workSegment.point1Ref);
235594
235697
  };
@@ -235603,17 +235706,17 @@ class RegionBooleanContext {
235603
235706
  }
235604
235707
  }
235605
235708
  }
235606
- const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createZero();
235709
+ const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.createZero();
235607
235710
  for (const p of maxPoints) {
235608
- // Make a line from...
235609
- // 1) exactly the max point of the loops to
235610
- // 2) a point clearly outside the big range
235611
- // If p came from some inner loop this will...
235612
- // 1) create a bridge from the inner loop through any containing loops (always)
235613
- // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
235614
- const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
235615
- const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
235616
- const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
235711
+ // Make a line from
235712
+ // 1) exactly the max point of the loops to
235713
+ // 2) a point clearly outside the big range
235714
+ // If p came from some inner loop this will
235715
+ // 1) create a bridge from the inner loop through any containing loops (always)
235716
+ // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
235717
+ const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
235718
+ const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
235719
+ const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
235617
235720
  this.extraGeometry.addMember(bridgeLine, true);
235618
235721
  }
235619
235722
  }
@@ -235627,7 +235730,7 @@ class RegionBooleanContext {
235627
235730
  */
235628
235731
  annotateAndMergeCurvesInGraph(mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_7__.Geometry.smallMetricDistance) {
235629
235732
  const allPrimitives = [];
235630
- // ASSUME loops have fine-grained types -- no linestrings !!
235733
+ // ASSUME loops have fine-grained types (no linestrings)
235631
235734
  for (const group of [this.groupA, this.groupB, this.extraGeometry]) {
235632
235735
  for (const member of group.members) {
235633
235736
  let k = allPrimitives.length;
@@ -235638,9 +235741,8 @@ class RegionBooleanContext {
235638
235741
  }
235639
235742
  }
235640
235743
  }
235641
- // const range = RegionOps.curveArrayRange(allPrimitives);
235642
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_15__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
235643
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
235744
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_16__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
235745
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
235644
235746
  this.graph = graph;
235645
235747
  this.faceAreaFunction = faceAreaFromCurvedEdgeData;
235646
235748
  }
@@ -235731,7 +235833,7 @@ class RegionBooleanContext {
235731
235833
  const data = node.edgeTag;
235732
235834
  if (data instanceof RegionGroupMember)
235733
235835
  return updateRegionGroupMemberState(data);
235734
- if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__.CurveLocationDetail) {
235836
+ if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__.CurveLocationDetail) {
235735
235837
  // We trust that the caller has linked from the graph node to a curve which has a RegionGroupMember as its parent.
235736
235838
  const member = data.curve.parent;
235737
235839
  if (member instanceof RegionGroupMember)
@@ -235786,10 +235888,10 @@ function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
235786
235888
  }
235787
235889
  let areaToChord = 0.0;
235788
235890
  if (detail && detail.curve && detail.hasFraction1) {
235789
- if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
235891
+ if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
235790
235892
  // ah .. nothing to do for a line segment
235791
235893
  }
235792
- else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
235894
+ else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_19__.Arc3d) {
235793
235895
  areaToChord = detail.curve.areaToChordXY(detail.fraction, detail.fraction1);
235794
235896
  }
235795
235897
  }
@@ -238331,6 +238433,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
238331
238433
  // The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
238332
238434
  // The fraction and extend parameters allow all combinations to be passed in.
238333
238435
  dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
238436
+ const tol2 = this._coincidentGeometryContext.tolerance * this._coincidentGeometryContext.tolerance;
238437
+ let dist2;
238334
238438
  // Arc: X = C + cU + sV
238335
238439
  // Line: contains points A0,A1
238336
238440
  // Arc point colinear with line if det (A0, A1, X) = 0
@@ -238341,6 +238445,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
238341
238445
  // project back to line.
238342
238446
  if (this._worldToLocalPerspective) {
238343
238447
  const data = arc.toTransformedPoint4d(this._worldToLocalPerspective);
238448
+ const radians0 = data.sweep.fractionToRadians(0);
238449
+ const pointB0H = data.center.plus2Scaled(data.vector0, Math.cos(radians0), data.vector90, Math.sin(radians0));
238450
+ const radians1 = data.sweep.fractionToRadians(1);
238451
+ const pointB1H = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
238344
238452
  const pointA0H = this._worldToLocalPerspective.multiplyPoint3d(pointA0, 1);
238345
238453
  const pointA1H = this._worldToLocalPerspective.multiplyPoint3d(pointA1, 1);
238346
238454
  const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.center);
@@ -238350,19 +238458,31 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
238350
238458
  const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
238351
238459
  const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
238352
238460
  const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
238461
+ if (numRoots <= 0)
238462
+ return;
238353
238463
  for (let i = 0; i < numRoots; i++) {
238354
238464
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
238355
- const arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
238465
+ let arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
238356
238466
  const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
238357
- if (lineFraction !== undefined &&
238358
- this.acceptFraction(extendA0, lineFraction, extendA1) &&
238359
- this.acceptFraction(extendB0, arcFraction, extendB1)) {
238360
- this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
238467
+ if (lineFraction !== undefined) {
238468
+ if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, arcFraction, extendB1)) {
238469
+ this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
238470
+ }
238471
+ else { // check for endpoint intersections beyond parametric tolerance but within point tolerance
238472
+ const pointAH = lineFraction < 0.5 ? pointA0H : pointA1H;
238473
+ const pointBH = (arcFraction = data.sweep.fractionToSignedPeriodicFraction(arcFraction)) < 0.5 ? pointB0H : pointB1H;
238474
+ if ((dist2 = pointAH.realDistanceSquaredXY(pointBH)) !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isDistanceWithinTol(dist2, tol2))
238475
+ this.recordPointWithLocalFractions(lineFraction < 0.5 ? 0 : 1, cpA, fractionA0, fractionA1, arcFraction < 0.5 ? 0 : 1, arc, 0, 1, reversed);
238476
+ }
238361
238477
  }
238362
238478
  }
238363
238479
  }
238364
238480
  else {
238365
238481
  const data = arc.toTransformedVectors(this._worldToLocalAffine);
238482
+ const radians0 = data.sweep.fractionToRadians(0);
238483
+ const pointB0Local = data.center.plus2Scaled(data.vector0, Math.cos(radians0), data.vector90, Math.sin(radians0));
238484
+ const radians1 = data.sweep.fractionToRadians(1);
238485
+ const pointB1Local = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
238366
238486
  let pointA0Local = pointA0;
238367
238487
  let pointA1Local = pointA1;
238368
238488
  if (this._worldToLocalAffine) {
@@ -238376,16 +238496,22 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
238376
238496
  const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
238377
238497
  const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
238378
238498
  const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
238379
- const lineFractionTol = 1.0e-10; // TODO: why are we loosening tolerances here?
238380
- const arcFractionTol = 1.0e-7;
238499
+ if (numRoots <= 0)
238500
+ return;
238381
238501
  for (let i = 0; i < numRoots; i++) {
238382
238502
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
238383
- const arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
238503
+ let arcFraction = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(i), extendB0);
238384
238504
  const lineFraction = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
238385
- if (lineFraction !== undefined &&
238386
- this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
238387
- this.acceptFraction(extendB0, arcFraction, extendB1, arcFractionTol)) {
238388
- this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
238505
+ if (lineFraction !== undefined) {
238506
+ if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, arcFraction, extendB1)) {
238507
+ this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
238508
+ }
238509
+ else { // check for endpoint intersections beyond parametric tolerance but within point tolerance
238510
+ const pointALocal = lineFraction < 0.5 ? pointA0Local : pointA1Local;
238511
+ const pointBLocal = (arcFraction = data.sweep.fractionToSignedPeriodicFraction(arcFraction)) < 0.5 ? pointB0Local : pointB1Local;
238512
+ if ((dist2 = pointALocal.distanceSquaredXY(pointBLocal)) !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isDistanceWithinTol(dist2, tol2))
238513
+ this.recordPointWithLocalFractions(lineFraction < 0.5 ? 0 : 1, cpA, fractionA0, fractionA1, arcFraction < 0.5 ? 0 : 1, arc, 0, 1, reversed);
238514
+ }
238389
238515
  }
238390
238516
  }
238391
238517
  }
@@ -242458,6 +242584,52 @@ class SumLengthsContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.Rec
242458
242584
  }
242459
242585
 
242460
242586
 
242587
+ /***/ }),
242588
+
242589
+ /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js":
242590
+ /*!***********************************************************************************!*\
242591
+ !*** ../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js ***!
242592
+ \***********************************************************************************/
242593
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
242594
+
242595
+ "use strict";
242596
+ __webpack_require__.r(__webpack_exports__);
242597
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
242598
+ /* harmony export */ TransferWithSplitArcs: () => (/* binding */ TransferWithSplitArcs)
242599
+ /* harmony export */ });
242600
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
242601
+ /* harmony import */ var _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CloneCurvesContext */ "../../core/geometry/lib/esm/curve/internalContexts/CloneCurvesContext.js");
242602
+ /*---------------------------------------------------------------------------------------------
242603
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
242604
+ * See LICENSE.md in the project root for license terms and full copyright notice.
242605
+ *--------------------------------------------------------------------------------------------*/
242606
+ /** @packageDocumentation
242607
+ * @module Curve
242608
+ */
242609
+
242610
+
242611
+ /**
242612
+ * Algorithmic class for shallow-copying a CurveCollection with each full-sweep arc replaced by two half-sweep arcs.
242613
+ * * Often useful for building graphs from loops.
242614
+ * @internal
242615
+ */
242616
+ class TransferWithSplitArcs extends _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__.CloneCurvesContext {
242617
+ constructor() {
242618
+ super(undefined);
242619
+ }
242620
+ doClone(primitive) {
242621
+ if (primitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_1__.Arc3d && primitive.sweep.isFullCircle) // replace full arc with two half arcs
242622
+ return [primitive.clonePartialCurve(0.0, 0.5), primitive.clonePartialCurve(0.5, 1)];
242623
+ return primitive;
242624
+ }
242625
+ static clone(target) {
242626
+ const context = new TransferWithSplitArcs();
242627
+ target.announceToCurveProcessor(context);
242628
+ return context._result;
242629
+ }
242630
+ }
242631
+
242632
+
242461
242633
  /***/ }),
242462
242634
 
242463
242635
  /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransformInPlaceContext.js":
@@ -245955,8 +246127,10 @@ class AngleSweep {
245955
246127
  * @param fraction fraction of the sweep.
245956
246128
  * @param radians0 start angle of sweep (in radians).
245957
246129
  * @param radians1 end angle of sweep (in radians).
245958
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
245959
- * end (false) of the sweep.
246130
+ * @param toNegativeFraction exterior fraction handling:
246131
+ * * if true, return `fraction` period-shifted to within one period of the start
246132
+ * * if false, return `fraction` period-shifted to within one period of the end
246133
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
245960
246134
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
245961
246135
  * returned unchanged.
245962
246136
  */
@@ -245970,16 +246144,25 @@ class AngleSweep {
245970
246144
  fraction = fraction % period; // period-shifted equivalent fraction closest to 0 with same sign as fraction
245971
246145
  if (fraction + period < 1)
245972
246146
  fraction += period; // it's really an interior fraction
245973
- if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isIn01(fraction) || (toNegativeFraction && fraction < 0) || (!toNegativeFraction && fraction > 1))
246147
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isIn01(fraction))
245974
246148
  return fraction;
245975
- return toNegativeFraction ? fraction - period : fraction + period; // shift to other side of sweep
246149
+ if (toNegativeFraction === true)
246150
+ return fraction < 0 ? fraction : fraction - period;
246151
+ if (toNegativeFraction === false)
246152
+ return fraction > 1 ? fraction : fraction + period;
246153
+ const fractionDistFrom01 = fraction < 0 ? -fraction : fraction - 1;
246154
+ const fraction2 = fraction < 0 ? fraction + period : fraction - period; // period-shift with opposite sign
246155
+ const fraction2DistFrom01 = fraction2 < 0 ? -fraction2 : fraction2 - 1;
246156
+ return fractionDistFrom01 < fraction2DistFrom01 ? fraction : fraction2; // choose the period-shift closer to [0,1]
245976
246157
  }
245977
246158
  /**
245978
246159
  * Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of
245979
246160
  * zero on the desired side.
245980
246161
  * @param fraction fraction of the sweep.
245981
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
245982
- * end (false) of the sweep.
246162
+ * @param toNegativeFraction exterior fraction handling:
246163
+ * * if true, return `fraction` period-shifted to within one period of the start
246164
+ * * if false, return `fraction` period-shifted to within one period of the end
246165
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
245983
246166
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
245984
246167
  * returned unchanged.
245985
246168
  */
@@ -258868,9 +259051,9 @@ class Vector3d extends XYZ {
258868
259051
  if (dot < 0.0 && !oppositeIsParallel)
258869
259052
  return false;
258870
259053
  const cross2 = this.crossProductMagnitudeSquared(other);
258871
- /* a2,b2,cross2 are squared lengths of respective vectors */
258872
- /* cross2 = sin^2(theta) * a2 * b2 */
258873
- /* For small theta, sin^2(theta)~~theta^2 */
259054
+ // a2,b2,cross2 are squared lengths of respective vectors
259055
+ // cross2 = sin^2(theta) * a2 * b2
259056
+ // For small theta, sin^2(theta) ~ theta^2
258874
259057
  return cross2 <= radianSquaredTol * a2 * b2;
258875
259058
  }
258876
259059
  /**
@@ -260865,26 +261048,28 @@ class PolygonOps {
260865
261048
  return s;
260866
261049
  }
260867
261050
  /**
260868
- * Return a Ray3d with (assuming the polygon is planar and not self-intersecting):
260869
- * * `origin` at the centroid of the (3D) polygon,
260870
- * * `direction` is the unit vector perpendicular to the plane,
260871
- * * `a` is the area.
260872
- * @param points
261051
+ * Return a [[Ray3d]] with:
261052
+ * * `origin` is the centroid of the polygon,
261053
+ * * `direction` is a unit vector perpendicular to the polygon plane,
261054
+ * * `a` is the polygon area.
261055
+ * @param points the polygon vertices in order. Points can lie in any plane. First and last point do not have to be equal.
261056
+ * @param result optional pre-allocated result to populate and return.
260873
261057
  */
260874
- static centroidAreaNormal(points) {
261058
+ static centroidAreaNormal(points, result) {
260875
261059
  if (Array.isArray(points)) {
260876
261060
  const carrier = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_5__.Point3dArrayCarrier(points);
260877
- return this.centroidAreaNormal(carrier);
261061
+ return this.centroidAreaNormal(carrier, result);
260878
261062
  }
260879
261063
  const n = points.length;
260880
261064
  if (n === 3) {
260881
- const normal = points.crossProductIndexIndexIndex(0, 1, 2);
261065
+ const normal = points.crossProductIndexIndexIndex(0, 1, 2, result?.direction);
260882
261066
  const a = 0.5 * normal.magnitude();
260883
- const centroid = points.getPoint3dAtCheckedPointIndex(0);
261067
+ const centroid = points.getPoint3dAtCheckedPointIndex(0, result?.origin);
260884
261068
  points.accumulateScaledXYZ(1, 1.0, centroid);
260885
261069
  points.accumulateScaledXYZ(2, 1.0, centroid);
260886
261070
  centroid.scaleInPlace(1.0 / 3.0);
260887
- const result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
261071
+ if (!result)
261072
+ result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
260888
261073
  if (result.tryNormalizeInPlaceWithAreaWeight(a))
260889
261074
  return result;
260890
261075
  return undefined;
@@ -260902,22 +261087,24 @@ class PolygonOps {
260902
261087
  points.vectorXYAndZIndex(origin, 1, vector0);
260903
261088
  let cross = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
260904
261089
  const centroidSum = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
260905
- const normalSum = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
261090
+ const normal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero(result?.direction);
260906
261091
  let signedTriangleArea;
260907
- // This will work with or without closure edge. If closure is given, the last vector is 000.
261092
+ // This will work with or without closure edge. If closure is given, the last vector is 000.
260908
261093
  for (let i = 2; i < n; i++) {
260909
261094
  points.vectorXYAndZIndex(origin, i, vector1);
260910
261095
  cross = vector0.crossProduct(vector1, cross);
260911
261096
  signedTriangleArea = areaNormal.dotProduct(cross); // well, actually twice the area.
260912
- normalSum.addInPlace(cross); // this grows to twice the area
261097
+ normal.addInPlace(cross); // this grows to twice the area
260913
261098
  const b = signedTriangleArea / 6.0;
260914
261099
  centroidSum.plus2Scaled(vector0, b, vector1, b, centroidSum);
260915
261100
  vector0.setFrom(vector1);
260916
261101
  }
260917
- const area = 0.5 * normalSum.magnitude();
261102
+ const area = 0.5 * normal.magnitude();
260918
261103
  const inverseArea = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(1, area);
260919
261104
  if (inverseArea !== undefined) {
260920
- const result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(origin.plusScaled(centroidSum, inverseArea), normalSum);
261105
+ const centroid = origin.plusScaled(centroidSum, inverseArea, result?.origin);
261106
+ if (!result)
261107
+ result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
260921
261108
  result.tryNormalizeInPlaceWithAreaWeight(area);
260922
261109
  return result;
260923
261110
  }
@@ -267942,19 +268129,19 @@ class Matrix4d {
267942
268129
  this._coffs[15] += scale * beta;
267943
268130
  }
267944
268131
  /**
267945
- * Multiply and replace contents of this matrix by A*this*AT where
267946
- * * A is a pure translation with final column [x,y,z,1]
267947
- * * this is this matrix.
267948
- * * AT is the transpose of A.
267949
- * @param ax x part of translation
267950
- * @param ay y part of translation
267951
- * @param az z part of translation
268132
+ * Multiply and replace contents of ` this` matrix by `A*this*AT` where
268133
+ * * `A` is a pure translation with final column [x,y,z,1].
268134
+ * * `this` is this matrix.
268135
+ * * `AT` is the transpose of A.
268136
+ * @param ax x part of translation.
268137
+ * @param ay y part of translation.
268138
+ * @param az z part of translation.
267952
268139
  */
267953
268140
  multiplyTranslationSandwichInPlace(ax, ay, az) {
267954
268141
  const bx = this._coffs[3];
267955
268142
  const by = this._coffs[7];
267956
268143
  const bz = this._coffs[11];
267957
- // matrixB can be non-symmetric!!
268144
+ // matrixB can be non-symmetric
267958
268145
  const cx = this._coffs[12];
267959
268146
  const cy = this._coffs[13];
267960
268147
  const cz = this._coffs[14];
@@ -267977,7 +268164,7 @@ class Matrix4d {
267977
268164
  this._coffs[12] += axBeta;
267978
268165
  this._coffs[13] += ayBeta;
267979
268166
  this._coffs[14] += azBeta;
267980
- // coffs[15] is unchanged !!!
268167
+ // coffs[15] is unchanged
267981
268168
  }
267982
268169
  }
267983
268170
 
@@ -268028,8 +268215,8 @@ __webpack_require__.r(__webpack_exports__);
268028
268215
  * * e.g. entry 03 is summed x.
268029
268216
  * * In this level:
268030
268217
  * * the `absoluteQuantity` member is undefined.
268031
- * * the `localToWorldMap` and `radiiOfGyration` are created by have undefined contents.
268032
- * * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
268218
+ * * the `localToWorldMap` and `radiiOfGyration` are created but have undefined contents.
268219
+ * * Second level: after a call to `inertiaProductsToPrincipalAxes`, the `localToWorldMap`, `absoluteQuantity` and
268033
268220
  * `radiiOfGyration` are filled in.
268034
268221
  * @public
268035
268222
  */
@@ -268049,18 +268236,35 @@ class MomentData {
268049
268236
  * * This set up with its inverse already constructed.
268050
268237
  */
268051
268238
  localToWorldMap;
268239
+ /** Radii of gyration (square roots of principal second moments). */
268240
+ radiusOfGyration;
268241
+ /**
268242
+ * Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
268243
+ * inertiaProductsToPrincipalAxes.
268244
+ */
268245
+ absoluteQuantity;
268052
268246
  // private variables
268053
268247
  static _vectorA;
268054
268248
  static _vectorB;
268055
268249
  static _vectorC;
268056
268250
  _point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
268057
268251
  _point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
268252
+ /** Constructor. */
268253
+ constructor() {
268254
+ this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
268255
+ this.needOrigin = false;
268256
+ this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
268257
+ this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
268258
+ this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
268259
+ this.absoluteQuantity = 0.1; // so optimizer sees its type
268260
+ this.absoluteQuantity = undefined;
268261
+ }
268058
268262
  /**
268059
268263
  * Return the lower-right (3,3) entry in the sums.
268060
268264
  * * This is the quantity (i.e. length, area, or volume) summed.
268061
268265
  */
268062
268266
  get quantitySum() {
268063
- return this.sums.atIJ(3, 3);
268267
+ return this.sums.weight();
268064
268268
  }
268065
268269
  /**
268066
268270
  * Return a scale factor to make these sums match the target orientation sign.
@@ -268091,23 +268295,6 @@ class MomentData {
268091
268295
  this.needOrigin = false;
268092
268296
  }
268093
268297
  }
268094
- /** Radii of gyration (square roots of principal second moments). */
268095
- radiusOfGyration;
268096
- /**
268097
- * Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
268098
- * inertiaProductsToPrincipalAxes.
268099
- */
268100
- absoluteQuantity;
268101
- /** Constructor. */
268102
- constructor() {
268103
- this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
268104
- this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
268105
- this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
268106
- this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
268107
- this.needOrigin = false;
268108
- this.absoluteQuantity = 0.1; // so optimizer sees its type
268109
- this.absoluteQuantity = undefined;
268110
- }
268111
268298
  /**
268112
268299
  * Create moments with optional origin.
268113
268300
  * * Origin and needOrigin are quirky.
@@ -268151,7 +268338,7 @@ class MomentData {
268151
268338
  axes.setColumnsPoint4dXYZ(points[0], points[1], points[2]);
268152
268339
  if (axes.determinant() < 0)
268153
268340
  axes.scaleColumnsInPlace(-1.0, -1.0, -1.0);
268154
- // prefer x and z positive -- y falls wherever . ..
268341
+ // prefer x and z positive; y falls wherever
268155
268342
  if (axes.at(0, 0) < 0.0)
268156
268343
  axes.scaleColumnsInPlace(-1.0, -1.0, 1.0);
268157
268344
  if (axes.at(2, 2) < 0.0)
@@ -268176,7 +268363,8 @@ class MomentData {
268176
268363
  * * Hence x axis is long direction.
268177
268364
  * * Hence planar data generates large moment as Z.
268178
268365
  * @param origin The origin used for the inertia products.
268179
- * @param inertiaProducts The inertia products: sums or integrals of [xx,xy,xz,xw; yx,yy, yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
268366
+ * @param inertiaProducts The inertia products: sums or integrals of
268367
+ * [xx,xy,xz,xw; yx,yy,yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
268180
268368
  */
268181
268369
  static inertiaProductsToPrincipalAxes(origin, inertiaProducts) {
268182
268370
  const moments = new MomentData();
@@ -268220,23 +268408,21 @@ class MomentData {
268220
268408
  */
268221
268409
  static areEquivalentPrincipalAxes(dataA, dataB) {
268222
268410
  if (dataA && dataB
268223
- && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { // um.. need different tolerance for area, volume?)
268411
+ && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { // TODO: need different tolerance for area, volume?
268224
268412
  if (dataA.localToWorldMap.getOrigin().isAlmostEqual(dataB.localToWorldMap.getOrigin())
268225
268413
  && dataA.radiusOfGyration.isAlmostEqual(dataB.radiusOfGyration)) {
268226
268414
  if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.y)) {
268227
- // We have at least xy symmetry ....
268415
+ // we have at least xy symmetry
268228
268416
  if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.z))
268229
268417
  return true;
268230
- // just xy.
268231
- // allow opposite z directions.
268232
- // If the z's are aligned, x an dy can spin freely.
268418
+ // just xy; allow opposite z directions; if the z's are aligned, x and y can spin freely
268233
268419
  const zA = dataA.localToWorldMap.matrix.columnZ();
268234
268420
  const zB = dataB.localToWorldMap.matrix.columnZ();
268235
268421
  if (zA.isParallelTo(zB, true))
268236
268422
  return true;
268237
268423
  return false;
268238
268424
  }
268239
- // no symmetry. Test all three axes.
268425
+ // no symmetry; test all three axes
268240
268426
  const vectorA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
268241
268427
  const vectorB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
268242
268428
  for (let i = 0; i < 3; i++) {
@@ -268266,7 +268452,7 @@ class MomentData {
268266
268452
  }
268267
268453
  /** Revise the accumulated sums to be "around the centroid". */
268268
268454
  shiftOriginAndSumsToCentroidOfSums() {
268269
- const xyz = this.sums.columnW().realPoint();
268455
+ const xyz = this.sums.columnW().realPoint(); // centroid of the geometry
268270
268456
  if (xyz) {
268271
268457
  this.shiftOriginAndSumsByXYZ(xyz.x, xyz.y, xyz.z);
268272
268458
  return true;
@@ -268275,9 +268461,9 @@ class MomentData {
268275
268461
  }
268276
268462
  /**
268277
268463
  * Revise the accumulated sums.
268278
- * * add ax,ay,ax to the origin coordinates.
268279
- * * apply the negative translation to the sums.
268280
- */
268464
+ * * Add (ax,ay,az) to the origin coordinates.
268465
+ * * Apply the negative translation to the sums.
268466
+ */
268281
268467
  shiftOriginAndSumsByXYZ(ax, ay, az) {
268282
268468
  this.origin.addXYZInPlace(ax, ay, az);
268283
268469
  this.sums.multiplyTranslationSandwichInPlace(-ax, -ay, -az);
@@ -268287,23 +268473,24 @@ class MomentData {
268287
268473
  this.shiftOriginAndSumsByXYZ(newOrigin.x - this.origin.x, newOrigin.y - this.origin.y, newOrigin.z - this.origin.z);
268288
268474
  }
268289
268475
  /**
268290
- * Compute moments of a triangle from the origin to the given line.
268291
- * Accumulate them to this.sums.
268292
- * * If `pointA` is undefined, use `this.origin` as pointA.
268293
- * * If `this.needOrigin` is set, pointB is used
268294
- */
268476
+ * Compute moments of a triangle from the origin. Accumulate them to `this.sums`.
268477
+ * * If `this.needOrigin` is set, `this.origin` is set to `pointB`.
268478
+ * * If `pointA` is undefined, use `this.origin` as `pointA`.
268479
+ */
268295
268480
  accumulateTriangleMomentsXY(pointA, pointB, pointC) {
268296
268481
  this.setOriginXYZIfNeeded(pointB.x, pointB.y, 0.0);
268297
268482
  const x0 = this.origin.x;
268298
268483
  const y0 = this.origin.y;
268299
- const vectorA = MomentData._vectorA =
268300
- pointA !== undefined ? _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointA.x - x0, pointA.y - y0, 0.0, 1.0, MomentData._vectorA)
268301
- : _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(this.origin.x, this.origin.y, 0.0, 1.0, MomentData._vectorA);
268484
+ const vectorA = MomentData._vectorA = (pointA !== undefined) ?
268485
+ _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointA.x - x0, pointA.y - y0, 0.0, 1.0, MomentData._vectorA) :
268486
+ _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(0.0, 0.0, 0.0, 1.0, MomentData._vectorA);
268302
268487
  const vectorB = MomentData._vectorB = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointB.x - x0, pointB.y - y0, 0.0, 1.0, MomentData._vectorB);
268303
268488
  const vectorC = MomentData._vectorC = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointC.x - x0, pointC.y - y0, 0.0, 1.0, MomentData._vectorC);
268304
- // accumulate Return product integrals I(0<=u<=1) I (0<=v<= u) (w*W + u *U + v * V)(w*W + u *U + v * V)^ du dv
268305
- // where w = 1-u-v
268306
- // W = column vector (point00.x, point00.y, point00.z, 1.0) etc.
268489
+ // Below we calculate 16 double integrals: \iint_T [x y 0 1]^ [x y 0 1] dT over triangle T=(A,B,C).
268490
+ // Each accumulates contributions from 9 scaled outer products. Integration computations use the barycentric
268491
+ // change of variables [B-A C-A][u,v]^ = [x,y]^ with Jacobian detJ = B-A x C-A = twice the area of T.
268492
+ // This converts the integration domain from T to the triangle bounded by u=0, v=0 and v=1-u, yielding e.g.,
268493
+ // \iint_T x^2 dT = detJ \int_0^1 \int_0^{1-u} u^2 dv du = detJ / 12, and similarly \iint_T xy dT = detJ / 24.
268307
268494
  const detJ = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(vectorB.x - vectorA.x, vectorB.y - vectorA.y, vectorC.x - vectorA.x, vectorC.y - vectorA.y);
268308
268495
  if (detJ !== 0.0) {
268309
268496
  const r1_12 = detJ / 12.0;
@@ -268319,7 +268506,7 @@ class MomentData {
268319
268506
  this.sums.addScaledOuterProductInPlace(vectorC, vectorC, r1_12);
268320
268507
  }
268321
268508
  }
268322
- /** Add scaled outer product of (4d, unit weight) point to this.sums. */
268509
+ /** Add scaled outer product of (4d, unit weight) point to `this.sums`. */
268323
268510
  accumulateScaledOuterProduct(point, scaleFactor) {
268324
268511
  this.setOriginXYZIfNeeded(point.x, point.y, 0.0);
268325
268512
  const vectorA = MomentData._vectorA = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(point.x - this.origin.x, point.y - this.origin.y, point.z - this.origin.z, 1.0, MomentData._vectorA);
@@ -268342,16 +268529,15 @@ class MomentData {
268342
268529
  this.sums.addScaledOuterProductInPlace(vectorB, vectorB, r1_3);
268343
268530
  }
268344
268531
  /**
268345
- * Compute moments of triangles from a base point to the given linestring.
268346
- * Accumulate them to this.sums.
268347
- * * If `pointA` is undefined, use `this.origin` as pointA.
268348
- * * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
268349
- *
268532
+ * Compute moments of triangles from a base point to the given linestring. Accumulate them to `this.sums`.
268533
+ * * If `this.needOrigin` is set, `this.origin` is set to the first point of the array.
268534
+ * * If `sweepBase` is undefined, use `this.origin` as `sweepBase`.
268350
268535
  */
268351
268536
  accumulateTriangleToLineStringMomentsXY(sweepBase, points) {
268352
268537
  const n = points.length;
268353
268538
  if (n > 1) {
268354
268539
  points.getPoint3dAtUncheckedPointIndex(0, this._point0);
268540
+ // The linestring forms a polygon with sweepBase. Integrate over this polygon using Shoelace algorithm.
268355
268541
  for (let i = 1; i < n; i++) {
268356
268542
  points.getPoint3dAtUncheckedPointIndex(i, this._point1);
268357
268543
  this.accumulateTriangleMomentsXY(sweepBase, this._point0, this._point1);
@@ -268360,17 +268546,17 @@ class MomentData {
268360
268546
  }
268361
268547
  }
268362
268548
  /**
268363
- * * Assemble XX, YY, XY products into a full matrix form [xx,xy,0,0; xy,yy,0,0;0,0,0,0;0,0,0,1].
268364
- * * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
268365
- * parts of vectors).
268366
- * * scale by detJ for the xy-only determinant of the vectors.
268549
+ * Assemble XX, YY, XY products into a full matrix form [xx,xy,0,0; xy,yy,0,0; 0,0,0,0; 0,0,0,1].
268550
+ * * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin].
268551
+ * (column weights 0001; only xy parts of vectors).
268552
+ * * Scale by detJ for the xy-only determinant of the vectors.
268367
268553
  * @param productXX
268368
268554
  * @param productXY
268369
268555
  * @param productYY
268370
- * @param area Area in caller's system.
268371
- * @param origin Caller's origin.
268372
- * @param vectorU Caller's U axis (not necessarily unit).
268373
- * @param vectorV Caller's V axis (not necessarily unit).
268556
+ * @param area area in caller's system.
268557
+ * @param origin caller's origin.
268558
+ * @param vectorU caller's U axis (not necessarily unit).
268559
+ * @param vectorV caller's V axis (not necessarily unit).
268374
268560
  */
268375
268561
  accumulateXYProductsInCentroidalFrame(productXX, productXY, productYY, area, origin, vectorU, vectorV) {
268376
268562
  const centroidalProducts = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createRowValues(productXX, productXY, 0, 0, productXY, productYY, 0, 0, 0, 0, 0, 0, 0, 0, 0, area);
@@ -268683,8 +268869,7 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
268683
268869
  distanceSquaredXYZW(other) {
268684
268870
  return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXYZW(other.xyzw[0] - this.xyzw[0], other.xyzw[1] - this.xyzw[1], other.xyzw[2] - this.xyzw[2], other.xyzw[3] - this.xyzw[3]);
268685
268871
  }
268686
- /** Return the distance between the instance and other after normalizing by weights
268687
- */
268872
+ /** Return the xy distance between the instance and `other` after normalizing by weights */
268688
268873
  realDistanceXY(other) {
268689
268874
  const wA = this.w;
268690
268875
  const wB = other.w;
@@ -268692,6 +268877,14 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
268692
268877
  return undefined;
268693
268878
  return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXY(other.xyzw[0] / wB - this.xyzw[0] / wA, other.xyzw[1] / wB - this.xyzw[1] / wA);
268694
268879
  }
268880
+ /** Return the xy squared distance between the instance and `other` after normalizing by weights */
268881
+ realDistanceSquaredXY(other) {
268882
+ const wA = this.w;
268883
+ const wB = other.w;
268884
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSmallMetricDistance(wA) || _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSmallMetricDistance(wB))
268885
+ return undefined;
268886
+ return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXY(other.xyzw[0] / wB - this.xyzw[0] / wA, other.xyzw[1] / wB - this.xyzw[1] / wA);
268887
+ }
268695
268888
  /** Return the largest absolute distance between corresponding components
268696
268889
  * * x,y,z,w all participate without normalization.
268697
268890
  */
@@ -277057,7 +277250,7 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
277057
277250
  */
277058
277251
  class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
277059
277252
  _facetIndices;
277060
- _currentSubsetIndex; // index within _facetIndices, or -1 after construction
277253
+ _currentSubsetIndex; // index within _facetIndices
277061
277254
  _nextSubsetIndex; // index within _facetIndices
277062
277255
  constructor(polyface, facetIndices, numWrap) {
277063
277256
  super(polyface, numWrap);
@@ -330107,7 +330300,7 @@ class TestContext {
330107
330300
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
330108
330301
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
330109
330302
  await core_frontend_1.NoRenderApp.startup({
330110
- applicationVersion: "5.0.0-dev.114",
330303
+ applicationVersion: "5.0.0-dev.116",
330111
330304
  applicationId: this.settings.gprid,
330112
330305
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
330113
330306
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -355155,7 +355348,7 @@ var loadLanguages = instance.loadLanguages;
355155
355348
  /***/ ((module) => {
355156
355349
 
355157
355350
  "use strict";
355158
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.114","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:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/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"}}');
355351
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.116","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:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/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"}}');
355159
355352
 
355160
355353
  /***/ }),
355161
355354