@itwin/rpcinterface-full-stack-tests 5.1.0-dev.1 → 5.1.0-dev.10

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.
@@ -68621,6 +68621,20 @@ var RenderSchedule;
68621
68621
  get maxBatchId() {
68622
68622
  return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));
68623
68623
  }
68624
+ /**
68625
+ * Replaces all elementIds in a ScriptProps object with an empty string. Returns modified ScriptProps.
68626
+ * @param scheduleScript The script props to modify.
68627
+ * @internal */
68628
+ static removeScheduleScriptElementIds(scheduleScript) {
68629
+ scheduleScript.forEach((modelTimeline) => {
68630
+ modelTimeline.elementTimelines.forEach((elementTimeline) => {
68631
+ if (elementTimeline.elementIds) {
68632
+ elementTimeline.elementIds = "";
68633
+ }
68634
+ });
68635
+ });
68636
+ return scheduleScript;
68637
+ }
68624
68638
  }
68625
68639
  RenderSchedule.Script = Script;
68626
68640
  /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
@@ -101522,6 +101536,170 @@ class SchemaGraph {
101522
101536
  }
101523
101537
 
101524
101538
 
101539
+ /***/ }),
101540
+
101541
+ /***/ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js":
101542
+ /*!**********************************************************************!*\
101543
+ !*** ../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js ***!
101544
+ \**********************************************************************/
101545
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
101546
+
101547
+ "use strict";
101548
+ __webpack_require__.r(__webpack_exports__);
101549
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
101550
+ /* harmony export */ ECSchemaRpcInterface: () => (/* binding */ ECSchemaRpcInterface)
101551
+ /* harmony export */ });
101552
+ /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
101553
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
101554
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
101555
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
101556
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
101557
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
101558
+ };
101559
+ /*---------------------------------------------------------------------------------------------
101560
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
101561
+ * See LICENSE.md in the project root for license terms and full copyright notice.
101562
+ *--------------------------------------------------------------------------------------------*/
101563
+
101564
+ /***
101565
+ * Defines an RPC interface to get schema information from a given iModel context.
101566
+ * Method @see getSchemaNames will return the names of schemas that live in this iModel.
101567
+ * The actual schemas can be downloaded using @see getSchemaJSON to get the schema as JSON props.
101568
+ * @internal
101569
+ */
101570
+ class ECSchemaRpcInterface extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcInterface {
101571
+ /** The version of the RPC Interface. */
101572
+ static version = "2.0.0";
101573
+ static interfaceName = "ECSchemaRpcInterface";
101574
+ static interfaceVersion = ECSchemaRpcInterface.version;
101575
+ /**
101576
+ * Returns the RPC client instance for the frontend.
101577
+ * @returns A client to communicate with the RPC Interface.
101578
+ */
101579
+ static getClient() {
101580
+ return _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcManager.getClientForInterface(ECSchemaRpcInterface);
101581
+ }
101582
+ /**
101583
+ * Returns an array of SchemaKeyProps that exists in the current iModel context. The client can call
101584
+ * SchemaKey.fromJson() to parse the props to a SchemaKey.
101585
+ * @param tokenProps The iModelToken props that hold the information which iModel is used.
101586
+ * @returns An array of SchemaKeyProps.
101587
+ */
101588
+ async getSchemaKeys(_tokenProps) {
101589
+ return this.forward.apply(this, [arguments]);
101590
+ }
101591
+ /**
101592
+ * Gets the schema JSON for the current iModel context and returns the schema as a SchemaProps which
101593
+ * the client can call Schema.fromJson() to return a Schema.
101594
+ * @param tokenProps The iModelToken props that hold the information which iModel is used.
101595
+ * @param schemaName The name of the schema that shall be returned.
101596
+ * @returns The SchemaProps.
101597
+ */
101598
+ async getSchemaJSON(_tokenProps, _schemaName) {
101599
+ return this.forward.apply(this, [arguments]);
101600
+ }
101601
+ }
101602
+ __decorate([
101603
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.allowResponseCaching(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
101604
+ ], ECSchemaRpcInterface.prototype, "getSchemaKeys", null);
101605
+ __decorate([
101606
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.allowResponseCaching(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
101607
+ ], ECSchemaRpcInterface.prototype, "getSchemaJSON", null);
101608
+
101609
+
101610
+ /***/ }),
101611
+
101612
+ /***/ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js":
101613
+ /*!********************************************************************!*\
101614
+ !*** ../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js ***!
101615
+ \********************************************************************/
101616
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
101617
+
101618
+ "use strict";
101619
+ __webpack_require__.r(__webpack_exports__);
101620
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
101621
+ /* harmony export */ ECSchemaRpcLocater: () => (/* binding */ ECSchemaRpcLocater)
101622
+ /* harmony export */ });
101623
+ /* harmony import */ var _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/esm/ecschema-metadata.js");
101624
+ /* harmony import */ var _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ECSchemaRpcInterface */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js");
101625
+ /*---------------------------------------------------------------------------------------------
101626
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
101627
+ * See LICENSE.md in the project root for license terms and full copyright notice.
101628
+ *--------------------------------------------------------------------------------------------*/
101629
+
101630
+
101631
+ /**
101632
+ * Defines a schema locater that retrieves schemas using an RPC interface.
101633
+ * @public @preview
101634
+ */
101635
+ class ECSchemaRpcLocater {
101636
+ /** @internal */
101637
+ token;
101638
+ constructor(token) { this.token = token; }
101639
+ /**
101640
+ * Attempts to get a schema from the schema rpc locater. Yields undefined if no matching schema is found.
101641
+ * @param schemaKey Key to look up
101642
+ * @param matchType How to match key against candidate schemas
101643
+ * @param context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist.
101644
+ */
101645
+ async getSchema(schemaKey, matchType, context) {
101646
+ await this.getSchemaInfo(schemaKey, matchType, context);
101647
+ const schema = await context.getCachedSchema(schemaKey, matchType);
101648
+ return schema;
101649
+ }
101650
+ /**
101651
+ * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
101652
+ * The fully loaded schema can be accessed via the schema context using the getCachedSchema method.
101653
+ * @param schemaKey The SchemaKey describing the schema to get from the cache.
101654
+ * @param matchType The match type to use when locating the schema
101655
+ */
101656
+ async getSchemaInfo(schemaKey, matchType, context) {
101657
+ const schemaJson = await _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_1__.ECSchemaRpcInterface.getClient().getSchemaJSON(this.token, schemaKey.name);
101658
+ const schemaInfo = await _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.Schema.startLoadingFromJson(schemaJson, context || new _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.SchemaContext());
101659
+ if (schemaInfo !== undefined && schemaInfo.schemaKey.matches(schemaKey, matchType)) {
101660
+ return schemaInfo;
101661
+ }
101662
+ return undefined;
101663
+ }
101664
+ /**
101665
+ * This method is not supported for locating schemas over RPC/HTTP.
101666
+ * Use the asynchronous `getSchema` method instead.
101667
+ * @param _schemaKey Key to look up
101668
+ * @param _matchType How to match key against candidate schemas
101669
+ * @param _context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist.
101670
+ * @throws Error Always throws an error indicating this method is not supported.
101671
+ * @deprecated in 5.0 Use the asynchronous `getSchema` method for schema retrieval.
101672
+ */
101673
+ getSchemaSync(_schemaKey, _matchType, _context) {
101674
+ throw new Error("getSchemaSync is not supported. Use the asynchronous getSchema method instead.");
101675
+ }
101676
+ }
101677
+
101678
+
101679
+ /***/ }),
101680
+
101681
+ /***/ "../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js":
101682
+ /*!************************************************************************!*\
101683
+ !*** ../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js ***!
101684
+ \************************************************************************/
101685
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
101686
+
101687
+ "use strict";
101688
+ __webpack_require__.r(__webpack_exports__);
101689
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
101690
+ /* harmony export */ ECSchemaRpcInterface: () => (/* reexport safe */ _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_0__.ECSchemaRpcInterface),
101691
+ /* harmony export */ ECSchemaRpcLocater: () => (/* reexport safe */ _ECSchemaRpcLocater__WEBPACK_IMPORTED_MODULE_1__.ECSchemaRpcLocater)
101692
+ /* harmony export */ });
101693
+ /* harmony import */ var _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ECSchemaRpcInterface */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js");
101694
+ /* harmony import */ var _ECSchemaRpcLocater__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ECSchemaRpcLocater */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js");
101695
+ /*---------------------------------------------------------------------------------------------
101696
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
101697
+ * See LICENSE.md in the project root for license terms and full copyright notice.
101698
+ *--------------------------------------------------------------------------------------------*/
101699
+
101700
+
101701
+
101702
+
101525
101703
  /***/ }),
101526
101704
 
101527
101705
  /***/ "../../core/frontend/lib/esm/AccuDraw.js":
@@ -103708,6 +103886,8 @@ class AccuDraw {
103708
103886
  onFieldKeyinStatusChange(_index) { }
103709
103887
  /** Called to request focus change to the specified input field */
103710
103888
  setFocusItem(_index) { }
103889
+ /** Called to get the item field that currently has input focus */
103890
+ getFocusItem() { return undefined; }
103711
103891
  static getMinPolarMag(origin) {
103712
103892
  return (1.0e-12 * (1.0 + origin.magnitude()));
103713
103893
  }
@@ -113608,6 +113788,8 @@ __webpack_require__.r(__webpack_exports__);
113608
113788
  /* harmony import */ var _ViewState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ViewState */ "../../core/frontend/lib/esm/ViewState.js");
113609
113789
  /* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
113610
113790
  /* harmony import */ var _IpcApp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./IpcApp */ "../../core/frontend/lib/esm/IpcApp.js");
113791
+ /* harmony import */ var _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/esm/ecschema-metadata.js");
113792
+ /* harmony import */ var _itwin_ecschema_rpcinterface_common__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js");
113611
113793
  /*---------------------------------------------------------------------------------------------
113612
113794
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
113613
113795
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -113630,6 +113812,8 @@ __webpack_require__.r(__webpack_exports__);
113630
113812
 
113631
113813
 
113632
113814
 
113815
+
113816
+
113633
113817
  const loggerCategory = _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_3__.FrontendLoggerCategory.IModelConnection;
113634
113818
  /** A connection to a [IModelDb]($backend) hosted on the backend.
113635
113819
  * @public
@@ -113712,6 +113896,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
113712
113896
  * @deprecated in 5.0.0. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
113713
113897
  */
113714
113898
  fontMap; // eslint-disable-line @typescript-eslint/no-deprecated
