@itwin/rpcinterface-full-stack-tests 4.3.0-dev.6 → 4.3.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +72 -59
- 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_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -76639,6 +76639,34 @@ class BackgroundMapGeometry {
|
|
|
76639
76639
|
});
|
|
76640
76640
|
return Promise.all(promises);
|
|
76641
76641
|
}
|
|
76642
|
+
async cartographicToDbFromWgs84Gcs(cartographic) {
|
|
76643
|
+
let db;
|
|
76644
|
+
if (this.globeMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.GlobeMode.Plane) {
|
|
76645
|
+
const fraction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(0, 0);
|
|
76646
|
+
db = cartographic.map((p) => {
|
|
76647
|
+
this._mercatorTilingScheme.cartographicToFraction(p.latitude, p.longitude, fraction);
|
|
76648
|
+
return this._mercatorFractionToDb.multiplyXYZ(fraction.x, fraction.y, p.height);
|
|
76649
|
+
});
|
|
76650
|
+
}
|
|
76651
|
+
else {
|
|
76652
|
+
db = cartographic.map((p) => this._ecefToDb.multiplyPoint3d(p.toEcef()));
|
|
76653
|
+
}
|
|
76654
|
+
if (this._iModel.noGcsDefined)
|
|
76655
|
+
return db;
|
|
76656
|
+
const toReprojectCoords = [];
|
|
76657
|
+
const toReprojectIdx = [];
|
|
76658
|
+
db.forEach(async (p, i) => {
|
|
76659
|
+
if (this.cartesianRange.containsPoint(p)) {
|
|
76660
|
+
toReprojectCoords.push({ x: cartographic[i].longitudeDegrees, y: cartographic[i].latitudeDegrees, z: cartographic[i].height });
|
|
76661
|
+
toReprojectIdx.push(i);
|
|
76662
|
+
}
|
|
76663
|
+
});
|
|
76664
|
+
const spatialPoints = await this._iModel.toSpatialFromGcs(toReprojectCoords, { horizontalCRS: { epsg: 4326 }, verticalCRS: { id: "ELLIPSOID" } });
|
|
76665
|
+
return db.map((p, i) => {
|
|
76666
|
+
const reprojectedIdx = toReprojectIdx.findIndex((value) => value === i);
|
|
76667
|
+
return (reprojectedIdx === -1 ? p : spatialPoints[reprojectedIdx]);
|
|
76668
|
+
});
|
|
76669
|
+
}
|
|
76642
76670
|
cartographicToDb(cartographic, result) {
|
|
76643
76671
|
if (this.globeMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.GlobeMode.Plane) {
|
|
76644
76672
|
const fraction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(0, 0);
|
|
@@ -152336,7 +152364,7 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
152336
152364
|
const tolerancePixel = options?.tolerance ?? 7;
|
|
152337
152365
|
const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);
|
|
152338
152366
|
if (json && Array.isArray(json.results)) {
|
|
152339
|
-
const renderer = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisGraphicsRenderer(hit.
|
|
152367
|
+
const renderer = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisGraphicsRenderer({ viewport: hit.viewport });
|
|
152340
152368
|
const layerInfo = { layerName: this._settings.name, subLayerInfos: [] };
|
|
152341
152369
|
// The 'identify' service returns us a flat/unordered list of records..
|
|
152342
152370
|
// results may represent features for the a common subLayer.
|
|
@@ -152657,12 +152685,13 @@ const loggerCategory = "MapLayerImageryProvider.ArcGisGraphicsRenderer";
|
|
|
152657
152685
|
*/
|
|
152658
152686
|
class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcGisGeometryBaseRenderer {
|
|
152659
152687
|
get attributeSymbology() { return undefined; } // No symbology is applied in this renderer
|
|
152660
|
-
constructor(
|
|
152688
|
+
constructor(props) {
|
|
152661
152689
|
super();
|
|
152662
152690
|
this._scratchPointsArray = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
|
|
152663
152691
|
this._scratchPaths = [];
|
|
152664
152692
|
this._graphics = [];
|
|
152665
|
-
this.
|
|
152693
|
+
this._viewport = props.viewport;
|
|
152694
|
+
this._iModel = props.viewport.iModel;
|
|
152666
152695
|
}
|
|
152667
152696
|
moveGraphics() {
|
|
152668
152697
|
const graphics = this._graphics;
|
|
@@ -152692,20 +152721,13 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
152692
152721
|
async fill() {
|
|
152693
152722
|
if (this._scratchPaths.length > 0) {
|
|
152694
152723
|
const loops = [];
|
|
152695
|
-
|
|
152696
|
-
|
|
152697
|
-
|
|
152698
|
-
}
|
|
152724
|
+
const pathPromises = [];
|
|
152725
|
+
for (const points of this._scratchPaths) {
|
|
152726
|
+
pathPromises.push(this.toSpatial(points));
|
|
152699
152727
|
}
|
|
152700
|
-
|
|
152701
|
-
|
|
152702
|
-
|
|
152703
|
-
pathPromises.push(this.toSpatialFromGcs(points));
|
|
152704
|
-
}
|
|
152705
|
-
const pathsArray = await Promise.all(pathPromises);
|
|
152706
|
-
for (const pointsArray of pathsArray) {
|
|
152707
|
-
loops.push(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Loop.create(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(pointsArray)));
|
|
152708
|
-
}
|
|
152728
|
+
const pathsArray = await Promise.all(pathPromises);
|
|
152729
|
+
for (const pointsArray of pathsArray) {
|
|
152730
|
+
loops.push(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Loop.create(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(pointsArray)));
|
|
152709
152731
|
}
|
|
152710
152732
|
const mergedLoops = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.RegionOps.constructAllXYRegionLoops(loops);
|
|
152711
152733
|
for (const loop of mergedLoops) {
|
|
@@ -152721,20 +152743,13 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
152721
152743
|
this._scratchPaths.push(this._scratchPointsArray.getArray());
|
|
152722
152744
|
this._scratchPointsArray.clear();
|
|
152723
152745
|
}
|
|
152724
|
-
|
|
152725
|
-
|
|
152726
|
-
|
|
152727
|
-
}
|
|
152746
|
+
const pathPromises = [];
|
|
152747
|
+
for (const geoPt of this._scratchPaths) {
|
|
152748
|
+
pathPromises.push(this.toSpatial(geoPt));
|
|
152728
152749
|
}
|
|
152729
|
-
|
|
152730
|
-
|
|
152731
|
-
|
|
152732
|
-
pathPromises.push(this.toSpatialFromGcs(noGcsDefined));
|
|
152733
|
-
}
|
|
152734
|
-
const reprojectedPaths = await Promise.all(pathPromises);
|
|
152735
|
-
for (const path of reprojectedPaths) {
|
|
152736
|
-
this._graphics.push({ type: "linestring", points: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(path) });
|
|
152737
|
-
}
|
|
152750
|
+
const reprojectedPaths = await Promise.all(pathPromises);
|
|
152751
|
+
for (const path of reprojectedPaths) {
|
|
152752
|
+
this._graphics.push({ type: "linestring", points: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(path) });
|
|
152738
152753
|
}
|
|
152739
152754
|
this._scratchPaths = [];
|
|
152740
152755
|
}
|
|
@@ -152743,33 +152758,25 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
152743
152758
|
}
|
|
152744
152759
|
async finishPoints() {
|
|
152745
152760
|
if (this._scratchPointsArray.length > 0) {
|
|
152746
|
-
|
|
152747
|
-
|
|
152761
|
+
// Backend reprojection
|
|
152762
|
+
const pointsArray = this._scratchPointsArray.getArray();
|
|
152763
|
+
try {
|
|
152764
|
+
const spatialPoints = await this.toSpatial(pointsArray);
|
|
152765
|
+
this._graphics.push({ type: "pointstring", points: spatialPoints });
|
|
152748
152766
|
}
|
|
152749
|
-
|
|
152750
|
-
|
|
152751
|
-
const pointsArray = this._scratchPointsArray.getArray();
|
|
152752
|
-
try {
|
|
152753
|
-
const spatialPoints = await this.toSpatialFromGcs(pointsArray);
|
|
152754
|
-
this._graphics.push({ type: "pointstring", points: spatialPoints });
|
|
152755
|
-
}
|
|
152756
|
-
catch (error) {
|
|
152757
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "ArcGisFeatureGraphicsRenderer: Could not reproject points");
|
|
152758
|
-
}
|
|
152767
|
+
catch (error) {
|
|
152768
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "ArcGisFeatureGraphicsRenderer: Could not reproject points");
|
|
152759
152769
|
}
|
|
152760
152770
|
this._scratchPointsArray.clear();
|
|
152761
152771
|
}
|
|
152762
152772
|
}
|
|
152763
|
-
async
|
|
152764
|
-
|
|
152765
|
-
|
|
152766
|
-
|
|
152767
|
-
|
|
152768
|
-
for (const pt of geoPoints) {
|
|
152769
|
-
const carto = { longitude: _internal__WEBPACK_IMPORTED_MODULE_3__.WebMercator.getEPSG4326Lon(pt.x), latitude: _internal__WEBPACK_IMPORTED_MODULE_3__.WebMercator.getEPSG4326Lat(pt.y), height: pt.z };
|
|
152770
|
-
spatials.push(this._iModel.cartographicToSpatialFromEcef(_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees(carto)));
|
|
152773
|
+
async toSpatial(geoPoints) {
|
|
152774
|
+
const bgMapGeom = this._viewport.displayStyle.getBackgroundMapGeometry();
|
|
152775
|
+
if (bgMapGeom) {
|
|
152776
|
+
const cartoPts = geoPoints.map((pt) => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees({ longitude: _internal__WEBPACK_IMPORTED_MODULE_3__.WebMercator.getEPSG4326Lon(pt.x), latitude: _internal__WEBPACK_IMPORTED_MODULE_3__.WebMercator.getEPSG4326Lat(pt.y), height: pt.z }));
|
|
152777
|
+
return bgMapGeom.cartographicToDbFromWgs84Gcs(cartoPts);
|
|
152771
152778
|
}
|
|
152772
|
-
return
|
|
152779
|
+
return [];
|
|
152773
152780
|
}
|
|
152774
152781
|
}
|
|
152775
152782
|
|
|
@@ -193859,7 +193866,8 @@ class RegionOps {
|
|
|
193859
193866
|
return halfDistTol * (range.xLength() + range.yLength() + halfDistTol);
|
|
193860
193867
|
}
|
|
193861
193868
|
/**
|
|
193862
|
-
* Return
|
|
193869
|
+
* Return a (signed) xy area for a region.
|
|
193870
|
+
* * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
|
|
193863
193871
|
* @param root any Loop, ParityRegion, or UnionRegion.
|
|
193864
193872
|
*/
|
|
193865
193873
|
static computeXYArea(root) {
|
|
@@ -236131,7 +236139,7 @@ class PolyfaceClip {
|
|
|
236131
236139
|
* * This method computes the portion of the input mesh that lies inside the clipper generated from sweeping the input region in the given direction.
|
|
236132
236140
|
* @param mesh input mesh, untouched
|
|
236133
236141
|
* @param region planar region to drape onto mesh
|
|
236134
|
-
* @param sweepVector optional sweep direction for region
|
|
236142
|
+
* @param sweepVector optional sweep direction for region, magnitude unused. If undefined, sweep is along the region normal.
|
|
236135
236143
|
* @param options how to stroke the region boundary
|
|
236136
236144
|
* @returns clipped facets. No other mesh data but vertices appear in output.
|
|
236137
236145
|
*/
|
|
@@ -236141,10 +236149,13 @@ class PolyfaceClip {
|
|
|
236141
236149
|
const contour = _solid_SweepContour__WEBPACK_IMPORTED_MODULE_15__.SweepContour.createForLinearSweep(region);
|
|
236142
236150
|
if (!contour)
|
|
236143
236151
|
return undefined;
|
|
236144
|
-
|
|
236152
|
+
let sweep = sweepVector;
|
|
236153
|
+
if (sweepVector && contour.localToWorld.matrix.dotColumnZ(sweepVector) < 0.0)
|
|
236154
|
+
sweep = sweepVector.scale(-1); // avoid inverted clipper
|
|
236155
|
+
const clipper = contour.sweepToUnionOfConvexClipPlaneSets(sweep, false, false, options);
|
|
236145
236156
|
if (!clipper)
|
|
236146
236157
|
return undefined;
|
|
236147
|
-
const builders = ClippedPolyfaceBuilders.create(true);
|
|
236158
|
+
const builders = ClippedPolyfaceBuilders.create(true); // we want only the facets inside the clipper
|
|
236148
236159
|
this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(mesh, clipper, builders, 1);
|
|
236149
236160
|
return builders.claimPolyface(0, true);
|
|
236150
236161
|
}
|
|
@@ -236995,7 +237006,7 @@ class PolyfaceQuery {
|
|
|
236995
237006
|
return result;
|
|
236996
237007
|
}
|
|
236997
237008
|
/** Return the sum of all facet areas.
|
|
236998
|
-
* @param vectorToEye compute facet
|
|
237009
|
+
* @param vectorToEye compute sum of *signed* facet areas projected to a view plane perpendicular to this vector
|
|
236999
237010
|
*/
|
|
237000
237011
|
static sumFacetAreas(source, vectorToEye) {
|
|
237001
237012
|
let s = 0;
|
|
@@ -253710,9 +253721,11 @@ class SweepContour {
|
|
|
253710
253721
|
}
|
|
253711
253722
|
/**
|
|
253712
253723
|
* Create a UnionOfConvexClipPlaneSets that clips to the swept faceted contour region.
|
|
253713
|
-
* @param sweepVector the sweep direction
|
|
253724
|
+
* @param sweepVector the sweep direction and distance:
|
|
253725
|
+
* * If undefined, the sweep direction is along the contour normal and no caps are constructed (the sweep is infinite in both directions).
|
|
253726
|
+
* * If defined, the returned clipper is inverted if and only if sweepVector is in the opposite half-space as the computed contour normal.
|
|
253714
253727
|
* @param cap0 construct a clip plane equal to the contour plane. Note that `sweepVector` must be defined.
|
|
253715
|
-
* @param cap1 construct a clip plane parallel to the contour plane at the end of `sweepVector`.
|
|
253728
|
+
* @param cap1 construct a clip plane parallel to the contour plane at the end of `sweepVector`.
|
|
253716
253729
|
* @param options how to stroke the contour
|
|
253717
253730
|
* @returns clipper defined by faceting then sweeping the contour region
|
|
253718
253731
|
*/
|
|
@@ -280667,7 +280680,7 @@ class TestContext {
|
|
|
280667
280680
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
280668
280681
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
280669
280682
|
await core_frontend_1.NoRenderApp.startup({
|
|
280670
|
-
applicationVersion: "4.3.0-dev.
|
|
280683
|
+
applicationVersion: "4.3.0-dev.8",
|
|
280671
280684
|
applicationId: this.settings.gprid,
|
|
280672
280685
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
280673
280686
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -300075,7 +300088,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
300075
300088
|
/***/ ((module) => {
|
|
300076
300089
|
|
|
300077
300090
|
"use strict";
|
|
300078
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
300091
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.8","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s 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","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.3.0-dev.8","@itwin/core-bentley":"workspace:^4.3.0-dev.8","@itwin/core-common":"workspace:^4.3.0-dev.8","@itwin/core-geometry":"workspace:^4.3.0-dev.8","@itwin/core-orbitgt":"workspace:^4.3.0-dev.8","@itwin/core-quantity":"workspace:^4.3.0-dev.8"},"//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":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","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.1.0","@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"}}');
|
|
300079
300092
|
|
|
300080
300093
|
/***/ }),
|
|
300081
300094
|
|