@itwin/rpcinterface-full-stack-tests 3.3.0-dev.65 → 3.3.0-dev.68

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.
@@ -191477,7 +191477,7 @@ SetupWalkCameraTool.iconSpec = "icon-camera-location";
191477
191477
  /*! exports provided: name, version, description, main, module, typings, license, scripts, repository, keywords, author, peerDependencies, //devDependencies, devDependencies, //dependencies, dependencies, nyc, eslintConfig, default */
191478
191478
  /***/ (function(module) {
191479
191479
 
191480
- module.exports = JSON.parse("{\"name\":\"@itwin/core-frontend\",\"version\":\"3.3.0-dev.65\",\"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.3.0-dev.65\",\"@itwin/core-bentley\":\"workspace:^3.3.0-dev.65\",\"@itwin/core-common\":\"workspace:^3.3.0-dev.65\",\"@itwin/core-geometry\":\"workspace:^3.3.0-dev.65\",\"@itwin/core-orbitgt\":\"workspace:^3.3.0-dev.65\",\"@itwin/core-quantity\":\"workspace:^3.3.0-dev.65\",\"@itwin/webgl-compatibility\":\"workspace:^3.3.0-dev.65\"},\"//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.9\",\"@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\":\"^1.0.0\",\"typescript\":\"~4.4.0\",\"webpack\":\"4.42.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/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\"}}]}}");
191480
+ module.exports = JSON.parse("{\"name\":\"@itwin/core-frontend\",\"version\":\"3.3.0-dev.68\",\"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.3.0-dev.68\",\"@itwin/core-bentley\":\"workspace:^3.3.0-dev.68\",\"@itwin/core-common\":\"workspace:^3.3.0-dev.68\",\"@itwin/core-geometry\":\"workspace:^3.3.0-dev.68\",\"@itwin/core-orbitgt\":\"workspace:^3.3.0-dev.68\",\"@itwin/core-quantity\":\"workspace:^3.3.0-dev.68\",\"@itwin/webgl-compatibility\":\"workspace:^3.3.0-dev.68\"},\"//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.9\",\"@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\":\"^1.0.0\",\"typescript\":\"~4.4.0\",\"webpack\":\"4.42.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/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\"}}]}}");
191481
191481
 
191482
191482
  /***/ }),
191483
191483
 
@@ -203898,6 +203898,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__["CurvePrimitiv
203898
203898
  * @param transform optional transform to apply to the arc.
203899
203899
  */
203900
203900
  extendRange(range, transform) {
203901
+ this.extendRangeInSweep(range, this._sweep, transform);
203902
+ }
203903
+ /**
203904
+ * Extend a range to include the range of the arc, using specified range in place of the arc range.
203905
+ * @param range range being extended.
203906
+ * @param transform optional transform to apply to the arc.
203907
+ */
203908
+ extendRangeInSweep(range, sweep, transform) {
203901
203909
  const trigForm = new _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__["SineCosinePolynomial"](0, 0, 0);
203902
203910
  const center = this._center.clone(Arc3d._workPointA);
203903
203911
  const vectorU = this._matrix.columnX(Arc3d._workVectorU);
@@ -203912,13 +203920,23 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__["CurvePrimitiv
203912
203920
  const range1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range1d"].createNull();
203913
203921
  for (let i = 0; i < 3; i++) {
203914
203922
  trigForm.set(center.at(i), vectorU.at(i), vectorV.at(i));
203915
- trigForm.rangeInSweep(this._sweep, range1);
203923
+ trigForm.rangeInSweep(sweep, range1);
203916
203924
  lowPoint.setAt(i, range1.low);
203917
203925
  highPoint.setAt(i, range1.high);
203918
203926
  }
203919
203927
  range.extend(lowPoint);
203920
203928
  range.extend(highPoint);
203921
203929
  }
203930
+ /**
203931
+ * Returns a (high accuracy) range of the curve between fractional positions
203932
+ * * Default implementation returns teh range of the curve from clonePartialCurve
203933
+ */
203934
+ rangeBetweenFractions(fraction0, fraction1, transform) {
203935
+ const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__["AngleSweep"].createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
203936
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range3d"].create();
203937
+ this.extendRangeInSweep(range, sweep, transform);
203938
+ return range;
203939
+ }
203922
203940
  /**
203923
203941
  * Set up a SineCosinePolynomial as the function c+u*cos(theta)+v*sin(theta) where
203924
203942
  * c,u,v are coefficients obtained by evaluating altitude and velocity relative to the plane.
@@ -204701,10 +204719,12 @@ __webpack_require__.r(__webpack_exports__);
204701
204719
  /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
204702
204720
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
204703
204721
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
204704
- /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
204705
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
204706
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
204707
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
204722
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
204723
+ /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
204724
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
204725
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
204726
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
204727
+ /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
204708
204728
  /*---------------------------------------------------------------------------------------------
204709
204729
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
204710
204730
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -204720,6 +204740,8 @@ __webpack_require__.r(__webpack_exports__);
204720
204740
 
204721
204741
 
204722
204742
 
204743
+
204744
+
204723
204745
  /**
204724
204746
  * * Annotation of an interval of a curve.
204725
204747
  * * The interval is marked with two pairs of numbers:
@@ -204729,12 +204751,14 @@ __webpack_require__.r(__webpack_exports__);
204729
204751
  */
204730
204752
  class PathFragment {
204731
204753
  /** Create a fragment with complete fraction, distance and child data. */
204732
- constructor(childFraction0, childFraction1, distance0, distance1, childCurve) {
204754
+ constructor(childFraction0, childFraction1, distance0, distance1, childCurve, range) {
204733
204755
  this.childFraction0 = childFraction0;
204734
204756
  this.childFraction1 = childFraction1;
204735
204757
  this.chainDistance0 = distance0;
204736
204758
  this.chainDistance1 = distance1;
204737
204759
  this.childCurve = childCurve;
204760
+ this.range = range;
204761
+ this.a = 0;
204738
204762
  }
204739
204763
  /**
204740
204764
  * Return true if the distance is within the distance limits of this fragment.
@@ -204743,6 +204767,29 @@ class PathFragment {
204743
204767
  containsChainDistance(distance) {
204744
204768
  return distance >= this.chainDistance0 && distance <= this.chainDistance1;
204745
204769
  }
204770
+ // Return a quick distance to the curve. This may be SMALLER than true distance but may
204771
+ // not be larger.
204772
+ quickMinDistanceToChildCurve(spacePoint) {
204773
+ if (this.range) {
204774
+ return this.range.distanceToPoint(spacePoint);
204775
+ }
204776
+ // ugh. have to do real computation ..
204777
+ const detail = this.childCurve.closestPoint(spacePoint, false);
204778
+ if (detail)
204779
+ return detail.a;
204780
+ return 0;
204781
+ }
204782
+ // Return an array with (references to) all the path fragments, sorted smallest to largest on
204783
+ // the "a" value equal to the quick min distance to the fragment
204784
+ static collectSortedQuickMinDistances(fragments, spacePoint) {
204785
+ const sortedFragments = [];
204786
+ for (const f of fragments) {
204787
+ f.a = f.quickMinDistanceToChildCurve(spacePoint);
204788
+ sortedFragments.push(f);
204789
+ }
204790
+ sortedFragments.sort((a, b) => a.a - b.a);
204791
+ return sortedFragments;
204792
+ }
204746
204793
  /**
204747
204794
  * Return true if this fragment addresses `curve` and brackets `fraction`
204748
204795
  * @param distance
@@ -204810,18 +204857,22 @@ class DistanceIndexConstructionContext {
204810
204857
  announcePointTangent(_xyz, _fraction, _tangent) { }
204811
204858
  /** Announce numPoints interpolated between point0 and point1, with associated fractions */
204812
204859
  announceSegmentInterval(cp, point0, point1, numStrokes, fraction0, fraction1) {
204860
+ const fragmentPoint0 = point0.clone();
204861
+ const fragmentPoint1 = point1.clone();
204813
204862
  let d0 = this._accumulatedDistance;
204814
204863
  if (numStrokes <= 1) {
204815
204864
  this._accumulatedDistance += point0.distance(point1);
204816
- this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp));
204865
+ this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__["Range3d"].create(fragmentPoint0, fragmentPoint1)));
204817
204866
  }
204818
204867
  else {
204819
204868
  let f1;
204820
204869
  for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
204821
204870
  f1 = _Geometry__WEBPACK_IMPORTED_MODULE_2__["Geometry"].interpolate(fraction0, i / numStrokes, fraction1);
204871
+ point0.interpolate(fraction1, point1, fragmentPoint1);
204822
204872
  d0 = this._accumulatedDistance;
204823
204873
  this._accumulatedDistance += (Math.abs(f1 - f0) * point0.distance(point1));
204824
- this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp));
204874
+ this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__["Range3d"].create(fragmentPoint0, fragmentPoint1)));
204875
+ fragmentPoint0.setFrom(fragmentPoint1);
204825
204876
  }
