@itwin/ecschema-rpcinterface-tests 3.4.0-dev.22 → 3.4.0-dev.25

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.
@@ -205725,7 +205725,7 @@ __webpack_require__.r(__webpack_exports__);
205725
205725
  /* harmony export */ });
205726
205726
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
205727
205727
  /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
205728
- /* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
205728
+ /* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
205729
205729
  /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
205730
205730
  /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
205731
205731
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
@@ -205733,6 +205733,8 @@ __webpack_require__.r(__webpack_exports__);
205733
205733
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
205734
205734
  /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
205735
205735
  /* harmony import */ var _ClipUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
205736
+ /* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
205737
+ /* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
205736
205738
  /*---------------------------------------------------------------------------------------------
205737
205739
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
205738
205740
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -205747,6 +205749,8 @@ __webpack_require__.r(__webpack_exports__);
205747
205749
 
205748
205750
 
205749
205751
 
205752
+
205753
+
205750
205754
  /**
205751
205755
  * A ConvexClipPlaneSet is a collection of ClipPlanes, often used for bounding regions of space.
205752
205756
  * @public
@@ -206028,7 +206032,7 @@ class ConvexClipPlaneSet {
206028
206032
  return true;
206029
206033
  }
206030
206034
  /** Return true if `point` satisfies `point.isPointOnOrInside` for all planes */
206031
- isPointOnOrInside(point, tolerance) {
206035
+ isPointOnOrInside(point, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
206032
206036
  const interiorTolerance = Math.abs(tolerance); // Interior tolerance should always be positive. (TFS# 246598).
206033
206037
  for (const plane of this._planes) {
206034
206038
  if (!plane.isPointOnOrInside(point, (plane.interior ? interiorTolerance : tolerance)))
@@ -206424,10 +206428,50 @@ class ConvexClipPlaneSet {
206424
206428
  if (newInside)
206425
206429
  insideFragments.push(newInside);
206426
206430
  }
206431
+ /** Create a convex clip set from a convex mesh.
206432
+ * * Create a plane for each facet.
206433
+ * * Assemble the planes as a single clip plane set.
206434
+ * * If the facets are closed by edge pairing, use the sign of the computed volume to point the plane normals inward.
206435
+ * * If the facets are not closed, the facet orientation determines plane orientation.
206436
+ * * The implication of this is that if the facets are a convex volume, the returned clip plane set is convex.
206437
+ * @param convexMesh input mesh. For best results, the mesh should be closed and convex.
206438
+ * @param result optional preallocated result to reuse and return
206439
+ * @return clipper and volume (zero if mesh is not closed)
206440
+ */
206441
+ static createConvexPolyface(convexMesh, result) {
206442
+ result = this.createEmpty(result);
206443
+ let vol = 0;
206444
+ let myMesh;
206445
+ let myVisitor;
206446
+ if (convexMesh instanceof _polyface_Polyface__WEBPACK_IMPORTED_MODULE_9__.Polyface) {
206447
+ myMesh = convexMesh;
206448
+ myVisitor = convexMesh.createVisitor(0);
206449
+ }
206450
+ else {
206451
+ myMesh = convexMesh.clientPolyface();
206452
+ myVisitor = convexMesh;
206453
+ }
206454
+ if (myMesh && myVisitor) {
206455
+ if (_polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.isPolyfaceClosedByEdgePairing(myMesh))
206456
+ vol = _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.sumTetrahedralVolumes(myVisitor);
206457
+ const scale = vol > 0.0 ? -1.0 : 1.0; // point clipper normals inward if mesh normals point outward
206458
+ const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
206459
+ const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.createXYPlane();
206460
+ myVisitor.reset();
206461
+ while (myVisitor.moveToNextFacet()) {
206462
+ if (undefined !== _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_6__.PolygonOps.areaNormalGo(myVisitor.point, normal)) {
206463
+ normal.scaleInPlace(scale);
206464
+ if (undefined !== _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(myVisitor.point.front(), normal, plane))
206465
+ result.addPlaneToConvexSet(plane);
206466
+ }
206467
+ }
206468
+ }
206469
+ return { clipper: result, volume: vol };
206470
+ }
206427
206471
  }
206428
206472
  /** Value acting as "at infinity" for coordinates along a ray. */
206429
206473
  ConvexClipPlaneSet.hugeVal = 1e37;
206430
- ConvexClipPlaneSet._clipArcFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array();
206474
+ ConvexClipPlaneSet._clipArcFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_11__.GrowableFloat64Array();
206431
206475
 
206432
206476
 
206433
206477
  /***/ }),
