@itwin/ecschema-rpcinterface-tests 3.5.0-dev.52 → 3.5.0-dev.57

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.
@@ -179494,6 +179494,7 @@ class ArcGisUtilities {
179494
179494
  * @param latitude Latitude in degrees to use to compute scales (i.e 0 for Equator)
179495
179495
  * @param tileSize Size of a tile in pixels (i.e 256)
179496
179496
  * @param screenDpi Monitor resolution in dots per inch (i.e. typically 96dpi is used by Google Maps)
179497
+ *
179497
179498
  * @returns An array containing resolution and scale values for each requested zoom level
179498
179499
  */
179499
179500
  static computeZoomLevelsScales(startZoom = 0, endZoom = 20, latitude = 0, tileSize = 256, screenDpi = 96) {
@@ -179520,20 +179521,20 @@ class ArcGisUtilities {
179520
179521
  * @param maxScale Maximum scale value that needs to be matched to a LOD level
179521
179522
  * @returns minLod: LOD value matching minScale, maxLod: LOD value matching maxScale
179522
179523
  */
179523
- static getZoomLevelsScales(defaultMaxLod, tileSize, minScale, maxScale) {
179524
+ static getZoomLevelsScales(defaultMaxLod, tileSize, minScale, maxScale, tolerance = 0) {
179524
179525
  let minLod, maxLod;
179525
179526
  const zoomScales = ArcGisUtilities.computeZoomLevelsScales(0, defaultMaxLod, 0 /* latitude 0 = Equator*/, tileSize);
179526
179527
  if (zoomScales.length > 0) {
179527
179528
  if (minScale) {
179528
179529
  minLod = 0;
179529
179530
  // We are looking for the largest scale value with a scale value smaller than minScale
179530
- for (; minLod < zoomScales.length && zoomScales[minLod].scale > minScale; minLod++)
179531
+ for (; minLod < zoomScales.length && (zoomScales[minLod].scale > minScale && Math.abs(zoomScales[minLod].scale - minScale) > tolerance); minLod++)
179531
179532
  ;
179532
179533
  }
179533
179534
  if (maxScale) {
179534
179535
  maxLod = defaultMaxLod;
179535
179536
  // We are looking for the smallest scale value with a value greater than maxScale
179536
- for (; maxLod >= 0 && zoomScales[maxLod].scale < maxScale; maxLod--)
179537
+ for (; maxLod >= 0 && zoomScales[maxLod].scale < maxScale && Math.abs(zoomScales[maxLod].scale - maxScale) > tolerance; maxLod--)
179537
179538
  ;
179538
179539
  }
179539
179540
  }
@@ -192915,7 +192916,7 @@ class Tool {
192915
192916
  }
192916
192917
  static getLocalizedKey(name) {
192917
192918
  const key = `tools.${this.toolId}.${name}`;
192918
- const val = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.localization.getLocalizedStringWithNamespace(this.namespace, key);
192919
+ const val = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.localization.getLocalizedString(key, { ns: this.namespace });
192919
192920
  return key === val ? undefined : val; // if translation for key doesn't exist, `translate` returns the key as the result
192920
192921
  }
192921
192922
  /**
@@ -200835,8 +200836,8 @@ __webpack_require__.r(__webpack_exports__);
200835
200836
  /* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
200836
200837
  /* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
200837
200838
  /* harmony import */ var _Bezier1dNd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Bezier1dNd */ "../../core/geometry/lib/esm/bspline/Bezier1dNd.js");
200838
- /* harmony import */ var _BezierCurve3d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./BezierCurve3d */ "../../core/geometry/lib/esm/bspline/BezierCurve3d.js");
200839
- /* harmony import */ var _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./BezierCurve3dH */ "../../core/geometry/lib/esm/bspline/BezierCurve3dH.js");
200839
+ /* harmony import */ var _BezierCurve3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./BezierCurve3d */ "../../core/geometry/lib/esm/bspline/BezierCurve3d.js");
200840
+ /* harmony import */ var _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./BezierCurve3dH */ "../../core/geometry/lib/esm/bspline/BezierCurve3dH.js");
200840
200841
  /* harmony import */ var _BSpline1dNd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BSpline1dNd */ "../../core/geometry/lib/esm/bspline/BSpline1dNd.js");
200841
200842
  /* harmony import */ var _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
200842
200843
  /* harmony import */ var _KnotVector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./KnotVector */ "../../core/geometry/lib/esm/bspline/KnotVector.js");
@@ -201160,7 +201161,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201160
201161
  }
201161
201162
  initializeWorkBezier() {
201162
201163
  if (this._workBezier === undefined)
201163
- this._workBezier = _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3dH.createOrder(this.order);
201164
+ this._workBezier = _BezierCurve3d__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3d.createOrder(this.order);
201164
201165
  return this._workBezier;
201165
201166
  }
201166
201167
  /** test of `other` is an instance of BSplineCurve3d */
@@ -201201,7 +201202,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201201
201202
  /** Create a bspline with uniform knots. */
201202
201203
  static createUniformKnots(poles, order) {
201203
201204
  const numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;
201204
- if (order < 1 || numPoles < order)
201205
+ if (order < 2 || numPoles < order)
201205
201206
  return undefined;
201206
201207
  const knots = _KnotVector__WEBPACK_IMPORTED_MODULE_3__.KnotVector.createUniformClamped(numPoles, order - 1, 0.0, 1.0);
201207
201208
  const curve = new BSplineCurve3d(numPoles, order, knots);
@@ -201223,11 +201224,32 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201223
201224
  return curve;
201224
201225
  }
201225
201226
  /** Create a smoothly closed B-spline curve with uniform knots.
201226
- * Note that the curve does not start at the first pole, and first and last poles should be distinct.
201227
+ * Note that the curve does not start at the first pole!
201227
201228
  */
201228
201229
  static createPeriodicUniformKnots(poles, order) {
201229
- const numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;
201230
- if (order < 1 || numPoles < order)
201230
+ if (order < 2)
201231
+ return undefined;
201232
+ let numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;
201233
+ const startPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__.Point3d.createZero();
201234
+ const endPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__.Point3d.createZero();
201235
+ let hasClosurePoint = false;
201236
+ do {
201237
+ if (poles instanceof Float64Array) {
201238
+ startPoint.set(poles[0], poles[1], poles[2]);
201239
+ endPoint.set(poles[3 * numPoles - 3], poles[3 * numPoles - 2], poles[3 * numPoles - 1]);
201240
+ }
201241
+ else if (poles instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_15__.GrowableXYZArray) {
201242
+ startPoint.set(poles.float64Data()[0], poles.float64Data()[1], poles.float64Data()[2]);
201243
+ endPoint.set(poles.float64Data()[3 * numPoles - 3], poles.float64Data()[3 * numPoles - 2], poles.float64Data()[3 * numPoles - 1]);
201244
+ }
201245
+ else {
201246
+ startPoint.setFromPoint3d(poles[0]);
201247
+ endPoint.setFromPoint3d(poles[numPoles - 1]);
201248
+ }
201249
+ if (hasClosurePoint = startPoint.isAlmostEqual(endPoint))
201250
+ --numPoles; // remove wraparound pole if found
201251
+ } while (hasClosurePoint && numPoles > 1);
201252
+ if (numPoles < order)
201231
201253
  return undefined;
201232
201254
  const degree = order - 1;
201233
201255
  const numIntervals = numPoles;
@@ -201248,10 +201270,10 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201248
201270
  }