113899
+ _schemaContext;
113715
113900
  /** Load the FontMap for this IModelConnection.
113716
113901
  * @returns Returns a Promise<FontMap> that is fulfilled when the FontMap member of this IModelConnection is valid.
113717
113902
  * @deprecated in 5.0.0. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
@@ -114100,6 +114285,24 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
114100
114285
  }
114101
114286
  return ("number" === typeof this._projectCenterAltitude) ? this._projectCenterAltitude : undefined;
114102
114287
  }
114288
+ /**
114289
+ * Gets the context that allows accessing the metadata (see `@itwin/ecschema-metadata` package) of this iModel.
114290
+ * The context is created lazily when this property is accessed for the first time, with an `ECSchemaRpcLocater` registered as a fallback locater, enabling users to register their own locater that'd take more priority.
114291
+ * This means to correctly access schema context, client-side applications must register `ECSchemaRpcInterface` following instructions for [RPC configuration]($docs/learning/rpcinterface/#client-side-configuration).
114292
+ * Server-side applications would also [configure RPC]($docs/learning/rpcinterface/#server-side-configuration) as needed.
114293
+ *
114294
+ * @note While a `BlankConnection` returns a valid `schemaContext`, it has an invalid locater registered by default, and will throw an error when trying to call it's methods.
114295
+ * @beta
114296
+ */
114297
+ get schemaContext() {
114298
+ if (this._schemaContext === undefined) {
114299
+ const context = new _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_15__.SchemaContext();
114300
+ const locater = new _itwin_ecschema_rpcinterface_common__WEBPACK_IMPORTED_MODULE_16__.ECSchemaRpcLocater(this._getRpcProps());
114301
+ context.addFallbackLocater(locater);
114302
+ this._schemaContext = context;
114303
+ }
114304
+ return this._schemaContext;
114305
+ }
114103
114306
  }
114104
114307
  /** A connection that exists without an iModel. Useful for connecting to Reality Data services.
114105
114308
  * @note This class exists because our display system requires an IModelConnection type even if only reality data is drawn.
@@ -121072,16 +121275,21 @@ class RenderContext {
121072
121275
  * @public
121073
121276
  */
121074
121277
  class DynamicsContext extends RenderContext {
121075
- _dynamics;
121278
+ _foreground;
121279
+ _overlay;
121076
121280
  /** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */
121077
121281
  addGraphic(graphic) {
121078
- if (undefined === this._dynamics)
121079
- this._dynamics = [];
121080
- this._dynamics.push(graphic);
121282
+ this.add(graphic, false);
121283
+ }
121284
+ /** @internal */
121285
+ add(graphic, isOverlay) {
121286
+ const key = isOverlay ? "_overlay" : "_foreground";
121287
+ const list = this[key] ?? (this[key] = []);
121288
+ list.push(graphic);
121081
121289
  }
121082
121290
  /** @internal */
121083
121291
  changeDynamics() {
121084
- this.viewport.changeDynamics(this._dynamics);
121292
+ this.viewport.changeDynamics(this._foreground, this._overlay);
121085
121293
  }
121086
121294
  /** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].
121087
121295
  * @param options Options describing how to create the builder.
@@ -122185,10 +122393,10 @@ class ViewManager {
122185
122393
  this.inDynamicsMode = false;
122186
122394
  const cursorVp = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.toolAdmin.cursorView;
122187
122395
  if (cursorVp)
122188
- cursorVp.changeDynamics(undefined);
122396
+ cursorVp.changeDynamics(undefined, undefined);
122189
122397
  for (const vp of this._viewports) {
122190
122398
  if (vp !== cursorVp)
122191
- vp.changeDynamics(undefined);
122399
+ vp.changeDynamics(undefined, undefined);
122192
122400
  }
122193
122401
  }
122194
122402
  /** @internal */
@@ -126486,8 +126694,8 @@ class Viewport {
126486
126694
  return this.view.is3d() && this.view.isCameraOn;
126487
126695
  }
126488
126696
  /** @internal */
126489
- changeDynamics(dynamics) {
126490
- this.target.changeDynamics(dynamics);
126697
+ changeDynamics(dynamics, overlay) {
126698
+ this.target.changeDynamics(dynamics, overlay);
126491
126699
  this.invalidateDecorations();
126492
126700
  }
126493
126701
  _assigningFlashedId = false;
@@ -137627,12 +137835,7 @@ __webpack_require__.r(__webpack_exports__);
137627
137835
  * @internal
137628
137836
  */
137629
137837
  async function loadScript(jsUrl) {
137630
- // const module = await import(/* webpackIgnore: true */jsUrl);
137631
- // Webpack gives a warning:
137632
- // "Critical dependency: the request of a dependency is an expression"
137633
- // Because tsc transpiles "await import" to "require" (when compiled to is CommonJS).
137634
- // So use FunctionConstructor to avoid tsc.
137635
- const module = await Function("x", "return import(x)")(jsUrl);
137838
+ const module = await __webpack_require__("../../core/frontend/lib/esm/extension/providers lazy recursive")(jsUrl);
137636
137839
  return execute(module);
137637
137840
  }
137638
137841
  /** attempts to execute an extension module */
@@ -138082,7 +138285,7 @@ var MockRender;
138082
138285
  get analysisFraction() { return 0; }
138083
138286
  set analysisFraction(_fraction) { }
138084
138287
  changeScene(_scene) { }
138085
- changeDynamics(_dynamics) { }
138288
+ changeDynamics(_foreground, _overlay) { }
138086
138289
  changeDecorations(_decs) { }
138087
138290
  changeRenderPlan(_plan) { }
138088
138291
  drawFrame(_sceneTime) { }
@@ -147425,7 +147628,7 @@ class MeshGraphic extends _Graphic__WEBPACK_IMPORTED_MODULE_2__.Graphic {
147425
147628
  }
147426
147629
  unionRange(range) {
147427
147630
  if (this._instances)
147428
- range.extendRange(range);
147631
+ range.extendRange(this._instances.range);
147429
147632
  else
147430
147633
  range.extendRange(this._meshRange);
147431
147634
  }
@@ -150172,9 +150375,8 @@ class RenderCommands {
150172
150375
  this.addGraphics(gfx.foreground);
150173
150376
  this.addBackgroundMapGraphics(gfx.background);
150174
150377
  this.addOverlayGraphics(gfx.overlays);
150175
- const dynamics = gfx.dynamics;
150176
- if (dynamics && dynamics.length > 0)
150177
- this.addDecorations(dynamics);
150378
+ this.addGraphics(gfx.foregroundDynamics);
150379
+ this.addOverlayGraphics(gfx.overlayDynamics);
150178
150380
  const dec = gfx.decorations;
150179
150381
  if (undefined !== dec) {
150180
150382
  this.addBackground(dec.viewBackground);
@@ -157132,8 +157334,8 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
157132
157334
  this.changeDrapesOrClassifiers(this._planarClassifiers, planarClassifiers);
157133
157335
  this._planarClassifiers = planarClassifiers;
157134
157336
  }
157135
- changeDynamics(dynamics) {
157136
- this.graphics.dynamics = dynamics;
157337
+ changeDynamics(foreground, overlay) {
157338
+ this.graphics.changeDynamics(foreground, overlay);
157137
157339
  }
157138
157340
  overrideFeatureSymbology(ovr) {
157139
157341
  this.uniforms.branch.overrideFeatureSymbology(ovr);
@@ -158014,26 +158216,29 @@ class TargetGraphics {
158014
158216
  foreground = [];
158015
158217
  background = [];
158016
158218
  overlays = [];
158017
- _dynamics;
158219
+ foregroundDynamics = [];
158220
+ overlayDynamics = [];
158018
158221
  _decorations;
158019
158222
  [Symbol.dispose]() {
158020
158223
  this.foreground.length = this.background.length = this.overlays.length = 0;
158021
- this._dynamics = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this._dynamics);
158224
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
158225
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
158022
158226
  this._decorations = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._decorations);
158023
158227
  }
158024
158228
  get isDisposed() {
158025
158229
  return 0 === this.foreground.length && 0 === this.background.length && 0 === this.overlays.length
158026
- && undefined === this._dynamics && undefined === this._decorations;
158230
+ && 0 === this.foregroundDynamics.length && 0 === this.overlayDynamics.length && !this._decorations;
158027
158231
  }
158028
158232
  changeScene(scene) {
158029
158233
  this.foreground = scene.foreground;
158030
158234
  this.background = scene.background;
158031
158235
  this.overlays = scene.overlay;
158032
158236
  }
158033
- get dynamics() { return this._dynamics; }
158034
- set dynamics(dynamics) {
158035
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this._dynamics);
158036
- this._dynamics = dynamics;
158237
+ changeDynamics(foreground, overlay) {
158238
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
158239
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
158240
+ this.foregroundDynamics = foreground ?? [];
158241
+ this.overlayDynamics = overlay ?? [];
158037
158242
  }
158038
158243
  get decorations() { return this._decorations; }
158039
158244
  set decorations(decorations) {
@@ -170568,6 +170773,7 @@ class GraphicsCollectorDrawArgs extends _tile_internal__WEBPACK_IMPORTED_MODULE_
170568
170773
  return undefined;
170569
170774
  return new GraphicsCollectorDrawArgs(planes, worldToViewMap, collector, args);
170570
170775
  }
170776
+ get shouldCollectClassifierGraphics() { return false; }
170571
170777
  }
170572
170778
 
170573
170779
 
@@ -170838,6 +171044,7 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
170838
171044
  if (format !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileFormat.IModel)
170839
171045
  return content;
170840
171046
  const sizeMultiplier = this.hasSizeMultiplier ? this.sizeMultiplier : undefined;
171047
+ const ecefTransform = this.tree.iModel.isGeoLocated ? this.tree.iModel.getEcefTransform() : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
170841
171048
  try {
170842
171049
  content = await this.iModelTree.decoder.decode({
170843
171050
  stream: streamBuffer,
@@ -170846,7 +171053,7 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
170846
171053
  isCanceled,
170847
171054
  sizeMultiplier,
170848
171055
  tileData: {
170849
- ecefTransform: this.tree.iModel.ecefLocation?.getTransform() ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
171056
+ ecefTransform,
170850
171057
  range: this.range,
170851
171058
  layerClassifiers: this.tree.layerHandler?.layerClassifiers,
170852
171059
  },
@@ -171555,7 +171762,8 @@ class IModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.TileTre
171555
171762
  draw(args) {
171556
171763
  const tiles = this.selectTiles(args);
171557
171764
  this._rootTile.draw(args, tiles, this._numStaticTilesSelected);
171558
- this._layerHandler.collectClassifierGraphics(args, tiles);
171765
+ if (args.shouldCollectClassifierGraphics)
171766
+ this._layerHandler.collectClassifierGraphics(args, tiles);
171559
171767
  }
171560
171768
  prune() {
171561
171769
  const olderThan = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.now().minus(this.expirationTime);
@@ -172687,14 +172895,20 @@ class LayerTileTreeReferenceHandler {
172687
172895
  removals.push(context.viewport.displayStyle.settings.onMapImageryChanged.addListener((imagery) => {
172688
172896
  this.setBaseLayerSettings(imagery.backgroundBase);
172689
172897
  this.setLayerSettings(imagery.backgroundLayers);
172690
- this.clearLayers();
172691
172898
  }));
172692
172899
  }
172693
172900
  removals.push(context.viewport.onChangeView.addListener((vp, previousViewState) => {
172694
172901
  if ((0,_tile_internal__WEBPACK_IMPORTED_MODULE_1__.compareMapLayer)(previousViewState, vp.view)) {
172695
172902
  this.setBaseLayerSettings(mapImagery.backgroundBase);
172696
172903
  this.setLayerSettings(mapImagery.backgroundLayers);
172697
- this.clearLayers();
172904
+ }
172905
+ }));
172906
+ removals.push(context.viewport.onViewedModelsChanged.addListener((viewport) => {
172907
+ const layers = viewport.displayStyle.settings.mapImagery.backgroundLayers;
172908
+ if (layers.length > 0) {
172909
+ this.setBaseLayerSettings(mapImagery.backgroundBase);
172910
+ this.setLayerSettings(mapImagery.backgroundLayers);
172911
+ viewport.invalidateScene();
172698
172912
  }
172699
172913
  }));
172700
172914
  }
@@ -175362,8 +175576,9 @@ class RealityTileLoader {
175362
175576
  isCanceled = () => !tile.isLoading;
175363
175577
  const { is3d, yAxisUp, iModel, modelId } = tile.realityRoot;
175364
175578
  let reader;
175579
+ const ecefTransform = tile.tree.iModel.isGeoLocated ? tile.tree.iModel.getEcefTransform() : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
175365
175580
  const tileData = {
175366
- ecefTransform: tile.tree.iModel.ecefLocation?.getTransform() ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
175581
+ ecefTransform,
175367
175582
  range: tile.range,
175368
175583
  layerClassifiers: tile.tree.layerHandler?.layerClassifiers,
175369
175584
  };
@@ -186678,7 +186893,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
186678
186893
  sortIndices = selectedTiles.map((_x, i) => i);
186679
186894
  sortIndices.sort((a, b) => selectedTiles[a].depth - selectedTiles[b].depth);
186680
186895
  }
186681
- if (!(args instanceof _internal__WEBPACK_IMPORTED_MODULE_6__.GraphicsCollectorDrawArgs))
186896
+ if (args.shouldCollectClassifierGraphics)
186682
186897
  this.collectClassifierGraphics(args, selectedTiles);
186683
186898
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(selectedTiles.length === displayedTileDescendants.length);
186684
186899
  for (let i = 0; i < selectedTiles.length; i++) {
@@ -188832,6 +189047,8 @@ class TileDrawArgs {
188832
189047
  processSelectedTiles(_tiles) { }
188833
189048
  /* @internal */
188834
189049
  get maxRealityTreeSelectionCount() { return undefined; }
189050
+ /* @internal */
189051
+ get shouldCollectClassifierGraphics() { return true; }
188835
189052
  }
188836
189053
 
188837
189054
 
@@ -192132,6 +192349,18 @@ class MapCartoRectangle extends _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0_
192132
192349
  scratchMercatorFractionRange.high.y = tilingScheme.latitudeToYFraction(this.high.y);
192133
192350
  return scratchMercatorFractionRange;
192134
192351
  }
192352
+ /**
192353
+ * Compute rectangle with angles specified in degrees.
192354
+ * @beta
192355
+ */
192356
+ toDegrees() {
192357
+ return {
192358
+ north: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.north),
192359
+ south: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.south),
192360
+ east: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.east),
192361
+ west: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.west),
192362
+ };
192363
+ }
192135
192364
  }
192136
192365
 
192137
192366
 
@@ -192798,7 +193027,7 @@ class MapLayerImageryProvider {
192798
193027
  }
192799
193028
  }
