@itwin/ecschema-rpcinterface-tests 4.9.0-dev.22 → 4.9.0-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +115 -85
- 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_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|
|
|
1
|
+
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\6\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -4317,41 +4317,6 @@ __exportStar(__webpack_require__(/*! ./TestFrontendAuthorizationClient */ "../..
|
|
|
4317
4317
|
__exportStar(__webpack_require__(/*! ./certa/certaCommon */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@4.3.5_67wltvhdskk2oee2c3z2o4tfly/node_modules/@itwin/oidc-signin-tool/lib/cjs/certa/certaCommon.js"), exports);
|
|
4318
4318
|
//# sourceMappingURL=frontend.js.map
|
|
4319
4319
|
|
|
4320
|
-
/***/ }),
|
|
4321
|
-
|
|
4322
|
-
/***/ "../../common/temp/node_modules/.pnpm/almost-equal@1.1.0/node_modules/almost-equal/almost_equal.js":
|
|
4323
|
-
/*!*********************************************************************************************************!*\
|
|
4324
|
-
!*** ../../common/temp/node_modules/.pnpm/almost-equal@1.1.0/node_modules/almost-equal/almost_equal.js ***!
|
|
4325
|
-
\*********************************************************************************************************/
|
|
4326
|
-
/***/ ((module) => {
|
|
4327
|
-
|
|
4328
|
-
"use strict";
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
var abs = Math.abs
|
|
4332
|
-
, min = Math.min
|
|
4333
|
-
|
|
4334
|
-
function almostEqual(a, b, absoluteError, relativeError) {
|
|
4335
|
-
var d = abs(a - b)
|
|
4336
|
-
|
|
4337
|
-
if (absoluteError == null) absoluteError = almostEqual.DBL_EPSILON;
|
|
4338
|
-
if (relativeError == null) relativeError = absoluteError;
|
|
4339
|
-
|
|
4340
|
-
if(d <= absoluteError) {
|
|
4341
|
-
return true
|
|
4342
|
-
}
|
|
4343
|
-
if(d <= relativeError * min(abs(a), abs(b))) {
|
|
4344
|
-
return true
|
|
4345
|
-
}
|
|
4346
|
-
return a === b
|
|
4347
|
-
}
|
|
4348
|
-
|
|
4349
|
-
almostEqual.FLT_EPSILON = 1.19209290e-7
|
|
4350
|
-
almostEqual.DBL_EPSILON = 2.2204460492503131e-16
|
|
4351
|
-
|
|
4352
|
-
module.exports = almostEqual
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
4320
|
/***/ }),
|
|
4356
4321
|
|
|
4357
4322
|
/***/ "../../common/temp/node_modules/.pnpm/assertion-error@1.1.0/node_modules/assertion-error/index.js":
|
|
@@ -24486,6 +24451,12 @@ class Logger {
|
|
|
24486
24451
|
Logger._logError(category, message, metaData);
|
|
24487
24452
|
}
|
|
24488
24453
|
static getExceptionMessage(err) {
|
|
24454
|
+
if (err === undefined) {
|
|
24455
|
+
return "Error: err is undefined.";
|
|
24456
|
+
}
|
|
24457
|
+
if (err === null) {
|
|
24458
|
+
return "Error: err is null.";
|
|
24459
|
+
}
|
|
24489
24460
|
const stack = Logger.logExceptionCallstacks ? `\n${_BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorStack(err)}` : "";
|
|
24490
24461
|
return _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMessage(err) + stack;
|
|
24491
24462
|
}
|
|
@@ -24496,7 +24467,7 @@ class Logger {
|
|
|
24496
24467
|
*/
|
|
24497
24468
|
static logException(category, err, log = (_category, message, metaData) => Logger.logError(_category, message, metaData)) {
|
|
24498
24469
|
log(category, Logger.getExceptionMessage(err), () => {
|
|
24499
|
-
return { ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMetadata(err), exceptionType: err
|
|
24470
|
+
return { ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMetadata(err), exceptionType: err?.constructor?.name ?? "<Unknown>" };
|
|
24500
24471
|
});
|
|
24501
24472
|
}
|
|
24502
24473
|
/** Log the specified message to the **warning** stream.
|
|
@@ -69637,13 +69608,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69637
69608
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
69638
69609
|
/* harmony export */ "UnitConversion": () => (/* binding */ UnitConversion)
|
|
69639
69610
|
/* harmony export */ });
|
|
69640
|
-
/* harmony import */ var
|
|
69641
|
-
/* harmony import */ var
|
|
69642
|
-
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
69643
|
-
/*---------------------------------------------------------------------------------------------
|
|
69644
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
69645
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
69646
|
-
*--------------------------------------------------------------------------------------------*/
|
|
69611
|
+
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
69612
|
+
/* harmony import */ var _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-quantity */ "../../core/quantity/lib/esm/core-quantity.js");
|
|
69647
69613
|
|
|
69648
69614
|
|
|
69649
69615
|
/**
|
|
@@ -69684,7 +69650,7 @@ class UnitConversion {
|
|
|
69684
69650
|
* @internal
|
|
69685
69651
|
*/
|
|
69686
69652
|
multiply(conversion) {
|
|
69687
|
-
if (
|
|
69653
|
+
if ((0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.almostEqual)(conversion.offset, 0.0) && (0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.almostEqual)(this.offset, 0.0))
|
|
69688
69654
|
return new UnitConversion(this.factor * conversion.factor, 0.0);
|
|
69689
69655
|
throw new Error("Cannot multiply two maps with non-zero offsets");
|
|
69690
69656
|
}
|
|
@@ -69693,11 +69659,11 @@ class UnitConversion {
|
|
|
69693
69659
|
* @internal
|
|
69694
69660
|
*/
|
|
69695
69661
|
raise(power) {
|
|
69696
|
-
if (
|
|
69662
|
+
if ((0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.almostEqual)(power, 1.0))
|
|
69697
69663
|
return new UnitConversion(this.factor, this.offset);
|
|
69698
|
-
else if (
|
|
69664
|
+
else if ((0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.almostEqual)(power, 0.0))
|
|
69699
69665
|
return new UnitConversion(1.0, 0.0);
|
|
69700
|
-
if (
|
|
69666
|
+
if ((0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.almostEqual)(this.offset, 0.0))
|
|
69701
69667
|
return new UnitConversion(this.factor ** power, 0.0);
|
|
69702
69668
|
throw new Error("Cannot raise map with non-zero offset");
|
|
69703
69669
|
}
|
|
@@ -69706,7 +69672,7 @@ class UnitConversion {
|
|
|
69706
69672
|
* @internal
|
|
69707
69673
|
*/
|
|
69708
69674
|
static from(unit) {
|
|
69709
|
-
if (unit.schemaItemType ===
|
|
69675
|
+
if (unit.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaItemType.Unit)
|
|
69710
69676
|
return new UnitConversion(unit.denominator / unit.numerator, -unit.offset);
|
|
69711
69677
|
return new UnitConversion(unit.denominator / unit.numerator, 0.0);
|
|
69712
69678
|
}
|
|
@@ -85608,15 +85574,15 @@ class PlanarClipMaskState {
|
|
|
85608
85574
|
this._tileTreeRefs.forEach((treeRef) => treeRef.discloseTileTrees(trees));
|
|
85609
85575
|
}
|
|
85610
85576
|
// Returns the TileTreeReferences for the models that need to be drawn to create the planar clip mask, and extend the maskRange if needed.
|
|
85611
|
-
getTileTrees(
|
|
85577
|
+
getTileTrees(context, classifiedModelId, maskRange) {
|
|
85612
85578
|
if (this.settings.mode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.PlanarClipMaskMode.Priority) {
|
|
85613
85579
|
// For priority mode we simply want refs for all viewed models if the priority is higher than the mask priority.
|
|
85614
85580
|
// For this case, we don't need a maskRange so leave it as null.
|
|
85615
85581
|
const viewTrees = new Array();
|
|
85616
85582
|
const thisPriority = this.settings.priority === undefined ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.PlanarClipMaskPriority.RealityModel : this.settings.priority;
|
|
85617
|
-
|
|
85583
|
+
context.viewport.forEachTileTreeRef((ref) => {
|
|
85618
85584
|
const tree = ref.treeOwner.load();
|
|
85619
|
-
if (tree && tree.modelId !== classifiedModelId && ref.
|
|
85585
|
+
if (tree && tree.modelId !== classifiedModelId && ref.planarClipMaskPriority > thisPriority)
|
|
85620
85586
|
viewTrees.push(ref);
|
|
85621
85587
|
});
|
|
85622
85588
|
return viewTrees;
|
|
@@ -85626,8 +85592,8 @@ class PlanarClipMaskState {
|
|
|
85626
85592
|
// Keep calling this until loaded so that the range is valid.
|
|
85627
85593
|
if (!this._allLoaded) {
|
|
85628
85594
|
this._tileTreeRefs = new Array();
|
|
85629
|
-
if (this.settings.modelIds) {
|
|
85630
|
-
view.collectMaskRefs(this.settings.modelIds, this._tileTreeRefs, maskRange);
|
|
85595
|
+
if (this.settings.modelIds && context.viewport.view.isSpatialView()) {
|
|
85596
|
+
context.viewport.view.collectMaskRefs(this.settings.modelIds, this._tileTreeRefs, maskRange);
|
|
85631
85597
|
}
|
|
85632
85598
|
this._allLoaded = this._tileTreeRefs.every((treeRef) => treeRef.treeOwner.load() !== undefined);
|
|
85633
85599
|
maskRange.clone(this._maskRange);
|
|
@@ -85637,10 +85603,10 @@ class PlanarClipMaskState {
|
|
|
85637
85603
|
return this._allLoaded ? this._tileTreeRefs : undefined;
|
|
85638
85604
|
}
|
|
85639
85605
|
// Returns any potential FeatureSymbology overrides for drawing the planar clip mask.
|
|
85640
|
-
getPlanarClipMaskSymbologyOverrides(
|
|
85606
|
+
getPlanarClipMaskSymbologyOverrides(context, featureSymbologySource) {
|
|
85641
85607
|
this._usingViewportOverrides = false;
|
|
85642
85608
|
// First obtain a list of models that will need to be turned off for drawing the planar clip mask (only used for batched tile trees).
|
|
85643
|
-
const overrideModels = view.getModelsNotInMask(this.settings.modelIds, _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.PlanarClipMaskMode.Priority === this.settings.mode);
|
|
85609
|
+
const overrideModels = context.viewport.view.isSpatialView() ? context.viewport.view.getModelsNotInMask(this.settings.modelIds, _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.PlanarClipMaskMode.Priority === this.settings.mode) : undefined;
|
|
85644
85610
|
const noSubCategoryOrElementIds = !this.settings.subCategoryOrElementIds;
|
|
85645
85611
|
if (noSubCategoryOrElementIds && !overrideModels)
|
|
85646
85612
|
return undefined;
|
|
@@ -118368,7 +118334,7 @@ class PlanarClassifier extends _RenderPlanarClassifier__WEBPACK_IMPORTED_MODULE_
|
|
|
118368
118334
|
this._width = requiredWidth;
|
|
118369
118335
|
this._height = requiredHeight;
|
|
118370
118336
|
const maskRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.createNull();
|
|
118371
|
-
const maskTrees = this._planarClipMask?.getTileTrees(
|
|
118337
|
+
const maskTrees = this._planarClipMask?.getTileTrees(context, target.modelId, maskRange);
|
|
118372
118338
|
if (!maskTrees && !this._classifierTreeRef)
|
|
118373
118339
|
return;
|
|
118374
118340
|
const allTrees = maskTrees ? maskTrees.slice() : new Array();
|
|
@@ -118380,14 +118346,14 @@ class PlanarClassifier extends _RenderPlanarClassifier__WEBPACK_IMPORTED_MODULE_
|
|
|
118380
118346
|
this._projectionMatrix = projection.projectionMatrix;
|
|
118381
118347
|
this._frustum = projection.textureFrustum;
|
|
118382
118348
|
this._debugFrustum = projection.debugFrustum;
|
|
118383
|
-
this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(
|
|
118349
|
+
this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);
|
|
118384
118350
|
if (!this._planarClipMask?.usingViewportOverrides && this._removeMe) {
|
|
118385
118351
|
this._removeMe();
|
|
118386
118352
|
this._removeMe = undefined;
|
|
118387
118353
|
}
|
|
118388
118354
|
else if (this._planarClipMask?.usingViewportOverrides && !this._removeMe) {
|
|
118389
118355
|
this._removeMe = context.viewport.onFeatureOverridesChanged.addListener(() => {
|
|
118390
|
-
this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(
|
|
118356
|
+
this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);
|
|
118391
118357
|
context.viewport.requestRedraw();
|
|
118392
118358
|
});
|
|
118393
118359
|
}
|
|
@@ -135304,7 +135270,7 @@ const applyPlanarClassificationColorForThematic = applyPlanarClassificationPrelu
|
|
|
135304
135270
|
return classColor;
|
|
135305
135271
|
`;
|
|
135306
135272
|
const overrideFeatureId = `
|
|
135307
|
-
if (u_pClassColorParams.x
|
|
135273
|
+
if (u_pClassColorParams.x != kClassifierDisplay_Element) return currentId;
|
|
135308
135274
|
vec2 classPos = v_pClassPos / v_pClassPosW;
|
|
135309
135275
|
vec4 featureTexel = TEXTURE(s_pClassSampler, vec2(classPos.x, (1.0 + classPos.y) / u_pClassColorParams.z));
|
|
135310
135276
|
return (featureTexel == vec4(0)) ? currentId : addUInt32s(u_batchBase, featureTexel * 255.0) / 255.0;
|
|
@@ -147616,8 +147582,10 @@ class GraphicRef extends _internal__WEBPACK_IMPORTED_MODULE_1__.TileTreeReferenc
|
|
|
147616
147582
|
this._owner = args.iModel.tiles.getTileTreeOwner(args, supplier);
|
|
147617
147583
|
this._modelId = args.modelId;
|
|
147618
147584
|
this._getToolTip = args.getToolTip;
|
|
147585
|
+
this._planarClipMaskPriority = args.planarClipMaskPriority;
|
|
147619
147586
|
}
|
|
147620
147587
|
get treeOwner() { return this._owner; }
|
|
147588
|
+
get planarClipMaskPriority() { return this._planarClipMaskPriority ?? super.planarClipMaskPriority; }
|
|
147621
147589
|
canSupplyToolTip(hit) {
|
|
147622
147590
|
return undefined !== this._getToolTip && this._modelId === hit.modelId;
|
|
147623
147591
|
}
|
|
@@ -150761,11 +150729,11 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
150761
150729
|
}
|
|
150762
150730
|
/** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */
|
|
150763
150731
|
get isGlobal() { return false; }
|
|
150764
|
-
/**
|
|
150765
|
-
*
|
|
150766
|
-
* @
|
|
150732
|
+
/** The [PlanarClipMaskPriority]($common) of this tile tree used to determine which tile trees contribute to a clip mask when
|
|
150733
|
+
* using [PlanarClipMaskMode.Priority]($common).
|
|
150734
|
+
* @beta
|
|
150767
150735
|
*/
|
|
150768
|
-
get
|
|
150736
|
+
get planarClipMaskPriority() { return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PlanarClipMaskPriority.DesignModel; }
|
|
150769
150737
|
/** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */
|
|
150770
150738
|
addLogoCards(_cards, _vp) { }
|
|
150771
150739
|
/** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].
|
|
@@ -150802,10 +150770,18 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
150802
150770
|
return this._createGeometryTreeReference();
|
|
150803
150771
|
}
|
|
150804
150772
|
/** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].
|
|
150805
|
-
* The reference can be used
|
|
150773
|
+
* The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:
|
|
150806
150774
|
* ```ts
|
|
150807
150775
|
* [[include:TileTreeReference_createFromRenderGraphic]]
|
|
150808
150776
|
*```
|
|
150777
|
+
* Or, it can be used as a [[DynamicSpatialClassifier]] to contextualize a reality model, like so:
|
|
150778
|
+
* ```ts
|
|
150779
|
+
* [[include:TileTreeReference_DynamicClassifier]]
|
|
150780
|
+
* ```
|
|
150781
|
+
* It can also be used to mask out portions of the background map or terrain via [PlanarClipMaskSettings]($common), as shown below:
|
|
150782
|
+
* ```ts
|
|
150783
|
+
* [[include:TileTreeReference_DynamicClipMask]]
|
|
150784
|
+
* ```
|
|
150809
150785
|
* @beta
|
|
150810
150786
|
*/
|
|
150811
150787
|
static createFromRenderGraphic(args) {
|
|
@@ -155585,7 +155561,11 @@ var MapLayerImageryProviderStatus;
|
|
|
155585
155561
|
class MapLayerImageryProvider {
|
|
155586
155562
|
/** @internal */
|
|
155587
155563
|
get status() { return this._status; }
|
|
155588
|
-
/**
|
|
155564
|
+
/** Determine if this provider supports map feature info.
|
|
155565
|
+
* For example, this can be used to show the map feature info tool only when a provider is registered to support it.
|
|
155566
|
+
* @returns true if provider supports map feature info else return false.
|
|
155567
|
+
* @public
|
|
155568
|
+
*/
|
|
155589
155569
|
get supportsMapFeatureInfo() { return false; }
|
|
155590
155570
|
resetStatus() { this.setStatus(MapLayerImageryProviderStatus.Valid); }
|
|
155591
155571
|
/** @internal */
|
|
@@ -157990,7 +157970,7 @@ class MapTileTreeReference extends _internal__WEBPACK_IMPORTED_MODULE_7__.TileTr
|
|
|
157990
157970
|
}
|
|
157991
157971
|
get isGlobal() { return true; }
|
|
157992
157972
|
get baseColor() { return this._baseColor; }
|
|
157993
|
-
get
|
|
157973
|
+
get planarClipMaskPriority() { return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.PlanarClipMaskPriority.BackgroundMap; }
|
|
157994
157974
|
_createGeometryTreeReference() {
|
|
157995
157975
|
if (!this._settings.applyTerrain || this._isDrape)
|
|
157996
157976
|
return undefined; // Don't bother generating non-terrain (flat) geometry.
|
|
@@ -186546,7 +186526,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
186546
186526
|
* @param center arc center
|
|
186547
186527
|
* @param vector0 vector to 0 degrees (commonly major axis)
|
|
186548
186528
|
* @param vector90 vector to 90 degree point (commonly minor axis)
|
|
186549
|
-
* @param sweep sweep limits
|
|
186529
|
+
* @param sweep sweep limits (default full sweep)
|
|
186550
186530
|
* @param result optional preallocated result
|
|
186551
186531
|
*/
|
|
186552
186532
|
static create(center, vector0, vector90, sweep, result) {
|
|
@@ -186555,12 +186535,12 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
186555
186535
|
return Arc3d.createRefs(center !== undefined ? center.clone() : _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(0, 0, 0), matrix, sweep ? sweep.clone() : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.create360(), result);
|
|
186556
186536
|
}
|
|
186557
186537
|
/**
|
|
186558
|
-
* Create an arc from three points on the ellipse: two points on an axis and one in between.
|
|
186538
|
+
* Create an elliptical arc from three points on the ellipse: two points on an axis and one in between.
|
|
186559
186539
|
* @param point0 start of arc, on an axis
|
|
186560
186540
|
* @param point1 point on arc somewhere between `point0` and `point2`
|
|
186561
186541
|
* @param point2 point on arc directly opposite `point0`
|
|
186562
186542
|
* @param sweep angular sweep, measured from `point0` in the direction of `point1`.
|
|
186563
|
-
* For a
|
|
186543
|
+
* For a half-ellipse from `point0` to `point2` passing through `point1`, pass `AngleSweep.createStartEndDegrees(0,180)`.
|
|
186564
186544
|
* Default value is full sweep to create the entire ellipse.
|
|
186565
186545
|
* @param result optional preallocated result
|
|
186566
186546
|
* @returns elliptical arc, or undefined if construction impossible.
|
|
@@ -186584,9 +186564,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
186584
186564
|
return Arc3d.create(center, vector0, vector90, sweep, result);
|
|
186585
186565
|
}
|
|
186586
186566
|
/**
|
|
186587
|
-
|
|
186588
|
-
|
|
186589
|
-
|
|
186567
|
+
* Create a circular arc defined by start point, tangent at start point, and end point.
|
|
186568
|
+
* If tangent is parallel to line segment from start to end, return the line segment.
|
|
186569
|
+
*/
|
|
186590
186570
|
static createCircularStartTangentEnd(start, tangentAtStart, end, result) {
|
|
186591
186571
|
// To find the circle passing through start and end with tangentAtStart at start:
|
|
186592
186572
|
// - find line 1: the perpendicular bisector of the line from start to end.
|
|
@@ -186612,6 +186592,39 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
186612
186592
|
}
|
|
186613
186593
|
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d.create(start, end);
|
|
186614
186594
|
}
|
|
186595
|
+
/**
|
|
186596
|
+
* Create a circular arc defined by start and end points and radius.
|
|
186597
|
+
* @param start start point of the arc
|
|
186598
|
+
* @param end end point of the arc
|
|
186599
|
+
* @param helper a third point near the arc in its plane, or a vector in the direction of the arc normal
|
|
186600
|
+
* @returns the constructed arc, or undefined if desired arc cannot be constructed
|
|
186601
|
+
*/
|
|
186602
|
+
static createCircularStartEndRadius(start, end, radius, helper) {
|
|
186603
|
+
// Construct a line segment from start to end. It is a chord of the circle,
|
|
186604
|
+
// so the circle center is on its perpendicular bisector.
|
|
186605
|
+
const semiChordLen2 = 0.25 * start.distanceSquared(end);
|
|
186606
|
+
const radius2 = radius * radius;
|
|
186607
|
+
if (radius2 < semiChordLen2)
|
|
186608
|
+
return undefined;
|
|
186609
|
+
const height = Math.sqrt(radius2 - semiChordLen2); // Pythagoras gives us distance from chord to center
|
|
186610
|
+
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createZero(this._workVectorU);
|
|
186611
|
+
const vecToCenter = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createZero(this._workVectorV);
|
|
186612
|
+
// the helper gives us the circle normal
|
|
186613
|
+
if (helper instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d)
|
|
186614
|
+
start.crossProductToPoints(helper, end, normal);
|
|
186615
|
+
else
|
|
186616
|
+
normal.setFrom(helper);
|
|
186617
|
+
// the normal and chord direction give us the side of the chord on which the center resides
|
|
186618
|
+
if (!normal.normalizeInPlace() || !normal.crossProductStartEnd(start, end, vecToCenter).scaleToLength(height, vecToCenter))
|
|
186619
|
+
return undefined;
|
|
186620
|
+
const center = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.createZero();
|
|
186621
|
+
start.interpolate(0.5, end, center).addInPlace(vecToCenter);
|
|
186622
|
+
const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createStartEnd(center, start, this._workVectorW);
|
|
186623
|
+
const endVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createStartEnd(center, end, this._workVectorV); // reuse static
|
|
186624
|
+
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.create(vector0.signedAngleTo(endVector, normal));
|
|
186625
|
+
const vector90 = normal.crossProduct(vector0, this._workVectorV); // has length radius (reuse static)
|
|
186626
|
+
return Arc3d.createRefs(center, _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createColumns(vector0, vector90, normal), sweep);
|
|
186627
|
+
}
|
|
186615
186628
|
/**
|
|
186616
186629
|
* Return a clone of this arc, projected to given z value.
|
|
186617
186630
|
* * If `z` is omitted, the clone is at the z of the center.
|
|
@@ -187087,7 +187100,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187087
187100
|
result.set(plane.altitude(this._center), plane.velocityXYZ(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[6]), plane.velocityXYZ(this._matrix.coffs[1], this._matrix.coffs[4], this._matrix.coffs[7]));
|
|
187088
187101
|
return result;
|
|
187089
187102
|
}
|
|
187090
|
-
/** Create a new arc which is a unit circle centered at the origin. */
|
|
187103
|
+
/** Create a new arc which is a unit circle in the xy-plane centered at the origin. */
|
|
187091
187104
|
static createUnitCircle() {
|
|
187092
187105
|
return Arc3d.createRefs(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(0, 0, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createIdentity(), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.create360());
|
|
187093
187106
|
}
|
|
@@ -187098,7 +187111,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187098
187111
|
* @param sweep sweep limits. defaults to full circle.
|
|
187099
187112
|
*/
|
|
187100
187113
|
static createXY(center, radius, sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.create360()) {
|
|
187101
|
-
return new Arc3d(center.clone(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createScale(radius, radius, 1.0), sweep);
|
|
187114
|
+
return new Arc3d(center.clone(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createScale(radius, radius, 1.0), sweep.clone());
|
|
187102
187115
|
}
|
|
187103
187116
|
/**
|
|
187104
187117
|
* Create a new arc which is parallel to the xy plane, with given center and x,y radii, and optional angle sweep
|
|
@@ -187108,7 +187121,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187108
187121
|
* @param sweep angle sweep
|
|
187109
187122
|
*/
|
|
187110
187123
|
static createXYEllipse(center, radiusA, radiusB, sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__.AngleSweep.create360()) {
|
|
187111
|
-
return new Arc3d(center.clone(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createScale(radiusA, radiusB, 1.0), sweep);
|
|
187124
|
+
return new Arc3d(center.clone(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createScale(radiusA, radiusB, 1.0), sweep.clone());
|
|
187112
187125
|
}
|
|
187113
187126
|
/**
|
|
187114
187127
|
* Replace the arc's 0 and 90 degree vectors.
|
|
@@ -187125,7 +187138,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187125
187138
|
const vector90A = this._matrix.multiplyXY(-angleData.s, angleData.c);
|
|
187126
187139
|
const axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createRigidFromColumns(vector0A, vector90A, _Geometry__WEBPACK_IMPORTED_MODULE_5__.AxisOrder.XYZ);
|
|
187127
187140
|
return {
|
|
187128
|
-
center: this._center,
|
|
187141
|
+
center: this._center.clone(),
|
|
187129
187142
|
axes: (axes ? axes : _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createIdentity()),
|
|
187130
187143
|
r0: vector0A.magnitude(),
|
|
187131
187144
|
r90: vector90A.magnitude(),
|
|
@@ -187135,10 +187148,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187135
187148
|
/** Return the arc definition with center, two vectors, and angle sweep; */
|
|
187136
187149
|
toVectors() {
|
|
187137
187150
|
return {
|
|
187138
|
-
center: this.center,
|
|
187151
|
+
center: this.center.clone(),
|
|
187139
187152
|
vector0: this._matrix.columnX(),
|
|
187140
187153
|
vector90: this._matrix.columnY(),
|
|
187141
|
-
sweep: this.sweep,
|
|
187154
|
+
sweep: this.sweep.clone(),
|
|
187142
187155
|
};
|
|
187143
187156
|
}
|
|
187144
187157
|
/** Return the arc definition with center, two vectors, and angle sweep, optionally transformed. */
|
|
@@ -187147,13 +187160,13 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187147
187160
|
center: transform.multiplyPoint3d(this._center),
|
|
187148
187161
|
vector0: transform.multiplyVector(this._matrix.columnX()),
|
|
187149
187162
|
vector90: transform.multiplyVector(this._matrix.columnY()),
|
|
187150
|
-
sweep: this.sweep,
|
|
187163
|
+
sweep: this.sweep.clone(),
|
|
187151
187164
|
}
|
|
187152
187165
|
: {
|
|
187153
187166
|
center: this._center.clone(),
|
|
187154
187167
|
vector0: this._matrix.columnX(),
|
|
187155
187168
|
vector90: this._matrix.columnY(),
|
|
187156
|
-
sweep: this.sweep,
|
|
187169
|
+
sweep: this.sweep.clone(),
|
|
187157
187170
|
};
|
|
187158
187171
|
}
|
|
187159
187172
|
/** Return the arc definition with center, two vectors, and angle sweep, transformed to 4d points. */
|
|
@@ -187162,7 +187175,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
187162
187175
|
center: matrix.multiplyPoint3d(this._center, 1.0),
|
|
187163
187176
|
vector0: matrix.multiplyPoint3d(this._matrix.columnX(), 0.0),
|
|
187164
187177
|
vector90: matrix.multiplyPoint3d(this._matrix.columnY(), 0.0),
|
|
187165
|
-
sweep: this.sweep,
|
|
187178
|
+
sweep: this.sweep.clone(),
|
|
187166
187179
|
};
|
|
187167
187180
|
}
|
|
187168
187181
|
/**
|
|
@@ -187422,6 +187435,7 @@ Arc3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Poi
|
|
|
187422
187435
|
Arc3d._workPointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create();
|
|
187423
187436
|
Arc3d._workVectorU = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.create();
|
|
187424
187437
|
Arc3d._workVectorV = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.create();
|
|
187438
|
+
Arc3d._workVectorW = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.create();
|
|
187425
187439
|
// !! misspelled Gauss in the published static !! Declare it ok.
|
|
187426
187440
|
// cspell::word Guass
|
|
187427
187441
|
/** Gauss point quadrature count for evaluating curve length. (The number of intervals is adjusted to the arc sweep) */
|
|
@@ -219225,9 +219239,10 @@ class Vector3d extends XYZ {
|
|
|
219225
219239
|
return result;
|
|
219226
219240
|
}
|
|
219227
219241
|
/**
|
|
219228
|
-
* Return a
|
|
219242
|
+
* Return a vector in the direction of `this` but with specified length.
|
|
219229
219243
|
* @param length desired length of vector
|
|
219230
|
-
* @param result optional preallocated result
|
|
219244
|
+
* @param result optional preallocated result to populate and return
|
|
219245
|
+
* @returns scaled instance vector, or undefined if the instance magnitude is too small
|
|
219231
219246
|
*/
|
|
219232
219247
|
scaleToLength(length, result) {
|
|
219233
219248
|
const mag = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.correctSmallFraction(this.magnitude());
|
|
@@ -286827,7 +286842,8 @@ class ParserSpec {
|
|
|
286827
286842
|
"use strict";
|
|
286828
286843
|
__webpack_require__.r(__webpack_exports__);
|
|
286829
286844
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
286830
|
-
/* harmony export */ "Quantity": () => (/* binding */ Quantity)
|
|
286845
|
+
/* harmony export */ "Quantity": () => (/* binding */ Quantity),
|
|
286846
|
+
/* harmony export */ "almostEqual": () => (/* binding */ almostEqual)
|
|
286831
286847
|
/* harmony export */ });
|
|
286832
286848
|
/*---------------------------------------------------------------------------------------------
|
|
286833
286849
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -286836,6 +286852,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
286836
286852
|
/** @packageDocumentation
|
|
286837
286853
|
* @module Quantity
|
|
286838
286854
|
*/
|
|
286855
|
+
/**
|
|
286856
|
+
* Checks if two numbers are approximately equal within given relative tolerance.
|
|
286857
|
+
* @param a - The first number to compare.
|
|
286858
|
+
* @param b - The second number to compare.
|
|
286859
|
+
* @param tolerance - Tolerance, scales based on the input number values (multiplied by 1, abs(a) or abs(b), whichever is biggest).
|
|
286860
|
+
* @returns True if the numbers are approximately equal, false otherwise.
|
|
286861
|
+
* @internal
|
|
286862
|
+
*/
|
|
286863
|
+
function almostEqual(a, b, tolerance = 2.2204460492503131e-16) {
|
|
286864
|
+
const absDiff = Math.abs(a - b);
|
|
286865
|
+
const scaledTolerance = Math.max(1, Math.abs(a), Math.abs(b)) * tolerance;
|
|
286866
|
+
return absDiff <= scaledTolerance;
|
|
286867
|
+
}
|
|
286839
286868
|
/** The Quantity class is convenient container to specify both the magnitude and unit of a quantity. This class is commonly
|
|
286840
286869
|
* returned as the result of parsing a string that represents a quantity.
|
|
286841
286870
|
* @beta
|
|
@@ -286958,6 +286987,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
286958
286987
|
/* harmony export */ "QuantityStatus": () => (/* reexport safe */ _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus),
|
|
286959
286988
|
/* harmony export */ "ScientificType": () => (/* reexport safe */ _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_9__.ScientificType),
|
|
286960
286989
|
/* harmony export */ "ShowSignOption": () => (/* reexport safe */ _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_9__.ShowSignOption),
|
|
286990
|
+
/* harmony export */ "almostEqual": () => (/* reexport safe */ _Quantity__WEBPACK_IMPORTED_MODULE_5__.almostEqual),
|
|
286961
286991
|
/* harmony export */ "formatStringRgx": () => (/* reexport safe */ _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_9__.formatStringRgx),
|
|
286962
286992
|
/* harmony export */ "formatTraitsToArray": () => (/* reexport safe */ _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_9__.formatTraitsToArray),
|
|
286963
286993
|
/* harmony export */ "formatTypeToString": () => (/* reexport safe */ _Formatter_FormatEnums__WEBPACK_IMPORTED_MODULE_9__.formatTypeToString),
|
|
@@ -301955,7 +301985,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
301955
301985
|
/***/ ((module) => {
|
|
301956
301986
|
|
|
301957
301987
|
"use strict";
|
|
301958
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.
|
|
301988
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.24","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 ES2020 --outDir lib/esm","clean":"rimraf 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 --includes=../../generated-docs/extract --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 -f visualstudio \\"./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 -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","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:^4.9.0-dev.24","@itwin/core-bentley":"workspace:^4.9.0-dev.24","@itwin/core-common":"workspace:^4.9.0-dev.24","@itwin/core-geometry":"workspace:^4.9.0-dev.24","@itwin/core-orbitgt":"workspace:^4.9.0-dev.24","@itwin/core-quantity":"workspace:^4.9.0-dev.24"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.2","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
301959
301989
|
|
|
301960
301990
|
/***/ })
|
|
301961
301991
|
|