@itwin/ecschema-rpcinterface-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.
@@ -200739,7 +200739,7 @@ SetupWalkCameraTool.iconSpec = "icon-camera-location";
200739
200739
  /*! exports provided: name, version, description, main, module, typings, license, scripts, repository, keywords, author, peerDependencies, //devDependencies, devDependencies, //dependencies, dependencies, nyc, eslintConfig, default */
200740
200740
  /***/ (function(module) {
200741
200741
 
200742
- 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\"}}]}}");
200742
+ 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\"}}]}}");
200743
200743
 
200744
200744
  /***/ }),
200745
200745
 
@@ -213160,6 +213160,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__["CurvePrimitiv
213160
213160
  * @param transform optional transform to apply to the arc.
213161
213161
  */
213162
213162
  extendRange(range, transform) {
213163
+ this.extendRangeInSweep(range, this._sweep, transform);
213164
+ }
213165
+ /**
213166
+ * Extend a range to include the range of the arc, using specified range in place of the arc range.
213167
+ * @param range range being extended.
213168
+ * @param transform optional transform to apply to the arc.
213169
+ */
213170
+ extendRangeInSweep(range, sweep, transform) {
213163
213171
  const trigForm = new _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__["SineCosinePolynomial"](0, 0, 0);
213164
213172
  const center = this._center.clone(Arc3d._workPointA);
213165
213173
  const vectorU = this._matrix.columnX(Arc3d._workVectorU);
@@ -213174,13 +213182,23 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__["CurvePrimitiv
213174
213182
  const range1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range1d"].createNull();
213175
213183
  for (let i = 0; i < 3; i++) {
213176
213184
  trigForm.set(center.at(i), vectorU.at(i), vectorV.at(i));
213177
- trigForm.rangeInSweep(this._sweep, range1);
213185
+ trigForm.rangeInSweep(sweep, range1);
213178
213186
  lowPoint.setAt(i, range1.low);
213179
213187
  highPoint.setAt(i, range1.high);
213180
213188
  }
213181
213189
  range.extend(lowPoint);
213182
213190
  range.extend(highPoint);
213183
213191
  }
213192
+ /**
213193
+ * Returns a (high accuracy) range of the curve between fractional positions
213194
+ * * Default implementation returns teh range of the curve from clonePartialCurve
213195
+ */
213196
+ rangeBetweenFractions(fraction0, fraction1, transform) {
213197
+ const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_2__["AngleSweep"].createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
213198
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range3d"].create();
213199
+ this.extendRangeInSweep(range, sweep, transform);
213200
+ return range;
213201
+ }
213184
213202
  /**
213185
213203
  * Set up a SineCosinePolynomial as the function c+u*cos(theta)+v*sin(theta) where
213186
213204
  * c,u,v are coefficients obtained by evaluating altitude and velocity relative to the plane.
@@ -213963,10 +213981,12 @@ __webpack_require__.r(__webpack_exports__);
213963
213981
  /* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
213964
213982
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
213965
213983
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
213966
- /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
213967
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
213968
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
213969
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
213984
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
213985
+ /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
213986
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
213987
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
213988
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
213989
+ /* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
213970
213990
  /*---------------------------------------------------------------------------------------------
213971
213991
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
213972
213992
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -213982,6 +214002,8 @@ __webpack_require__.r(__webpack_exports__);
213982
214002
 
213983
214003
 
213984
214004
 
214005
+
214006
+
213985
214007
  /**
213986
214008
  * * Annotation of an interval of a curve.
213987
214009
  * * The interval is marked with two pairs of numbers:
@@ -213991,12 +214013,14 @@ __webpack_require__.r(__webpack_exports__);
213991
214013
  */
213992
214014
  class PathFragment {
213993
214015
  /** Create a fragment with complete fraction, distance and child data. */
213994
- constructor(childFraction0, childFraction1, distance0, distance1, childCurve) {
214016
+ constructor(childFraction0, childFraction1, distance0, distance1, childCurve, range) {
213995
214017
  this.childFraction0 = childFraction0;
213996
214018
  this.childFraction1 = childFraction1;
213997
214019
  this.chainDistance0 = distance0;
213998
214020
  this.chainDistance1 = distance1;
213999
214021
  this.childCurve = childCurve;
214022
+ this.range = range;
214023
+ this.a = 0;
214000
214024
  }
214001
214025
  /**
214002
214026
  * Return true if the distance is within the distance limits of this fragment.
@@ -214005,6 +214029,29 @@ class PathFragment {
214005
214029
  containsChainDistance(distance) {
214006
214030
  return distance >= this.chainDistance0 && distance <= this.chainDistance1;
214007
214031
  }
214032
+ // Return a quick distance to the curve. This may be SMALLER than true distance but may
214033
+ // not be larger.
214034
+ quickMinDistanceToChildCurve(spacePoint) {
214035
+ if (this.range) {
214036
+ return this.range.distanceToPoint(spacePoint);
214037
+ }
214038
+ // ugh. have to do real computation ..
214039
+ const detail = this.childCurve.closestPoint(spacePoint, false);
214040
+ if (detail)
214041
+ return detail.a;
214042
+ return 0;
214043
+ }
214044
+ // Return an array with (references to) all the path fragments, sorted smallest to largest on
214045
+ // the "a" value equal to the quick min distance to the fragment
214046
+ static collectSortedQuickMinDistances(fragments, spacePoint) {
214047
+ const sortedFragments = [];
214048
+ for (const f of fragments) {
214049
+ f.a = f.quickMinDistanceToChildCurve(spacePoint);
214050
+ sortedFragments.push(f);
214051
+ }
214052
+ sortedFragments.sort((a, b) => a.a - b.a);
214053
+ return sortedFragments;
214054
+ }
214008
214055
  /**
214009
214056
  * Return true if this fragment addresses `curve` and brackets `fraction`
214010
214057
  * @param distance
@@ -214072,18 +214119,22 @@ class DistanceIndexConstructionContext {
214072
214119
  announcePointTangent(_xyz, _fraction, _tangent) { }
214073
214120
  /** Announce numPoints interpolated between point0 and point1, with associated fractions */
214074
214121
  announceSegmentInterval(cp, point0, point1, numStrokes, fraction0, fraction1) {
214122
+ const fragmentPoint0 = point0.clone();
214123
+ const fragmentPoint1 = point1.clone();
214075
214124
  let d0 = this._accumulatedDistance;
214076
214125
  if (numStrokes <= 1) {
214077
214126
  this._accumulatedDistance += point0.distance(point1);
214078
- this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp));
214127
+ this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__["Range3d"].create(fragmentPoint0, fragmentPoint1)));
214079
214128
  }
214080
214129
  else {
214081
214130
  let f1;
214082
214131
  for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
214083
214132
  f1 = _Geometry__WEBPACK_IMPORTED_MODULE_2__["Geometry"].interpolate(fraction0, i / numStrokes, fraction1);
214133
+ point0.interpolate(fraction1, point1, fragmentPoint1);
214084
214134
  d0 = this._accumulatedDistance;
214085
214135
  this._accumulatedDistance += (Math.abs(f1 - f0) * point0.distance(point1));
214086
- this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp));
214136
+ this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__["Range3d"].create(fragmentPoint0, fragmentPoint1)));
214137
+ fragmentPoint0.setFrom(fragmentPoint1);
214087
214138
  }
