@itwin/ecschema-rpcinterface-tests 5.11.0-dev.5 → 5.11.0-dev.7
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 +41 -38
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -159955,11 +159955,11 @@ class QuantityTypeFormatsProvider {
|
|
|
159955
159955
|
["CivilUnits.LENGTH", QuantityType.LengthEngineering],
|
|
159956
159956
|
["AecUnits.LENGTH", QuantityType.LengthEngineering]
|
|
159957
159957
|
]);
|
|
159958
|
-
async getFormat(name,
|
|
159958
|
+
async getFormat(name, system) {
|
|
159959
159959
|
const quantityType = this._kindOfQuantityMap.get(name);
|
|
159960
159960
|
if (!quantityType)
|
|
159961
159961
|
return undefined;
|
|
159962
|
-
return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);
|
|
159962
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType, system);
|
|
159963
159963
|
}
|
|
159964
159964
|
}
|
|
159965
159965
|
/**
|
|
@@ -160772,15 +160772,18 @@ class QuantityFormatter {
|
|
|
160772
160772
|
/**
|
|
160773
160773
|
* @beta
|
|
160774
160774
|
* Returns a map of [[FormattingSpecEntry]] keyed by persistence unit for a given name, typically a KindOfQuantity full name.
|
|
160775
|
+
* @param name - The KoQ name to look up.
|
|
160776
|
+
* @param options - Optional lookup options. When `options.system` is omitted, the active unit system is used.
|
|
160775
160777
|
*/
|
|
160776
|
-
getSpecsByName(name) {
|
|
160778
|
+
getSpecsByName(name, options) {
|
|
160779
|
+
const effectiveSystem = options?.system ?? this._activeUnitSystem;
|
|
160777
160780
|
const unitMap = this._formatSpecsRegistry.get(name);
|
|
160778
160781
|
if (!unitMap)
|
|
160779
160782
|
return undefined;
|
|
160780
|
-
// Return
|
|
160783
|
+
// Return projection for the effective system
|
|
160781
160784
|
const result = new Map();
|
|
160782
160785
|
for (const [persistenceUnit, systemMap] of unitMap) {
|
|
160783
|
-
const entry = systemMap.get(
|
|
160786
|
+
const entry = systemMap.get(effectiveSystem);
|
|
160784
160787
|
if (entry)
|
|
160785
160788
|
result.set(persistenceUnit, entry);
|
|
160786
160789
|
}
|
|
@@ -208968,9 +208971,9 @@ class CurveFactory {
|
|
|
208968
208971
|
* * If there are 2 connected arcs, add a zero-length line segment between them.
|
|
208969
208972
|
* * If there is a pair of arc and line segment/string with non-parallel tangents, add a zero-length line segment
|
|
208970
208973
|
* between them.
|
|
208971
|
-
* * If there is an arc with sweep degrees in
|
|
208972
|
-
* line segment. Similarly, break
|
|
208973
|
-
* `undefined` if there is an arc with sweep greater than 360 degrees.
|
|
208974
|
+
* * If there is an arc with sweep degrees in (120, 240], break the arc into 2 pieces separated by a zero-length
|
|
208975
|
+
* line segment. Similarly, break arcs with sweep in (240, 360] into 3 pieces separated by 2 zero-length line segments.
|
|
208976
|
+
* Return `undefined` if there is an arc with sweep greater than 360 degrees.
|
|
208974
208977
|
*/
|
|
208975
208978
|
static updatePathForRelaxedValidation(filletedLineString, isClosed, parallelOptions) {
|
|
208976
208979
|
const newFilletedLineString = new _Path__WEBPACK_IMPORTED_MODULE_7__.Path();
|
|
@@ -208999,10 +209002,11 @@ class CurveFactory {
|
|
|
208999
209002
|
const linePoint = child.startPoint();
|
|
209000
209003
|
newFilletedLineString.tryAddChild(_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d.create(linePoint, linePoint));
|
|
209001
209004
|
}
|
|
209002
|
-
|
|
209005
|
+
// to avoid PI too far from the arc, split arcs so that no sub-arc has sweep greater than 120 degrees
|
|
209006
|
+
if (arcSweep !== undefined && arcSweep > 120 && arcSweep <= 240) {
|
|
209003
209007
|
CurveFactory.splitAndAppendArc(newFilletedLineString, child, [0, 0.5, 1]); // 2 pieces
|
|
209004
209008
|
}
|
|
209005
|
-
else if (arcSweep !== undefined && arcSweep >
|
|
209009
|
+
else if (arcSweep !== undefined && arcSweep > 240 && arcSweep <= 360 + sweepTol) {
|
|
209006
209010
|
CurveFactory.splitAndAppendArc(newFilletedLineString, child, [0, 1 / 3, 2 / 3, 1]); // 3 pieces
|
|
209007
209011
|
}
|
|
209008
209012
|
else {
|
|
@@ -209092,12 +209096,11 @@ class CurveFactory {
|
|
|
209092
209096
|
* tangent direction.
|
|
209093
209097
|
* * To treat more input chains as valid, pass `options.relaxedValidation = true`. Internally, this setting performs
|
|
209094
209098
|
* several transformations on the input to produce a valid filleted linestring:
|
|
209095
|
-
* *
|
|
209096
|
-
*
|
|
209097
|
-
* `LineSegment3d`s. Arcs with sweep greater than 360 degrees are not allowed.
|
|
209099
|
+
* * `Arc3d`s with large sweep are uniformly split into 2 or 3 smaller arcs to improve the proximity of their _PI_
|
|
209100
|
+
* points (cf. {@link Arc3d.computeTangentIntersection}). Arcs with sweep greater than 360 degrees are not allowed.
|
|
209098
209101
|
* * Adjacent `Arc3d`s are separated by a zero-length `LineSegment3d`.
|
|
209099
|
-
* * An `Arc3d` that is not G1 continuous with its neighbor is separated from
|
|
209100
|
-
* `LineSegment3d
|
|
209102
|
+
* * An `Arc3d` that is not G1 continuous with its linear neighbor is separated from it by a zero-length
|
|
209103
|
+
* `LineSegment3d` to preserve the corner.
|
|
209101
209104
|
* @param filletedLineString A linestring with corner fillets, e.g., as created by {@link CurveFactory.createFilletsInLineString}.
|
|
209102
209105
|
* @param options optional validation settings.
|
|
209103
209106
|
* @returns Array of [point, radius] pairs extracted from input, or `undefined` if the input is not valid. A radius
|
|
@@ -220830,14 +220833,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
220830
220833
|
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
220831
220834
|
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
220832
220835
|
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
220833
|
-
// Arc:
|
|
220836
|
+
// Arc: X(theta) = C + cos(theta)·U + sin(theta)·V
|
|
220834
220837
|
// Line: contains points A0,A1
|
|
220835
|
-
// Arc point colinear with line if det
|
|
220836
|
-
//
|
|
220837
|
-
//
|
|
220838
|
-
//
|
|
220839
|
-
//
|
|
220840
|
-
// project back to line
|
|
220838
|
+
// Arc point X is colinear (intersects) with line if det(A0, A1, X) = 0 with homogeneous xyw points and vectors
|
|
220839
|
+
// This leads to
|
|
220840
|
+
// det(A0, A1, C) + cos(theta) det(A0, A1, U) + sin(theta) det(A0, A1, V) = 0
|
|
220841
|
+
// or
|
|
220842
|
+
// alpha + beta cos(theta) + gamma sin(theta) = 0
|
|
220843
|
+
// solve for theta; evaluate points; project back to line
|
|
220841
220844
|
if (this._worldToLocalPerspective) {
|
|
220842
220845
|
const data = arc.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
220843
220846
|
const radians0 = data.sweep.fractionToRadians(0);
|
|
@@ -220849,7 +220852,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
220849
220852
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.center);
|
|
220850
220853
|
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector0);
|
|
220851
220854
|
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector90);
|
|
220852
|
-
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
220855
|
+
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
220853
220856
|
const closeApproach = (0 === numRoots);
|
|
220854
220857
|
if (closeApproach)
|
|
220855
220858
|
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|
|
@@ -220890,7 +220893,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
220890
220893
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1);
|
|
220891
220894
|
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0);
|
|
220892
220895
|
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0);
|
|
220893
|
-
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
220896
|
+
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians, tol2);
|
|
220894
220897
|
const closeApproach = (0 === numRoots);
|
|
220895
220898
|
if (closeApproach)
|
|
220896
220899
|
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|
|
@@ -253023,12 +253026,12 @@ class Matrix4d {
|
|
|
253023
253026
|
result._coffs[i] = this._coffs[i];
|
|
253024
253027
|
return result;
|
|
253025
253028
|
}
|
|
253026
|
-
/**
|
|
253029
|
+
/** Zero this matrix4d in place. */
|
|
253027
253030
|
setZero() {
|
|
253028
253031
|
for (let i = 0; i < 16; i++)
|
|
253029
253032
|
this._coffs[i] = 0;
|
|
253030
253033
|
}
|
|
253031
|
-
/**
|
|
253034
|
+
/** Set to identity. */
|
|
253032
253035
|
setIdentity() {
|
|
253033
253036
|
for (let i = 0; i < 16; i++)
|
|
253034
253037
|
this._coffs[i] = 0;
|
|
@@ -253040,14 +253043,14 @@ class Matrix4d {
|
|
|
253040
253043
|
&& Math.abs(c) <= tol
|
|
253041
253044
|
&& Math.abs(d) <= tol;
|
|
253042
253045
|
}
|
|
253043
|
-
/**
|
|
253046
|
+
/** Check if this matrix is identity. */
|
|
253044
253047
|
isIdentity(tol = 1.0e-10) {
|
|
253045
253048
|
return Matrix4d.is1000(this._coffs[0], this._coffs[1], this._coffs[2], this._coffs[3], tol)
|
|
253046
253049
|
&& Matrix4d.is1000(this._coffs[5], this._coffs[6], this._coffs[7], this._coffs[4], tol)
|
|
253047
253050
|
&& Matrix4d.is1000(this._coffs[10], this._coffs[11], this._coffs[8], this._coffs[9], tol)
|
|
253048
253051
|
&& Matrix4d.is1000(this._coffs[15], this._coffs[12], this._coffs[13], this._coffs[14], tol);
|
|
253049
253052
|
}
|
|
253050
|
-
/**
|
|
253053
|
+
/** Create a Matrix4d filled with zeros. */
|
|
253051
253054
|
static createZero(result) {
|
|
253052
253055
|
if (result) {
|
|
253053
253056
|
result.setZero();
|
|
@@ -253055,7 +253058,7 @@ class Matrix4d {
|
|
|
253055
253058
|
}
|
|
253056
253059
|
return new Matrix4d(); // this is zero.
|
|
253057
253060
|
}
|
|
253058
|
-
/**
|
|
253061
|
+
/** Create a Matrix4d with values supplied "across the rows" */
|
|
253059
253062
|
static createRowValues(cxx, cxy, cxz, cxw, cyx, cyy, cyz, cyw, czx, czy, czz, czw, cwx, cwy, cwz, cww, result) {
|
|
253060
253063
|
result = result ? result : new Matrix4d();
|
|
253061
253064
|
result._coffs[0] = cxx;
|
|
@@ -253080,10 +253083,10 @@ class Matrix4d {
|
|
|
253080
253083
|
static createRows(rowX, rowY, rowZ, rowW, result) {
|
|
253081
253084
|
return this.createRowValues(rowX.x, rowX.y, rowX.z, rowX.w, rowY.x, rowY.y, rowY.z, rowY.w, rowZ.x, rowZ.y, rowZ.z, rowZ.w, rowW.x, rowW.y, rowW.z, rowW.w, result);
|
|
253082
253085
|
}
|
|
253083
|
-
/**
|
|
253084
|
-
*
|
|
253086
|
+
/**
|
|
253087
|
+
* Directly set columns from typical 3d data:
|
|
253085
253088
|
* * vectorX, vectorY, vectorZ as columns 0,1,2, with weight0.
|
|
253086
|
-
* * origin as column3, with weight 1
|
|
253089
|
+
* * origin as column3, with weight 1.
|
|
253087
253090
|
*/
|
|
253088
253091
|
setOriginAndVectors(origin, vectorX, vectorY, vectorZ) {
|
|
253089
253092
|
this._coffs[0] = vectorX.x;
|
|
@@ -253103,13 +253106,13 @@ class Matrix4d {
|
|
|
253103
253106
|
this._coffs[14] = 0.0;
|
|
253104
253107
|
this._coffs[15] = 1.0;
|
|
253105
253108
|
}
|
|
253106
|
-
/**
|
|
253109
|
+
/** Promote a transform to full Matrix4d (with 0001 in final row) */
|
|
253107
253110
|
static createTransform(source, result) {
|
|
253108
253111
|
const matrix = source.matrix;
|
|
253109
253112
|
const point = source.origin;
|
|
253110
253113
|
return Matrix4d.createRowValues(matrix.coffs[0], matrix.coffs[1], matrix.coffs[2], point.x, matrix.coffs[3], matrix.coffs[4], matrix.coffs[5], point.y, matrix.coffs[6], matrix.coffs[7], matrix.coffs[8], point.z, 0, 0, 0, 1, result);
|
|
253111
253114
|
}
|
|
253112
|
-
/**
|
|
253115
|
+
/** Return an identity matrix. */
|
|
253113
253116
|
static createIdentity(result) {
|
|
253114
253117
|
result = Matrix4d.createZero(result);
|
|
253115
253118
|
result._coffs[0] = 1.0;
|
|
@@ -253118,7 +253121,7 @@ class Matrix4d {
|
|
|
253118
253121
|
result._coffs[15] = 1.0;
|
|
253119
253122
|
return result;
|
|
253120
253123
|
}
|
|
253121
|
-
/**
|
|
253124
|
+
/** Return matrix with translation directly inserted (along with 1 on diagonal) */
|
|
253122
253125
|
static createTranslationXYZ(x, y, z, result) {
|
|
253123
253126
|
result = Matrix4d.createZero(result);
|
|
253124
253127
|
result._coffs[0] = 1.0;
|
|
@@ -253130,7 +253133,7 @@ class Matrix4d {
|
|
|
253130
253133
|
result._coffs[11] = z;
|
|
253131
253134
|
return result;
|
|
253132
253135
|
}
|
|
253133
|
-
/**
|
|
253136
|
+
/** Return this matrix plus scale times matrixB. */
|
|
253134
253137
|
plusScaled(matrixB, scale, result) {
|
|
253135
253138
|
// If result is undefined, a real clone is created.
|
|
253136
253139
|
// If result is "this" we get the pointer to this right back.
|
|
@@ -253149,7 +253152,7 @@ class Matrix4d {
|
|
|
253149
253152
|
* @param scaleX x diagonal entry
|
|
253150
253153
|
* @param scaleY y diagonal entry
|
|
253151
253154
|
* @param scaleZ z diagonal entry
|
|
253152
|
-
* @param result optional result
|
|
253155
|
+
* @param result optional result
|
|
253153
253156
|
*/
|
|
253154
253157
|
static createTranslationAndScaleXYZ(tx, ty, tz, scaleX, scaleY, scaleZ, result) {
|
|
253155
253158
|
return Matrix4d.createRowValues(scaleX, 0, 0, tx, 0, scaleY, 0, ty, 0, 0, scaleZ, tz, 0, 0, 0, 1, result);
|
|
@@ -331690,7 +331693,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
331690
331693
|
/***/ ((module) => {
|
|
331691
331694
|
|
|
331692
331695
|
"use strict";
|
|
331693
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.11.0-dev.
|
|
331696
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.11.0-dev.7","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 && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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 \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.10","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
331694
331697
|
|
|
331695
331698
|
/***/ })
|
|
331696
331699
|
|