201249
201271
  else {
201250
201272
  let i = 0;
201251
- for (const p of poles) {
201252
- curve._bcurve.packedData[i++] = p.x;
201253
- curve._bcurve.packedData[i++] = p.y;
201254
- curve._bcurve.packedData[i++] = p.z;
201273
+ for (let j = 0; j < numPoles; j++) {
201274
+ curve._bcurve.packedData[i++] = poles[j].x;
201275
+ curve._bcurve.packedData[i++] = poles[j].y;
201276
+ curve._bcurve.packedData[i++] = poles[j].z;
201255
201277
  }
201256
201278
  for (let j = 0; j < degree; j++) {
201257
201279
  curve._bcurve.packedData[i++] = poles[j].x;
@@ -201292,7 +201314,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201292
201314
  const numKnots = knotArray.length;
201293
201315
  // shift knots-of-interest limits for overclamped case ...
201294
201316
  const skipFirstAndLast = (numPoles + order === numKnots);
201295
- if (order < 1 || numPoles < order)
201317
+ if (order < 2 || numPoles < order)
201296
201318
  return undefined;
201297
201319
  const knots = _KnotVector__WEBPACK_IMPORTED_MODULE_3__.KnotVector.create(knotArray, order - 1, skipFirstAndLast);
201298
201320
  const curve = new BSplineCurve3d(numPoles, order, knots);
@@ -201392,7 +201414,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201392
201414
  const numSpan = this.numSpan;
201393
201415
  let numStroke = 0;
201394
201416
  for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {
201395
- const bezier = this.getSaturatedBezierSpan3dH(spanIndex, workBezier);
201417
+ const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);
201396
201418
  if (bezier)
201397
201419
  numStroke += bezier.computeStrokeCountForOptions(options);
201398
201420
  }
@@ -201409,7 +201431,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201409
201431
  const numSpan = this.numSpan;
201410
201432
  const myData = _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_19__.StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);
201411
201433
  for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {
201412
- const bezier = this.getSaturatedBezierSpan3dH(spanIndex, workBezier);
201434
+ const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);
201413
201435
  if (bezier) {
201414
201436
  const segmentLength = workBezier.curveLength();
201415
201437
  const numStrokeOnSegment = workBezier.computeStrokeCountForOptions(options);
@@ -201423,7 +201445,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201423
201445
  const workBezier = this.initializeWorkBezier();
201424
201446
  const numSpan = this.numSpan;
201425
201447
  for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {
201426
- const bezier = this.getSaturatedBezierSpan3dH(spanIndex, workBezier);
201448
+ const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);
201427
201449
  if (bezier)
201428
201450
  bezier.emitStrokes(dest, options);
201429
201451
  }
@@ -201462,8 +201484,8 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201462
201484
  if (spanIndex < 0 || spanIndex >= this.numSpan)
201463
201485
  return undefined;
201464
201486
  const order = this.order;
201465
- if (result === undefined || !(result instanceof _BezierCurve3d__WEBPACK_IMPORTED_MODULE_20__.BezierCurve3d) || result.order !== order)
201466
- result = _BezierCurve3d__WEBPACK_IMPORTED_MODULE_20__.BezierCurve3d.createOrder(order);
201487
+ if (result === undefined || !(result instanceof _BezierCurve3d__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3d) || result.order !== order)
201488
+ result = _BezierCurve3d__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3d.createOrder(order);
201467
201489
  const bezier = result;
201468
201490
  bezier.loadSpanPoles(this._bcurve.packedData, spanIndex);
201469
201491
  if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))
@@ -201479,8 +201501,8 @@ class BSplineCurve3d extends BSplineCurve3dBase {
201479
201501
  if (spanIndex < 0 || spanIndex >= this.numSpan)
201480
201502
  return undefined;
201481
201503
  const order = this.order;
201482
- if (result === undefined || !(result instanceof _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3dH) || result.order !== order)
201483
- result = _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_12__.BezierCurve3dH.createOrder(order);
201504
+ if (result === undefined || !(result instanceof _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_20__.BezierCurve3dH) || result.order !== order)
201505
+ result = _BezierCurve3dH__WEBPACK_IMPORTED_MODULE_20__.BezierCurve3dH.createOrder(order);
201484
201506
  const bezier = result;
201485
201507
  bezier.loadSpan3dPolesWithWeight(this._bcurve.packedData, spanIndex, 1.0);
201486
201508
  if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))
@@ -205091,7 +205113,10 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_4_
205091
205113
  this._options = properties;
205092
205114
  }
205093
205115
  dispatchToGeometryHandler(handler) {
205094
- return handler.handleInterpolationCurve3d(this);
205116
+ let result = handler.handleInterpolationCurve3d(this);
205117
+ if (undefined === result) // if handler doesn't specialize on interpolation curves, default to proxy
205118
+ result = this._proxyCurve.dispatchToGeometryHandler(handler);
205119
+ return result;
205095
205120
  }
205096
205121
  /**
205097
205122
  * Create an [[InterpolationCurve3d]] based on points, knots, and other properties in the [[InterpolationCurve3dProps]] or [[InterpolationCurve3dOptions]].
@@ -211886,7 +211911,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
211886
211911
  getPlaneAltitudeSineCosinePolynomial(plane, result) {
211887
211912
  if (!result)
211888
211913
  result = new _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SineCosinePolynomial(0, 0, 0);
211889
- result.set(plane.altitude(this._center), plane.altitudeXYZ(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[6]), plane.altitudeXYZ(this._matrix.coffs[1], this._matrix.coffs[4], this._matrix.coffs[7]));
211914
+ // altitude function of angle t, given plane with origin o and unit normal n:
211915
+ // A(t) = (c + u cos(t) + v sin(t)) . n = (c-o).n + u.n cos(t) + v.n sin(t)
211916
+ // Note the different functions for computing dot product against a point vs. a vector!
211917
+ result.set(plane.altitude(this._center), plane.velocityXYZ(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[6]), plane.velocityXYZ(this._matrix.coffs[1], this._matrix.coffs[4], this._matrix.coffs[7]));
211890
211918
  return result;
211891
211919
  }
211892
211920
  /**
@@ -222312,8 +222340,9 @@ class RegionOps {
222312
222340
  * @param distanceTolerance optional absolute distance tolerance
222313
222341
  */