192800
193029
  /** @internal */
192801
- async makeTileRequest(url, timeoutMs) {
193030
+ async makeTileRequest(url, timeoutMs, authorization) {
192802
193031
  // We want to complete the first request before letting other requests go;
192803
193032
  // this done to avoid flooding server with requests missing credentials
192804
193033
  if (!this._firstRequestPromise)
@@ -192807,7 +193036,7 @@ class MapLayerImageryProvider {
192807
193036
  await this._firstRequestPromise;
192808
193037
  let response;
192809
193038
  try {
192810
- response = await this.makeRequest(url, timeoutMs);
193039
+ response = await this.makeRequest(url, timeoutMs, authorization);
192811
193040
  }
192812
193041
  finally {
192813
193042
  this.onFirstRequestCompleted.raiseEvent();
@@ -192817,11 +193046,15 @@ class MapLayerImageryProvider {
192817
193046
  return response;
192818
193047
  }
192819
193048
  /** @internal */
192820
- async makeRequest(url, timeoutMs) {
193049
+ async makeRequest(url, timeoutMs, authorization) {
192821
193050
  let response;
192822
193051
  let headers;
192823
193052
  let hasCreds = false;
192824
- if (this._settings.userName && this._settings.password) {
193053
+ if (authorization) {
193054
+ headers = new Headers();
193055
+ headers.set("Authorization", authorization);
193056
+ }
193057
+ else if (this._settings.userName && this._settings.password) {
192825
193058
  hasCreds = true;
192826
193059
  headers = new Headers();
192827
193060
  this.setRequestAuthorization(headers);
@@ -195627,6 +195860,18 @@ class QuadId {
195627
195860
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(this.row, other.row) ||
195628
195861
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(this.column, other.column);
195629
195862
  }
195863
+ /** Creates a QuadId from a JSON representation */
195864
+ static fromJSON(props) {
195865
+ return new QuadId(props.level, props.column, props.row);
195866
+ }
195867
+ /** Convert this QuadId to a JSON representation */
195868
+ static toJSON(props) {
195869
+ return {
195870
+ level: props.level,
195871
+ column: props.column,
195872
+ row: props.row,
195873
+ };
195874
+ }
195630
195875
  }
195631
195876
 
195632
195877
 
@@ -197467,6 +197712,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
197467
197712
  this._controls.overlay.remove();
197468
197713
  this._controls = undefined;
197469
197714
  this.unsuspendToolTips();
197715
+ this.removedControlRect();
197470
197716
  }
197471
197717
  createControlDiv() {
197472
197718
  const div = document.createElement("div");
@@ -197554,6 +197800,10 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
197554
197800
  style.outlineWidth = button.outlineWidth;
197555
197801
  return itemLock;
197556
197802
  }
197803
+ /** Called after the controls have been removed from the view. */
197804
+ removedControlRect() { }
197805
+ /** Called after the position of the controls in the supplied view is updated. */
197806
+ changedControlRect(_rect, _vp) { }
197557
197807
  /** Use to override the position of the controls in the supplied view. */
197558
197808
  modifyControlRect(_rect, _vp) { }
197559
197809
  /** Return the ViewRect currently occupied by the controls in the supplied view. */
@@ -197650,6 +197900,8 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
197650
197900
  return; // Keep showing at last valid location...
197651
197901
  this._controls.div.style.left = `${controlRect.left}px`;
197652
197902
  this._controls.div.style.top = `${controlRect.top}px`;
197903
+ this.changedControlRect(controlRect, vp);
197904
+ return;
197653
197905
  }
197654
197906
  get _isFocusHome() {
197655
197907
  return (document.body === document.activeElement);
@@ -197672,6 +197924,13 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
197672
197924
  // Indicate when keyboard shortcuts can't be used (i.e. focus not at AccuDraw or Home) by changing compass to monochrome...
197673
197925
  return (this._isFocusHome || this._isFocusAccuDraw);
197674
197926
  }
197927
+ /** Get the item field that currently has input focus.
197928
+ */
197929
+ getFocusItem() {
197930
+ if (!this._isFocusAccuDraw)
197931
+ return undefined;
197932
+ return this._focusItem;
197933
+ }
197675
197934
  /** Request to set focus to the specified AccuDraw input field to start entering values.
197676
197935
  * The focused input field will be indicated by the background color.
197677
197936
  */
@@ -204504,6 +204763,7 @@ class CurrentInputState {
204504
204763
  lastButton = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data;
204505
204764
  inputSource = _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Unknown;
204506
204765
  lastMotion = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d();
204766
+ lastMotionEvent;
204507
204767
  lastWheelEvent;
204508
204768
  lastTouchStart;
204509
204769
  touchTapTimer;
@@ -204521,7 +204781,7 @@ class CurrentInputState {
204521
204781
  onStartDrag(button) { this.button[button].isDragging = true; }
204522
204782
  onInstallTool() {
204523
204783
  this.clearKeyQualifiers();
204524
- this.lastWheelEvent = undefined;
204784
+ this.lastWheelEvent = this.lastMotionEvent = undefined;
204525
204785
  this.lastTouchStart = this.touchTapTimer = this.touchTapCount = undefined;
204526
204786
  }
204527
204787
  clearKeyQualifiers() { this.qualifiers = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeModifierKeys.None; }
@@ -204796,6 +205056,9 @@ class ToolAdmin {
204796
205056
  this.clearMotionPromises();
204797
205057
  // make sure tools don't think the cursor is still in this viewport.
204798
205058
  this.onMouseLeave(vp);
205059
+ // Invalidate last motion if for this viewport...
205060
+ if (this.currentInputState.lastMotionEvent?.viewport === vp)
205061
+ this.currentInputState.lastMotionEvent = undefined;
204799
205062
  // Remove any events associated with this viewport.
204800
205063
  ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
204801
205064
  }
@@ -205159,6 +205422,7 @@ class ToolAdmin {
205159
205422
  toolPromise.then(() => {
205160
205423
  if (undefined === this._toolMotionPromise)
205161
205424
  return; // Only early return if canceled, result from a previous motion is preferable to showing nothing...
205425
+ this.currentInputState.lastMotionEvent = motion; // Save to use for simulation motion...
205162
205426
  // Update decorations when dynamics are inactive...
205163
205427
  if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.inDynamicsMode) {
205164
205428
  vp.invalidateDecorations();
@@ -205900,7 +206164,8 @@ class ToolAdmin {
205900
206164
  }
205901
206165
  /** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
205902
206166
  simulateMotionEvent() {
205903
- this.updateDynamics(undefined, undefined, true);
206167
+ // NOTE: Prefer last resolved motion over current cursor location which could be out of the view, or moved from last AccuSnap etc.
206168
+ this.updateDynamics(this.currentInputState.lastMotionEvent, undefined, true);
205904
206169
  }
205905
206170
  /** @internal */
205906
206171
  setIncompatibleViewportCursor(restore) {
@@ -233452,15 +233717,15 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233452
233717
  _activeMomentData;
233453
233718
  _point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
233454
233719
  _point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
233455
- /** Accumulate (independent) integrations over
233456
- * * origin to chord of the arc.
233457
- * * origin to the "cap" between the chord and arc.
233720
+ /**
233721
+ * Accumulate (independent) integrations over:
233722
+ * * The area between the arc and the chord connecting its endpoints.
233723
+ * * The triangle with vertices: origin, arc start, arc end.
233458
233724
  */
233459
233725
  handleArc3d(arc) {
233460
233726
  const momentData = this._activeMomentData;
233461
233727
  const sweepRadians = arc.sweep.sweepRadians;
233462
233728
  const alphaRadians = sweepRadians * 0.5;
233463
- // from https://apps.dtic.mil/dtic/tr/fulltext/u2/274936.pdf page 71 for radius = 1
233464
233729
  let s = Math.sin(alphaRadians);
233465
233730
  let c = Math.cos(alphaRadians);
233466
233731
  let s1 = Math.sin(sweepRadians);
@@ -233487,12 +233752,12 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233487
233752
  const pointC = arc.fractionToPoint(1.0);
233488
233753
  momentData.accumulateTriangleMomentsXY(undefined, pointB, pointC);
233489
233754
  }
233490
- /** Accumulate integrals over the (triangular) areas from the origin to each line segment */
233755
+ /** Accumulate integrals over the (triangular) areas from the origin to each line segment. */
233491
233756
  handleLineString3d(ls) {
233492
233757
  const momentData = this._activeMomentData;
233493
233758
  momentData.accumulateTriangleToLineStringMomentsXY(undefined, ls.packedPoints);
233494
233759
  }
233495
- /** Accumulate integrals over the (triangular) area from the origin to this line segment */
233760
+ /** Accumulate integrals over the (triangular) area from the origin to this line segment. */
233496
233761
  handleLineSegment3d(segment) {
233497
233762
  const momentData = this._activeMomentData;
233498
233763
  segment.startPoint(this._point0);
@@ -233508,15 +233773,7 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233508
233773
  this._activeMomentData = undefined;
233509
233774
  return momentData;
233510
233775
  }
233511
- /**
233512
- * ASSUMPTIONS FOR ORIENTATION AND CONTAINMENT ISSUES
233513
- * * Largest area is outer
233514
- * * All others are interior (and not overlapping)
233515
- * Hence
233516
- * * Outer area sign must be positive -- negate all integrations as needed
233517
- * * Outer area signs must be positive -- negate all integrations as needed
233518
- * @param region
233519
- */
233776
+ /** Accumulate integrals from origin to the components of the parity region. */
233520
233777
  handleParityRegion(region) {
233521
233778
  const allChildMoments = [];
233522
233779
  let maxAbsArea = 0.0;
@@ -233548,7 +233805,7 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233548
233805
  }
233549
233806
  return undefined;
233550
233807
  }
233551
- /** Accumulate (as simple addition) products over each component of the union region. */
233808
+ /** Accumulate integrals from origin to the components of the union region. */
233552
233809
  handleUnionRegion(region) {
233553
233810
  const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
233554
233811
  for (const child of region.children) {
@@ -233570,9 +233827,9 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233570
233827
  this._strokeOptions = options;
233571
233828
  return options;
233572
233829
  }
233573
- /** Single curve primitive (not loop . . .).
233574
- * * stroke the curve
233575
- * * accumulate stroke array.
233830
+ /**
233831
+ * Handle a single curve primitive (not loop).
233832
+ * * Stroke the curve and accumulate stroke array.
233576
233833
  */
233577
233834
  handleCurvePrimitive(cp) {
233578
233835
  const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_6__.LineString3d.create();
@@ -233580,12 +233837,18 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233580
233837
  cp.emitStrokes(strokes, options);
233581
233838
  this.handleLineString3d(strokes);
233582
233839
  }
233583
- /** handle strongly typed BSplineCurve3d as generic curve primitive */
233584
- handleBSplineCurve3d(g) { return this.handleCurvePrimitive(g); }
233585
- /** handle strongly typed BSplineCurve3dH as generic curve primitive */
233586
- handleBSplineCurve3dH(g) { return this.handleCurvePrimitive(g); }
233587
- /** handle strongly typed TransitionSpiral as generic curve primitive */
233588
- handleTransitionSpiral(g) { return this.handleCurvePrimitive(g); }
233840
+ /** Handle strongly typed BSplineCurve3d as generic curve primitive. */
233841
+ handleBSplineCurve3d(g) {
233842
+ return this.handleCurvePrimitive(g);
233843
+ }
233844
+ /** Handle strongly typed BSplineCurve3dH as generic curve primitive. */
233845
+ handleBSplineCurve3dH(g) {
233846
+ return this.handleCurvePrimitive(g);
233847
+ }
233848
+ /** Handle strongly typed TransitionSpiral as generic curve primitive. */
233849
+ handleTransitionSpiral(g) {
233850
+ return this.handleCurvePrimitive(g);
233851
+ }
233589
233852
  }
233590
233853
 
233591
233854
 
@@ -233605,41 +233868,43 @@ __webpack_require__.r(__webpack_exports__);
233605
233868
  /* harmony export */ RegionOps: () => (/* binding */ RegionOps)
233606
233869
  /* harmony export */ });
233607
233870
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
233608
- /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
233609
- /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
233610
- /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
233611
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
233612
- /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
233613
- /* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
233614
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
233615
- /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
233616
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
233871
+ /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
233872
+ /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
233873
+ /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
233874
+ /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
233875
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
233876
+ /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
233877
+ /* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
233878
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
233879
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
233880
+ /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
233881
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
233617
233882
  /* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
233618
- /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
233619
- /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
233620
- /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
233621
- /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
233622
- /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
233623
- /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
233624
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
233625
- /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
233626
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
233883
+ /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
233884
+ /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
233885
+ /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
233886
+ /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
233887
+ /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
233888
+ /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
233889
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
233890
+ /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
233891
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
233627
233892
  /* harmony import */ var _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveWireMomentsXYZ */ "../../core/geometry/lib/esm/curve/CurveWireMomentsXYZ.js");
233628
- /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
233629
- /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
233630
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
233631
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
233632
- /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
233633
- /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
233634
- /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
233635
- /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
233636
- /* harmony import */ var _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Query/ConsolidateAdjacentPrimitivesContext */ "../../core/geometry/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js");
233637
- /* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
233638
- /* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
233639
- /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
233893
+ /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
233894
+ /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
233895
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
233896
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
233897
+ /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
233898
+ /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
233899
+ /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
233900
+ /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
233901
+ /* harmony import */ var _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Query/ConsolidateAdjacentPrimitivesContext */ "../../core/geometry/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js");
233902
+ /* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
233903
+ /* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
233904
+ /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
233640
233905
  /* harmony import */ var _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RegionMomentsXY */ "../../core/geometry/lib/esm/curve/RegionMomentsXY.js");
233641
- /* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
233642
- /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
233906
+ /* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
233907
+ /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
233643
233908
  /*---------------------------------------------------------------------------------------------
233644
233909
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
233645
233910
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -233680,6 +233945,8 @@ __webpack_require__.r(__webpack_exports__);
233680
233945
 
233681
233946
 
233682
233947
 
233948
+
233949
+
233683
233950
 
233684
233951
 
233685
233952
 
@@ -233709,13 +233976,16 @@ var RegionBinaryOpType;
233709
233976
  class RegionOps {
233710
233977
  /**
233711
233978
  * Return moment sums for a loop, parity region, or union region.
233979
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
233712
233980
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
233713
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
233714
- * @param root any Loop, ParityRegion, or UnionRegion.
233981
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
233982
+ * * `rawMomentData.origin` is the centroid of `region`.
233983
+ * * `rawMomentData.sums.weight()` is the signed area of `region`.
233984
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
233715
233985
  */
233716
- static computeXYAreaMoments(root) {
233986
+ static computeXYAreaMoments(region) {
233717
233987
  const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
233718
- const result = root.dispatchToGeometryHandler(handler);
233988
+ const result = region.dispatchToGeometryHandler(handler);
233719
233989
  if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
233720
233990
  result.shiftOriginAndSumsToCentroidOfSums();
233721
233991
  return result;
@@ -233724,8 +233994,8 @@ class RegionOps {
233724
233994
  }
233725
233995
  /**
233726
233996
  * Return an area tolerance for a given xy-range and optional distance tolerance.
233727
- * @param range range of planar region to tolerance
233728
- * @param distanceTolerance optional absolute distance tolerance
233997
+ * @param range range of planar region to tolerance.
233998
+ * @param distanceTolerance optional absolute distance tolerance.
233729
233999
  */
233730
234000
  static computeXYAreaTolerance(range, distanceTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
233731
234001
  // 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).
@@ -233734,12 +234004,13 @@ class RegionOps {
233734
234004
  }
233735
234005
  /**
233736
234006
  * Return a (signed) xy area for a region.
234007
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
233737
234008
  * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
233738
- * @param root any Loop, ParityRegion, or UnionRegion.
234009
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
233739
234010
  */
233740
- static computeXYArea(root) {
234011
+ static computeXYArea(region) {
233741
234012
  const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
233742
- const result = root.dispatchToGeometryHandler(handler);
234013
+ const result = region.dispatchToGeometryHandler(handler);
233743
234014
  if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
233744
234015
  return result.quantitySum;
233745
234016
  }
@@ -233747,49 +234018,88 @@ class RegionOps {
233747
234018
  }
233748
234019
  /**
233749
234020
  * Return MomentData with the sums of wire moments.
234021
+ * * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
233750
234022
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
233751
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
233752
- * @param root any CurveCollection or CurvePrimitive.
234023
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
234024
+ * * `rawMomentData.origin` is the wire centroid of `curve`.
234025
+ * * `rawMomentData.sums.weight()` is the signed length of `curve`.
234026
+ * @param curve any [[CurveCollection]] or [[CurvePrimitive]].
233753
234027
  */
233754
- static computeXYZWireMomentSums(root) {
234028
+ static computeXYZWireMomentSums(curve) {
233755
234029
  const handler = new _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__.CurveWireMomentsXYZ();
233756
- handler.visitLeaves(root);
234030
+ handler.visitLeaves(curve);
233757
234031
  const result = handler.momentData;
233758
234032
  result.shiftOriginAndSumsToCentroidOfSums();
233759
234033
  return result;
233760
234034
  }
234035
+ /**
234036
+ * Return a [[Ray3d]] with:
234037
+ * * `origin` is the centroid of the region,
234038
+ * * `direction` is a unit vector perpendicular to the region plane,
234039
+ * * `a` is the region area.
234040
+ * @param region the region to process. Can lie in any plane.
234041
+ * @param result optional pre-allocated result to populate and return.
234042
+ */
234043
+ static centroidAreaNormal(region, result) {
234044
+ const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__.FrameBuilder.createRightHandedFrame(undefined, region);
234045
+ if (!localToWorld)
234046
+ return undefined;
234047
+ const normal = localToWorld.matrix.columnZ(result?.direction);
234048
+ const regionIsXY = normal.isParallelTo(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.unitZ(), true);
234049
+ let regionXY = region;
234050
+ if (!regionIsXY) { // rotate the region to be parallel to the xy-plane
234051
+ regionXY = region.cloneTransformed(localToWorld.inverse());
234052
+ if (!regionXY)
234053
+ return undefined;
234054
+ }
234055
+ const momentData = RegionOps.computeXYAreaMoments(regionXY);
234056
+ if (!momentData)
234057
+ return undefined;
234058
+ const centroid = momentData.origin.clone(result?.origin);
234059
+ if (!regionIsXY) // rotate centroid back (area is unchanged)
234060
+ localToWorld.multiplyPoint3d(centroid, centroid);
234061
+ let area = momentData.sums.weight();
234062
+ if (area < 0.0) {
234063
+ area = -area;
234064
+ normal.scale(-1.0, normal);
234065
+ }
234066
+ if (!result)
234067
+ result = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__.Ray3d.createCapture(centroid, normal);
234068
+ result.a = area;
234069
+ return result;
234070
+ }
233761
234071
  /**
233762
234072
  * Create loops in the graph.
233763
234073
  * @internal
233764
234074
  */
233765
234075
  static addLoopsToGraph(graph, data, announceIsolatedLoop) {
233766
- if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
234076
+ if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
233767
234077
  const points = data.getPackedStrokes();
233768
234078
  if (points)
233769
234079
  this.addLoopsToGraph(graph, points, announceIsolatedLoop);
233770
234080
  }
233771
- else if (data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_5__.ParityRegion) {
234081
+ else if (data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
233772
234082
  for (const child of data.children) {
233773
234083
  const points = child.getPackedStrokes();
233774
234084
  if (points)
233775
234085
  this.addLoopsToGraph(graph, points, announceIsolatedLoop);
233776
234086
  }
233777
234087
  }
233778
- else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
233779
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234088
+ else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234089
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
233780
234090
  if (loopSeed !== undefined)
233781
234091
  announceIsolatedLoop(graph, loopSeed);
233782
234092
  }
233783
234093
  else if (Array.isArray(data)) {
233784
234094
  if (data.length > 0) {
233785
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d.isAnyImmediatePointType(data[0])) {
233786
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
234095
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(data[0])) {
234096
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
233787
234097
  if (loopSeed !== undefined)
233788
234098
  announceIsolatedLoop(graph, loopSeed);
233789
234099
  }
233790
- else if (data[0] instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234100
+ else if (data[0] instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
233791
234101
  for (const loop of data) {
233792
- const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.directCreateFaceLoopFromCoordinates(graph, loop);
234102
+ const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, loop);
233793
234103
  if (loopSeed !== undefined)
233794
234104
  announceIsolatedLoop(graph, loopSeed);
233795
234105
  }
@@ -233829,10 +234139,10 @@ class RegionOps {
233829
234139
  static finishGraphToPolyface(graph, triangulate) {
233830
234140
  if (graph) {
233831
234141
  if (triangulate) {
233832
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.triangulateAllPositiveAreaFaces(graph);
233833
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
234142
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph);
234143
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
233834
234144
  }
233835
- return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__.PolyfaceBuilder.graphToPolyface(graph);
234145
+ return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph);
233836
234146
  }
233837
234147
  return undefined;
233838
234148
  }
@@ -233846,7 +234156,7 @@ class RegionOps {
233846
234156
  * @param triangulate whether to triangulate the result
233847
234157
  */
233848
234158
  static polygonXYAreaIntersectLoopsToPolyface(loopsA, loopsB, triangulate = false) {
233849
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && inB), this._graphCheckPointFunction);
234159
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && inB), this._graphCheckPointFunction);
233850
234160
  return this.finishGraphToPolyface(graph, triangulate);
233851
234161
  }
233852
234162
  /**
@@ -233859,7 +234169,7 @@ class RegionOps {
233859
234169
  * @param triangulate whether to triangulate the result
233860
234170
  */
233861
234171
  static polygonXYAreaUnionLoopsToPolyface(loopsA, loopsB, triangulate = false) {
233862
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA || inB), this._graphCheckPointFunction);
234172
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA || inB), this._graphCheckPointFunction);
233863
234173
  return this.finishGraphToPolyface(graph, triangulate);
233864
234174
  }
233865
234175
  /**
@@ -233872,7 +234182,7 @@ class RegionOps {
233872
234182
  * @param triangulate whether to triangulate the result
233873
234183
  */
233874
234184
  static polygonXYAreaDifferenceLoopsToPolyface(loopsA, loopsB, triangulate = false) {
233875
- const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
234185
+ const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
233876
234186
  return this.finishGraphToPolyface(graph, triangulate);
233877
234187
  }
233878
234188
  /**
@@ -233889,8 +234199,8 @@ class RegionOps {
233889
234199
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
233890
234200
  // Always return UnionRegion for now. But keep return type as AnyRegion:
233891
234201
  // in the future, we might return the *simplest* region type.
233892
- const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion.create();
233893
- const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionGroupOpType.Union);
234202
+ const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion.create();
234203
+ const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union);
233894
234204
  context.addMembers(loopsA, loopsB);
233895
234205
  context.annotateAndMergeCurvesInGraph(mergeTolerance);
233896
234206
  const range = context.groupA.range().union(context.groupB.range());
@@ -233902,7 +234212,7 @@ class RegionOps {
233902
234212
  if (Math.abs(area) < areaTol)
233903
234213
  return;
233904
234214
  if (faceType === 1) {
233905
- const loop = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.createLoopInFace(face);
234215
+ const loop = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.createLoopInFace(face);
233906
234216
  if (loop)
233907
234217
  result.tryAddChild(loop);
233908
234218
  }
@@ -233922,7 +234232,7 @@ class RegionOps {
233922
234232
  * @param triangulate whether to triangulate the result
233923
234233
  */
233924
234234
  static polygonBooleanXYToPolyface(inputA, operation, inputB, triangulate = false) {
233925
- 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);
234235
+ 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);
233926
234236
  return this.finishGraphToPolyface(graph, triangulate);
233927
234237
  }
233928
234238
  /**
@@ -233937,18 +234247,18 @@ class RegionOps {
233937
234247
  * @param inputB second set of loops
233938
234248
  */
233939
234249
  static polygonBooleanXYToLoops(inputA, operation, inputB) {
233940
- 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);
234250
+ 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);
233941
234251
  if (!graph)
