@itwin/ecschema-rpcinterface-tests 4.4.0-dev.25 → 4.4.0-dev.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +103 -4
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -191146,7 +191146,7 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
191146
191146
|
dgnBoundaryType() {
|
|
191147
191147
|
/**
|
|
191148
191148
|
* All "Loop" become "outer". TypeScript Loop object is equivalent to a native CurveVector with
|
|
191149
|
-
* boundaryType = BOUNDARY_TYPE_Outer.
|
|
191149
|
+
* boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that
|
|
191150
191150
|
* carries "hole" semantics.
|
|
191151
191151
|
*/
|
|
191152
191152
|
return 2;
|
|
@@ -258513,7 +258513,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
258513
258513
|
|
|
258514
258514
|
|
|
258515
258515
|
|
|
258516
|
-
/**
|
|
258516
|
+
/**
|
|
258517
|
+
* Class to test match of half edge mask.
|
|
258518
|
+
* @internal
|
|
258519
|
+
*/
|
|
258517
258520
|
class HalfEdgeMaskTester {
|
|
258518
258521
|
/**
|
|
258519
258522
|
* Constructor
|
|
@@ -258529,7 +258532,10 @@ class HalfEdgeMaskTester {
|
|
|
258529
258532
|
return edge.isMaskSet(this._targetMask) === this._targetValue;
|
|
258530
258533
|
}
|
|
258531
258534
|
}
|
|
258532
|
-
/**
|
|
258535
|
+
/**
|
|
258536
|
+
* Class for different types of searches for HalfEdgeGraph.
|
|
258537
|
+
* @internal
|
|
258538
|
+
*/
|
|
258533
258539
|
class HalfEdgeGraphSearch {
|
|
258534
258540
|
/**
|
|
258535
258541
|
* Static method for face area computation -- useful as function parameter in `collectFaceAreaSummary`.
|
|
@@ -258721,6 +258727,99 @@ class HalfEdgeGraphSearch {
|
|
|
258721
258727
|
HalfEdgeGraphSearch.correctParityInComponentArrays(parityMask, components);
|
|
258722
258728
|
return components;
|
|
258723
258729
|
}
|
|
258730
|
+
/**
|
|
258731
|
+
* Breadth First Search through connected component of a graph.
|
|
258732
|
+
* @param component vector of nodes, one per face.
|
|
258733
|
+
* @param seed seed node in component.
|
|
258734
|
+
* @param visitMask mask to apply to visited nodes. Assumed cleared throughout component.
|
|
258735
|
+
* @param ignoreMask (optional) mask preset on faces to ignore. Default value is `HalfEdgeMask.EXTERIOR` to
|
|
258736
|
+
* ignore exterior faces. Pass `HalfEdgeMask.NULL_MASK` to process all faces.
|
|
258737
|
+
* @param maxFaceCount (optional) maximum number of faces in the component. Should be positive; otherwise
|
|
258738
|
+
* `Infinity` is used.
|
|
258739
|
+
* @returns node at which to start next component if maximum face count exceeded, or undefined.
|
|
258740
|
+
*/
|
|
258741
|
+
static exploreComponent(component, seed, visitMask, ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.EXTERIOR, maxFaceCount = Infinity) {
|
|
258742
|
+
if (maxFaceCount <= 0)
|
|
258743
|
+
maxFaceCount = Infinity;
|
|
258744
|
+
const boundaryMask = visitMask | ignoreMask;
|
|
258745
|
+
let numFaces = 0;
|
|
258746
|
+
const candidates = []; // the queue
|
|
258747
|
+
candidates.push(seed);
|
|
258748
|
+
while (candidates.length !== 0 && numFaces < maxFaceCount) {
|
|
258749
|
+
// shift is O(n) and may be inefficient for large queues; if needed, we can replace
|
|
258750
|
+
// queue by circular array or implement the queue using 2 stacks; both are O(1)
|
|
258751
|
+
const node = candidates.shift();
|
|
258752
|
+
if (node.isMaskSet(boundaryMask))
|
|
258753
|
+
continue;
|
|
258754
|
+
component.push(node);
|
|
258755
|
+
++numFaces;
|
|
258756
|
+
const enqueueNeighboringFaces = (heNode) => {
|
|
258757
|
+
heNode.setMask(visitMask);
|
|
258758
|
+
const neighbor = heNode.vertexSuccessor;
|
|
258759
|
+
if (!neighbor.isMaskSet(boundaryMask))
|
|
258760
|
+
candidates.push(neighbor);
|
|
258761
|
+
};
|
|
258762
|
+
node.collectAroundFace(enqueueNeighboringFaces);
|
|
258763
|
+
}
|
|
258764
|
+
if (candidates.length === 0)
|
|
258765
|
+
return undefined;
|
|
258766
|
+
else {
|
|
258767
|
+
const front = candidates[0];
|
|
258768
|
+
while (candidates.length !== 0) {
|
|
258769
|
+
// try to find a node at the boundary of both the geometry and previous component
|
|
258770
|
+
const node = candidates.shift(); // shift may be inefficient for large queues
|
|
258771
|
+
if (node.vertexSuccessor.isMaskSet(ignoreMask))
|
|
258772
|
+
return node;
|
|
258773
|
+
if (node.edgeMate.isMaskSet(ignoreMask))
|
|
258774
|
+
return node;
|
|
258775
|
+
}
|
|
258776
|
+
return front;
|
|
258777
|
+
}
|
|
258778
|
+
}
|
|
258779
|
+
/**
|
|
258780
|
+
* Collect connected components of the graph (via Breadth First Search).
|
|
258781
|
+
* @param graph graph to inspect.
|
|
258782
|
+
* @param maxFaceCount (optional) maximum number of faces in each component. Should be positive; otherwise
|
|
258783
|
+
* `Infinity` is used.
|
|
258784
|
+
* @param ignoreMask (optional) mask preset on faces to ignore. Default value is `HalfEdgeMask.EXTERIOR` to ignore
|
|
258785
|
+
* exterior faces. Pass `HalfEdgeMask.NULL_MASK` to process all faces.
|
|
258786
|
+
* @returns the components of the graph, each component represented by an array of nodes, one node per face
|
|
258787
|
+
* of the component. In other words, entry [i][j] is a HalfEdge in the j_th face loop of the i_th component.
|
|
258788
|
+
*/
|
|
258789
|
+
static collectConnectedComponents(graph, maxFaceCount = Infinity, ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.EXTERIOR) {
|
|
258790
|
+
const components = [];
|
|
258791
|
+
if (graph.countMask(ignoreMask) === 0)
|
|
258792
|
+
ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.NULL_MASK;
|
|
258793
|
+
const visitMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.VISITED;
|
|
258794
|
+
const boundaryMask = visitMask | ignoreMask;
|
|
258795
|
+
// Starting with the input node, look ahead for a boundary face. Failing that, return the input node.
|
|
258796
|
+
// Starting all floods at the boundary reduces the chance of ending up with a ring-shaped component at the boundary.
|
|
258797
|
+
const findNextFloodSeed = (index) => {
|
|
258798
|
+
for (let i = index; i < graph.countNodes(); ++i) {
|
|
258799
|
+
if (!graph.allHalfEdges[i].isMaskSet(boundaryMask)
|
|
258800
|
+
&& graph.allHalfEdges[i].edgeMate.isMaskSet(boundaryMask)) {
|
|
258801
|
+
index = i;
|
|
258802
|
+
break;
|
|
258803
|
+
}
|
|
258804
|
+
}
|
|
258805
|
+
return index;
|
|
258806
|
+
};
|
|
258807
|
+
for (let i = 0; i < graph.countNodes(); ++i) {
|
|
258808
|
+
if (graph.allHalfEdges[i].isMaskSet(boundaryMask))
|
|
258809
|
+
continue;
|
|
258810
|
+
const i0 = findNextFloodSeed(i);
|
|
258811
|
+
let seed = graph.allHalfEdges[i0];
|
|
258812
|
+
do { // flood this component
|
|
258813
|
+
const component = [];
|
|
258814
|
+
seed = HalfEdgeGraphSearch.exploreComponent(component, seed, visitMask, ignoreMask, maxFaceCount);
|
|
258815
|
+
if (component.length !== 0)
|
|
258816
|
+
components.push(component);
|
|
258817
|
+
} while (seed !== undefined);
|
|
258818
|
+
if (!graph.allHalfEdges[i].isMaskSet(visitMask))
|
|
258819
|
+
--i; // reprocess this node
|
|
258820
|
+
}
|
|
258821
|
+
return components;
|
|
258822
|
+
}
|
|
258724
258823
|
/**
|
|
258725
258824
|
* Test if test point (xTest,yTest) is inside/outside a face or on an edge.
|
|
258726
258825
|
* @param seedNode any node on the face loop.
|
|
@@ -292354,7 +292453,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
292354
292453
|
/***/ ((module) => {
|
|
292355
292454
|
|
|
292356
292455
|
"use strict";
|
|
292357
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.
|
|
292456
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.26","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 -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.4.0-dev.26","@itwin/core-bentley":"workspace:^4.4.0-dev.26","@itwin/core-common":"workspace:^4.4.0-dev.26","@itwin/core-geometry":"workspace:^4.4.0-dev.26","@itwin/core-orbitgt":"workspace:^4.4.0-dev.26","@itwin/core-quantity":"workspace:^4.4.0-dev.26"},"//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.0-dev.44","@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.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","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","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
292358
292457
|
|
|
292359
292458
|
/***/ })
|
|
292360
292459
|
|