@itwin/ecschema-rpcinterface-tests 5.14.0-dev.7 → 5.14.0-dev.8

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.
@@ -62394,6 +62394,17 @@ class SchemaCache {
62394
62394
  return entry.schemaInfo;
62395
62395
  return undefined;
62396
62396
  }
62397
+ /**
62398
+ * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
62399
+ * Does not await partially loaded schemas.
62400
+ * @param schemaKey The SchemaKey describing the schema to get from the cache.
62401
+ * @param matchType The match type to use when locating the schema
62402
+ */
62403
+ getSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62404
+ if (this.count === 0)
62405
+ return undefined;
62406
+ return this.findEntry(schemaKey, matchType)?.schemaInfo;
62407
+ }
62397
62408
  /**
62398
62409
  * Gets the schema which matches the provided SchemaKey. If the schema is partially loaded an exception will be thrown.
62399
62410
  * @param schemaKey The SchemaKey describing the schema to get from the cache.
@@ -62591,6 +62602,16 @@ class SchemaContext {
62591
62602
  getCachedSchemaSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62592
62603
  return this._knownSchemas.getSchemaSync(schemaKey, matchType);
62593
62604
  }
62605
+ /**
62606
+ * Attempts to get a SchemaInfo from the context's cache.
62607
+ * Returns the info even if the schema is only partially loaded.
62608
+ * @param schemaKey The SchemaKey to identify the Schema.
62609
+ * @param matchType The SchemaMatch type to use. Default is SchemaMatchType.Latest.
62610
+ * @internal
62611
+ */
62612
+ getCachedSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62613
+ return this._knownSchemas.getSchemaInfoSync(schemaKey, matchType);
62614
+ }
62594
62615
  async getSchemaItem(schemaNameOrKey, itemNameOrCtor, itemConstructor) {
62595
62616
  let schemaKey;
62596
62617
  if (typeof schemaNameOrKey === "string") {
@@ -62866,11 +62887,25 @@ class SchemaReadHelper {
62866
62887
  }
62867
62888
  this._schemaInfo = schemaInfo;
62868
62889
  // Need to add this schema to the context to be able to locate schemaItems within the context.
62869
- if (addSchemaToCache && !this._context.schemaExists(schema.schemaKey)) {
62870
- await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
62890
+ if (addSchemaToCache) {
62891
+ this.checkForReadVersionConflict(schema.schemaKey);
62892
+ if (!this._context.schemaExists(schema.schemaKey))
62893
+ await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
62871
62894
  }
62872
62895
  return schemaInfo;
62873
62896
  }
62897
+ /**
62898
+ * Two read-incompatible versions of the same schema can never substitute for one another.
62899
+ * Detect it here and fail with a clear error.
62900
+ * @param schemaKey The exact key of the schema about to be loaded into the context.
62901
+ */
62902
+ checkForReadVersionConflict(schemaKey) {
62903
+ const existingInfo = this._context.getCachedSchemaInfoSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaKey.name), _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
62904
+ if (existingInfo && existingInfo.schemaKey.readVersion !== schemaKey.readVersion) {
62905
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.DuplicateSchema, `The schema '${schemaKey.toString(true)}' cannot be loaded: the read-incompatible version '${existingInfo.schemaKey.toString(true)}' is already loaded in this context. ` +
62906
+ `A schema graph cannot require two read-incompatible versions of the same schema.`);
62907
+ }
62908
+ }
62874
62909
  /**
62875
62910
  * Populates the given Schema from a serialized representation.
62876
62911
  * @param schema The Schema to populate
@@ -62892,7 +62927,7 @@ class SchemaReadHelper {
62892
62927
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
62893
62928
  return loadedSchema;
62894
62929
  }
62895
- const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
62930
+ const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestReadCompatible);
62896
62931
  if (undefined === cachedSchema)
62897
62932
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
62898
62933
  return cachedSchema;
@@ -62944,6 +62979,7 @@ class SchemaReadHelper {
62944
62979
  schema.fromJSONSync(this._parser.parseSchema());
62945
62980
  this._schema = schema;
62946
62981
  // Need to add this schema to the context to be able to locate schemaItems within the context.
62982
+ this.checkForReadVersionConflict(schema.schemaKey);
62947
62983
  if (!this._context.schemaExists(schema.schemaKey))
62948
62984
  this._context.addSchemaSync(schema);
62949
62985
  // Load schema references first
@@ -195147,15 +195183,18 @@ __webpack_require__.r(__webpack_exports__);
195147
195183
 
195148
195184
 
195149
195185
  /**
195150
- * fitPoints and end condition data for [[AkimaCurve3d]]
195186
+ * Data for an [[AkimaCurve3d]]
195151
195187
  * * This is a "typed object" version of the serializer-friendly [[AkimaCurve3dProps]]
195152
- * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.
195153
195188
  * @public
195154
195189
  */
