@itwin/ecschema-rpcinterface-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 +71 -58
- 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 +16 -16
|
@@ -74063,6 +74063,34 @@ class BackgroundMapGeometry {
|
|
|
74063
74063
|
});
|
|
74064
74064
|
return Promise.all(promises);
|
|
74065
74065
|
}
|
|
74066
|
+
async cartographicToDbFromWgs84Gcs(cartographic) {
|
|
74067
|
+
let db;
|
|
74068
|
+
if (this.globeMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.GlobeMode.Plane) {
|
|
74069
|
+
const fraction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(0, 0);
|
|
74070
|
+
db = cartographic.map((p) => {
|
|
74071
|
+
this._mercatorTilingScheme.cartographicToFraction(p.latitude, p.longitude, fraction);
|
|
74072
|
+
return this._mercatorFractionToDb.multiplyXYZ(fraction.x, fraction.y, p.height);
|
|
74073
|
+
});
|
|
74074
|
+
}
|
|
74075
|
+
else {
|
|
74076
|
+
db = cartographic.map((p) => this._ecefToDb.multiplyPoint3d(p.toEcef()));
|
|
74077
|
+
}
|
|
74078
|
+
if (this._iModel.noGcsDefined)
|
|
74079
|
+
return db;
|
|
74080
|
+
const toReprojectCoords = [];
|
|
74081
|
+
const toReprojectIdx = [];
|
|
74082
|
+
db.forEach(async (p, i) => {
|
|
74083
|
+
if (this.cartesianRange.containsPoint(p)) {
|
|
74084
|
+
toReprojectCoords.push({ x: cartographic[i].longitudeDegrees, y: cartographic[i].latitudeDegrees, z: cartographic[i].height });
|
|
74085
|
+
toReprojectIdx.push(i);
|
|
74086
|
+
}
|
|
74087
|
+
});
|
|
74088
|
+
const spatialPoints = await this._iModel.toSpatialFromGcs(toReprojectCoords, { horizontalCRS: { epsg: 4326 }, verticalCRS: { id: "ELLIPSOID" } });
|
|
74089
|
+
return db.map((p, i) => {
|
|
74090
|
+
const reprojectedIdx = toReprojectIdx.findIndex((value) => value === i);
|
|
74091
|
+
return (reprojectedIdx === -1 ? p : spatialPoints[reprojectedIdx]);
|
|
74092
|
+
});
|
|
74093
|
+
}
|
|
74066
74094
|
cartographicToDb(cartographic, result) {
|
|
74067
74095
|
if (this.globeMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.GlobeMode.Plane) {
|
|
74068
74096
|
const fraction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(0, 0);
|
|
@@ -149760,7 +149788,7 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
149760
149788
|
const tolerancePixel = options?.tolerance ?? 7;
|
|
149761
149789
|
const json = await this.getIdentifyData(quadId, carto, tolerancePixel, true, maxAllowableOffset);
|
|
149762
149790
|
if (json && Array.isArray(json.results)) {
|
|
149763
|
-
const renderer = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisGraphicsRenderer(hit.
|
|
149791
|
+
const renderer = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisGraphicsRenderer({ viewport: hit.viewport });
|
|
149764
149792
|
const layerInfo = { layerName: this._settings.name, subLayerInfos: [] };
|
|
149765
149793
|
// The 'identify' service returns us a flat/unordered list of records..
|
|
149766
149794
|
// results may represent features for the a common subLayer.
|
|
@@ -150081,12 +150109,13 @@ const loggerCategory = "MapLayerImageryProvider.ArcGisGraphicsRenderer";
|
|
|
150081
150109
|
*/
|
|
150082
150110
|
class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcGisGeometryBaseRenderer {
|
|
150083
150111
|
get attributeSymbology() { return undefined; } // No symbology is applied in this renderer
|
|
150084
|
-
constructor(
|
|
150112
|
+
constructor(props) {
|
|
150085
150113
|
super();
|
|
150086
150114
|
this._scratchPointsArray = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
|
|
150087
150115
|
this._scratchPaths = [];
|
|
150088
150116
|
this._graphics = [];
|
|
150089
|
-
this.
|
|
150117
|
+
this._viewport = props.viewport;
|
|
150118
|
+
this._iModel = props.viewport.iModel;
|
|
150090
150119
|
}
|
|
150091
150120
|
moveGraphics() {
|
|
150092
150121
|
const graphics = this._graphics;
|
|
@@ -150116,20 +150145,13 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
150116
150145
|
async fill() {
|
|
150117
150146
|
if (this._scratchPaths.length > 0) {
|
|
150118
150147
|
const loops = [];
|
|
150119
|
-
|
|
150120
|
-
|
|
150121
|
-
|
|
150122
|
-
}
|
|
150148
|
+
const pathPromises = [];
|
|
150149
|
+
for (const points of this._scratchPaths) {
|
|
150150
|
+
pathPromises.push(this.toSpatial(points));
|
|
150123
150151
|
}
|
|
150124
|
-
|
|
150125
|
-
|
|
150126
|
-
|
|
150127
|
-
pathPromises.push(this.toSpatialFromGcs(points));
|
|
150128
|
-
}
|
|
150129
|
-
const pathsArray = await Promise.all(pathPromises);
|
|
150130
|
-
for (const pointsArray of pathsArray) {
|
|
150131
|
-
loops.push(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Loop.create(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(pointsArray)));
|
|
150132
|
-
}
|
|
150152
|
+
const pathsArray = await Promise.all(pathPromises);
|
|
150153
|
+
for (const pointsArray of pathsArray) {
|
|
150154
|
+
loops.push(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Loop.create(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(pointsArray)));
|
|
150133
150155
|
}
|
|
150134
150156
|
const mergedLoops = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.RegionOps.constructAllXYRegionLoops(loops);
|
|
150135
150157
|
for (const loop of mergedLoops) {
|
|
@@ -150145,20 +150167,13 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
150145
150167
|
this._scratchPaths.push(this._scratchPointsArray.getArray());
|
|
150146
150168
|
this._scratchPointsArray.clear();
|
|
150147
150169
|
}
|
|
150148
|
-
|
|
150149
|
-
|
|
150150
|
-
|
|
150151
|
-
}
|
|
150170
|
+
const pathPromises = [];
|
|
150171
|
+
for (const geoPt of this._scratchPaths) {
|
|
150172
|
+
pathPromises.push(this.toSpatial(geoPt));
|
|
150152
150173
|
}
|
|
150153
|
-
|
|
150154
|
-
|
|
150155
|
-
|
|
150156
|
-
pathPromises.push(this.toSpatialFromGcs(noGcsDefined));
|
|
150157
|
-
}
|
|
150158
|
-
const reprojectedPaths = await Promise.all(pathPromises);
|
|
150159
|
-
for (const path of reprojectedPaths) {
|
|
150160
|
-
this._graphics.push({ type: "linestring", points: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(path) });
|
|
150161
|
-
}
|
|
150174
|
+
const reprojectedPaths = await Promise.all(pathPromises);
|
|
150175
|
+
for (const path of reprojectedPaths) {
|
|
150176
|
+
this._graphics.push({ type: "linestring", points: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(path) });
|
|
150162
150177
|
}
|
|
150163
150178
|
this._scratchPaths = [];
|
|
150164
150179
|
}
|
|
@@ -150167,33 +150182,25 @@ class ArcGisGraphicsRenderer extends _internal__WEBPACK_IMPORTED_MODULE_3__.ArcG
|
|
|
150167
150182
|
}
|
|
150168
150183
|
async finishPoints() {
|
|
150169
150184
|
if (this._scratchPointsArray.length > 0) {
|
|
150170
|
-
|
|
150171
|
-
|
|
150185
|
+
// Backend reprojection
|
|
150186
|
+
const pointsArray = this._scratchPointsArray.getArray();
|
|
150187
|
+
try {
|
|
150188
|
+
const spatialPoints = await this.toSpatial(pointsArray);
|
|
150189
|
+
this._graphics.push({ type: "pointstring", points: spatialPoints });
|
|
150172
150190
|
}
|
|
150173
|
-
|
|
150174
|
-
|
|
150175
|
-
const pointsArray = this._scratchPointsArray.getArray();
|
|
150176
|
-
try {
|
|
150177
|
-
const spatialPoints = await this.toSpatialFromGcs(pointsArray);
|
|
150178
|
-
this._graphics.push({ type: "pointstring", points: spatialPoints });
|
|
150179
|
-
}
|
|
150180
|
-
catch (error) {
|
|
150181
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "ArcGisFeatureGraphicsRenderer: Could not reproject points");
|
|
150182
|
-
}
|
|
150191
|
+
catch (error) {
|
|
150192
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "ArcGisFeatureGraphicsRenderer: Could not reproject points");
|
|
150183
150193
|
}
|
|
150184
150194
|
this._scratchPointsArray.clear();
|
|
150185
150195
|
}
|
|
150186
150196
|
}
|
|
150187
|
-
async
|
|
150188
|
-
|
|
150189
|
-
|
|
150190
|
-
|
|
150191
|
-
|
|
150192
|
-
for (const pt of geoPoints) {
|
|
150193
|
-
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 };
|
|
150194
|
-
spatials.push(this._iModel.cartographicToSpatialFromEcef(_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees(carto)));
|
|
150197
|
+
async toSpatial(geoPoints) {
|
|
150198
|
+
const bgMapGeom = this._viewport.displayStyle.getBackgroundMapGeometry();
|
|
150199
|
+
if (bgMapGeom) {
|
|
150200
|
+
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 }));
|
|
150201
|
+
return bgMapGeom.cartographicToDbFromWgs84Gcs(cartoPts);
|
|
150195
150202
|
}
|
|
150196
|
-
return
|
|
150203
|
+
return [];
|
|
150197
150204
|
}
|
|
150198
150205
|
}
|
|
150199
150206
|
|
|
@@ -191283,7 +191290,8 @@ class RegionOps {
|
|
|
191283
191290
|
return halfDistTol * (range.xLength() + range.yLength() + halfDistTol);
|
|
191284
191291
|
}
|
|
191285
191292
|
/**
|
|
191286
|
-
* Return
|
|
191293
|
+
* Return a (signed) xy area for a region.
|
|
191294
|
+
* * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
|
|
191287
191295
|
* @param root any Loop, ParityRegion, or UnionRegion.
|
|
191288
191296
|
*/
|
|
191289
191297
|
static computeXYArea(root) {
|
|
@@ -233555,7 +233563,7 @@ class PolyfaceClip {
|
|
|
233555
233563
|
* * This method computes the portion of the input mesh that lies inside the clipper generated from sweeping the input region in the given direction.
|
|
233556
233564
|
* @param mesh input mesh, untouched
|
|
233557
233565
|
* @param region planar region to drape onto mesh
|
|
233558
|
-
* @param sweepVector optional sweep direction for region
|
|
233566
|
+
* @param sweepVector optional sweep direction for region, magnitude unused. If undefined, sweep is along the region normal.
|
|
233559
233567
|
* @param options how to stroke the region boundary
|
|
233560
233568
|
* @returns clipped facets. No other mesh data but vertices appear in output.
|
|
233561
233569
|
*/
|
|
@@ -233565,10 +233573,13 @@ class PolyfaceClip {
|
|
|
233565
233573
|
const contour = _solid_SweepContour__WEBPACK_IMPORTED_MODULE_15__.SweepContour.createForLinearSweep(region);
|
|
233566
233574
|
if (!contour)
|
|
233567
233575
|
return undefined;
|
|
233568
|
-
|
|
233576
|
+
let sweep = sweepVector;
|
|
233577
|
+
if (sweepVector && contour.localToWorld.matrix.dotColumnZ(sweepVector) < 0.0)
|
|
233578
|
+
sweep = sweepVector.scale(-1); // avoid inverted clipper
|
|
233579
|
+
const clipper = contour.sweepToUnionOfConvexClipPlaneSets(sweep, false, false, options);
|
|
233569
233580
|
if (!clipper)
|
|
233570
233581
|
return undefined;
|
|
233571
|
-
const builders = ClippedPolyfaceBuilders.create(true);
|
|
233582
|
+
const builders = ClippedPolyfaceBuilders.create(true); // we want only the facets inside the clipper
|
|
233572
233583
|
this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(mesh, clipper, builders, 1);
|
|
233573
233584
|
return builders.claimPolyface(0, true);
|
|
233574
233585
|
}
|
|
@@ -234419,7 +234430,7 @@ class PolyfaceQuery {
|
|
|
234419
234430
|
return result;
|
|
234420
234431
|
}
|
|
234421
234432
|
/** Return the sum of all facet areas.
|
|
234422
|
-
* @param vectorToEye compute facet
|
|
234433
|
+
* @param vectorToEye compute sum of *signed* facet areas projected to a view plane perpendicular to this vector
|
|
234423
234434
|
*/
|
|
234424
234435
|
static sumFacetAreas(source, vectorToEye) {
|
|
234425
234436
|
let s = 0;
|
|
@@ -251134,9 +251145,11 @@ class SweepContour {
|
|
|
251134
251145
|
}
|
|
251135
251146
|
/**
|
|
251136
251147
|
* Create a UnionOfConvexClipPlaneSets that clips to the swept faceted contour region.
|
|
251137
|
-
* @param sweepVector the sweep direction
|
|
251148
|
+
* @param sweepVector the sweep direction and distance:
|
|
251149
|
+
* * If undefined, the sweep direction is along the contour normal and no caps are constructed (the sweep is infinite in both directions).
|
|
251150
|
+
* * If defined, the returned clipper is inverted if and only if sweepVector is in the opposite half-space as the computed contour normal.
|
|
251138
251151
|
* @param cap0 construct a clip plane equal to the contour plane. Note that `sweepVector` must be defined.
|
|
251139
|
-
* @param cap1 construct a clip plane parallel to the contour plane at the end of `sweepVector`.
|
|
251152
|
+
* @param cap1 construct a clip plane parallel to the contour plane at the end of `sweepVector`.
|
|
251140
251153
|
* @param options how to stroke the contour
|
|
251141
251154
|
* @returns clipper defined by faceting then sweeping the contour region
|
|
251142
251155
|
*/
|
|
@@ -288371,7 +288384,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
288371
288384
|
/***/ ((module) => {
|
|
288372
288385
|
|
|
288373
288386
|
"use strict";
|
|
288374
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
288387
|
+
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"}}');
|
|
288375
288388
|
|
|
288376
288389
|
/***/ })
|
|
288377
288390
|
|