204826
204877
  }
204827
204878
  }
@@ -204832,7 +204883,8 @@ class DistanceIndexConstructionContext {
204832
204883
  d = cp.curveLengthBetweenFractions(f0, f1);
204833
204884
  d0 = this._accumulatedDistance;
204834
204885
  this._accumulatedDistance += d;
204835
- this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp));
204886
+ const range = cp.rangeBetweenFractions(f0, f1);
204887
+ this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, range));
204836
204888
  }
204837
204889
  }
204838
204890
  needPrimaryGeometryForStrokes() { return true; }
@@ -204870,7 +204922,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
204870
204922
  */
204871
204923
  cloneTransformed(transform) {
204872
204924
  const c = this._path.clone();
204873
- if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_4__["CurveChain"] && c.tryTransformInPlace(transform))
204925
+ if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_5__["CurveChain"] && c.tryTransformInPlace(transform))
204874
204926
  return CurveChainWithDistanceIndex.createCapture(c);
204875
204927
  return undefined;
204876
204928
  }
@@ -204883,6 +204935,68 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
204883
204935
  const c = this._path.clone();
204884
204936
  return CurveChainWithDistanceIndex.createCapture(c);
204885
204937
  }
204938
+ /** Return a deep clone */
204939
+ clonePartialCurve(_fractionA, _fractionB) {
204940
+ if (_fractionA === _fractionB)
204941
+ return undefined;
204942
+ let fractionA = _fractionA;
204943
+ let fractionB = _fractionB;
204944
+ const reversed = _fractionA > _fractionB;
204945
+ if (reversed) {
204946
+ fractionA = _fractionB;
204947
+ fractionB = _fractionA;
204948
+ }
204949
+ const chainDistanceA = fractionA * this._totalLength;
204950
+ const chainDistanceB = fractionB * this._totalLength;
204951
+ const newPath = _Path__WEBPACK_IMPORTED_MODULE_9__["Path"].create();
204952
+ const fragmentA = this.chainDistanceToFragment(chainDistanceA, true);
204953
+ const fragmentB = this.chainDistanceToFragment(chainDistanceB, true);
204954
+ if (!fragmentA || !fragmentB)
204955
+ return undefined;
204956
+ const childCurveIndexA = this._path.childIndex(fragmentA.childCurve);
204957
+ const childCurveIndexB = this._path.childIndex(fragmentB.childCurve);
204958
+ const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA);
204959
+ const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB);
204960
+ if (childCurveIndexA === undefined || childCurveIndexB === undefined)
204961
+ return undefined;
204962
+ // add a (possibly reversed) partial clone to newPath
204963
+ const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
204964
+ if (fractionA === fractionB)
204965
+ return false;
204966
+ let newCurve;
204967
+ if (fractionA === 0.0 && fractionB === 1.0) {
204968
+ newCurve = childCurve.clone();
204969
+ if (reversed)
204970
+ newCurve.reverseInPlace();
204971
+ }
204972
+ else {
204973
+ newCurve = reversedClone ?
204974
+ childCurve.clonePartialCurve(childFraction1, childFraction0)
204975
+ : childCurve.clonePartialCurve(childFraction0, childFraction1);
204976
+ }
204977
+ if (newCurve) {
204978
+ newPath.children.push(newCurve);
204979
+ return true;
204980
+ }
204981
+ return false;
204982
+ };
204983
+ if (fragmentA.childCurve === fragmentB.childCurve) {
204984
+ // the two distances are within the same curve.
204985
+ if (addPartialChild(fragmentA.childCurve, childFractionA, childFractionB, reversed))
204986
+ return CurveChainWithDistanceIndex.createCapture(newPath); // singleton -- children[] does not need to be reversed.
204987
+ return undefined;
204988
+ }
204989
+ addPartialChild(this._path.children[childCurveIndexA], childFractionA, 1.0, reversed);
204990
+ // at least two distinct children are impacted ....
204991
+ for (let childIndex = childCurveIndexA + 1; childIndex < childCurveIndexB; childIndex++) {
204992
+ addPartialChild(this._path.children[childIndex], 0.0, 1.0, reversed);
204993
+ }
204994
+ addPartialChild(this._path.children[childCurveIndexB], 0.0, childFractionB, reversed);
204995
+ // This reverses array entries but not orientation within each curve ...
204996
+ if (reversed)
204997
+ newPath.children.reverse();
204998
+ return CurveChainWithDistanceIndex.createCapture(newPath);
204999
+ }
204886
205000
  /** Ask if the curve is within tolerance of a plane.
204887
205001
  * @returns Returns true if the curve is completely within tolerance of the plane.
204888
205002
  */