222314
222342
  static computeXYAreaTolerance(range, distanceTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
222315
- // if A = bh and e is distance tolerance, then A' := (b+e)(h+e) = A + e(b+h+e), so A'-A = e(b+h+e).
222316
- return distanceTolerance * (range.xLength() + range.yLength() + distanceTolerance);
222343
+ // if A = bh and e is distance tolerance, then A' := (b+e/2)(h+e/2) = A + e/2(b+h+e/2), so A'-A = e/2(b+h+e/2).
222344
+ const halfDistTol = 0.5 * distanceTolerance;
222345
+ return halfDistTol * (range.xLength() + range.yLength() + halfDistTol);
222317
222346
  }
222318
222347
  /**
222319
222348
  * Return an xy area for a loop, parity region, or union region.
@@ -222917,10 +222946,10 @@ __webpack_require__.r(__webpack_exports__);
222917
222946
  /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
222918
222947
  /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
222919
222948
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
222920
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
222921
- /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
222949
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
222950
+ /* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
222922
222951
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
222923
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
222952
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
222924
222953
  /*---------------------------------------------------------------------------------------------
222925
222954
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
222926
222955
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -223354,9 +223383,8 @@ class RegionBooleanContext {
223354
223383
  const rangeB = this.groupB.range();
223355
223384
  const rangeAB = rangeA.union(rangeB);
223356
223385
  const areaTol = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYAreaTolerance(rangeAB);
223357
- const direction = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Vector3d.create(1.0, -0.12328974132467);
223358
223386
  let margin = 0.1;
223359
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), direction, this._workSegment);
223387
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__.PlaneAltitudeRangeContext.findExtremePointsInDirection(rangeAB.corners(), RegionBooleanContext._bridgeDirection, this._workSegment);
223360
223388
  if (this._workSegment)
223361
223389
  margin *= this._workSegment.point0Ref.distanceXY(this._workSegment.point1Ref); // how much further to extend each bridge ray
223362
223390
  const maxPoints = [];
@@ -223364,7 +223392,7 @@ class RegionBooleanContext {
223364
223392
  const area = _RegionOps__WEBPACK_IMPORTED_MODULE_1__.RegionOps.computeXYArea(region);
223365
223393
  if (area === undefined || Math.abs(area) < areaTol)
223366
223394
  return; // avoid bridging trivial faces
223367
- this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, direction, this._workSegment);
223395
+ this._workSegment = _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__.PlaneAltitudeRangeContext.findExtremePointsInDirection(region, RegionBooleanContext._bridgeDirection, this._workSegment);
223368
223396
  if (this._workSegment)
223369
223397
  maxPoints.push(this._workSegment.point1Ref);
223370
223398
  };
@@ -223379,8 +223407,7 @@ class RegionBooleanContext {
223379
223407
  }
223380
223408
  }
223381
223409
  }
223382
- const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createZero();
223383
- direction.normalizeInPlace();
223410
+ const ray = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_13__.Ray3d.createZero();
223384
223411
  for (const p of maxPoints) {
223385
223412
  // Make a line from...
223386
223413
  // 1) exactly the max point of the loops to
@@ -223388,8 +223415,8 @@ class RegionBooleanContext {
223388
223415
  // If p came from some inner loop this will...
223389
223416
  // 1) create a bridge from the inner loop through any containing loops (always)
223390
223417
  // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
223391
- const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.create(p, direction, ray).intersectionWithRange3d(rangeAB).high;
223392
- const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_12__.Point3d.createAdd2Scaled(p, 1.0, direction, bridgeLength);
223418
+ const bridgeLength = margin + _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_13__.Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
223419
+ const outside = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__.Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
223393
223420
  const bridgeLine = _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
223394
223421
  this.extraGeometry.addMember(bridgeLine, true);
223395
223422
  }
@@ -223547,6 +223574,7 @@ class RegionBooleanContext {
223547
223574
  return true;
223548
223575
  }
223549
223576
  }
223577
+ RegionBooleanContext._bridgeDirection = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__.Vector3d.createNormalized(1.0, -0.12328974132467); // magic unit direction to minimize vertex hits
223550
223578
  /** return xy area between a (part of a) curve and the x axis through a reference point.
223551
223579
  * If detail is undefined or does not have both start and end fractions, just do trapezoid area
223552
223580
  */
@@ -225170,16 +225198,18 @@ __webpack_require__.r(__webpack_exports__);
225170
225198
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
225171
225199
  /* harmony export */ "PlaneAltitudeRangeContext": () => (/* binding */ PlaneAltitudeRangeContext)
225172
225200
  /* harmony export */ });
225173
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
225201
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
225202
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
225174
225203
  /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