233942
234252
  return undefined;
233943
- const loopEdges = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__.HalfEdgeGraphSearch.collectExtendedBoundaryLoopsInGraph(graph, _topology_Graph__WEBPACK_IMPORTED_MODULE_14__.HalfEdgeMask.EXTERIOR);
234253
+ const loopEdges = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__.HalfEdgeGraphSearch.collectExtendedBoundaryLoopsInGraph(graph, _topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR);
233944
234254
  const allLoops = [];
233945
234255
  for (const graphLoop of loopEdges) {
233946
- const points = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray();
234256
+ const points = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray();
233947
234257
  for (const edge of graphLoop)
233948
234258
  points.pushXYZ(edge.x, edge.y, edge.z);
233949
234259
  points.pushWrap(1);
233950
- const loop = _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.create();
233951
- loop.tryAddChild(_LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d.createCapture(points));
234260
+ const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create();
234261
+ loop.tryAddChild(_LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d.createCapture(points));
233952
234262
  allLoops.push(loop);
233953
234263
  }
233954
234264
  return RegionOps.sortOuterAndHoleLoopsXY(allLoops);
@@ -233966,7 +234276,7 @@ class RegionOps {
233966
234276
  * object.
233967
234277
  */
233968
234278
  static constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions) {
233969
- const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_17__.PolygonWireOffsetContext();
234279
+ const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__.PolygonWireOffsetContext();
233970
234280
  return context.constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions);