@@ -205011,6 +205125,27 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205011
205125
  }
205012
205126
  return undefined;
205013
205127
  }
205128
+ /**
205129
+ * Resolve a fraction of the CurveChain to a PathFragment index
205130
+ * @param distance
205131
+ * @param allowExtrapolation
205132
+ */
205133
+ chainDistanceToFragmentIndex(distance, allowExtrapolation = false) {
205134
+ const numFragments = this._fragments.length;
205135
+ const fragments = this._fragments;
205136
+ if (numFragments > 0) {
205137
+ if (distance < 0.0)
205138
+ return allowExtrapolation ? 0 : undefined;
205139
+ if (distance > this._totalLength)
205140
+ return allowExtrapolation ? (numFragments - 1) : undefined;
205141
+ // humbug, linear search
205142
+ for (let i = 0; i < numFragments; i++) {
205143
+ if (fragments[i].containsChainDistance(distance))
205144
+ return i;
205145
+ }
205146
+ }
205147
+ return undefined;
205148
+ }
205014
205149
  /**
205015
205150
  * Convert distance along the chain to fraction along the chain.
205016
205151
  * @param distance distance along the chain
@@ -205169,10 +205304,32 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205169
205304
  const fragmentB = this.chainDistanceToFragment(distanceB, true);
205170
205305
  const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result);
205171
205306
  const endFraction = startFraction + (signedDistance / this._totalLength);
205172
- const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result);
205307
+ const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result);
205173
205308
  chainDetail.childDetail = childDetail;
205174
205309
  return chainDetail;
205175
205310
  }
205311
+ /**
205312
+ *
205313
+ * The returned object has
205314
+ * * numCalls = number of times closestPoint was called.
205315
+ * * numCurvesTested = number of curves tested with full closestPoint
205316
+ * * numAssigned = number of times a new minimum value was recorded
205317
+ * * numCandidate = number of curves that would be tested in worst case.
205318
+ * return an object summarizing closest point test counts
205319
+ * @param clear if true, counts are cleared after the return object is formed.
205320
+ */
205321
+ static getClosestPointTestCounts(clear = true) {
205322
+ const a = {
205323
+ numCalls: this._numCalls,
205324
+ numTested: this._numTested,
205325
+ numAssigned: this._numAssigned,
205326
+ numCandidate: this._numCandidate
205327
+ };
205328
+ if (clear) {
205329
+ this._numTested = this._numAssigned = this._numCandidate = 0;
205330
+ }
205331
+ return a;
205332
+ }
205176
205333
  /** Search for the curve point that is closest to the spacePoint.
205177
205334
  * * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which
205178
205335
  * (via a handler) determines a CurveLocation detail among the children.
@@ -205189,15 +205346,24 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205189
205346
  childDetail = this.path.children[0].closestPoint(spacePoint, extend);
205190
205347
  }
205191
205348
  else {
205192
- const extend0 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0), _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendMode"].None];
205193
- const extend1 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendMode"].None, _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1)];
205194
- for (let childIndex = 0; childIndex < numChildren; childIndex++) {
205195
- const child = this.path.children[childIndex];
205196
- const detailA = child.closestPoint(spacePoint, childIndex === 0 ? extend0 : childIndex + 1 === numChildren ? extend1 : false);
205349
+ const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
205350
+ const extend0 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0), _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendMode"].None];
205351
+ const extend1 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendMode"].None, _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1)];
205352
+ const fragment0 = this._fragments[0];
205353
+ const fragment1 = this._fragments[this._fragments.length - 1];
205354
+ CurveChainWithDistanceIndex._numCalls++;
205355
+ CurveChainWithDistanceIndex._numCandidate += sortedFragments.length;
205356
+ for (const f of sortedFragments) {
205357
+ if (f.a > aMin)
205358
+ break;
205359
+ CurveChainWithDistanceIndex._numTested++;
205360
+ const child = f.childCurve;
205361
+ const detailA = child.closestPoint(spacePoint, f === fragment0 ? extend0 : f === fragment1 ? extend1 : false);
205197
205362
  if (detailA && detailA.a < aMin) {
205198
205363
  aMin = detailA.a;
205199
- childDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(detailA.curve, detailA.fraction, detailA.point, childDetail);
205364
+ childDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(detailA.curve, detailA.fraction, detailA.point, childDetail);
205200
205365
  childDetail.a = detailA.a;
205366
+ CurveChainWithDistanceIndex._numAssigned++;
205201
205367
  }
205202
205368
  }
205203
205369
  }
@@ -205207,7 +205373,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205207
205373
  if (fragment) {
205208
205374
  const chainDistance = fragment.childFractionTChainDistance(childDetail.fraction);
205209
205375
  const chainFraction = this.chainDistanceToChainFraction(chainDistance);
205210
- const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(this, chainFraction, childDetail.point);
205376
+ const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(this, chainFraction, childDetail.point);
205211
205377
  chainDetail.childDetail = childDetail;
205212
205378
  return chainDetail;
205213
205379
  }
@@ -205219,7 +205385,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205219
205385
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
205220
205386
  */
205221
205387
  constructOffsetXY(offsetDistanceOrOptions) {
205222
- const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_7__["OffsetOptions"].create(offsetDistanceOrOptions);
205388
+ const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__["OffsetOptions"].create(offsetDistanceOrOptions);
205223
205389
  const offsets = [];
205224
205390
  for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
205225
205391
  const offset = prim.constructOffsetXY(options);
@@ -205233,6 +205399,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
205233
205399
  return offsets;
205234
205400
  }