214088
214139
  }
214089
214140
  }
@@ -214094,7 +214145,8 @@ class DistanceIndexConstructionContext {
214094
214145
  d = cp.curveLengthBetweenFractions(f0, f1);
214095
214146
  d0 = this._accumulatedDistance;
214096
214147
  this._accumulatedDistance += d;
214097
- this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp));
214148
+ const range = cp.rangeBetweenFractions(f0, f1);
214149
+ this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, range));
214098
214150
  }
214099
214151
  }
214100
214152
  needPrimaryGeometryForStrokes() { return true; }
@@ -214132,7 +214184,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214132
214184
  */
214133
214185
  cloneTransformed(transform) {
214134
214186
  const c = this._path.clone();
214135
- if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_4__["CurveChain"] && c.tryTransformInPlace(transform))
214187
+ if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_5__["CurveChain"] && c.tryTransformInPlace(transform))
214136
214188
  return CurveChainWithDistanceIndex.createCapture(c);
214137
214189
  return undefined;
214138
214190
  }
@@ -214145,6 +214197,68 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214145
214197
  const c = this._path.clone();
214146
214198
  return CurveChainWithDistanceIndex.createCapture(c);
214147
214199
  }
214200
+ /** Return a deep clone */
214201
+ clonePartialCurve(_fractionA, _fractionB) {
214202
+ if (_fractionA === _fractionB)
214203
+ return undefined;
214204
+ let fractionA = _fractionA;
214205
+ let fractionB = _fractionB;
214206
+ const reversed = _fractionA > _fractionB;
214207
+ if (reversed) {
214208
+ fractionA = _fractionB;
214209
+ fractionB = _fractionA;
214210
+ }
214211
+ const chainDistanceA = fractionA * this._totalLength;
214212
+ const chainDistanceB = fractionB * this._totalLength;
214213
+ const newPath = _Path__WEBPACK_IMPORTED_MODULE_9__["Path"].create();
214214
+ const fragmentA = this.chainDistanceToFragment(chainDistanceA, true);
214215
+ const fragmentB = this.chainDistanceToFragment(chainDistanceB, true);
214216
+ if (!fragmentA || !fragmentB)
214217
+ return undefined;
214218
+ const childCurveIndexA = this._path.childIndex(fragmentA.childCurve);
214219
+ const childCurveIndexB = this._path.childIndex(fragmentB.childCurve);
214220
+ const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA);
214221
+ const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB);
214222
+ if (childCurveIndexA === undefined || childCurveIndexB === undefined)
214223
+ return undefined;
214224
+ // add a (possibly reversed) partial clone to newPath
214225
+ const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
214226
+ if (fractionA === fractionB)
214227
+ return false;
214228
+ let newCurve;
214229
+ if (fractionA === 0.0 && fractionB === 1.0) {
214230
+ newCurve = childCurve.clone();
214231
+ if (reversed)
214232
+ newCurve.reverseInPlace();
214233
+ }
214234
+ else {
214235
+ newCurve = reversedClone ?
214236
+ childCurve.clonePartialCurve(childFraction1, childFraction0)
214237
+ : childCurve.clonePartialCurve(childFraction0, childFraction1);
214238
+ }
214239
+ if (newCurve) {
214240
+ newPath.children.push(newCurve);
214241
+ return true;
214242
+ }
214243
+ return false;
214244
+ };
214245
+ if (fragmentA.childCurve === fragmentB.childCurve) {
214246
+ // the two distances are within the same curve.
214247
+ if (addPartialChild(fragmentA.childCurve, childFractionA, childFractionB, reversed))
214248
+ return CurveChainWithDistanceIndex.createCapture(newPath); // singleton -- children[] does not need to be reversed.
214249
+ return undefined;
214250
+ }
214251
+ addPartialChild(this._path.children[childCurveIndexA], childFractionA, 1.0, reversed);
214252
+ // at least two distinct children are impacted ....
214253
+ for (let childIndex = childCurveIndexA + 1; childIndex < childCurveIndexB; childIndex++) {
214254
+ addPartialChild(this._path.children[childIndex], 0.0, 1.0, reversed);
214255
+ }
214256
+ addPartialChild(this._path.children[childCurveIndexB], 0.0, childFractionB, reversed);
214257
+ // This reverses array entries but not orientation within each curve ...
214258
+ if (reversed)
214259
+ newPath.children.reverse();
214260
+ return CurveChainWithDistanceIndex.createCapture(newPath);
214261
+ }
214148
214262
  /** Ask if the curve is within tolerance of a plane.
214149
214263
  * @returns Returns true if the curve is completely within tolerance of the plane.
214150
214264
  */
@@ -214273,6 +214387,27 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214273
214387
  }
214274
214388
  return undefined;
214275
214389
  }