@@ -234366,10 +234410,12 @@ class XYZ {
234366
234410
  }
234367
234411
  return index;
234368
234412
  }
234369
- /** Return true if the if x,y,z components are all nearly zero to tolerance Geometry.smallMetricDistance */
234413
+ /** Return true if the x,y,z components are all nearly zero to tolerance Geometry.smallMetricDistance */
234370
234414
  get isAlmostZero() {
234371
234415
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.x) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.y) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.z);
234372
234416
  }
234417
+ /** Return true if the x,y,z components are all exactly zero */
234418
+ get isZero() { return this.x === 0.0 && this.y === 0.0 && this.z === 0.0; }
234373
234419
  /** Return the largest absolute value of any component */
234374
234420
  maxAbs() { return Math.max(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z)); }
234375
234421
  /** Return the sqrt of the sum of squared x,y,z parts */
@@ -236815,12 +236861,13 @@ class PolygonOps {
236815
236861
  static areaNormalGo(points, result) {
236816
236862
  if (!result)
236817
236863
  result = new _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
236864
+ else
236865
+ result.setZero();
236818
236866
  const n = points.length;
236819
236867
  if (n === 3) {
236820
236868
  points.crossProductIndexIndexIndex(0, 1, 2, result);
236821
236869
  }
236822
- else if (n >= 3) {
236823
- result.setZero();
236870
+ else if (n > 3) {
236824
236871
  // This will work with or without closure edge. If closure is given, the last vector is 000.
236825
236872
  for (let i = 2; i < n; i++) {
236826
236873
  points.accumulateCrossProductIndexIndexIndex(0, i - 1, i, result);
@@ -236828,7 +236875,7 @@ class PolygonOps {
236828
236875
  }
236829
236876
  // ALL BRANCHES SUM FULL CROSS PRODUCTS AND EXPECT SCALE HERE
236830
236877
  result.scaleInPlace(0.5);
236831
- return result;
236878
+ return result.isZero ? undefined : result;
236832
236879
  }
236833
236880
  /** return a vector which is perpendicular to the polygon and has magnitude equal to the polygon area. */
236834
236881
  static areaNormal(points, result) {
@@ -236968,8 +237015,10 @@ class PolygonOps {
236968
237015
  * Return a unit normal to the plane of the polygon.
236969
237016
  * @param points array of points around the polygon.
236970
237017
  * @param result caller-allocated result vector.
237018
+ * @return true if and only if result has unit length
236971
237019
  */
236972
237020
  static unitNormal(points, result) {
237021
+ result.setZero();
236973
237022
  let n = points.length;
236974
237023
  if (n > 1 && points.getPoint3dAtUncheckedPointIndex(0).isExactEqual(points.getPoint3dAtUncheckedPointIndex(n - 1)))
236975
237024
  --n; // ignore closure point
@@ -305297,7 +305346,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
305297
305346
  /***/ ((module) => {
305298
305347
 
305299
305348
  "use strict";
305300
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.22","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-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"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.22","@itwin/core-bentley":"workspace:^3.4.0-dev.22","@itwin/core-common":"workspace:^3.4.0-dev.22","@itwin/core-geometry":"workspace:^3.4.0-dev.22","@itwin/core-orbitgt":"workspace:^3.4.0-dev.22","@itwin/core-quantity":"workspace:^3.4.0-dev.22","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.22"},"//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":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.7","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//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/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
305349
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.25","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-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"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.25","@itwin/core-bentley":"workspace:^3.4.0-dev.25","@itwin/core-common":"workspace:^3.4.0-dev.25","@itwin/core-geometry":"workspace:^3.4.0-dev.25","@itwin/core-orbitgt":"workspace:^3.4.0-dev.25","@itwin/core-quantity":"workspace:^3.4.0-dev.25","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.25"},"//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":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.7","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//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/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
305301
305350
 
305302
305351
  /***/ })
305303
305352