195155
195190
  class AkimaCurve3dOptions {
195191
+ /**
195192
+ * Points that the curve must pass through.
195193
+ * * Traditional DGN-style Akima curves interpret the first two and last two fit points as end tangent conditions,
195194
+ * however as the current implementation uses another interpolation algorithm, there is no such interpretation here.
195195
+ */
195156
195196
  fitPoints;
195157
195197
  /**
195158
- *
195159
195198
  * @param fitPoints points to CAPTURE
195160
195199
  * @param knots array to CAPTURE
195161
195200
  */
@@ -195166,7 +195205,7 @@ class AkimaCurve3dOptions {
195166
195205
  * First and last 2 points are "beyond the end" for control of end slope.
195167
195206
  fitPoints: Point3d[];
195168
195207
 
195169
- /** Clone with strongly typed members reduced to simple json. */
195208
+ /** Clone with strongly typed members reduced to simple json. */
195170
195209
  cloneAsAkimaCurve3dProps() {
195171
195210
  const props = {
195172
195211
  fitPoints: _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),
@@ -195183,24 +195222,25 @@ class AkimaCurve3dOptions {
195183
195222
  const result = new AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(source.fitPoints));
195184
195223
  return result;
195185
195224
  }
195225
+ /** Whether the two options are equivalent or both undefined. */
195186
195226
  static areAlmostEqual(dataA, dataB) {
195187
195227
  if (dataA === undefined && dataB === undefined)
195188
195228
  return true;
195189
- if (dataA !== undefined && dataB !== undefined) {
195229
+ if (dataA !== undefined && dataB !== undefined)
195190
195230
  return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a, b) => a.isAlmostEqual(b));
195191
- }
195192
195231
  return false;
195193
195232
  }
195194
195233
  }
195195
195234
  /**
195196
- * Interpolating curve.
195235
+ * Interpolating curve using the Akima formulation.
195197
195236
  * * Derive from [[ProxyCurve]]
195198
195237
  * * Use a [[BSplineCurve3d]] as the proxy
195199
- * *
195238
+ * * Currently the Akima formulation is replaced with a Greville interpolation.
195200
195239
  * @public
195201
195240
  */