214390
+ /**
214391
+ * Resolve a fraction of the CurveChain to a PathFragment index
214392
+ * @param distance
214393
+ * @param allowExtrapolation
214394
+ */
214395
+ chainDistanceToFragmentIndex(distance, allowExtrapolation = false) {
214396
+ const numFragments = this._fragments.length;
214397
+ const fragments = this._fragments;
214398
+ if (numFragments > 0) {
214399
+ if (distance < 0.0)
214400
+ return allowExtrapolation ? 0 : undefined;
214401
+ if (distance > this._totalLength)
214402
+ return allowExtrapolation ? (numFragments - 1) : undefined;
214403
+ // humbug, linear search
214404
+ for (let i = 0; i < numFragments; i++) {
214405
+ if (fragments[i].containsChainDistance(distance))
214406
+ return i;
214407
+ }
214408
+ }
214409
+ return undefined;
214410
+ }
214276
214411
  /**
214277
214412
  * Convert distance along the chain to fraction along the chain.
214278
214413
  * @param distance distance along the chain
@@ -214431,10 +214566,32 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214431
214566
  const fragmentB = this.chainDistanceToFragment(distanceB, true);
214432
214567
  const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result);
214433
214568
  const endFraction = startFraction + (signedDistance / this._totalLength);
214434
- const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result);
214569
+ const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result);
214435
214570
  chainDetail.childDetail = childDetail;
214436
214571
  return chainDetail;
214437
214572
  }
214573
+ /**
214574
+ *
214575
+ * The returned object has
214576
+ * * numCalls = number of times closestPoint was called.
214577
+ * * numCurvesTested = number of curves tested with full closestPoint
214578
+ * * numAssigned = number of times a new minimum value was recorded
214579
+ * * numCandidate = number of curves that would be tested in worst case.
214580
+ * return an object summarizing closest point test counts
214581
+ * @param clear if true, counts are cleared after the return object is formed.
214582
+ */
214583
+ static getClosestPointTestCounts(clear = true) {
214584
+ const a = {
214585
+ numCalls: this._numCalls,
214586
+ numTested: this._numTested,
214587
+ numAssigned: this._numAssigned,
214588
+ numCandidate: this._numCandidate
214589
+ };
214590
+ if (clear) {
214591
+ this._numTested = this._numAssigned = this._numCandidate = 0;
214592
+ }
214593
+ return a;
214594
+ }
214438
214595
  /** Search for the curve point that is closest to the spacePoint.
214439
214596
  * * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which
214440
214597
  * (via a handler) determines a CurveLocation detail among the children.
@@ -214451,15 +214608,24 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214451
214608
  childDetail = this.path.children[0].closestPoint(spacePoint, extend);
214452
214609
  }
214453
214610
  else {
214454
- const extend0 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0), _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendMode"].None];
214455
- const extend1 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendMode"].None, _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1)];
214456
- for (let childIndex = 0; childIndex < numChildren; childIndex++) {
214457
- const child = this.path.children[childIndex];
214458
- const detailA = child.closestPoint(spacePoint, childIndex === 0 ? extend0 : childIndex + 1 === numChildren ? extend1 : false);
214611
+ const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
214612
+ const extend0 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0), _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendMode"].None];
214613
+ const extend1 = [_CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendMode"].None, _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1)];
214614
+ const fragment0 = this._fragments[0];
214615
+ const fragment1 = this._fragments[this._fragments.length - 1];
214616
+ CurveChainWithDistanceIndex._numCalls++;
214617
+ CurveChainWithDistanceIndex._numCandidate += sortedFragments.length;
214618
+ for (const f of sortedFragments) {
214619
+ if (f.a > aMin)
214620
+ break;
214621
+ CurveChainWithDistanceIndex._numTested++;
214622
+ const child = f.childCurve;
214623
+ const detailA = child.closestPoint(spacePoint, f === fragment0 ? extend0 : f === fragment1 ? extend1 : false);
214459
214624
  if (detailA && detailA.a < aMin) {
214460
214625
  aMin = detailA.a;
214461
- childDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(detailA.curve, detailA.fraction, detailA.point, childDetail);
214626
+ childDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(detailA.curve, detailA.fraction, detailA.point, childDetail);
214462
214627
  childDetail.a = detailA.a;
214628
+ CurveChainWithDistanceIndex._numAssigned++;
214463
214629
  }
214464
214630
  }
214465
214631
  }
@@ -214469,7 +214635,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214469
214635
  if (fragment) {
214470
214636
  const chainDistance = fragment.childFractionTChainDistance(childDetail.fraction);
214471
214637
  const chainFraction = this.chainDistanceToChainFraction(chainDistance);
214472
- const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(this, chainFraction, childDetail.point);
214638
+ const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(this, chainFraction, childDetail.point);
214473
214639
  chainDetail.childDetail = childDetail;
214474
214640
  return chainDetail;
214475
214641
  }
@@ -214481,7 +214647,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214481
214647
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
214482
214648
  */
214483
214649
  constructOffsetXY(offsetDistanceOrOptions) {
214484
- const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_7__["OffsetOptions"].create(offsetDistanceOrOptions);
214650
+ const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__["OffsetOptions"].create(offsetDistanceOrOptions);
214485
214651
  const offsets = [];
214486
214652
  for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
214487
214653
  const offset = prim.constructOffsetXY(options);
@@ -214495,6 +214661,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
214495
214661
  return offsets;
214496
214662
  }
214497
214663
  }
214664
+ CurveChainWithDistanceIndex._numCalls = 0;
214665
+ CurveChainWithDistanceIndex._numTested = 0;
214666
+ CurveChainWithDistanceIndex._numAssigned = 0;
214667
+ CurveChainWithDistanceIndex._numCandidate = 0;
214498
214668
 
214499
214669
 
214500
214670
  /***/ }),
@@ -214765,6 +214935,14 @@ class CurveChain extends CurveCollection {
214765
214935
  curve.reverseInPlace();
214766
214936
  this._curves.reverse();
214767
214937
  }
214938
+ /** Return the index where target is found in the array of children */
214939
+ childIndex(target) {
214940
+ for (let i = 0; i < this._curves.length; i++) {
214941
+ if (this._curves[i] === target)
214942
+ return i;
214943
+ }
214944
+ return undefined;
214945
+ }
214768
214946
  /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive.
214769
214947
  */