225175
- /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
225176
- /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
225177
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
225204
+ /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
225205
+ /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
225206
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
225178
225207
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
225179
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
225180
- /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
225181
- /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
225182
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
225208
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
225209
+ /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
225210
+ /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
225211
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
225212
+ /* harmony import */ var _StrokeOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
225183
225213
  /*---------------------------------------------------------------------------------------------
225184
225214
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
225185
225215
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -225194,6 +225224,8 @@ __webpack_require__.r(__webpack_exports__);
225194
225224
 
225195
225225
 
225196
225226
 
225227
+
225228
+
225197
225229
  /**
225198
225230
  * Accumulator context for searching for extrema of geometry along a plane.
225199
225231
  * @internal
@@ -225235,16 +225267,25 @@ class PlaneAltitudeRangeContext extends _geometry3d_GeometryHandler__WEBPACK_IMP
225235
225267
  handleLineString3d(lineString) {
225236
225268
  this.announcePoints(lineString.packedPoints);
225237
225269
  }
225270
+ initStrokeOptions() {
225271
+ // TODO: compute the exact extrema; until then stroke aggressively
225272
+ if (undefined === this._strokeOptions) {
225273
+ this._strokeOptions = new _StrokeOptions__WEBPACK_IMPORTED_MODULE_2__.StrokeOptions();
225274
+ this._strokeOptions.angleTol = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(1);
225275
+ }
225276
+ }
225238
225277
  handleBSplineCurve3d(bcurve) {
225239
225278
  // ugh. The point MUST be on the curve -- usual excess-range of poles is not ok.
225240
- const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create();
225241
- bcurve.emitStrokes(ls);
225279
+ this.initStrokeOptions();
225280
+ const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create();
225281
+ bcurve.emitStrokes(ls, this._strokeOptions);
225242
225282
  this.handleLineString3d(ls);
225243
225283
  }
225244
225284
  handleBSplineCurve3dH(bcurve) {
225245
225285
  // ugh. The point MUST be on the curve -- usual excess-range of poles is not ok.
225246
- const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create();
225247
- bcurve.emitStrokes(ls);
225286
+ this.initStrokeOptions();
225287
+ const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create();
225288
+ bcurve.emitStrokes(ls, this._strokeOptions);
225248
225289
  this.handleLineString3d(ls);
225249
225290
  }
225250
225291
  handleArc3d(g) {
@@ -225259,15 +225300,15 @@ class PlaneAltitudeRangeContext extends _geometry3d_GeometryHandler__WEBPACK_IMP
225259
225300
  this.announcePoint((this._workPoint = g.endPoint(this._workPoint)));
225260
225301
  }
225261
225302
  static findExtremesInDirection(geometry, direction) {
225262
- const origin = direction instanceof _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d ? direction.origin : _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.createZero();
225263
- const vector = direction instanceof _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_3__.Ray3d ? direction.direction : direction;
225264
- const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_5__.Plane3dByOriginAndUnitNormal.create(origin, vector); // vector is normalized, so altitudes are distances
225303
+ const origin = direction instanceof _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_5__.Ray3d ? direction.origin : _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero();
225304
+ const vector = direction instanceof _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_5__.Ray3d ? direction.direction : direction;
225305
+ const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_7__.Plane3dByOriginAndUnitNormal.create(origin, vector); // vector is normalized, so altitudes are distances
225265
225306
  if (plane) {
225266
225307
  const context = new PlaneAltitudeRangeContext(plane);
225267
- if (geometry instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.GeometryQuery) {
225308
+ if (geometry instanceof _GeometryQuery__WEBPACK_IMPORTED_MODULE_8__.GeometryQuery) {
225268
225309
  geometry.dispatchToGeometryHandler(context);
225269
225310
  }
225270
- else if (geometry instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_7__.GrowableXYZArray) {
225311
+ else if (geometry instanceof _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_9__.GrowableXYZArray) {
225271
225312
  context.announcePoints(geometry);
225272
225313
  }
225273
225314
  else {
@@ -225287,7 +225328,7 @@ class PlaneAltitudeRangeContext extends _geometry3d_GeometryHandler__WEBPACK_IMP
225287
225328
  static findExtremePointsInDirection(geometry, direction, lowHigh) {
225288
225329
  const context = this.findExtremesInDirection(geometry, direction);
225289
225330
  if (context && context.highPoint && context.lowPoint)
225290
- return _LineSegment3d__WEBPACK_IMPORTED_MODULE_8__.LineSegment3d.create(context.lowPoint, context.highPoint, lowHigh);
225331
+ return _LineSegment3d__WEBPACK_IMPORTED_MODULE_10__.LineSegment3d.create(context.lowPoint, context.highPoint, lowHigh);
225291
225332
  return undefined;
225292
225333
  }
225293
225334
  /** Compute altitudes for the geometry (via dispatch) over the plane defined by the given direction,
@@ -225310,8 +225351,8 @@ class PlaneAltitudeRangeContext extends _geometry3d_GeometryHandler__WEBPACK_IMP
225310
225351
  static findExtremeFractionsAlongDirection(geometry, direction, lowHigh) {
225311
225352
  const range = this.findExtremeAltitudesInDirection(geometry, direction, lowHigh);
225312
225353
  if (undefined !== range) {
225313
- const mag = (direction instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d) ? direction.magnitude() : direction.direction.magnitude();
225314
- const scaleToFraction = _Geometry__WEBPACK_IMPORTED_MODULE_9__.Geometry.conditionalDivideCoordinate(1.0, mag);
225354
+ const mag = (direction instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d) ? direction.magnitude() : direction.direction.magnitude();
225355
+ const scaleToFraction = _Geometry__WEBPACK_IMPORTED_MODULE_11__.Geometry.conditionalDivideCoordinate(1.0, mag);
225315
225356
  if (undefined !== scaleToFraction) {
225316
225357
  range.low *= scaleToFraction;
225317
225358
  range.high *= scaleToFraction;
@@ -237438,9 +237479,9 @@ __webpack_require__.r(__webpack_exports__);
237438
237479
  /** @packageDocumentation
237439
237480
  * @module CartesianGeometry
237440
237481
  */
237441
-
237442
237482
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
237443
237483
 
237484
+
237444
237485
  /**
237445
237486
  * Helper object to access members of a Point2d[] in geometric calculations.
237446
237487
  * * The collection holds only a reference to the actual array.
@@ -237460,6 +237501,7 @@ class Point2dArrayCarrier extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_
237460
237501
  }
237461
237502
  /**
237462
237503
  * Access by index, returning strongly typed Point2d
237504
+ * * This returns the xy value but NOT reference to the point in the "carried" array.
237463
237505
  * @param index index of point within the array
237464
237506
  * @param result caller-allocated destination
237465
237507
  * @returns undefined if the index is out of bounds
@@ -237579,11 +237621,20 @@ __webpack_require__.r(__webpack_exports__);
237579
237621
  * @public
237580
237622
  */
237581
237623
  class XY {
237582
- constructor(x = 0, y = 0) { this.x = x; this.y = y; }
237624
+ constructor(x = 0, y = 0) {
237625
+ this.x = x;
237626
+ this.y = y;
237627
+ }
237583
237628
  /** Set both x and y. */
237584
- set(x = 0, y = 0) { this.x = x; this.y = y; }
237629
+ set(x = 0, y = 0) {
237630
+ this.x = x;
237631
+ this.y = y;
237632
+ }
237585
237633
  /** Set both x and y to zero */
237586
- setZero() { this.x = 0; this.y = 0; }
237634
+ setZero() {
237635
+ this.x = 0;
237636
+ this.y = 0;
237637
+ }
237587
237638
  /** Set both x and y from other. */
237588
237639
  setFrom(other) {
237589
237640
  if (other) {
@@ -237596,16 +237647,30 @@ class XY {
237596
237647
  }
237597
237648
  }
237598
237649
  /** Freeze this instance so it is read-only */
237599
- freeze() { return Object.freeze(this); }
237650
+ freeze() {
237651
+ return Object.freeze(this);
237652
+ }
237600
237653
  /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */
237601
- isAlmostEqual(other, tol) { return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.x, other.x, tol) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.y, other.y, tol); }
237654
+ isAlmostEqual(other, tol) {
237655
+ return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.x, other.x, tol) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.y, other.y, tol);
237656
+ }
237602
237657
  /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */
237603
- isAlmostEqualXY(x, y, tol) { return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.x, x, tol) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.y, y, tol); }
237658
+ isAlmostEqualXY(x, y, tol) {
237659
+ return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.x, x, tol) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.y, y, tol);
237660
+ }
237604
237661
  /** return a json array `[x,y]` */
237605
- toJSON() { return [this.x, this.y]; }
237662
+ toJSON() {
237663
+ return [this.x, this.y];
237664
+ }
237606
237665
  /** return a json object `{x: 1, y:2}` */