233971
234281
  }
233972
234282
  /**
@@ -233978,8 +234288,8 @@ class RegionOps {
233978
234288
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
233979
234289
  */
233980
234290
  static constructCurveXYOffset(curves, offsetDistanceOrOptions) {
233981
- const offsetOptions = _OffsetOptions__WEBPACK_IMPORTED_MODULE_18__.OffsetOptions.create(offsetDistanceOrOptions);
233982
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.constructCurveXYOffset(curves, offsetOptions);
234291
+ const offsetOptions = _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__.OffsetOptions.create(offsetDistanceOrOptions);
234292
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.constructCurveXYOffset(curves, offsetOptions);
233983
234293
  }
233984
234294
  /**
233985
234295
  * Test if point (x,y) is IN, OUT or ON a region.
@@ -233989,7 +234299,7 @@ class RegionOps {
233989
234299
  * @param y y coordinate of point to test
233990
234300
  */
233991
234301
  static testPointInOnOutRegionXY(curves, x, y) {
233992
- return _Query_InOutTests__WEBPACK_IMPORTED_MODULE_20__.PointInOnOutContext.testPointInOnOutRegionXY(curves, x, y);
234302
+ return _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__.PointInOnOutContext.testPointInOnOutRegionXY(curves, x, y);
233993
234303
  }
233994
234304
  /**
233995
234305
  * Create curve collection of subtype determined by gaps between the input curves.
@@ -234013,11 +234323,11 @@ class RegionOps {
234013
234323
  maxGap = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.maxXY(maxGap, curves[i].endPoint().distance(curves[i + 1].startPoint()));
234014
234324
  let collection;
234015
234325
  if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(maxGap)) {
234016
- collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_21__.Path.create();
234326
+ collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_23__.Path.create();
234017
234327
  isPath = true;
234018
234328
  }
234019
234329
  else {
234020
- collection = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.BagOfCurves.create();
234330
+ collection = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create();
234021
234331
  }
234022
234332
  for (const c of curves)
234023
234333
  collection.tryAddChild(c);
@@ -234043,7 +234353,7 @@ class RegionOps {
234043
234353
  * @param cutterCurves input curves to intersect with `curvesToCut`
234044
234354
  */
234045
234355
  static cloneCurvesWithXYSplits(curvesToCut, cutterCurves) {
234046
- return _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_23__.CurveSplitContext.cloneCurvesWithXYSplits(curvesToCut, cutterCurves);
234356
+ return _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__.CurveSplitContext.cloneCurvesWithXYSplits(curvesToCut, cutterCurves);
234047
234357
  }
234048
234358
  /**
234049
234359
  * Create paths assembled from many curves.
@@ -234054,11 +234364,11 @@ class RegionOps {
234054
234364
  static splitToPathsBetweenBreaks(source, makeClones) {
234055
234365
  if (source === undefined)
234056
234366
  return undefined;
234057
- if (source instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive)
234367
+ if (source instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive)
234058
234368
  return source;
234059
234369
  // source is a collection . ..
234060
234370
  const primitives = source.collectCurvePrimitives();
234061
- const chainCollector = new _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_25__.ChainCollectorContext(makeClones);
234371
+ const chainCollector = new _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__.ChainCollectorContext(makeClones);
234062
234372
  for (const primitive of primitives) {
234063
234373
  chainCollector.announceCurvePrimitive(primitive);
234064
234374
  }
@@ -234074,7 +234384,7 @@ class RegionOps {
234074
234384
  * @returns object with named chains, insideOffsets, outsideOffsets
234075
234385
  */
234076
234386
  static collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance) {
234077
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
234387
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
234078
234388
  }
234079
234389
  /**
234080
234390
  * Restructure curve fragments as Paths and Loops.
@@ -234083,7 +234393,7 @@ class RegionOps {
234083
234393
  * @returns chains, possibly wrapped in a [[BagOfCurves]].
234084
234394
  */
234085
234395
  static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234086
- return _CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.collectChains(fragments, gapTolerance);
234396
+ return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectChains(fragments, gapTolerance);
234087
234397
  }
