@itwin/rpcinterface-full-stack-tests 5.1.0-dev.1 → 5.1.0-dev.12
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/backend/BackendInit.js.map +1 -1
- package/lib/common/Settings.js +12 -12
- package/lib/common/Settings.js.map +1 -1
- package/lib/common/SideChannels.js.map +1 -1
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +872 -471
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/frontend/CodeSpecs.test.js.map +1 -1
- package/lib/frontend/DevToolsRpc.test.js.map +1 -1
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/IModel.test.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Models.test.js.map +1 -1
- package/lib/frontend/PresentationRpc.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +14 -14
|
@@ -68621,6 +68621,20 @@ var RenderSchedule;
|
|
|
68621
68621
|
get maxBatchId() {
|
|
68622
68622
|
return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));
|
|
68623
68623
|
}
|
|
68624
|
+
/**
|
|
68625
|
+
* Replaces all elementIds in a ScriptProps object with an empty string. Returns modified ScriptProps.
|
|
68626
|
+
* @param scheduleScript The script props to modify.
|
|
68627
|
+
* @internal */
|
|
68628
|
+
static removeScheduleScriptElementIds(scheduleScript) {
|
|
68629
|
+
scheduleScript.forEach((modelTimeline) => {
|
|
68630
|
+
modelTimeline.elementTimelines.forEach((elementTimeline) => {
|
|
68631
|
+
if (elementTimeline.elementIds) {
|
|
68632
|
+
elementTimeline.elementIds = "";
|
|
68633
|
+
}
|
|
68634
|
+
});
|
|
68635
|
+
});
|
|
68636
|
+
return scheduleScript;
|
|
68637
|
+
}
|
|
68624
68638
|
}
|
|
68625
68639
|
RenderSchedule.Script = Script;
|
|
68626
68640
|
/** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
|
|
@@ -94256,34 +94270,44 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
|
|
|
94256
94270
|
* @param name The name of the property to retrieve.
|
|
94257
94271
|
* @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
|
|
94258
94272
|
*/
|
|
94259
|
-
async getProperty(name, excludeInherited
|
|
94273
|
+
async getProperty(name, excludeInherited) {
|
|
94274
|
+
const upperKey = name.toUpperCase();
|
|
94275
|
+
let property;
|
|
94260
94276
|
if (this._properties) {
|
|
94261
|
-
|
|
94262
|
-
|
|
94263
|
-
if (property)
|
|
94277
|
+
property = this._properties.get(upperKey);
|
|
94278
|
+
if (property) {
|
|
94264
94279
|
return property;
|
|
94280
|
+
}
|
|
94265
94281
|
}
|
|
94266
94282
|
if (excludeInherited) {
|
|
94267
94283
|
return undefined;
|
|
94268
94284
|
}
|
|
94269
|
-
|
|
94285
|
+
if (!this._mergedPropertyCache) {
|
|
94286
|
+
this._mergedPropertyCache = await this.buildPropertyCache();
|
|
94287
|
+
}
|
|
94288
|
+
return this._mergedPropertyCache.get(upperKey);
|
|
94270
94289
|
}
|
|
94271
94290
|
/**
|
|
94272
94291
|
* Searches, case-insensitive, for a local ECProperty with the name provided.
|
|
94273
94292
|
* @param name The name of the property to retrieve.
|
|
94274
94293
|
* @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
|
|
94275
94294
|
*/
|
|
94276
|
-
getPropertySync(name, excludeInherited
|
|
94295
|
+
getPropertySync(name, excludeInherited) {
|
|
94296
|
+
const upperKey = name.toUpperCase();
|
|
94297
|
+
let property;
|
|
94277
94298
|
if (this._properties) {
|
|
94278
|
-
|
|
94279
|
-
|
|
94280
|
-
if (property)
|
|
94299
|
+
property = this._properties.get(upperKey);
|
|
94300
|
+
if (property) {
|
|
94281
94301
|
return property;
|
|
94302
|
+
}
|
|
94282
94303
|
}
|
|
94283
94304
|
if (excludeInherited) {
|
|
94284
94305
|
return undefined;
|
|
94285
94306
|
}
|
|
94286
|
-
|
|
94307
|
+
if (!this._mergedPropertyCache) {
|
|
94308
|
+
this._mergedPropertyCache = this.buildPropertyCacheSync();
|
|
94309
|
+
}
|
|
94310
|
+
return this._mergedPropertyCache.get(upperKey);
|
|
94287
94311
|
}
|
|
94288
94312
|
/**
|
|
94289
94313
|
* Searches the base class, if one exists, for the property with the name provided.
|
|
@@ -94615,69 +94639,51 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
|
|
|
94615
94639
|
}
|
|
94616
94640
|
/**
|
|
94617
94641
|
*
|
|
94618
|
-
* @param
|
|
94619
|
-
* @
|
|
94620
|
-
* @param propertiesToMerge
|
|
94621
|
-
* @param overwriteExisting
|
|
94642
|
+
* @param cache
|
|
94643
|
+
* @returns
|
|
94622
94644
|
*
|
|
94623
94645
|
* @internal
|
|
94624
94646
|
*/
|
|
94625
|
-
|
|
94626
|
-
|
|
94627
|
-
|
|
94628
|
-
|
|
94629
|
-
|
|
94630
|
-
if (
|
|
94631
|
-
|
|
94647
|
+
async buildPropertyCache() {
|
|
94648
|
+
const cache = new Map();
|
|
94649
|
+
const baseClass = await this.baseClass;
|
|
94650
|
+
if (baseClass) {
|
|
94651
|
+
for (const property of await baseClass.getProperties()) {
|
|
94652
|
+
if (!cache.has(property.name.toUpperCase())) {
|
|
94653
|
+
cache.set(property.name.toUpperCase(), property);
|
|
94632
94654
|
}
|
|
94633
94655
|
}
|
|
94634
|
-
else {
|
|
94635
|
-
existingValues.set(upperCaseName, target.length);
|
|
94636
|
-
target.push(property);
|
|
94637
|
-
}
|
|
94638
94656
|
}
|
|
94639
|
-
|
|
94640
|
-
|
|
94641
|
-
|
|
94642
|
-
|
|
94643
|
-
* @param existingValues
|
|
94644
|
-
* @returns
|
|
94645
|
-
*
|
|
94646
|
-
* @internal
|
|
94647
|
-
*/
|
|
94648
|
-
async buildPropertyCache(result, existingValues) {
|
|
94649
|
-
if (!existingValues) {
|
|
94650
|
-
existingValues = new Map();
|
|
94651
|
-
}
|
|
94652
|
-
if (this.baseClass) {
|
|
94653
|
-
const baseClass = await this.baseClass;
|
|
94654
|
-
if (baseClass) {
|
|
94655
|
-
ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
|
|
94656
|
-
}
|
|
94657
|
+
if (this._properties) {
|
|
94658
|
+
this._properties.forEach(property => {
|
|
94659
|
+
cache.set(property.name.toUpperCase(), property);
|
|
94660
|
+
});
|
|
94657
94661
|
}
|
|
94658
|
-
|
|
94659
|
-
return;
|
|
94660
|
-
ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
|
|
94662
|
+
return cache;
|
|
94661
94663
|
}
|
|
94662
94664
|
/**
|
|
94663
94665
|
*
|
|
94664
|
-
* @param
|
|
94665
|
-
* @param existingValues
|
|
94666
|
+
* @param cache
|
|
94666
94667
|
* @returns
|
|
94667
94668
|
*
|
|
94668
94669
|
* @internal
|
|
94669
94670
|
*/
|
|
94670
|
-
buildPropertyCacheSync(
|
|
94671
|
-
|
|
94672
|
-
existingValues = new Map();
|
|
94673
|
-
}
|
|
94671
|
+
buildPropertyCacheSync() {
|
|
94672
|
+
const cache = new Map();
|
|
94674
94673
|
const baseClass = this.getBaseClassSync();
|
|
94675
94674
|
if (baseClass) {
|
|
94676
|
-
|
|
94675
|
+
for (const property of baseClass.getPropertiesSync()) {
|
|
94676
|
+
if (!cache.has(property.name.toUpperCase())) {
|
|
94677
|
+
cache.set(property.name.toUpperCase(), property);
|
|
94678
|
+
}
|
|
94679
|
+
}
|
|
94677
94680
|
}
|
|
94678
|
-
if (
|
|
94679
|
-
|
|
94680
|
-
|
|
94681
|
+
if (this._properties) {
|
|
94682
|
+
this._properties.forEach(property => {
|
|
94683
|
+
cache.set(property.name.toUpperCase(), property);
|
|
94684
|
+
});
|
|
94685
|
+
}
|
|
94686
|
+
return cache;
|
|
94681
94687
|
}
|
|
94682
94688
|
/**
|
|
94683
94689
|
* Clears all caches on this object. This is called implicitly for this class,
|
|
@@ -94698,10 +94704,9 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
|
|
|
94698
94704
|
return this._properties && this._properties.size > 0 ? this._properties.values() : [];
|
|
94699
94705
|
}
|
|
94700
94706
|
if (!this._mergedPropertyCache) {
|
|
94701
|
-
this._mergedPropertyCache =
|
|
94702
|
-
this.buildPropertyCacheSync(this._mergedPropertyCache, undefined);
|
|
94707
|
+
this._mergedPropertyCache = this.buildPropertyCacheSync();
|
|
94703
94708
|
}
|
|
94704
|
-
return this._mergedPropertyCache;
|
|
94709
|
+
return this._mergedPropertyCache.values();
|
|
94705
94710
|
}
|
|
94706
94711
|
/**
|
|
94707
94712
|
* Quick way to check whether this class has any local properties without having to use the iterable
|
|
@@ -95322,44 +95327,64 @@ class EntityClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
|
|
|
95322
95327
|
}
|
|
95323
95328
|
/**
|
|
95324
95329
|
*
|
|
95325
|
-
* @param
|
|
95326
|
-
* @
|
|
95330
|
+
* @param cache
|
|
95331
|
+
* @returns
|
|
95332
|
+
*
|
|
95327
95333
|
* @internal
|
|
95328
95334
|
*/
|
|
95329
|
-
async buildPropertyCache(
|
|
95330
|
-
|
|
95331
|
-
existingValues = new Map();
|
|
95332
|
-
}
|
|
95335
|
+
async buildPropertyCache() {
|
|
95336
|
+
const cache = new Map();
|
|
95333
95337
|
const baseClass = await this.baseClass;
|
|
95334
95338
|
if (baseClass) {
|
|
95335
|
-
|
|
95339
|
+
for (const property of await baseClass.getProperties()) {
|
|
95340
|
+
if (!cache.has(property.name.toUpperCase()))
|
|
95341
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95342
|
+
}
|
|
95336
95343
|
}
|
|
95337
95344
|
for (const mixin of this.mixins) {
|
|
95338
|
-
const
|
|
95339
|
-
|
|
95345
|
+
const mixinObj = await mixin;
|
|
95346
|
+
const mixinProps = mixinObj.getPropertiesSync();
|
|
95347
|
+
for (const property of mixinProps) {
|
|
95348
|
+
if (!cache.has(property.name.toUpperCase()))
|
|
95349
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95350
|
+
}
|
|
95340
95351
|
}
|
|
95341
|
-
const localProps = await this.getProperties();
|
|
95342
|
-
|
|
95352
|
+
const localProps = await this.getProperties(true);
|
|
95353
|
+
if (localProps) {
|
|
95354
|
+
for (const property of localProps) {
|
|
95355
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95356
|
+
}
|
|
95357
|
+
}
|
|
95358
|
+
return cache;
|
|
95343
95359
|
}
|
|
95344
95360
|
/**
|
|
95345
95361
|
*
|
|
95346
|
-
* @param
|
|
95347
|
-
* @param existingValues
|
|
95362
|
+
* @param cache
|
|
95348
95363
|
* @internal
|
|
95349
95364
|
*/
|
|
95350
|
-
buildPropertyCacheSync(
|
|
95351
|
-
|
|
95352
|
-
existingValues = new Map();
|
|
95353
|
-
}
|
|
95365
|
+
buildPropertyCacheSync() {
|
|
95366
|
+
const cache = new Map();
|
|
95354
95367
|
const baseClass = this.getBaseClassSync();
|
|
95355
95368
|
if (baseClass) {
|
|
95356
|
-
|
|
95369
|
+
Array.from(baseClass.getPropertiesSync()).forEach((property) => {
|
|
95370
|
+
if (!cache.has(property.name.toUpperCase()))
|
|
95371
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95372
|
+
});
|
|
95357
95373
|
}
|
|
95358
95374
|
for (const mixin of this.getMixinsSync()) {
|
|
95359
|
-
|
|
95375
|
+
const mixinProps = mixin.getPropertiesSync();
|
|
95376
|
+
for (const property of mixinProps) {
|
|
95377
|
+
if (!cache.has(property.name.toUpperCase()))
|
|
95378
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95379
|
+
}
|
|
95360
95380
|
}
|
|
95361
95381
|
const localProps = this.getPropertiesSync(true);
|
|
95362
|
-
|
|
95382
|
+
if (localProps) {
|
|
95383
|
+
Array.from(localProps).forEach(property => {
|
|
95384
|
+
cache.set(property.name.toUpperCase(), property);
|
|
95385
|
+
});
|
|
95386
|
+
}
|
|
95387
|
+
return cache;
|
|
95363
95388
|
}
|
|
95364
95389
|
/**
|
|
95365
95390
|
*
|
|
@@ -101522,6 +101547,170 @@ class SchemaGraph {
|
|
|
101522
101547
|
}
|
|
101523
101548
|
|
|
101524
101549
|
|
|
101550
|
+
/***/ }),
|
|
101551
|
+
|
|
101552
|
+
/***/ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js":
|
|
101553
|
+
/*!**********************************************************************!*\
|
|
101554
|
+
!*** ../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js ***!
|
|
101555
|
+
\**********************************************************************/
|
|
101556
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
101557
|
+
|
|
101558
|
+
"use strict";
|
|
101559
|
+
__webpack_require__.r(__webpack_exports__);
|
|
101560
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
101561
|
+
/* harmony export */ ECSchemaRpcInterface: () => (/* binding */ ECSchemaRpcInterface)
|
|
101562
|
+
/* harmony export */ });
|
|
101563
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
101564
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
101565
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
101566
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
101567
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
101568
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
101569
|
+
};
|
|
101570
|
+
/*---------------------------------------------------------------------------------------------
|
|
101571
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
101572
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
101573
|
+
*--------------------------------------------------------------------------------------------*/
|
|
101574
|
+
|
|
101575
|
+
/***
|
|
101576
|
+
* Defines an RPC interface to get schema information from a given iModel context.
|
|
101577
|
+
* Method @see getSchemaNames will return the names of schemas that live in this iModel.
|
|
101578
|
+
* The actual schemas can be downloaded using @see getSchemaJSON to get the schema as JSON props.
|
|
101579
|
+
* @internal
|
|
101580
|
+
*/
|
|
101581
|
+
class ECSchemaRpcInterface extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcInterface {
|
|
101582
|
+
/** The version of the RPC Interface. */
|
|
101583
|
+
static version = "2.0.0";
|
|
101584
|
+
static interfaceName = "ECSchemaRpcInterface";
|
|
101585
|
+
static interfaceVersion = ECSchemaRpcInterface.version;
|
|
101586
|
+
/**
|
|
101587
|
+
* Returns the RPC client instance for the frontend.
|
|
101588
|
+
* @returns A client to communicate with the RPC Interface.
|
|
101589
|
+
*/
|
|
101590
|
+
static getClient() {
|
|
101591
|
+
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcManager.getClientForInterface(ECSchemaRpcInterface);
|
|
101592
|
+
}
|
|
101593
|
+
/**
|
|
101594
|
+
* Returns an array of SchemaKeyProps that exists in the current iModel context. The client can call
|
|
101595
|
+
* SchemaKey.fromJson() to parse the props to a SchemaKey.
|
|
101596
|
+
* @param tokenProps The iModelToken props that hold the information which iModel is used.
|
|
101597
|
+
* @returns An array of SchemaKeyProps.
|
|
101598
|
+
*/
|
|
101599
|
+
async getSchemaKeys(_tokenProps) {
|
|
101600
|
+
return this.forward.apply(this, [arguments]);
|
|
101601
|
+
}
|
|
101602
|
+
/**
|
|
101603
|
+
* Gets the schema JSON for the current iModel context and returns the schema as a SchemaProps which
|
|
101604
|
+
* the client can call Schema.fromJson() to return a Schema.
|
|
101605
|
+
* @param tokenProps The iModelToken props that hold the information which iModel is used.
|
|
101606
|
+
* @param schemaName The name of the schema that shall be returned.
|
|
101607
|
+
* @returns The SchemaProps.
|
|
101608
|
+
*/
|
|
101609
|
+
async getSchemaJSON(_tokenProps, _schemaName) {
|
|
101610
|
+
return this.forward.apply(this, [arguments]);
|
|
101611
|
+
}
|
|
101612
|
+
}
|
|
101613
|
+
__decorate([
|
|
101614
|
+
_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.allowResponseCaching(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
|
|
101615
|
+
], ECSchemaRpcInterface.prototype, "getSchemaKeys", null);
|
|
101616
|
+
__decorate([
|
|
101617
|
+
_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.allowResponseCaching(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
|
|
101618
|
+
], ECSchemaRpcInterface.prototype, "getSchemaJSON", null);
|
|
101619
|
+
|
|
101620
|
+
|
|
101621
|
+
/***/ }),
|
|
101622
|
+
|
|
101623
|
+
/***/ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js":
|
|
101624
|
+
/*!********************************************************************!*\
|
|
101625
|
+
!*** ../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js ***!
|
|
101626
|
+
\********************************************************************/
|
|
101627
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
101628
|
+
|
|
101629
|
+
"use strict";
|
|
101630
|
+
__webpack_require__.r(__webpack_exports__);
|
|
101631
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
101632
|
+
/* harmony export */ ECSchemaRpcLocater: () => (/* binding */ ECSchemaRpcLocater)
|
|
101633
|
+
/* harmony export */ });
|
|
101634
|
+
/* harmony import */ var _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/esm/ecschema-metadata.js");
|
|
101635
|
+
/* harmony import */ var _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ECSchemaRpcInterface */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js");
|
|
101636
|
+
/*---------------------------------------------------------------------------------------------
|
|
101637
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
101638
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
101639
|
+
*--------------------------------------------------------------------------------------------*/
|
|
101640
|
+
|
|
101641
|
+
|
|
101642
|
+
/**
|
|
101643
|
+
* Defines a schema locater that retrieves schemas using an RPC interface.
|
|
101644
|
+
* @public @preview
|
|
101645
|
+
*/
|
|
101646
|
+
class ECSchemaRpcLocater {
|
|
101647
|
+
/** @internal */
|
|
101648
|
+
token;
|
|
101649
|
+
constructor(token) { this.token = token; }
|
|
101650
|
+
/**
|
|
101651
|
+
* Attempts to get a schema from the schema rpc locater. Yields undefined if no matching schema is found.
|
|
101652
|
+
* @param schemaKey Key to look up
|
|
101653
|
+
* @param matchType How to match key against candidate schemas
|
|
101654
|
+
* @param context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist.
|
|
101655
|
+
*/
|
|
101656
|
+
async getSchema(schemaKey, matchType, context) {
|
|
101657
|
+
await this.getSchemaInfo(schemaKey, matchType, context);
|
|
101658
|
+
const schema = await context.getCachedSchema(schemaKey, matchType);
|
|
101659
|
+
return schema;
|
|
101660
|
+
}
|
|
101661
|
+
/**
|
|
101662
|
+
* Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
|
|
101663
|
+
* The fully loaded schema can be accessed via the schema context using the getCachedSchema method.
|
|
101664
|
+
* @param schemaKey The SchemaKey describing the schema to get from the cache.
|
|
101665
|
+
* @param matchType The match type to use when locating the schema
|
|
101666
|
+
*/
|
|
101667
|
+
async getSchemaInfo(schemaKey, matchType, context) {
|
|
101668
|
+
const schemaJson = await _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_1__.ECSchemaRpcInterface.getClient().getSchemaJSON(this.token, schemaKey.name);
|
|
101669
|
+
const schemaInfo = await _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.Schema.startLoadingFromJson(schemaJson, context || new _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.SchemaContext());
|
|
101670
|
+
if (schemaInfo !== undefined && schemaInfo.schemaKey.matches(schemaKey, matchType)) {
|
|
101671
|
+
return schemaInfo;
|
|
101672
|
+
}
|
|
101673
|
+
return undefined;
|
|
101674
|
+
}
|
|
101675
|
+
/**
|
|
101676
|
+
* This method is not supported for locating schemas over RPC/HTTP.
|
|
101677
|
+
* Use the asynchronous `getSchema` method instead.
|
|
101678
|
+
* @param _schemaKey Key to look up
|
|
101679
|
+
* @param _matchType How to match key against candidate schemas
|
|
101680
|
+
* @param _context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist.
|
|
101681
|
+
* @throws Error Always throws an error indicating this method is not supported.
|
|
101682
|
+
* @deprecated in 5.0 Use the asynchronous `getSchema` method for schema retrieval.
|
|
101683
|
+
*/
|
|
101684
|
+
getSchemaSync(_schemaKey, _matchType, _context) {
|
|
101685
|
+
throw new Error("getSchemaSync is not supported. Use the asynchronous getSchema method instead.");
|
|
101686
|
+
}
|
|
101687
|
+
}
|
|
101688
|
+
|
|
101689
|
+
|
|
101690
|
+
/***/ }),
|
|
101691
|
+
|
|
101692
|
+
/***/ "../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js":
|
|
101693
|
+
/*!************************************************************************!*\
|
|
101694
|
+
!*** ../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js ***!
|
|
101695
|
+
\************************************************************************/
|
|
101696
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
101697
|
+
|
|
101698
|
+
"use strict";
|
|
101699
|
+
__webpack_require__.r(__webpack_exports__);
|
|
101700
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
101701
|
+
/* harmony export */ ECSchemaRpcInterface: () => (/* reexport safe */ _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_0__.ECSchemaRpcInterface),
|
|
101702
|
+
/* harmony export */ ECSchemaRpcLocater: () => (/* reexport safe */ _ECSchemaRpcLocater__WEBPACK_IMPORTED_MODULE_1__.ECSchemaRpcLocater)
|
|
101703
|
+
/* harmony export */ });
|
|
101704
|
+
/* harmony import */ var _ECSchemaRpcInterface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ECSchemaRpcInterface */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcInterface.js");
|
|
101705
|
+
/* harmony import */ var _ECSchemaRpcLocater__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ECSchemaRpcLocater */ "../../core/ecschema-rpc/common/lib/esm/ECSchemaRpcLocater.js");
|
|
101706
|
+
/*---------------------------------------------------------------------------------------------
|
|
101707
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
101708
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
101709
|
+
*--------------------------------------------------------------------------------------------*/
|
|
101710
|
+
|
|
101711
|
+
|
|
101712
|
+
|
|
101713
|
+
|
|
101525
101714
|
/***/ }),
|
|
101526
101715
|
|
|
101527
101716
|
/***/ "../../core/frontend/lib/esm/AccuDraw.js":
|
|
@@ -103708,6 +103897,8 @@ class AccuDraw {
|
|
|
103708
103897
|
onFieldKeyinStatusChange(_index) { }
|
|
103709
103898
|
/** Called to request focus change to the specified input field */
|
|
103710
103899
|
setFocusItem(_index) { }
|
|
103900
|
+
/** Called to get the item field that currently has input focus */
|
|
103901
|
+
getFocusItem() { return undefined; }
|
|
103711
103902
|
static getMinPolarMag(origin) {
|
|
103712
103903
|
return (1.0e-12 * (1.0 + origin.magnitude()));
|
|
103713
103904
|
}
|
|
@@ -113608,6 +113799,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
113608
113799
|
/* harmony import */ var _ViewState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ViewState */ "../../core/frontend/lib/esm/ViewState.js");
|
|
113609
113800
|
/* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
113610
113801
|
/* harmony import */ var _IpcApp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./IpcApp */ "../../core/frontend/lib/esm/IpcApp.js");
|
|
113802
|
+
/* harmony import */ var _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/esm/ecschema-metadata.js");
|
|
113803
|
+
/* harmony import */ var _itwin_ecschema_rpcinterface_common__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/esm/ecschema-rpc-interface.js");
|
|
113611
113804
|
/*---------------------------------------------------------------------------------------------
|
|
113612
113805
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
113613
113806
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -113630,6 +113823,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
113630
113823
|
|
|
113631
113824
|
|
|
113632
113825
|
|
|
113826
|
+
|
|
113827
|
+
|
|
113633
113828
|
const loggerCategory = _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_3__.FrontendLoggerCategory.IModelConnection;
|
|
113634
113829
|
/** A connection to a [IModelDb]($backend) hosted on the backend.
|
|
113635
113830
|
* @public
|
|
@@ -113712,6 +113907,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113712
113907
|
* @deprecated in 5.0.0. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
|
|
113713
113908
|
*/
|
|
113714
113909
|
fontMap; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
113910
|
+
_schemaContext;
|
|
113715
113911
|
/** Load the FontMap for this IModelConnection.
|
|
113716
113912
|
* @returns Returns a Promise<FontMap> that is fulfilled when the FontMap member of this IModelConnection is valid.
|
|
113717
113913
|
* @deprecated in 5.0.0. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
|
|
@@ -114100,6 +114296,24 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
114100
114296
|
}
|
|
114101
114297
|
return ("number" === typeof this._projectCenterAltitude) ? this._projectCenterAltitude : undefined;
|
|
114102
114298
|
}
|
|
114299
|
+
/**
|
|
114300
|
+
* Gets the context that allows accessing the metadata (see `@itwin/ecschema-metadata` package) of this iModel.
|
|
114301
|
+
* The context is created lazily when this property is accessed for the first time, with an `ECSchemaRpcLocater` registered as a fallback locater, enabling users to register their own locater that'd take more priority.
|
|
114302
|
+
* This means to correctly access schema context, client-side applications must register `ECSchemaRpcInterface` following instructions for [RPC configuration]($docs/learning/rpcinterface/#client-side-configuration).
|
|
114303
|
+
* Server-side applications would also [configure RPC]($docs/learning/rpcinterface/#server-side-configuration) as needed.
|
|
114304
|
+
*
|
|
114305
|
+
* @note While a `BlankConnection` returns a valid `schemaContext`, it has an invalid locater registered by default, and will throw an error when trying to call it's methods.
|
|
114306
|
+
* @beta
|
|
114307
|
+
*/
|
|
114308
|
+
get schemaContext() {
|
|
114309
|
+
if (this._schemaContext === undefined) {
|
|
114310
|
+
const context = new _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_15__.SchemaContext();
|
|
114311
|
+
const locater = new _itwin_ecschema_rpcinterface_common__WEBPACK_IMPORTED_MODULE_16__.ECSchemaRpcLocater(this._getRpcProps());
|
|
114312
|
+
context.addFallbackLocater(locater);
|
|
114313
|
+
this._schemaContext = context;
|
|
114314
|
+
}
|
|
114315
|
+
return this._schemaContext;
|
|
114316
|
+
}
|
|
114103
114317
|
}
|
|
114104
114318
|
/** A connection that exists without an iModel. Useful for connecting to Reality Data services.
|
|
114105
114319
|
* @note This class exists because our display system requires an IModelConnection type even if only reality data is drawn.
|
|
@@ -118817,8 +119031,18 @@ class ViewAttachments {
|
|
|
118817
119031
|
get isEmpty() {
|
|
118818
119032
|
return 0 === this._attachments.length;
|
|
118819
119033
|
}
|
|
118820
|
-
|
|
118821
|
-
return this._attachments.every((x) =>
|
|
119034
|
+
areAllTileTreesLoaded(displayedExtents) {
|
|
119035
|
+
return this._attachments.every((x) => {
|
|
119036
|
+
const placement = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Placement2d.fromJSON(x.viewAttachmentProps.placement);
|
|
119037
|
+
const attachmentRange = placement.calculateRange();
|
|
119038
|
+
if (!attachmentRange.intersectsRangeXY(displayedExtents))
|
|
119039
|
+
return true;
|
|
119040
|
+
return x.areAllTileTreesLoaded;
|
|
119041
|
+
});
|
|
119042
|
+
}
|
|
119043
|
+
/** Strictly for testing purposes */
|
|
119044
|
+
areAllAttachmentsLoaded() {
|
|
119045
|
+
return this._attachments.every((attachment) => attachment.areAllTileTreesLoaded);
|
|
118822
119046
|
}
|
|
118823
119047
|
discloseTileTrees(trees) {
|
|
118824
119048
|
for (const attachment of this._attachments)
|
|
@@ -118997,7 +119221,19 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
|
|
|
118997
119221
|
this._attachments = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._attachments);
|
|
118998
119222
|
}
|
|
118999
119223
|
get areAllTileTreesLoaded() {
|
|
119000
|
-
|
|
119224
|
+
let displayedExtents = this._viewedExtents;
|
|
119225
|
+
const frustum = this.calculateFrustum();
|
|
119226
|
+
if (frustum) {
|
|
119227
|
+
displayedExtents = frustum.toRange();
|
|
119228
|
+
}
|
|
119229
|
+
return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded(displayedExtents));
|
|
119230
|
+
}
|
|
119231
|
+
/** @internal Strictly for testing */
|
|
119232
|
+
areAllAttachmentsLoaded() {
|
|
119233
|
+
if (this._attachments) {
|
|
119234
|
+
return this._attachments.areAllAttachmentsLoaded();
|
|
119235
|
+
}
|
|
119236
|
+
return true;
|
|
119001
119237
|
}
|
|
119002
119238
|
/** Create a sheet border decoration graphic. */
|
|
119003
119239
|
createBorder(width, height, context) {
|
|
@@ -121072,16 +121308,21 @@ class RenderContext {
|
|
|
121072
121308
|
* @public
|
|
121073
121309
|
*/
|
|
121074
121310
|
class DynamicsContext extends RenderContext {
|
|
121075
|
-
|
|
121311
|
+
_foreground;
|
|
121312
|
+
_overlay;
|
|
121076
121313
|
/** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */
|
|
121077
121314
|
addGraphic(graphic) {
|
|
121078
|
-
|
|
121079
|
-
|
|
121080
|
-
|
|
121315
|
+
this.add(graphic, false);
|
|
121316
|
+
}
|
|
121317
|
+
/** @internal */
|
|
121318
|
+
add(graphic, isOverlay) {
|
|
121319
|
+
const key = isOverlay ? "_overlay" : "_foreground";
|
|
121320
|
+
const list = this[key] ?? (this[key] = []);
|
|
121321
|
+
list.push(graphic);
|
|
121081
121322
|
}
|
|
121082
121323
|
/** @internal */
|
|
121083
121324
|
changeDynamics() {
|
|
121084
|
-
this.viewport.changeDynamics(this.
|
|
121325
|
+
this.viewport.changeDynamics(this._foreground, this._overlay);
|
|
121085
121326
|
}
|
|
121086
121327
|
/** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].
|
|
121087
121328
|
* @param options Options describing how to create the builder.
|
|
@@ -122185,10 +122426,10 @@ class ViewManager {
|
|
|
122185
122426
|
this.inDynamicsMode = false;
|
|
122186
122427
|
const cursorVp = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.toolAdmin.cursorView;
|
|
122187
122428
|
if (cursorVp)
|
|
122188
|
-
cursorVp.changeDynamics(undefined);
|
|
122429
|
+
cursorVp.changeDynamics(undefined, undefined);
|
|
122189
122430
|
for (const vp of this._viewports) {
|
|
122190
122431
|
if (vp !== cursorVp)
|
|
122191
|
-
vp.changeDynamics(undefined);
|
|
122432
|
+
vp.changeDynamics(undefined, undefined);
|
|
122192
122433
|
}
|
|
122193
122434
|
}
|
|
122194
122435
|
/** @internal */
|
|
@@ -126486,8 +126727,8 @@ class Viewport {
|
|
|
126486
126727
|
return this.view.is3d() && this.view.isCameraOn;
|
|
126487
126728
|
}
|
|
126488
126729
|
/** @internal */
|
|
126489
|
-
changeDynamics(dynamics) {
|
|
126490
|
-
this.target.changeDynamics(dynamics);
|
|
126730
|
+
changeDynamics(dynamics, overlay) {
|
|
126731
|
+
this.target.changeDynamics(dynamics, overlay);
|
|
126491
126732
|
this.invalidateDecorations();
|
|
126492
126733
|
}
|
|
126493
126734
|
_assigningFlashedId = false;
|
|
@@ -137627,12 +137868,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
137627
137868
|
* @internal
|
|
137628
137869
|
*/
|
|
137629
137870
|
async function loadScript(jsUrl) {
|
|
137630
|
-
|
|
137631
|
-
// Webpack gives a warning:
|
|
137632
|
-
// "Critical dependency: the request of a dependency is an expression"
|
|
137633
|
-
// Because tsc transpiles "await import" to "require" (when compiled to is CommonJS).
|
|
137634
|
-
// So use FunctionConstructor to avoid tsc.
|
|
137635
|
-
const module = await Function("x", "return import(x)")(jsUrl);
|
|
137871
|
+
const module = await __webpack_require__("../../core/frontend/lib/esm/extension/providers lazy recursive")(jsUrl);
|
|
137636
137872
|
return execute(module);
|
|
137637
137873
|
}
|
|
137638
137874
|
/** attempts to execute an extension module */
|
|
@@ -138082,7 +138318,7 @@ var MockRender;
|
|
|
138082
138318
|
get analysisFraction() { return 0; }
|
|
138083
138319
|
set analysisFraction(_fraction) { }
|
|
138084
138320
|
changeScene(_scene) { }
|
|
138085
|
-
changeDynamics(
|
|
138321
|
+
changeDynamics(_foreground, _overlay) { }
|
|
138086
138322
|
changeDecorations(_decs) { }
|
|
138087
138323
|
changeRenderPlan(_plan) { }
|
|
138088
138324
|
drawFrame(_sceneTime) { }
|
|
@@ -147425,7 +147661,7 @@ class MeshGraphic extends _Graphic__WEBPACK_IMPORTED_MODULE_2__.Graphic {
|
|
|
147425
147661
|
}
|
|
147426
147662
|
unionRange(range) {
|
|
147427
147663
|
if (this._instances)
|
|
147428
|
-
range.extendRange(range);
|
|
147664
|
+
range.extendRange(this._instances.range);
|
|
147429
147665
|
else
|
|
147430
147666
|
range.extendRange(this._meshRange);
|
|
147431
147667
|
}
|
|
@@ -150172,9 +150408,8 @@ class RenderCommands {
|
|
|
150172
150408
|
this.addGraphics(gfx.foreground);
|
|
150173
150409
|
this.addBackgroundMapGraphics(gfx.background);
|
|
150174
150410
|
this.addOverlayGraphics(gfx.overlays);
|
|
150175
|
-
|
|
150176
|
-
|
|
150177
|
-
this.addDecorations(dynamics);
|
|
150411
|
+
this.addGraphics(gfx.foregroundDynamics);
|
|
150412
|
+
this.addOverlayGraphics(gfx.overlayDynamics);
|
|
150178
150413
|
const dec = gfx.decorations;
|
|
150179
150414
|
if (undefined !== dec) {
|
|
150180
150415
|
this.addBackground(dec.viewBackground);
|
|
@@ -157132,8 +157367,8 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
|
|
|
157132
157367
|
this.changeDrapesOrClassifiers(this._planarClassifiers, planarClassifiers);
|
|
157133
157368
|
this._planarClassifiers = planarClassifiers;
|
|
157134
157369
|
}
|
|
157135
|
-
changeDynamics(
|
|
157136
|
-
this.graphics.
|
|
157370
|
+
changeDynamics(foreground, overlay) {
|
|
157371
|
+
this.graphics.changeDynamics(foreground, overlay);
|
|
157137
157372
|
}
|
|
157138
157373
|
overrideFeatureSymbology(ovr) {
|
|
157139
157374
|
this.uniforms.branch.overrideFeatureSymbology(ovr);
|
|
@@ -158014,26 +158249,29 @@ class TargetGraphics {
|
|
|
158014
158249
|
foreground = [];
|
|
158015
158250
|
background = [];
|
|
158016
158251
|
overlays = [];
|
|
158017
|
-
|
|
158252
|
+
foregroundDynamics = [];
|
|
158253
|
+
overlayDynamics = [];
|
|
158018
158254
|
_decorations;
|
|
158019
158255
|
[Symbol.dispose]() {
|
|
158020
158256
|
this.foreground.length = this.background.length = this.overlays.length = 0;
|
|
158021
|
-
|
|
158257
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
|
|
158258
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
|
|
158022
158259
|
this._decorations = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._decorations);
|
|
158023
158260
|
}
|
|
158024
158261
|
get isDisposed() {
|
|
158025
158262
|
return 0 === this.foreground.length && 0 === this.background.length && 0 === this.overlays.length
|
|
158026
|
-
&&
|
|
158263
|
+
&& 0 === this.foregroundDynamics.length && 0 === this.overlayDynamics.length && !this._decorations;
|
|
158027
158264
|
}
|
|
158028
158265
|
changeScene(scene) {
|
|
158029
158266
|
this.foreground = scene.foreground;
|
|
158030
158267
|
this.background = scene.background;
|
|
158031
158268
|
this.overlays = scene.overlay;
|
|
158032
158269
|
}
|
|
158033
|
-
|
|
158034
|
-
|
|
158035
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.
|
|
158036
|
-
this.
|
|
158270
|
+
changeDynamics(foreground, overlay) {
|
|
158271
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
|
|
158272
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
|
|
158273
|
+
this.foregroundDynamics = foreground ?? [];
|
|
158274
|
+
this.overlayDynamics = overlay ?? [];
|
|
158037
158275
|
}
|
|
158038
158276
|
get decorations() { return this._decorations; }
|
|
158039
158277
|
set decorations(decorations) {
|
|
@@ -170568,6 +170806,7 @@ class GraphicsCollectorDrawArgs extends _tile_internal__WEBPACK_IMPORTED_MODULE_
|
|
|
170568
170806
|
return undefined;
|
|
170569
170807
|
return new GraphicsCollectorDrawArgs(planes, worldToViewMap, collector, args);
|
|
170570
170808
|
}
|
|
170809
|
+
get shouldCollectClassifierGraphics() { return false; }
|
|
170571
170810
|
}
|
|
170572
170811
|
|
|
170573
170812
|
|
|
@@ -170838,6 +171077,7 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
|
|
|
170838
171077
|
if (format !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileFormat.IModel)
|
|
170839
171078
|
return content;
|
|
170840
171079
|
const sizeMultiplier = this.hasSizeMultiplier ? this.sizeMultiplier : undefined;
|
|
171080
|
+
const ecefTransform = this.tree.iModel.isGeoLocated ? this.tree.iModel.getEcefTransform() : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
170841
171081
|
try {
|
|
170842
171082
|
content = await this.iModelTree.decoder.decode({
|
|
170843
171083
|
stream: streamBuffer,
|
|
@@ -170846,7 +171086,7 @@ class IModelTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
|
|
|
170846
171086
|
isCanceled,
|
|
170847
171087
|
sizeMultiplier,
|
|
170848
171088
|
tileData: {
|
|
170849
|
-
ecefTransform
|
|
171089
|
+
ecefTransform,
|
|
170850
171090
|
range: this.range,
|
|
170851
171091
|
layerClassifiers: this.tree.layerHandler?.layerClassifiers,
|
|
170852
171092
|
},
|
|
@@ -171555,7 +171795,8 @@ class IModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.TileTre
|
|
|
171555
171795
|
draw(args) {
|
|
171556
171796
|
const tiles = this.selectTiles(args);
|
|
171557
171797
|
this._rootTile.draw(args, tiles, this._numStaticTilesSelected);
|
|
171558
|
-
|
|
171798
|
+
if (args.shouldCollectClassifierGraphics)
|
|
171799
|
+
this._layerHandler.collectClassifierGraphics(args, tiles);
|
|
171559
171800
|
}
|
|
171560
171801
|
prune() {
|
|
171561
171802
|
const olderThan = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.now().minus(this.expirationTime);
|
|
@@ -172687,14 +172928,20 @@ class LayerTileTreeReferenceHandler {
|
|
|
172687
172928
|
removals.push(context.viewport.displayStyle.settings.onMapImageryChanged.addListener((imagery) => {
|
|
172688
172929
|
this.setBaseLayerSettings(imagery.backgroundBase);
|
|
172689
172930
|
this.setLayerSettings(imagery.backgroundLayers);
|
|
172690
|
-
this.clearLayers();
|
|
172691
172931
|
}));
|
|
172692
172932
|
}
|
|
172693
172933
|
removals.push(context.viewport.onChangeView.addListener((vp, previousViewState) => {
|
|
172694
172934
|
if ((0,_tile_internal__WEBPACK_IMPORTED_MODULE_1__.compareMapLayer)(previousViewState, vp.view)) {
|
|
172695
172935
|
this.setBaseLayerSettings(mapImagery.backgroundBase);
|
|
172696
172936
|
this.setLayerSettings(mapImagery.backgroundLayers);
|
|
172697
|
-
|
|
172937
|
+
}
|
|
172938
|
+
}));
|
|
172939
|
+
removals.push(context.viewport.onViewedModelsChanged.addListener((viewport) => {
|
|
172940
|
+
const layers = viewport.displayStyle.settings.mapImagery.backgroundLayers;
|
|
172941
|
+
if (layers.length > 0) {
|
|
172942
|
+
this.setBaseLayerSettings(mapImagery.backgroundBase);
|
|
172943
|
+
this.setLayerSettings(mapImagery.backgroundLayers);
|
|
172944
|
+
viewport.invalidateScene();
|
|
172698
172945
|
}
|
|
172699
172946
|
}));
|
|
172700
172947
|
}
|
|
@@ -175362,8 +175609,9 @@ class RealityTileLoader {
|
|
|
175362
175609
|
isCanceled = () => !tile.isLoading;
|
|
175363
175610
|
const { is3d, yAxisUp, iModel, modelId } = tile.realityRoot;
|
|
175364
175611
|
let reader;
|
|
175612
|
+
const ecefTransform = tile.tree.iModel.isGeoLocated ? tile.tree.iModel.getEcefTransform() : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
175365
175613
|
const tileData = {
|
|
175366
|
-
ecefTransform
|
|
175614
|
+
ecefTransform,
|
|
175367
175615
|
range: tile.range,
|
|
175368
175616
|
layerClassifiers: tile.tree.layerHandler?.layerClassifiers,
|
|
175369
175617
|
};
|
|
@@ -186678,7 +186926,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
186678
186926
|
sortIndices = selectedTiles.map((_x, i) => i);
|
|
186679
186927
|
sortIndices.sort((a, b) => selectedTiles[a].depth - selectedTiles[b].depth);
|
|
186680
186928
|
}
|
|
186681
|
-
if (
|
|
186929
|
+
if (args.shouldCollectClassifierGraphics)
|
|
186682
186930
|
this.collectClassifierGraphics(args, selectedTiles);
|
|
186683
186931
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(selectedTiles.length === displayedTileDescendants.length);
|
|
186684
186932
|
for (let i = 0; i < selectedTiles.length; i++) {
|
|
@@ -188832,6 +189080,8 @@ class TileDrawArgs {
|
|
|
188832
189080
|
processSelectedTiles(_tiles) { }
|
|
188833
189081
|
/* @internal */
|
|
188834
189082
|
get maxRealityTreeSelectionCount() { return undefined; }
|
|
189083
|
+
/* @internal */
|
|
189084
|
+
get shouldCollectClassifierGraphics() { return true; }
|
|
188835
189085
|
}
|
|
188836
189086
|
|
|
188837
189087
|
|
|
@@ -192132,6 +192382,18 @@ class MapCartoRectangle extends _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0_
|
|
|
192132
192382
|
scratchMercatorFractionRange.high.y = tilingScheme.latitudeToYFraction(this.high.y);
|
|
192133
192383
|
return scratchMercatorFractionRange;
|
|
192134
192384
|
}
|
|
192385
|
+
/**
|
|
192386
|
+
* Compute rectangle with angles specified in degrees.
|
|
192387
|
+
* @beta
|
|
192388
|
+
*/
|
|
192389
|
+
toDegrees() {
|
|
192390
|
+
return {
|
|
192391
|
+
north: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.north),
|
|
192392
|
+
south: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.south),
|
|
192393
|
+
east: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.east),
|
|
192394
|
+
west: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Angle.radiansToDegrees(this.west),
|
|
192395
|
+
};
|
|
192396
|
+
}
|
|
192135
192397
|
}
|
|
192136
192398
|
|
|
192137
192399
|
|
|
@@ -192798,7 +193060,7 @@ class MapLayerImageryProvider {
|
|
|
192798
193060
|
}
|
|
192799
193061
|
}
|
|
192800
193062
|
/** @internal */
|
|
192801
|
-
async makeTileRequest(url, timeoutMs) {
|
|
193063
|
+
async makeTileRequest(url, timeoutMs, authorization) {
|
|
192802
193064
|
// We want to complete the first request before letting other requests go;
|
|
192803
193065
|
// this done to avoid flooding server with requests missing credentials
|
|
192804
193066
|
if (!this._firstRequestPromise)
|
|
@@ -192807,7 +193069,7 @@ class MapLayerImageryProvider {
|
|
|
192807
193069
|
await this._firstRequestPromise;
|
|
192808
193070
|
let response;
|
|
192809
193071
|
try {
|
|
192810
|
-
response = await this.makeRequest(url, timeoutMs);
|
|
193072
|
+
response = await this.makeRequest(url, timeoutMs, authorization);
|
|
192811
193073
|
}
|
|
192812
193074
|
finally {
|
|
192813
193075
|
this.onFirstRequestCompleted.raiseEvent();
|
|
@@ -192817,11 +193079,15 @@ class MapLayerImageryProvider {
|
|
|
192817
193079
|
return response;
|
|
192818
193080
|
}
|
|
192819
193081
|
/** @internal */
|
|
192820
|
-
async makeRequest(url, timeoutMs) {
|
|
193082
|
+
async makeRequest(url, timeoutMs, authorization) {
|
|
192821
193083
|
let response;
|
|
192822
193084
|
let headers;
|
|
192823
193085
|
let hasCreds = false;
|
|
192824
|
-
if (
|
|
193086
|
+
if (authorization) {
|
|
193087
|
+
headers = new Headers();
|
|
193088
|
+
headers.set("Authorization", authorization);
|
|
193089
|
+
}
|
|
193090
|
+
else if (this._settings.userName && this._settings.password) {
|
|
192825
193091
|
hasCreds = true;
|
|
192826
193092
|
headers = new Headers();
|
|
192827
193093
|
this.setRequestAuthorization(headers);
|
|
@@ -195627,6 +195893,18 @@ class QuadId {
|
|
|
195627
195893
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(this.row, other.row) ||
|
|
195628
195894
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(this.column, other.column);
|
|
195629
195895
|
}
|
|
195896
|
+
/** Creates a QuadId from a JSON representation */
|
|
195897
|
+
static fromJSON(props) {
|
|
195898
|
+
return new QuadId(props.level, props.column, props.row);
|
|
195899
|
+
}
|
|
195900
|
+
/** Convert this QuadId to a JSON representation */
|
|
195901
|
+
static toJSON(props) {
|
|
195902
|
+
return {
|
|
195903
|
+
level: props.level,
|
|
195904
|
+
column: props.column,
|
|
195905
|
+
row: props.row,
|
|
195906
|
+
};
|
|
195907
|
+
}
|
|
195630
195908
|
}
|
|
195631
195909
|
|
|
195632
195910
|
|
|
@@ -197467,6 +197745,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
197467
197745
|
this._controls.overlay.remove();
|
|
197468
197746
|
this._controls = undefined;
|
|
197469
197747
|
this.unsuspendToolTips();
|
|
197748
|
+
this.removedControlRect();
|
|
197470
197749
|
}
|
|
197471
197750
|
createControlDiv() {
|
|
197472
197751
|
const div = document.createElement("div");
|
|
@@ -197554,6 +197833,10 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
197554
197833
|
style.outlineWidth = button.outlineWidth;
|
|
197555
197834
|
return itemLock;
|
|
197556
197835
|
}
|
|
197836
|
+
/** Called after the controls have been removed from the view. */
|
|
197837
|
+
removedControlRect() { }
|
|
197838
|
+
/** Called after the position of the controls in the supplied view is updated. */
|
|
197839
|
+
changedControlRect(_rect, _vp) { }
|
|
197557
197840
|
/** Use to override the position of the controls in the supplied view. */
|
|
197558
197841
|
modifyControlRect(_rect, _vp) { }
|
|
197559
197842
|
/** Return the ViewRect currently occupied by the controls in the supplied view. */
|
|
@@ -197650,6 +197933,8 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
197650
197933
|
return; // Keep showing at last valid location...
|
|
197651
197934
|
this._controls.div.style.left = `${controlRect.left}px`;
|
|
197652
197935
|
this._controls.div.style.top = `${controlRect.top}px`;
|
|
197936
|
+
this.changedControlRect(controlRect, vp);
|
|
197937
|
+
return;
|
|
197653
197938
|
}
|
|
197654
197939
|
get _isFocusHome() {
|
|
197655
197940
|
return (document.body === document.activeElement);
|
|
@@ -197672,6 +197957,13 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
197672
197957
|
// Indicate when keyboard shortcuts can't be used (i.e. focus not at AccuDraw or Home) by changing compass to monochrome...
|
|
197673
197958
|
return (this._isFocusHome || this._isFocusAccuDraw);
|
|
197674
197959
|
}
|
|
197960
|
+
/** Get the item field that currently has input focus.
|
|
197961
|
+
*/
|
|
197962
|
+
getFocusItem() {
|
|
197963
|
+
if (!this._isFocusAccuDraw)
|
|
197964
|
+
return undefined;
|
|
197965
|
+
return this._focusItem;
|
|
197966
|
+
}
|
|
197675
197967
|
/** Request to set focus to the specified AccuDraw input field to start entering values.
|
|
197676
197968
|
* The focused input field will be indicated by the background color.
|
|
197677
197969
|
*/
|
|
@@ -204504,6 +204796,7 @@ class CurrentInputState {
|
|
|
204504
204796
|
lastButton = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data;
|
|
204505
204797
|
inputSource = _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Unknown;
|
|
204506
204798
|
lastMotion = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d();
|
|
204799
|
+
lastMotionEvent;
|
|
204507
204800
|
lastWheelEvent;
|
|
204508
204801
|
lastTouchStart;
|
|
204509
204802
|
touchTapTimer;
|
|
@@ -204521,7 +204814,7 @@ class CurrentInputState {
|
|
|
204521
204814
|
onStartDrag(button) { this.button[button].isDragging = true; }
|
|
204522
204815
|
onInstallTool() {
|
|
204523
204816
|
this.clearKeyQualifiers();
|
|
204524
|
-
this.lastWheelEvent = undefined;
|
|
204817
|
+
this.lastWheelEvent = this.lastMotionEvent = undefined;
|
|
204525
204818
|
this.lastTouchStart = this.touchTapTimer = this.touchTapCount = undefined;
|
|
204526
204819
|
}
|
|
204527
204820
|
clearKeyQualifiers() { this.qualifiers = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeModifierKeys.None; }
|
|
@@ -204796,6 +205089,9 @@ class ToolAdmin {
|
|
|
204796
205089
|
this.clearMotionPromises();
|
|
204797
205090
|
// make sure tools don't think the cursor is still in this viewport.
|
|
204798
205091
|
this.onMouseLeave(vp);
|
|
205092
|
+
// Invalidate last motion if for this viewport...
|
|
205093
|
+
if (this.currentInputState.lastMotionEvent?.viewport === vp)
|
|
205094
|
+
this.currentInputState.lastMotionEvent = undefined;
|
|
204799
205095
|
// Remove any events associated with this viewport.
|
|
204800
205096
|
ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
|
|
204801
205097
|
}
|
|
@@ -205159,6 +205455,7 @@ class ToolAdmin {
|
|
|
205159
205455
|
toolPromise.then(() => {
|
|
205160
205456
|
if (undefined === this._toolMotionPromise)
|
|
205161
205457
|
return; // Only early return if canceled, result from a previous motion is preferable to showing nothing...
|
|
205458
|
+
this.currentInputState.lastMotionEvent = motion; // Save to use for simulation motion...
|
|
205162
205459
|
// Update decorations when dynamics are inactive...
|
|
205163
205460
|
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.inDynamicsMode) {
|
|
205164
205461
|
vp.invalidateDecorations();
|
|
@@ -205900,7 +206197,8 @@ class ToolAdmin {
|
|
|
205900
206197
|
}
|
|
205901
206198
|
/** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
|
|
205902
206199
|
simulateMotionEvent() {
|
|
205903
|
-
|
|
206200
|
+
// NOTE: Prefer last resolved motion over current cursor location which could be out of the view, or moved from last AccuSnap etc.
|
|
206201
|
+
this.updateDynamics(this.currentInputState.lastMotionEvent, undefined, true);
|
|
205904
206202
|
}
|
|
205905
206203
|
/** @internal */
|
|
205906
206204
|
setIncompatibleViewportCursor(restore) {
|
|
@@ -214300,7 +214598,8 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
|
|
|
214300
214598
|
knots;
|
|
214301
214599
|
/** flat array of coordinate data, blocked by poleDimension and row */
|
|
214302
214600
|
coffs;
|
|
214303
|
-
/**
|
|
214601
|
+
/**
|
|
214602
|
+
* Number of components per pole.
|
|
214304
214603
|
* * 3 for conventional xyz surface
|
|
214305
214604
|
* * 4 for weighted (wx, wy, wz, w) surface.
|
|
214306
214605
|
*/
|
|
@@ -233431,7 +233730,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233431
233730
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
233432
233731
|
/* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
|
|
233433
233732
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
233434
|
-
/* harmony import */ var
|
|
233733
|
+
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
233435
233734
|
/* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
|
|
233436
233735
|
/*---------------------------------------------------------------------------------------------
|
|
233437
233736
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -233452,15 +233751,15 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
233452
233751
|
_activeMomentData;
|
|
233453
233752
|
_point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
233454
233753
|
_point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
233455
|
-
/**
|
|
233456
|
-
*
|
|
233457
|
-
* *
|
|
233754
|
+
/**
|
|
233755
|
+
* Accumulate (independent) integrations over:
|
|
233756
|
+
* * The area between the arc and the chord connecting its endpoints.
|
|
233757
|
+
* * The triangle with vertices: origin, arc start, arc end.
|
|
233458
233758
|
*/
|
|
233459
233759
|
handleArc3d(arc) {
|
|
233460
233760
|
const momentData = this._activeMomentData;
|
|
233461
233761
|
const sweepRadians = arc.sweep.sweepRadians;
|
|
233462
233762
|
const alphaRadians = sweepRadians * 0.5;
|
|
233463
|
-
// from https://apps.dtic.mil/dtic/tr/fulltext/u2/274936.pdf page 71 for radius = 1
|
|
233464
233763
|
let s = Math.sin(alphaRadians);
|
|
233465
233764
|
let c = Math.cos(alphaRadians);
|
|
233466
233765
|
let s1 = Math.sin(sweepRadians);
|
|
@@ -233487,12 +233786,12 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
233487
233786
|
const pointC = arc.fractionToPoint(1.0);
|
|
233488
233787
|
momentData.accumulateTriangleMomentsXY(undefined, pointB, pointC);
|
|
233489
233788
|
}
|
|
233490
|
-
/** Accumulate integrals over the (triangular) areas from the origin to each line segment */
|
|
233789
|
+
/** Accumulate integrals over the (triangular) areas from the origin to each line segment. */
|
|
233491
233790
|
handleLineString3d(ls) {
|
|
233492
233791
|
const momentData = this._activeMomentData;
|
|
233493
233792
|
momentData.accumulateTriangleToLineStringMomentsXY(undefined, ls.packedPoints);
|
|
233494
233793
|
}
|
|
233495
|
-
/** Accumulate integrals over the (triangular) area from the origin to this line segment */
|
|
233794
|
+
/** Accumulate integrals over the (triangular) area from the origin to this line segment. */
|
|
233496
233795
|
handleLineSegment3d(segment) {
|
|
233497
233796
|
const momentData = this._activeMomentData;
|
|
233498
233797
|
segment.startPoint(this._point0);
|
|
@@ -233508,57 +233807,31 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
233508
233807
|
this._activeMomentData = undefined;
|
|
233509
233808
|
return momentData;
|
|
233510
233809
|
}
|
|
233511
|
-
|
|
233512
|
-
|
|
233513
|
-
|
|
233514
|
-
|
|
233515
|
-
|
|
233516
|
-
|
|
233517
|
-
|
|
233518
|
-
* @param region
|
|
233519
|
-
*/
|
|
233520
|
-
handleParityRegion(region) {
|
|
233521
|
-
const allChildMoments = [];
|
|
233522
|
-
let maxAbsArea = 0.0;
|
|
233523
|
-
let largestChildMoments;
|
|
233524
|
-
for (const child of region.children) {
|
|
233525
|
-
if (child instanceof _Loop__WEBPACK_IMPORTED_MODULE_4__.Loop) {
|
|
233526
|
-
const childMoments = this.handleLoop(child);
|
|
233810
|
+
handleAnyRegion(region) {
|
|
233811
|
+
const summedMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData.create();
|
|
233812
|
+
// guarantee there is no overlapping children
|
|
233813
|
+
const merged = _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionOps.regionBooleanXY(region, undefined, _RegionOps__WEBPACK_IMPORTED_MODULE_4__.RegionBinaryOpType.Union);
|
|
233814
|
+
if (merged) {
|
|
233815
|
+
for (const child of merged.children) {
|
|
233816
|
+
const childMoments = child.dispatchToGeometryHandler(this);
|
|
233527
233817
|
if (childMoments) {
|
|
233528
|
-
|
|
233529
|
-
|
|
233530
|
-
if (q > maxAbsArea) {
|
|
233531
|
-
maxAbsArea = q;
|
|
233532
|
-
largestChildMoments = childMoments;
|
|
233533
|
-
}
|
|
233818
|
+
const sign0 = childMoments.signFactor(1.0);
|
|
233819
|
+
summedMoments.accumulateProducts(childMoments, sign0);
|
|
233534
233820
|
}
|
|
233535
233821
|
}
|
|
233536
233822
|
}
|
|
233537
|
-
|
|
233538
|
-
|
|
233539
|
-
const sign0 = largestChildMoments.signFactor(1.0);
|
|
233540
|
-
summedMoments.accumulateProducts(largestChildMoments, sign0);
|
|
233541
|
-
for (const childMoments of allChildMoments) {
|
|
233542
|
-
if (childMoments !== largestChildMoments) {
|
|
233543
|
-
const sign1 = childMoments.signFactor(-1.0);
|
|
233544
|
-
summedMoments.accumulateProducts(childMoments, sign1);
|
|
233545
|
-
}
|
|
233546
|
-
}
|
|
233547
|
-
return summedMoments;
|
|
233823
|
+
else {
|
|
233824
|
+
return undefined;
|
|
233548
233825
|
}
|
|
233549
|
-
return
|
|
233826
|
+
return summedMoments;
|
|
233827
|
+
}
|
|
233828
|
+
/** Accumulate integrals from origin to the components of the parity region. */
|
|
233829
|
+
handleParityRegion(region) {
|
|
233830
|
+
return this.handleAnyRegion(region);
|
|
233550
233831
|
}
|
|
233551
|
-
/** Accumulate
|
|
233832
|
+
/** Accumulate integrals from origin to the components of the union region. */
|
|
233552
233833
|
handleUnionRegion(region) {
|
|
233553
|
-
|
|
233554
|
-
for (const child of region.children) {
|
|
233555
|
-
const childMoments = child.dispatchToGeometryHandler(this);
|
|
233556
|
-
if (childMoments) {
|
|
233557
|
-
const sign0 = childMoments.signFactor(1.0);
|
|
233558
|
-
summedMoments.accumulateProducts(childMoments, sign0);
|
|
233559
|
-
}
|
|
233560
|
-
}
|
|
233561
|
-
return summedMoments;
|
|
233834
|
+
return this.handleAnyRegion(region);
|
|
233562
233835
|
}
|
|
233563
233836
|
_strokeOptions;
|
|
233564
233837
|
getStrokeOptions() {
|
|
@@ -233570,9 +233843,9 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
233570
233843
|
this._strokeOptions = options;
|
|
233571
233844
|
return options;
|
|
233572
233845
|
}
|
|
233573
|
-
/**
|
|
233574
|
-
*
|
|
233575
|
-
* * accumulate stroke array.
|
|
233846
|
+
/**
|
|
233847
|
+
* Handle a single curve primitive (not loop).
|
|
233848
|
+
* * Stroke the curve and accumulate stroke array.
|
|
233576
233849
|
*/
|
|
233577
233850
|
handleCurvePrimitive(cp) {
|
|
233578
233851
|
const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_6__.LineString3d.create();
|
|
@@ -233580,12 +233853,18 @@ class RegionMomentsXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
233580
233853
|
cp.emitStrokes(strokes, options);
|
|
233581
233854
|
this.handleLineString3d(strokes);
|
|
233582
233855
|
}
|
|
233583
|
-
/**
|
|
233584
|
-
handleBSplineCurve3d(g) {
|
|
233585
|
-
|
|
233586
|
-
|
|
233587
|
-
/**
|
|
233588
|
-
|
|
233856
|
+
/** Handle strongly typed BSplineCurve3d as generic curve primitive. */
|
|
233857
|
+
handleBSplineCurve3d(g) {
|
|
233858
|
+
return this.handleCurvePrimitive(g);
|
|
233859
|
+
}
|
|
233860
|
+
/** Handle strongly typed BSplineCurve3dH as generic curve primitive. */
|
|
233861
|
+
handleBSplineCurve3dH(g) {
|
|
233862
|
+
return this.handleCurvePrimitive(g);
|
|
233863
|
+
}
|
|
233864
|
+
/** Handle strongly typed TransitionSpiral as generic curve primitive. */
|
|
233865
|
+
handleTransitionSpiral(g) {
|
|
233866
|
+
return this.handleCurvePrimitive(g);
|
|
233867
|
+
}
|
|
233589
233868
|
}
|
|
233590
233869
|
|
|
233591
233870
|
|
|
@@ -233605,41 +233884,44 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233605
233884
|
/* harmony export */ RegionOps: () => (/* binding */ RegionOps)
|
|
233606
233885
|
/* harmony export */ });
|
|
233607
233886
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
233608
|
-
/* harmony import */ var
|
|
233609
|
-
/* harmony import */ var
|
|
233610
|
-
/* harmony import */ var
|
|
233611
|
-
/* harmony import */ var
|
|
233612
|
-
/* harmony import */ var
|
|
233613
|
-
/* harmony import */ var
|
|
233614
|
-
/* harmony import */ var
|
|
233615
|
-
/* harmony import */ var
|
|
233616
|
-
/* harmony import */ var
|
|
233887
|
+
/* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
|
|
233888
|
+
/* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
233889
|
+
/* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
|
|
233890
|
+
/* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
233891
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
233892
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
233893
|
+
/* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
233894
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
233895
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
233896
|
+
/* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
|
|
233897
|
+
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
233617
233898
|
/* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
|
|
233618
|
-
/* harmony import */ var
|
|
233619
|
-
/* harmony import */ var
|
|
233620
|
-
/* harmony import */ var
|
|
233621
|
-
/* harmony import */ var
|
|
233622
|
-
/* harmony import */ var
|
|
233623
|
-
/* harmony import */ var
|
|
233624
|
-
/* harmony import */ var
|
|
233625
|
-
/* harmony import */ var
|
|
233626
|
-
/* harmony import */ var
|
|
233899
|
+
/* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
233900
|
+
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
233901
|
+
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
233902
|
+
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
233903
|
+
/* harmony import */ var _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../topology/Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
|
|
233904
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
233905
|
+
/* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
|
|
233906
|
+
/* harmony import */ var _CurveOps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
|
|
233907
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
233627
233908
|
/* harmony import */ var _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveWireMomentsXYZ */ "../../core/geometry/lib/esm/curve/CurveWireMomentsXYZ.js");
|
|
233628
|
-
/* harmony import */ var
|
|
233629
|
-
/* harmony import */ var
|
|
233630
|
-
/* harmony import */ var
|
|
233631
|
-
/* harmony import */ var
|
|
233632
|
-
/* harmony import */ var
|
|
233633
|
-
/* harmony import */ var
|
|
233634
|
-
/* harmony import */ var
|
|
233635
|
-
/* harmony import */ var
|
|
233636
|
-
/* harmony import */ var
|
|
233637
|
-
/* harmony import */ var
|
|
233638
|
-
/* harmony import */ var
|
|
233639
|
-
/* harmony import */ var
|
|
233909
|
+
/* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
|
|
233910
|
+
/* harmony import */ var _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internalContexts/ChainCollectorContext */ "../../core/geometry/lib/esm/curve/internalContexts/ChainCollectorContext.js");
|
|
233911
|
+
/* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
|
|
233912
|
+
/* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
|
|
233913
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
233914
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
233915
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
233916
|
+
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
233917
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
233918
|
+
/* harmony import */ var _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Query/ConsolidateAdjacentPrimitivesContext */ "../../core/geometry/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js");
|
|
233919
|
+
/* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
|
|
233920
|
+
/* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
|
|
233921
|
+
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
233640
233922
|
/* harmony import */ var _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RegionMomentsXY */ "../../core/geometry/lib/esm/curve/RegionMomentsXY.js");
|
|
233641
|
-
/* harmony import */ var
|
|
233642
|
-
/* harmony import */ var
|
|
233923
|
+
/* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
|
|
233924
|
+
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
233643
233925
|
/*---------------------------------------------------------------------------------------------
|
|
233644
233926
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
233645
233927
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -233679,6 +233961,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233679
233961
|
|
|
233680
233962
|
|
|
233681
233963
|
|
|
233964
|
+
|
|
233965
|
+
|
|
233966
|
+
|
|
233682
233967
|
|
|
233683
233968
|
|
|
233684
233969
|
|
|
@@ -233709,13 +233994,16 @@ var RegionBinaryOpType;
|
|
|
233709
233994
|
class RegionOps {
|
|
233710
233995
|
/**
|
|
233711
233996
|
* Return moment sums for a loop, parity region, or union region.
|
|
233997
|
+
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
233712
233998
|
* * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
|
|
233713
|
-
*
|
|
233714
|
-
*
|
|
233999
|
+
* call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
|
|
234000
|
+
* * `rawMomentData.origin` is the centroid of `region`.
|
|
234001
|
+
* * `rawMomentData.sums.weight()` is the signed area of `region`.
|
|
234002
|
+
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
233715
234003
|
*/
|
|
233716
|
-
static computeXYAreaMoments(
|
|
234004
|
+
static computeXYAreaMoments(region) {
|
|
233717
234005
|
const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
|
|
233718
|
-
const result =
|
|
234006
|
+
const result = region.dispatchToGeometryHandler(handler);
|
|
233719
234007
|
if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
|
|
233720
234008
|
result.shiftOriginAndSumsToCentroidOfSums();
|
|
233721
234009
|
return result;
|
|
@@ -233724,8 +234012,8 @@ class RegionOps {
|
|
|
233724
234012
|
}
|
|
233725
234013
|
/**
|
|
233726
234014
|
* Return an area tolerance for a given xy-range and optional distance tolerance.
|
|
233727
|
-
* @param range range of planar region to tolerance
|
|
233728
|
-
* @param distanceTolerance optional absolute distance tolerance
|
|
234015
|
+
* @param range range of planar region to tolerance.
|
|
234016
|
+
* @param distanceTolerance optional absolute distance tolerance.
|
|
233729
234017
|
*/
|
|
233730
234018
|
static computeXYAreaTolerance(range, distanceTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
233731
234019
|
// if A = bh and e is distance tolerance, then A' := (b+e/2)(h+e/2) = A + e/2(b+h+e/2), so A'-A = e/2(b+h+e/2).
|
|
@@ -233734,12 +234022,13 @@ class RegionOps {
|
|
|
233734
234022
|
}
|
|
233735
234023
|
/**
|
|
233736
234024
|
* Return a (signed) xy area for a region.
|
|
234025
|
+
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
233737
234026
|
* * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
|
|
233738
|
-
* @param
|
|
234027
|
+
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
233739
234028
|
*/
|
|
233740
|
-
static computeXYArea(
|
|
234029
|
+
static computeXYArea(region) {
|
|
233741
234030
|
const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
|
|
233742
|
-
const result =
|
|
234031
|
+
const result = region.dispatchToGeometryHandler(handler);
|
|
233743
234032
|
if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_1__.MomentData) {
|
|
233744
234033
|
return result.quantitySum;
|
|
233745
234034
|
}
|
|
@@ -233747,49 +234036,88 @@ class RegionOps {
|
|
|
233747
234036
|
}
|
|
233748
234037
|
/**
|
|
233749
234038
|
* Return MomentData with the sums of wire moments.
|
|
234039
|
+
* * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
233750
234040
|
* * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
|
|
233751
|
-
*
|
|
233752
|
-
*
|
|
234041
|
+
* call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
|
|
234042
|
+
* * `rawMomentData.origin` is the wire centroid of `curve`.
|
|
234043
|
+
* * `rawMomentData.sums.weight()` is the signed length of `curve`.
|
|
234044
|
+
* @param curve any [[CurveCollection]] or [[CurvePrimitive]].
|
|
233753
234045
|
*/
|
|
233754
|
-
static computeXYZWireMomentSums(
|
|
234046
|
+
static computeXYZWireMomentSums(curve) {
|
|
233755
234047
|
const handler = new _CurveWireMomentsXYZ__WEBPACK_IMPORTED_MODULE_3__.CurveWireMomentsXYZ();
|
|
233756
|
-
handler.visitLeaves(
|
|
234048
|
+
handler.visitLeaves(curve);
|
|
233757
234049
|
const result = handler.momentData;
|
|
233758
234050
|
result.shiftOriginAndSumsToCentroidOfSums();
|
|
233759
234051
|
return result;
|
|
233760
234052
|
}
|
|
234053
|
+
/**
|
|
234054
|
+
* Return a [[Ray3d]] with:
|
|
234055
|
+
* * `origin` is the centroid of the region,
|
|
234056
|
+
* * `direction` is a unit vector perpendicular to the region plane,
|
|
234057
|
+
* * `a` is the region area.
|
|
234058
|
+
* @param region the region to process. Can lie in any plane.
|
|
234059
|
+
* @param result optional pre-allocated result to populate and return.
|
|
234060
|
+
*/
|
|
234061
|
+
static centroidAreaNormal(region, result) {
|
|
234062
|
+
const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_4__.FrameBuilder.createRightHandedFrame(undefined, region);
|
|
234063
|
+
if (!localToWorld)
|
|
234064
|
+
return undefined;
|
|
234065
|
+
const normal = localToWorld.matrix.columnZ(result?.direction);
|
|
234066
|
+
const regionIsXY = normal.isParallelTo(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.unitZ(), true);
|
|
234067
|
+
let regionXY = region;
|
|
234068
|
+
if (!regionIsXY) { // rotate the region to be parallel to the xy-plane
|
|
234069
|
+
regionXY = region.cloneTransformed(localToWorld.inverse());
|
|
234070
|
+
if (!regionXY)
|
|
234071
|
+
return undefined;
|
|
234072
|
+
}
|
|
234073
|
+
const momentData = RegionOps.computeXYAreaMoments(regionXY);
|
|
234074
|
+
if (!momentData)
|
|
234075
|
+
return undefined;
|
|
234076
|
+
const centroid = momentData.origin.clone(result?.origin);
|
|
234077
|
+
if (!regionIsXY) // rotate centroid back (area is unchanged)
|
|
234078
|
+
localToWorld.multiplyPoint3d(centroid, centroid);
|
|
234079
|
+
let area = momentData.sums.weight();
|
|
234080
|
+
if (area < 0.0) {
|
|
234081
|
+
area = -area;
|
|
234082
|
+
normal.scale(-1.0, normal);
|
|
234083
|
+
}
|
|
234084
|
+
if (!result)
|
|
234085
|
+
result = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_6__.Ray3d.createCapture(centroid, normal);
|
|
234086
|
+
result.a = area;
|
|
234087
|
+
return result;
|
|
234088
|
+
}
|
|
233761
234089
|
/**
|
|
233762
234090
|
* Create loops in the graph.
|
|
233763
234091
|
* @internal
|
|
233764
234092
|
*/
|
|
233765
234093
|
static addLoopsToGraph(graph, data, announceIsolatedLoop) {
|
|
233766
|
-
if (data instanceof
|
|
234094
|
+
if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
|
|
233767
234095
|
const points = data.getPackedStrokes();
|
|
233768
234096
|
if (points)
|
|
233769
234097
|
this.addLoopsToGraph(graph, points, announceIsolatedLoop);
|
|
233770
234098
|
}
|
|
233771
|
-
else if (data instanceof
|
|
234099
|
+
else if (data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
|
|
233772
234100
|
for (const child of data.children) {
|
|
233773
234101
|
const points = child.getPackedStrokes();
|
|
233774
234102
|
if (points)
|
|
233775
234103
|
this.addLoopsToGraph(graph, points, announceIsolatedLoop);
|
|
233776
234104
|
}
|
|
233777
234105
|
}
|
|
233778
|
-
else if (data instanceof
|
|
233779
|
-
const loopSeed =
|
|
234106
|
+
else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
|
|
234107
|
+
const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
|
|
233780
234108
|
if (loopSeed !== undefined)
|
|
233781
234109
|
announceIsolatedLoop(graph, loopSeed);
|
|
233782
234110
|
}
|
|
233783
234111
|
else if (Array.isArray(data)) {
|
|
233784
234112
|
if (data.length > 0) {
|
|
233785
|
-
if (
|
|
233786
|
-
const loopSeed =
|
|
234113
|
+
if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(data[0])) {
|
|
234114
|
+
const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, data);
|
|
233787
234115
|
if (loopSeed !== undefined)
|
|
233788
234116
|
announceIsolatedLoop(graph, loopSeed);
|
|
233789
234117
|
}
|
|
233790
|
-
else if (data[0] instanceof
|
|
234118
|
+
else if (data[0] instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
|
|
233791
234119
|
for (const loop of data) {
|
|
233792
|
-
const loopSeed =
|
|
234120
|
+
const loopSeed = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateFaceLoopFromCoordinates(graph, loop);
|
|
233793
234121
|
if (loopSeed !== undefined)
|
|
233794
234122
|
announceIsolatedLoop(graph, loopSeed);
|
|
233795
234123
|
}
|
|
@@ -233829,10 +234157,10 @@ class RegionOps {
|
|
|
233829
234157
|
static finishGraphToPolyface(graph, triangulate) {
|
|
233830
234158
|
if (graph) {
|
|
233831
234159
|
if (triangulate) {
|
|
233832
|
-
|
|
233833
|
-
|
|
234160
|
+
_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph);
|
|
234161
|
+
_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
|
|
233834
234162
|
}
|
|
233835
|
-
return
|
|
234163
|
+
return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph);
|
|
233836
234164
|
}
|
|
233837
234165
|
return undefined;
|
|
233838
234166
|
}
|
|
@@ -233846,7 +234174,7 @@ class RegionOps {
|
|
|
233846
234174
|
* @param triangulate whether to triangulate the result
|
|
233847
234175
|
*/
|
|
233848
234176
|
static polygonXYAreaIntersectLoopsToPolyface(loopsA, loopsB, triangulate = false) {
|
|
233849
|
-
const graph =
|
|
234177
|
+
const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && inB), this._graphCheckPointFunction);
|
|
233850
234178
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
233851
234179
|
}
|
|
233852
234180
|
/**
|
|
@@ -233859,7 +234187,7 @@ class RegionOps {
|
|
|
233859
234187
|
* @param triangulate whether to triangulate the result
|
|
233860
234188
|
*/
|
|
233861
234189
|
static polygonXYAreaUnionLoopsToPolyface(loopsA, loopsB, triangulate = false) {
|
|
233862
|
-
const graph =
|
|
234190
|
+
const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA || inB), this._graphCheckPointFunction);
|
|
233863
234191
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
233864
234192
|
}
|
|
233865
234193
|
/**
|
|
@@ -233872,7 +234200,7 @@ class RegionOps {
|
|
|
233872
234200
|
* @param triangulate whether to triangulate the result
|
|
233873
234201
|
*/
|
|
233874
234202
|
static polygonXYAreaDifferenceLoopsToPolyface(loopsA, loopsB, triangulate = false) {
|
|
233875
|
-
const graph =
|
|
234203
|
+
const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
|
|
233876
234204
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
233877
234205
|
}
|
|
233878
234206
|
/**
|
|
@@ -233887,10 +234215,10 @@ class RegionOps {
|
|
|
233887
234215
|
* to connect interior loops to exterior loops.
|
|
233888
234216
|
*/
|
|
233889
234217
|
static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
233890
|
-
// Always return UnionRegion for now
|
|
233891
|
-
//
|
|
233892
|
-
const result =
|
|
233893
|
-
const context =
|
|
234218
|
+
// Always return UnionRegion for now, but keep return type as AnyRegion.
|
|
234219
|
+
// In the future, we might return the *simplest* region type.
|
|
234220
|
+
const result = _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion.create();
|
|
234221
|
+
const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union);
|
|
233894
234222
|
context.addMembers(loopsA, loopsB);
|
|
233895
234223
|
context.annotateAndMergeCurvesInGraph(mergeTolerance);
|
|
233896
234224
|
const range = context.groupA.range().union(context.groupB.range());
|
|
@@ -233902,7 +234230,7 @@ class RegionOps {
|
|
|
233902
234230
|
if (Math.abs(area) < areaTol)
|
|
233903
234231
|
return;
|
|
233904
234232
|
if (faceType === 1) {
|
|
233905
|
-
const loop =
|
|
234233
|
+
const loop = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.createLoopInFace(face);
|
|
233906
234234
|
if (loop)
|
|
233907
234235
|
result.tryAddChild(loop);
|
|
233908
234236
|
}
|
|
@@ -233922,7 +234250,7 @@ class RegionOps {
|
|
|
233922
234250
|
* @param triangulate whether to triangulate the result
|
|
233923
234251
|
*/
|
|
233924
234252
|
static polygonBooleanXYToPolyface(inputA, operation, inputB, triangulate = false) {
|
|
233925
|
-
const graph =
|
|
234253
|
+
const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, true);
|
|
233926
234254
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
233927
234255
|
}
|
|
233928
234256
|
/**
|
|
@@ -233937,18 +234265,18 @@ class RegionOps {
|
|
|
233937
234265
|
* @param inputB second set of loops
|
|
233938
234266
|
*/
|
|
233939
234267
|
static polygonBooleanXYToLoops(inputA, operation, inputB) {
|
|
233940
|
-
const graph =
|
|
234268
|
+
const graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doBinaryBooleanBetweenMultiLoopInputs(inputA, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, operation, inputB, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionGroupOpType.Union, true);
|
|
233941
234269
|
if (!graph)
|
|
233942
234270
|
return undefined;
|
|
233943
|
-
const loopEdges =
|
|
234271
|
+
const loopEdges = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_15__.HalfEdgeGraphSearch.collectExtendedBoundaryLoopsInGraph(graph, _topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR);
|
|
233944
234272
|
const allLoops = [];
|
|
233945
234273
|
for (const graphLoop of loopEdges) {
|
|
233946
|
-
const points = new
|
|
234274
|
+
const points = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray();
|
|
233947
234275
|
for (const edge of graphLoop)
|
|
233948
234276
|
points.pushXYZ(edge.x, edge.y, edge.z);
|
|
233949
234277
|
points.pushWrap(1);
|
|
233950
|
-
const loop =
|
|
233951
|
-
loop.tryAddChild(
|
|
234278
|
+
const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create();
|
|
234279
|
+
loop.tryAddChild(_LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d.createCapture(points));
|
|
233952
234280
|
allLoops.push(loop);
|
|
233953
234281
|
}
|
|
233954
234282
|
return RegionOps.sortOuterAndHoleLoopsXY(allLoops);
|
|
@@ -233966,7 +234294,7 @@ class RegionOps {
|
|
|
233966
234294
|
* object.
|
|
233967
234295
|
*/
|
|
233968
234296
|
static constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions) {
|
|
233969
|
-
const context = new
|
|
234297
|
+
const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_19__.PolygonWireOffsetContext();
|
|
233970
234298
|
return context.constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions);
|
|
233971
234299
|
}
|
|
233972
234300
|
/**
|
|
@@ -233978,8 +234306,8 @@ class RegionOps {
|
|
|
233978
234306
|
* @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
|
|
233979
234307
|
*/
|
|
233980
234308
|
static constructCurveXYOffset(curves, offsetDistanceOrOptions) {
|
|
233981
|
-
const offsetOptions =
|
|
233982
|
-
return
|
|
234309
|
+
const offsetOptions = _OffsetOptions__WEBPACK_IMPORTED_MODULE_20__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
234310
|
+
return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.constructCurveXYOffset(curves, offsetOptions);
|
|
233983
234311
|
}
|
|
233984
234312
|
/**
|
|
233985
234313
|
* Test if point (x,y) is IN, OUT or ON a region.
|
|
@@ -233989,7 +234317,7 @@ class RegionOps {
|
|
|
233989
234317
|
* @param y y coordinate of point to test
|
|
233990
234318
|
*/
|
|
233991
234319
|
static testPointInOnOutRegionXY(curves, x, y) {
|
|
233992
|
-
return
|
|
234320
|
+
return _Query_InOutTests__WEBPACK_IMPORTED_MODULE_22__.PointInOnOutContext.testPointInOnOutRegionXY(curves, x, y);
|
|
233993
234321
|
}
|
|
233994
234322
|
/**
|
|
233995
234323
|
* Create curve collection of subtype determined by gaps between the input curves.
|
|
@@ -234013,11 +234341,11 @@ class RegionOps {
|
|
|
234013
234341
|
maxGap = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.maxXY(maxGap, curves[i].endPoint().distance(curves[i + 1].startPoint()));
|
|
234014
234342
|
let collection;
|
|
234015
234343
|
if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(maxGap)) {
|
|
234016
|
-
collection = wrap ?
|
|
234344
|
+
collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_23__.Path.create();
|
|
234017
234345
|
isPath = true;
|
|
234018
234346
|
}
|
|
234019
234347
|
else {
|
|
234020
|
-
collection =
|
|
234348
|
+
collection = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create();
|
|
234021
234349
|
}
|
|
234022
234350
|
for (const c of curves)
|
|
234023
234351
|
collection.tryAddChild(c);
|
|
@@ -234043,7 +234371,7 @@ class RegionOps {
|
|
|
234043
234371
|
* @param cutterCurves input curves to intersect with `curvesToCut`
|
|
234044
234372
|
*/
|
|
234045
234373
|
static cloneCurvesWithXYSplits(curvesToCut, cutterCurves) {
|
|
234046
|
-
return
|
|
234374
|
+
return _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_25__.CurveSplitContext.cloneCurvesWithXYSplits(curvesToCut, cutterCurves);
|
|
234047
234375
|
}
|
|
234048
234376
|
/**
|
|
234049
234377
|
* Create paths assembled from many curves.
|
|
@@ -234054,11 +234382,11 @@ class RegionOps {
|
|
|
234054
234382
|
static splitToPathsBetweenBreaks(source, makeClones) {
|
|
234055
234383
|
if (source === undefined)
|
|
234056
234384
|
return undefined;
|
|
234057
|
-
if (source instanceof
|
|
234385
|
+
if (source instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive)
|
|
234058
234386
|
return source;
|
|
234059
234387
|
// source is a collection . ..
|
|
234060
234388
|
const primitives = source.collectCurvePrimitives();
|
|
234061
|
-
const chainCollector = new
|
|
234389
|
+
const chainCollector = new _internalContexts_ChainCollectorContext__WEBPACK_IMPORTED_MODULE_27__.ChainCollectorContext(makeClones);
|
|
234062
234390
|
for (const primitive of primitives) {
|
|
234063
234391
|
chainCollector.announceCurvePrimitive(primitive);
|
|
234064
234392
|
}
|
|
@@ -234074,7 +234402,7 @@ class RegionOps {
|
|
|
234074
234402
|
* @returns object with named chains, insideOffsets, outsideOffsets
|
|
234075
234403
|
*/
|
|
234076
234404
|
static collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance) {
|
|
234077
|
-
return
|
|
234405
|
+
return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
|
|
234078
234406
|
}
|
|
234079
234407
|
/**
|
|
234080
234408
|
* Restructure curve fragments as Paths and Loops.
|
|
@@ -234083,7 +234411,7 @@ class RegionOps {
|
|
|
234083
234411
|
* @returns chains, possibly wrapped in a [[BagOfCurves]].
|
|
234084
234412
|
*/
|
|
234085
234413
|
static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
234086
|
-
return
|
|
234414
|
+
return _CurveOps__WEBPACK_IMPORTED_MODULE_21__.CurveOps.collectChains(fragments, gapTolerance);
|
|
234087
234415
|
}
|
|
234088
234416
|
/**
|
|
234089
234417
|
* Find all intersections among curves in `curvesToCut` against the boundaries of `region` and return fragments
|
|
@@ -234095,17 +234423,17 @@ class RegionOps {
|
|
|
234095
234423
|
const result = { insideParts: [], outsideParts: [], coincidentParts: [] };
|
|
234096
234424
|
const pathWithIntersectionMarkup = RegionOps.cloneCurvesWithXYSplits(curvesToCut, region);
|
|
234097
234425
|
const splitPaths = RegionOps.splitToPathsBetweenBreaks(pathWithIntersectionMarkup, true);
|
|
234098
|
-
if (splitPaths instanceof
|
|
234426
|
+
if (splitPaths instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
|
|
234099
234427
|
for (const child of splitPaths.children) {
|
|
234100
|
-
const pointOnChild =
|
|
234428
|
+
const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(child);
|
|
234101
234429
|
if (pointOnChild) {
|
|
234102
234430
|
const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
|
|
234103
234431
|
pushToInOnOutArrays(child, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
|
|
234104
234432
|
}
|
|
234105
234433
|
}
|
|
234106
234434
|
}
|
|
234107
|
-
else if (splitPaths instanceof
|
|
234108
|
-
const pointOnChild =
|
|
234435
|
+
else if (splitPaths instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
|
|
234436
|
+
const pointOnChild = _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection.createCurveLocationDetailOnAnyCurvePrimitive(splitPaths);
|
|
234109
234437
|
if (pointOnChild) {
|
|
234110
234438
|
const inOnOut = RegionOps.testPointInOnOutRegionXY(region, pointOnChild.point.x, pointOnChild.point.y);
|
|
234111
234439
|
pushToInOnOutArrays(splitPaths, inOnOut, result.outsideParts, result.coincidentParts, result.insideParts);
|
|
@@ -234129,10 +234457,10 @@ class RegionOps {
|
|
|
234129
234457
|
* normal in z column. If not a rectangle, return undefined.
|
|
234130
234458
|
*/
|
|
234131
234459
|
static rectangleEdgeTransform(data, requireClosurePoint = true) {
|
|
234132
|
-
if (data instanceof
|
|
234460
|
+
if (data instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
234133
234461
|
return this.rectangleEdgeTransform(data.packedPoints);
|
|
234134
234462
|
}
|
|
234135
|
-
else if (data instanceof
|
|
234463
|
+
else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
|
|
234136
234464
|
let dataToUse;
|
|
234137
234465
|
if (requireClosurePoint && data.length === 5) {
|
|
234138
234466
|
if (!_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(data.distanceIndexIndex(0, 4)))
|
|
@@ -234146,8 +234474,8 @@ class RegionOps {
|
|
|
234146
234474
|
return undefined;
|
|
234147
234475
|
}
|
|
234148
234476
|
else {
|
|
234149
|
-
dataToUse =
|
|
234150
|
-
|
|
234477
|
+
dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(data);
|
|
234478
|
+
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_28__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
|
|
234151
234479
|
if (dataToUse.length < (requireClosurePoint ? 5 : 4))
|
|
234152
234480
|
return undefined;
|
|
234153
234481
|
}
|
|
@@ -234158,19 +234486,19 @@ class RegionOps {
|
|
|
234158
234486
|
if (normalVector.normalizeInPlace()
|
|
234159
234487
|
&& vector12.isAlmostEqual(vector03)
|
|
234160
234488
|
&& vector01.isPerpendicularTo(vector03)) {
|
|
234161
|
-
return
|
|
234489
|
+
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_29__.Transform.createOriginAndMatrixColumns(dataToUse.getPoint3dAtUncheckedPointIndex(0), vector01, vector03, normalVector);
|
|
234162
234490
|
}
|
|
234163
234491
|
}
|
|
234164
234492
|
else if (Array.isArray(data)) {
|
|
234165
|
-
return this.rectangleEdgeTransform(new
|
|
234493
|
+
return this.rectangleEdgeTransform(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_30__.Point3dArrayCarrier(data), requireClosurePoint);
|
|
234166
234494
|
}
|
|
234167
|
-
else if (data instanceof
|
|
234495
|
+
else if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
234168
234496
|
return this.rectangleEdgeTransform(data.children[0].packedPoints, true);
|
|
234169
234497
|
}
|
|
234170
|
-
else if (data instanceof
|
|
234498
|
+
else if (data instanceof _Path__WEBPACK_IMPORTED_MODULE_23__.Path && data.children.length === 1 && data.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
234171
234499
|
return this.rectangleEdgeTransform(data.children[0].packedPoints, requireClosurePoint);
|
|
234172
234500
|
}
|
|
234173
|
-
else if (data instanceof
|
|
234501
|
+
else if (data instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveChain) {
|
|
234174
234502
|
if (!data.checkForNonLinearPrimitives()) {
|
|
234175
234503
|
// const linestring = LineString3d.create();
|
|
234176
234504
|
const strokes = data.getPackedStrokes();
|
|
@@ -234194,7 +234522,7 @@ class RegionOps {
|
|
|
234194
234522
|
* @param options options for tolerance and selective simplification.
|
|
234195
234523
|
*/
|
|
234196
234524
|
static consolidateAdjacentPrimitives(curves, options) {
|
|
234197
|
-
const context = new
|
|
234525
|
+
const context = new _Query_ConsolidateAdjacentPrimitivesContext__WEBPACK_IMPORTED_MODULE_31__.ConsolidateAdjacentCurvePrimitivesContext(options);
|
|
234198
234526
|
curves.dispatchToGeometryHandler(context);
|
|
234199
234527
|
}
|
|
234200
234528
|
/**
|
|
@@ -234212,14 +234540,14 @@ class RegionOps {
|
|
|
234212
234540
|
static sortOuterAndHoleLoopsXY(loops) {
|
|
234213
234541
|
const loopAndArea = [];
|
|
234214
234542
|
for (const candidate of loops) {
|
|
234215
|
-
if (candidate instanceof
|
|
234216
|
-
|
|
234217
|
-
else if (candidate instanceof
|
|
234218
|
-
const loop =
|
|
234219
|
-
|
|
234543
|
+
if (candidate instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop)
|
|
234544
|
+
_geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, candidate);
|
|
234545
|
+
else if (candidate instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedXYZCollection) {
|
|
234546
|
+
const loop = _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.createPolygon(candidate);
|
|
234547
|
+
_geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.pushLoop(loopAndArea, loop);
|
|
234220
234548
|
}
|
|
234221
234549
|
}
|
|
234222
|
-
return
|
|
234550
|
+
return _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_32__.SortablePolygon.sortAsAnyRegion(loopAndArea);
|
|
234223
234551
|
}
|
|
234224
234552
|
/**
|
|
234225
234553
|
* Find all xy-areas bounded by the unstructured, possibly intersecting curves.
|
|
@@ -234232,7 +234560,7 @@ class RegionOps {
|
|
|
234232
234560
|
* SignedLoops object.
|
|
234233
234561
|
* @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
|
|
234234
234562
|
* primitives.
|
|
234235
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
234563
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
234236
234564
|
* @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
|
|
234237
234565
|
* * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
|
|
234238
234566
|
* positive area and counterclockwise orientation.
|
|
@@ -234242,12 +234570,13 @@ class RegionOps {
|
|
|
234242
234570
|
* to the edge and a constituent curve in each.
|
|
234243
234571
|
*/
|
|
234244
234572
|
static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
234245
|
-
|
|
234573
|
+
let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
|
|
234574
|
+
primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_33__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_24__.BagOfCurves.create(...primitives)).children;
|
|
234246
234575
|
const range = this.curveArrayRange(primitives);
|
|
234247
234576
|
const areaTol = this.computeXYAreaTolerance(range, tolerance);
|
|
234248
|
-
const intersections =
|
|
234249
|
-
const graph =
|
|
234250
|
-
return
|
|
234577
|
+
const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_34__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
|
|
234578
|
+
const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
|
|
234579
|
+
return _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_14__.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
|
|
234251
234580
|
}
|
|
234252
234581
|
/**
|
|
234253
234582
|
* Collect all `CurvePrimitives` in loosely typed input.
|
|
@@ -234262,10 +234591,10 @@ class RegionOps {
|
|
|
234262
234591
|
*/
|
|
234263
234592
|
static collectCurvePrimitives(candidates, collectorArray, smallestPossiblePrimitives = false, explodeLinestrings = false) {
|
|
234264
234593
|
const results = collectorArray === undefined ? [] : collectorArray;
|
|
234265
|
-
if (candidates instanceof
|
|
234594
|
+
if (candidates instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_26__.CurvePrimitive) {
|
|
234266
234595
|
candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
|
|
234267
234596
|
}
|
|
234268
|
-
else if (candidates instanceof
|
|
234597
|
+
else if (candidates instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_24__.CurveCollection) {
|
|
234269
234598
|
candidates.collectCurvePrimitives(results, smallestPossiblePrimitives, explodeLinestrings);
|
|
234270
234599
|
}
|
|
234271
234600
|
else if (Array.isArray(candidates)) {
|
|
@@ -234284,7 +234613,7 @@ class RegionOps {
|
|
|
234284
234613
|
static expandLineStrings(candidates) {
|
|
234285
234614
|
const result = [];
|
|
234286
234615
|
for (const c of candidates) {
|
|
234287
|
-
if (c instanceof
|
|
234616
|
+
if (c instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d) {
|
|
234288
234617
|
for (let i = 0; i + 1 < c.packedPoints.length; i++) {
|
|
234289
234618
|
const q = c.getIndexedSegment(i);
|
|
234290
234619
|
if (q !== undefined)
|
|
@@ -234303,16 +234632,16 @@ class RegionOps {
|
|
|
234303
234632
|
* @param worldToLocal transform to apply to data before computing its range
|
|
234304
234633
|
*/
|
|
234305
234634
|
static curveArrayRange(data, worldToLocal) {
|
|
234306
|
-
const range =
|
|
234307
|
-
if (data instanceof
|
|
234635
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_35__.Range3d.create();
|
|
234636
|
+
if (data instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
|
|
234308
234637
|
data.extendRange(range, worldToLocal);
|
|
234309
234638
|
else if (Array.isArray(data)) {
|
|
234310
234639
|
for (const c of data) {
|
|
234311
|
-
if (c instanceof
|
|
234640
|
+
if (c instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_36__.GeometryQuery)
|
|
234312
234641
|
c.extendRange(range, worldToLocal);
|
|
234313
|
-
else if (c instanceof
|
|
234642
|
+
else if (c instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d)
|
|
234314
234643
|
range.extendPoint(c, worldToLocal);
|
|
234315
|
-
else if (c instanceof
|
|
234644
|
+
else if (c instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray)
|
|
234316
234645
|
range.extendRange(c.getRange(worldToLocal));
|
|
234317
234646
|
else if (Array.isArray(c))
|
|
234318
234647
|
range.extendRange(this.curveArrayRange(c, worldToLocal));
|
|
@@ -234331,37 +234660,37 @@ class RegionOps {
|
|
|
234331
234660
|
if (polygons.length === 0)
|
|
234332
234661
|
return undefined;
|
|
234333
234662
|
const firstEntry = polygons[0];
|
|
234334
|
-
if (
|
|
234335
|
-
graph =
|
|
234663
|
+
if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.isAnyImmediatePointType(firstEntry)) {
|
|
234664
|
+
graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
|
|
234336
234665
|
}
|
|
234337
234666
|
else if (polygons.length > 1) {
|
|
234338
234667
|
let writablePolygons;
|
|
234339
|
-
if (firstEntry instanceof
|
|
234668
|
+
if (firstEntry instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_9__.IndexedReadWriteXYZCollection) {
|
|
234340
234669
|
writablePolygons = polygons;
|
|
234341
234670
|
}
|
|
234342
234671
|
else {
|
|
234343
234672
|
writablePolygons = [];
|
|
234344
234673
|
for (const polygon of polygons)
|
|
234345
|
-
writablePolygons.push(
|
|
234674
|
+
writablePolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(polygon));
|
|
234346
234675
|
}
|
|
234347
|
-
const sortedPolygons =
|
|
234676
|
+
const sortedPolygons = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_37__.PolygonOps.sortOuterAndHoleLoopsXY(writablePolygons);
|
|
234348
234677
|
if (sortedPolygons.length === 1) { // below requires exactly one outer loop!
|
|
234349
|
-
if (graph =
|
|
234350
|
-
|
|
234678
|
+
if (graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromLoops(sortedPolygons[0]))
|
|
234679
|
+
_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
|
|
234351
234680
|
}
|
|
234352
234681
|
}
|
|
234353
234682
|
else {
|
|
234354
|
-
graph =
|
|
234683
|
+
graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(firstEntry);
|
|
234355
234684
|
}
|
|
234356
234685
|
}
|
|
234357
234686
|
else {
|
|
234358
|
-
graph =
|
|
234687
|
+
graph = _topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.createTriangulatedGraphFromSingleLoop(polygons);
|
|
234359
234688
|
}
|
|
234360
234689
|
if (!graph) {
|
|
234361
234690
|
// Last resort: try full merge. Conveniently, multiple polygons are processed with parity logic.
|
|
234362
|
-
if (graph =
|
|
234363
|
-
if (
|
|
234364
|
-
|
|
234691
|
+
if (graph = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_12__.RegionOpsFaceToFaceSearch.doPolygonBoolean(polygons, [], (inA, _inB) => inA)) {
|
|
234692
|
+
if (_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.triangulateAllPositiveAreaFaces(graph))
|
|
234693
|
+
_topology_Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.flipTriangles(graph);
|
|
234365
234694
|
}
|
|
234366
234695
|
}
|
|
234367
234696
|
return graph;
|
|
@@ -234371,13 +234700,13 @@ class RegionOps {
|
|
|
234371
234700
|
const strokedComponent = component.cloneStroked(options);
|
|
234372
234701
|
// package the stroked region as polygons
|
|
234373
234702
|
const polygons = [];
|
|
234374
|
-
if (strokedComponent instanceof
|
|
234375
|
-
if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof
|
|
234703
|
+
if (strokedComponent instanceof _Loop__WEBPACK_IMPORTED_MODULE_7__.Loop) {
|
|
234704
|
+
if (strokedComponent.children.length > 0 && strokedComponent.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
|
|
234376
234705
|
polygons.push(strokedComponent.children[0].packedPoints); // expect only 1
|
|
234377
234706
|
}
|
|
234378
|
-
else if (strokedComponent instanceof
|
|
234707
|
+
else if (strokedComponent instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_8__.ParityRegion) {
|
|
234379
234708
|
for (const strokedLoop of strokedComponent.children) {
|
|
234380
|
-
if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof
|
|
234709
|
+
if (strokedLoop.children.length > 0 && strokedLoop.children[0] instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_18__.LineString3d)
|
|
234381
234710
|
polygons.push(strokedLoop.children[0].packedPoints); // expect only 1
|
|
234382
234711
|
}
|
|
234383
234712
|
}
|
|
@@ -234407,7 +234736,7 @@ class RegionOps {
|
|
|
234407
234736
|
*/
|
|
234408
234737
|
static facetRegionXY(region, options) {
|
|
234409
234738
|
let graph;
|
|
234410
|
-
if (region instanceof
|
|
234739
|
+
if (region instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_13__.UnionRegion) {
|
|
234411
234740
|
for (const child of region.children) {
|
|
234412
234741
|
const childGraph = RegionOps.triangulateRegionComponent(child, options);
|
|
234413
234742
|
if (childGraph) {
|
|
@@ -234429,8 +234758,8 @@ class RegionOps {
|
|
|
234429
234758
|
if (!graph)
|
|
234430
234759
|
return undefined;
|
|
234431
234760
|
if (options?.maximizeConvexFacets)
|
|
234432
|
-
|
|
234433
|
-
return
|
|
234761
|
+
_topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
|
|
234762
|
+
return _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.graphToPolyface(graph, options);
|
|
234434
234763
|
}
|
|
234435
234764
|
/**
|
|
234436
234765
|
* Decompose a polygon with optional holes into an array of convex polygons.
|
|
@@ -234443,11 +234772,11 @@ class RegionOps {
|
|
|
234443
234772
|
if (!graph)
|
|
234444
234773
|
return undefined;
|
|
234445
234774
|
if (maximize)
|
|
234446
|
-
|
|
234775
|
+
_topology_Merging__WEBPACK_IMPORTED_MODULE_38__.HalfEdgeGraphOps.expandConvexFaces(graph);
|
|
234447
234776
|
const convexPolygons = [];
|
|
234448
234777
|
graph.announceFaceLoops((_graph, seed) => {
|
|
234449
|
-
if (!seed.isMaskSet(
|
|
234450
|
-
convexPolygons.push(
|
|
234778
|
+
if (!seed.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_16__.HalfEdgeMask.EXTERIOR))
|
|
234779
|
+
convexPolygons.push(_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_17__.GrowableXYZArray.create(seed.collectAroundFace((node) => { return node.getPoint3d(); })));
|
|
234451
234780
|
return true;
|
|
234452
234781
|
});
|
|
234453
234782
|
return convexPolygons;
|
|
@@ -234497,24 +234826,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234497
234826
|
/* harmony export */ RegionOpsFaceToFaceSearch: () => (/* binding */ RegionOpsFaceToFaceSearch)
|
|
234498
234827
|
/* harmony export */ });
|
|
234499
234828
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
234500
|
-
/* harmony import */ var
|
|
234829
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
234501
234830
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
234502
|
-
/* harmony import */ var
|
|
234831
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
234503
234832
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
234504
234833
|
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
234505
234834
|
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
234506
234835
|
/* harmony import */ var _topology_RegularizeFace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../topology/RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
|
|
234507
|
-
/* harmony import */ var
|
|
234508
|
-
/* harmony import */ var
|
|
234509
|
-
/* harmony import */ var
|
|
234836
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
234837
|
+
/* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
|
|
234838
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
234510
234839
|
/* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
|
|
234511
|
-
/* harmony import */ var
|
|
234512
|
-
/* harmony import */ var
|
|
234840
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
234841
|
+
/* harmony import */ var _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/TransferWithSplitArcs */ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js");
|
|
234842
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
234513
234843
|
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
234514
234844
|
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
234515
|
-
/* harmony import */ var
|
|
234845
|
+
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
234516
234846
|
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
234517
|
-
/* harmony import */ var
|
|
234847
|
+
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
234518
234848
|
/*---------------------------------------------------------------------------------------------
|
|
234519
234849
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
234520
234850
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -234541,6 +234871,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234541
234871
|
|
|
234542
234872
|
|
|
234543
234873
|
|
|
234874
|
+
|
|
234544
234875
|
/**
|
|
234545
234876
|
* base class for callbacks during region sweeps.
|
|
234546
234877
|
* * At start of a component, `startComponent(node)` is called announcing a representative node on the outermost face.
|
|
@@ -234857,8 +235188,7 @@ class RegionGroup {
|
|
|
234857
235188
|
}
|
|
234858
235189
|
return range;
|
|
234859
235190
|
}
|
|
234860
|
-
/** Ask if the current _numIn count qualifies as an "in" for this operation type.
|
|
234861
|
-
*/
|
|
235191
|
+
/** Ask if the current _numIn count qualifies as an "in" for this operation type. */
|
|
234862
235192
|
getInOut() {
|
|
234863
235193
|
// UNION is true if one or more members are IN
|
|
234864
235194
|
if (this.groupOpType === RegionGroupOpType.Union)
|
|
@@ -234874,11 +235204,12 @@ class RegionGroup {
|
|
|
234874
235204
|
// push new members into the group.
|
|
234875
235205
|
addMember(data, allowLineSegment = false) {
|
|
234876
235206
|
if (data instanceof _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop || data instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_9__.ParityRegion) {
|
|
234877
|
-
|
|
235207
|
+
let cleanerData = data.clone();
|
|
234878
235208
|
_RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.consolidateAdjacentPrimitives(cleanerData);
|
|
235209
|
+
cleanerData = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_10__.TransferWithSplitArcs.clone(cleanerData);
|
|
234879
235210
|
this.members.push(new RegionGroupMember(cleanerData, this));
|
|
234880
235211
|
}
|
|
234881
|
-
else if (data instanceof
|
|
235212
|
+
else if (data instanceof _UnionRegion__WEBPACK_IMPORTED_MODULE_11__.UnionRegion) {
|
|
234882
235213
|
for (const child of data.children) {
|
|
234883
235214
|
this.addMember(child);
|
|
234884
235215
|
}
|
|
@@ -234888,7 +235219,7 @@ class RegionGroup {
|
|
|
234888
235219
|
this.addMember(item);
|
|
234889
235220
|
}
|
|
234890
235221
|
}
|
|
234891
|
-
else if (allowLineSegment && data instanceof
|
|
235222
|
+
else if (allowLineSegment && data instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
234892
235223
|
this.members.push(new RegionGroupMember(data, this));
|
|
234893
235224
|
}
|
|
234894
235225
|
}
|
|
@@ -234905,22 +235236,22 @@ class RegionGroup {
|
|
|
234905
235236
|
/**
|
|
234906
235237
|
* A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
|
|
234907
235238
|
* * In the binary operation OP (union, intersection, parity, difference), the left and right operands
|
|
234908
|
-
*
|
|
235239
|
+
* are each a composite union, difference, or parity among multiple inputs, i.e.,
|
|
234909
235240
|
* * (operationA among Ai) OP (operationB among Bi)
|
|
234910
235241
|
* * where the Ai are one set of regions, being combined by operationA
|
|
234911
|
-
* * and the Bi are the another set of regions, being combined by operationB
|
|
234912
|
-
* * Each group of Ai and Bi is a `RegionGroup
|
|
235242
|
+
* * and the Bi are the another set of regions, being combined by operationB.
|
|
235243
|
+
* * Each group of Ai and Bi is a `RegionGroup`.
|
|
234913
235244
|
* * This is an extremely delicate structure.
|
|
234914
235245
|
* * Members are public because of the unique variety of queries, but should only be used for queries.
|
|
234915
235246
|
* * The graph and curves in the booleans are connected by an extended pointer chain:
|
|
234916
|
-
* * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
|
|
234917
|
-
* * (CurveLocationDetail).curve points to a curve
|
|
234918
|
-
* * (Curve).parent points to RegionGroupMember
|
|
234919
|
-
* * (RegionGroupMember) points to RegionGroup
|
|
234920
|
-
* * (RegionGroup) points to RegionBooleanBinaryContext
|
|
234921
|
-
* * So
|
|
234922
|
-
* * the chain leads to a parity count in the RegionGroupMember
|
|
234923
|
-
* * that can change the number of members active in the RegionGroup
|
|
235247
|
+
* * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
|
|
235248
|
+
* * (CurveLocationDetail).curve points to a curve.
|
|
235249
|
+
* * (Curve).parent points to RegionGroupMember.
|
|
235250
|
+
* * (RegionGroupMember) points to RegionGroup.
|
|
235251
|
+
* * (RegionGroup) points to RegionBooleanBinaryContext.
|
|
235252
|
+
* * So when a graph sweep crosses an edge
|
|
235253
|
+
* * the chain leads to a parity count in the RegionGroupMember.
|
|
235254
|
+
* * that can change the number of members active in the RegionGroup.
|
|
234924
235255
|
* * which can change the state of the context.
|
|
234925
235256
|
* @internal
|
|
234926
235257
|
*/
|
|
@@ -234935,7 +235266,7 @@ class RegionBooleanContext {
|
|
|
234935
235266
|
this.groupA = new RegionGroup(this, groupTypeA);
|
|
234936
235267
|
this.groupB = new RegionGroup(this, groupTypeB);
|
|
234937
235268
|
this.extraGeometry = new RegionGroup(this, RegionGroupOpType.NonBounding);
|
|
234938
|
-
this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; //
|
|
235269
|
+
this.binaryOp = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionBinaryOpType.Union; // revised in runClassificationSweep
|
|
234939
235270
|
}
|
|
234940
235271
|
/**
|
|
234941
235272
|
* Create a context with both A and B groups empty.
|
|
@@ -234954,7 +235285,7 @@ class RegionBooleanContext {
|
|
|
234954
235285
|
this.addConnectives();
|
|
234955
235286
|
}
|
|
234956
235287
|
_workSegment;
|
|
234957
|
-
static _bridgeDirection =
|
|
235288
|
+
static _bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
|
|
234958
235289
|
/**
|
|
234959
235290
|
* The sweep operations require access to all geometry by edge crossings and face walk.
|
|
234960
235291
|
* If input loops are non-overlapping, there may be disconnected islands not reachable.
|
|
@@ -234969,7 +235300,7 @@ class RegionBooleanContext {
|
|
|
234969
235300
|
const rangeAB = rangeA.union(rangeB);
|
|
234970
235301
|
const areaTol = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYAreaTolerance(rangeAB);
|
|
234971
235302
|
let margin = 0.1;
|
|
234972
|
-
this._workSegment =
|
|
235303
|
+
this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
|
|
234973
235304
|
if (this._workSegment)
|
|
234974
235305
|
margin *= this._workSegment.point0Ref.distanceXY(this._workSegment.point1Ref); // how much further to extend each bridge ray
|
|
234975
235306
|
const maxPoints = [];
|
|
@@ -234977,7 +235308,7 @@ class RegionBooleanContext {
|
|
|
234977
235308
|
const area = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYArea(region);
|
|
234978
235309
|
if (area === undefined || Math.abs(area) < areaTol)
|
|
234979
235310
|
return; // avoid bridging trivial faces
|
|
234980
|
-
this._workSegment =
|
|
235311
|
+
this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_14__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
|
|
234981
235312
|
if (this._workSegment)
|
|
234982
235313
|
maxPoints.push(this._workSegment.point1Ref);
|
|
234983
235314
|
};
|
|
@@ -234992,17 +235323,17 @@ class RegionBooleanContext {
|
|
|
234992
235323
|
}
|
|
234993
235324
|
}
|
|
234994
235325
|
}
|
|
234995
|
-
const ray =
|
|
235326
|
+
const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.createZero();
|
|
234996
235327
|
for (const p of maxPoints) {
|
|
234997
|
-
// Make a line from
|
|
234998
|
-
//
|
|
234999
|
-
//
|
|
235000
|
-
// If p came from some inner loop this will
|
|
235001
|
-
//
|
|
235002
|
-
//
|
|
235003
|
-
const bridgeLength = margin +
|
|
235004
|
-
const outside =
|
|
235005
|
-
const bridgeLine =
|
|
235328
|
+
// Make a line from
|
|
235329
|
+
// 1) exactly the max point of the loops to
|
|
235330
|
+
// 2) a point clearly outside the big range
|
|
235331
|
+
// If p came from some inner loop this will
|
|
235332
|
+
// 1) create a bridge from the inner loop through any containing loops (always)
|
|
235333
|
+
// 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
|
|
235334
|
+
const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_15__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
|
|
235335
|
+
const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_13__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
|
|
235336
|
+
const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
|
|
235006
235337
|
this.extraGeometry.addMember(bridgeLine, true);
|
|
235007
235338
|
}
|
|
235008
235339
|
}
|
|
@@ -235016,7 +235347,7 @@ class RegionBooleanContext {
|
|
|
235016
235347
|
*/
|
|
235017
235348
|
annotateAndMergeCurvesInGraph(mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_7__.Geometry.smallMetricDistance) {
|
|
235018
235349
|
const allPrimitives = [];
|
|
235019
|
-
// ASSUME loops have fine-grained types
|
|
235350
|
+
// ASSUME loops have fine-grained types (no linestrings)
|
|
235020
235351
|
for (const group of [this.groupA, this.groupB, this.extraGeometry]) {
|
|
235021
235352
|
for (const member of group.members) {
|
|
235022
235353
|
let k = allPrimitives.length;
|
|
@@ -235027,9 +235358,8 @@ class RegionBooleanContext {
|
|
|
235027
235358
|
}
|
|
235028
235359
|
}
|
|
235029
235360
|
}
|
|
235030
|
-
|
|
235031
|
-
const
|
|
235032
|
-
const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
|
|
235361
|
+
const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_16__.CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
|
|
235362
|
+
const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_17__.PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
|
|
235033
235363
|
this.graph = graph;
|
|
235034
235364
|
this.faceAreaFunction = faceAreaFromCurvedEdgeData;
|
|
235035
235365
|
}
|
|
@@ -235120,7 +235450,7 @@ class RegionBooleanContext {
|
|
|
235120
235450
|
const data = node.edgeTag;
|
|
235121
235451
|
if (data instanceof RegionGroupMember)
|
|
235122
235452
|
return updateRegionGroupMemberState(data);
|
|
235123
|
-
if (data instanceof
|
|
235453
|
+
if (data instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_18__.CurveLocationDetail) {
|
|
235124
235454
|
// We trust that the caller has linked from the graph node to a curve which has a RegionGroupMember as its parent.
|
|
235125
235455
|
const member = data.curve.parent;
|
|
235126
235456
|
if (member instanceof RegionGroupMember)
|
|
@@ -235175,10 +235505,10 @@ function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
|
|
|
235175
235505
|
}
|
|
235176
235506
|
let areaToChord = 0.0;
|
|
235177
235507
|
if (detail && detail.curve && detail.hasFraction1) {
|
|
235178
|
-
if (detail.curve instanceof
|
|
235508
|
+
if (detail.curve instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d) {
|
|
235179
235509
|
// ah .. nothing to do for a line segment
|
|
235180
235510
|
}
|
|
235181
|
-
else if (detail.curve instanceof
|
|
235511
|
+
else if (detail.curve instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_19__.Arc3d) {
|
|
235182
235512
|
areaToChord = detail.curve.areaToChordXY(detail.fraction, detail.fraction1);
|
|
235183
235513
|
}
|
|
235184
235514
|
}
|
|
@@ -241847,6 +242177,52 @@ class SumLengthsContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.Rec
|
|
|
241847
242177
|
}
|
|
241848
242178
|
|
|
241849
242179
|
|
|
242180
|
+
/***/ }),
|
|
242181
|
+
|
|
242182
|
+
/***/ "../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js":
|
|
242183
|
+
/*!***********************************************************************************!*\
|
|
242184
|
+
!*** ../../core/geometry/lib/esm/curve/internalContexts/TransferWithSplitArcs.js ***!
|
|
242185
|
+
\***********************************************************************************/
|
|
242186
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
242187
|
+
|
|
242188
|
+
"use strict";
|
|
242189
|
+
__webpack_require__.r(__webpack_exports__);
|
|
242190
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
242191
|
+
/* harmony export */ TransferWithSplitArcs: () => (/* binding */ TransferWithSplitArcs)
|
|
242192
|
+
/* harmony export */ });
|
|
242193
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
242194
|
+
/* harmony import */ var _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CloneCurvesContext */ "../../core/geometry/lib/esm/curve/internalContexts/CloneCurvesContext.js");
|
|
242195
|
+
/*---------------------------------------------------------------------------------------------
|
|
242196
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
242197
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
242198
|
+
*--------------------------------------------------------------------------------------------*/
|
|
242199
|
+
/** @packageDocumentation
|
|
242200
|
+
* @module Curve
|
|
242201
|
+
*/
|
|
242202
|
+
|
|
242203
|
+
|
|
242204
|
+
/**
|
|
242205
|
+
* Algorithmic class for shallow-copying a CurveCollection with each full-sweep arc replaced by two half-sweep arcs.
|
|
242206
|
+
* * Often useful for building graphs from loops.
|
|
242207
|
+
* @internal
|
|
242208
|
+
*/
|
|
242209
|
+
class TransferWithSplitArcs extends _CloneCurvesContext__WEBPACK_IMPORTED_MODULE_0__.CloneCurvesContext {
|
|
242210
|
+
constructor() {
|
|
242211
|
+
super(undefined);
|
|
242212
|
+
}
|
|
242213
|
+
doClone(primitive) {
|
|
242214
|
+
if (primitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_1__.Arc3d && primitive.sweep.isFullCircle) // replace full arc with two half arcs
|
|
242215
|
+
return [primitive.clonePartialCurve(0.0, 0.5), primitive.clonePartialCurve(0.5, 1)];
|
|
242216
|
+
return primitive;
|
|
242217
|
+
}
|
|
242218
|
+
static clone(target) {
|
|
242219
|
+
const context = new TransferWithSplitArcs();
|
|
242220
|
+
target.announceToCurveProcessor(context);
|
|
242221
|
+
return context._result;
|
|
242222
|
+
}
|
|
242223
|
+
}
|
|
242224
|
+
|
|
242225
|
+
|
|
241850
242226
|
/***/ }),
|
|
241851
242227
|
|
|
241852
242228
|
/***/ "../../core/geometry/lib/esm/curve/internalContexts/TransformInPlaceContext.js":
|
|
@@ -258214,9 +258590,9 @@ class Vector3d extends XYZ {
|
|
|
258214
258590
|
if (dot < 0.0 && !oppositeIsParallel)
|
|
258215
258591
|
return false;
|
|
258216
258592
|
const cross2 = this.crossProductMagnitudeSquared(other);
|
|
258217
|
-
|
|
258218
|
-
|
|
258219
|
-
|
|
258593
|
+
// a2,b2,cross2 are squared lengths of respective vectors
|
|
258594
|
+
// cross2 = sin^2(theta) * a2 * b2
|
|
258595
|
+
// For small theta, sin^2(theta) ~ theta^2
|
|
258220
258596
|
return cross2 <= radianSquaredTol * a2 * b2;
|
|
258221
258597
|
}
|
|
258222
258598
|
/**
|
|
@@ -260171,26 +260547,28 @@ class PolygonOps {
|
|
|
260171
260547
|
return s;
|
|
260172
260548
|
}
|
|
260173
260549
|
/**
|
|
260174
|
-
* Return a Ray3d with
|
|
260175
|
-
* * `origin`
|
|
260176
|
-
* * `direction` is
|
|
260177
|
-
* * `a` is the area.
|
|
260178
|
-
* @param points
|
|
260550
|
+
* Return a [[Ray3d]] with:
|
|
260551
|
+
* * `origin` is the centroid of the polygon,
|
|
260552
|
+
* * `direction` is a unit vector perpendicular to the polygon plane,
|
|
260553
|
+
* * `a` is the polygon area.
|
|
260554
|
+
* @param points the polygon vertices in order. Points can lie in any plane. First and last point do not have to be equal.
|
|
260555
|
+
* @param result optional pre-allocated result to populate and return.
|
|
260179
260556
|
*/
|
|
260180
|
-
static centroidAreaNormal(points) {
|
|
260557
|
+
static centroidAreaNormal(points, result) {
|
|
260181
260558
|
if (Array.isArray(points)) {
|
|
260182
260559
|
const carrier = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_5__.Point3dArrayCarrier(points);
|
|
260183
|
-
return this.centroidAreaNormal(carrier);
|
|
260560
|
+
return this.centroidAreaNormal(carrier, result);
|
|
260184
260561
|
}
|
|
260185
260562
|
const n = points.length;
|
|
260186
260563
|
if (n === 3) {
|
|
260187
|
-
const normal = points.crossProductIndexIndexIndex(0, 1, 2);
|
|
260564
|
+
const normal = points.crossProductIndexIndexIndex(0, 1, 2, result?.direction);
|
|
260188
260565
|
const a = 0.5 * normal.magnitude();
|
|
260189
|
-
const centroid = points.getPoint3dAtCheckedPointIndex(0);
|
|
260566
|
+
const centroid = points.getPoint3dAtCheckedPointIndex(0, result?.origin);
|
|
260190
260567
|
points.accumulateScaledXYZ(1, 1.0, centroid);
|
|
260191
260568
|
points.accumulateScaledXYZ(2, 1.0, centroid);
|
|
260192
260569
|
centroid.scaleInPlace(1.0 / 3.0);
|
|
260193
|
-
|
|
260570
|
+
if (!result)
|
|
260571
|
+
result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
|
|
260194
260572
|
if (result.tryNormalizeInPlaceWithAreaWeight(a))
|
|
260195
260573
|
return result;
|
|
260196
260574
|
return undefined;
|
|
@@ -260208,22 +260586,24 @@ class PolygonOps {
|
|
|
260208
260586
|
points.vectorXYAndZIndex(origin, 1, vector0);
|
|
260209
260587
|
let cross = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
260210
260588
|
const centroidSum = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
260211
|
-
const
|
|
260589
|
+
const normal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero(result?.direction);
|
|
260212
260590
|
let signedTriangleArea;
|
|
260213
|
-
// This will work with or without closure edge.
|
|
260591
|
+
// This will work with or without closure edge. If closure is given, the last vector is 000.
|
|
260214
260592
|
for (let i = 2; i < n; i++) {
|
|
260215
260593
|
points.vectorXYAndZIndex(origin, i, vector1);
|
|
260216
260594
|
cross = vector0.crossProduct(vector1, cross);
|
|
260217
260595
|
signedTriangleArea = areaNormal.dotProduct(cross); // well, actually twice the area.
|
|
260218
|
-
|
|
260596
|
+
normal.addInPlace(cross); // this grows to twice the area
|
|
260219
260597
|
const b = signedTriangleArea / 6.0;
|
|
260220
260598
|
centroidSum.plus2Scaled(vector0, b, vector1, b, centroidSum);
|
|
260221
260599
|
vector0.setFrom(vector1);
|
|
260222
260600
|
}
|
|
260223
|
-
const area = 0.5 *
|
|
260601
|
+
const area = 0.5 * normal.magnitude();
|
|
260224
260602
|
const inverseArea = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(1, area);
|
|
260225
260603
|
if (inverseArea !== undefined) {
|
|
260226
|
-
const
|
|
260604
|
+
const centroid = origin.plusScaled(centroidSum, inverseArea, result?.origin);
|
|
260605
|
+
if (!result)
|
|
260606
|
+
result = _Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d.createCapture(centroid, normal);
|
|
260227
260607
|
result.tryNormalizeInPlaceWithAreaWeight(area);
|
|
260228
260608
|
return result;
|
|
260229
260609
|
}
|
|
@@ -267197,19 +267577,19 @@ class Matrix4d {
|
|
|
267197
267577
|
this._coffs[15] += scale * beta;
|
|
267198
267578
|
}
|
|
267199
267579
|
/**
|
|
267200
|
-
* Multiply and replace contents of this matrix by A*this*AT where
|
|
267201
|
-
* * A is a pure translation with final column [x,y,z,1]
|
|
267202
|
-
* * this is this matrix.
|
|
267203
|
-
* * AT is the transpose of A.
|
|
267204
|
-
* @param ax x part of translation
|
|
267205
|
-
* @param ay y part of translation
|
|
267206
|
-
* @param az z part of translation
|
|
267580
|
+
* Multiply and replace contents of ` this` matrix by `A*this*AT` where
|
|
267581
|
+
* * `A` is a pure translation with final column [x,y,z,1].
|
|
267582
|
+
* * `this` is this matrix.
|
|
267583
|
+
* * `AT` is the transpose of A.
|
|
267584
|
+
* @param ax x part of translation.
|
|
267585
|
+
* @param ay y part of translation.
|
|
267586
|
+
* @param az z part of translation.
|
|
267207
267587
|
*/
|
|
267208
267588
|
multiplyTranslationSandwichInPlace(ax, ay, az) {
|
|
267209
267589
|
const bx = this._coffs[3];
|
|
267210
267590
|
const by = this._coffs[7];
|
|
267211
267591
|
const bz = this._coffs[11];
|
|
267212
|
-
// matrixB can be non-symmetric
|
|
267592
|
+
// matrixB can be non-symmetric
|
|
267213
267593
|
const cx = this._coffs[12];
|
|
267214
267594
|
const cy = this._coffs[13];
|
|
267215
267595
|
const cz = this._coffs[14];
|
|
@@ -267232,7 +267612,7 @@ class Matrix4d {
|
|
|
267232
267612
|
this._coffs[12] += axBeta;
|
|
267233
267613
|
this._coffs[13] += ayBeta;
|
|
267234
267614
|
this._coffs[14] += azBeta;
|
|
267235
|
-
// coffs[15] is unchanged
|
|
267615
|
+
// coffs[15] is unchanged
|
|
267236
267616
|
}
|
|
267237
267617
|
}
|
|
267238
267618
|
|
|
@@ -267283,8 +267663,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
267283
267663
|
* * e.g. entry 03 is summed x.
|
|
267284
267664
|
* * In this level:
|
|
267285
267665
|
* * the `absoluteQuantity` member is undefined.
|
|
267286
|
-
* * the `localToWorldMap` and `radiiOfGyration` are created
|
|
267287
|
-
* * Second level: after a call to inertiaProductsToPrincipalAxes
|
|
267666
|
+
* * the `localToWorldMap` and `radiiOfGyration` are created but have undefined contents.
|
|
267667
|
+
* * Second level: after a call to `inertiaProductsToPrincipalAxes`, the `localToWorldMap`, `absoluteQuantity` and
|
|
267288
267668
|
* `radiiOfGyration` are filled in.
|
|
267289
267669
|
* @public
|
|
267290
267670
|
*/
|
|
@@ -267304,18 +267684,35 @@ class MomentData {
|
|
|
267304
267684
|
* * This set up with its inverse already constructed.
|
|
267305
267685
|
*/
|
|
267306
267686
|
localToWorldMap;
|
|
267687
|
+
/** Radii of gyration (square roots of principal second moments). */
|
|
267688
|
+
radiusOfGyration;
|
|
267689
|
+
/**
|
|
267690
|
+
* Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
|
|
267691
|
+
* inertiaProductsToPrincipalAxes.
|
|
267692
|
+
*/
|
|
267693
|
+
absoluteQuantity;
|
|
267307
267694
|
// private variables
|
|
267308
267695
|
static _vectorA;
|
|
267309
267696
|
static _vectorB;
|
|
267310
267697
|
static _vectorC;
|
|
267311
267698
|
_point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
267312
267699
|
_point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
267700
|
+
/** Constructor. */
|
|
267701
|
+
constructor() {
|
|
267702
|
+
this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
|
|
267703
|
+
this.needOrigin = false;
|
|
267704
|
+
this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
|
|
267705
|
+
this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
|
|
267706
|
+
this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
|
|
267707
|
+
this.absoluteQuantity = 0.1; // so optimizer sees its type
|
|
267708
|
+
this.absoluteQuantity = undefined;
|
|
267709
|
+
}
|
|
267313
267710
|
/**
|
|
267314
267711
|
* Return the lower-right (3,3) entry in the sums.
|
|
267315
267712
|
* * This is the quantity (i.e. length, area, or volume) summed.
|
|
267316
267713
|
*/
|
|
267317
267714
|
get quantitySum() {
|
|
267318
|
-
return this.sums.
|
|
267715
|
+
return this.sums.weight();
|
|
267319
267716
|
}
|
|
267320
267717
|
/**
|
|
267321
267718
|
* Return a scale factor to make these sums match the target orientation sign.
|
|
@@ -267346,23 +267743,6 @@ class MomentData {
|
|
|
267346
267743
|
this.needOrigin = false;
|
|
267347
267744
|
}
|
|
267348
267745
|
}
|
|
267349
|
-
/** Radii of gyration (square roots of principal second moments). */
|
|
267350
|
-
radiusOfGyration;
|
|
267351
|
-
/**
|
|
267352
|
-
* Principal quantity (e.g. length, area, or volume). This is undefined in raw moments, and becomes defined by
|
|
267353
|
-
* inertiaProductsToPrincipalAxes.
|
|
267354
|
-
*/
|
|
267355
|
-
absoluteQuantity;
|
|
267356
|
-
/** Constructor. */
|
|
267357
|
-
constructor() {
|
|
267358
|
-
this.origin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
|
|
267359
|
-
this.sums = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createZero();
|
|
267360
|
-
this.localToWorldMap = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
|
|
267361
|
-
this.radiusOfGyration = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
|
|
267362
|
-
this.needOrigin = false;
|
|
267363
|
-
this.absoluteQuantity = 0.1; // so optimizer sees its type
|
|
267364
|
-
this.absoluteQuantity = undefined;
|
|
267365
|
-
}
|
|
267366
267746
|
/**
|
|
267367
267747
|
* Create moments with optional origin.
|
|
267368
267748
|
* * Origin and needOrigin are quirky.
|
|
@@ -267406,7 +267786,7 @@ class MomentData {
|
|
|
267406
267786
|
axes.setColumnsPoint4dXYZ(points[0], points[1], points[2]);
|
|
267407
267787
|
if (axes.determinant() < 0)
|
|
267408
267788
|
axes.scaleColumnsInPlace(-1.0, -1.0, -1.0);
|
|
267409
|
-
// prefer x and z positive
|
|
267789
|
+
// prefer x and z positive; y falls wherever
|
|
267410
267790
|
if (axes.at(0, 0) < 0.0)
|
|
267411
267791
|
axes.scaleColumnsInPlace(-1.0, -1.0, 1.0);
|
|
267412
267792
|
if (axes.at(2, 2) < 0.0)
|
|
@@ -267431,7 +267811,8 @@ class MomentData {
|
|
|
267431
267811
|
* * Hence x axis is long direction.
|
|
267432
267812
|
* * Hence planar data generates large moment as Z.
|
|
267433
267813
|
* @param origin The origin used for the inertia products.
|
|
267434
|
-
* @param inertiaProducts The inertia products: sums or integrals of
|
|
267814
|
+
* @param inertiaProducts The inertia products: sums or integrals of
|
|
267815
|
+
* [xx,xy,xz,xw; yx,yy,yz,yw; zx,zy,zz,zw; wx,wy,wz,w].
|
|
267435
267816
|
*/
|
|
267436
267817
|
static inertiaProductsToPrincipalAxes(origin, inertiaProducts) {
|
|
267437
267818
|
const moments = new MomentData();
|
|
@@ -267475,23 +267856,21 @@ class MomentData {
|
|
|
267475
267856
|
*/
|
|
267476
267857
|
static areEquivalentPrincipalAxes(dataA, dataB) {
|
|
267477
267858
|
if (dataA && dataB
|
|
267478
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { //
|
|
267859
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.quantitySum, dataB.quantitySum)) { // TODO: need different tolerance for area, volume?
|
|
267479
267860
|
if (dataA.localToWorldMap.getOrigin().isAlmostEqual(dataB.localToWorldMap.getOrigin())
|
|
267480
267861
|
&& dataA.radiusOfGyration.isAlmostEqual(dataB.radiusOfGyration)) {
|
|
267481
267862
|
if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.y)) {
|
|
267482
|
-
//
|
|
267863
|
+
// we have at least xy symmetry
|
|
267483
267864
|
if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinate(dataA.radiusOfGyration.x, dataA.radiusOfGyration.z))
|
|
267484
267865
|
return true;
|
|
267485
|
-
// just xy
|
|
267486
|
-
// allow opposite z directions.
|
|
267487
|
-
// If the z's are aligned, x an dy can spin freely.
|
|
267866
|
+
// just xy; allow opposite z directions; if the z's are aligned, x and y can spin freely
|
|
267488
267867
|
const zA = dataA.localToWorldMap.matrix.columnZ();
|
|
267489
267868
|
const zB = dataB.localToWorldMap.matrix.columnZ();
|
|
267490
267869
|
if (zA.isParallelTo(zB, true))
|
|
267491
267870
|
return true;
|
|
267492
267871
|
return false;
|
|
267493
267872
|
}
|
|
267494
|
-
// no symmetry
|
|
267873
|
+
// no symmetry; test all three axes
|
|
267495
267874
|
const vectorA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
|
|
267496
267875
|
const vectorB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
|
|
267497
267876
|
for (let i = 0; i < 3; i++) {
|
|
@@ -267521,7 +267900,7 @@ class MomentData {
|
|
|
267521
267900
|
}
|
|
267522
267901
|
/** Revise the accumulated sums to be "around the centroid". */
|
|
267523
267902
|
shiftOriginAndSumsToCentroidOfSums() {
|
|
267524
|
-
const xyz = this.sums.columnW().realPoint();
|
|
267903
|
+
const xyz = this.sums.columnW().realPoint(); // centroid of the geometry
|
|
267525
267904
|
if (xyz) {
|
|
267526
267905
|
this.shiftOriginAndSumsByXYZ(xyz.x, xyz.y, xyz.z);
|
|
267527
267906
|
return true;
|
|
@@ -267530,9 +267909,9 @@ class MomentData {
|
|
|
267530
267909
|
}
|
|
267531
267910
|
/**
|
|
267532
267911
|
* Revise the accumulated sums.
|
|
267533
|
-
* *
|
|
267534
|
-
* *
|
|
267535
|
-
|
|
267912
|
+
* * Add (ax,ay,az) to the origin coordinates.
|
|
267913
|
+
* * Apply the negative translation to the sums.
|
|
267914
|
+
*/
|
|
267536
267915
|
shiftOriginAndSumsByXYZ(ax, ay, az) {
|
|
267537
267916
|
this.origin.addXYZInPlace(ax, ay, az);
|
|
267538
267917
|
this.sums.multiplyTranslationSandwichInPlace(-ax, -ay, -az);
|
|
@@ -267542,23 +267921,24 @@ class MomentData {
|
|
|
267542
267921
|
this.shiftOriginAndSumsByXYZ(newOrigin.x - this.origin.x, newOrigin.y - this.origin.y, newOrigin.z - this.origin.z);
|
|
267543
267922
|
}
|
|
267544
267923
|
/**
|
|
267545
|
-
* Compute moments of a triangle from the origin
|
|
267546
|
-
*
|
|
267547
|
-
* * If `pointA` is undefined, use `this.origin` as pointA
|
|
267548
|
-
|
|
267549
|
-
*/
|
|
267924
|
+
* Compute moments of a triangle from the origin. Accumulate them to `this.sums`.
|
|
267925
|
+
* * If `this.needOrigin` is set, `this.origin` is set to `pointB`.
|
|
267926
|
+
* * If `pointA` is undefined, use `this.origin` as `pointA`.
|
|
267927
|
+
*/
|
|
267550
267928
|
accumulateTriangleMomentsXY(pointA, pointB, pointC) {
|
|
267551
267929
|
this.setOriginXYZIfNeeded(pointB.x, pointB.y, 0.0);
|
|
267552
267930
|
const x0 = this.origin.x;
|
|
267553
267931
|
const y0 = this.origin.y;
|
|
267554
|
-
const vectorA = MomentData._vectorA =
|
|
267555
|
-
|
|
267556
|
-
|
|
267932
|
+
const vectorA = MomentData._vectorA = (pointA !== undefined) ?
|
|
267933
|
+
_Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointA.x - x0, pointA.y - y0, 0.0, 1.0, MomentData._vectorA) :
|
|
267934
|
+
_Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(0.0, 0.0, 0.0, 1.0, MomentData._vectorA);
|
|
267557
267935
|
const vectorB = MomentData._vectorB = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointB.x - x0, pointB.y - y0, 0.0, 1.0, MomentData._vectorB);
|
|
267558
267936
|
const vectorC = MomentData._vectorC = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(pointC.x - x0, pointC.y - y0, 0.0, 1.0, MomentData._vectorC);
|
|
267559
|
-
//
|
|
267560
|
-
//
|
|
267561
|
-
//
|
|
267937
|
+
// Below we calculate 16 double integrals: \iint_T [x y 0 1]^ [x y 0 1] dT over triangle T=(A,B,C).
|
|
267938
|
+
// Each accumulates contributions from 9 scaled outer products. Integration computations use the barycentric
|
|
267939
|
+
// change of variables [B-A C-A][u,v]^ = [x,y]^ with Jacobian detJ = B-A x C-A = twice the area of T.
|
|
267940
|
+
// This converts the integration domain from T to the triangle bounded by u=0, v=0 and v=1-u, yielding e.g.,
|
|
267941
|
+
// \iint_T x^2 dT = detJ \int_0^1 \int_0^{1-u} u^2 dv du = detJ / 12, and similarly \iint_T xy dT = detJ / 24.
|
|
267562
267942
|
const detJ = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(vectorB.x - vectorA.x, vectorB.y - vectorA.y, vectorC.x - vectorA.x, vectorC.y - vectorA.y);
|
|
267563
267943
|
if (detJ !== 0.0) {
|
|
267564
267944
|
const r1_12 = detJ / 12.0;
|
|
@@ -267574,7 +267954,7 @@ class MomentData {
|
|
|
267574
267954
|
this.sums.addScaledOuterProductInPlace(vectorC, vectorC, r1_12);
|
|
267575
267955
|
}
|
|
267576
267956
|
}
|
|
267577
|
-
/** Add scaled outer product of (4d, unit weight) point to this.sums
|
|
267957
|
+
/** Add scaled outer product of (4d, unit weight) point to `this.sums`. */
|
|
267578
267958
|
accumulateScaledOuterProduct(point, scaleFactor) {
|
|
267579
267959
|
this.setOriginXYZIfNeeded(point.x, point.y, 0.0);
|
|
267580
267960
|
const vectorA = MomentData._vectorA = _Point4d__WEBPACK_IMPORTED_MODULE_5__.Point4d.create(point.x - this.origin.x, point.y - this.origin.y, point.z - this.origin.z, 1.0, MomentData._vectorA);
|
|
@@ -267597,16 +267977,15 @@ class MomentData {
|
|
|
267597
267977
|
this.sums.addScaledOuterProductInPlace(vectorB, vectorB, r1_3);
|
|
267598
267978
|
}
|
|
267599
267979
|
/**
|
|
267600
|
-
* Compute moments of triangles from a base point to the given linestring.
|
|
267601
|
-
*
|
|
267602
|
-
* * If `
|
|
267603
|
-
* * If `this.needOrigin` is set, the first point of the array is captured as local origin for subsequent sums.
|
|
267604
|
-
*
|
|
267980
|
+
* Compute moments of triangles from a base point to the given linestring. Accumulate them to `this.sums`.
|
|
267981
|
+
* * If `this.needOrigin` is set, `this.origin` is set to the first point of the array.
|
|
267982
|
+
* * If `sweepBase` is undefined, use `this.origin` as `sweepBase`.
|
|
267605
267983
|
*/
|
|
267606
267984
|
accumulateTriangleToLineStringMomentsXY(sweepBase, points) {
|
|
267607
267985
|
const n = points.length;
|
|
267608
267986
|
if (n > 1) {
|
|
267609
267987
|
points.getPoint3dAtUncheckedPointIndex(0, this._point0);
|
|
267988
|
+
// The linestring forms a polygon with sweepBase. Integrate over this polygon using Shoelace algorithm.
|
|
267610
267989
|
for (let i = 1; i < n; i++) {
|
|
267611
267990
|
points.getPoint3dAtUncheckedPointIndex(i, this._point1);
|
|
267612
267991
|
this.accumulateTriangleMomentsXY(sweepBase, this._point0, this._point1);
|
|
@@ -267615,17 +267994,17 @@ class MomentData {
|
|
|
267615
267994
|
}
|
|
267616
267995
|
}
|
|
267617
267996
|
/**
|
|
267618
|
-
*
|
|
267619
|
-
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin].
|
|
267620
|
-
* parts of vectors).
|
|
267621
|
-
* *
|
|
267997
|
+
* Assemble XX, YY, XY products into a full matrix form [xx,xy,0,0; xy,yy,0,0; 0,0,0,0; 0,0,0,1].
|
|
267998
|
+
* * Sandwich this between transforms with columns [vectorU, vectorV, 0000, origin].
|
|
267999
|
+
* (column weights 0001; only xy parts of vectors).
|
|
268000
|
+
* * Scale by detJ for the xy-only determinant of the vectors.
|
|
267622
268001
|
* @param productXX
|
|
267623
268002
|
* @param productXY
|
|
267624
268003
|
* @param productYY
|
|
267625
|
-
* @param area
|
|
267626
|
-
* @param origin
|
|
267627
|
-
* @param vectorU
|
|
267628
|
-
* @param vectorV
|
|
268004
|
+
* @param area area in caller's system.
|
|
268005
|
+
* @param origin caller's origin.
|
|
268006
|
+
* @param vectorU caller's U axis (not necessarily unit).
|
|
268007
|
+
* @param vectorV caller's V axis (not necessarily unit).
|
|
267629
268008
|
*/
|
|
267630
268009
|
accumulateXYProductsInCentroidalFrame(productXX, productXY, productYY, area, origin, vectorU, vectorV) {
|
|
267631
268010
|
const centroidalProducts = _Matrix4d__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createRowValues(productXX, productXY, 0, 0, productXY, productYY, 0, 0, 0, 0, 0, 0, 0, 0, 0, area);
|
|
@@ -329006,18 +329385,18 @@ class Settings {
|
|
|
329006
329385
|
}
|
|
329007
329386
|
}
|
|
329008
329387
|
toString() {
|
|
329009
|
-
return `Configurations:
|
|
329010
|
-
backend location: ${this.Backend.location},
|
|
329011
|
-
backend name: ${this.Backend.name},
|
|
329012
|
-
backend version: ${this.Backend.version},
|
|
329013
|
-
oidc client id: ${this.oidcClientId},
|
|
329014
|
-
oidc scopes: ${this.oidcScopes},
|
|
329015
|
-
applicationId: ${this.gprid},
|
|
329016
|
-
log level: ${this.logLevel},
|
|
329017
|
-
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
329018
|
-
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
329019
|
-
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
329020
|
-
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
329388
|
+
return `Configurations:
|
|
329389
|
+
backend location: ${this.Backend.location},
|
|
329390
|
+
backend name: ${this.Backend.name},
|
|
329391
|
+
backend version: ${this.Backend.version},
|
|
329392
|
+
oidc client id: ${this.oidcClientId},
|
|
329393
|
+
oidc scopes: ${this.oidcScopes},
|
|
329394
|
+
applicationId: ${this.gprid},
|
|
329395
|
+
log level: ${this.logLevel},
|
|
329396
|
+
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
329397
|
+
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
329398
|
+
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
329399
|
+
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
329021
329400
|
testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
|
|
329022
329401
|
}
|
|
329023
329402
|
}
|
|
@@ -329231,7 +329610,7 @@ class TestContext {
|
|
|
329231
329610
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
329232
329611
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
329233
329612
|
await core_frontend_1.NoRenderApp.startup({
|
|
329234
|
-
applicationVersion: "5.1.0-dev.
|
|
329613
|
+
applicationVersion: "5.1.0-dev.12",
|
|
329235
329614
|
applicationId: this.settings.gprid,
|
|
329236
329615
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
329237
329616
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -331771,6 +332150,28 @@ const getClassName = (obj) => {
|
|
|
331771
332150
|
};
|
|
331772
332151
|
|
|
331773
332152
|
|
|
332153
|
+
/***/ }),
|
|
332154
|
+
|
|
332155
|
+
/***/ "../../core/frontend/lib/esm/extension/providers lazy recursive":
|
|
332156
|
+
/*!******************************************************************************!*\
|
|
332157
|
+
!*** ../../core/frontend/lib/esm/extension/providers/ lazy namespace object ***!
|
|
332158
|
+
\******************************************************************************/
|
|
332159
|
+
/***/ ((module) => {
|
|
332160
|
+
|
|
332161
|
+
function webpackEmptyAsyncContext(req) {
|
|
332162
|
+
// Here Promise.resolve().then() is used instead of new Promise() to prevent
|
|
332163
|
+
// uncaught exception popping up in devtools
|
|
332164
|
+
return Promise.resolve().then(() => {
|
|
332165
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
332166
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
332167
|
+
throw e;
|
|
332168
|
+
});
|
|
332169
|
+
}
|
|
332170
|
+
webpackEmptyAsyncContext.keys = () => ([]);
|
|
332171
|
+
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
|
332172
|
+
webpackEmptyAsyncContext.id = "../../core/frontend/lib/esm/extension/providers lazy recursive";
|
|
332173
|
+
module.exports = webpackEmptyAsyncContext;
|
|
332174
|
+
|
|
331774
332175
|
/***/ }),
|
|
331775
332176
|
|
|
331776
332177
|
/***/ "?088e":
|
|
@@ -342330,13 +342731,13 @@ class FavoritePropertiesManager {
|
|
|
342330
342731
|
if (missingClasses.size === 0) {
|
|
342331
342732
|
return baseClasses;
|
|
342332
342733
|
}
|
|
342333
|
-
const query = `
|
|
342334
|
-
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
342335
|
-
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
342336
|
-
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
342337
|
-
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
342338
|
-
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
342339
|
-
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
342734
|
+
const query = `
|
|
342735
|
+
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
342736
|
+
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
342737
|
+
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
342738
|
+
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
342739
|
+
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
342740
|
+
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
342340
342741
|
WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
|
|
342341
342742
|
const reader = imodel.createQueryReader(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames });
|
|
342342
342743
|
while (await reader.step()) {
|
|
@@ -354277,7 +354678,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
354277
354678
|
/***/ ((module) => {
|
|
354278
354679
|
|
|
354279
354680
|
"use strict";
|
|
354280
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.
|
|
354681
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.12","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
354281
354682
|
|
|
354282
354683
|
/***/ }),
|
|
354283
354684
|
|