237607
- toJSONXY() { return { x: this.x, y: this.y }; }
237608
- /** Set x and y from a JSON source such as `[1,2]` or `{x:1, y:2}` */
237666
+ toJSONXY() {
237667
+ return { x: this.x, y: this.y };
237668
+ }
237669
+ /**
237670
+ * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
237671
+ * * If no JSON input is provided, 0 would be used as default values for x and y.
237672
+ * @param json the JSON input
237673
+ * */
237609
237674
  setFromJSON(json) {
237610
237675
  if (Array.isArray(json)) {
237611
237676
  this.set(json[0] || 0, json[1] || 0);
@@ -237621,39 +237686,76 @@ class XY {
237621
237686
  distance(other) {
237622
237687
  const xDist = other.x - this.x;
237623
237688
  const yDist = other.y - this.y;
237624
- return (Math.sqrt(xDist * xDist + yDist * yDist));
237689
+ return Math.sqrt(xDist * xDist + yDist * yDist);
237625
237690
  }
237626
237691
  /** Return squared distance from this point to other */
237627
237692
  distanceSquared(other) {
237628
237693
  const xDist = other.x - this.x;
237629
237694
  const yDist = other.y - this.y;
237630
- return (xDist * xDist + yDist * yDist);
237695
+ return xDist * xDist + yDist * yDist;
237631
237696
  }
237632
237697
  /** Return the largest absolute distance between corresponding components */
237633
237698
  maxDiff(other) {
237634
237699
  return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));
237635
237700
  }
237701
+ /**
237702
+ * Return the x,y component corresponding to 0,1.
237703
+ */
237704
+ at(index) {
237705
+ if (index < 0.5)
237706
+ return this.x;
237707
+ return this.y;
237708
+ }
237709
+ /**
237710
+ * Set value at index 0 or 1.
237711
+ */
237712
+ setAt(index, value) {
237713
+ if (index < 0.5)
237714
+ this.x = value;
237715
+ else
237716
+ this.y = value;
237717
+ }
237718
+ /** Return the index (0,1) of the x,y component with largest absolute value */
237719
+ indexOfMaxAbs() {
237720
+ let index = 0;
237721
+ const a = Math.abs(this.x);
237722
+ const b = Math.abs(this.y);
237723
+ if (b > a) {
237724
+ index = 1;
237725
+ }
237726
+ return index;
237727
+ }
237636
237728
  /** returns true if the x,y components are both small by metric metric tolerance */
237637
237729
  get isAlmostZero() {
237638
237730
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.x) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.y);
237639
237731
  }
237640
237732
  /** Return the largest absolute value of any component */
237641
- maxAbs() { return Math.max(Math.abs(this.x), Math.abs(this.y)); }
237733
+ maxAbs() {
237734
+ return Math.max(Math.abs(this.x), Math.abs(this.y));
237735
+ }
237642
237736
  /** Return the magnitude of the vector */
237643
- magnitude() { return Math.sqrt(this.x * this.x + this.y * this.y); }
237737
+ magnitude() {
237738
+ return Math.sqrt(this.x * this.x + this.y * this.y);
237739
+ }
237644
237740
  /** Return the squared magnitude of the vector. */
237645
- magnitudeSquared() { return this.x * this.x + this.y * this.y; }
237741
+ magnitudeSquared() {
237742
+ return this.x * this.x + this.y * this.y;
237743
+ }
237646
237744
  /** returns true if the x,y components are exactly equal. */
237647
- isExactEqual(other) { return this.x === other.x && this.y === other.y; }
237745
+ isExactEqual(other) {
237746
+ return this.x === other.x && this.y === other.y;
237747
+ }
237648
237748
  /** returns true if x,y match `other` within metric tolerance */
237649
- isAlmostEqualMetric(other) { return this.maxDiff(other) <= _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance; }
237749
+ isAlmostEqualMetric(other, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
237750
+ return this.maxDiff(other) <= distanceTol;
237751
+ }
237650
237752
  /** Return a (full length) vector from this point to other */
237651
237753
  vectorTo(other, result) {
237652
237754
  return Vector2d.create(other.x - this.x, other.y - this.y, result);
237653
237755
  }
237654
237756
  /** Return a unit vector from this point to other */
