@itwin/rpcinterface-full-stack-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.
- package/lib/dist/bundled-tests.js +254 -129
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -82403,6 +82403,17 @@ class SchemaCache {
|
|
|
82403
82403
|
return entry.schemaInfo;
|
|
82404
82404
|
return undefined;
|
|
82405
82405
|
}
|
|
82406
|
+
/**
|
|
82407
|
+
* Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
|
|
82408
|
+
* Does not await partially loaded schemas.
|
|
82409
|
+
* @param schemaKey The SchemaKey describing the schema to get from the cache.
|
|
82410
|
+
* @param matchType The match type to use when locating the schema
|
|
82411
|
+
*/
|
|
82412
|
+
getSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
|
|
82413
|
+
if (this.count === 0)
|
|
82414
|
+
return undefined;
|
|
82415
|
+
return this.findEntry(schemaKey, matchType)?.schemaInfo;
|
|
82416
|
+
}
|
|
82406
82417
|
/**
|
|
82407
82418
|
* Gets the schema which matches the provided SchemaKey. If the schema is partially loaded an exception will be thrown.
|
|
82408
82419
|
* @param schemaKey The SchemaKey describing the schema to get from the cache.
|
|
@@ -82600,6 +82611,16 @@ class SchemaContext {
|
|
|
82600
82611
|
getCachedSchemaSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
|
|
82601
82612
|
return this._knownSchemas.getSchemaSync(schemaKey, matchType);
|
|
82602
82613
|
}
|
|
82614
|
+
/**
|
|
82615
|
+
* Attempts to get a SchemaInfo from the context's cache.
|
|
82616
|
+
* Returns the info even if the schema is only partially loaded.
|
|
82617
|
+
* @param schemaKey The SchemaKey to identify the Schema.
|
|
82618
|
+
* @param matchType The SchemaMatch type to use. Default is SchemaMatchType.Latest.
|
|
82619
|
+
* @internal
|
|
82620
|
+
*/
|
|
82621
|
+
getCachedSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
|
|
82622
|
+
return this._knownSchemas.getSchemaInfoSync(schemaKey, matchType);
|
|
82623
|
+
}
|
|
82603
82624
|
async getSchemaItem(schemaNameOrKey, itemNameOrCtor, itemConstructor) {
|
|
82604
82625
|
let schemaKey;
|
|
82605
82626
|
if (typeof schemaNameOrKey === "string") {
|
|
@@ -82875,11 +82896,25 @@ class SchemaReadHelper {
|
|
|
82875
82896
|
}
|
|
82876
82897
|
this._schemaInfo = schemaInfo;
|
|
82877
82898
|
// Need to add this schema to the context to be able to locate schemaItems within the context.
|
|
82878
|
-
if (addSchemaToCache
|
|
82879
|
-
|
|
82899
|
+
if (addSchemaToCache) {
|
|
82900
|
+
this.checkForReadVersionConflict(schema.schemaKey);
|
|
82901
|
+
if (!this._context.schemaExists(schema.schemaKey))
|
|
82902
|
+
await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
|
|
82880
82903
|
}
|
|
82881
82904
|
return schemaInfo;
|
|
82882
82905
|
}
|
|
82906
|
+
/**
|
|
82907
|
+
* Two read-incompatible versions of the same schema can never substitute for one another.
|
|
82908
|
+
* Detect it here and fail with a clear error.
|
|
82909
|
+
* @param schemaKey The exact key of the schema about to be loaded into the context.
|
|
82910
|
+
*/
|
|
82911
|
+
checkForReadVersionConflict(schemaKey) {
|
|
82912
|
+
const existingInfo = this._context.getCachedSchemaInfoSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaKey.name), _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
|
|
82913
|
+
if (existingInfo && existingInfo.schemaKey.readVersion !== schemaKey.readVersion) {
|
|
82914
|
+
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. ` +
|
|
82915
|
+
`A schema graph cannot require two read-incompatible versions of the same schema.`);
|
|
82916
|
+
}
|
|
82917
|
+
}
|
|
82883
82918
|
/**
|
|
82884
82919
|
* Populates the given Schema from a serialized representation.
|
|
82885
82920
|
* @param schema The Schema to populate
|
|
@@ -82901,7 +82936,7 @@ class SchemaReadHelper {
|
|
|
82901
82936
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
|
|
82902
82937
|
return loadedSchema;
|
|
82903
82938
|
}
|
|
82904
|
-
const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.
|
|
82939
|
+
const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestReadCompatible);
|
|
82905
82940
|
if (undefined === cachedSchema)
|
|
82906
82941
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
|
|
82907
82942
|
return cachedSchema;
|
|
@@ -82953,6 +82988,7 @@ class SchemaReadHelper {
|
|
|
82953
82988
|
schema.fromJSONSync(this._parser.parseSchema());
|
|
82954
82989
|
this._schema = schema;
|
|
82955
82990
|
// Need to add this schema to the context to be able to locate schemaItems within the context.
|
|
82991
|
+
this.checkForReadVersionConflict(schema.schemaKey);
|
|
82956
82992
|
if (!this._context.schemaExists(schema.schemaKey))
|
|
82957
82993
|
this._context.addSchemaSync(schema);
|
|
82958
82994
|
// Load schema references first
|
|
@@ -215156,15 +215192,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
215156
215192
|
|
|
215157
215193
|
|
|
215158
215194
|
/**
|
|
215159
|
-
*
|
|
215195
|
+
* Data for an [[AkimaCurve3d]]
|
|
215160
215196
|
* * This is a "typed object" version of the serializer-friendly [[AkimaCurve3dProps]]
|
|
215161
|
-
* * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.
|
|
215162
215197
|
* @public
|
|
215163
215198
|
*/
|
|
215164
215199
|
class AkimaCurve3dOptions {
|
|
215200
|
+
/**
|
|
215201
|
+
* Points that the curve must pass through.
|
|
215202
|
+
* * Traditional DGN-style Akima curves interpret the first two and last two fit points as end tangent conditions,
|
|
215203
|
+
* however as the current implementation uses another interpolation algorithm, there is no such interpretation here.
|
|
215204
|
+
*/
|
|
215165
215205
|
fitPoints;
|
|
215166
215206
|
/**
|
|
215167
|
-
*
|
|
215168
215207
|
* @param fitPoints points to CAPTURE
|
|
215169
215208
|
* @param knots array to CAPTURE
|
|
215170
215209
|
*/
|
|
@@ -215175,7 +215214,7 @@ class AkimaCurve3dOptions {
|
|
|
215175
215214
|
* First and last 2 points are "beyond the end" for control of end slope.
|
|
215176
215215
|
fitPoints: Point3d[];
|
|
215177
215216
|
|
|
215178
|
-
|
|
215217
|
+
/** Clone with strongly typed members reduced to simple json. */
|
|
215179
215218
|
cloneAsAkimaCurve3dProps() {
|
|
215180
215219
|
const props = {
|
|
215181
215220
|
fitPoints: _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),
|
|
@@ -215192,24 +215231,25 @@ class AkimaCurve3dOptions {
|
|
|
215192
215231
|
const result = new AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(source.fitPoints));
|
|
215193
215232
|
return result;
|
|
215194
215233
|
}
|
|
215234
|
+
/** Whether the two options are equivalent or both undefined. */
|
|
215195
215235
|
static areAlmostEqual(dataA, dataB) {
|
|
215196
215236
|
if (dataA === undefined && dataB === undefined)
|
|
215197
215237
|
return true;
|
|
215198
|
-
if (dataA !== undefined && dataB !== undefined)
|
|
215238
|
+
if (dataA !== undefined && dataB !== undefined)
|
|
215199
215239
|
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a, b) => a.isAlmostEqual(b));
|
|
215200
|
-
}
|
|
215201
215240
|
return false;
|
|
215202
215241
|
}
|
|
215203
215242
|
}
|
|
215204
215243
|
/**
|
|
215205
|
-
* Interpolating curve.
|
|
215244
|
+
* Interpolating curve using the Akima formulation.
|
|
215206
215245
|
* * Derive from [[ProxyCurve]]
|
|
215207
215246
|
* * Use a [[BSplineCurve3d]] as the proxy
|
|
215208
|
-
* *
|
|
215247
|
+
* * Currently the Akima formulation is replaced with a Greville interpolation.
|
|
215209
215248
|
* @public
|
|
215210
215249
|
*/
|
|
215211
215250
|
class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyCurve {
|
|
215212
|
-
|
|
215251
|
+
/** String name for schema properties. */
|
|
215252
|
+
curvePrimitiveType = "akimaCurve";
|
|
215213
215253
|
_options;
|
|
215214
215254
|
/** CAPTURE properties and proxy curve. */
|
|
215215
215255
|
constructor(properties, proxyCurve) {
|
|
@@ -215224,9 +215264,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
|
|
|
215224
215264
|
return result;
|
|
215225
215265
|
}
|
|
215226
215266
|
/**
|
|
215227
|
-
* Create an [[AkimaCurve3d]] based on
|
|
215267
|
+
* Create an [[AkimaCurve3d]] based on an [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
|
|
215228
215268
|
* * This saves a COPY OF the options or props.
|
|
215229
|
-
* * Use createCapture
|
|
215269
|
+
* * Use createCapture() if the options or props can be used without copy
|
|
215230
215270
|
*/
|
|
215231
215271
|
static create(options) {
|
|
215232
215272
|
let optionsCopy;
|
|
@@ -215279,11 +215319,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
|
|
|
215279
215319
|
* Transform this [[AkimaCurve3d]] and its defining data in place
|
|
215280
215320
|
*/
|
|
215281
215321
|
tryTransformInPlace(transform) {
|
|
215282
|
-
|
|
215283
|
-
|
|
215284
|
-
|
|
215285
|
-
}
|
|
215286
|
-
return proxyOk;
|
|
215322
|
+
this._proxyCurve.tryTransformInPlace(transform);
|
|
215323
|
+
transform.multiplyPoint3dArray(this._options.fitPoints);
|
|
215324
|
+
return true; // we know this succeeds
|
|
215287
215325
|
}
|
|
215288
215326
|
/**
|
|
215289
215327
|
* Find intervals of this CurvePrimitive that are interior to a clipper.
|
|
@@ -215305,6 +215343,7 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
|
|
|
215305
215343
|
}
|
|
215306
215344
|
/** Test if `other` is also an [[AkimaCurve3d]] */
|
|
215307
215345
|
isSameGeometryClass(other) { return other instanceof AkimaCurve3d; }
|
|
215346
|
+
/** Test if this [[AkimaCurve3d]] is almost equal to another GeometryQuery object. */
|
|
215308
215347
|
isAlmostEqual(other) {
|
|
215309
215348
|
if (other instanceof AkimaCurve3d) {
|
|
215310
215349
|
return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);
|
|
@@ -216209,10 +216248,11 @@ class BSplineCurve3d extends BSplineCurve3dBase {
|
|
|
216209
216248
|
}
|
|
216210
216249
|
/**
|
|
216211
216250
|
* Create a B-spline curve from an Akima curve.
|
|
216212
|
-
*
|
|
216251
|
+
* * The Akima formulation of the curve is currently replaced by a Greville interpolation.
|
|
216252
|
+
* @param options data for construction
|
|
216213
216253
|
*/
|
|
216214
216254
|
static createFromAkimaCurve3dOptions(options) {
|
|
216215
|
-
return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4);
|
|
216255
|
+
return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4);
|
|
216216
216256
|
}
|
|
216217
216257
|
/**
|
|
216218
216258
|
* Create a B-spline curve with given knots.
|
|
@@ -220249,8 +220289,7 @@ class InterpolationCurve3dOptions {
|
|
|
220249
220289
|
result._endTangent = source.endTangent ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.fromJSON(source.endTangent) : undefined;
|
|
220250
220290
|
return result;
|
|
220251
220291
|
}
|
|
220252
|
-
|
|
220253
|
-
// vector equality test with awkward rule that 000 matches undefined.
|
|
220292
|
+
/** Vector equality test, with the additional rule that the zero vector matches undefined. */
|
|
220254
220293
|
static areAlmostEqualAllow000AsUndefined(a, b) {
|
|
220255
220294
|
if (a !== undefined && a.maxAbs() === 0)
|
|
220256
220295
|
a = undefined;
|
|
@@ -220260,6 +220299,7 @@ class InterpolationCurve3dOptions {
|
|
|
220260
220299
|
return a.isAlmostEqual(b);
|
|
220261
220300
|
return a === undefined && b === undefined;
|
|
220262
220301
|
}
|
|
220302
|
+
/** Whether the two options are equivalent or both undefined. */
|
|
220263
220303
|
static areAlmostEqual(dataA, dataB) {
|
|
220264
220304
|
if (dataA === undefined && dataB === undefined)
|
|
220265
220305
|
return true;
|
|
@@ -220308,6 +220348,7 @@ class InterpolationCurve3dOptions {
|
|
|
220308
220348
|
* @public
|
|
220309
220349
|
*/
|
|
220310
220350
|
class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1__.ProxyCurve {
|
|
220351
|
+
/** String name for schema properties. */
|
|
220311
220352
|
curvePrimitiveType = "interpolationCurve";
|
|
220312
220353
|
_options;
|
|
220313
220354
|
/** CAPTURE properties and proxy curve. */
|
|
@@ -220380,15 +220421,13 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
|
|
|
220380
220421
|
* Transform this [[InterpolationCurve3d]] and its defining data in place
|
|
220381
220422
|
*/
|
|
220382
220423
|
tryTransformInPlace(transform) {
|
|
220383
|
-
|
|
220384
|
-
|
|
220385
|
-
|
|
220386
|
-
|
|
220387
|
-
|
|
220388
|
-
|
|
220389
|
-
|
|
220390
|
-
}
|
|
220391
|
-
return proxyOk;
|
|
220424
|
+
this._proxyCurve.tryTransformInPlace(transform);
|
|
220425
|
+
transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
|
|
220426
|
+
if (this._options.startTangent)
|
|
220427
|
+
transform.multiplyVectorInPlace(this._options.startTangent);
|
|
220428
|
+
if (this._options.endTangent)
|
|
220429
|
+
transform.multiplyVectorInPlace(this._options.endTangent);
|
|
220430
|
+
return true; // we know this succeeds
|
|
220392
220431
|
}
|
|
220393
220432
|
/**
|
|
220394
220433
|
* Find intervals of this CurvePrimitive that are interior to a clipper.
|
|
@@ -220408,6 +220447,7 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
|
|
|
220408
220447
|
cloneTransformed(transform) {
|
|
220409
220448
|
return super.cloneTransformed(transform);
|
|
220410
220449
|
}
|
|
220450
|
+
/** Test if this [[InterpolationCurve3d]] is almost equal to another GeometryQuery object. */
|
|
220411
220451
|
isAlmostEqual(other) {
|
|
220412
220452
|
if (other instanceof InterpolationCurve3d) {
|
|
220413
220453
|
return InterpolationCurve3dOptions.areAlmostEqual(this._options, other._options);
|
|
@@ -223856,8 +223896,6 @@ class ClipUtilities {
|
|
|
223856
223896
|
if (!worldToLocal)
|
|
223857
223897
|
return result;
|
|
223858
223898
|
const localRegion = region.cloneTransformed(worldToLocal); // parallel to xy-plane so we can ignore z
|
|
223859
|
-
if (!localRegion)
|
|
223860
|
-
return result;
|
|
223861
223899
|
// We can only clip convex polygons with our clipper machinery, but the input region doesn't have to be
|
|
223862
223900
|
// convex or even a polygon. We get around this limitation by using a Boolean operation, which admits
|
|
223863
223901
|
// *any* planar regions, albeit in local coordinates. First, we clip a rectangle that covers the input region
|
|
@@ -229493,10 +229531,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
229493
229531
|
* @param options how finely to stroke the path to create the distance index
|
|
229494
229532
|
*/
|
|
229495
229533
|
cloneTransformed(transform, options) {
|
|
229496
|
-
|
|
229497
|
-
if (c.tryTransformInPlace(transform))
|
|
229498
|
-
return CurveChainWithDistanceIndex.createCapture(c, options);
|
|
229499
|
-
return undefined;
|
|
229534
|
+
return CurveChainWithDistanceIndex.createCapture(this._path.cloneTransformed(transform), options);
|
|
229500
229535
|
}
|
|
229501
229536
|
/**
|
|
229502
229537
|
* Reference to the contained path.
|
|
@@ -229517,8 +229552,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
229517
229552
|
* @param options how finely to stroke the path to create the distance index
|
|
229518
229553
|
*/
|
|
229519
229554
|
clone(options) {
|
|
229520
|
-
|
|
229521
|
-
return CurveChainWithDistanceIndex.createCapture(c, options);
|
|
229555
|
+
return CurveChainWithDistanceIndex.createCapture(this._path.clone(), options);
|
|
229522
229556
|
}
|
|
229523
229557
|
/**
|
|
229524
229558
|
* Return a portion of this curve with its own distance index.
|
|
@@ -229696,15 +229730,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
229696
229730
|
* @return cloned flattened CurveChain, or reference to the input chain if no nesting
|
|
229697
229731
|
*/
|
|
229698
229732
|
static flattenNestedChains(chain) {
|
|
229699
|
-
if (-1 === chain.children.findIndex((
|
|
229733
|
+
if (-1 === chain.children.findIndex((c) => c instanceof CurveChainWithDistanceIndex))
|
|
229700
229734
|
return chain;
|
|
229701
229735
|
const flatChain = chain.clone();
|
|
229702
|
-
const flatChildren = flatChain.children.flatMap((
|
|
229703
|
-
if (child instanceof CurveChainWithDistanceIndex)
|
|
229704
|
-
return child.path.children;
|
|
229705
|
-
else
|
|
229706
|
-
return [child];
|
|
229707
|
-
});
|
|
229736
|
+
const flatChildren = flatChain.children.flatMap((c) => c instanceof CurveChainWithDistanceIndex ? c.path.children : c);
|
|
229708
229737
|
flatChain.children.splice(0, Infinity, ...flatChildren);
|
|
229709
229738
|
return flatChain;
|
|
229710
229739
|
}
|
|
@@ -229885,18 +229914,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
229885
229914
|
return result;
|
|
229886
229915
|
}
|
|
229887
229916
|
/**
|
|
229888
|
-
*
|
|
229889
|
-
* *
|
|
229890
|
-
*
|
|
229891
|
-
*
|
|
229917
|
+
* Transform the chain in place.
|
|
229918
|
+
* * Does NOT recompute the distance index.
|
|
229919
|
+
* * For best results, use a rigid transform. Otherwise, it is better to call [[cloneTransformed]] so that the
|
|
229920
|
+
* distance index is recomputed.
|
|
229892
229921
|
*/
|
|
229893
229922
|
tryTransformInPlace(transform) {
|
|
229894
|
-
|
|
229895
|
-
for (const c of this._path.children) {
|
|
229896
|
-
if (!c.tryTransformInPlace(transform))
|
|
229897
|
-
numFail++;
|
|
229898
|
-
}
|
|
229899
|
-
return numFail === 0;
|
|
229923
|
+
return this._path.tryTransformInPlace(transform);
|
|
229900
229924
|
}
|
|
229901
229925
|
/** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
|
|
229902
229926
|
reverseInPlace() {
|
|
@@ -230199,8 +230223,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
230199
230223
|
class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.GeometryQuery {
|
|
230200
230224
|
/** String name for schema properties */
|
|
230201
230225
|
geometryCategory = "curveCollection";
|
|
230202
|
-
/** Flag for inner loop status. Only used by `Loop`. */
|
|
230203
|
-
isInner = false;
|
|
230204
230226
|
/** Return the sum of the lengths of all contained curves. */
|
|
230205
230227
|
sumLengths() {
|
|
230206
230228
|
return _internalContexts_SumLengthsContext__WEBPACK_IMPORTED_MODULE_13__.SumLengthsContext.sumLengths(this);
|
|
@@ -230608,6 +230630,18 @@ class CurveChain extends CurveCollection {
|
|
|
230608
230630
|
}
|
|
230609
230631
|
return undefined;
|
|
230610
230632
|
}
|
|
230633
|
+
/** Return a deep copy. */
|
|
230634
|
+
clone() {
|
|
230635
|
+
return super.clone();
|
|
230636
|
+
}
|
|
230637
|
+
/** Create a deep copy of transformed curves. */
|
|
230638
|
+
cloneTransformed(transform) {
|
|
230639
|
+
return super.cloneTransformed(transform);
|
|
230640
|
+
}
|
|
230641
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
230642
|
+
cloneWithExpandedLineStrings() {
|
|
230643
|
+
return super.cloneWithExpandedLineStrings();
|
|
230644
|
+
}
|
|
230611
230645
|
/**
|
|
230612
230646
|
* Add a child curve.
|
|
230613
230647
|
* @param child curve to add to the chain. The curve is captured by this instance.
|
|
@@ -230738,6 +230772,18 @@ class BagOfCurves extends CurveCollection {
|
|
|
230738
230772
|
cloneEmptyPeer() {
|
|
230739
230773
|
return new BagOfCurves();
|
|
230740
230774
|
}
|
|
230775
|
+
/** Return a deep copy. */
|
|
230776
|
+
clone() {
|
|
230777
|
+
return super.clone();
|
|
230778
|
+
}
|
|
230779
|
+
/** Create a deep copy of transformed curves. */
|
|
230780
|
+
cloneTransformed(transform) {
|
|
230781
|
+
return super.cloneTransformed(transform);
|
|
230782
|
+
}
|
|
230783
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
230784
|
+
cloneWithExpandedLineStrings() {
|
|
230785
|
+
return super.cloneWithExpandedLineStrings();
|
|
230786
|
+
}
|
|
230741
230787
|
/** Add a child */
|
|
230742
230788
|
tryAddChild(child) {
|
|
230743
230789
|
if (child)
|
|
@@ -231729,11 +231775,10 @@ class CurveFactory {
|
|
|
231729
231775
|
// The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.
|
|
231730
231776
|
const toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidHeadsUp(planeNormal).transpose();
|
|
231731
231777
|
const projection = closedCurve.cloneTransformed(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createOriginAndMatrix(undefined, toLocal));
|
|
231732
|
-
|
|
231733
|
-
|
|
231734
|
-
|
|
231735
|
-
|
|
231736
|
-
}
|
|
231778
|
+
// now we can ignore z-coords
|
|
231779
|
+
const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
|
|
231780
|
+
if (areaXY && areaXY < 0)
|
|
231781
|
+
curve.reverseInPlace();
|
|
231737
231782
|
}
|
|
231738
231783
|
}
|
|
231739
231784
|
/**
|
|
@@ -232892,9 +232937,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
232892
232937
|
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
232893
232938
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
232894
232939
|
/* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
|
|
232895
|
-
/* harmony import */ var
|
|
232896
|
-
/* harmony import */ var
|
|
232897
|
-
/* harmony import */ var
|
|
232940
|
+
/* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
|
|
232941
|
+
/* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
|
|
232942
|
+
/* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
|
|
232898
232943
|
/* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
|
|
232899
232944
|
/*---------------------------------------------------------------------------------------------
|
|
232900
232945
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -233313,7 +233358,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
|
|
|
233313
233358
|
* @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
|
|
233314
233359
|
*/
|
|
233315
233360
|
closestPoint(spacePoint, extend = false, result) {
|
|
233316
|
-
const strokeHandler = new
|
|
233361
|
+
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result);
|
|
233317
233362
|
this.emitStrokableParts(strokeHandler);
|
|
233318
233363
|
return strokeHandler.claimResult();
|
|
233319
233364
|
}
|
|
@@ -233329,7 +233374,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
|
|
|
233329
233374
|
* @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
|
|
233330
233375
|
*/
|
|
233331
233376
|
closestPointXY(spacePoint, extend = false, result) {
|
|
233332
|
-
const strokeHandler = new
|
|
233377
|
+
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
|
|
233333
233378
|
this.emitStrokableParts(strokeHandler);
|
|
233334
233379
|
return strokeHandler.claimResult();
|
|
233335
233380
|
}
|
|
@@ -233345,7 +233390,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
|
|
|
233345
233390
|
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
233346
233391
|
*/
|
|
233347
233392
|
emitTangents(spacePoint, announceTangent, options) {
|
|
233348
|
-
const strokeHandler = new
|
|
233393
|
+
const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
|
|
233349
233394
|
this.emitStrokableParts(strokeHandler, options?.strokeOptions);
|
|
233350
233395
|
}
|
|
233351
233396
|
/**
|
|
@@ -233440,7 +233485,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
|
|
|
233440
233485
|
* @returns Return the number of CurveLocationDetail's added to the result array.
|
|
233441
233486
|
*/
|
|
233442
233487
|
appendPlaneIntersectionPoints(plane, result) {
|
|
233443
|
-
const strokeHandler = new
|
|
233488
|
+
const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
|
|
233444
233489
|
const n0 = result.length;
|
|
233445
233490
|
this.emitStrokableParts(strokeHandler);
|
|
233446
233491
|
return result.length - n0;
|
|
@@ -233638,6 +233683,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233638
233683
|
/* harmony export */ RecursiveCurveProcessorWithStack: () => (/* binding */ RecursiveCurveProcessorWithStack)
|
|
233639
233684
|
/* harmony export */ });
|
|
233640
233685
|
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
233686
|
+
/*---------------------------------------------------------------------------------------------
|
|
233687
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
233688
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
233689
|
+
*--------------------------------------------------------------------------------------------*/
|
|
233690
|
+
/** @packageDocumentation
|
|
233691
|
+
* @module Curve
|
|
233692
|
+
*/
|
|
233641
233693
|
|
|
233642
233694
|
/** base class for detailed traversal of curve artifacts.
|
|
233643
233695
|
* * This recurses to children in the quickest way (no records of path)
|
|
@@ -233673,7 +233725,10 @@ class RecursiveCurveProcessor {
|
|
|
233673
233725
|
announceUnionRegion(data, _indexInParent = -1) {
|
|
233674
233726
|
let i = 0;
|
|
233675
233727
|
for (const child of data.children) {
|
|
233676
|
-
child.
|
|
233728
|
+
if (child.curveCollectionType === "loop")
|
|
233729
|
+
this.announceLoop(child, i++);
|
|
233730
|
+
else
|
|
233731
|
+
this.announceParityRegion(child, i++);
|
|
233677
233732
|
}
|
|
233678
233733
|
}
|
|
233679
233734
|
/** announce a bag of curves.
|
|
@@ -233735,9 +233790,15 @@ class RecursiveCurveProcessorWithStack extends RecursiveCurveProcessor {
|
|
|
233735
233790
|
this.leave();
|
|
233736
233791
|
}
|
|
233737
233792
|
/** announce beginning or end of a parity region */
|
|
233738
|
-
announceUnionRegion(data,
|
|
233793
|
+
announceUnionRegion(data, _indexInParent = -1) {
|
|
233739
233794
|
this.enter(data);
|
|
233740
|
-
|
|
233795
|
+
let i = 0;
|
|
233796
|
+
for (const child of data.children) {
|
|
233797
|
+
if (child.curveCollectionType === "loop")
|
|
233798
|
+
this.announceLoop(child, i++);
|
|
233799
|
+
else
|
|
233800
|
+
this.announceParityRegion(child, i++);
|
|
233801
|
+
}
|
|
233741
233802
|
this.leave();
|
|
233742
233803
|
}
|
|
233743
233804
|
/**
|
|
@@ -234343,7 +234404,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__.CurveP
|
|
|
234343
234404
|
this._point0 = this._point1;
|
|
234344
234405
|
this._point1 = a;
|
|
234345
234406
|
}
|
|
234346
|
-
/** Transform the two endpoints of this
|
|
234407
|
+
/** Transform the two endpoints of this line segment. */
|
|
234347
234408
|
tryTransformInPlace(transform) {
|
|
234348
234409
|
this._point0 = transform.multiplyPoint3d(this._point0, this._point0);
|
|
234349
234410
|
this._point1 = transform.multiplyPoint3d(this._point1, this._point1);
|
|
@@ -236158,12 +236219,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
236158
236219
|
class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
|
|
236159
236220
|
/** String name for schema properties */
|
|
236160
236221
|
curveCollectionType = "loop";
|
|
236161
|
-
/**
|
|
236222
|
+
/**
|
|
236223
|
+
* Flag for inner loop status (default value is `false`).
|
|
236224
|
+
* * Typical usage is to set to `true` on hole `Loop`s in a `ParityRegion` to distinguish them from the outer `Loop`.
|
|
236225
|
+
* * This property is only set by the user, and does not affect region processing.
|
|
236226
|
+
* * This property is propagated through [[clone]] and JSON/FlatBuffer de/serialization.
|
|
236227
|
+
* * For best de/serialization results, avoid setting to `false` on multiple `Loop`s of a `ParityRegion`.
|
|
236228
|
+
*/
|
|
236162
236229
|
isInner = false;
|
|
236163
236230
|
/** Test if `other` is a `Loop` */
|
|
236164
236231
|
isSameGeometryClass(other) {
|
|
236165
236232
|
return other instanceof Loop;
|
|
236166
236233
|
}
|
|
236234
|
+
/** Construct an empty loop. */
|
|
236167
236235
|
constructor() {
|
|
236168
236236
|
super();
|
|
236169
236237
|
}
|
|
@@ -236233,10 +236301,28 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
|
|
|
236233
236301
|
emptyClone.isInner = this.isInner;
|
|
236234
236302
|
return emptyClone;
|
|
236235
236303
|
}
|
|
236304
|
+
/** Return a deep copy. */
|
|
236305
|
+
clone() {
|
|
236306
|
+
return super.clone();
|
|
236307
|
+
}
|
|
236308
|
+
/** Create a deep copy of transformed curves. */
|
|
236309
|
+
cloneTransformed(transform) {
|
|
236310
|
+
return super.cloneTransformed(transform);
|
|
236311
|
+
}
|
|
236312
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
236313
|
+
cloneWithExpandedLineStrings() {
|
|
236314
|
+
return super.cloneWithExpandedLineStrings();
|
|
236315
|
+
}
|
|
236236
236316
|
/** Second step of double dispatch: call `handler.handleLoop(this)` */
|
|
236237
236317
|
dispatchToGeometryHandler(handler) {
|
|
236238
236318
|
return handler.handleLoop(this);
|
|
236239
236319
|
}
|
|
236320
|
+
/** Test for near equality */
|
|
236321
|
+
isAlmostEqual(other) {
|
|
236322
|
+
if (!super.isAlmostEqual(other))
|
|
236323
|
+
return false;
|
|
236324
|
+
return this.isInner === other.isInner;
|
|
236325
|
+
}
|
|
236240
236326
|
}
|
|
236241
236327
|
/**
|
|
236242
236328
|
* Structure carrying a pair of loops with curve geometry.
|
|
@@ -236544,14 +236630,15 @@ class ParityRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCo
|
|
|
236544
236630
|
}
|
|
236545
236631
|
/** Return a deep copy. */
|
|
236546
236632
|
clone() {
|
|
236547
|
-
|
|
236548
|
-
|
|
236549
|
-
|
|
236550
|
-
|
|
236551
|
-
|
|
236552
|
-
|
|
236553
|
-
|
|
236554
|
-
|
|
236633
|
+
return super.clone();
|
|
236634
|
+
}
|
|
236635
|
+
/** Create a deep copy of transformed curves. */
|
|
236636
|
+
cloneTransformed(transform) {
|
|
236637
|
+
return super.cloneTransformed(transform);
|
|
236638
|
+
}
|
|
236639
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
236640
|
+
cloneWithExpandedLineStrings() {
|
|
236641
|
+
return super.cloneWithExpandedLineStrings();
|
|
236555
236642
|
}
|
|
236556
236643
|
/** Stroke these curves into a new ParityRegion. */
|
|
236557
236644
|
cloneStroked(options) {
|
|
@@ -236680,6 +236767,18 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_2__.CurveChain {
|
|
|
236680
236767
|
cloneEmptyPeer() {
|
|
236681
236768
|
return new Path();
|
|
236682
236769
|
}
|
|
236770
|
+
/** Return a deep copy. */
|
|
236771
|
+
clone() {
|
|
236772
|
+
return super.clone();
|
|
236773
|
+
}
|
|
236774
|
+
/** Create a deep copy of transformed curves. */
|
|
236775
|
+
cloneTransformed(transform) {
|
|
236776
|
+
return super.cloneTransformed(transform);
|
|
236777
|
+
}
|
|
236778
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
236779
|
+
cloneWithExpandedLineStrings() {
|
|
236780
|
+
return super.cloneWithExpandedLineStrings();
|
|
236781
|
+
}
|
|
236683
236782
|
/** Second step of double dispatch: call `handler.handlePath(this)` */
|
|
236684
236783
|
dispatchToGeometryHandler(handler) {
|
|
236685
236784
|
return handler.handlePath(this);
|
|
@@ -236955,9 +237054,8 @@ class ProxyCurve extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.Curv
|
|
|
236955
237054
|
/** Return a transformed clone. */
|
|
236956
237055
|
cloneTransformed(transform) {
|
|
236957
237056
|
const myClone = this.clone();
|
|
236958
|
-
|
|
236959
|
-
|
|
236960
|
-
return undefined;
|
|
237057
|
+
myClone.tryTransformInPlace(transform);
|
|
237058
|
+
return myClone;
|
|
236961
237059
|
}
|
|
236962
237060
|
/** Implement by proxyCurve. Subclasses may eventually override this default implementation. */
|
|
236963
237061
|
clonePartialCurve(fractionA, fractionB) {
|
|
@@ -239026,8 +239124,6 @@ class RegionOps {
|
|
|
239026
239124
|
const worldToLocal = localToWorld.inverse();
|
|
239027
239125
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(worldToLocal !== undefined, "FrameBuilder's transform is invertible");
|
|
239028
239126
|
regionXY = region.cloneTransformed(worldToLocal);
|
|
239029
|
-
if (!regionXY)
|
|
239030
|
-
return undefined;
|
|
239031
239127
|
}
|
|
239032
239128
|
const momentData = RegionOps.computeXYAreaMoments(regionXY);
|
|
239033
239129
|
if (!momentData)
|
|
@@ -241256,6 +241352,18 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
|
|
|
241256
241352
|
cloneEmptyPeer() {
|
|
241257
241353
|
return new UnionRegion();
|
|
241258
241354
|
}
|
|
241355
|
+
/** Return a deep copy. */
|
|
241356
|
+
clone() {
|
|
241357
|
+
return super.clone();
|
|
241358
|
+
}
|
|
241359
|
+
/** Create a deep copy of transformed curves. */
|
|
241360
|
+
cloneTransformed(transform) {
|
|
241361
|
+
return super.cloneTransformed(transform);
|
|
241362
|
+
}
|
|
241363
|
+
/** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
|
|
241364
|
+
cloneWithExpandedLineStrings() {
|
|
241365
|
+
return super.cloneWithExpandedLineStrings();
|
|
241366
|
+
}
|
|
241259
241367
|
/**
|
|
241260
241368
|
* Try to add a child (by capturing it).
|
|
241261
241369
|
* * Returns false if the `AnyCurve` child is not a region type.
|
|
@@ -241868,6 +241976,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
241868
241976
|
* Algorithmic class for cloning curve collections.
|
|
241869
241977
|
* * recurse through collection nodes, building image nodes as needed and inserting clones of children.
|
|
241870
241978
|
* * for individual primitive, invoke doClone (protected) for direct clone; insert into parent
|
|
241979
|
+
* @internal
|
|
241871
241980
|
*/
|
|
241872
241981
|
class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessorWithStack {
|
|
241873
241982
|
_result;
|
|
@@ -241906,7 +242015,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
|
|
|
241906
242015
|
const c = this.doClone(primitive);
|
|
241907
242016
|
if (c !== undefined && this._stack.length > 0) {
|
|
241908
242017
|
const parent = this._stack[this._stack.length - 1];
|
|
241909
|
-
if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves)
|
|
242018
|
+
if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves) {
|
|
241910
242019
|
if (Array.isArray(c)) {
|
|
241911
242020
|
for (const c1 of c) {
|
|
241912
242021
|
parent.tryAddChild(c1);
|
|
@@ -241915,6 +242024,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
|
|
|
241915
242024
|
else {
|
|
241916
242025
|
parent.tryAddChild(c);
|
|
241917
242026
|
}
|
|
242027
|
+
}
|
|
241918
242028
|
}
|
|
241919
242029
|
}
|
|
241920
242030
|
}
|
|
@@ -247742,26 +247852,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
247742
247852
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
247743
247853
|
/* harmony export */ TransformInPlaceContext: () => (/* binding */ TransformInPlaceContext)
|
|
247744
247854
|
/* harmony export */ });
|
|
247745
|
-
/* harmony import */ var
|
|
247855
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
247856
|
+
/* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
|
|
247857
|
+
/*---------------------------------------------------------------------------------------------
|
|
247858
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
247859
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
247860
|
+
*--------------------------------------------------------------------------------------------*/
|
|
247861
|
+
/** @packageDocumentation
|
|
247862
|
+
* @module Curve
|
|
247863
|
+
*/
|
|
247746
247864
|
|
|
247747
|
-
|
|
247865
|
+
|
|
247866
|
+
/** Algorithmic class: Transform curves in place. Always expected to succeed.
|
|
247748
247867
|
* @internal
|
|
247749
247868
|
*/
|
|
247750
|
-
class TransformInPlaceContext extends
|
|
247751
|
-
numFail;
|
|
247752
|
-
numOK;
|
|
247869
|
+
class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessor {
|
|
247753
247870
|
transform;
|
|
247754
|
-
constructor(transform) {
|
|
247871
|
+
constructor(transform) {
|
|
247872
|
+
super();
|
|
247873
|
+
this.transform = transform;
|
|
247874
|
+
}
|
|
247755
247875
|
static tryTransformInPlace(target, transform) {
|
|
247756
247876
|
const context = new TransformInPlaceContext(transform);
|
|
247757
247877
|
target.announceToCurveProcessor(context);
|
|
247758
|
-
return
|
|
247878
|
+
return true;
|
|
247759
247879
|
}
|
|
247760
247880
|
announceCurvePrimitive(curvePrimitive, _indexInParent) {
|
|
247761
247881
|
if (!curvePrimitive.tryTransformInPlace(this.transform))
|
|
247762
|
-
|
|
247763
|
-
else
|
|
247764
|
-
this.numOK++;
|
|
247882
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "TransformInPlaceContext: unexpected failure of tryTransformInPlace");
|
|
247765
247883
|
}
|
|
247766
247884
|
}
|
|
247767
247885
|
|
|
@@ -251197,9 +251315,12 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_13__.T
|
|
|
251197
251315
|
clone() {
|
|
251198
251316
|
return new DirectSpiral3d(this.localToWorld.clone(), this._spiralType, this.designProperties?.clone(), this._nominalL1, this._nominalR1, this._activeFractionInterval?.clone(), this._evaluator.clone());
|
|
251199
251317
|
}
|
|
251200
|
-
/**
|
|
251201
|
-
|
|
251202
|
-
|
|
251318
|
+
/**
|
|
251319
|
+
* Apply `transform` to this spiral's local to world transform.
|
|
251320
|
+
* * Only the rigid part of the transform is applied.
|
|
251321
|
+
*/
|
|
251322
|
+
tryTransformInPlace(transform) {
|
|
251323
|
+
const rigidData = this.applyRigidPartOfTransform(transform);
|
|
251203
251324
|
if (rigidData !== undefined) {
|
|
251204
251325
|
this._nominalL1 *= rigidData.scale;
|
|
251205
251326
|
this._nominalR1 *= rigidData.scale;
|
|
@@ -251604,9 +251725,12 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15
|
|
|
251604
251725
|
clone() {
|
|
251605
251726
|
return new IntegratedSpiral3d(this._spiralType, this._evaluator, this.radius01.clone(), this.bearing01.clone(), this.activeFractionInterval.clone(), this.localToWorld.clone(), this._arcLength01, this._designProperties?.clone());
|
|
251606
251727
|
}
|
|
251607
|
-
/**
|
|
251608
|
-
|
|
251609
|
-
|
|
251728
|
+
/**
|
|
251729
|
+
* Apply `transform` to this spiral's local to world transform.
|
|
251730
|
+
* * Only the rigid part of the transform is applied.
|
|
251731
|
+
*/
|
|
251732
|
+
tryTransformInPlace(transform) {
|
|
251733
|
+
const rigidData = this.applyRigidPartOfTransform(transform);
|
|
251610
251734
|
if (rigidData !== undefined) {
|
|
251611
251735
|
this._curvature01.x0 /= rigidData.scale;
|
|
251612
251736
|
this._curvature01.x1 /= rigidData.scale;
|
|
@@ -302554,8 +302678,11 @@ function nullToUndefined(data) {
|
|
|
302554
302678
|
function createTypedCurveCollection(collectionType) {
|
|
302555
302679
|
if (collectionType === 1)
|
|
302556
302680
|
return new _curve_Path__WEBPACK_IMPORTED_MODULE_14__.Path();
|
|
302557
|
-
if (collectionType === 2 || collectionType === 3)
|
|
302558
|
-
|
|
302681
|
+
if (collectionType === 2 || collectionType === 3) {
|
|
302682
|
+
const loop = new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
|
|
302683
|
+
loop.isInner = collectionType === 3;
|
|
302684
|
+
return loop;
|
|
302685
|
+
}
|
|
302559
302686
|
if (collectionType === 4)
|
|
302560
302687
|
return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_13__.ParityRegion();
|
|
302561
302688
|
if (collectionType === 5)
|
|
@@ -302789,9 +302916,8 @@ class BGFBWriter {
|
|
|
302789
302916
|
let cvType = 0;
|
|
302790
302917
|
if (cv instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path)
|
|
302791
302918
|
cvType = 1;
|
|
302792
|
-
else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
|
|
302919
|
+
else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
|
|
302793
302920
|
cvType = cv.isInner ? 3 : 2;
|
|
302794
|
-
}
|
|
302795
302921
|
else if (cv instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion)
|
|
302796
302922
|
cvType = 4;
|
|
302797
302923
|
else if (cv instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_21__.UnionRegion)
|
|
@@ -303997,16 +304123,17 @@ var IModelJson;
|
|
|
303997
304123
|
return undefined;
|
|
303998
304124
|
}
|
|
303999
304125
|
/** parse contents of a curve collection to a CurveCollection instance */
|
|
304000
|
-
static parseCurveCollectionMembers(result, data) {
|
|
304001
|
-
if (data
|
|
304002
|
-
|
|
304003
|
-
|
|
304004
|
-
|
|
304005
|
-
|
|
304006
|
-
|
|
304007
|
-
return result;
|
|
304126
|
+
static parseCurveCollectionMembers(result, data, isInner = false) {
|
|
304127
|
+
if (!data || !Array.isArray(data))
|
|
304128
|
+
return undefined;
|
|
304129
|
+
for (const c of data) {
|
|
304130
|
+
const g = Reader.parse(c);
|
|
304131
|
+
if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
|
|
304132
|
+
result.tryAddChild(g);
|
|
304008
304133
|
}
|
|
304009
|
-
|
|
304134
|
+
if (isInner && result instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
|
|
304135
|
+
result.isInner = true;
|
|
304136
|
+
return result;
|
|
304010
304137
|
}
|
|
304011
304138
|
/** Parse content of `bsurf` to BSplineSurface3d or BSplineSurface3dH */
|
|
304012
304139
|
static parseBsurf(data) {
|
|
@@ -304224,7 +304351,7 @@ var IModelJson;
|
|
|
304224
304351
|
return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path(), json.path);
|
|
304225
304352
|
}
|
|
304226
304353
|
else if (json.hasOwnProperty("loop")) {
|
|
304227
|
-
return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop);
|
|
304354
|
+
return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop, json.hasOwnProperty("isInner") && true === json.isInner);
|
|
304228
304355
|
}
|
|
304229
304356
|
else if (json.hasOwnProperty("parityRegion")) {
|
|
304230
304357
|
return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion(), json.parityRegion);
|
|
@@ -304550,7 +304677,7 @@ var IModelJson;
|
|
|
304550
304677
|
}
|
|
304551
304678
|
/** Convert strongly typed instance to tagged json */
|
|
304552
304679
|
handleLoop(data) {
|
|
304553
|
-
return { loop: this.collectChildren(data) };
|
|
304680
|
+
return { loop: this.collectChildren(data), isInner: data.isInner ? true : undefined };
|
|
304554
304681
|
}
|
|
304555
304682
|
/** Convert strongly typed instance to tagged json */
|
|
304556
304683
|
handleParityRegion(data) {
|
|
@@ -304566,12 +304693,10 @@ var IModelJson;
|
|
|
304566
304693
|
}
|
|
304567
304694
|
collectChildren(data) {
|
|
304568
304695
|
const children = [];
|
|
304569
|
-
|
|
304570
|
-
|
|
304571
|
-
|
|
304572
|
-
|
|
304573
|
-
children.push(cdata);
|
|
304574
|
-
}
|
|
304696
|
+
for (const child of data.children) {
|
|
304697
|
+
const cdata = child.dispatchToGeometryHandler(this);
|
|
304698
|
+
if (cdata)
|
|
304699
|
+
children.push(cdata);
|
|
304575
304700
|
}
|
|
304576
304701
|
return children;
|
|
304577
304702
|
}
|
|
@@ -343250,7 +343375,7 @@ class TestContext {
|
|
|
343250
343375
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
343251
343376
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
343252
343377
|
await core_frontend_1.NoRenderApp.startup({
|
|
343253
|
-
applicationVersion: "5.14.0-dev.
|
|
343378
|
+
applicationVersion: "5.14.0-dev.8",
|
|
343254
343379
|
applicationId: this.settings.gprid,
|
|
343255
343380
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
343256
343381
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -369992,7 +370117,7 @@ class WMS {
|
|
|
369992
370117
|
(module) {
|
|
369993
370118
|
|
|
369994
370119
|
"use strict";
|
|
369995
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.
|
|
370120
|
+
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"}}');
|
|
369996
370121
|
|
|
369997
370122
|
/***/ },
|
|
369998
370123
|
|