205235
205401
  }
205402
+ CurveChainWithDistanceIndex._numCalls = 0;
205403
+ CurveChainWithDistanceIndex._numTested = 0;
205404
+ CurveChainWithDistanceIndex._numAssigned = 0;
205405
+ CurveChainWithDistanceIndex._numCandidate = 0;
205236
205406
 
205237
205407
 
205238
205408
  /***/ }),
@@ -205503,6 +205673,14 @@ class CurveChain extends CurveCollection {
205503
205673
  curve.reverseInPlace();
205504
205674
  this._curves.reverse();
205505
205675
  }
205676
+ /** Return the index where target is found in the array of children */
205677
+ childIndex(target) {
205678
+ for (let i = 0; i < this._curves.length; i++) {
205679
+ if (this._curves[i] === target)
205680
+ return i;
205681
+ }
205682
+ return undefined;
205683
+ }
205506
205684
  /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive.
205507
205685
  */
205508
205686
  primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index, fraction, cyclic = false, result) {
@@ -209113,6 +209291,8 @@ __webpack_require__.r(__webpack_exports__);
209113
209291
  /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
209114
209292
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
209115
209293
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
209294
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
209295
+
209116
209296
 
209117
209297
 
209118
209298
 
@@ -209243,6 +209423,70 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_11__["Geome
209243
209423
  this.emitStrokableParts(context);
209244
209424
  return Math.abs(context.getSum());
209245
209425
  }
209426
+ /**
209427
+ * Returns a (high accuracy) range of the curve between fractional positions
209428
+ * * Default implementation returns teh range of the curve from clonePartialCurve
209429
+ */
209430
+ rangeBetweenFractions(fraction0, fraction1, transform) {
209431
+ return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);
209432
+ }
209433
+ /**
209434
+ * Returns a (high accuracy) range of the curve between fractional positions
209435
+ * * Default implementation returns teh range of the curve from clonePartialCurve
209436
+ */
209437
+ rangeBetweenFractionsByClone(fraction0, fraction1, transform) {
209438
+ if (fraction0 === fraction1)
209439
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].create(this.fractionToPoint(fraction0));
209440
+ const fragment = this.clonePartialCurve(fraction0, fraction1);
209441
+ if (fragment)
209442
+ return fragment.range(transform);
209443
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].createNull();
209444
+ }
209445
+ /**
209446
+ * Returns an approximate range based on a fixed number of evaluations
209447
+ * * Default implementation returns a range determined by evaluating a specified number of points on the curve.
209448
+ * * Optional evaluate again at interval midpoints and extrapolate any increase
209449
+ * * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So extrapolationFactor
209450
+ * of 1/3 gets speculatively moves closer to the tight range, and larger multipliers increase confidence in being safely larger.
209451
+ * @param fraction0 start fraction for evaluation
209452
+ * @param fraction1 end fraction for evaluation
209453
+ * @param count number of points to evaluate
209454
+ * @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier to any increase in size.
209455
+ */
209456
+ rangeBetweenFractionsByCount(fraction0, fraction1, count, transform, extrapolationFactor = 0.0) {
209457
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].createNull();
209458
+ const workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__["Point3d"].create();
209459
+ range.extendPoint(this.startPoint(workPoint));
209460
+ range.extendPoint(this.endPoint(workPoint));
209461
+ // Evaluate at count fractions (fraction0 + i * fractionStep)
209462
+ const evaluateSteps = (fractionA, fractionStep, countA) => {
209463
+ let f = fractionA;
209464
+ for (let i = 0; i < countA; i++, f += fractionStep) {
209465
+ this.fractionToPoint(f, workPoint);
209466
+ if (transform)
209467
+ range.extendTransformedPoint(transform, workPoint);
209468
+ else
209469
+ range.extendPoint(workPoint);
209470
+ }
209471
+ };
209472
+ const interiorCount = count - 2;
209473
+ if (interiorCount > 0) {
209474
+ const localFraction0 = 1.0 / (interiorCount + 1);
209475
+ const globalFractionStep = localFraction0 * (fraction1 - fraction0);
209476
+ evaluateSteps(fraction0 + globalFractionStep, globalFractionStep, interiorCount);
209477
+ }
209478
+ if (extrapolationFactor > 0.0) {
209479
+ // Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer excess value.
209480
+ // same interior step, but shift to interval midpoints:.
209481
+ const baseRange = range.clone();
209482
+ const interiorCount1 = interiorCount + 1;
209483
+ const localFraction0 = 0.5 / interiorCount1; // we only evaluate at new midpoints.
209484
+ const globalFractionStep = 2 * localFraction0 * (fraction1 - fraction0); // same as above, but avoids special logic for interiorCount = 0
209485
+ evaluateSteps(fraction0 + globalFractionStep * 0.5, globalFractionStep, interiorCount1);
209486
+ range.extendWhenLarger(baseRange, extrapolationFactor);
209487
+ }
209488
+ return range;
209489
+ }
209246
209490
  /**
209247
209491
  *
209248
209492
  * * Run an integration (with a default gaussian quadrature) with a fixed fractional step
@@ -210227,12 +210471,13 @@ __webpack_require__.r(__webpack_exports__);
210227
210471
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
210228
210472
  /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
210229
210473
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
210230
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
210231
- /* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
210232
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
210233
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
210234
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
210235
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
210474
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
210475
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
210476
+ /* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
210477
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
210478
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
210479
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
210480
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
210236
210481
  /*---------------------------------------------------------------------------------------------
210237
210482
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
210238
210483
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -210246,6 +210491,7 @@ __webpack_require__.r(__webpack_exports__);
210246
210491
 
210247
210492
 
210248
210493
 
210494
+
210249
210495
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
210250
210496
  /**
210251
210497
  * A LineSegment3d is:
@@ -210261,7 +210507,7 @@ __webpack_require__.r(__webpack_exports__);
210261
210507
  * ```
210262
210508
  * @public
210263
210509
  */
