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

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.
@@ -94270,34 +94270,44 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
94270
94270
  * @param name The name of the property to retrieve.
94271
94271
  * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
94272
94272
  */
94273
- async getProperty(name, excludeInherited = false) {
94273
+ async getProperty(name, excludeInherited) {
94274
+ const upperKey = name.toUpperCase();
94275
+ let property;
94274
94276
  if (this._properties) {
94275
- const upperKey = name.toUpperCase();
94276
- const property = this._properties.get(upperKey);
94277
- if (property)
94277
+ property = this._properties.get(upperKey);
94278
+ if (property) {
94278
94279
  return property;
94280
+ }
94279
94281
  }
94280
94282
  if (excludeInherited) {
94281
94283
  return undefined;
94282
94284
  }
94283
- return this.getInheritedProperty(name);
94285
+ if (!this._mergedPropertyCache) {
94286
+ this._mergedPropertyCache = await this.buildPropertyCache();
94287
+ }
94288
+ return this._mergedPropertyCache.get(upperKey);
94284
94289
  }
94285
94290
  /**
94286
94291
  * Searches, case-insensitive, for a local ECProperty with the name provided.
94287
94292
  * @param name The name of the property to retrieve.
94288
94293
  * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
94289
94294
  */
94290
- getPropertySync(name, excludeInherited = false) {
94295
+ getPropertySync(name, excludeInherited) {
94296
+ const upperKey = name.toUpperCase();
94297
+ let property;
94291
94298
  if (this._properties) {
94292
- const upperKey = name.toUpperCase();
94293
- const property = this._properties.get(upperKey);
94294
- if (property)
94299
+ property = this._properties.get(upperKey);
94300
+ if (property) {
94295
94301
  return property;
94302
+ }
94296
94303
  }
94297
94304
  if (excludeInherited) {
94298
94305
  return undefined;
94299
94306
  }
94300
- return this.getInheritedPropertySync(name);
94307
+ if (!this._mergedPropertyCache) {
94308
+ this._mergedPropertyCache = this.buildPropertyCacheSync();
94309
+ }
94310
+ return this._mergedPropertyCache.get(upperKey);
94301
94311
  }
94302
94312
  /**
94303
94313
  * Searches the base class, if one exists, for the property with the name provided.
@@ -94629,69 +94639,51 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
94629
94639
  }
94630
94640
  /**
94631
94641
  *
94632
- * @param target
94633
- * @param existingValues
94634
- * @param propertiesToMerge
94635
- * @param overwriteExisting
94642
+ * @param cache
94643
+ * @returns
94636
94644
  *
94637
94645
  * @internal
94638
94646
  */
94639
- static mergeProperties(target, existingValues, propertiesToMerge, overwriteExisting) {
94640
- for (const property of propertiesToMerge) {
94641
- const upperCaseName = property.name.toUpperCase();
94642
- const existing = existingValues.get(upperCaseName);
94643
- if (existing !== undefined) {
94644
- if (overwriteExisting) {
94645
- target[existing] = property;
94647
+ async buildPropertyCache() {
94648
+ const cache = new Map();
94649
+ const baseClass = await this.baseClass;
94650
+ if (baseClass) {
94651
+ for (const property of await baseClass.getProperties()) {
94652
+ if (!cache.has(property.name.toUpperCase())) {
94653
+ cache.set(property.name.toUpperCase(), property);
94646
94654
  }
94647
94655
  }
94648
- else {
94649
- existingValues.set(upperCaseName, target.length);
94650
- target.push(property);
94651
- }
94652
94656
  }
94653
- }
94654
- /**
94655
- *
94656
- * @param result
94657
- * @param existingValues
94658
- * @returns
94659
- *
94660
- * @internal
94661
- */
94662
- async buildPropertyCache(result, existingValues) {
94663
- if (!existingValues) {
94664
- existingValues = new Map();
94665
- }
94666
- if (this.baseClass) {
94667
- const baseClass = await this.baseClass;
94668
- if (baseClass) {
94669
- ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
94670
- }
94657
+ if (this._properties) {
94658
+ this._properties.forEach(property => {
94659
+ cache.set(property.name.toUpperCase(), property);
94660
+ });
94671
94661
  }
94672
- if (!this._properties)
94673
- return;
94674
- ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
94662
+ return cache;
94675
94663
  }
94676
94664
  /**
94677
94665
  *
94678
- * @param result
94679
- * @param existingValues
94666
+ * @param cache
94680
94667
  * @returns
94681
94668
  *
94682
94669
  * @internal
94683
94670
  */
94684
- buildPropertyCacheSync(result, existingValues) {
94685
- if (!existingValues) {
94686
- existingValues = new Map();
94687
- }
94671
+ buildPropertyCacheSync() {
94672
+ const cache = new Map();
94688
94673
  const baseClass = this.getBaseClassSync();
94689
94674
  if (baseClass) {
94690
- ECClass.mergeProperties(result, existingValues, baseClass.getPropertiesSync(), false);
94675
+ for (const property of baseClass.getPropertiesSync()) {
94676
+ if (!cache.has(property.name.toUpperCase())) {
94677
+ cache.set(property.name.toUpperCase(), property);
94678
+ }
94679
+ }
94691
94680
  }
94692
- if (!this._properties)
94693
- return;
94694
- ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
94681
+ if (this._properties) {
94682
+ this._properties.forEach(property => {
94683
+ cache.set(property.name.toUpperCase(), property);
94684
+ });
94685
+ }
94686
+ return cache;
94695
94687
  }
94696
94688
  /**
94697
94689
  * Clears all caches on this object. This is called implicitly for this class,
@@ -94712,10 +94704,9 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
94712
94704
  return this._properties && this._properties.size > 0 ? this._properties.values() : [];
94713
94705
  }
94714
94706
  if (!this._mergedPropertyCache) {
94715
- this._mergedPropertyCache = [];
94716
- this.buildPropertyCacheSync(this._mergedPropertyCache, undefined);
94707
+ this._mergedPropertyCache = this.buildPropertyCacheSync();
94717
94708
  }
94718
- return this._mergedPropertyCache;
94709
+ return this._mergedPropertyCache.values();
94719
94710
  }
94720
94711
  /**
94721
94712
  * Quick way to check whether this class has any local properties without having to use the iterable
@@ -95336,44 +95327,64 @@ class EntityClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
95336
95327
  }
95337
95328
  /**
95338
95329
  *
95339
- * @param result
95340
- * @param existingValues
95330
+ * @param cache
95331
+ * @returns
95332
+ *
95341
95333
  * @internal
95342
95334
  */
95343
- async buildPropertyCache(result, existingValues) {
95344
- if (!existingValues) {
95345
- existingValues = new Map();
95346
- }
95335
+ async buildPropertyCache() {
95336
+ const cache = new Map();
95347
95337
  const baseClass = await this.baseClass;
95348
95338
  if (baseClass) {
95349
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
95339
+ for (const property of await baseClass.getProperties()) {
95340
+ if (!cache.has(property.name.toUpperCase()))
95341
+ cache.set(property.name.toUpperCase(), property);
95342
+ }
95350
95343
  }
95351
95344
  for (const mixin of this.mixins) {
95352
- const resolvedMixin = await mixin;
95353
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, await resolvedMixin.getProperties(), false);
95345
+ const mixinObj = await mixin;
95346
+ const mixinProps = mixinObj.getPropertiesSync();
95347
+ for (const property of mixinProps) {
95348
+ if (!cache.has(property.name.toUpperCase()))
95349
+ cache.set(property.name.toUpperCase(), property);
95350
+ }
95354
95351
  }
95355
- const localProps = await this.getProperties();
95356
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, localProps, true);
95352
+ const localProps = await this.getProperties(true);
95353
+ if (localProps) {
95354
+ for (const property of localProps) {
95355
+ cache.set(property.name.toUpperCase(), property);
95356
+ }
95357
+ }
95358
+ return cache;
95357
95359
  }
95358
95360
  /**
95359
95361
  *
95360
- * @param result
95361
- * @param existingValues
95362
+ * @param cache
95362
95363
  * @internal
95363
95364
  */
95364
- buildPropertyCacheSync(result, existingValues) {
95365
- if (!existingValues) {
95366
- existingValues = new Map();
95367
- }
95365
+ buildPropertyCacheSync() {
95366
+ const cache = new Map();
95368
95367
  const baseClass = this.getBaseClassSync();
95369
95368
  if (baseClass) {
95370
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, baseClass.getPropertiesSync(), false);
95369
+ Array.from(baseClass.getPropertiesSync()).forEach((property) => {
95370
+ if (!cache.has(property.name.toUpperCase()))
95371
+ cache.set(property.name.toUpperCase(), property);
95372
+ });
95371
95373
  }
95372
95374
  for (const mixin of this.getMixinsSync()) {
95373
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, mixin.getPropertiesSync(), false);
95375
+ const mixinProps = mixin.getPropertiesSync();
95376
+ for (const property of mixinProps) {
95377
+ if (!cache.has(property.name.toUpperCase()))
95378
+ cache.set(property.name.toUpperCase(), property);
95379
+ }
95374
95380
  }
95375
95381
  const localProps = this.getPropertiesSync(true);
95376
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, localProps, true);
95382
+ if (localProps) {
95383
+ Array.from(localProps).forEach(property => {
95384
+ cache.set(property.name.toUpperCase(), property);
95385
+ });
95386
+ }
95387
+ return cache;
95377
95388
  }
95378
95389
  /**
95379
95390
  *
@@ -100014,11 +100025,14 @@ __webpack_require__.r(__webpack_exports__);
100014
100025
  * The SchemaLoader object should be held in memory if multiple calls to [[getSchema]] or [[tryGetSchema]]
100015
100026
  * is a possibility, thereby avoiding unnecessary schema retrievals from the function.
100016
100027
  *
100028
+ * Since the development of this class, the IModelDb class has been enhanced to include a schema context.
100029
+ * In most cases, that is sufficient so a SchemaLoader is not needed. This class is likely to be removed in the future.
100030
+ *
100017
100031
  * ** Example **
100018
100032
  * ```ts
100019
100033
  * [[include:IModelSchemas.loadFromDb]]
100020
100034
  * ```
100021
- * @beta Is this concept needed no that backend and frontend will have contexts cached on the iModel?
100035
+ * @beta This will no longer be needed as of 5.0.0 since IModelDb now has a schema context.
100022
100036
  */
100023
100037
  class SchemaLoader {
100024
100038
  _context;
@@ -119020,8 +119034,18 @@ class ViewAttachments {
119020
119034
  get isEmpty() {
119021
119035
  return 0 === this._attachments.length;
119022
119036
  }
119023
- get areAllTileTreesLoaded() {
119024
- return this._attachments.every((x) => x.areAllTileTreesLoaded);
119037
+ areAllTileTreesLoaded(displayedExtents) {
119038
+ return this._attachments.every((x) => {
119039
+ const placement = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Placement2d.fromJSON(x.viewAttachmentProps.placement);
119040
+ const attachmentRange = placement.calculateRange();
119041
+ if (!attachmentRange.intersectsRangeXY(displayedExtents))
119042
+ return true;
119043
+ return x.areAllTileTreesLoaded;
119044
+ });
119045
+ }
119046
+ /** Strictly for testing purposes */
119047
+ areAllAttachmentsLoaded() {
119048
+ return this._attachments.every((attachment) => attachment.areAllTileTreesLoaded);
119025
119049
  }
119026
119050
  discloseTileTrees(trees) {
119027
119051
  for (const attachment of this._attachments)
@@ -119200,7 +119224,19 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
119200
119224
  this._attachments = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._attachments);
119201
119225
  }
119202
119226
  get areAllTileTreesLoaded() {
119203
- return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded);
119227
+ let displayedExtents = this._viewedExtents;
119228
+ const frustum = this.calculateFrustum();
119229
+ if (frustum) {
119230
+ displayedExtents = frustum.toRange();
119231
+ }
119232
+ return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded(displayedExtents));
119233
+ }
119234
+ /** @internal Strictly for testing */
119235
+ areAllAttachmentsLoaded() {
119236
+ if (this._attachments) {
119237
+ return this._attachments.areAllAttachmentsLoaded();
119238
+ }
119239
+ return true;
119204
119240
  }
119205
119241
  /** Create a sheet border decoration graphic. */
119206
119242
  createBorder(width, height, context) {
@@ -171242,6 +171278,10 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
171242
171278
  args.insertMissing(this);
171243
171279
  return this.isParentDisplayable ? SelectParent.Yes : SelectParent.No;
171244
171280
  }
171281
+ clearLayers() {
171282
+ super.clearLayers();
171283
+ this.disposeChildren();
171284
+ }
171245
171285
  }
171246
171286
 
171247
171287
 
@@ -214565,7 +214605,8 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
214565
214605
  knots;
214566
214606
  /** flat array of coordinate data, blocked by poleDimension and row */
214567
214607
  coffs;
214568
- /** Number of components per pole.
214608
+ /**
214609
+ * Number of components per pole.
214569
214610
  * * 3 for conventional xyz surface
214570
214611
  * * 4 for weighted (wx, wy, wz, w) surface.
214571
214612
  */
@@ -233696,7 +233737,7 @@ __webpack_require__.r(__webpack_exports__);
233696
233737
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
233697
233738
  /* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
233698
233739
  /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
233699
- /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
233740
+ /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
233700
233741
  /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
233701
233742
  /*---------------------------------------------------------------------------------------------
233702
233743
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -233773,49 +233814,31 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
233773
233814
  this._activeMomentData = undefined;
233774
233815
  return momentData;
233775
233816
  }
233776
- /** Accumulate integrals from origin to the components of the parity region. */
233777
- handleParityRegion(region) {
233778
- const allChildMoments = [];
233779
- let maxAbsArea = 0.0;
233780
- let largestChildMoments;
233781
- for (const child of region.children) {
233782
- if (child instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
233783
- const childMoments = this.handleLoop(child);
233817
+ handleAnyRegion(region) {
233818
+ const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
233819
+ // guarantee there is no overlapping children
233820
+ const merged = _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionOps.regionBooleanXY(region, undefined, _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionBinaryOpType.Union);
233821
+ if (merged) {
233822
+ for (const child of merged.children) {
233823
+ const childMoments = child.dispatchToGeometryHandler(this);
233784
233824
  if (childMoments) {
233785
- allChildMoments.push(childMoments);
233786
- const q = Math.abs(childMoments.quantitySum);
233787
- if (q > maxAbsArea) {
233788
- maxAbsArea = q;
233789
- largestChildMoments = childMoments;
233790
- }
233825
+ const sign0 = childMoments.signFactor(1.0);
233826
+ summedMoments.accumulateProducts(childMoments, sign0);
233791
233827
  }
233792
233828
  }
233793
233829
  }
233794
- if (largestChildMoments) {
233795
- const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
233796
- const sign0 = largestChildMoments.signFactor(1.0);
233797
- summedMoments.accumulateProducts(largestChildMoments, sign0);
233798
- for (const childMoments of allChildMoments) {
233799
- if (childMoments !== largestChildMoments) {
233800
- const sign1 = childMoments.signFactor(-1.0);
233801
- summedMoments.accumulateProducts(childMoments, sign1);
233802
- }
233803
- }
233804
- return summedMoments;
233830
+ else {
233831
+ return undefined;
233805
233832
  }
233806
- return undefined;
233833
+ return summedMoments;
233834
+ }
233835
+ /** Accumulate integrals from origin to the components of the parity region. */
233836
+ handleParityRegion(region) {
233837
+ return this.handleAnyRegion(region);
233807
233838
  }
233808
233839
  /** Accumulate integrals from origin to the components of the union region. */
233809
233840
  handleUnionRegion(region) {
233810
- const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
233811
- for (const child of region.children) {
233812
- const childMoments = child.dispatchToGeometryHandler(this);
233813
- if (childMoments) {
233814
- const sign0 = childMoments.signFactor(1.0);
233815
- summedMoments.accumulateProducts(childMoments, sign0);
233816
- }
233817
- }
233818
- return summedMoments;
233841
+ return this.handleAnyRegion(region);
233819
233842
  }
233820
233843
  _strokeOptions;
233821
233844
  getStrokeOptions() {
@@ -233873,9 +233896,9 @@ __webpack_require__.r(__webpack_exports__);
233873
233896
  /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
233874
233897
  /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
233875
233898
  /* 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");
233899
+ /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
233877
233900
  /* 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");
233901
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
233879
233902
  /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
233880
233903
  /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
233881
233904
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
@@ -233883,16 +233906,17 @@ __webpack_require__.r(__webpack_exports__);
233883
233906
  /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
233884
233907
  /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
233885
233908
  /* 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");
233909
+ /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
233887
233910
  /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
233888
233911
  /* 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");
233912
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
233890
233913
  /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
233891
233914
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
233892
233915
  /* harmony import */ var _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveWireMomentsXYZ */ "../../core/geometry/lib/esm/curve/CurveWireMomentsXYZ.js");
233893
- /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
233916
+ /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
233894
233917
  /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
233895
233918
  /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
233919
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
233896
233920
  /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
233897
233921
  /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
233898
233922
  /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
@@ -233948,6 +233972,7 @@ __webpack_require__.r(__webpack_exports__);
233948
233972
 
233949
233973
 
233950
233974
 
233975
+
233951
233976
 
233952
233977
 
233953
233978
  /**
@@ -234197,8 +234222,8 @@ class RegionOps {
234197
234222
  * to connect interior loops to exterior loops.
234198
234223
  */
234199
234224
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234200
- // Always return UnionRegion for now. But keep return type as AnyRegion:
234201
- // in the future, we might return the *simplest* region type.
234225
+ // Always return UnionRegion for now, but keep return type as AnyRegion.
234226
+ // In the future, we might return the *simplest* region type.
234202
234227
  const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion.create();
234203
234228
  const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union);
234204
234229
  context.addMembers(loopsA, loopsB);
@@ -234542,7 +234567,7 @@ class RegionOps {
234542
234567
  * SignedLoops object.
234543
234568
  * @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
234544
234569
  * primitives.
234545
- * @param tolerance optional distance tolerance for coincidence
234570
+ * @param tolerance optional distance tolerance for coincidence.
234546
234571
  * @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
234547
234572
  * * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
234548
234573
  * positive area and counterclockwise orientation.
@@ -234552,10 +234577,11 @@ class RegionOps {
234552
234577
  * to the edge and a constituent curve in each.
234553
234578
  */
234554
234579
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
234555
- const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
234580
+ let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
234581
+ primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create(...primitives)).children;
234556
234582
  const range = this.curveArrayRange(primitives);
234557
234583
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
234558
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_33__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234584
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_34__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
234559
234585
  const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
234560
234586
  return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
234561
234587
  }
@@ -234613,12 +234639,12 @@ class RegionOps {
234613
234639
  * @param worldToLocal transform to apply to data before computing its range
234614
234640
  */
234615
234641
  static curveArrayRange(data, worldToLocal) {
234616
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_34__.Range3d.create();
234617
- if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
234642
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__.Range3d.create();
234643
+ if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
234618
234644
  data.extendRange(range, worldToLocal);
234619
234645
  else if (Array.isArray(data)) {
234620
234646
  for (const c of data) {
234621
- if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
234647
+ if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
234622
234648
  c.extendRange(range, worldToLocal);
234623
234649
  else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d)
234624
234650
  range.extendPoint(c, worldToLocal);
@@ -234654,7 +234680,7 @@ class RegionOps {
234654
234680
  for (const polygon of polygons)
234655
234681
  writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(polygon));
234656
234682
  }
234657
- const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_36__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
234683
+ const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
234658
234684
  if (sortedPolygons.length === 1) { // below requires exactly one outer loop!
234659
234685
  if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
234660
234686
  _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
@@ -234739,7 +234765,7 @@ class RegionOps {
234739
234765
  if (!graph)
234740
234766
  return undefined;
234741
234767
  if (options?.maximizeConvexFacets)
234742
- _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
234768
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
234743
234769
  return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph, options);
234744
234770
  }
234745
234771
  /**
@@ -234753,7 +234779,7 @@ class RegionOps {
234753
234779
  if (!graph)
234754
234780
  return undefined;
234755
234781
  if (maximize)
234756
- _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
234782
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
234757
234783
  const convexPolygons = [];
234758
234784
  graph.announceFaceLoops((_graph, seed) => {
234759
234785
  if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR))
@@ -234807,24 +234833,25 @@ __webpack_require__.r(__webpack_exports__);
234807
234833
  /* harmony export */ RegionOpsFaceToFaceSearch: () => (/* binding */ RegionOpsFaceToFaceSearch)
234808
234834
  /* harmony export */ });
234809
234835
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
234810
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234836
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
234811
234837
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
234812
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
234838
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
234813
234839
  /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
234814
234840
  /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
234815
234841
  /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
234816
234842
  /* harmony import */ var _topology_RegularizeFace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../topology/RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
234817
- /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
234818
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
234819
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
234843
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
234844
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
234845
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
234820
234846
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
234821
- /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
234822
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
234847
+ /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
234848
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
234849
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
234823
234850
  /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
234824
234851
  /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
234825
- /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
234852
+ /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
234826
234853
  /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
234827
- /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
234854
+ /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
234828
234855
  /*---------------------------------------------------------------------------------------------
234829
234856
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
234830
234857
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -234851,6 +234878,7 @@ __webpack_require__.r(__webpack_exports__);
234851
234878
 
234852
234879
 
234853
234880
 
234881
+
234854
234882
  /**
234855
234883
  * base class for callbacks during region sweeps.
234856
234884
  * * At start of a component, `startComponent(node)` is called announcing a representative node on the outermost face.
@@ -235167,8 +235195,7 @@ class RegionGroup {
235167
235195
  }
235168
235196
  return range;
235169
235197
  }
235170
- /** Ask if the current _numIn count qualifies as an "in" for this operation type.
235171
- */
235198
+ /** Ask if the current _numIn count qualifies as an "in" for this operation type. */
235172
235199
  getInOut() {
235173
235200
  // UNION is true if one or more members are IN
235174
235201
  if (this.groupOpType === RegionGroupOpType.Union)
@@ -235184,11 +235211,12 @@ class RegionGroup {
235184
235211
  // push new members into the group.
235185
235212
  addMember(data, allowLineSegment = false) {
235186
235213
  if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop || data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_9__.ParityRegion) {
235187
- const cleanerData = data.clone();
235214
+ let cleanerData = data.clone();
235188
235215
  _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.consolidateAdjacentPrimitives(cleanerData);
235216
+ cleanerData = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__.TransferWithSplitArcs.clone(cleanerData);
235189
235217
  this.members.push(new RegionGroupMember(cleanerData, this));
235190
235218
  }
235191
- else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_10__.UnionRegion) {
235219
+ else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
235192
235220
  for (const child of data.children) {
235193
235221
  this.addMember(child);
235194
235222
  }
@@ -235198,7 +235226,7 @@ class RegionGroup {
235198
235226
  this.addMember(item);
235199
235227
  }
235200
235228
  }
235201
- else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
235229
+ else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
235202
235230
  this.members.push(new RegionGroupMember(data, this));
235203
235231
  }
235204
235232
  }
@@ -235215,22 +235243,22 @@ class RegionGroup {
235215
235243
  /**
235216
235244
  * A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
235217
235245
  * * In the binary operation OP (union, intersection, parity, difference), the left and right operands
235218
- * are each a composite union, difference, or parity among multiple inputs, i.e.
235246
+ * are each a composite union, difference, or parity among multiple inputs, i.e.,
235219
235247
  * * (operationA among Ai) OP (operationB among Bi)
235220
235248
  * * where the Ai are one set of regions, being combined by operationA
235221
- * * and the Bi are the another set of regions, being combined by operationB
235222
- * * Each group of Ai and Bi is a `RegionGroup`
235249
+ * * and the Bi are the another set of regions, being combined by operationB.
235250
+ * * Each group of Ai and Bi is a `RegionGroup`.
235223
235251
  * * This is an extremely delicate structure.
235224
235252
  * * Members are public because of the unique variety of queries, but should only be used for queries.
235225
235253
  * * The graph and curves in the booleans are connected by an extended pointer chain:
235226
- * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
235227
- * * (CurveLocationDetail).curve points to a curve
235228
- * * (Curve).parent points to RegionGroupMember
235229
- * * (RegionGroupMember) points to RegionGroup
235230
- * * (RegionGroup) points to RegionBooleanBinaryContext
235231
- * * So..when a graph sweep crosses an edge,
235232
- * * the chain leads to a parity count in the RegionGroupMember
235233
- * * that can change the number of members active in the RegionGroup
235254
+ * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
235255
+ * * (CurveLocationDetail).curve points to a curve.
235256
+ * * (Curve).parent points to RegionGroupMember.
235257
+ * * (RegionGroupMember) points to RegionGroup.
235258
+ * * (RegionGroup) points to RegionBooleanBinaryContext.
235259
+ * * So when a graph sweep crosses an edge
235260
+ * * the chain leads to a parity count in the RegionGroupMember.
235261
+ * * that can change the number of members active in the RegionGroup.
235234
235262
  * * which can change the state of the context.
235235
235263
  * @internal
235236
235264
  */
@@ -235245,7 +235273,7 @@ class RegionBooleanContext {
235245
235273
  this.groupA = new RegionGroup(this, groupTypeA);
235246
235274
  this.groupB = new RegionGroup(this, groupTypeB);
235247
235275
  this.extraGeometry = new RegionGroup(this, RegionGroupOpType.NonBounding);
235248
- this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // it will be revised on can calls.
235276
+ this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // revised in runClassificationSweep
235249
235277
  }
235250
235278
  /**
235251
235279
  * Create a context with both A and B groups empty.
@@ -235264,7 +235292,7 @@ class RegionBooleanContext {
235264
235292
  this.addConnectives();
235265
235293
  }
235266
235294
  _workSegment;
235267
- static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
235295
+ static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
235268
235296
  /**
235269
235297
  * The sweep operations require access to all geometry by edge crossings and face walk.
235270
235298
  * If input loops are non-overlapping, there may be disconnected islands not reachable.
@@ -235279,7 +235307,7 @@ class RegionBooleanContext {
235279
235307
  const rangeAB = rangeA.union(rangeB);
235280
235308
  const areaTol = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYAreaTolerance(rangeAB);
235281
235309
  let margin = 0.1;
235282
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
235310
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
235283
235311
  if (this._workSegment)
235284
235312
  margin *= this._workSegment.point0Ref.distanceXY(this._workSegment.point1Ref); // how much further to extend each bridge ray
235285
235313
  const maxPoints = [];
@@ -235287,7 +235315,7 @@ class RegionBooleanContext {
235287
235315
  const area = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYArea(region);
235288
235316
  if (area === undefined || Math.abs(area) < areaTol)
235289
235317
  return; // avoid bridging trivial faces
235290
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
235318
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
235291
235319
  if (this._workSegment)
235292
235320
  maxPoints.push(this._workSegment.point1Ref);
235293
235321
  };
@@ -235302,17 +235330,17 @@ class RegionBooleanContext {
235302
235330
  }
235303
235331
  }
235304
235332
  }
235305
- const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createZero();
235333
+ const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.createZero();
235306
235334
  for (const p of maxPoints) {
235307
- // Make a line from...
235308
- // 1) exactly the max point of the loops to
235309
- // 2) a point clearly outside the big range
235310
- // If p came from some inner loop this will...
235311
- // 1) create a bridge from the inner loop through any containing loops (always)
235312
- // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
235313
- const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
235314
- const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
235315
- const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
235335
+ // Make a line from
235336
+ // 1) exactly the max point of the loops to
235337
+ // 2) a point clearly outside the big range
235338
+ // If p came from some inner loop this will
235339
+ // 1) create a bridge from the inner loop through any containing loops (always)
235340
+ // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
235341
+ const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
235342
+ const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
235343
+ const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
235316
235344
  this.extraGeometry.addMember(bridgeLine, true);
235317
235345
  }
235318
235346
  }
@@ -235326,7 +235354,7 @@ class RegionBooleanContext {
235326
235354
  */
235327
235355
  annotateAndMergeCurvesInGraph(mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_7__.Geometry.smallMetricDistance) {
235328
235356
  const allPrimitives = [];
235329
- // ASSUME loops have fine-grained types -- no linestrings !!
235357
+ // ASSUME loops have fine-grained types (no linestrings)
235330
235358
  for (const group of [this.groupA, this.groupB, this.extraGeometry]) {
235331
235359
  for (const member of group.members) {
235332
235360
  let k = allPrimitives.length;
@@ -235337,9 +235365,8 @@ class RegionBooleanContext {
235337
235365
  }
235338
235366
  }
235339
235367
  }
235340
- // const range = RegionOps.curveArrayRange(allPrimitives);
235341
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_15__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
235342
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
235368
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_16__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
235369
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
235343
235370
  this.graph = graph;
235344
235371
  this.faceAreaFunction = faceAreaFromCurvedEdgeData;
235345
235372
  }
@@ -235430,7 +235457,7 @@ class RegionBooleanContext {
235430
235457
  const data = node.edgeTag;
235431
235458
  if (data instanceof RegionGroupMember)
235432
235459
  return updateRegionGroupMemberState(data);
235433
- if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__.CurveLocationDetail) {
235460
+ if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__.CurveLocationDetail) {
235434
235461
  // We trust that the caller has linked from the graph node to a curve which has a RegionGroupMember as its parent.
235435
235462
  const member = data.curve.parent;
235436
235463
  if (member instanceof RegionGroupMember)
@@ -235485,10 +235512,10 @@ function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
235485
235512
  }
235486
235513
  let areaToChord = 0.0;
235487
235514
  if (detail && detail.curve && detail.hasFraction1) {
235488
- if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
235515
+ if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
235489
235516
  // ah .. nothing to do for a line segment
235490
235517
  }
235491
- else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
235518
+ else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_19__.Arc3d) {
235492
235519
  areaToChord = detail.curve.areaToChordXY(detail.fraction, detail.fraction1);
235493
235520
  }
235494
235521
  }
@@ -242157,6 +242184,52 @@ class SumLengthsContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.Rec
242157
242184
  }
242158
242185
 
242159
242186
 
242187
+ /***/ }),
242188
+
242189
+ /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js":
242190
+ /*!***********************************************************************************!*\
242191
+ !*** ../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js ***!
242192
+ \***********************************************************************************/
242193
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
242194
+
242195
+ "use strict";
242196
+ __webpack_require__.r(__webpack_exports__);
242197
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
242198
+ /* harmony export */ TransferWithSplitArcs: () => (/* binding */ TransferWithSplitArcs)
242199
+ /* harmony export */ });
242200
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
242201
+ /* harmony import */ var _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CloneCurvesContext */ "../../core/geometry/lib/esm/curve/internalContexts/CloneCurvesContext.js");
242202
+ /*---------------------------------------------------------------------------------------------
242203
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
242204
+ * See LICENSE.md in the project root for license terms and full copyright notice.
242205
+ *--------------------------------------------------------------------------------------------*/
242206
+ /** @packageDocumentation
242207
+ * @module Curve
242208
+ */
242209
+
242210
+
242211
+ /**
242212
+ * Algorithmic class for shallow-copying a CurveCollection with each full-sweep arc replaced by two half-sweep arcs.
242213
+ * * Often useful for building graphs from loops.
242214
+ * @internal
242215
+ */
242216
+ class TransferWithSplitArcs extends _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__.CloneCurvesContext {
242217
+ constructor() {
242218
+ super(undefined);
242219
+ }
242220
+ doClone(primitive) {
242221
+ if (primitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_1__.Arc3d && primitive.sweep.isFullCircle) // replace full arc with two half arcs
242222
+ return [primitive.clonePartialCurve(0.0, 0.5), primitive.clonePartialCurve(0.5, 1)];
242223
+ return primitive;
242224
+ }
242225
+ static clone(target) {
242226
+ const context = new TransferWithSplitArcs();
242227
+ target.announceToCurveProcessor(context);
242228
+ return context._result;
242229
+ }
242230
+ }
242231
+
242232
+
242160
242233
  /***/ }),
242161
242234
 
242162
242235
  /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransformInPlaceContext.js":
@@ -329544,7 +329617,7 @@ class TestContext {
329544
329617
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
329545
329618
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
329546
329619
  await core_frontend_1.NoRenderApp.startup({
329547
- applicationVersion: "5.1.0-dev.10",
329620
+ applicationVersion: "5.1.0-dev.13",
329548
329621
  applicationId: this.settings.gprid,
329549
329622
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
329550
329623
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -354612,7 +354685,7 @@ var loadLanguages = instance.loadLanguages;
354612
354685
  /***/ ((module) => {
354613
354686
 
354614
354687
  "use strict";
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"}}');
354688
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.13","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"}}');
354616
354689
 
354617
354690
  /***/ }),
354618
354691