214770
214948
  primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index, fraction, cyclic = false, result) {
@@ -218375,6 +218553,8 @@ __webpack_require__.r(__webpack_exports__);
218375
218553
  /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
218376
218554
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
218377
218555
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
218556
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
218557
+
218378
218558
 
218379
218559
 
218380
218560
 
@@ -218505,6 +218685,70 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_11__["Geome
218505
218685
  this.emitStrokableParts(context);
218506
218686
  return Math.abs(context.getSum());
218507
218687
  }
218688
+ /**
218689
+ * Returns a (high accuracy) range of the curve between fractional positions
218690
+ * * Default implementation returns teh range of the curve from clonePartialCurve
218691
+ */
218692
+ rangeBetweenFractions(fraction0, fraction1, transform) {
218693
+ return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);
218694
+ }
218695
+ /**
218696
+ * Returns a (high accuracy) range of the curve between fractional positions
218697
+ * * Default implementation returns teh range of the curve from clonePartialCurve
218698
+ */
218699
+ rangeBetweenFractionsByClone(fraction0, fraction1, transform) {
218700
+ if (fraction0 === fraction1)
218701
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].create(this.fractionToPoint(fraction0));
218702
+ const fragment = this.clonePartialCurve(fraction0, fraction1);
218703
+ if (fragment)
218704
+ return fragment.range(transform);
218705
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].createNull();
218706
+ }
218707
+ /**
218708
+ * Returns an approximate range based on a fixed number of evaluations
218709
+ * * Default implementation returns a range determined by evaluating a specified number of points on the curve.
218710
+ * * Optional evaluate again at interval midpoints and extrapolate any increase
218711
+ * * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So extrapolationFactor
218712
+ * of 1/3 gets speculatively moves closer to the tight range, and larger multipliers increase confidence in being safely larger.
218713
+ * @param fraction0 start fraction for evaluation
218714
+ * @param fraction1 end fraction for evaluation
218715
+ * @param count number of points to evaluate
218716
+ * @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier to any increase in size.
218717
+ */
218718
+ rangeBetweenFractionsByCount(fraction0, fraction1, count, transform, extrapolationFactor = 0.0) {
218719
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__["Range3d"].createNull();
218720
+ const workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__["Point3d"].create();
218721
+ range.extendPoint(this.startPoint(workPoint));
218722
+ range.extendPoint(this.endPoint(workPoint));
218723
+ // Evaluate at count fractions (fraction0 + i * fractionStep)
218724
+ const evaluateSteps = (fractionA, fractionStep, countA) => {
218725
+ let f = fractionA;
218726
+ for (let i = 0; i < countA; i++, f += fractionStep) {
218727
+ this.fractionToPoint(f, workPoint);
218728
+ if (transform)
218729
+ range.extendTransformedPoint(transform, workPoint);
218730
+ else
218731
+ range.extendPoint(workPoint);
218732
+ }
218733
+ };
218734
+ const interiorCount = count - 2;
218735
+ if (interiorCount > 0) {
218736
+ const localFraction0 = 1.0 / (interiorCount + 1);
218737
+ const globalFractionStep = localFraction0 * (fraction1 - fraction0);
218738
+ evaluateSteps(fraction0 + globalFractionStep, globalFractionStep, interiorCount);
218739
+ }
218740
+ if (extrapolationFactor > 0.0) {
218741
+ // Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer excess value.
218742
+ // same interior step, but shift to interval midpoints:.
218743
+ const baseRange = range.clone();
218744
+ const interiorCount1 = interiorCount + 1;
218745
+ const localFraction0 = 0.5 / interiorCount1; // we only evaluate at new midpoints.
218746
+ const globalFractionStep = 2 * localFraction0 * (fraction1 - fraction0); // same as above, but avoids special logic for interiorCount = 0
218747
+ evaluateSteps(fraction0 + globalFractionStep * 0.5, globalFractionStep, interiorCount1);
218748
+ range.extendWhenLarger(baseRange, extrapolationFactor);
218749
+ }
218750
+ return range;
218751
+ }
218508
218752
  /**
218509
218753
  *
218510
218754
  * * Run an integration (with a default gaussian quadrature) with a fixed fractional step
@@ -219489,12 +219733,13 @@ __webpack_require__.r(__webpack_exports__);
219489
219733
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
219490
219734
  /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
219491
219735
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
219492
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
219493
- /* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
219494
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
219495
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
219496
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
219497
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
219736
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
219737
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
219738
+ /* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
219739
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
219740
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
219741
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
219742
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
219498
219743
  /*---------------------------------------------------------------------------------------------
219499
219744
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
219500
219745
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -219508,6 +219753,7 @@ __webpack_require__.r(__webpack_exports__);
219508
219753
 
219509
219754
 
219510
219755
 
219756
+
219511
219757
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
219512
219758
  /**
219513
219759
  * A LineSegment3d is:
@@ -219523,7 +219769,7 @@ __webpack_require__.r(__webpack_exports__);
219523
219769
  * ```
219524
219770
  * @public
219525
219771
  */
219526
- class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurvePrimitive"] {
219772
+ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__["CurvePrimitive"] {
219527
219773
  /**
219528
219774
  * CAPTURE point references as a `LineSegment3d`
219529
219775
  * @param point0
@@ -219574,7 +219820,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
219574
219820
  }
219575
219821
  /** Return the point and derivative vector at fractional position along the line segment. */
219576
219822
  fractionToPointAndDerivative(fraction, result) {
219577
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__["Ray3d"].createZero();
219823
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_4__["Ray3d"].createZero();
219578
219824
  result.direction.setStartEnd(this._point0, this._point1);
219579
219825
  this._point0.interpolate(fraction, this._point1, result.origin);
219580
219826
  return result;
@@ -219660,8 +219906,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
219660
219906
  */
219661
219907
  closestPoint(spacePoint, extend, result) {
219662
219908
  let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);
219663
- fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__["CurveExtendOptions"].correctFraction(extend, fraction);
219664
- result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].create(this, result);
219909
+ fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_6__["CurveExtendOptions"].correctFraction(extend, fraction);
219910
+ result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].create(this, result);
219665
219911
  // remark: This can be done by result.setFP (fraction, thePoint, undefined, a)
219666
219912
  // but that creates a temporary point.
219667
219913
  result.fraction = fraction;
