@itwin/ecschema-rpcinterface-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.
@@ -64635,34 +64635,44 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
64635
64635
  * @param name The name of the property to retrieve.
64636
64636
  * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
64637
64637
  */
64638
- async getProperty(name, excludeInherited = false) {
64638
+ async getProperty(name, excludeInherited) {
64639
+ const upperKey = name.toUpperCase();
64640
+ let property;
64639
64641
  if (this._properties) {
64640
- const upperKey = name.toUpperCase();
64641
- const property = this._properties.get(upperKey);
64642
- if (property)
64642
+ property = this._properties.get(upperKey);
64643
+ if (property) {
64643
64644
  return property;
64645
+ }
64644
64646
  }
64645
64647
  if (excludeInherited) {
64646
64648
  return undefined;
64647
64649
  }
64648
- return this.getInheritedProperty(name);
64650
+ if (!this._mergedPropertyCache) {
64651
+ this._mergedPropertyCache = await this.buildPropertyCache();
64652
+ }
64653
+ return this._mergedPropertyCache.get(upperKey);
64649
64654
  }
64650
64655
  /**
64651
64656
  * Searches, case-insensitive, for a local ECProperty with the name provided.
64652
64657
  * @param name The name of the property to retrieve.
64653
64658
  * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
64654
64659
  */
64655
- getPropertySync(name, excludeInherited = false) {
64660
+ getPropertySync(name, excludeInherited) {
64661
+ const upperKey = name.toUpperCase();
64662
+ let property;
64656
64663
  if (this._properties) {
64657
- const upperKey = name.toUpperCase();
64658
- const property = this._properties.get(upperKey);
64659
- if (property)
64664
+ property = this._properties.get(upperKey);
64665
+ if (property) {
64660
64666
  return property;
64667
+ }
64661
64668
  }
64662
64669
  if (excludeInherited) {
64663
64670
  return undefined;
64664
64671
  }
64665
- return this.getInheritedPropertySync(name);
64672
+ if (!this._mergedPropertyCache) {
64673
+ this._mergedPropertyCache = this.buildPropertyCacheSync();
64674
+ }
64675
+ return this._mergedPropertyCache.get(upperKey);
64666
64676
  }
64667
64677
  /**
64668
64678
  * Searches the base class, if one exists, for the property with the name provided.
@@ -64994,69 +65004,51 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
64994
65004
  }
64995
65005
  /**
64996
65006
  *
64997
- * @param target
64998
- * @param existingValues
64999
- * @param propertiesToMerge
65000
- * @param overwriteExisting
65007
+ * @param cache
65008
+ * @returns
65001
65009
  *
65002
65010
  * @internal
65003
65011
  */
65004
- static mergeProperties(target, existingValues, propertiesToMerge, overwriteExisting) {
65005
- for (const property of propertiesToMerge) {
65006
- const upperCaseName = property.name.toUpperCase();
65007
- const existing = existingValues.get(upperCaseName);
65008
- if (existing !== undefined) {
65009
- if (overwriteExisting) {
65010
- target[existing] = property;
65012
+ async buildPropertyCache() {
65013
+ const cache = new Map();
65014
+ const baseClass = await this.baseClass;
65015
+ if (baseClass) {
65016
+ for (const property of await baseClass.getProperties()) {
65017
+ if (!cache.has(property.name.toUpperCase())) {
65018
+ cache.set(property.name.toUpperCase(), property);
65011
65019
  }
65012
65020
  }
65013
- else {
65014
- existingValues.set(upperCaseName, target.length);
65015
- target.push(property);
65016
- }
65017
65021
  }
65018
- }
65019
- /**
65020
- *
65021
- * @param result
65022
- * @param existingValues
65023
- * @returns
65024
- *
65025
- * @internal
65026
- */
65027
- async buildPropertyCache(result, existingValues) {
65028
- if (!existingValues) {
65029
- existingValues = new Map();
65030
- }
65031
- if (this.baseClass) {
65032
- const baseClass = await this.baseClass;
65033
- if (baseClass) {
65034
- ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
65035
- }
65022
+ if (this._properties) {
65023
+ this._properties.forEach(property => {
65024
+ cache.set(property.name.toUpperCase(), property);
65025
+ });
65036
65026
  }
65037
- if (!this._properties)
65038
- return;
65039
- ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
65027
+ return cache;
65040
65028
  }
65041
65029
  /**
65042
65030
  *
65043
- * @param result
65044
- * @param existingValues
65031
+ * @param cache
65045
65032
  * @returns
65046
65033
  *
65047
65034
  * @internal
65048
65035
  */
65049
- buildPropertyCacheSync(result, existingValues) {
65050
- if (!existingValues) {
65051
- existingValues = new Map();
65052
- }
65036
+ buildPropertyCacheSync() {
65037
+ const cache = new Map();
65053
65038
  const baseClass = this.getBaseClassSync();
65054
65039
  if (baseClass) {
65055
- ECClass.mergeProperties(result, existingValues, baseClass.getPropertiesSync(), false);
65040
+ for (const property of baseClass.getPropertiesSync()) {
65041
+ if (!cache.has(property.name.toUpperCase())) {
65042
+ cache.set(property.name.toUpperCase(), property);
65043
+ }
65044
+ }
65056
65045
  }
65057
- if (!this._properties)
65058
- return;
65059
- ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
65046
+ if (this._properties) {
65047
+ this._properties.forEach(property => {
65048
+ cache.set(property.name.toUpperCase(), property);
65049
+ });
65050
+ }
65051
+ return cache;
65060
65052
  }
65061
65053
  /**
65062
65054
  * Clears all caches on this object. This is called implicitly for this class,
@@ -65077,10 +65069,9 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
65077
65069
  return this._properties && this._properties.size > 0 ? this._properties.values() : [];
65078
65070
  }
65079
65071
  if (!this._mergedPropertyCache) {
65080
- this._mergedPropertyCache = [];
65081
- this.buildPropertyCacheSync(this._mergedPropertyCache, undefined);
65072
+ this._mergedPropertyCache = this.buildPropertyCacheSync();
65082
65073
  }
65083
- return this._mergedPropertyCache;
65074
+ return this._mergedPropertyCache.values();
65084
65075
  }
65085
65076
  /**
65086
65077
  * Quick way to check whether this class has any local properties without having to use the iterable
@@ -65701,44 +65692,64 @@ class EntityClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
65701
65692
  }
65702
65693
  /**
65703
65694
  *
65704
- * @param result
65705
- * @param existingValues
65695
+ * @param cache
65696
+ * @returns
65697
+ *
65706
65698
  * @internal
65707
65699
  */
65708
- async buildPropertyCache(result, existingValues) {
65709
- if (!existingValues) {
65710
- existingValues = new Map();
65711
- }
65700
+ async buildPropertyCache() {
65701
+ const cache = new Map();
65712
65702
  const baseClass = await this.baseClass;
65713
65703
  if (baseClass) {
65714
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
65704
+ for (const property of await baseClass.getProperties()) {
65705
+ if (!cache.has(property.name.toUpperCase()))
65706
+ cache.set(property.name.toUpperCase(), property);
65707
+ }
65715
65708
  }
65716
65709
  for (const mixin of this.mixins) {
65717
- const resolvedMixin = await mixin;
65718
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, await resolvedMixin.getProperties(), false);
65710
+ const mixinObj = await mixin;
65711
+ const mixinProps = mixinObj.getPropertiesSync();
65712
+ for (const property of mixinProps) {
65713
+ if (!cache.has(property.name.toUpperCase()))
65714
+ cache.set(property.name.toUpperCase(), property);
65715
+ }
65719
65716
  }
65720
- const localProps = await this.getProperties();
65721
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, localProps, true);
65717
+ const localProps = await this.getProperties(true);
65718
+ if (localProps) {
65719
+ for (const property of localProps) {
65720
+ cache.set(property.name.toUpperCase(), property);
65721
+ }
65722
+ }
65723
+ return cache;
65722
65724
  }
65723
65725
  /**
65724
65726
  *
65725
- * @param result
65726
- * @param existingValues
65727
+ * @param cache
65727
65728
  * @internal
65728
65729
  */
65729
- buildPropertyCacheSync(result, existingValues) {
65730
- if (!existingValues) {
65731
- existingValues = new Map();
65732
- }
65730
+ buildPropertyCacheSync() {
65731
+ const cache = new Map();
65733
65732
  const baseClass = this.getBaseClassSync();
65734
65733
  if (baseClass) {
65735
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, baseClass.getPropertiesSync(), false);
65734
+ Array.from(baseClass.getPropertiesSync()).forEach((property) => {
65735
+ if (!cache.has(property.name.toUpperCase()))
65736
+ cache.set(property.name.toUpperCase(), property);
65737
+ });
65736
65738
  }
65737
65739
  for (const mixin of this.getMixinsSync()) {
65738
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, mixin.getPropertiesSync(), false);
65740
+ const mixinProps = mixin.getPropertiesSync();
65741
+ for (const property of mixinProps) {
65742
+ if (!cache.has(property.name.toUpperCase()))
65743
+ cache.set(property.name.toUpperCase(), property);
65744
+ }
65739
65745
  }
65740
65746
  const localProps = this.getPropertiesSync(true);
65741
- _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass.mergeProperties(result, existingValues, localProps, true);
65747
+ if (localProps) {
65748
+ Array.from(localProps).forEach(property => {
65749
+ cache.set(property.name.toUpperCase(), property);
65750
+ });
65751
+ }
65752
+ return cache;
65742
65753
  }
65743
65754
  /**
65744
65755
  *
@@ -70379,11 +70390,14 @@ __webpack_require__.r(__webpack_exports__);
70379
70390
  * The SchemaLoader object should be held in memory if multiple calls to [[getSchema]] or [[tryGetSchema]]
70380
70391
  * is a possibility, thereby avoiding unnecessary schema retrievals from the function.
70381
70392
  *
70393
+ * Since the development of this class, the IModelDb class has been enhanced to include a schema context.
70394
+ * In most cases, that is sufficient so a SchemaLoader is not needed. This class is likely to be removed in the future.
70395
+ *
70382
70396
  * ** Example **
70383
70397
  * ```ts
70384
70398
  * [[include:IModelSchemas.loadFromDb]]
70385
70399
  * ```
70386
- * @beta Is this concept needed no that backend and frontend will have contexts cached on the iModel?
70400
+ * @beta This will no longer be needed as of 5.0.0 since IModelDb now has a schema context.
70387
70401
  */
70388
70402
  class SchemaLoader {
70389
70403
  _context;
@@ -89385,8 +89399,18 @@ class ViewAttachments {
89385
89399
  get isEmpty() {
89386
89400
  return 0 === this._attachments.length;
89387
89401
  }
89388
- get areAllTileTreesLoaded() {
89389
- return this._attachments.every((x) => x.areAllTileTreesLoaded);
89402
+ areAllTileTreesLoaded(displayedExtents) {
89403
+ return this._attachments.every((x) => {
89404
+ const placement = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Placement2d.fromJSON(x.viewAttachmentProps.placement);
89405
+ const attachmentRange = placement.calculateRange();
89406
+ if (!attachmentRange.intersectsRangeXY(displayedExtents))
89407
+ return true;
89408
+ return x.areAllTileTreesLoaded;
89409
+ });
89410
+ }
89411
+ /** Strictly for testing purposes */
89412
+ areAllAttachmentsLoaded() {
89413
+ return this._attachments.every((attachment) => attachment.areAllTileTreesLoaded);
89390
89414
  }
89391
89415
  discloseTileTrees(trees) {
89392
89416
  for (const attachment of this._attachments)
@@ -89565,7 +89589,19 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
89565
89589
  this._attachments = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._attachments);
89566
89590
  }
89567
89591
  get areAllTileTreesLoaded() {
89568
- return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded);
89592
+ let displayedExtents = this._viewedExtents;
89593
+ const frustum = this.calculateFrustum();
89594
+ if (frustum) {
89595
+ displayedExtents = frustum.toRange();
89596
+ }
89597
+ return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded(displayedExtents));
89598
+ }
89599
+ /** @internal Strictly for testing */
89600
+ areAllAttachmentsLoaded() {
89601
+ if (this._attachments) {
89602
+ return this._attachments.areAllAttachmentsLoaded();
89603
+ }
89604
+ return true;
89569
89605
  }
89570
89606
  /** Create a sheet border decoration graphic. */
89571
89607
  createBorder(width, height, context) {
@@ -141607,6 +141643,10 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
141607
141643
  args.insertMissing(this);
141608
141644
  return this.isParentDisplayable ? SelectParent.Yes : SelectParent.No;
141609
141645
  }
141646
+ clearLayers() {
141647
+ super.clearLayers();
141648
+ this.disposeChildren();
141649
+ }
141610
141650
  }
141611
141651
 
141612
141652
 
@@ -184930,7 +184970,8 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
184930
184970
  knots;
184931
184971
  /** flat array of coordinate data, blocked by poleDimension and row */
184932
184972
  coffs;
184933
- /** Number of components per pole.
184973
+ /**
184974
+ * Number of components per pole.
184934
184975
  * * 3 for conventional xyz surface
184935
184976
  * * 4 for weighted (wx, wy, wz, w) surface.
184936
184977
  */
@@ -204061,7 +204102,7 @@ __webpack_require__.r(__webpack_exports__);
204061
204102
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
204062
204103
  /* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
204063
204104
  /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
204064
- /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
204105
+ /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
204065
204106
  /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
204066
204107
  /*---------------------------------------------------------------------------------------------
204067
204108
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -204138,49 +204179,31 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
204138
204179
  this._activeMomentData = undefined;
204139
204180
  return momentData;
204140
204181
  }
204141
- /** Accumulate integrals from origin to the components of the parity region. */
204142
- handleParityRegion(region) {
204143
- const allChildMoments = [];
204144
- let maxAbsArea = 0.0;
204145
- let largestChildMoments;
204146
- for (const child of region.children) {
204147
- if (child instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
204148
- const childMoments = this.handleLoop(child);
204182
+ handleAnyRegion(region) {
204183
+ const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
204184
+ // guarantee there is no overlapping children
204185
+ const merged = _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionOps.regionBooleanXY(region, undefined, _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionBinaryOpType.Union);
204186
+ if (merged) {
204187
+ for (const child of merged.children) {
204188
+ const childMoments = child.dispatchToGeometryHandler(this);
204149
204189
  if (childMoments) {
204150
- allChildMoments.push(childMoments);
204151
- const q = Math.abs(childMoments.quantitySum);
204152
- if (q > maxAbsArea) {
204153
- maxAbsArea = q;
204154
- largestChildMoments = childMoments;
204155
- }
204190
+ const sign0 = childMoments.signFactor(1.0);
204191
+ summedMoments.accumulateProducts(childMoments, sign0);
204156
204192
  }
204157
204193
  }
204158
204194
  }
204159
- if (largestChildMoments) {
204160
- const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
204161
- const sign0 = largestChildMoments.signFactor(1.0);
204162
- summedMoments.accumulateProducts(largestChildMoments, sign0);
204163
- for (const childMoments of allChildMoments) {
204164
- if (childMoments !== largestChildMoments) {
204165
- const sign1 = childMoments.signFactor(-1.0);
204166
- summedMoments.accumulateProducts(childMoments, sign1);
204167
- }
204168
- }
204169
- return summedMoments;
204195
+ else {
204196
+ return undefined;
204170
204197
  }
204171
- return undefined;
204198
+ return summedMoments;
204199
+ }
204200
+ /** Accumulate integrals from origin to the components of the parity region. */
204201
+ handleParityRegion(region) {
204202
+ return this.handleAnyRegion(region);
204172
204203
  }
204173
204204
  /** Accumulate integrals from origin to the components of the union region. */
204174
204205
  handleUnionRegion(region) {
204175
- const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
204176
- for (const child of region.children) {
204177
- const childMoments = child.dispatchToGeometryHandler(this);
204178
- if (childMoments) {
204179
- const sign0 = childMoments.signFactor(1.0);
204180
- summedMoments.accumulateProducts(childMoments, sign0);
204181
- }
204182
- }
204183
- return summedMoments;
204206
+ return this.handleAnyRegion(region);
204184
204207
  }
204185
204208
  _strokeOptions;
204186
204209
  getStrokeOptions() {
@@ -204238,9 +204261,9 @@ __webpack_require__.r(__webpack_exports__);
204238
204261
  /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
204239
204262
  /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
204240
204263
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
204241
- /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
204264
+ /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
204242
204265
  /* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
204243
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
204266
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
204244
204267
  /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
204245
204268
  /* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
204246
204269
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
@@ -204248,16 +204271,17 @@ __webpack_require__.r(__webpack_exports__);
204248
204271
  /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
204249
204272
  /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
204250
204273
  /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
204251
- /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
204274
+ /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
204252
204275
  /* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
204253
204276
  /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
204254
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
204277
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
204255
204278
  /* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
204256
204279
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
204257
204280
  /* harmony import */ var _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveWireMomentsXYZ */ "../../core/geometry/lib/esm/curve/CurveWireMomentsXYZ.js");
204258
- /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
204281
+ /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
204259
204282
  /* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
204260
204283
  /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
204284
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
204261
204285
  /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
204262
204286
  /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
204263
204287
  /* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
@@ -204313,6 +204337,7 @@ __webpack_require__.r(__webpack_exports__);
204313
204337
 
204314
204338
 
204315
204339
 
204340
+
204316
204341
 
204317
204342
 
204318
204343
  /**
@@ -204562,8 +204587,8 @@ class RegionOps {
204562
204587
  * to connect interior loops to exterior loops.
204563
204588
  */
204564
204589
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
204565
- // Always return UnionRegion for now. But keep return type as AnyRegion:
204566
- // in the future, we might return the *simplest* region type.
204590
+ // Always return UnionRegion for now, but keep return type as AnyRegion.
204591
+ // In the future, we might return the *simplest* region type.
204567
204592
  const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion.create();
204568
204593
  const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union);
204569
204594
  context.addMembers(loopsA, loopsB);
@@ -204907,7 +204932,7 @@ class RegionOps {
204907
204932
  * SignedLoops object.
204908
204933
  * @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
204909
204934
  * primitives.
204910
- * @param tolerance optional distance tolerance for coincidence
204935
+ * @param tolerance optional distance tolerance for coincidence.
204911
204936
  * @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
204912
204937
  * * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
204913
204938
  * positive area and counterclockwise orientation.
@@ -204917,10 +204942,11 @@ class RegionOps {
204917
204942
  * to the edge and a constituent curve in each.
204918
204943
  */
204919
204944
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
204920
- const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
204945
+ let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
204946
+ primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create(...primitives)).children;
204921
204947
  const range = this.curveArrayRange(primitives);
204922
204948
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
204923
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_33__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
204949
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_34__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
204924
204950
  const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
204925
204951
  return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
204926
204952
  }
@@ -204978,12 +205004,12 @@ class RegionOps {
204978
205004
  * @param worldToLocal transform to apply to data before computing its range
204979
205005
  */
204980
205006
  static curveArrayRange(data, worldToLocal) {
204981
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_34__.Range3d.create();
204982
- if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
205007
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__.Range3d.create();
205008
+ if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
204983
205009
  data.extendRange(range, worldToLocal);
204984
205010
  else if (Array.isArray(data)) {
204985
205011
  for (const c of data) {
204986
- if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_35__.GeometryQuery)
205012
+ if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
204987
205013
  c.extendRange(range, worldToLocal);
204988
205014
  else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d)
204989
205015
  range.extendPoint(c, worldToLocal);
@@ -205019,7 +205045,7 @@ class RegionOps {
205019
205045
  for (const polygon of polygons)
205020
205046
  writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(polygon));
205021
205047
  }
205022
- const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_36__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
205048
+ const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
205023
205049
  if (sortedPolygons.length === 1) { // below requires exactly one outer loop!
205024
205050
  if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
205025
205051
  _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
@@ -205104,7 +205130,7 @@ class RegionOps {
205104
205130
  if (!graph)
205105
205131
  return undefined;
205106
205132
  if (options?.maximizeConvexFacets)
205107
- _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
205133
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
205108
205134
  return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph, options);
205109
205135
  }
205110
205136
  /**
@@ -205118,7 +205144,7 @@ class RegionOps {
205118
205144
  if (!graph)
205119
205145
  return undefined;
205120
205146
  if (maximize)
205121
- _topology_Merging__WEBPACK_IMPORTED_MODULE_37__.HalfEdgeGraphOps.expandConvexFaces(graph);
205147
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
205122
205148
  const convexPolygons = [];
205123
205149
  graph.announceFaceLoops((_graph, seed) => {
205124
205150
  if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR))
@@ -205172,24 +205198,25 @@ __webpack_require__.r(__webpack_exports__);
205172
205198
  /* harmony export */ RegionOpsFaceToFaceSearch: () => (/* binding */ RegionOpsFaceToFaceSearch)
205173
205199
  /* harmony export */ });
205174
205200
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
205175
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
205201
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
205176
205202
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
205177
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
205203
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
205178
205204
  /* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
205179
205205
  /* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
205180
205206
  /* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
205181
205207
  /* harmony import */ var _topology_RegularizeFace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../topology/RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
205182
- /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
205183
- /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
205184
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
205208
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
205209
+ /* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
205210
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
205185
205211
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
205186
- /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
205187
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
205212
+ /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
205213
+ /* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
205214
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
205188
205215
  /* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
205189
205216
  /* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
205190
- /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
205217
+ /* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
205191
205218
  /* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
205192
- /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
205219
+ /* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
205193
205220
  /*---------------------------------------------------------------------------------------------
205194
205221
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
205195
205222
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -205216,6 +205243,7 @@ __webpack_require__.r(__webpack_exports__);
205216
205243
 
205217
205244
 
205218
205245
 
205246
+
205219
205247
  /**
205220
205248
  * base class for callbacks during region sweeps.
205221
205249
  * * At start of a component, `startComponent(node)` is called announcing a representative node on the outermost face.
@@ -205532,8 +205560,7 @@ class RegionGroup {
205532
205560
  }
205533
205561
  return range;
205534
205562
  }
205535
- /** Ask if the current _numIn count qualifies as an "in" for this operation type.
205536
- */
205563
+ /** Ask if the current _numIn count qualifies as an "in" for this operation type. */
205537
205564
  getInOut() {
205538
205565
  // UNION is true if one or more members are IN
205539
205566
  if (this.groupOpType === RegionGroupOpType.Union)
@@ -205549,11 +205576,12 @@ class RegionGroup {
205549
205576
  // push new members into the group.
205550
205577
  addMember(data, allowLineSegment = false) {
205551
205578
  if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop || data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_9__.ParityRegion) {
205552
- const cleanerData = data.clone();
205579
+ let cleanerData = data.clone();
205553
205580
  _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.consolidateAdjacentPrimitives(cleanerData);
205581
+ cleanerData = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__.TransferWithSplitArcs.clone(cleanerData);
205554
205582
  this.members.push(new RegionGroupMember(cleanerData, this));
205555
205583
  }
205556
- else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_10__.UnionRegion) {
205584
+ else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
205557
205585
  for (const child of data.children) {
205558
205586
  this.addMember(child);
205559
205587
  }
@@ -205563,7 +205591,7 @@ class RegionGroup {
205563
205591
  this.addMember(item);
205564
205592
  }
205565
205593
  }
205566
- else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
205594
+ else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
205567
205595
  this.members.push(new RegionGroupMember(data, this));
205568
205596
  }
205569
205597
  }
@@ -205580,22 +205608,22 @@ class RegionGroup {
205580
205608
  /**
205581
205609
  * A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
205582
205610
  * * In the binary operation OP (union, intersection, parity, difference), the left and right operands
205583
- * are each a composite union, difference, or parity among multiple inputs, i.e.
205611
+ * are each a composite union, difference, or parity among multiple inputs, i.e.,
205584
205612
  * * (operationA among Ai) OP (operationB among Bi)
205585
205613
  * * where the Ai are one set of regions, being combined by operationA
205586
- * * and the Bi are the another set of regions, being combined by operationB
205587
- * * Each group of Ai and Bi is a `RegionGroup`
205614
+ * * and the Bi are the another set of regions, being combined by operationB.
205615
+ * * Each group of Ai and Bi is a `RegionGroup`.
205588
205616
  * * This is an extremely delicate structure.
205589
205617
  * * Members are public because of the unique variety of queries, but should only be used for queries.
205590
205618
  * * The graph and curves in the booleans are connected by an extended pointer chain:
205591
- * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
205592
- * * (CurveLocationDetail).curve points to a curve
205593
- * * (Curve).parent points to RegionGroupMember
205594
- * * (RegionGroupMember) points to RegionGroup
205595
- * * (RegionGroup) points to RegionBooleanBinaryContext
205596
- * * So..when a graph sweep crosses an edge,
205597
- * * the chain leads to a parity count in the RegionGroupMember
205598
- * * that can change the number of members active in the RegionGroup
205619
+ * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
205620
+ * * (CurveLocationDetail).curve points to a curve.
205621
+ * * (Curve).parent points to RegionGroupMember.
205622
+ * * (RegionGroupMember) points to RegionGroup.
205623
+ * * (RegionGroup) points to RegionBooleanBinaryContext.
205624
+ * * So when a graph sweep crosses an edge
205625
+ * * the chain leads to a parity count in the RegionGroupMember.
205626
+ * * that can change the number of members active in the RegionGroup.
205599
205627
  * * which can change the state of the context.
205600
205628
  * @internal
205601
205629
  */
@@ -205610,7 +205638,7 @@ class RegionBooleanContext {
205610
205638
  this.groupA = new RegionGroup(this, groupTypeA);
205611
205639
  this.groupB = new RegionGroup(this, groupTypeB);
205612
205640
  this.extraGeometry = new RegionGroup(this, RegionGroupOpType.NonBounding);
205613
- this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // it will be revised on can calls.
205641
+ this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // revised in runClassificationSweep
205614
205642
  }
205615
205643
  /**
205616
205644
  * Create a context with both A and B groups empty.
@@ -205629,7 +205657,7 @@ class RegionBooleanContext {
205629
205657
  this.addConnectives();
205630
205658
  }
205631
205659
  _workSegment;
205632
- static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
205660
+ static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
205633
205661
  /**
205634
205662
  * The sweep operations require access to all geometry by edge crossings and face walk.
205635
205663
  * If input loops are non-overlapping, there may be disconnected islands not reachable.
@@ -205644,7 +205672,7 @@ class RegionBooleanContext {
205644
205672
  const rangeAB = rangeA.union(rangeB);
205645
205673
  const areaTol = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYAreaTolerance(rangeAB);
205646
205674
  let margin = 0.1;
205647
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
205675
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
205648
205676
  if (this._workSegment)
205649
205677
  margin *= this._workSegment.point0Ref.distanceXY(this._workSegment.point1Ref); // how much further to extend each bridge ray
205650
205678
  const maxPoints = [];
@@ -205652,7 +205680,7 @@ class RegionBooleanContext {
205652
205680
  const area = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYArea(region);
205653
205681
  if (area === undefined || Math.abs(area) < areaTol)
205654
205682
  return; // avoid bridging trivial faces
205655
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
205683
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
205656
205684
  if (this._workSegment)
205657
205685
  maxPoints.push(this._workSegment.point1Ref);
205658
205686
  };
@@ -205667,17 +205695,17 @@ class RegionBooleanContext {
205667
205695
  }
205668
205696
  }
205669
205697
  }
205670
- const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createZero();
205698
+ const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.createZero();
205671
205699
  for (const p of maxPoints) {
205672
- // Make a line from...
205673
- // 1) exactly the max point of the loops to
205674
- // 2) a point clearly outside the big range
205675
- // If p came from some inner loop this will...
205676
- // 1) create a bridge from the inner loop through any containing loops (always)
205677
- // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
205678
- const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
205679
- const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
205680
- const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
205700
+ // Make a line from
205701
+ // 1) exactly the max point of the loops to
205702
+ // 2) a point clearly outside the big range
205703
+ // If p came from some inner loop this will
205704
+ // 1) create a bridge from the inner loop through any containing loops (always)
205705
+ // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
205706
+ const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
205707
+ const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
205708
+ const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
205681
205709
  this.extraGeometry.addMember(bridgeLine, true);
205682
205710
  }
205683
205711
  }
@@ -205691,7 +205719,7 @@ class RegionBooleanContext {
205691
205719
  */
205692
205720
  annotateAndMergeCurvesInGraph(mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_7__.Geometry.smallMetricDistance) {
205693
205721
  const allPrimitives = [];
205694
- // ASSUME loops have fine-grained types -- no linestrings !!
205722
+ // ASSUME loops have fine-grained types (no linestrings)
205695
205723
  for (const group of [this.groupA, this.groupB, this.extraGeometry]) {
205696
205724
  for (const member of group.members) {
205697
205725
  let k = allPrimitives.length;
@@ -205702,9 +205730,8 @@ class RegionBooleanContext {
205702
205730
  }
205703
205731
  }
205704
205732
  }
205705
- // const range = RegionOps.curveArrayRange(allPrimitives);
205706
- const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_15__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
205707
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
205733
+ const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_16__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
205734
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
205708
205735
  this.graph = graph;
205709
205736
  this.faceAreaFunction = faceAreaFromCurvedEdgeData;
205710
205737
  }
@@ -205795,7 +205822,7 @@ class RegionBooleanContext {
205795
205822
  const data = node.edgeTag;
205796
205823
  if (data instanceof RegionGroupMember)
205797
205824
  return updateRegionGroupMemberState(data);
205798
- if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__.CurveLocationDetail) {
205825
+ if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__.CurveLocationDetail) {
205799
205826
  // We trust that the caller has linked from the graph node to a curve which has a RegionGroupMember as its parent.
205800
205827
  const member = data.curve.parent;
205801
205828
  if (member instanceof RegionGroupMember)
@@ -205850,10 +205877,10 @@ function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
205850
205877
  }
205851
205878
  let areaToChord = 0.0;
205852
205879
  if (detail && detail.curve && detail.hasFraction1) {
205853
- if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
205880
+ if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
205854
205881
  // ah .. nothing to do for a line segment
205855
205882
  }
205856
- else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d) {
205883
+ else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_19__.Arc3d) {
205857
205884
  areaToChord = detail.curve.areaToChordXY(detail.fraction, detail.fraction1);
205858
205885
  }
205859
205886
  }
@@ -212522,6 +212549,52 @@ class SumLengthsContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.Rec
212522
212549
  }
212523
212550
 
212524
212551
 
212552
+ /***/ }),
212553
+
212554
+ /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js":
212555
+ /*!***********************************************************************************!*\
212556
+ !*** ../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js ***!
212557
+ \***********************************************************************************/
212558
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
212559
+
212560
+ "use strict";
212561
+ __webpack_require__.r(__webpack_exports__);
212562
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
212563
+ /* harmony export */ TransferWithSplitArcs: () => (/* binding */ TransferWithSplitArcs)
212564
+ /* harmony export */ });
212565
+ /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
212566
+ /* harmony import */ var _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CloneCurvesContext */ "../../core/geometry/lib/esm/curve/internalContexts/CloneCurvesContext.js");
212567
+ /*---------------------------------------------------------------------------------------------
212568
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
212569
+ * See LICENSE.md in the project root for license terms and full copyright notice.
212570
+ *--------------------------------------------------------------------------------------------*/
212571
+ /** @packageDocumentation
212572
+ * @module Curve
212573
+ */
212574
+
212575
+
212576
+ /**
212577
+ * Algorithmic class for shallow-copying a CurveCollection with each full-sweep arc replaced by two half-sweep arcs.
212578
+ * * Often useful for building graphs from loops.
212579
+ * @internal
212580
+ */
212581
+ class TransferWithSplitArcs extends _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__.CloneCurvesContext {
212582
+ constructor() {
212583
+ super(undefined);
212584
+ }
212585
+ doClone(primitive) {
212586
+ if (primitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_1__.Arc3d && primitive.sweep.isFullCircle) // replace full arc with two half arcs
212587
+ return [primitive.clonePartialCurve(0.0, 0.5), primitive.clonePartialCurve(0.5, 1)];
212588
+ return primitive;
212589
+ }
212590
+ static clone(target) {
212591
+ const context = new TransferWithSplitArcs();
212592
+ target.announceToCurveProcessor(context);
212593
+ return context._result;
212594
+ }
212595
+ }
212596
+
212597
+
212525
212598
  /***/ }),
212526
212599
 
212527
212600
  /***/ "../../core/geometry/lib/esm/curve/internalContexts/TransformInPlaceContext.js":
@@ -312476,7 +312549,7 @@ var loadLanguages = instance.loadLanguages;
312476
312549
  /***/ ((module) => {
312477
312550
 
312478
312551
  "use strict";
312479
- 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"}}');
312552
+ 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"}}');
312480
312553
 
312481
312554
  /***/ })
312482
312555