234088
234398
  /**
234089
234399
  * Find all intersections among curves in `curvesToCut` against the boundaries of `region` and return fragments
@@ -234095,17 +234405,17 @@ class RegionOps {
234095
234405
  const result = { insideParts: [], outsideParts: [], coincidentParts: [] };
234096
234406
  const pathWithIntersectionMarkup = RegionOps.cloneCurvesWithXYSplits(curvesToCut, region);
234097
234407
  const splitPaths = RegionOps.splitToPathsBetweenBreaks(pathWithIntersectionMarkup, true);
234098
- if (splitPaths instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection) {
234408
+ if (splitPaths instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
234099
234409
  for (const child of splitPaths.children) {
234100
- const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(child);
234410
+ const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(child);
234101
234411
  if (pointOnChild) {
234102
234412
  const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
234103
234413
  pushToInOnOutArrays(child, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
234104
234414
  }
234105
234415
  }
234106
234416
  }
234107
- else if (splitPaths instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive) {
234108
- const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(splitPaths);
234417
+ else if (splitPaths instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
234418
+ const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(splitPaths);
234109
234419
  if (pointOnChild) {
234110
234420
  const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
234111
234421
  pushToInOnOutArrays(splitPaths, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
@@ -234129,10 +234439,10 @@ class RegionOps {
234129
234439
  * normal in z column. If not a rectangle, return undefined.
234130
234440
  */