@@ -219693,12 +219939,12 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
219693
219939
  appendPlaneIntersectionPoints(plane, result) {
219694
219940
  const h0 = plane.altitude(this._point0);
219695
219941
  const h1 = plane.altitude(this._point1);
219696
- const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_4__["Order2Bezier"].solveCoffs(h0, h1);
219942
+ const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_5__["Order2Bezier"].solveCoffs(h0, h1);
219697
219943
  let numIntersection = 0;
219698
219944
  if (fraction !== undefined) {
219699
219945
  numIntersection++;
219700
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveLocationDetail"].createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
219701
- detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__["CurveIntervalRole"].isolated;
219946
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveLocationDetail"].createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
219947
+ detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__["CurveIntervalRole"].isolated;
219702
219948
  result.push(detail);
219703
219949
  }
219704
219950
  return numIntersection;
@@ -219809,6 +220055,26 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
219809
220055
  clonePartialCurve(fractionA, fractionB) {
219810
220056
  return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));
219811
220057
  }
220058
+ /**
220059
+ * Returns a (high accuracy) range of the curve between fractional positions
220060
+ * * Default implementation returns teh range of the curve from clonePartialCurve
220061
+ */
220062
+ rangeBetweenFractions(fraction0, fraction1, transform) {
220063
+ // (This is cheap -- don't bother testing for fraction0===fraction1)
220064
+ if (!transform) {
220065
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__["Range3d"].create();
220066
+ range.extendInterpolated(this._point0, fraction0, this._point1);
220067
+ range.extendInterpolated(this._point0, fraction1, this._point1);
220068
+ return range;
220069
+ }
220070
+ const point0 = this.fractionToPoint(fraction0);
220071
+ const point1 = this.fractionToPoint(fraction1);
220072
+ if (transform) {
220073
+ transform.multiplyPoint3d(point0, point0);
220074
+ transform.multiplyPoint3d(point1, point1);
220075
+ }
220076
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__["Range3d"].create(point0, point1);
220077
+ }
219812
220078
  /**
219813
220079
  * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
219814
220080
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
@@ -219817,7 +220083,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__["CurveP
219817
220083
  const offsetVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__["Vector3d"].createStartEnd(this._point0, this._point1);
219818
220084
  if (offsetVec.normalizeInPlace()) {
219819
220085
  offsetVec.rotate90CCWXY(offsetVec);
219820
- const offsetDist = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_8__["OffsetOptions"].getOffsetDistance(offsetDistanceOrOptions);
220086
+ const offsetDist = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_9__["OffsetOptions"].getOffsetDistance(offsetDistanceOrOptions);
219821
220087
  return LineSegment3d.create(this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist));
219822
220088
  }
219823
220089
  return undefined;
@@ -219847,14 +220113,16 @@ __webpack_require__.r(__webpack_exports__);
219847
220113
  /* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
219848
220114
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
219849
220115
  /* harmony import */ var _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
219850
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
219851
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
219852
- /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
219853
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
219854
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
219855
- /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
219856
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
219857
- /* harmony import */ var _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
220116
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
220117
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
220118
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
220119
+ /* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
220120
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
220121
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
220122
+ /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
220123
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
220124
+ /* harmony import */ var _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
220125
+
219858
220126
 
219859
220127
 
219860
220128
 
@@ -219914,7 +220182,7 @@ function accumulateGoodUnitPerpendicular(points, vectorA, baseIndex, stepDirecti
219914
220182
  * * Use `moveSignedDistanceFromFraction` to do true-length evaluations.
219915
220183
  * @public
219916
220184
  */
219917
- class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"] {
220185
+ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"] {
219918
220186
  constructor(points) {
219919
220187
  super();
219920
220188
  /** String name for schema properties */
@@ -220331,7 +220599,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220331
220599
  * @param result optional result
220332
220600
  */
220333
220601
  fractionToPointAndDerivative(fraction, result) {
220334
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
220602
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
220335
220603
  const n = this._points.length;
220336
220604
  if (n <= 1) {
220337
220605
  result.direction.setZero();
@@ -220344,21 +220612,21 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220344
220612
  const numSegment = n - 1;
220345
220613
  const df = 1.0 / numSegment;
220346
220614
  if (fraction <= df) {
220347
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
220615
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
220348
220616
  this._points.interpolate(0, fraction / df, 1, result.origin);
220349
220617
  this._points.vectorIndexIndex(0, 1, result.direction);
220350
220618
  result.direction.scaleInPlace(1.0 / df);
220351
220619
  return result;
220352
220620
  }
220353
220621
  if (fraction + df >= 1.0) {
220354
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
220622
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
220355
220623
  this._points.interpolate(n - 2, 1.0 - (1.0 - fraction) / df, n - 1, result.origin);
220356
220624
  this._points.vectorIndexIndex(n - 2, n - 1, result.direction);
220357
220625
  result.direction.scaleInPlace(1.0 / df);
220358
220626
  return result;
220359
220627
  }
220360
220628
  /* true interior point */
220361
- result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createZero();
220629
+ result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createZero();
220362
220630
  const index0 = Math.floor(fraction / df);
220363
220631
  const localFraction = (fraction - index0 * df) / df;
220364
220632
  this._points.interpolate(index0, localFraction, index0 + 1, result.origin);
@@ -220388,11 +220656,11 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220388
220656
  const n = this._points.length;
220389
220657
  if (n <= 1) {
220390
220658
  if (n === 1)
220391
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createTranslation(this._points.getPoint3dAtUncheckedPointIndex(0), result);
220392
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createIdentity(result);
220659
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createTranslation(this._points.getPoint3dAtUncheckedPointIndex(0), result);
220660
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createIdentity(result);
220393
220661
  }
220394
220662
  if (n === 2)
220395
- 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));
220663
+ 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));
220396
220664
  /** 3 or more points. */
220397
220665
  const numSegment = n - 1;
220398
220666
  const df = 1.0 / numSegment;
@@ -220427,8 +220695,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220427
220695
  }
220428
220696
  const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_5__["Matrix3d"].createRigidFromColumns(normal, vectorA, _Geometry__WEBPACK_IMPORTED_MODULE_0__["AxisOrder"].ZXY);
220429
220697
  if (matrix)