210264
- class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurvePrimitive"] {
210510
+ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__["CurvePrimitive"] {
210265
210511
  /**
210266
210512
  * CAPTURE point references as a `LineSegment3d`
210267
210513
  * @param point0
@@ -210312,7 +210558,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
210312
210558
  }
210313
210559
  /** Return the point and derivative vector at fractional position along the line segment. */
210314
210560
  fractionToPointAndDerivative(fraction, result) {
210315
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__["Ray3d"].createZero();
210561
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__["Ray3d"].createZero();
210316
210562
  result.direction.setStartEnd(this._point0, this._point1);
210317
210563
  this._point0.interpolate(fraction, this._point1, result.origin);
210318
210564
  return result;
@@ -210398,8 +210644,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
210398
210644
  */
210399
210645
  closestPoint(spacePoint, extend, result) {
210400
210646
  let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);
210401
- fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].correctFraction(extend, fraction);
210402
- result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].create(this, result);
210647
+ fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].correctFraction(extend, fraction);
210648
+ result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].create(this, result);
210403
210649
  // remark: This can be done by result.setFP (fraction, thePoint, undefined, a)
210404
210650
  // but that creates a temporary point.
210405
210651
  result.fraction = fraction;
@@ -210431,12 +210677,12 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
210431
210677
  appendPlaneIntersectionPoints(plane, result) {
210432
210678
  const h0 = plane.altitude(this._point0);
210433
210679
  const h1 = plane.altitude(this._point1);
210434
- const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_4__["Order2Bezier"].solveCoffs(h0, h1);
210680
+ const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_5__["Order2Bezier"].solveCoffs(h0, h1);
210435
210681
  let numIntersection = 0;
210436
210682
  if (fraction !== undefined) {
210437
210683
  numIntersection++;
210438
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
210439
- detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveIntervalRole"].isolated;
210684
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
210685
+ detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveIntervalRole"].isolated;
210440
210686
  result.push(detail);
210441
210687
  }
210442
210688
  return numIntersection;
@@ -210547,6 +210793,26 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
210547
210793
  clonePartialCurve(fractionA, fractionB) {
210548
210794
  return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));
210549
210795
  }
210796
+ /**
210797
+ * Returns a (high accuracy) range of the curve between fractional positions
210798
+ * * Default implementation returns teh range of the curve from clonePartialCurve
210799
+ */
210800
+ rangeBetweenFractions(fraction0, fraction1, transform) {
210801
+ // (This is cheap -- don't bother testing for fraction0===fraction1)
210802
+ if (!transform) {
210803
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__["Range3d"].create();
210804
+ range.extendInterpolated(this._point0, fraction0, this._point1);
210805
+ range.extendInterpolated(this._point0, fraction1, this._point1);
210806
+ return range;
210807
+ }
210808
+ const point0 = this.fractionToPoint(fraction0);
210809
+ const point1 = this.fractionToPoint(fraction1);
210810
+ if (transform) {
210811
+ transform.multiplyPoint3d(point0, point0);
210812
+ transform.multiplyPoint3d(point1, point1);
210813
+ }
210814
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__["Range3d"].create(point0, point1);
210815
+ }
210550
210816
  /**
210551
210817
  * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
210552
210818
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
@@ -210555,7 +210821,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
210555
210821
  const offsetVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__["Vector3d"].createStartEnd(this._point0, this._point1);
210556
210822
  if (offsetVec.normalizeInPlace()) {
210557
210823
  offsetVec.rotate90CCWXY(offsetVec);
210558
- const offsetDist = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__["OffsetOptions"].getOffsetDistance(offsetDistanceOrOptions);
210824
+ const offsetDist = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_9__["OffsetOptions"].getOffsetDistance(offsetDistanceOrOptions);
210559
210825
  return LineSegment3d.create(this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist));
210560
210826
  }
210561
210827
  return undefined;
@@ -210585,14 +210851,16 @@ __webpack_require__.r(__webpack_exports__);
210585
210851
  /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
210586
210852
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
210587
210853
  /* harmony import */ var _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
210588
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
210589
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
210590
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
210591
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
210592
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
210593
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
210594
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
210595
- /* harmony import */ var _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
210854
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
210855
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
210856
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
210857
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
210858
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
210859
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
210860
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
210861
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
210862
+ /* harmony import */ var _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
210863
+
210596
210864
 
210597
210865
 
210598
210866
 