234131
234441
  static rectangleEdgeTransform(data, requireClosurePoint = true) {
234132
- if (data instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234442
+ if (data instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234133
234443
  return this.rectangleEdgeTransform(data.packedPoints);
234134
234444
  }
234135
- else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234445
+ else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234136
234446
  let dataToUse;
234137
234447
  if (requireClosurePoint && data.length === 5) {
234138
234448
  if (!_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(data.distanceIndexIndex(0, 4)))
@@ -234146,8 +234456,8 @@ class RegionOps {
234146
234456
  return undefined;
234147
234457
  }
234148
234458
  else {
234149
- dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(data);
234150
- _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_26__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
234459
+ dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(data);
234460
+ _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
234151
234461
  if (dataToUse.length < (requireClosurePoint ? 5 : 4))
234152
234462
  return undefined;
234153
234463
  }
@@ -234158,19 +234468,19 @@ class RegionOps {
234158
234468
  if (normalVector.normalizeInPlace()
234159
234469
  && vector12.isAlmostEqual(vector03)
234160
234470
  && vector01.isPerpendicularTo(vector03)) {
234161
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_27__.Transform.createOriginAndMatrixColumns(dataToUse.getPoint3dAtUncheckedPointIndex(0), vector01, vector03, normalVector);
234471
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__.Transform.createOriginAndMatrixColumns(dataToUse.getPoint3dAtUncheckedPointIndex(0), vector01, vector03, normalVector);
234162
234472
  }
234163
234473
  }
234164
234474
  else if (Array.isArray(data)) {
234165
- return this.rectangleEdgeTransform(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__.Point3dArrayCarrier(data), requireClosurePoint);
234475
+ return this.rectangleEdgeTransform(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__.Point3dArrayCarrier(data), requireClosurePoint);
234166
234476
  }
234167
- else if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234477
+ else if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234168
234478
  return this.rectangleEdgeTransform(data.children[0].packedPoints, true);
234169
234479
  }
234170
- else if (data instanceof _Path__WEBPACK_IMPORTED_MODULE_21__.Path && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234480
+ else if (data instanceof _Path__WEBPACK_IMPORTED_MODULE_23__.Path && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234171
234481
  return this.rectangleEdgeTransform(data.children[0].packedPoints, requireClosurePoint);
234172
234482
  }
234173
- else if (data instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveChain) {
234483
+ else if (data instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveChain) {
234174
234484
  if (!data.checkForNonLinearPrimitives()) {
234175
234485
  // const linestring = LineString3d.create();
234176
234486
  const strokes = data.getPackedStrokes();
@@ -234194,7 +234504,7 @@ class RegionOps {
234194
234504
  * @param options options for tolerance and selective simplification.
234195
234505
  */
234196
234506
  static consolidateAdjacentPrimitives(curves, options) {
234197
- const context = new _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_29__.ConsolidateAdjacentCurvePrimitivesContext(options);
234507
+ const context = new _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__.ConsolidateAdjacentCurvePrimitivesContext(options);
234198
234508
  curves.dispatchToGeometryHandler(context);
234199
234509
  }
234200
234510
  /**
@@ -234212,14 +234522,14 @@ class RegionOps {
234212
234522
  static sortOuterAndHoleLoopsXY(loops) {
234213
234523
  const loopAndArea = [];
234214
234524
  for (const candidate of loops) {
234215
- if (candidate instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop)
234216
- _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.pushLoop(loopAndArea, candidate);
234217
- else if (candidate instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
234218
- const loop = _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(candidate);
234219
- _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.pushLoop(loopAndArea, loop);
234525
+ if (candidate instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop)
234526
+ _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, candidate);
234527
+ else if (candidate instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
234528
+ const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.createPolygon(candidate);
234529
+ _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, loop);
234220
234530
  }
234221
234531
  }
234222
- return _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_30__.SortablePolygon.sortAsAnyRegion(loopAndArea);
234532
+ return _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.sortAsAnyRegion(loopAndArea);
234223
234533
  }
234224
234534
  /**
234225
234535
  * Find all xy-areas bounded by the unstructured, possibly intersecting curves.
@@ -234245,9 +234555,9 @@ class RegionOps {
234245
234555
  const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
234246
234556
  const range = this.curveArrayRange(primitives);
234247
234557
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
234248
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_31__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234249
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
234250
- return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_12__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
234558
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_33__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234559
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
234560
+ return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
234251
234561
  }
234252
234562
  /**
234253
234563
  * Collect all `CurvePrimitives` in loosely typed input.
@@ -234262,10 +234572,10 @@ class RegionOps {
234262
234572
  */
234263
234573
  static collectCurvePrimitives(candidates, collectorArray, smallestPossiblePrimitives = false, explodeLinestrings = false) {
234264
234574
  const results = collectorArray === undefined ? [] : collectorArray;
234265
- if (candidates instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_24__.CurvePrimitive) {
234575
+ if (candidates instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
234266
234576
  candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
234267
234577
  }
234268
- else if (candidates instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_22__.CurveCollection) {
234578
+ else if (candidates instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
234269
234579
  candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
234270
234580
  }
234271
234581
  else if (Array.isArray(candidates)) {
@@ -234284,7 +234594,7 @@ class RegionOps {
234284
234594
  static expandLineStrings(candidates) {
234285
234595
  const result = [];
234286
234596
  for (const c of candidates) {
234287
- if (c instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
234597
+ if (c instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
234288
234598
  for (let i = 0; i + 1 < c.packedPoints.length; i++) {
234289
234599
  const q = c.getIndexedSegment(i);
234290
234600
  if (q !== undefined)
@@ -234303,16 +234613,16 @@ class RegionOps {
234303
234613
  * @param worldToLocal transform to apply to data before computing its range
234304
234614
  */
234305
234615
  static curveArrayRange(data, worldToLocal) {
234306
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_32__.Range3d.create();
234307
- if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__.GeometryQuery)
234616
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_34__.Range3d.create();
234617
+ if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
234308
234618
  data.extendRange(range, worldToLocal);
234309
234619
  else if (Array.isArray(data)) {
234310
234620
  for (const c of data) {
234311
- if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_33__.GeometryQuery)
234621
+ if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
234312
234622
  c.extendRange(range, worldToLocal);
234313
- else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d)
234623
+ else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d)
234314
234624
  range.extendPoint(c, worldToLocal);
234315
- else if (c instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray)
234625
+ else if (c instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray)
234316
234626
  range.extendRange(c.getRange(worldToLocal));
234317
234627
  else if (Array.isArray(c))
234318
234628
  range.extendRange(this.curveArrayRange(c, worldToLocal));
@@ -234331,37 +234641,37 @@ class RegionOps {
234331
234641
  if (polygons.length === 0)
234332
234642
  return undefined;
234333
234643
  const firstEntry = polygons[0];
234334
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_8__.Point3d.isAnyImmediatePointType(firstEntry)) {
234335
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234644
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(firstEntry)) {
234645
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234336
234646
  }
234337
234647
  else if (polygons.length > 1) {
234338
234648
  let writablePolygons;
234339
- if (firstEntry instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedReadWriteXYZCollection) {
234649
+ if (firstEntry instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedReadWriteXYZCollection) {
234340
234650
  writablePolygons = polygons;
234341
234651
  }
234342
234652
  else {
234343
234653
  writablePolygons = [];
234344
234654
  for (const polygon of polygons)
234345
- writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(polygon));
234655
+ writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(polygon));
234346
234656
  }
234347
- const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_34__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
234657
+ const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_36__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
234348
234658
  if (sortedPolygons.length === 1) { // below requires exactly one outer loop!
234349
- if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
234350
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
234659
+ if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
234660
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
234351
234661
  }
234352
234662
  }
234353
234663
  else {
234354
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(firstEntry);
234664
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(firstEntry);
234355
234665
  }
234356
234666
  }
234357
234667
  else {
234358
- graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234668
+ graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
234359
234669
  }
234360
234670
  if (!graph) {
234361
234671
  // Last resort: try full merge. Conveniently, multiple polygons are processed with parity logic.
234362
- if (graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_10__.RegionOpsFaceToFaceSearch.doPolygonBoolean(polygons, [], (inA, _inB) => inA)) {
234363
- if (_topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.triangulateAllPositiveAreaFaces(graph))
234364
- _topology_Triangulation__WEBPACK_IMPORTED_MODULE_7__.Triangulator.flipTriangles(graph);
234672
+ if (graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(polygons, [], (inA, _inB) => inA)) {
234673
+ if (_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph))
234674
+ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
234365
234675
  }
234366
234676
  }
234367
234677
  return graph;
@@ -234371,13 +234681,13 @@ class RegionOps {
234371
234681
  const strokedComponent = component.cloneStroked(options);
234372
234682
  // package the stroked region as polygons
234373
234683
  const polygons = [];
234374
- if (strokedComponent instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
234375
- if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d)
234684
+ if (strokedComponent instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
234685
+ if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
234376
234686
  polygons.push(strokedComponent.children[0].packedPoints); // expect only 1
234377
234687
  }
234378
- else if (strokedComponent instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_5__.ParityRegion) {
234688
+ else if (strokedComponent instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
234379
234689
  for (const strokedLoop of strokedComponent.children) {
234380
- if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d)
234690
+ if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
234381
234691
  polygons.push(strokedLoop.children[0].packedPoints); // expect only 1
234382
234692
  }
234383
234693
  }
@@ -234407,7 +234717,7 @@ class RegionOps {
234407
234717
  */
234408
234718
  static facetRegionXY(region, options) {
234409
234719
  let graph;
234410
- if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
234720
+ if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion) {
234411
234721
  for (const child of region.children) {
234412
234722
  const childGraph = RegionOps.triangulateRegionComponent(child, options);
234413
234723
  if (childGraph) {
@@ -234429,8 +234739,8 @@ class RegionOps {
234429
234739
  if (!graph)
234430
234740
  return undefined;
234431
234741
  if (options?.maximizeConvexFacets)
234432
- _topology_Merging__WEBPACK_IMPORTED_MODULE_35__.HalfEdgeGraphOps.expandConvexFaces(graph);
234433
- return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_9__.PolyfaceBuilder.graphToPolyface(graph, options);
234742
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
234743
+ return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph, options);
234434
234744
  }
234435
234745
  /**
234436
234746
  * Decompose a polygon with optional holes into an array of convex polygons.
@@ -234443,11 +234753,11 @@ class RegionOps {
234443
234753
  if (!graph)
234444
234754
  return undefined;
234445
234755
  if (maximize)
234446
- _topology_Merging__WEBPACK_IMPORTED_MODULE_35__.HalfEdgeGraphOps.expandConvexFaces(graph);
234756
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
234447
234757
  const convexPolygons = [];
234448
234758
  graph.announceFaceLoops((_graph, seed) => {
234449
- if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_14__.HalfEdgeMask.EXTERIOR))
234450
- convexPolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray.create(seed.collectAroundFace((node) => { return node.getPoint3d(); })));
234759
+ if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR))
234760
+ convexPolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(seed.collectAroundFace((node) => { return node.getPoint3d(); })));
234451
234761
  return true;
234452
234762
  });
234453
234763
  return convexPolygons;
@@ -258214,9 +258524,9 @@ class Vector3d extends XYZ {
258214
258524
  if (dot < 0.0 && !oppositeIsParallel)
258215
258525
  return false;
258216
258526
  const cross2 = this.crossProductMagnitudeSquared(other);
258217
- /* a2,b2,cross2 are squared lengths of respective vectors */
258218
- /* cross2 = sin^2(theta) * a2 * b2 */
258219
- /* For small theta, sin^2(theta)~~theta^2 */
258527
+ // a2,b2,cross2 are squared lengths of respective vectors
258528
+ // cross2 = sin^2(theta) * a2 * b2
258529
+ // For small theta, sin^2(theta) ~ theta^2
258220
258530
  return cross2 <= radianSquaredTol * a2 * b2;
258221
258531
  }
258222
258532
  /**
@@ -260171,26 +260481,28 @@ class PolygonOps {
260171
260481
  return s;
260172
260482
  }
260173
260483
  /**
260174
- * Return a Ray3d with (assuming the polygon is planar and not self-intersecting):
260175
- * * `origin` at the centroid of the (3D) polygon,
260176
- * * `direction` is the unit vector perpendicular to the plane,
260177
- * * `a` is the area.
260178
- * @param points
260484
+ * Return a [[Ray3d]] with:
260485
+ * * `origin` is the centroid of the polygon,
260486
+ * * `direction` is a unit vector perpendicular to the polygon plane,
260487
+ * * `a` is the polygon area.
260488
+ * @param points the polygon vertices in order. Points can lie in any plane. First and last point do not have to be equal.
260489
+ * @param result optional pre-allocated result to populate and return.
260179
260490
  */
260180
- static centroidAreaNormal(points) {
260491
+ static centroidAreaNormal(points, result) {
260181
260492
  if (Array.isArray(points)) {
260182
260493
  const carrier = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_5__.Point3dArrayCarrier(points);
260183
- return this.centroidAreaNormal(carrier);
260494
+ return this.centroidAreaNormal(carrier, result);
260184
260495
  }
260185
260496
  const n = points.length;
260186
260497
  if (n === 3) {
260187
- const normal = points.crossProductIndexIndexIndex(0, 1, 2);
260498
+ const normal = points.crossProductIndexIndexIndex(0, 1, 2, result?.direction);
260188
260499
  const a = 0.5 * normal.magnitude();
260189
- const centroid = points.getPoint3dAtCheckedPointIndex(0);
260500
+ const centroid = points.getPoint3dAtCheckedPointIndex(0, result?.origin);
260190
260501
  points.accumulateScaledXYZ(1, 1.0, centroid);
260191
260502
  points.accumulateScaledXYZ(2, 1.0, centroid);
260192
260503
  centroid.scaleInPlace(1.0 / 3.0);
260193
- const result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
260504
+ if (!result)
260505
+ result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
260194
260506
  if (result.tryNormalizeInPlaceWithAreaWeight(a))
260195
260507
  return result;
260196
260508
  return undefined;
@@ -260208,22 +260520,24 @@ class PolygonOps {
260208
260520
  points.vectorXYAndZIndex(origin, 1, vector0);
260209
260521
  let cross = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
260210
260522
  const centroidSum = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
260211
- const normalSum = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
260523
+ const normal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero(result?.direction);
260212
260524
  let signedTriangleArea;
260213
- // This will work with or without closure edge. If closure is given, the last vector is 000.
260525
+ // This will work with or without closure edge. If closure is given, the last vector is 000.
260214
260526
  for (let i = 2; i < n; i++) {
260215
260527
  points.vectorXYAndZIndex(origin, i, vector1);
260216
260528
  cross = vector0.crossProduct(vector1, cross);
260217
260529
  signedTriangleArea = areaNormal.dotProduct(cross); // well, actually twice the area.
260218
- normalSum.addInPlace(cross); // this grows to twice the area
260530
+ normal.addInPlace(cross); // this grows to twice the area
260219
260531
  const b = signedTriangleArea / 6.0;
260220
260532
  centroidSum.plus2Scaled(vector0, b, vector1, b, centroidSum);
260221
260533
  vector0.setFrom(vector1);
260222
260534
  }
260223
- const area = 0.5 * normalSum.magnitude();
260535
+ const area = 0.5 * normal.magnitude();
260224
260536
  const inverseArea = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(1, area);
260225
260537
  if (inverseArea !== undefined) {
260226
- const result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(origin.plusScaled(centroidSum, inverseArea), normalSum);
260538
+ const centroid = origin.plusScaled(centroidSum, inverseArea, result?.origin);
260539
+ if (!result)
260540
+ result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
260227
260541
  result.tryNormalizeInPlaceWithAreaWeight(area);
260228
260542
  return result;
260229
260543
  }
@@ -267197,19 +267511,19 @@ class Matrix4d {
267197
267511
  this._coffs[15] += scale * beta;
267198
267512
  }
267199
267513
  /**
267200
- * Multiply and replace contents of this matrix by A*this*AT where
267201
- * * A is a pure translation with final column [x,y,z,1]
267202
- * * this is this matrix.
267203
- * * AT is the transpose of A.
267204
- * @param ax x part of translation
267205
- * @param ay y part of translation
267206
- * @param az z part of translation
267514
+ * Multiply and replace contents of ` this` matrix by `A*this*AT` where
267515
+ * * `A` is a pure translation with final column [x,y,z,1].
267516
+ * * `this` is this matrix.
267517
+ * * `AT` is the transpose of A.
267518
+ * @param ax x part of translation.
267519
+ * @param ay y part of translation.
267520
+ * @param az z part of translation.
267207
267521
  */
267208
267522
  multiplyTranslationSandwichInPlace(ax, ay, az) {
267209
267523
  const bx = this._coffs[3];
267210
267524
  const by = this._coffs[7];
267211
267525
  const bz = this._coffs[11];
267212
- // matrixB can be non-symmetric!!
267526
+ // matrixB can be non-symmetric
267213
267527
  const cx = this._coffs[12];
267214
267528
  const cy = this._coffs[13];
267215
267529
  const cz = this._coffs[14];
@@ -267232,7 +267546,7 @@ class Matrix4d {
267232
267546
  this._coffs[12] += axBeta;
267233
267547
  this._coffs[13] += ayBeta;
267234
267548
  this._coffs[14] += azBeta;
267235
- // coffs[15] is unchanged !!!
267549
+ // coffs[15] is unchanged
267236
267550
  }
267237
267551
  }
267238
267552
 
@@ -267283,8 +267597,8 @@ __webpack_require__.r(__webpack_exports__);
267283
267597
  * * e.g. entry 03 is summed x.
267284
267598
  * * In this level:
267285
267599
  * * the `absoluteQuantity` member is undefined.
267286
- * * the `localToWorldMap` and `radiiOfGyration` are created by have undefined contents.
267287
- * * Second level: after a call to inertiaProductsToPrincipalAxes, the `localToWorldMap`, `absoluteQuantity` and
267600
+ * * the `localToWorldMap` and `radiiOfGyration` are created but have undefined contents.
267601
+ * * Second level: after a call to `inertiaProductsToPrincipalAxes`, the `localToWorldMap`, `absoluteQuantity` and
267288
267602
  * `radiiOfGyration` are filled in.
267289
267603
  * @public
267290
267604
  */
@@ -267304,18 +267618,35 @@ class MomentData {
267304
267618
  * * This set up with its inverse already constructed.
267305
267619
  */
267306
267620
  localToWorldMap;
267621
+ /** Radii of gyration (square roots of principal second moments). */
267622
+ radiusOfGyration;
267623
+ /**
267624
+ * Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
267625
+ * inertiaProductsToPrincipalAxes.
267626
+ */
267627
+ absoluteQuantity;
267307
267628
  // private variables
267308
267629
  static _vectorA;
267309
267630
  static _vectorB;
267310
267631
  static _vectorC;
267311
267632
  _point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
267312
267633
  _point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
267634
+ /** Constructor. */
267635
+ constructor() {
267636
+ this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
267637
+ this.needOrigin = false;
267638
+ this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
267639
+ this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
267640
+ this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
267641
+ this.absoluteQuantity = 0.1; // so optimizer sees its type
267642
+ this.absoluteQuantity = undefined;
267643
+ }
267313
267644
  /**
267314
267645
  * Return the lower-right (3,3) entry in the sums.
267315
267646
  * * This is the quantity (i.e. length, area, or volume) summed.
267316
267647
  */
267317
267648
  get quantitySum() {
267318
- return this.sums.atIJ(3, 3);
267649
+ return this.sums.weight();
267319
267650
  }
267320
267651
  /**
267321
267652
  * Return a scale factor to make these sums match the target orientation sign.
@@ -267346,23 +267677,6 @@ class MomentData {
267346
267677
  this.needOrigin = false;
267347
267678
  }
267348
267679
  }
267349
- /** Radii of gyration (square roots of principal second moments). */
267350
- radiusOfGyration;
267351
- /**
267352
- * Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
267353
- * inertiaProductsToPrincipalAxes.
267354
- */
267355
- absoluteQuantity;
267356
- /** Constructor. */
267357
- constructor() {
267358
- this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
267359
- this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
267360
- this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
267361
- this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
267362
- this.needOrigin = false;
267363
- this.absoluteQuantity = 0.1; // so optimizer sees its type
267364
- this.absoluteQuantity = undefined;
267365
- }
267366
267680
  /**
267367
267681
  * Create moments with optional origin.
267368
267682
  * * Origin and needOrigin are quirky.
@@ -267406,7 +267720,7 @@ class MomentData {
267406
267720
  axes.setColumnsPoint4dXYZ(points[0], points[1], points[2]);
267407
267721
  if (axes.determinant() < 0)
267408
267722
  axes.scaleColumnsInPlace(-1.0, -1.0, -1.0);
267409
- // prefer x and z positive -- y falls wherever . ..
267723
+ // prefer x and z positive; y falls wherever
267410
267724
  if (axes.at(0, 0) < 0.0)
267411
267725
  axes.scaleColumnsInPlace(-1.0, -1.0, 1.0);
267412
267726
  if (axes.at(2, 2) < 0.0)
@@ -267431,7 +267745,8 @@ class MomentData {
267431
267745
  * * Hence x axis is long direction.
267432
267746
  * * Hence planar data generates large moment as Z.
267433
267747
  * @param origin The origin used for the inertia products.
267434
- * @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].
267748
+ * @param inertiaProducts The inertia products: sums or integrals of
267749
+ * [xx,xy,xz,xw; yx,yy,yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
267435
267750
  */
267436
267751
  static inertiaProductsToPrincipalAxes(origin, inertiaProducts) {
267437
267752
  const moments = new MomentData();
@@ -267475,23 +267790,21 @@ class MomentData {
267475
267790
  */
267476
267791
  static areEquivalentPrincipalAxes(dataA, dataB) {
267477
267792
  if (dataA && dataB
267478
- && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { // um.. need different tolerance for area, volume?)
267793
+ && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { // TODO: need different tolerance for area, volume?
267479
267794
  if (dataA.localToWorldMap.getOrigin().isAlmostEqual(dataB.localToWorldMap.getOrigin())
267480
267795
  && dataA.radiusOfGyration.isAlmostEqual(dataB.radiusOfGyration)) {
267481
267796
  if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.y)) {
267482
- // We have at least xy symmetry ....
267797
+ // we have at least xy symmetry
267483
267798
  if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.z))
267484
267799
  return true;
267485
- // just xy.
267486
- // allow opposite z directions.
267487
- // If the z's are aligned, x an dy can spin freely.
267800
+ // just xy; allow opposite z directions; if the z's are aligned, x and y can spin freely
267488
267801
  const zA = dataA.localToWorldMap.matrix.columnZ();
267489
267802
  const zB = dataB.localToWorldMap.matrix.columnZ();
267490
267803
  if (zA.isParallelTo(zB, true))
267491
267804
  return true;
267492
267805
  return false;
267493
267806
  }
267494
- // no symmetry. Test all three axes.
267807
+ // no symmetry; test all three axes
267495
267808
  const vectorA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
267496
267809
  const vectorB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
267497
267810
  for (let i = 0; i < 3; i++) {
@@ -267521,7 +267834,7 @@ class MomentData {
267521
267834
  }
267522
267835
  /** Revise the accumulated sums to be "around the centroid". */
267523
267836
  shiftOriginAndSumsToCentroidOfSums() {
267524
- const xyz = this.sums.columnW().realPoint();
267837
+ const xyz = this.sums.columnW().realPoint(); // centroid of the geometry
267525
267838
  if (xyz) {
267526
267839
  this.shiftOriginAndSumsByXYZ(xyz.x, xyz.y, xyz.z);
267527
267840
  return true;
@@ -267530,9 +267843,9 @@ class MomentData {
267530
267843
  }
267531
267844
  /**
267532
267845
  * Revise the accumulated sums.
267533
- * * add ax,ay,ax to the origin coordinates.
267534
- * * apply the negative translation to the sums.
267535
- */
267846
+ * * Add (ax,ay,az) to the origin coordinates.
267847
+ * * Apply the negative translation to the sums.
267848
+ */
267536
267849
  shiftOriginAndSumsByXYZ(ax, ay, az) {
267537
267850
  this.origin.addXYZInPlace(ax, ay, az);
267538
267851
  this.sums.multiplyTranslationSandwichInPlace(-ax, -ay, -az);
@@ -267542,23 +267855,24 @@ class MomentData {
267542
267855
  this.shiftOriginAndSumsByXYZ(newOrigin.x - this.origin.x, newOrigin.y - this.origin.y, newOrigin.z - this.origin.z);
267543
267856
  }
267544
267857
  /**
267545
- * Compute moments of a triangle from the origin to the given line.
267546
- * Accumulate them to this.sums.
267547
- * * If `pointA` is undefined, use `this.origin` as pointA.
267548
- * * If `this.needOrigin` is set, pointB is used
267549
- */
267858
+ * Compute moments of a triangle from the origin. Accumulate them to `this.sums`.
267859
+ * * If `this.needOrigin` is set, `this.origin` is set to `pointB`.
267860
+ * * If `pointA` is undefined, use `this.origin` as `pointA`.
267861
+ */
267550
267862
  accumulateTriangleMomentsXY(pointA, pointB, pointC) {
267551
267863
  this.setOriginXYZIfNeeded(pointB.x, pointB.y, 0.0);
267552
267864
  const x0 = this.origin.x;
267553
267865
  const y0 = this.origin.y;
267554
- const vectorA = MomentData._vectorA =
267555
- pointA !== undefined ? _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointA.x - x0, pointA.y - y0, 0.0, 1.0, MomentData._vectorA)
267556
- : _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(this.origin.x, this.origin.y, 0.0, 1.0, MomentData._vectorA);
267866
+ const vectorA = MomentData._vectorA = (pointA !== undefined) ?
267867
+ _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointA.x - x0, pointA.y - y0, 0.0, 1.0, MomentData._vectorA) :
267868
+ _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(0.0, 0.0, 0.0, 1.0, MomentData._vectorA);
267557
267869
  const vectorB = MomentData._vectorB = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointB.x - x0, pointB.y - y0, 0.0, 1.0, MomentData._vectorB);
267558
267870
  const vectorC = MomentData._vectorC = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointC.x - x0, pointC.y - y0, 0.0, 1.0, MomentData._vectorC);
267559
- // 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
267560
- // where w = 1-u-v
267561
- // W = column vector (point00.x, point00.y, point00.z, 1.0) etc.
267871
+ // Below we calculate 16 double integrals: \iint_T [x y 0 1]^ [x y 0 1] dT over triangle T=(A,B,C).
267872
+ // Each accumulates contributions from 9 scaled outer products. Integration computations use the barycentric
267873
+ // change of variables [B-A C-A][u,v]^ = [x,y]^ with Jacobian detJ = B-A x C-A = twice the area of T.
267874
+ // This converts the integration domain from T to the triangle bounded by u=0, v=0 and v=1-u, yielding e.g.,
267875
+ // \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.
267562
267876
  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);
267563
267877
  if (detJ !== 0.0) {
267564
267878
  const r1_12 = detJ / 12.0;
@@ -267574,7 +267888,7 @@ class MomentData {
267574
267888
  this.sums.addScaledOuterProductInPlace(vectorC, vectorC, r1_12);
267575
267889
  }
267576
267890
  }
267577
- /** Add scaled outer product of (4d, unit weight) point to this.sums. */
267891
+ /** Add scaled outer product of (4d, unit weight) point to `this.sums`. */
267578
267892
  accumulateScaledOuterProduct(point, scaleFactor) {
267579
267893
  this.setOriginXYZIfNeeded(point.x, point.y, 0.0);
267580
267894
  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);
@@ -267597,16 +267911,15 @@ class MomentData {
267597
267911
  this.sums.addScaledOuterProductInPlace(vectorB, vectorB, r1_3);
267598
267912
  }
267599
267913
  /**
267600
- * Compute moments of triangles from a base point to the given linestring.
267601
- * Accumulate them to this.sums.
267602
- * * If `pointA` is undefined, use `this.origin` as pointA.
267603
- * * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
267604
- *
267914
+ * Compute moments of triangles from a base point to the given linestring. Accumulate them to `this.sums`.
267915
+ * * If `this.needOrigin` is set, `this.origin` is set to the first point of the array.
267916
+ * * If `sweepBase` is undefined, use `this.origin` as `sweepBase`.
267605
267917
  */
267606
267918
  accumulateTriangleToLineStringMomentsXY(sweepBase, points) {
267607
267919
  const n = points.length;
267608
267920
  if (n > 1) {
267609
267921
  points.getPoint3dAtUncheckedPointIndex(0, this._point0);
267922
+ // The linestring forms a polygon with sweepBase. Integrate over this polygon using Shoelace algorithm.
267610
267923
  for (let i = 1; i < n; i++) {
267611
267924
  points.getPoint3dAtUncheckedPointIndex(i, this._point1);
267612
267925
  this.accumulateTriangleMomentsXY(sweepBase, this._point0, this._point1);
@@ -267615,17 +267928,17 @@ class MomentData {
267615
267928
  }
267616
267929
  }
267617
267930
  /**
267618
- * * 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].
267619
- * * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin]. (Column weights 0001) (only xy
267620
- * parts of vectors).
267621
- * * scale by detJ for the xy-only determinant of the vectors.
267931
+ * 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].
267932
+ * * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin].
267933
+ * (column weights 0001; only xy parts of vectors).
267934
+ * * Scale by detJ for the xy-only determinant of the vectors.
267622
267935
  * @param productXX
267623
267936
  * @param productXY
267624
267937
  * @param productYY
267625
- * @param area Area in caller's system.
267626
- * @param origin Caller's origin.
267627
- * @param vectorU Caller's U axis (not necessarily unit).
267628
- * @param vectorV Caller's V axis (not necessarily unit).
267938
+ * @param area area in caller's system.
267939
+ * @param origin caller's origin.
267940
+ * @param vectorU caller's U axis (not necessarily unit).
267941
+ * @param vectorV caller's V axis (not necessarily unit).
267629
267942
  */
267630
267943
  accumulateXYProductsInCentroidalFrame(productXX, productXY, productYY, area, origin, vectorU, vectorV) {
267631
267944
  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);
@@ -329231,7 +329544,7 @@ class TestContext {
329231
329544
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
329232
329545
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
329233
329546
  await core_frontend_1.NoRenderApp.startup({
329234
- applicationVersion: "5.1.0-dev.1",
329547
+ applicationVersion: "5.1.0-dev.10",
329235
329548
  applicationId: this.settings.gprid,
329236
329549
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
329237
329550
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -331771,6 +332084,28 @@ const getClassName = (obj) => {
331771
332084
  };
331772
332085
 
331773
332086
 
332087
+ /***/ }),
332088
+
332089
+ /***/ "../../core/frontend/lib/esm/extension/providers lazy recursive":
332090
+ /*!******************************************************************************!*\
332091
+ !*** ../../core/frontend/lib/esm/extension/providers/ lazy namespace object ***!
332092
+ \******************************************************************************/
332093
+ /***/ ((module) => {
332094
+
332095
+ function webpackEmptyAsyncContext(req) {
332096
+ // Here Promise.resolve().then() is used instead of new Promise() to prevent
332097
+ // uncaught exception popping up in devtools
332098
+ return Promise.resolve().then(() => {
332099
+ var e = new Error("Cannot find module '" + req + "'");
332100
+ e.code = 'MODULE_NOT_FOUND';
332101
+ throw e;
332102
+ });
332103
+ }
332104
+ webpackEmptyAsyncContext.keys = () => ([]);
332105
+ webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
332106
+ webpackEmptyAsyncContext.id = "../../core/frontend/lib/esm/extension/providers lazy recursive";
332107
+ module.exports = webpackEmptyAsyncContext;
332108
+
331774
332109
  /***/ }),
331775
332110
 
331776
332111
  /***/ "?088e":
@@ -354277,7 +354612,7 @@ var loadLanguages = instance.loadLanguages;
354277
354612
  /***/ ((module) => {
354278
354613
 
354279
354614
  "use strict";
354280
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.1","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
354615
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.10","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"}}');
354281
354616
 
354282
354617
  /***/ }),
354283
354618