220430
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createOriginAndMatrix(origin, matrix, result);
220431
- return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__["Transform"].createTranslation(origin, result);
220698
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createOriginAndMatrix(origin, matrix, result);
220699
+ return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__["Transform"].createTranslation(origin, result);
220432
220700
  }
220433
220701
  /** evaluate the start point of the linestring. */
220434
220702
  startPoint() {
@@ -220513,6 +220781,33 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220513
220781
  return sum;
220514
220782
  }
220515
220783
  }
220784
+ /** Compute the range of points between fractional positions on the linestring. */
220785
+ rangeBetweenFractions(fraction0, fraction1, transform) {
220786
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__["Range3d"].create();
220787
+ if (this.points.length < 1)
220788
+ return range;
220789
+ if (fraction1 < fraction0)
220790
+ return this.rangeBetweenFractions(fraction1, fraction0, transform);
220791
+ const numSegments = this._points.length - 1;
220792
+ const scaledFraction0 = fraction0 * numSegments;
220793
+ const index0 = Math.max(0, Math.floor(scaledFraction0));
220794
+ const localFraction0 = scaledFraction0 - index0;
220795
+ const workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
220796
+ this._points.interpolate(index0, localFraction0, index0 + 1, workPoint);
220797
+ range.extendPoint(workPoint, transform);
220798
+ if (fraction1 === fraction0)
220799
+ return range; // 1-point range
220800
+ const scaledFraction1 = fraction1 * numSegments;
220801
+ const index1 = Math.min(Math.floor(scaledFraction1), numSegments - 1);
220802
+ const localFraction1 = scaledFraction1 - index1;
220803
+ this._points.interpolate(index1, localFraction1, index1 + 1, workPoint);
220804
+ range.extendPoint(workPoint, transform);
220805
+ for (let i = index0 + 1; i <= index1; i++) {
220806
+ this._points.getPoint3dAtUncheckedPointIndex(i, workPoint);
220807
+ range.extendPoint(workPoint, transform);
220808
+ }
220809
+ return range;
220810
+ }
220516
220811
  /**
220517
220812
  * * Implementation of `CurvePrimitive.moveSignedDistanceFromFraction`. (see comments there!)
220518
220813
  * * Find the segment that contains the start fraction
@@ -220536,12 +220831,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220536
220831
  leftPointIndex++;
220537
220832
  this._points.getPoint3dAtCheckedPointIndex(leftPointIndex, point1);
220538
220833
  if (context.announcePoint(point1, leftPointIndex / numSegments))
220539
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success, result);
220834
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success, result);
220540
220835
  }
220541
220836
  // fall through for extrapolation from final segment
220542
220837
  if (allowExtension)
220543
220838
  context.announceExtrapolation(this._points, numSegments - 1, numSegments, (numSegments - 1) / numSegments, 1.0);
220544
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, context.distanceStatus(), result);
220839
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, context.distanceStatus(), result);
220545
220840
  }
220546
220841
  else { // (moving backwards)
220547
220842
  if (localFraction <= 0.0)
@@ -220549,12 +220844,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220549
220844
  for (; leftPointIndex >= 0; leftPointIndex--) {
220550
220845
  this._points.getPoint3dAtCheckedPointIndex(leftPointIndex, point1);
220551
220846
  if (context.announcePoint(point1, leftPointIndex / numSegments))
220552
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success, result);
220847
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, signedDistance, _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success, result);
220553
220848
  }
220554
220849
  // fall through for backward extrapolation from initial segment
220555
220850
  if (allowExtension)
220556
220851
  context.announceExtrapolation(this._points, 1, 0, 1.0 / numSegments, 0.0);
220557
- return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, -context.distance0, context.distanceStatus(), result);
220852
+ return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, -context.distance0, context.distanceStatus(), result);
220558
220853
  }
220559
220854
  }
220560
220855
  /** sum lengths of segments in the linestring. (This is a true length.) */
@@ -220578,9 +220873,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220578
220873
  }
220579
220874
  /** Find the point on the linestring (including its segment interiors) that is closest to spacePoint. */
220580
220875
  closestPoint(spacePoint, extend, result) {
220581
- result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].create(this, result);
220582
- const extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0);
220583
- const extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_11__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1);
220876
+ result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].create(this, result);
220877
+ const extend0 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0);
220878
+ const extend1 = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_12__["CurveExtendOptions"].resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1);
220584
220879
  const numPoints = this._points.length;
220585
220880
  if (numPoints > 0) {
220586
220881
  const lastIndex = numPoints - 1;
@@ -220618,18 +220913,18 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220618
220913
  * return the incremented counter.
220619
220914
  */
220620
220915
  static pushVertexHit(result, counter, cp, fraction, point) {
220621
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPoint(cp, fraction, point);
220916
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPoint(cp, fraction, point);
220622
220917
  result.push(detail);
220623
220918
  if (counter === 0) {
220624
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].isolatedAtVertex);
220919
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].isolatedAtVertex);
220625
220920
  }
220626
220921
  else if (counter === 1) { // last entry must be isolatedAtVertex !!!
220627
- result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalStart);
220628
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalEnd);
220922
+ result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalStart);
220923
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalEnd);
220629
220924
  }
220630
220925
  else {
220631
- result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalInterior);
220632
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].intervalEnd);
220926
+ result[result.length - 2].setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalInterior);
220927
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].intervalEnd);
220633
220928
  }
220634
220929
  }