@@ -210652,7 +210920,7 @@ function accumulateGoodUnitPerpendicular(points, vectorA, baseIndex, stepDirecti
210652
210920
  * * Use `moveSignedDistanceFromFraction` to do true-length evaluations.
210653
210921
  * @public
210654
210922
  */
210655
- class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"] {
210923
+ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"] {
210656
210924
  constructor(points) {
210657
210925
  super();
210658
210926
  /** String name for schema properties */
@@ -211069,7 +211337,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211069
211337
  * @param result optional result
211070
211338
  */
211071
211339
  fractionToPointAndDerivative(fraction, result) {
211072
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
211340
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
211073
211341
  const n = this._points.length;
211074
211342
  if (n <= 1) {
211075
211343
  result.direction.setZero();
@@ -211082,21 +211350,21 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211082
211350
  const numSegment = n - 1;
211083
211351
  const df = 1.0 / numSegment;
211084
211352
  if (fraction <= df) {
211085
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
211353
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
211086
211354
  this._points.interpolate(0, fraction / df, 1, result.origin);
211087
211355
  this._points.vectorIndexIndex(0, 1, result.direction);
211088
211356
  result.direction.scaleInPlace(1.0 / df);
211089
211357
  return result;
211090
211358
  }
211091
211359
  if (fraction + df >= 1.0) {
211092
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
211360
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
211093
211361
  this._points.interpolate(n - 2, 1.0 - (1.0 - fraction) / df, n - 1, result.origin);
211094
211362
  this._points.vectorIndexIndex(n - 2, n - 1, result.direction);
211095
211363
  result.direction.scaleInPlace(1.0 / df);
211096
211364
  return result;
211097
211365
  }
211098
211366
  /* true interior point */
211099
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
211367
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
211100
211368
  const index0 = Math.floor(fraction / df);
211101
211369
  const localFraction = (fraction - index0 * df) / df;
211102
211370
  this._points.interpolate(index0, localFraction, index0 + 1, result.origin);
@@ -211126,11 +211394,11 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211126
211394
  const n = this._points.length;
211127
211395
  if (n <= 1) {
211128
211396
  if (n === 1)
211129
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createTranslation(this._points.getPoint3dAtUncheckedPointIndex(0), result);
211130
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createIdentity(result);
211397
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createTranslation(this._points.getPoint3dAtUncheckedPointIndex(0), result);
211398
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createIdentity(result);
211131
211399
  }
211132
211400
  if (n === 2)
211133
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createRefs(this._points.interpolate(0, fraction, 1), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__["Matrix3d"].createRigidHeadsUp(this._points.vectorIndexIndex(0, 1), _Geometry__WEBPACK_IMPORTED_MODULE_0__["AxisOrder"].XYZ));
211401
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createRefs(this._points.interpolate(0, fraction, 1), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__["Matrix3d"].createRigidHeadsUp(this._points.vectorIndexIndex(0, 1), _Geometry__WEBPACK_IMPORTED_MODULE_0__["AxisOrder"].XYZ));
211134
211402
  /** 3 or more points. */
211135
211403
  const numSegment = n - 1;
211136
211404
  const df = 1.0 / numSegment;
@@ -211165,8 +211433,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211165
211433
  }
211166
211434
  const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__["Matrix3d"].createRigidFromColumns(normal, vectorA, _Geometry__WEBPACK_IMPORTED_MODULE_0__["AxisOrder"].ZXY);
211167
211435
  if (matrix)
211168
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createOriginAndMatrix(origin, matrix, result);
211169
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createTranslation(origin, result);
211436
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createOriginAndMatrix(origin, matrix, result);
211437
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createTranslation(origin, result);
211170
211438
  }
211171
211439
  /** evaluate the start point of the linestring. */
211172
211440
  startPoint() {
@@ -211251,6 +211519,33 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211251
211519
  return sum;
211252
211520
  }
211253
211521
  }
211522
+ /** Compute the range of points between fractional positions on the linestring. */
211523
+ rangeBetweenFractions(fraction0, fraction1, transform) {
211524
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__["Range3d"].create();
211525
+ if (this.points.length < 1)
211526
+ return range;
211527
+ if (fraction1 < fraction0)
211528
+ return this.rangeBetweenFractions(fraction1, fraction0, transform);
211529
+ const numSegments = this._points.length - 1;
211530
+ const scaledFraction0 = fraction0 * numSegments;
211531
+ const index0 = Math.max(0, Math.floor(scaledFraction0));
211532
+ const localFraction0 = scaledFraction0 - index0;
211533
+ const workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
211534
+ this._points.interpolate(index0, localFraction0, index0 + 1, workPoint);
211535
+ range.extendPoint(workPoint, transform);
211536
+ if (fraction1 === fraction0)
211537
+ return range; // 1-point range
211538
+ const scaledFraction1 = fraction1 * numSegments;
211539
+ const index1 = Math.min(Math.floor(scaledFraction1), numSegments - 1);
211540
+ const localFraction1 = scaledFraction1 - index1;
211541
+ this._points.interpolate(index1, localFraction1, index1 + 1, workPoint);
211542
+ range.extendPoint(workPoint, transform);
211543
+ for (let i = index0 + 1; i <= index1; i++) {
211544
+ this._points.getPoint3dAtUncheckedPointIndex(i, workPoint);
211545
+ range.extendPoint(workPoint, transform);
211546
+ }
211547
+ return range;
211548
+ }
211254
211549
  /**
211255
211550
  * * Implementation of `CurvePrimitive.moveSignedDistanceFromFraction`. (see comments there!)
211256
211551
  * * Find the segment that contains the start fraction
@@ -211274,12 +211569,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211274
211569
  leftPointIndex++;
211275
211570
  this._points.getPoint3dAtCheckedPointIndex(leftPointIndex, point1);
211276
211571
  if (context.announcePoint(point1, leftPointIndex / numSegments))
211277
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success, result);
211572
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success, result);
211278
211573
  }
211279
211574
  // fall through for extrapolation from final segment
211280
211575
  if (allowExtension)
211281
211576
  context.announceExtrapolation(this._points, numSegments - 1, numSegments, (numSegments - 1) / numSegments, 1.0);
211282
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, context.distanceStatus(), result);
211577
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, context.distanceStatus(), result);
211283
211578
  }
211284
211579
  else { // (moving backwards)
211285
211580
  if (localFraction <= 0.0)
@@ -211287,12 +211582,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211287
211582
  for (; leftPointIndex >= 0; leftPointIndex--) {
211288
211583
  this._points.getPoint3dAtCheckedPointIndex(leftPointIndex, point1);
211289
211584
  if (context.announcePoint(point1, leftPointIndex / numSegments))
211290
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success, result);
211585
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success, result);
211291
211586
  }
211292
211587
  // fall through for backward extrapolation from initial segment
211293
211588
  if (allowExtension)
211294
211589
  context.announceExtrapolation(this._points, 1, 0, 1.0 / numSegments, 0.0);
211295
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, -context.distance0, context.distanceStatus(), result);
211590
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, -context.distance0, context.distanceStatus(), result);
211296
211591
  }
211297
211592
  }
211298
211593
  /** sum lengths of segments in the linestring. (This is a true length.) */
@@ -211316,9 +211611,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211316
211611
  }
211317
211612
  /** Find the point on the linestring (including its segment interiors) that is closest to spacePoint. */
211318
211613
  closestPoint(spacePoint, extend, result) {
211319
- result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].create(this, result);
211320
- const extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0);
211321
- const extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1);
211614
+ result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].create(this, result);
211615
+ const extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0);
211616
+ const extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1);
211322
211617
  const numPoints = this._points.length;
211323
211618
  if (numPoints > 0) {
211324
211619
  const lastIndex = numPoints - 1;
@@ -211356,18 +211651,18 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211356
211651
  * return the incremented counter.
211357
211652
  */
211358
211653
  static pushVertexHit(result, counter, cp, fraction, point) {
211359
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPoint(cp, fraction, point);
211654
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPoint(cp, fraction, point);
211360
211655
  result.push(detail);
211361
211656
  if (counter === 0) {
211362
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].isolatedAtVertex);
211657
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].isolatedAtVertex);
211363
211658
  }
211364
211659
  else if (counter === 1) { // last entry must be isolatedAtVertex !!!
211365
- result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalStart);
211366
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalEnd);
211660
+ result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalStart);
211661
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalEnd);
211367
211662
  }
211368
211663
  else {
211369
- result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalInterior);
211370
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalEnd);
211664
+ result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalInterior);
211665
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalEnd);
211371
211666
  }
211372
211667
  }