237655
- unitVectorTo(target, result) {
237656
- return this.vectorTo(target, result).normalize(result);
237757
+ unitVectorTo(other, result) {
237758
+ return this.vectorTo(other, result).normalize(result);
237657
237759
  }
237658
237760
  /** cross product of vectors from origin to targets */
237659
237761
  static crossProductToPoints(origin, targetA, targetB) {
@@ -237665,9 +237767,13 @@ class XY {
237665
237767
  */
237666
237768
  class Point2d extends XY {
237667
237769
  /** Constructor for Point2d */
237668
- constructor(x = 0, y = 0) { super(x, y); }
237770
+ constructor(x = 0, y = 0) {
237771
+ super(x, y);
237772
+ }
237669
237773
  /** return a new Point2d with x,y coordinates from this. */
237670
- clone(result) { return Point2d.create(this.x, this.y, result); }
237774
+ clone(result) {
237775
+ return Point2d.create(this.x, this.y, result);
237776
+ }
237671
237777
  /**
237672
237778
  * Return a point (newly created unless result provided) with given x,y coordinates
237673
237779
  * @param x x coordinate
@@ -237682,8 +237788,16 @@ class Point2d extends XY {
237682
237788
  }
237683
237789
  return new Point2d(x, y);
237684
237790
  }
237685
- /** Convert JSON `[1,2]` or `{x:1, y:2}` to a Point2d instance */
237686
- static fromJSON(json) { const val = new Point2d(); val.setFromJSON(json); return val; }
237791
+ /**
237792
+ * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
237793
+ * * If no JSON input is provided, 0 would be used as default values for x and y.
237794
+ * @param json the JSON input
237795
+ * */
237796
+ static fromJSON(json) {
237797
+ const val = new Point2d();
237798
+ val.setFromJSON(json);
237799
+ return val;
237800
+ }
237687
237801
  /** Create (or optionally reuse) a Point2d from another object with fields x and y */
237688
237802
  static createFrom(xy, result) {
237689
237803
  if (xy)
@@ -237691,19 +237805,22 @@ class Point2d extends XY {
237691
237805
  return Point2d.create(0, 0, result);
237692
237806
  }
237693
237807
  /** Create a Point2d with both coordinates zero. */
237694
- static createZero(result) { return Point2d.create(0, 0, result); }
237695
- /** Starting at this point, move along vector by tangentFraction of the vector length, and to the left by leftFraction of
237696
- * the perpendicular vector length.
237808
+ static createZero(result) {
237809
+ return Point2d.create(0, 0, result);
237810
+ }
237811
+ /** Starting at this point, move along vector by tangentFraction of the vector length, and then
237812
+ * to the left by leftFraction of the perpendicular vector length.
237697
237813
  * @param tangentFraction distance to move along the vector, as a fraction of vector
237698
237814
  * @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
237815
+ * @param vector the other vector
237699
237816
  */
237700
237817
  addForwardLeft(tangentFraction, leftFraction, vector) {
237701
237818
  const dx = vector.x;
237702
237819
  const dy = vector.y;
237703
237820
  return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx);
237704
237821
  }
237705
- /** Interpolate at tangentFraction between this instance and point. Move by leftFraction along the xy perpendicular
237706
- * of the vector between the points.
237822
+ /** Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
237823
+ * along the xy perpendicular of the vector between the points.
237707
237824
  */
237708
237825
  forwardLeftInterpolate(tangentFraction, leftFraction, point) {
237709
237826
  const dx = point.x - this.x;
@@ -237751,10 +237868,13 @@ class Point2d extends XY {
237751
237868
  * @param targetB target of second vector
237752
237869
  */
237753
237870
  dotVectorsToTargets(targetA, targetB) {
237754
- return (targetA.x - this.x) * (targetB.x - this.x) +
237755
- (targetA.y - this.y) * (targetB.y - this.y);
237871
+ return (targetA.x - this.x) * (targetB.x - this.x) + (targetA.y - this.y) * (targetB.y - this.y);
237756
237872
  }
237757
- /** Returns the (scalar) cross product of two points/vectors, computed from origin to target1 and target2 */
237873
+ /**
237874
+ * Returns the (scalar) cross product of vector from this to targetA and vector from this to targetB
237875
+ * @param target1 target of first vector
237876
+ * @param target2 target of second vector
237877
+ */
237758
237878
  crossProductToPoints(target1, target2) {
237759
237879
  const x1 = target1.x - this.x;
237760
237880
  const y1 = target1.y - this.y;
@@ -237762,25 +237882,31 @@ class Point2d extends XY {
237762
237882
  const y2 = target2.y - this.y;
237763
237883
  return x1 * y2 - y1 * x2;
237764
237884
  }
237765
- /** Return the fractional coordinate of the projection of this instance x,y onto the line from startPoint to endPoint.
237885
+ /** Return the fractional coordinate of the projection of this instance x,y onto the
237886
+ * line from startPoint to endPoint.
237766
237887
  * @param startPoint start point of line
237767
237888
  * @param endPoint end point of line
237768
237889
  * @param defaultFraction fraction to return if startPoint and endPoint are equal.
237769
237890
  */
237770
- fractionOfProjectionToLine(startPoint, endPoint, defaultFraction) {
237891
+ fractionOfProjectionToLine(startPoint, endPoint, defaultFraction = 0) {
237771
237892
  const denominator = startPoint.distanceSquared(endPoint);
237772
237893
  if (denominator < _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistanceSquared)
237773
- return defaultFraction ? defaultFraction : 0;
237774
- return startPoint.dotVectorsToTargets(endPoint, this) / denominator;
237894
+ return defaultFraction;
237895
+ const numerator = startPoint.dotVectorsToTargets(endPoint, this);
237896
+ return numerator / denominator;
237775
237897
  }
237776
237898
  }
237777
237899
  /** 2D vector with `x`,`y` as properties
237778
237900
  * @public
237779
237901
  */
237780
237902
  class Vector2d extends XY {
237781
- constructor(x = 0, y = 0) { super(x, y); }
237903
+ constructor(x = 0, y = 0) {
237904
+ super(x, y);
237905
+ }
237782
237906
  /** Return a new Vector2d with the same x,y */
237783
- clone(result) { return Vector2d.create(this.x, this.y, result); }
237907
+ clone(result) {
237908
+ return Vector2d.create(this.x, this.y, result);
237909
+ }
237784
237910
  /** Return a new Vector2d with given x and y */
237785
237911
  static create(x = 0, y = 0, result) {
237786
237912
  if (result) {
@@ -237790,12 +237916,24 @@ class Vector2d extends XY {
237790
237916
  }
237791
237917
  return new Vector2d(x, y);
237792
237918
  }
237793
- /** Return a (new) Vector2d with components 1,0 */
237794
- static unitX(scale = 1) { return new Vector2d(scale, 0); }
237795
- /** Return a (new) Vector2d with components 0,1 */
237796
- static unitY(scale = 1) { return new Vector2d(0, scale); }
237919
+ /**
237920
+ * Return a (new) Vector2d with components scale,0
237921
+ * If scale is not given default value 1 is used.
237922
+ */
237923
+ static unitX(scale = 1) {
237924
+ return new Vector2d(scale, 0);
237925
+ }
237926
+ /**
237927
+ * Return a (new) Vector2d with components 0,scale
237928
+ * If scale is not given default value 1 is used.
237929
+ */
237930
+ static unitY(scale = 1) {
237931
+ return new Vector2d(0, scale);
237932
+ }
237797
237933
  /** Return a Vector2d with components 0,0 */
237798
- static createZero(result) { return Vector2d.create(0, 0, result); }
237934
+ static createZero(result) {
237935
+ return Vector2d.create(0, 0, result);
237936
+ }
237799
237937
  /** copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
237800
237938
  static createFrom(data, result) {
237801
237939
  if (data instanceof Float64Array) {
@@ -237807,8 +237945,16 @@ class Vector2d extends XY {
237807
237945
  }
237808
237946
  return Vector2d.create(data.x, data.y, result);
237809
237947
  }
237810
- /** Return a new Vector2d from json structured as `[1,2]` or `{x:1,y:2}` */
237811
- static fromJSON(json) { const val = new Vector2d(); val.setFromJSON(json); return val; }
237948
+ /**
237949
+ * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
237950
+ * * If no JSON input is provided, 0 would be used as default values for x and y.
237951
+ * @param json the JSON input
237952
+ * */
237953
+ static fromJSON(json) {
237954
+ const val = new Vector2d();
237955
+ val.setFromJSON(json);
237956
+ return val;
237957
+ }
237812
237958
  /** Return a new Vector2d from polar coordinates for radius and Angle from x axis */
237813
237959
  static createPolar(r, theta) {
237814
237960
  return Vector2d.create(r * theta.cos(), r * theta.sin());
@@ -237819,6 +237965,7 @@ class Vector2d extends XY {
237819
237965
  }
237820
237966
  /**
237821
237967
  * Return a vector that bisects the angle between two normals and extends to the intersection of two offset lines
237968
+ * * returns `undefined` if `unitPerpA = -unitPerpB` (i.e., are opposite)
237822
237969
  * @param unitPerpA unit perpendicular to incoming direction
237823
237970
  * @param unitPerpB unit perpendicular to outgoing direction
237824
237971
  * @param offset offset distance
@@ -237827,12 +237974,13 @@ class Vector2d extends XY {
237827
237974
  let bisector = unitPerpA.plus(unitPerpB);
237828
237975
  bisector = bisector.normalize();
237829
237976
  if (bisector) {
237830
- const c = offset * bisector.dotProduct(unitPerpA);
237977
+ const c = bisector.dotProduct(unitPerpA);
237978
+ bisector.scale(offset, bisector);
237831
237979
  return bisector.safeDivideOrNull(c);
237832
237980
  }
237833
237981
  return undefined;
237834
237982
  }
237835
- /** Return a (new or optionally reused) vector which is `this` divided by denominator
237983
+ /** Return a (new or optionally reused) vector which is `this` divided by `denominator`
237836
237984
  * * return undefined if denominator is zero.
237837
237985
  */
237838
237986
  safeDivideOrNull(denominator, result) {
@@ -237847,12 +237995,22 @@ class Vector2d extends XY {
237847
237995
  result = result ? result : new Vector2d();
237848
237996
  return this.safeDivideOrNull(mag, result);
237849
237997
  }
237850
- /** return the fractional projection of spaceVector onto this */
237998
+ /**
237999
+ * Return fractional projection of target vector onto this
238000
+ * * It's returning the signed projection magnitude divided by the target magnitude. In other words,
238001
+ * it's returning the length of the projection as a fraction of the target magnitude.
238002
+ * @param target the target vector
238003
+ * @param defaultFraction the returned value in case magnitude square of target vector is very small
238004
+ * */
237851
238005
  fractionOfProjectionToVector(target, defaultFraction) {
237852
- const numerator = this.dotProduct(target);
238006
+ /*
238007
+ * projection length is (this.target)/||target||
238008
+ * but here we return (this.target)/||target||^2
238009
+ */
237853
238010
  const denominator = target.magnitudeSquared();
237854
238011
  if (denominator < _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistanceSquared)
237855
238012
  return defaultFraction ? defaultFraction : 0;
238013
+ const numerator = this.dotProduct(target);
237856
238014
  return numerator / denominator;
237857
238015
  }
237858
238016
  /** Return a new vector with components negated from this instance. */
@@ -237865,7 +238023,7 @@ class Vector2d extends XY {
237865
238023
  /** Return a vector same length as this but rotated 90 degrees counter clockwise */
237866
238024
  rotate90CCWXY(result) {
237867
238025
  result = result ? result : new Vector2d();
237868
- // save x,y to allow aliasing ..
238026
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
237869
238027
  const xx = this.x;
237870
238028
  const yy = this.y;
237871
238029
  result.x = -yy;
@@ -237875,7 +238033,7 @@ class Vector2d extends XY {
237875
238033
  /** Return a vector same length as this but rotated 90 degrees clockwise */
237876
238034
  rotate90CWXY(result) {
237877
238035
  result = result ? result : new Vector2d();
237878
- // save x,y to allow aliasing ..
238036
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
237879
238037
  const xx = this.x;
237880
238038
  const yy = this.y;
237881
238039
  result.x = yy;
@@ -237887,6 +238045,7 @@ class Vector2d extends XY {
237887
238045
  result = result ? result : new Vector2d();
237888
238046
  const xx = this.x;
237889
238047
  const yy = this.y;
238048
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
237890
238049
  result.x = -yy;
237891
238050
  result.y = xx;
237892
238051
  const d2 = xx * xx + yy * yy;
@@ -237901,6 +238060,7 @@ class Vector2d extends XY {
237901
238060
  rotateXY(angle, result) {
237902
238061
  const s = angle.sin();
237903
238062
  const c = angle.cos();
238063
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
237904
238064
  const xx = this.x;
237905
238065
  const yy = this.y;
237906
238066
  result = result ? result : new Vector2d();
@@ -237908,18 +238068,26 @@ class Vector2d extends XY {
237908
238068
  result.y = xx * s + yy * c;
237909
238069
  return result;
237910
238070
  }
237911
- /** return the interpolation {this + fraction * (right - this)} */
237912
- interpolate(fraction, right, result) {
238071
+ /** Return a vector computed at fractional position between this vector and vectorB
238072
+ * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
238073
+ * True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
238074
+ * @param vectorB second vector
238075
+ * @param result optional preallocated result.
238076
+ */
238077
+ interpolate(fraction, vectorB, result) {
237913
238078
  result = result ? result : new Vector2d();
237914
- /* For best last-bit behavior, if fraction is below 0.5, use this as base point. If above 0.5, use right as base point. */
238079
+ /*
238080
+ * For best last-bit behavior, if fraction is below 0.5, use this as base point.
238081
+ * If above 0.5, use vectorB as base point.
238082
+ */
237915
238083
  if (fraction <= 0.5) {
237916
- result.x = this.x + fraction * (right.x - this.x);
237917
- result.y = this.y + fraction * (right.y - this.y);
238084
+ result.x = this.x + fraction * (vectorB.x - this.x);
238085
+ result.y = this.y + fraction * (vectorB.y - this.y);
237918
238086
  }
237919
238087
  else {
237920
238088
  const t = fraction - 1.0;
237921
- result.x = right.x + t * (right.x - this.x);
237922
- result.y = right.y + t * (right.y - this.y);
238089
+ result.x = vectorB.x + t * (vectorB.x - this.x);
238090
+ result.y = vectorB.y + t * (vectorB.y - this.y);
237923
238091
  }
237924
238092
  return result;
237925
238093
  }
@@ -237973,16 +238141,19 @@ class Vector2d extends XY {
237973
238141
  return this.scale(length / mag, result);
237974
238142
  }
237975
238143
  /** return the dot product of this with vectorB */
237976
- dotProduct(vectorB) { return this.x * vectorB.x + this.y * vectorB.y; }
238144
+ dotProduct(vectorB) {
238145
+ return this.x * vectorB.x + this.y * vectorB.y;
238146
+ }
237977
238147
  /** dot product with vector from pointA to pointB */
237978
238148
  dotProductStartEnd(pointA, pointB) {
237979
- return this.x * (pointB.x - pointA.x)
237980
- + this.y * (pointB.y - pointA.y);
238149
+ return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);
237981
238150
  }
237982
238151
  /** vector cross product {this CROSS vectorB} */
237983
- crossProduct(vectorB) { return this.x * vectorB.y - this.y * vectorB.x; }
238152
+ crossProduct(vectorB) {
238153
+ return this.x * vectorB.y - this.y * vectorB.x;
238154
+ }
237984
238155
  /**
237985
- * return the (radians as a simple number, not strongly typed Angle) signed angle from this to vectorB.
238156
+ * return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
237986
238157
  * This is positive if the shortest turn is counterclockwise, negative if clockwise.
237987
238158
  */
237988
238159
  radiansTo(vectorB) {
@@ -237995,13 +238166,6 @@ class Vector2d extends XY {
237995
238166
  angleTo(vectorB) {
237996
238167
  return _Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.radiansTo(vectorB));
237997
238168
  }
237998
- /* smallerUnorientedAngleTo(vectorB: Vector2d): Angle { }
237999
- signedAngleTo(vectorB: Vector2d, upVector: Vector2d): Angle { }
238000
- planarAngleTo(vectorB: Vector2d, planeNormal: Vector2d): Angle { }
238001
- // sectors
238002
- isInSmallerSector(vectorA: Vector2d, vectorB: Vector2d): boolean { }
238003
- isInCCWSector(vectorA: Vector2d, vectorB: Vector2d, upVector: Vector2d): boolean { }
238004
- */
238005
238169
  /**
238006
238170
  * Test if this vector is parallel to other.
238007
238171
  * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,
@@ -238092,6 +238256,7 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
238092
238256
  }
238093
238257
  /**
238094
238258
  * Access by index, returning strongly typed Point3d
238259
+ * * This returns the xyz value but NOT reference to the point in the "carried" array.
238095
238260
  * @param index index of point within the array
238096
238261
  * @param result caller-allocated destination
238097
238262
  * @returns undefined if the index is out of bounds
@@ -238127,15 +238292,24 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
238127
238292
  }
238128
238293
  return undefined;
238129
238294
  }
238130
- /** access x of indexed point */
238295
+ /**
238296
+ * access x of indexed point
238297
+ * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
238298
+ * */
238131
238299
  getXAtUncheckedPointIndex(pointIndex) {
238132
238300
  return this.data[pointIndex].x;
238133
238301
  }
238134
- /** access y of indexed point */
238302
+ /**
238303
+ * access y of indexed point
238304
+ * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
238305
+ * */
238135
238306
  getYAtUncheckedPointIndex(pointIndex) {
238136
238307
  return this.data[pointIndex].y;
238137
238308
  }
238138
- /** access z of indexed point */
238309
+ /**
238310
+ * access z of indexed point
238311
+ * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
238312
+ * */
238139
238313
  getZAtUncheckedPointIndex(pointIndex) {
238140
238314
  return this.data[pointIndex].z;
238141
238315
  }
@@ -238203,7 +238377,7 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
238203
238377
  result.addCrossProductToTargetsInPlace(data[originIndex].x, data[originIndex].y, data[originIndex].z, data[indexA].x, data[indexA].y, data[indexA].z, data[indexB].x, data[indexB].y, data[indexB].z);
238204
238378
  }
238205
238379
  /**
238206
- * Accumulate scale times the x,y,z values at index.
238380
+ * Accumulate scale times the x,y,z values at index to the sum.
238207
238381
  * No action if index is out of bounds.
238208
238382
  */
238209
238383
  accumulateScaledXYZ(index, scale, sum) {
@@ -238293,7 +238467,7 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
238293
238467
  }
238294
238468
  /** Adjust index into range by modulo with the length. */
238295
238469
  cyclicIndex(i) {
238296
- return (i % this.length);
238470
+ return (i % this.data.length);
238297
238471
  }
238298
238472
  }
238299
238473
 
@@ -238323,6 +238497,7 @@ __webpack_require__.r(__webpack_exports__);
238323
238497
  /** @packageDocumentation
238324
238498
  * @module CartesianGeometry
238325
238499
  */
238500
+ // cspell:word CWXY
238326
238501
 
238327
238502
 
238328
238503
 
@@ -238557,7 +238732,7 @@ class XYZ {
238557
238732
  return this.y;
238558
238733
  }
238559
238734
  /**
238560
- * Return the x,y, z component corresponding to 0,1,2.
238735
+ * Set value at index 0 or 1 or 2.
238561
238736
  */
238562
238737
  setAt(index, value) {
238563
238738
  if (index < 0.5)
@@ -239181,6 +239356,19 @@ class Vector3d extends XYZ {
239181
239356
  this.z *= a;
239182
239357
  return true;
239183
239358
  }
239359
+ /** Create a normalized vector from the inputs.
239360
+ * @param result optional result
239361
+ * @returns undefined if and only if normalization fails
239362
+ */
239363
+ static createNormalized(x = 0, y = 0, z = 0, result) {
239364
+ if (undefined === result)
239365
+ result = Vector3d.create(x, y, z);
239366
+ else
239367
+ result.set(x, y, z);
239368
+ if (result.normalizeInPlace())
239369
+ return result;
239370
+ return undefined;
239371
+ }
239184
239372
  /**
239185
239373
  * Return fractional projection of target vector onto this
239186
239374
  * * It's returning the signed projection magnitude divided by the target magnitude. In other words,
@@ -239220,6 +239408,17 @@ class Vector3d extends XYZ {
239220
239408
  result.z = this.z;
239221
239409
  return result;
239222
239410
  }
239411
+ /** Return a vector same length as this but rotated 90 degrees clockwise */
239412
+ rotate90CWXY(result) {
239413
+ result = result ? result : new Vector3d();
239414
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
239415
+ const xx = this.x;
239416
+ const yy = this.y;
239417
+ result.x = yy;
239418
+ result.y = -xx;
239419
+ result.z = this.z;
239420
+ return result;
239421
+ }
239223
239422
  /**
239224
239423
  * Return a vector which is in the xy plane, perpendicular ot the xy part of this vector, and of unit length.
239225
239424
  * * If the xy part is 00, the return is the rotated (but not normalized) xy parts of this vector.
@@ -239229,6 +239428,7 @@ class Vector3d extends XYZ {
239229
239428
  result = result ? result : new Vector3d();
239230
239429
  const xx = this.x;
239231
239430
  const yy = this.y;
239431
+ // save x,y to allow aliasing ("this" can be passed to the function as "result")
239232
239432
  result.x = -yy;
239233
239433
  result.y = xx;
239234
239434
  result.z = 0.0;
@@ -239289,6 +239489,10 @@ class Vector3d extends XYZ {
239289
239489
  */
239290
239490
  interpolate(fraction, vectorB, result) {
239291
239491
  result = result ? result : new Vector3d();
239492
+ /*
239493
+ * For best last-bit behavior, if fraction is below 0.5, use this as base point.
239494
+ * If above 0.5, use vectorB as base point.
239495
+ */
239292
239496
  if (fraction <= 0.5) {
239293
239497
  result.x = this.x + fraction * (vectorB.x - this.x);
239294
239498
  result.y = this.y + fraction * (vectorB.y - this.y);
@@ -310706,7 +310910,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
310706
310910
  /***/ ((module) => {
310707
310911
 
310708
310912
  "use strict";
310709
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.52","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":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","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.5.0-dev.52","@itwin/core-bentley":"workspace:^3.5.0-dev.52","@itwin/core-common":"workspace:^3.5.0-dev.52","@itwin/core-geometry":"workspace:^3.5.0-dev.52","@itwin/core-orbitgt":"workspace:^3.5.0-dev.52","@itwin/core-quantity":"workspace:^3.5.0-dev.52","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.52"},"//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":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@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","reflect-metadata":"0.1.13"},"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"}}]}}');
310913
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.57","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":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","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.5.0-dev.57","@itwin/core-bentley":"workspace:^3.5.0-dev.57","@itwin/core-common":"workspace:^3.5.0-dev.57","@itwin/core-geometry":"workspace:^3.5.0-dev.57","@itwin/core-orbitgt":"workspace:^3.5.0-dev.57","@itwin/core-quantity":"workspace:^3.5.0-dev.57","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.57"},"//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":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@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","reflect-metadata":"0.1.13"},"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"}}]}}');
310710
310914
 
310711
310915
  /***/ })
310712
310916