220635
220930
  /** find intersections with a plane.
@@ -220659,8 +220954,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220659
220954
  if (hA * hB < 0.0) { // at point0, hA=0 will keep us out of here . ..
220660
220955
  segmentFraction = hA / (hA - hB); // this division is safe because the signs are different.
220661
220956
  pointA.interpolate(segmentFraction, pointB, pointC);
220662
- const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveLocationDetail"].createCurveFractionPoint(this, (i - 1 + segmentFraction) / divisor, pointC);
220663
- detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveIntervalRole"].isolated);
220957
+ const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveLocationDetail"].createCurveFractionPoint(this, (i - 1 + segmentFraction) / divisor, pointC);
220958
+ detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveIntervalRole"].isolated);
220664
220959
  result.push(detail);
220665
220960
  numConsecutiveZero = 0;
220666
220961
  }
@@ -220870,13 +221165,13 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
220870
221165
  computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
220871
221166
  const numPoints = this._points.length;
220872
221167
  const applyOptions = options !== undefined && options.hasMaxEdgeLength;
220873
- const myData = _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_16__["StrokeCountMap"].createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);
221168
+ const myData = _Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_17__["StrokeCountMap"].createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);
220874
221169
  for (let i = 1; i < numPoints; i++) {
220875
221170
  const segmentLength = this._points.distanceIndexIndex(i - 1, i);
220876
221171
  const numStrokeOnSegment = applyOptions ? options.applyMaxEdgeLength(1, segmentLength) : 1;
220877
221172
  myData.addToCountAndLength(numStrokeOnSegment, segmentLength);
220878
221173
  }
220879
- _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"].installStrokeCountMap(this, myData, parentStrokeMap);
221174
+ _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"].installStrokeCountMap(this, myData, parentStrokeMap);
220880
221175
  }
220881
221176
  /** Second step of double dispatch: call `handler.handleLineString3d(this)` */