211373
211668
  /** find intersections with a plane.
@@ -211397,8 +211692,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211397
211692
  if (hA * hB < 0.0) { // at point0, hA=0 will keep us out of here . ..
211398
211693
  segmentFraction = hA / (hA - hB); // this division is safe because the signs are different.
211399
211694
  pointA.interpolate(segmentFraction, pointB, pointC);
211400
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPoint(this, (i - 1 + segmentFraction) / divisor, pointC);
211401
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].isolated);
211695
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPoint(this, (i - 1 + segmentFraction) / divisor, pointC);
211696
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].isolated);
211402
211697
  result.push(detail);
211403
211698
  numConsecutiveZero = 0;
211404
211699
  }
@@ -211608,13 +211903,13 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211608
211903
  computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
211609
211904
  const numPoints = this._points.length;
211610
211905
  const applyOptions = options !== undefined && options.hasMaxEdgeLength;
211611
- const myData = _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_16__["StrokeCountMap"].createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);
211906
+ const myData = _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_17__["StrokeCountMap"].createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);
211612
211907
  for (let i = 1; i < numPoints; i++) {
211613
211908
  const segmentLength = this._points.distanceIndexIndex(i - 1, i);
211614
211909
  const numStrokeOnSegment = applyOptions ? options.applyMaxEdgeLength(1, segmentLength) : 1;
211615
211910
  myData.addToCountAndLength(numStrokeOnSegment, segmentLength);
211616
211911
  }
211617
- _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"].installStrokeCountMap(this, myData, parentStrokeMap);
211912
+ _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"].installStrokeCountMap(this, myData, parentStrokeMap);
211618
211913
  }
211619
211914
  /** Second step of double dispatch: call `handler.handleLineString3d(this)` */
