@itwin/ecschema-rpcinterface-tests 4.7.0-dev.13 → 4.7.0-dev.15
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 +105 -29
- 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|D:\\vsts_a\\
|
|
1
|
+
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\20\\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":""}
|
|
@@ -167209,9 +167209,15 @@ class ToolAdmin {
|
|
|
167209
167209
|
this.onActiveToolChanged(newTool, StartOrResume.Start);
|
|
167210
167210
|
}
|
|
167211
167211
|
/** @internal */
|
|
167212
|
+
setEditCommandHandler(handler) {
|
|
167213
|
+
this._editCommandHandler = handler;
|
|
167214
|
+
}
|
|
167215
|
+
/** @internal */
|
|
167212
167216
|
async setPrimitiveTool(newTool) {
|
|
167213
167217
|
if (undefined !== this._primitiveTool) {
|
|
167214
167218
|
await this._primitiveTool.onCleanup();
|
|
167219
|
+
if (undefined !== this._editCommandHandler)
|
|
167220
|
+
await this._editCommandHandler.finishCommand();
|
|
167215
167221
|
this._primitiveTool = undefined;
|
|
167216
167222
|
}
|
|
167217
167223
|
this._primitiveTool = newTool;
|
|
@@ -233779,6 +233785,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233779
233785
|
/* harmony export */ "IndexedPolyfaceVisitor": () => (/* binding */ IndexedPolyfaceVisitor)
|
|
233780
233786
|
/* harmony export */ });
|
|
233781
233787
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
233788
|
+
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
233789
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
233790
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
233791
|
+
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
233782
233792
|
/* harmony import */ var _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PolyfaceData */ "../../core/geometry/lib/esm/polyface/PolyfaceData.js");
|
|
233783
233793
|
/*---------------------------------------------------------------------------------------------
|
|
233784
233794
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -233789,6 +233799,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233789
233799
|
*/
|
|
233790
233800
|
|
|
233791
233801
|
|
|
233802
|
+
|
|
233803
|
+
|
|
233804
|
+
|
|
233805
|
+
|
|
233792
233806
|
/* eslint-disable @itwin/prefer-get */
|
|
233793
233807
|
/**
|
|
233794
233808
|
* An `IndexedPolyfaceVisitor` is an iterator-like object that "visits" facets of a mesh.
|
|
@@ -233812,6 +233826,10 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
233812
233826
|
clientPolyface() {
|
|
233813
233827
|
return this._polyface;
|
|
233814
233828
|
}
|
|
233829
|
+
/** Return the number of facets this visitor is able to visit. */
|
|
233830
|
+
getVisitableFacetCount() {
|
|
233831
|
+
return this._polyface.facetCount;
|
|
233832
|
+
}
|
|
233815
233833
|
/**
|
|
233816
233834
|
* Set the number of vertices replicated in visitor arrays (both data and index arrays).
|
|
233817
233835
|
* * 0,1,2 are the most common as numWrap.
|
|
@@ -233956,53 +233974,99 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
233956
233974
|
/**
|
|
233957
233975
|
* An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.
|
|
233958
233976
|
* * The subset is defined by an array of facet indices provided when this visitor is created.
|
|
233959
|
-
* *
|
|
233960
|
-
* * `moveToNextFacet` moves only within the subset.
|
|
233961
|
-
* * `moveToReadIndex(i)` moves underlying visitor's `parentFacetIndex(i)`.
|
|
233977
|
+
* * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.
|
|
233962
233978
|
* @public
|
|
233963
233979
|
*/
|
|
233964
233980
|
class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
|
|
233965
233981
|
constructor(polyface, activeFacetIndices, numWrap) {
|
|
233966
233982
|
super(polyface, numWrap);
|
|
233967
233983
|
this._parentFacetIndices = activeFacetIndices.slice();
|
|
233984
|
+
this._currentActiveIndex = -1;
|
|
233968
233985
|
this._nextActiveIndex = 0;
|
|
233969
233986
|
}
|
|
233987
|
+
isValidSubsetIndex(index) {
|
|
233988
|
+
return (undefined !== this._parentFacetIndices) && index >= 0 && index < this._parentFacetIndices.length;
|
|
233989
|
+
}
|
|
233970
233990
|
/**
|
|
233971
233991
|
* Create a visitor for iterating a subset of the facets of `polyface`.
|
|
233972
|
-
*
|
|
233992
|
+
* @param polyface reference to the client polyface, supplying facets
|
|
233993
|
+
* @param activeFacetIndices array of indices of facets in the client polyface to visit. This array is cloned.
|
|
233994
|
+
* @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.
|
|
233973
233995
|
*/
|
|
233974
|
-
static createSubsetVisitor(polyface, activeFacetIndices, numWrap) {
|
|
233996
|
+
static createSubsetVisitor(polyface, activeFacetIndices, numWrap = 0) {
|
|
233975
233997
|
return new IndexedPolyfaceSubsetVisitor(polyface, activeFacetIndices, numWrap);
|
|
233976
233998
|
}
|
|
233977
|
-
/**
|
|
233999
|
+
/**
|
|
234000
|
+
* Advance the iterator to a particular facet in the subset of client polyface facets.
|
|
234001
|
+
* @param activeIndex the index of the facet within the subset, not to be confused with the index of the facet within the client polyface.
|
|
234002
|
+
* @return whether the iterator was successfully moved.
|
|
234003
|
+
*/
|
|
233978
234004
|
moveToReadIndex(activeIndex) {
|
|
233979
|
-
if (
|
|
233980
|
-
this.
|
|
233981
|
-
|
|
234005
|
+
if (this.isValidSubsetIndex(activeIndex)) {
|
|
234006
|
+
this._currentActiveIndex = activeIndex;
|
|
234007
|
+
this._nextActiveIndex = activeIndex + 1;
|
|
234008
|
+
return super.moveToReadIndex(this._parentFacetIndices[activeIndex]);
|
|
233982
234009
|
}
|
|
233983
234010
|
return false;
|
|
233984
234011
|
}
|
|
233985
|
-
/**
|
|
234012
|
+
/**
|
|
234013
|
+
* Advance the iterator to the next facet in the subset of client polyface facets.
|
|
234014
|
+
* @return whether the iterator was successfully moved.
|
|
234015
|
+
*/
|
|
233986
234016
|
moveToNextFacet() {
|
|
233987
|
-
if (this._nextActiveIndex
|
|
233988
|
-
|
|
233989
|
-
|
|
233990
|
-
|
|
233991
|
-
return true;
|
|
233992
|
-
}
|
|
233993
|
-
}
|
|
233994
|
-
return false;
|
|
234017
|
+
if (this._nextActiveIndex !== this._currentActiveIndex)
|
|
234018
|
+
return this.moveToReadIndex(this._nextActiveIndex);
|
|
234019
|
+
this._nextActiveIndex++;
|
|
234020
|
+
return true;
|
|
233995
234021
|
}
|
|
233996
|
-
/** Reset the iterator to start at the first active facet in the polyface. */
|
|
234022
|
+
/** Reset the iterator to start at the first active facet in the subset of client polyface facets. */
|
|
233997
234023
|
reset() {
|
|
233998
|
-
this.
|
|
234024
|
+
this.moveToReadIndex(0);
|
|
234025
|
+
this._nextActiveIndex = 0; // so immediate moveToNextFacet stays here.
|
|
233999
234026
|
}
|
|
234000
|
-
/**
|
|
234027
|
+
/**
|
|
234028
|
+
* Return the parent facet index of the indicated index within the subset of client polyface facets.
|
|
234029
|
+
* @param activeIndex index of the facet within the subset. Default is the active facet.
|
|
234030
|
+
* @return valid client polyface facet index, or `undefined` if invalid input index.
|
|
234031
|
+
*/
|
|
234001
234032
|
parentFacetIndex(activeIndex) {
|
|
234002
|
-
if (
|
|
234003
|
-
|
|
234033
|
+
if (undefined === activeIndex)
|
|
234034
|
+
activeIndex = this._currentActiveIndex;
|
|
234035
|
+
return this.isValidSubsetIndex(activeIndex) ? this._parentFacetIndices[activeIndex] : undefined;
|
|
234036
|
+
}
|
|
234037
|
+
/** Return the number of facets this visitor is able to visit. */
|
|
234038
|
+
getVisitableFacetCount() {
|
|
234039
|
+
return this._parentFacetIndices ? this._parentFacetIndices.length : 0;
|
|
234040
|
+
}
|
|
234041
|
+
/**
|
|
234042
|
+
* Create a visitor for those mesh facets with normal in the same half-space as the given vector.
|
|
234043
|
+
* * For example, to visit the top facets of a tiled terrain mesh but skip the "skirt" facets, pass
|
|
234044
|
+
* `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also
|
|
234045
|
+
* filter out *interior* facets that are nearly vertical, not just the "skirt" facets on the boundary.
|
|
234046
|
+
* @param mesh the mesh from which to select facets
|
|
234047
|
+
* @param compareVector vector to which to compare facet normals. The visitor will visit only those facets
|
|
234048
|
+
* with normals in the same half-space as this vector. Default is 001.
|
|
234049
|
+
* @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.
|
|
234050
|
+
* The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.
|
|
234051
|
+
* Default is [[Geometry.smallAngleRadians]].
|
|
234052
|
+
* @param numWrap optional number of entries replicated in visitor arrays. Default is 0.
|
|
234053
|
+
*/
|
|
234054
|
+
static createNormalComparison(mesh, compareVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.unitZ(), sideAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createSmallAngle(), numWrap = 0) {
|
|
234055
|
+
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.IndexedPolyface)
|
|
234056
|
+
return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);
|
|
234057
|
+
const visitor = mesh;
|
|
234058
|
+
const facets = [];
|
|
234059
|
+
const facetNormal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createZero();
|
|
234060
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
234061
|
+
if (!_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.unitNormal(visitor.point, facetNormal))
|
|
234062
|
+
continue; // degenerate facet
|
|
234063
|
+
if (facetNormal.dotProduct(compareVector) < 0.0)
|
|
234064
|
+
continue; // ignore facet facing other half-space
|
|
234065
|
+
if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))
|
|
234066
|
+
continue; // ignore side facet
|
|
234067
|
+
facets.push(visitor.currentReadIndex());
|
|
234004
234068
|
}
|
|
234005
|
-
return
|
|
234069
|
+
return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);
|
|
234006
234070
|
}
|
|
234007
234071
|
}
|
|
234008
234072
|
|
|
@@ -238986,13 +239050,17 @@ class PolyfaceQuery {
|
|
|
238986
239050
|
}
|
|
238987
239051
|
return builder.claimPolyface(true);
|
|
238988
239052
|
}
|
|
238989
|
-
/**
|
|
239053
|
+
/**
|
|
239054
|
+
* Return the point count of the `source`.
|
|
239055
|
+
* * If `source` is a visitor, this is an upper bound on the number of addressed mesh vertices.
|
|
239056
|
+
*/
|
|
238990
239057
|
static visitorClientPointCount(source) {
|
|
238991
239058
|
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
|
|
238992
239059
|
return source.data.point.length;
|
|
238993
239060
|
const polyface = source.clientPolyface();
|
|
238994
239061
|
if (polyface !== undefined)
|
|
238995
239062
|
return polyface.data.point.length;
|
|
239063
|
+
const saveReadIndex = source.currentReadIndex();
|
|
238996
239064
|
source.reset();
|
|
238997
239065
|
let maxIndex = -1;
|
|
238998
239066
|
while (source.moveToNextFacet()) {
|
|
@@ -239000,22 +239068,30 @@ class PolyfaceQuery {
|
|
|
239000
239068
|
if (pointIndex > maxIndex)
|
|
239001
239069
|
maxIndex = pointIndex;
|
|
239002
239070
|
}
|
|
239071
|
+
source.moveToReadIndex(saveReadIndex);
|
|
239003
239072
|
return maxIndex + 1;
|
|
239004
239073
|
}
|
|
239005
|
-
/**
|
|
239074
|
+
/**
|
|
239075
|
+
* Return the facet count of the `source`.
|
|
239076
|
+
* * If `source` is a visitor, this is the number of facets it can visit.
|
|
239077
|
+
*/
|
|
239006
239078
|
static visitorClientFacetCount(source) {
|
|
239007
239079
|
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
|
|
239008
239080
|
if (source.facetCount !== undefined)
|
|
239009
239081
|
return source.facetCount;
|
|
239010
239082
|
source = source.createVisitor(0);
|
|
239011
239083
|
}
|
|
239084
|
+
if (source.getVisitableFacetCount)
|
|
239085
|
+
return source.getVisitableFacetCount();
|
|
239012
239086
|
const polyface = source.clientPolyface();
|
|
239013
239087
|
if (polyface !== undefined && polyface.facetCount !== undefined)
|
|
239014
239088
|
return polyface.facetCount;
|
|
239089
|
+
const saveReadIndex = source.currentReadIndex();
|
|
239015
239090
|
let facetCount = 0;
|
|
239016
239091
|
source.reset();
|
|
239017
239092
|
while (source.moveToNextFacet())
|
|
239018
239093
|
++facetCount;
|
|
239094
|
+
source.moveToReadIndex(saveReadIndex);
|
|
239019
239095
|
return facetCount;
|
|
239020
239096
|
}
|
|
239021
239097
|
/**
|
|
@@ -239383,10 +239459,10 @@ class PolyfaceQuery {
|
|
|
239383
239459
|
return result;
|
|
239384
239460
|
}
|
|
239385
239461
|
/**
|
|
239386
|
-
* Return a new facet set
|
|
239462
|
+
* Return a new facet set from the source facets, specifying how to copy duplicate facets.
|
|
239387
239463
|
* @param source the polyface.
|
|
239388
239464
|
* @param includeSingletons true to copy facets that only appear once
|
|
239389
|
-
* @param clusterSelector indicates whether
|
|
239465
|
+
* @param clusterSelector indicates whether to copy 0, 1, or all facets in each cluster of duplicate facets.
|
|
239390
239466
|
*/
|
|
239391
239467
|
static cloneByFacetDuplication(source, includeSingletons, clusterSelector) {
|
|
239392
239468
|
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
@@ -297363,7 +297439,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
297363
297439
|
/***/ ((module) => {
|
|
297364
297440
|
|
|
297365
297441
|
"use strict";
|
|
297366
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.7.0-dev.
|
|
297442
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.7.0-dev.15","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.7.0-dev.15","@itwin/core-bentley":"workspace:^4.7.0-dev.15","@itwin/core-common":"workspace:^4.7.0-dev.15","@itwin/core-geometry":"workspace:^4.7.0-dev.15","@itwin/core-orbitgt":"workspace:^4.7.0-dev.15","@itwin/core-quantity":"workspace:^4.7.0-dev.15"},"//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.1","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.1.0","@itwin/object-storage-core":"^2.2.2","@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"}}');
|
|
297367
297443
|
|
|
297368
297444
|
/***/ })
|
|
297369
297445
|
|