220882
221177
  dispatchToGeometryHandler(handler) {
@@ -221000,7 +221295,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
221000
221295
  /** Return (if possible) a specific segment of the linestring */
221001
221296
  getIndexedSegment(index) {
221002
221297
  if (index >= 0 && index + 1 < this._points.length)
221003
- return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__["LineSegment3d"].create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
221298
+ return _LineSegment3d__WEBPACK_IMPORTED_MODULE_16__["LineSegment3d"].create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
221004
221299
  return undefined;
221005
221300
  }
221006
221301
  /**
@@ -221087,12 +221382,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
221087
221382
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
221088
221383
  */
221089
221384
  constructOffsetXY(offsetDistanceOrOptions) {
221090
- const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_14__["OffsetOptions"].create(offsetDistanceOrOptions);
221385
+ const options = _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_15__["OffsetOptions"].create(offsetDistanceOrOptions);
221091
221386
  const offsets = [];
221092
221387
  for (const seg of this.collectCurvePrimitives(undefined, true, true)) {
221093
221388
  const offset = seg.constructOffsetXY(options);
221094
221389
  if (offset !== undefined) {
221095
- if (offset instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurvePrimitive"])
221390
+ if (offset instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_14__["CurvePrimitive"])
221096
221391
  offsets.push(offset);
221097
221392
  else if (Array.isArray(offset))
221098
221393
  offset.forEach((cp) => offsets.push(cp));
@@ -221104,7 +221399,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_13__["CurveP
221104
221399
  LineString3d._workPointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
221105
221400
  LineString3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
221106
221401
  LineString3d._workPointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create();
221107
- LineString3d._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_9__["Ray3d"].createXAxis();
221402
+ LineString3d._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_10__["Ray3d"].createXAxis();
221108
221403
  LineString3d._indexPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__["Point3d"].create(); // private point for indexAndFractionToPoint.
221109
221404
  /** An AnnotatedLineString3d is a linestring with additional surface-related data attached to each point
221110
221405
  * * This is useful in facet construction.
@@ -221126,7 +221421,7 @@ class MoveByDistanceContext {
221126
221421
  // Return CurveSearchStatus indicating whether the accumulated distance has reached the target.
221127
221422
  distanceStatus() {
221128
221423
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__["Geometry"].isSameCoordinate(this.distance0, this.targetDistance) ?
221129
- _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].success : _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__["CurveSearchStatus"].stoppedAtBoundary;
221424
+ _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].success : _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_13__["CurveSearchStatus"].stoppedAtBoundary;
221130
221425
  }
221131
221426
  /**
221132
221427
  * Announce next point on the polyline.
@@ -227559,7 +227854,7 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
227559
227854
  * @param fraction0 start fraction
227560
227855
  * @param fraction1 end fraction
227561
227856
  */
227562
- computeStrokes(strokes, fractionA, fractionB, numInterval) {
227857
+ computeStrokes(strokes, fractionA, fractionB, numInterval, applyLocalToWorld = true) {
227563
227858
  if (numInterval < 1)
227564
227859
  numInterval = 1;
227565
227860
  strokes.clear();
@@ -227573,6 +227868,8 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
227573
227868
  strokes.packedPoints.pushXYZ(this._evaluator.fractionToX(fraction), this._evaluator.fractionToY(fraction), 0);
227574
227869
  distances.pushXY(fraction, nominalDistanceAlong); // the second distance will be updated below
227575
227870
  }
227871
+ if (applyLocalToWorld)
227872
+ strokes.tryTransformInPlace(this._localToWorld);
227576
227873
  let fraction0 = distances.getXAtUncheckedPointIndex(0);
227577
227874
  let trueDistance0 = distances.getYAtUncheckedPointIndex(0); // whatever was assigned as start distance is fine
227578
227875
  let trueDistance1, fraction1;
@@ -227825,9 +228122,9 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
227825
228122
  return true;
227826
228123
  }
227827
228124
  /** Return the spiral start point. */
227828
- startPoint() { return this.localToWorld.multiplyPoint3d(this.activeStrokes.startPoint()); }
228125
+ startPoint() { return this.activeStrokes.startPoint(); }
227829
228126
  /** return the spiral end point. */
227830
- endPoint() { return this.localToWorld.multiplyPoint3d(this.activeStrokes.endPoint()); }
228127
+ endPoint() { return this.activeStrokes.endPoint(); }
227831
228128
  /** test if the local to world transform places the spiral xy plane into `plane` */
227832
228129
  isInPlane(plane) {
227833
228130
  return plane.isPointInPlane(this.localToWorld.origin)
@@ -227929,10 +228226,6 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_8__["T
227929
228226
  dispatchToGeometryHandler(handler) {
227930
228227
  return handler.handleTransitionSpiral(this);
227931
228228
  }
227932
- /** extend the range by the strokes of the spiral */
227933
- extendRange(rangeToExtend, transform) {
227934
- this.activeStrokes.extendRange(rangeToExtend, transform);
227935
- }
227936
228229
  /** compare various coordinate quantities */
227937
228230
  isAlmostEqual(other) {
227938
228231
  if (other instanceof DirectSpiral3d) {
@@ -228323,10 +228616,6 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_0_
228323
228616
  dispatchToGeometryHandler(handler) {
228324
228617
  return handler.handleTransitionSpiral(this);
228325
228618
  }
228326
- /** extend the range by the strokes of the spiral */
228327
- extendRange(rangeToExtend, transform) {
228328
- this.activeStrokes.extendRange(rangeToExtend, transform);
228329
- }
228330
228619
  /** compare various coordinate quantities */
228331
228620
  isAlmostEqual(other) {
228332
228621
  if (other instanceof IntegratedSpiral3d) {
@@ -228933,6 +229222,7 @@ __webpack_require__.r(__webpack_exports__);
228933
229222
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
228934
229223
  /* harmony import */ var _internalContexts_CurveOffsetXYHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internalContexts/CurveOffsetXYHandler */ "../../core/geometry/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js");
228935
229224
  /* harmony import */ var _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internalContexts/PolygonOffsetContext */ "../../core/geometry/lib/esm/curve/internalContexts/PolygonOffsetContext.js");
229225
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
228936
229226
  /*---------------------------------------------------------------------------------------------
228937
229227
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
228938
229228
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -228946,6 +229236,7 @@ __webpack_require__.r(__webpack_exports__);
228946
229236
 
228947
229237
 
228948
229238
 
229239
+
228949
229240
  /**
228950
229241
  * TransitionSpiral3d is a base class for multiple variants of spirals.
228951
229242
  * * The menagerie of spiral types have 2 broad categories:
@@ -229066,6 +229357,22 @@ class TransitionSpiral3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__["C
229066
229357
  this.emitStrokableParts(handler, options.strokeOptions);
229067
229358
  return handler.claimResult();
229068
229359
  }
229360
+ /** extend the range by the strokes of the spiral */
229361
+ extendRange(rangeToExtend, transform) {
229362
+ const myRange = this.rangeBetweenFractions(0.0, 1.0, transform);
229363
+ rangeToExtend.extendRange(myRange);
229364
+ }
229365
+ /** return the range of spiral between fractions of the activeStrokes.
229366
+ * * Use activeStrokes point count times interval factor for initial evaluation count, but do at least 5
229367
+ */
229368
+ rangeBetweenFractions(fractionA, fractionB, transform) {
229369
+ const strokes = this.activeStrokes;
229370
+ if (undefined === strokes)
229371
+ return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__["Range3d"].createNull();
229372
+ let count = Math.ceil(strokes.numPoints() * Math.abs(fractionB - fractionA));
229373
+ count = _Geometry__WEBPACK_IMPORTED_MODULE_3__["Geometry"].clamp(5, count, 30);
229374
+ return this.rangeBetweenFractionsByCount(fractionA, fractionB, count, transform, 0.5);
229375
+ }
229069
229376
  }
229070
229377
 
229071
229378
 
@@ -242708,6 +243015,14 @@ class RangeBase {
242708
243015
  return x - high;
242709
243016
  return 0.0;
242710
243017
  }
243018
+ /**
243019
+ * if a > 0, return (extrapolationFactor * a); otherwise return defaultValue
243020
+ * @param q
243021
+ * @param factor multiplier for positive q values.
243022
+ */
243023
+ static multiplyIfPositive(q, factor, defaultValue = 0.0) {
243024
+ return q > 0 ? factor * q : defaultValue;
243025
+ }
242711
243026
  }
242712
243027
  /** Number considered impossibly large possibly for a coordinate in a range. */
242713
243028
  RangeBase._EXTREME_POSITIVE = 1.0e200;
@@ -243243,6 +243558,17 @@ class Range3d extends RangeBase {
243243
243558
  if (z > this.high.z)
243244
243559
  this.high.z = z;
243245
243560
  }
243561
+ /** Expand this range by a point interpolated between given points. */
243562
+ extendInterpolated(xyz0, fraction, xyz1) {
243563
+ if (fraction < 0.5) {
243564
+ this.extendXYZ(xyz0.x + fraction * (xyz1.x - xyz0.x), xyz0.y + fraction * (xyz1.y - xyz0.y), xyz0.z + fraction * (xyz1.z - xyz0.z));
243565
+ }
243566
+ else {
243567
+ // use reversed formulas for best accuracy at fraction=1.0
243568
+ const g = 1.0 - fraction;
243569
+ this.extendXYZ(xyz1.x + g * (xyz0.x - xyz1.x), xyz1.y + g * (xyz0.y - xyz1.y), xyz1.z + g * (xyz0.z - xyz1.z));
243570
+ }
243571
+ }
243246
243572
  /** Expand this range by distances a in only the x direction. */
243247
243573
  extendXOnly(x) {
243248
243574
  if (x < this.low.x)
@@ -243298,6 +243624,19 @@ class Range3d extends RangeBase {
243298
243624
  this.extendXYZ(other.high.x, other.high.y, other.high.z);
243299
243625
  }
243300
243626
  }
243627
+ /** In each direction look at the difference between this range limit and that of interiorRange.
243628
+ * * If this range is larger, expand it by extrapolationFactor.
243629
+ */
243630
+ extendWhenLarger(other, extrapolationFactor) {
243631
+ if (!Range3d.isNull(other) && !Range3d.isNull(this)) {
243632
+ this.high.x += RangeBase.multiplyIfPositive(this.high.x - other.high.x, extrapolationFactor);
243633
+ this.high.y += RangeBase.multiplyIfPositive(this.high.y - other.high.y, extrapolationFactor);
243634
+ this.high.z += RangeBase.multiplyIfPositive(this.high.z - other.high.z, extrapolationFactor);
243635
+ this.low.x -= RangeBase.multiplyIfPositive(other.low.x - this.low.x, extrapolationFactor);
243636
+ this.low.y -= RangeBase.multiplyIfPositive(other.low.y - this.low.y, extrapolationFactor);
243637
+ this.low.z -= RangeBase.multiplyIfPositive(other.low.z - this.low.z, extrapolationFactor);
243638
+ }
243639
+ }
243301
243640
  /** Return the intersection of ranges. */
243302
243641
  intersect(other, result) {
243303
243642
  if (!this.intersectsRange(other))