211620
211915
  dispatchToGeometryHandler(handler) {
@@ -211738,7 +212033,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211738
212033
  /** Return (if possible) a specific segment of the linestring */
211739
212034
  getIndexedSegment(index) {
211740
212035
  if (index >= 0 && index + 1 < this._points.length)
211741
- return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__["LineSegment3d"].create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
212036
+ return _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__["LineSegment3d"].create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
211742
212037
  return undefined;
211743
212038
  }
211744
212039
  /**
@@ -211825,12 +212120,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211825
212120
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
211826
212121
  */
211827
212122
  constructOffsetXY(offsetDistanceOrOptions) {
211828
- const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_14__["OffsetOptions"].create(offsetDistanceOrOptions);
212123
+ const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_15__["OffsetOptions"].create(offsetDistanceOrOptions);
211829
212124
  const offsets = [];
211830
212125
  for (const seg of this.collectCurvePrimitives(undefined, true, true)) {
211831
212126
  const offset = seg.constructOffsetXY(options);
211832
212127
  if (offset !== undefined) {
211833
- if (offset instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"])
212128
+ if (offset instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"])
211834
212129
  offsets.push(offset);
211835
212130
  else if (Array.isArray(offset))
211836
212131
  offset.forEach((cp) => offsets.push(cp));
@@ -211842,7 +212137,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
211842
212137
  LineString3d._workPointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
211843
212138
  LineString3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
211844
212139
  LineString3d._workPointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
211845
- LineString3d._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createXAxis();
212140
+ LineString3d._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createXAxis();
211846
212141
  LineString3d._indexPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create(); // private point for indexAndFractionToPoint.
211847
212142
  /** An AnnotatedLineString3d is a linestring with additional surface-related data attached to each point
211848
212143
  * * This is useful in facet construction.
@@ -211864,7 +212159,7 @@ class MoveByDistanceContext {
211864
212159
  // Return CurveSearchStatus indicating whether the accumulated distance has reached the target.
211865
212160
  distanceStatus() {
211866
212161
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__["Geometry"].isSameCoordinate(this.distance0, this.targetDistance) ?
211867
- _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success : _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].stoppedAtBoundary;
212162
+ _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success : _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].stoppedAtBoundary;
211868
212163
  }
211869
212164
  /**
211870
212165
  * Announce next point on the polyline.
@@ -218297,7 +218592,7 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
218297
218592
  * @param fraction0 start fraction
218298
218593
  * @param fraction1 end fraction
218299
218594
  */
218300
- computeStrokes(strokes, fractionA, fractionB, numInterval) {
218595
+ computeStrokes(strokes, fractionA, fractionB, numInterval, applyLocalToWorld = true) {
218301
218596
  if (numInterval < 1)
218302
218597
  numInterval = 1;
218303
218598
  strokes.clear();
@@ -218311,6 +218606,8 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
218311
218606
  strokes.packedPoints.pushXYZ(this._evaluator.fractionToX(fraction), this._evaluator.fractionToY(fraction), 0);
218312
218607
  distances.pushXY(fraction, nominalDistanceAlong); // the second distance will be updated below
218313
218608
  }
218609
+ if (applyLocalToWorld)
218610
+ strokes.tryTransformInPlace(this._localToWorld);
218314
218611
  let fraction0 = distances.getXAtUncheckedPointIndex(0);
218315
218612
  let trueDistance0 = distances.getYAtUncheckedPointIndex(0); // whatever was assigned as start distance is fine
218316
218613
  let trueDistance1, fraction1;
@@ -218563,9 +218860,9 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
218563
218860
  return true;
218564
218861
  }
218565
218862
  /** Return the spiral start point. */
218566
- startPoint() { return this.localToWorld.multiplyPoint3d(this.activeStrokes.startPoint()); }
218863
+ startPoint() { return this.activeStrokes.startPoint(); }
218567
218864
  /** return the spiral end point. */
218568
- endPoint() { return this.localToWorld.multiplyPoint3d(this.activeStrokes.endPoint()); }
218865
+ endPoint() { return this.activeStrokes.endPoint(); }
218569
218866
  /** test if the local to world transform places the spiral xy plane into `plane` */
218570
218867
  isInPlane(plane) {
218571
218868
  return plane.isPointInPlane(this.localToWorld.origin)
@@ -218667,10 +218964,6 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
218667
218964
  dispatchToGeometryHandler(handler) {
218668
218965
  return handler.handleTransitionSpiral(this);
218669
218966
  }
218670
- /** extend the range by the strokes of the spiral */
218671
- extendRange(rangeToExtend, transform) {
218672
- this.activeStrokes.extendRange(rangeToExtend, transform);
218673
- }
218674
218967
  /** compare various coordinate quantities */
218675
218968
  isAlmostEqual(other) {
218676
218969
  if (other instanceof DirectSpiral3d) {
@@ -219061,10 +219354,6 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_0_
219061
219354
  dispatchToGeometryHandler(handler) {
219062
219355
  return handler.handleTransitionSpiral(this);
219063
219356
  }
219064
- /** extend the range by the strokes of the spiral */
219065
- extendRange(rangeToExtend, transform) {
219066
- this.activeStrokes.extendRange(rangeToExtend, transform);
219067
- }
219068
219357
  /** compare various coordinate quantities */
219069
219358
  isAlmostEqual(other) {
219070
219359
  if (other instanceof IntegratedSpiral3d) {
@@ -219671,6 +219960,7 @@ __webpack_require__.r(__webpack_exports__);
219671
219960
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
219672
219961
  /* harmony import */ var _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internalContexts/CurveOffsetXYHandler */ "../../core/geometry/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js");
219673
219962
  /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
219963
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
219674
219964
  /*---------------------------------------------------------------------------------------------
219675
219965
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
219676
219966
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -219684,6 +219974,7 @@ __webpack_require__.r(__webpack_exports__);
219684
219974
 
219685
219975
 
219686
219976
 
219977
+
219687
219978
  /**
219688
219979
  * TransitionSpiral3d is a base class for multiple variants of spirals.
219689
219980
  * * The menagerie of spiral types have 2 broad categories:
@@ -219804,6 +220095,22 @@ class TransitionSpiral3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__["C
219804
220095
  this.emitStrokableParts(handler, options.strokeOptions);
219805
220096
  return handler.claimResult();
219806
220097
  }
220098
+ /** extend the range by the strokes of the spiral */
220099
+ extendRange(rangeToExtend, transform) {
220100
+ const myRange = this.rangeBetweenFractions(0.0, 1.0, transform);
220101
+ rangeToExtend.extendRange(myRange);
220102
+ }
220103
+ /** return the range of spiral between fractions of the activeStrokes.
220104
+ * * Use activeStrokes point count times interval factor for initial evaluation count, but do at least 5
220105
+ */
220106
+ rangeBetweenFractions(fractionA, fractionB, transform) {
220107
+ const strokes = this.activeStrokes;
220108
+ if (undefined === strokes)
220109
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range3d"].createNull();
220110
+ let count = Math.ceil(strokes.numPoints() * Math.abs(fractionB - fractionA));
220111
+ count = _Geometry__WEBPACK_IMPORTED_MODULE_3__["Geometry"].clamp(5, count, 30);
220112
+ return this.rangeBetweenFractionsByCount(fractionA, fractionB, count, transform, 0.5);
220113
+ }
219807
220114
  }
219808
220115
 
219809
220116
 
@@ -233446,6 +233753,14 @@ class RangeBase {
233446
233753
  return x - high;
233447
233754
  return 0.0;
233448
233755
  }
233756
+ /**
233757
+ * if a > 0, return (extrapolationFactor * a); otherwise return defaultValue
233758
+ * @param q
233759
+ * @param factor multiplier for positive q values.
233760
+ */
233761
+ static multiplyIfPositive(q, factor, defaultValue = 0.0) {
233762
+ return q > 0 ? factor * q : defaultValue;
233763
+ }
233449
233764
  }
233450
233765
  /** Number considered impossibly large possibly for a coordinate in a range. */
233451
233766
  RangeBase._EXTREME_POSITIVE = 1.0e200;
@@ -233981,6 +234296,17 @@ class Range3d extends RangeBase {
233981
234296
  if (z > this.high.z)
233982
234297
  this.high.z = z;
233983
234298
  }
234299
+ /** Expand this range by a point interpolated between given points. */
234300
+ extendInterpolated(xyz0, fraction, xyz1) {
234301
+ if (fraction < 0.5) {
234302
+ this.extendXYZ(xyz0.x + fraction * (xyz1.x - xyz0.x), xyz0.y + fraction * (xyz1.y - xyz0.y), xyz0.z + fraction * (xyz1.z - xyz0.z));
234303
+ }
234304
+ else {
234305
+ // use reversed formulas for best accuracy at fraction=1.0
234306
+ const g = 1.0 - fraction;
234307
+ this.extendXYZ(xyz1.x + g * (xyz0.x - xyz1.x), xyz1.y + g * (xyz0.y - xyz1.y), xyz1.z + g * (xyz0.z - xyz1.z));
234308
+ }
234309
+ }
233984
234310
  /** Expand this range by distances a in only the x direction. */
233985
234311
  extendXOnly(x) {
233986
234312
  if (x < this.low.x)
@@ -234036,6 +234362,19 @@ class Range3d extends RangeBase {
234036
234362
  this.extendXYZ(other.high.x, other.high.y, other.high.z);
234037
234363
  }
234038
234364
  }
234365
+ /** In each direction look at the difference between this range limit and that of interiorRange.
234366
+ * * If this range is larger, expand it by extrapolationFactor.
234367
+ */
234368
+ extendWhenLarger(other, extrapolationFactor) {
234369
+ if (!Range3d.isNull(other) && !Range3d.isNull(this)) {
234370
+ this.high.x += RangeBase.multiplyIfPositive(this.high.x - other.high.x, extrapolationFactor);
234371
+ this.high.y += RangeBase.multiplyIfPositive(this.high.y - other.high.y, extrapolationFactor);
234372
+ this.high.z += RangeBase.multiplyIfPositive(this.high.z - other.high.z, extrapolationFactor);
234373
+ this.low.x -= RangeBase.multiplyIfPositive(other.low.x - this.low.x, extrapolationFactor);
234374
+ this.low.y -= RangeBase.multiplyIfPositive(other.low.y - this.low.y, extrapolationFactor);
234375
+ this.low.z -= RangeBase.multiplyIfPositive(other.low.z - this.low.z, extrapolationFactor);
234376
+ }
234377
+ }
234039
234378
  /** Return the intersection of ranges. */
234040
234379
  intersect(other, result) {
234041
234380
  if (!this.intersectsRange(other))
@@ -305078,7 +305417,7 @@ class TestContext {
305078
305417
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
305079
305418
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
305080
305419
  await core_frontend_1.NoRenderApp.startup({
305081
- applicationVersion: "3.3.0-dev.65",
305420
+ applicationVersion: "3.3.0-dev.68",
305082
305421
  applicationId: this.settings.gprid,
305083
305422
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
305084
305423
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),