195202
195241
  class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyCurve {
195203
- curvePrimitiveType = "interpolationCurve";
195242
+ /** String name for schema properties. */
195243
+ curvePrimitiveType = "akimaCurve";
195204
195244
  _options;
195205
195245
  /** CAPTURE properties and proxy curve. */
195206
195246
  constructor(properties, proxyCurve) {
@@ -195215,9 +195255,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195215
195255
  return result;
195216
195256
  }
195217
195257
  /**
195218
- * Create an [[AkimaCurve3d]] based on points, knots, and other properties in the [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
195258
+ * Create an [[AkimaCurve3d]] based on an [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
195219
195259
  * * This saves a COPY OF the options or props.
195220
- * * Use createCapture () if the options or props can be used without copy
195260
+ * * Use createCapture() if the options or props can be used without copy
195221
195261
  */
195222
195262
  static create(options) {
195223
195263
  let optionsCopy;
@@ -195270,11 +195310,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195270
195310
  * Transform this [[AkimaCurve3d]] and its defining data in place
195271
195311
  */
195272
195312
  tryTransformInPlace(transform) {
195273
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
195274
- if (proxyOk) {
195275
- transform.multiplyPoint3dArray(this._options.fitPoints);
195276
- }
195277
- return proxyOk;
195313
+ this._proxyCurve.tryTransformInPlace(transform);
195314
+ transform.multiplyPoint3dArray(this._options.fitPoints);
195315
+ return true; // we know this succeeds
195278
195316
  }
195279
195317
  /**
195280
195318
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -195296,6 +195334,7 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195296
195334
  }
195297
195335
  /** Test if `other` is also an [[AkimaCurve3d]] */
195298
195336
  isSameGeometryClass(other) { return other instanceof AkimaCurve3d; }
195337
+ /** Test if this [[AkimaCurve3d]] is almost equal to another GeometryQuery object. */
195299
195338
  isAlmostEqual(other) {
195300
195339
  if (other instanceof AkimaCurve3d) {
195301
195340
  return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -196200,10 +196239,11 @@ class BSplineCurve3d extends BSplineCurve3dBase {
196200
196239
  }
196201
196240
  /**
196202
196241
  * Create a B-spline curve from an Akima curve.
196203
- * @param options collection of points and end conditions.
196242
+ * * The Akima formulation of the curve is currently replaced by a Greville interpolation.
196243
+ * @param options data for construction
196204
196244
  */
196205
196245
  static createFromAkimaCurve3dOptions(options) {
196206
- return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary
196246
+ return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4);
196207
196247
  }
196208
196248
  /**
196209
196249
  * Create a B-spline curve with given knots.
@@ -200240,8 +200280,7 @@ class InterpolationCurve3dOptions {
200240
200280
  result._endTangent = source.endTangent ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.fromJSON(source.endTangent) : undefined;
200241
200281
  return result;
200242
200282
  }
200243
- // ugh.
200244
- // vector equality test with awkward rule that 000 matches undefined.
200283
+ /** Vector equality test, with the additional rule that the zero vector matches undefined. */
200245
200284
  static areAlmostEqualAllow000AsUndefined(a, b) {
200246
200285
  if (a !== undefined && a.maxAbs() === 0)
200247
200286
  a = undefined;
@@ -200251,6 +200290,7 @@ class InterpolationCurve3dOptions {
200251
200290
  return a.isAlmostEqual(b);
200252
200291
  return a === undefined && b === undefined;
200253
200292
  }
200293
+ /** Whether the two options are equivalent or both undefined. */
200254
200294
  static areAlmostEqual(dataA, dataB) {
200255
200295
  if (dataA === undefined && dataB === undefined)
200256
200296
  return true;
@@ -200299,6 +200339,7 @@ class InterpolationCurve3dOptions {
200299
200339
  * @public
200300
200340
  */
200301
200341
  class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1__.ProxyCurve {
200342
+ /** String name for schema properties. */
200302
200343
  curvePrimitiveType = "interpolationCurve";
200303
200344
  _options;
200304
200345
  /** CAPTURE properties and proxy curve. */
@@ -200371,15 +200412,13 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
200371
200412
  * Transform this [[InterpolationCurve3d]] and its defining data in place
200372
200413
  */
200373
200414
  tryTransformInPlace(transform) {
200374
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
200375
- if (proxyOk) {
200376
- transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
200377
- if (this._options.startTangent)
200378
- transform.multiplyVectorInPlace(this._options.startTangent);
200379
- if (this._options.endTangent)
200380
- transform.multiplyVectorInPlace(this._options.endTangent);
200381
- }
200382
- return proxyOk;
200415
+ this._proxyCurve.tryTransformInPlace(transform);
200416
+ transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
200417
+ if (this._options.startTangent)
200418
+ transform.multiplyVectorInPlace(this._options.startTangent);
200419
+ if (this._options.endTangent)
200420
+ transform.multiplyVectorInPlace(this._options.endTangent);
200421
+ return true; // we know this succeeds
200383
200422
  }
200384
200423
  /**
200385
200424
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -200399,6 +200438,7 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
200399
200438
  cloneTransformed(transform) {
200400
200439
  return super.cloneTransformed(transform);
200401
200440
  }
200441
+ /** Test if this [[InterpolationCurve3d]] is almost equal to another GeometryQuery object. */
200402
200442
  isAlmostEqual(other) {
200403
200443
  if (other instanceof InterpolationCurve3d) {
200404
200444
  return InterpolationCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -203847,8 +203887,6 @@ class ClipUtilities {
203847
203887
  if (!worldToLocal)
203848
203888
  return result;
203849
203889
  const localRegion = region.cloneTransformed(worldToLocal); // parallel to xy-plane so we can ignore z
203850
- if (!localRegion)
203851
- return result;
203852
203890
  // We can only clip convex polygons with our clipper machinery, but the input region doesn't have to be
203853
203891
  // convex or even a polygon. We get around this limitation by using a Boolean operation, which admits
203854
203892
  // *any* planar regions, albeit in local coordinates. First, we clip a rectangle that covers the input region
@@ -209484,10 +209522,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209484
209522
  * @param options how finely to stroke the path to create the distance index
209485
209523
  */
209486
209524
  cloneTransformed(transform, options) {
209487
- const c = this._path.clone();
209488
- if (c.tryTransformInPlace(transform))
209489
- return CurveChainWithDistanceIndex.createCapture(c, options);
209490
- return undefined;
209525
+ return CurveChainWithDistanceIndex.createCapture(this._path.cloneTransformed(transform), options);
209491
209526
  }
209492
209527
  /**
209493
209528
  * Reference to the contained path.
@@ -209508,8 +209543,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209508
209543
  * @param options how finely to stroke the path to create the distance index
209509
209544
  */
209510
209545
  clone(options) {
209511
- const c = this._path.clone();
209512
- return CurveChainWithDistanceIndex.createCapture(c, options);
209546
+ return CurveChainWithDistanceIndex.createCapture(this._path.clone(), options);
209513
209547
  }
209514
209548
  /**
209515
209549
  * Return a portion of this curve with its own distance index.
@@ -209687,15 +209721,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209687
209721
  * @return cloned flattened CurveChain, or reference to the input chain if no nesting
209688
209722
  */
209689
209723
  static flattenNestedChains(chain) {
209690
- if (-1 === chain.children.findIndex((child) => { return child instanceof CurveChainWithDistanceIndex; }))
209724
+ if (-1 === chain.children.findIndex((c) => c instanceof CurveChainWithDistanceIndex))
209691
209725
  return chain;
209692
209726
  const flatChain = chain.clone();
209693
- const flatChildren = flatChain.children.flatMap((child) => {
209694
- if (child instanceof CurveChainWithDistanceIndex)
209695
- return child.path.children;
209696
- else
209697
- return [child];
209698
- });
209727
+ const flatChildren = flatChain.children.flatMap((c) => c instanceof CurveChainWithDistanceIndex ? c.path.children : c);
209699
209728
  flatChain.children.splice(0, Infinity, ...flatChildren);
209700
209729
  return flatChain;
209701
209730
  }
@@ -209876,18 +209905,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209876
209905
  return result;
209877
209906
  }
209878
209907
  /**
209879
- * Attempt to transform in place.
209880
- * * Warning: If any child transform fails, `this` object becomes invalid but that should never happen.
209881
- * @param transform the transform to be applied.
209882
- * @returns true if all of child transforms succeed and false otherwise.
209908
+ * Transform the chain in place.
209909
+ * * Does NOT recompute the distance index.
209910
+ * * For best results, use a rigid transform. Otherwise, it is better to call [[cloneTransformed]] so that the
209911
+ * distance index is recomputed.
209883
209912
  */
209884
209913
  tryTransformInPlace(transform) {
209885
- let numFail = 0;
209886
- for (const c of this._path.children) {
209887
- if (!c.tryTransformInPlace(transform))
209888
- numFail++;
209889
- }
209890
- return numFail === 0;
209914
+ return this._path.tryTransformInPlace(transform);
209891
209915
  }
209892
209916
  /** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
209893
209917
  reverseInPlace() {
@@ -210190,8 +210214,6 @@ __webpack_require__.r(__webpack_exports__);
210190
210214
  class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.GeometryQuery {
210191
210215
  /** String name for schema properties */
210192
210216
  geometryCategory = "curveCollection";
210193
- /** Flag for inner loop status. Only used by `Loop`. */
210194
- isInner = false;
210195
210217
  /** Return the sum of the lengths of all contained curves. */
210196
210218
  sumLengths() {
210197
210219
  return _internalContexts_SumLengthsContext__WEBPACK_IMPORTED_MODULE_13__.SumLengthsContext.sumLengths(this);
@@ -210599,6 +210621,18 @@ class CurveChain extends CurveCollection {
210599
210621
  }
210600
210622
  return undefined;
210601
210623
  }
210624
+ /** Return a deep copy. */
210625
+ clone() {
210626
+ return super.clone();
210627
+ }
210628
+ /** Create a deep copy of transformed curves. */
210629
+ cloneTransformed(transform) {
210630
+ return super.cloneTransformed(transform);
210631
+ }
210632
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
210633
+ cloneWithExpandedLineStrings() {
210634
+ return super.cloneWithExpandedLineStrings();
210635
+ }
210602
210636
  /**
210603
210637
  * Add a child curve.
210604
210638
  * @param child curve to add to the chain. The curve is captured by this instance.
@@ -210729,6 +210763,18 @@ class BagOfCurves extends CurveCollection {
210729
210763
  cloneEmptyPeer() {
210730
210764
  return new BagOfCurves();
210731
210765
  }
210766
+ /** Return a deep copy. */
210767
+ clone() {
210768
+ return super.clone();
210769
+ }
210770
+ /** Create a deep copy of transformed curves. */
210771
+ cloneTransformed(transform) {
210772
+ return super.cloneTransformed(transform);
210773
+ }
210774
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
210775
+ cloneWithExpandedLineStrings() {
210776
+ return super.cloneWithExpandedLineStrings();
210777
+ }
210732
210778
  /** Add a child */
210733
210779
  tryAddChild(child) {
210734
210780
  if (child)
@@ -211720,11 +211766,10 @@ class CurveFactory {
211720
211766
  // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.
211721
211767
  const toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidHeadsUp(planeNormal).transpose();
211722
211768
  const projection = closedCurve.cloneTransformed(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createOriginAndMatrix(undefined, toLocal));
211723
- if (projection) { // now we can ignore z-coords
211724
- const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
211725
- if (areaXY && areaXY < 0)
211726
- curve.reverseInPlace();
211727
- }
211769
+ // now we can ignore z-coords
211770
+ const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
211771
+ if (areaXY && areaXY < 0)
211772
+ curve.reverseInPlace();
211728
211773
  }
211729
211774
  }
211730
211775
  /**
@@ -212883,9 +212928,9 @@ __webpack_require__.r(__webpack_exports__);
212883
212928
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
212884
212929
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
212885
212930
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
212886
- /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
212887
- /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
212888
- /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
212931
+ /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
212932
+ /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
212933
+ /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
212889
212934
  /* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
212890
212935
  /*---------------------------------------------------------------------------------------------
212891
212936
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -213304,7 +213349,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213304
213349
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
213305
213350
  */
213306
213351
  closestPoint(spacePoint, extend = false, result) {
213307
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result);
213352
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result);
213308
213353
  this.emitStrokableParts(strokeHandler);
213309
213354
  return strokeHandler.claimResult();
213310
213355
  }
@@ -213320,7 +213365,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213320
213365
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
213321
213366
  */
213322
213367
  closestPointXY(spacePoint, extend = false, result) {
213323
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
213368
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
213324
213369
  this.emitStrokableParts(strokeHandler);
213325
213370
  return strokeHandler.claimResult();
213326
213371
  }
@@ -213336,7 +213381,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213336
213381
  * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
213337
213382
  */
213338
213383
  emitTangents(spacePoint, announceTangent, options) {
213339
- const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
213384
+ const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
213340
213385
  this.emitStrokableParts(strokeHandler, options?.strokeOptions);
213341
213386
  }
213342
213387
  /**
@@ -213431,7 +213476,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213431
213476
  * @returns Return the number of CurveLocationDetail's added to the result array.
213432
213477
  */
213433
213478
  appendPlaneIntersectionPoints(plane, result) {
213434
- const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AppendPlaneIntersectionStrokeHandler(plane, result);
213479
+ const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
213435
213480
  const n0 = result.length;
213436
213481
  this.emitStrokableParts(strokeHandler);
213437
213482
  return result.length - n0;
@@ -213629,6 +213674,13 @@ __webpack_require__.r(__webpack_exports__);
213629
213674
  /* harmony export */ RecursiveCurveProcessorWithStack: () => (/* binding */ RecursiveCurveProcessorWithStack)
213630
213675
  /* harmony export */ });
213631
213676
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
213677
+ /*---------------------------------------------------------------------------------------------
213678
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
213679
+ * See LICENSE.md in the project root for license terms and full copyright notice.
213680
+ *--------------------------------------------------------------------------------------------*/
213681
+ /** @packageDocumentation
213682
+ * @module Curve
213683
+ */
213632
213684
 
213633
213685
  /** base class for detailed traversal of curve artifacts.
213634
213686
  * * This recurses to children in the quickest way (no records of path)
@@ -213664,7 +213716,10 @@ class RecursiveCurveProcessor {
213664
213716
  announceUnionRegion(data, _indexInParent = -1) {
213665
213717
  let i = 0;
213666
213718
  for (const child of data.children) {
213667
- child.announceToCurveProcessor(this, i++);
213719
+ if (child.curveCollectionType === "loop")
213720
+ this.announceLoop(child, i++);
213721
+ else
213722
+ this.announceParityRegion(child, i++);
213668
213723
  }
213669
213724
  }
213670
213725
  /** announce a bag of curves.
@@ -213726,9 +213781,15 @@ class RecursiveCurveProcessorWithStack extends RecursiveCurveProcessor {
213726
213781
  this.leave();
213727
213782
  }
213728
213783
  /** announce beginning or end of a parity region */
213729
- announceUnionRegion(data, indexInParent = -1) {
213784
+ announceUnionRegion(data, _indexInParent = -1) {
213730
213785
  this.enter(data);
213731
- super.announceUnionRegion(data, indexInParent);
213786
+ let i = 0;
213787
+ for (const child of data.children) {
213788
+ if (child.curveCollectionType === "loop")
213789
+ this.announceLoop(child, i++);
213790
+ else
213791
+ this.announceParityRegion(child, i++);
213792
+ }
213732
213793
  this.leave();
213733
213794
  }
213734
213795
  /**
@@ -214334,7 +214395,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__.CurveP
214334
214395
  this._point0 = this._point1;
214335
214396
  this._point1 = a;
214336
214397
  }
214337
- /** Transform the two endpoints of this LinSegment. */
214398
+ /** Transform the two endpoints of this line segment. */
214338
214399
  tryTransformInPlace(transform) {
214339
214400
  this._point0 = transform.multiplyPoint3d(this._point0, this._point0);
214340
214401
  this._point1 = transform.multiplyPoint3d(this._point1, this._point1);
@@ -216149,12 +216210,19 @@ __webpack_require__.r(__webpack_exports__);
216149
216210
  class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
216150
216211
  /** String name for schema properties */
216151
216212
  curveCollectionType = "loop";
216152
- /** Tag value that can be set to true for user code to mark inner and outer loops. */
216213
+ /**
216214
+ * Flag for inner loop status (default value is `false`).
216215
+ * * Typical usage is to set to `true` on hole `Loop`s in a `ParityRegion` to distinguish them from the outer `Loop`.
216216
+ * * This property is only set by the user, and does not affect region processing.
216217
+ * * This property is propagated through [[clone]] and JSON/FlatBuffer de/serialization.
216218
+ * * For best de/serialization results, avoid setting to `false` on multiple `Loop`s of a `ParityRegion`.
216219
+ */
216153
216220
  isInner = false;
216154
216221
  /** Test if `other` is a `Loop` */
216155
216222
  isSameGeometryClass(other) {
216156
216223
  return other instanceof Loop;
216157
216224
  }
216225
+ /** Construct an empty loop. */
216158
216226
  constructor() {
216159
216227
  super();
216160
216228
  }
@@ -216224,10 +216292,28 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
216224
216292
  emptyClone.isInner = this.isInner;
216225
216293
  return emptyClone;
216226
216294
  }
216295
+ /** Return a deep copy. */
216296
+ clone() {
216297
+ return super.clone();
216298
+ }
216299
+ /** Create a deep copy of transformed curves. */
216300
+ cloneTransformed(transform) {
216301
+ return super.cloneTransformed(transform);
216302
+ }
216303
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216304
+ cloneWithExpandedLineStrings() {
216305
+ return super.cloneWithExpandedLineStrings();
216306
+ }
216227
216307
  /** Second step of double dispatch: call `handler.handleLoop(this)` */
216228
216308
  dispatchToGeometryHandler(handler) {
216229
216309
  return handler.handleLoop(this);
216230
216310
  }
216311
+ /** Test for near equality */
216312
+ isAlmostEqual(other) {
216313
+ if (!super.isAlmostEqual(other))
216314
+ return false;
216315
+ return this.isInner === other.isInner;
216316
+ }
216231
216317
  }
216232
216318
  /**
216233
216319
  * Structure carrying a pair of loops with curve geometry.
@@ -216535,14 +216621,15 @@ class ParityRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCo
216535
216621
  }
216536
216622
  /** Return a deep copy. */
216537
216623
  clone() {
216538
- const clone = new ParityRegion();
216539
- let child;
216540
- for (child of this.children) {
216541
- const childClone = child.clone();
216542
- if (childClone instanceof _Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
216543
- clone.children.push(childClone);
216544
- }
216545
- return clone;
216624
+ return super.clone();
216625
+ }
216626
+ /** Create a deep copy of transformed curves. */
216627
+ cloneTransformed(transform) {
216628
+ return super.cloneTransformed(transform);
216629
+ }
216630
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216631
+ cloneWithExpandedLineStrings() {
216632
+ return super.cloneWithExpandedLineStrings();
216546
216633
  }
216547
216634
  /** Stroke these curves into a new ParityRegion. */
216548
216635
  cloneStroked(options) {
@@ -216671,6 +216758,18 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_2__.CurveChain {
216671
216758
  cloneEmptyPeer() {
216672
216759
  return new Path();
216673
216760
  }
216761
+ /** Return a deep copy. */
216762
+ clone() {
216763
+ return super.clone();
216764
+ }
216765
+ /** Create a deep copy of transformed curves. */
216766
+ cloneTransformed(transform) {
216767
+ return super.cloneTransformed(transform);
216768
+ }
216769
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216770
+ cloneWithExpandedLineStrings() {
216771
+ return super.cloneWithExpandedLineStrings();
216772
+ }
216674
216773
  /** Second step of double dispatch: call `handler.handlePath(this)` */
216675
216774
  dispatchToGeometryHandler(handler) {
216676
216775
  return handler.handlePath(this);
@@ -216946,9 +217045,8 @@ class ProxyCurve extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.Curv
216946
217045
  /** Return a transformed clone. */
216947
217046
  cloneTransformed(transform) {
216948
217047
  const myClone = this.clone();
216949
- if (myClone.tryTransformInPlace(transform))
216950
- return myClone;
216951
- return undefined;
217048
+ myClone.tryTransformInPlace(transform);
217049
+ return myClone;
216952
217050
  }
216953
217051
  /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */
216954
217052
  clonePartialCurve(fractionA, fractionB) {
@@ -219017,8 +219115,6 @@ class RegionOps {
219017
219115
  const worldToLocal = localToWorld.inverse();
219018
219116
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(worldToLocal !== undefined, "FrameBuilder's transform is invertible");
219019
219117
  regionXY = region.cloneTransformed(worldToLocal);
219020
- if (!regionXY)
219021
- return undefined;
219022
219118
  }
219023
219119
  const momentData = RegionOps.computeXYAreaMoments(regionXY);
219024
219120
  if (!momentData)
@@ -221247,6 +221343,18 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
221247
221343
  cloneEmptyPeer() {
221248
221344
  return new UnionRegion();
221249
221345
  }
221346
+ /** Return a deep copy. */
221347
+ clone() {
221348
+ return super.clone();
221349
+ }
221350
+ /** Create a deep copy of transformed curves. */
221351
+ cloneTransformed(transform) {
221352
+ return super.cloneTransformed(transform);
221353
+ }
221354
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
221355
+ cloneWithExpandedLineStrings() {
221356
+ return super.cloneWithExpandedLineStrings();
221357
+ }
221250
221358
  /**
221251
221359
  * Try to add a child (by capturing it).
221252
221360
  * * Returns false if the `AnyCurve` child is not a region type.
@@ -221859,6 +221967,7 @@ __webpack_require__.r(__webpack_exports__);
221859
221967
  * Algorithmic class for cloning curve collections.
221860
221968
  * * recurse through collection nodes, building image nodes as needed and inserting clones of children.
221861
221969
  * * for individual primitive, invoke doClone (protected) for direct clone; insert into parent
221970
+ * @internal
221862
221971
  */
221863
221972
  class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessorWithStack {
221864
221973
  _result;
@@ -221897,7 +222006,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
221897
222006
  const c = this.doClone(primitive);
221898
222007
  if (c !== undefined && this._stack.length > 0) {
221899
222008
  const parent = this._stack[this._stack.length - 1];
221900
- if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves)
222009
+ if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves) {
221901
222010
  if (Array.isArray(c)) {
221902
222011
  for (const c1 of c) {
221903
222012
  parent.tryAddChild(c1);
@@ -221906,6 +222015,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
221906
222015
  else {
221907
222016
  parent.tryAddChild(c);
221908
222017
  }
222018
+ }
221909
222019
  }
221910
222020
  }
221911
222021
  }
@@ -227733,26 +227843,34 @@ __webpack_require__.r(__webpack_exports__);
227733
227843
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
227734
227844
  /* harmony export */ TransformInPlaceContext: () => (/* binding */ TransformInPlaceContext)
227735
227845
  /* harmony export */ });
227736
- /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
227846
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
227847
+ /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
227848
+ /*---------------------------------------------------------------------------------------------
227849
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
227850
+ * See LICENSE.md in the project root for license terms and full copyright notice.
227851
+ *--------------------------------------------------------------------------------------------*/
227852
+ /** @packageDocumentation
227853
+ * @module Curve
227854
+ */
227737
227855
 
227738
- /** Algorithmic class: Transform curves in place.
227856
+
227857
+ /** Algorithmic class: Transform curves in place. Always expected to succeed.
227739
227858
  * @internal
227740
227859
  */
227741
- class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.RecursiveCurveProcessor {
227742
- numFail;
227743
- numOK;
227860
+ class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessor {
227744
227861
  transform;
227745
- constructor(transform) { super(); this.numFail = 0; this.numOK = 0; this.transform = transform; }
227862
+ constructor(transform) {
227863
+ super();
227864
+ this.transform = transform;
227865
+ }
227746
227866
  static tryTransformInPlace(target, transform) {
227747
227867
  const context = new TransformInPlaceContext(transform);
227748
227868
  target.announceToCurveProcessor(context);
227749
- return context.numFail === 0;
227869
+ return true;
227750
227870
  }
227751
227871
  announceCurvePrimitive(curvePrimitive, _indexInParent) {
227752
227872
  if (!curvePrimitive.tryTransformInPlace(this.transform))
227753
- this.numFail++;
227754
- else
227755
- this.numOK++;
227873
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "TransformInPlaceContext: unexpected failure of tryTransformInPlace");
227756
227874
  }
227757
227875
  }
227758
227876
 
@@ -231188,9 +231306,12 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_13__.T
231188
231306
  clone() {
231189
231307
  return new DirectSpiral3d(this.localToWorld.clone(), this._spiralType, this.designProperties?.clone(), this._nominalL1, this._nominalR1, this._activeFractionInterval?.clone(), this._evaluator.clone());
231190
231308
  }
231191
- /** Apply `transform` to this spiral's local to world transform. */
231192
- tryTransformInPlace(transformA) {
231193
- const rigidData = this.applyRigidPartOfTransform(transformA);
231309
+ /**
231310
+ * Apply `transform` to this spiral's local to world transform.
231311
+ * * Only the rigid part of the transform is applied.
231312
+ */
231313
+ tryTransformInPlace(transform) {
231314
+ const rigidData = this.applyRigidPartOfTransform(transform);
231194
231315
  if (rigidData !== undefined) {
231195
231316
  this._nominalL1 *= rigidData.scale;
231196
231317
  this._nominalR1 *= rigidData.scale;
@@ -231595,9 +231716,12 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15
231595
231716
  clone() {
231596
231717
  return new IntegratedSpiral3d(this._spiralType, this._evaluator, this.radius01.clone(), this.bearing01.clone(), this.activeFractionInterval.clone(), this.localToWorld.clone(), this._arcLength01, this._designProperties?.clone());
231597
231718
  }
231598
- /** Apply `transform` to this spiral's local to world transform. */
231599
- tryTransformInPlace(transformA) {
231600
- const rigidData = this.applyRigidPartOfTransform(transformA);
231719
+ /**
231720
+ * Apply `transform` to this spiral's local to world transform.
231721
+ * * Only the rigid part of the transform is applied.
231722
+ */
231723
+ tryTransformInPlace(transform) {
231724
+ const rigidData = this.applyRigidPartOfTransform(transform);
231601
231725
  if (rigidData !== undefined) {
231602
231726
  this._curvature01.x0 /= rigidData.scale;
231603
231727
  this._curvature01.x1 /= rigidData.scale;
@@ -282545,8 +282669,11 @@ function nullToUndefined(data) {
282545
282669
  function createTypedCurveCollection(collectionType) {
282546
282670
  if (collectionType === 1)
282547
282671
  return new _curve_Path__WEBPACK_IMPORTED_MODULE_14__.Path();
282548
- if (collectionType === 2 || collectionType === 3)
282549
- return new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
282672
+ if (collectionType === 2 || collectionType === 3) {
282673
+ const loop = new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
282674
+ loop.isInner = collectionType === 3;
282675
+ return loop;
282676
+ }
282550
282677
  if (collectionType === 4)
282551
282678
  return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_13__.ParityRegion();
282552
282679
  if (collectionType === 5)
@@ -282780,9 +282907,8 @@ class BGFBWriter {
282780
282907
  let cvType = 0;
282781
282908
  if (cv instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path)
282782
282909
  cvType = 1;
282783
- else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop) {
282910
+ else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
282784
282911
  cvType = cv.isInner ? 3 : 2;
282785
- }
282786
282912
  else if (cv instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion)
282787
282913
  cvType = 4;
282788
282914
  else if (cv instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_21__.UnionRegion)
@@ -283988,16 +284114,17 @@ var IModelJson;
283988
284114
  return undefined;
283989
284115
  }
283990
284116
  /** parse contents of a curve collection to a CurveCollection instance */
283991
- static parseCurveCollectionMembers(result, data) {
283992
- if (data && Array.isArray(data)) {
283993
- for (const c of data) {
283994
- const g = Reader.parse(c);
283995
- if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
283996
- result.tryAddChild(g);
283997
- }
283998
- return result;
284117
+ static parseCurveCollectionMembers(result, data, isInner = false) {
284118
+ if (!data || !Array.isArray(data))
284119
+ return undefined;
284120
+ for (const c of data) {
284121
+ const g = Reader.parse(c);
284122
+ if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
284123
+ result.tryAddChild(g);
283999
284124
  }
284000
- return undefined;
284125
+ if (isInner && result instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
284126
+ result.isInner = true;
284127
+ return result;
284001
284128
  }
284002
284129
  /** Parse content of `bsurf` to BSplineSurface3d or BSplineSurface3dH */
284003
284130
  static parseBsurf(data) {
@@ -284215,7 +284342,7 @@ var IModelJson;
284215
284342
  return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path(), json.path);
284216
284343
  }
284217
284344
  else if (json.hasOwnProperty("loop")) {
284218
- return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop);
284345
+ return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop, json.hasOwnProperty("isInner") && true === json.isInner);
284219
284346
  }
284220
284347
  else if (json.hasOwnProperty("parityRegion")) {
284221
284348
  return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion(), json.parityRegion);
@@ -284541,7 +284668,7 @@ var IModelJson;
284541
284668
  }
284542
284669
  /** Convert strongly typed instance to tagged json */
284543
284670
  handleLoop(data) {
284544
- return { loop: this.collectChildren(data) };
284671
+ return { loop: this.collectChildren(data), isInner: data.isInner ? true : undefined };
284545
284672
  }
284546
284673
  /** Convert strongly typed instance to tagged json */
284547
284674
  handleParityRegion(data) {
@@ -284557,12 +284684,10 @@ var IModelJson;
284557
284684
  }
284558
284685
  collectChildren(data) {
284559
284686
  const children = [];
284560
- if (data.children && Array.isArray(data.children)) {
284561
- for (const child of data.children) {
284562
- const cdata = child.dispatchToGeometryHandler(this);
284563
- if (cdata)
284564
- children.push(cdata);
284565
- }
284687
+ for (const child of data.children) {
284688
+ const cdata = child.dispatchToGeometryHandler(this);
284689
+ if (cdata)
284690
+ children.push(cdata);
284566
284691
  }
284567
284692
  return children;
284568
284693
  }
@@ -336830,7 +336955,7 @@ class WMS {
336830
336955
  (module) {
336831
336956
 
336832
336957
  "use strict";
336833
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.7","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 build:workers && npm run -s copy:draco","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:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.0"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
336958
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.8","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 build:workers && npm run -s copy:draco","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:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.0"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
336834
336959
 
336835
336960
  /***/ }
336836
336961