@itwin/rpcinterface-full-stack-tests 5.9.0-dev.1 → 5.9.0-dev.2

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.
@@ -67553,7 +67553,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
67553
67553
  this.reset(options);
67554
67554
  }
67555
67555
  /**
67556
- * @deprecated in 5.6. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67556
+ * @deprecated in 5.6 - will not be removed until after 2027-04-02. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67557
67557
  */
67558
67558
  setParams(param) {
67559
67559
  if (this._lockArgs) {
@@ -67562,7 +67562,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
67562
67562
  this._param = param.serialize();
67563
67563
  }
67564
67564
  /**
67565
- * @deprecated in 5.6. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67565
+ * @deprecated in 5.6 - will not be removed until after 2027-04-02. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67566
67566
  */
67567
67567
  reset(options) {
67568
67568
  if (options) {
@@ -67586,7 +67586,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
67586
67586
  }
67587
67587
  /**
67588
67588
  * Clear all bindings.
67589
- * @deprecated in 5.6. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67589
+ * @deprecated in 5.6 - will not be removed until after 2027-04-02. Will not be removed until 2027-02-18. Should not be used. Will be made private in a future release.
67590
67590
  */
67591
67591
  resetBindings() {
67592
67592
  this._param = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryBinder().serialize();
@@ -72325,6 +72325,7 @@ __webpack_require__.r(__webpack_exports__);
72325
72325
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
72326
72326
  /* harmony export */ ChannelControlError: () => (/* binding */ ChannelControlError),
72327
72327
  /* harmony export */ CloudSqliteError: () => (/* binding */ CloudSqliteError),
72328
+ /* harmony export */ ITwinSettingsError: () => (/* binding */ ITwinSettingsError),
72328
72329
  /* harmony export */ SqliteError: () => (/* binding */ SqliteError),
72329
72330
  /* harmony export */ ViewStoreError: () => (/* binding */ ViewStoreError),
72330
72331
  /* harmony export */ WorkspaceError: () => (/* binding */ WorkspaceError)
@@ -72401,6 +72402,21 @@ var WorkspaceError;
72401
72402
  WorkspaceError.throwError = throwError;
72402
72403
  })(WorkspaceError || (WorkspaceError = {}));
72403
72404
  /** @beta */
72405
+ var ITwinSettingsError;
72406
+ (function (ITwinSettingsError) {
72407
+ ITwinSettingsError.scope = "itwin-settings";
72408
+ /** Determine whether an error object is an ITwinSettingsError. */
72409
+ function isError(error, key) {
72410
+ return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.isError(error, ITwinSettingsError.scope, key);
72411
+ }
72412
+ ITwinSettingsError.isError = isError;
72413
+ /** Instantiate and throw an ITwinSettingsError. */
72414
+ function throwError(key, e) {
72415
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.throwError({ ...e, iTwinErrorId: { scope: ITwinSettingsError.scope, key } });
72416
+ }
72417
+ ITwinSettingsError.throwError = throwError;
72418
+ })(ITwinSettingsError || (ITwinSettingsError = {}));
72419
+ /** @beta */
72404
72420
  var ChannelControlError;
72405
72421
  (function (ChannelControlError) {
72406
72422
  /** the ITwinError scope for `ChannelControlError`s. */
@@ -82151,6 +82167,7 @@ __webpack_require__.r(__webpack_exports__);
82151
82167
  /* harmony export */ IModelTileRpcInterface: () => (/* reexport safe */ _rpc_IModelTileRpcInterface__WEBPACK_IMPORTED_MODULE_142__.IModelTileRpcInterface),
82152
82168
  /* harmony export */ IModelVersion: () => (/* reexport safe */ _IModelVersion__WEBPACK_IMPORTED_MODULE_72__.IModelVersion),
82153
82169
  /* harmony export */ INSTANCE: () => (/* reexport safe */ _rpc_core_RpcRegistry__WEBPACK_IMPORTED_MODULE_134__.INSTANCE),
82170
+ /* harmony export */ ITwinSettingsError: () => (/* reexport safe */ _ITwinCoreErrors__WEBPACK_IMPORTED_MODULE_73__.ITwinSettingsError),
82154
82171
  /* harmony export */ ImageBuffer: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.ImageBuffer),
82155
82172
  /* harmony export */ ImageBufferFormat: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.ImageBufferFormat),
82156
82173
  /* harmony export */ ImageGraphic: () => (/* reexport safe */ _geometry_ImageGraphic__WEBPACK_IMPORTED_MODULE_54__.ImageGraphic),
@@ -239504,7 +239521,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
239504
239521
  const simpleLength = this.getFractionToDistanceScale();
239505
239522
  if (simpleLength !== undefined)
239506
239523
  return simpleLength * Math.abs(fraction1 - fraction0);
239507
- // fall through for true ellipse . .. stroke and accumulate quadrature with typical count . ..
239524
+ // fall through for true ellipse . .. stroke and accumulate quadrature with typical count
239508
239525
  let f0 = fraction0;
239509
239526
  let f1 = fraction1;
239510
239527
  if (fraction0 > fraction1) {
@@ -240129,21 +240146,22 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
240129
240146
  // const theta = vector12.angleTo(bisector);
240130
240147
  // vector10, vector12, and bisector are UNIT vectors
240131
240148
  // bisector splits the angle between vector10 and vector12
240132
- const perpendicular = vector12.minus(vector10);
240149
+ const perpendicular = vector12.minus(vector10); // perpendicular to bisector
240133
240150
  const perpendicularMagnitude = perpendicular.magnitude(); // == 2 * sin(theta)
240134
240151
  const sinTheta = 0.5 * perpendicularMagnitude;
240135
240152
  if (!_Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallAngleRadians(sinTheta)) { // for small theta, sinTheta is almost equal to theta
240136
240153
  const cosTheta = Math.sqrt(1 - sinTheta * sinTheta);
240137
240154
  const tanTheta = sinTheta / cosTheta;
240138
- const alphaRadians = Math.acos(sinTheta);
240139
- const distanceToCenter = radius / sinTheta;
240140
- const distanceToTangency = radius / tanTheta;
240155
+ // [arc center, arc start, point1] form a right triangle with angle theta at point1
240156
+ const alphaRadians = Math.acos(sinTheta); // == pi/2 - theta
240157
+ const distanceToCenter = radius / sinTheta; // distance from point1 to arc center along bisector
240158
+ const distanceToTangency = radius / tanTheta; // distance from point1 to start/end of arc along vector10/vector12
240141
240159
  const f10 = distanceToTangency / d10;
240142
240160
  const f12 = distanceToTangency / d12;
240143
240161
  const center = point1.plusScaled(bisector, distanceToCenter);
240144
240162
  bisector.scaleInPlace(-radius);
240145
240163
  perpendicular.scaleInPlace(radius / perpendicularMagnitude);
240146
- const arc02 = Arc3d.create(center, bisector, perpendicular, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(-alphaRadians, alphaRadians));
240164
+ const arc02 = Arc3d.create(center, bisector, perpendicular, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_4__.AngleSweep.createStartEndRadians(-alphaRadians, alphaRadians)); // arc02 is a circle with the given radius because both bisector and perpendicular have length radius
240147
240165
  return { arc: arc02, fraction10: f10, fraction12: f12, point: point1.clone() };
240148
240166
  }
240149
240167
  }
@@ -242733,7 +242751,7 @@ class CurveFactory {
242733
242751
  continue;
242734
242752
  const bA = blendArray[_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.modulo(i - 1, n)];
242735
242753
  const bC = blendArray[_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.modulo(i + 1, n)];
242736
- if (bB.fraction10 > 1 || bB.fraction12 > 1 || 1 - bB.fraction10 < bA.fraction12 || bB.fraction12 > 1 - bC.fraction10) {
242754
+ if (bB.fraction10 > 1 || bB.fraction12 > 1 || bB.fraction10 + bA.fraction12 > 1 || bB.fraction12 + bC.fraction10 > 1) {
242737
242755
  bB.fraction10 = bB.fraction12 = 0;
242738
242756
  bB.arc = undefined;
242739
242757
  }
@@ -242750,6 +242768,233 @@ class CurveFactory {
242750
242768
  }
242751
242769
  return path;
242752
242770
  }
242771
+ /** If an open filletedLineString starts/ends with an arc, add a zero-length line segment to its start/end. */
242772
+ static validateOpenPathStartEnd(filletedLineString) {
242773
+ const numOfChildren = filletedLineString.children.length;
242774
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(numOfChildren > 0);
242775
+ const firstChild = filletedLineString.children[0];
242776
+ const lastChild = filletedLineString.children[numOfChildren - 1];
242777
+ if (firstChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d) {
242778
+ const startPoint = firstChild.startPoint();
242779
+ filletedLineString = _Path__WEBPACK_IMPORTED_MODULE_7__.Path.create(_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d.create(startPoint, startPoint), ...filletedLineString.children);
242780
+ }
242781
+ if (lastChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d) {
242782
+ const endPoint = lastChild.endPoint();
242783
+ filletedLineString = _Path__WEBPACK_IMPORTED_MODULE_7__.Path.create(...filletedLineString.children, _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d.create(endPoint, endPoint));
242784
+ }
242785
+ return filletedLineString;
242786
+ }
242787
+ /**
242788
+ * Split `arc` according to the partition given by `fractions` and append the pieces to `output` with zero-length
242789
+ * line segments in between.
242790
+ * @param fractions a complete partition of the fractional parameter space, e.g., [0, 0.5, 1] splits the arc into
242791
+ * two pieces.
242792
+ */
242793
+ static splitAndAppendArc(output, arc, fractions) {
242794
+ const pt = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero();
242795
+ for (let k = 0; k < fractions.length - 1; k++) {
242796
+ output.tryAddChild(arc.clonePartialCurve(fractions[k], fractions[k + 1]));
242797
+ if (k + 1 < fractions.length - 1) {
242798
+ arc.fractionToPoint(fractions[k + 1], pt);
242799
+ output.tryAddChild(_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d.create(pt, pt));
242800
+ }
242801
+ }
242802
+ }
242803
+ /**
242804
+ * Update the path for relaxed validation:
242805
+ * * If there are 2 connected arcs, add a zero-length line segment between them.
242806
+ * * If there is a pair of arc and line segment/string with non-parallel tangents, add a zero-length line segment
242807
+ * between them.
242808
+ * * If there is an arc with sweep degrees in [180, 360), break the arc into 2 pieces separated by a zero-length
242809
+ * line segment. Similarly, break a 360-degree arc into 3 pieces separated by 2 zero-length line segments. Return
242810
+ * `undefined` if there is an arc with sweep greater than 360 degrees.
242811
+ */
242812
+ static updatePathForRelaxedValidation(filletedLineString, isClosed, parallelOptions) {
242813
+ const newFilletedLineString = new _Path__WEBPACK_IMPORTED_MODULE_7__.Path();
242814
+ const numOfChildren = filletedLineString.children.length;
242815
+ for (let i = 0; i < numOfChildren; i++) { // examine each child and its predecessor
242816
+ const child = filletedLineString.children[i];
242817
+ const arcSweep = child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d ? Math.abs(child.sweep.sweepDegrees) : undefined;
242818
+ const sweepTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleDegrees;
242819
+ if (arcSweep !== undefined && arcSweep > 360 + sweepTol)
242820
+ return undefined;
242821
+ if (!isClosed && i === 0) {
242822
+ newFilletedLineString.tryAddChild(child);
242823
+ continue; // skip first child for open path since it won't have a previous child
242824
+ }
242825
+ const prevChild = filletedLineString.cyclicCurvePrimitive(i - 1);
242826
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(prevChild !== undefined, "Cyclic neighbor is defined within loop extents");
242827
+ const childStartTangent = child.fractionToPointAndDerivative(0).direction;
242828
+ const prevChildEndTangent = prevChild.fractionToPointAndDerivative(1).direction;
242829
+ const childrenAreParallel = childStartTangent.isParallelTo(prevChildEndTangent, false, true, parallelOptions);
242830
+ const arcLineStringCorner = !childrenAreParallel &&
242831
+ ((child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d && (prevChild instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d || prevChild instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d)) ||
242832
+ ((prevChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d && (child instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d || child instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d))));
242833
+ const twoConnectedArcs = child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d && prevChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d;
242834
+ // apply relaxed validation rules
242835
+ if (twoConnectedArcs || arcLineStringCorner) {
242836
+ const linePoint = child.startPoint();
242837
+ newFilletedLineString.tryAddChild(_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d.create(linePoint, linePoint));
242838
+ }
242839
+ if (arcSweep !== undefined && arcSweep > 180 - sweepTol && arcSweep <= 360 - sweepTol) {
242840
+ CurveFactory.splitAndAppendArc(newFilletedLineString, child, [0, 0.5, 1]); // 2 pieces
242841
+ }
242842
+ else if (arcSweep !== undefined && arcSweep > 360 - sweepTol && arcSweep <= 360 + sweepTol) {
242843
+ CurveFactory.splitAndAppendArc(newFilletedLineString, child, [0, 1 / 3, 2 / 3, 1]); // 3 pieces
242844
+ }
242845
+ else {
242846
+ newFilletedLineString.tryAddChild(child);
242847
+ }
242848
+ }
242849
+ return newFilletedLineString;
242850
+ }
242851
+ /**
242852
+ * Verify each neighboring curve to an arc is a line segment/string. Also verify arc tangents are parallel
242853
+ * (but not anti-parallel) to neighboring line segment/string tangents.
242854
+ */
242855
+ static validateArcNeighbors(validatedFilletedLineString, i, perpOptions) {
242856
+ const child = validatedFilletedLineString.getChild(i);
242857
+ if (!child || !(child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d))
242858
+ return false;
242859
+ // previous child before arc must be line segment/string
242860
+ const prevChild = validatedFilletedLineString.cyclicCurvePrimitive(i - 1); // ASSUME: i === 0 only if the path is closed
242861
+ if (!prevChild || (!(prevChild instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) && !(prevChild instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d)))
242862
+ return false;
242863
+ // arc start tangent must be parallel (but not anti-parallel) to previous line segment
242864
+ const arcStartTangent = child.fractionToPointAndDerivative(0).direction;
242865
+ const prevChildEndTangent = prevChild.fractionToPointAndDerivative(1).direction;
242866
+ if (!arcStartTangent.isParallelTo(prevChildEndTangent, false, true, perpOptions))
242867
+ return false;
242868
+ // next child after arc must be line segment/string
242869
+ const nextChild = validatedFilletedLineString.cyclicCurvePrimitive(i + 1); // ASSUME: i === numOfChildren-1 only if the path is closed
242870
+ if (!nextChild || (!(nextChild instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) && !(nextChild instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d)))
242871
+ return false;
242872
+ // arc end tangent must be parallel (and not anti-parallel) to next line segment
242873
+ const arcEndTangent = child.fractionToPointAndDerivative(1).direction;
242874
+ const nextChildStartTangent = nextChild.fractionToPointAndDerivative(0).direction;
242875
+ if (!arcEndTangent.isParallelTo(nextChildStartTangent, false, true, perpOptions))
242876
+ return false;
242877
+ return true;
242878
+ }
242879
+ /** Validate a filleted line string. */
242880
+ static validateFilletedLineString(filletedLineString, isClosed, options) {
242881
+ if (filletedLineString.children.length === 0)
242882
+ return undefined;
242883
+ const relaxedValidation = options?.relaxedValidation ?? false;
242884
+ let validatedFilletedLineString = filletedLineString;
242885
+ if (!isClosed)
242886
+ validatedFilletedLineString = this.validateOpenPathStartEnd(validatedFilletedLineString);
242887
+ if (relaxedValidation)
242888
+ validatedFilletedLineString = this.updatePathForRelaxedValidation(validatedFilletedLineString, isClosed, options?.parallelOptions);
242889
+ if (validatedFilletedLineString === undefined)
242890
+ return undefined;
242891
+ const numOfChildren = validatedFilletedLineString.children.length;
242892
+ // validate the children
242893
+ for (let i = 0; i < numOfChildren; i++) {
242894
+ const child = validatedFilletedLineString.children[i];
242895
+ if (!(child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d) && !(child instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) && !(child instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d))
242896
+ return undefined;
242897
+ if (child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d) {
242898
+ if (child.circularRadius() === undefined || Math.abs(child.sweep.sweepDegrees) > 180 - _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleDegrees)
242899
+ return undefined;
242900
+ if (!this.validateArcNeighbors(validatedFilletedLineString, i, options?.parallelOptions))
242901
+ return undefined;
242902
+ }
242903
+ }
242904
+ return validatedFilletedLineString;
242905
+ }
242906
+ /** If we have 2 connected arcs (with a zero-length line segment in between), add the joint with zero radius. */
242907
+ static addJointBetweenConnectedArcs(validatedFilletedLineString, i, isClosed, result) {
242908
+ if (!isClosed && i < 2) // for open path, skip the first 2 children
242909
+ return;
242910
+ const child = validatedFilletedLineString.getChild(i);
242911
+ if (!child || !(child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d))
242912
+ return;
242913
+ const prevChild = validatedFilletedLineString.cyclicCurvePrimitive(i - 1);
242914
+ if (!prevChild || !(prevChild instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) || prevChild.curveLength() > 0)
242915
+ return;
242916
+ const prevPrevChild = validatedFilletedLineString.cyclicCurvePrimitive(i - 2);
242917
+ if (!prevPrevChild || !(prevPrevChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d))
242918
+ return;
242919
+ result.push([prevChild.startPoint(), 0]);
242920
+ }
242921
+ /**
242922
+ * Extract points and radii from a valid filleted linestring.
242923
+ * * A valid filleted linestring is a `CurveChain` that satisfies the following conditions:
242924
+ * * Its children have type `Arc3d`, `LineSegment3d`, or `LineString3d`.
242925
+ * * Each `Arc3d` is circular.
242926
+ * * Each `Arc3d` sweep is less than 180 degrees.
242927
+ * * Each `Arc3d` cannot be adjacent to another `Arc3d`.
242928
+ * * Each `Arc3d` is G1 continuous with each of its neighbors, i.e., at their common point, the curves have the same
242929
+ * tangent direction.
242930
+ * * To treat more input chains as valid, pass `options.relaxedValidation = true`. Internally, this setting performs
242931
+ * several transformations on the input to produce a valid filleted linestring:
242932
+ * * Each `Arc3d` whose sweep is between 180 and 360 degrees is split into 2 arcs of equal sweep separated by a
242933
+ * zero-length `LineSegment3d`. A 360-degree arc is split into 3 arcs of equal sweep separated by 2 zero-length
242934
+ * `LineSegment3d`s. Arcs with sweep greater than 360 degrees are not allowed.
242935
+ * * Adjacent `Arc3d`s are separated by a zero-length `LineSegment3d`.
242936
+ * * An `Arc3d` that is not G1 continuous with its neighbor is separated from its neighbor by a zero-length
242937
+ * `LineSegment3d`.
242938
+ * @param filletedLineString A linestring with corner fillets, e.g., as created by {@link CurveFactory.createFilletsInLineString}.
242939
+ * @param options optional validation settings.
242940
+ * @returns Array of [point, radius] pairs extracted from input, or `undefined` if the input is not valid. A radius
242941
+ * of zero means no fillet at the vertex.
242942
+ */
242943
+ static fromFilletedLineString(filletedLineString, options) {
242944
+ const path = filletedLineString instanceof _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop
242945
+ ? _Path__WEBPACK_IMPORTED_MODULE_7__.Path.create(...filletedLineString.children)
242946
+ : filletedLineString;
242947
+ const isClosed = path.isPhysicallyClosedCurve(options?.distanceTol);
242948
+ const validatedFilletedLineString = this.validateFilletedLineString(path, isClosed, options);
242949
+ if (!validatedFilletedLineString)
242950
+ return undefined;
242951
+ // Algorithm:
242952
+ // Each arc contributes a point with the arc's radius. If arc consumed the entire edge (2 points), we make sure to
242953
+ // add both points (one with the arc's radius and one with zero radius).
242954
+ // Each line segment contributes its start point with zero radius, except when it follows an arc, in which case
242955
+ // it is ignored since the arc already contributes that point with the correct radius.
242956
+ // For open validatedFilletedLineString (which is guaranteed to start and end with a line segment) we also add
242957
+ // start and end points with zero radius.
242958
+ const result = [];
242959
+ const numOfChildren = validatedFilletedLineString.children.length;
242960
+ const lastChild = validatedFilletedLineString.cyclicCurvePrimitive(-1);
242961
+ let ignoreLineSegment = isClosed && lastChild && lastChild instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d;
242962
+ for (let i = 0; i < numOfChildren; i++) {
242963
+ const child = validatedFilletedLineString.children[i];
242964
+ if (child instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_3__.Arc3d) {
242965
+ this.addJointBetweenConnectedArcs(validatedFilletedLineString, i, isClosed, result);
242966
+ ignoreLineSegment = true; // ignore next line segment that follows this arc
242967
+ const tangIntersection = child.computeTangentIntersection();
242968
+ const radius = child.circularRadius();
242969
+ if (radius !== undefined && tangIntersection !== undefined)
242970
+ result.push([tangIntersection, radius]);
242971
+ else
242972
+ return undefined;
242973
+ }
242974
+ else if (child instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) {
242975
+ if (ignoreLineSegment)
242976
+ ignoreLineSegment = false;
242977
+ else
242978
+ result.push([child.startPoint(), 0]);
242979
+ }
242980
+ else if (child instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d) {
242981
+ const j0 = ignoreLineSegment ? 1 : 0;
242982
+ ignoreLineSegment = false;
242983
+ for (let j = j0; j < child.numPoints() - 1; j++)
242984
+ result.push([child.pointAtUnchecked(j), 0]);
242985
+ }
242986
+ }
242987
+ if (isClosed) {
242988
+ if (result.length > 0 && !result[0][0].isAlmostEqual(result[result.length - 1][0], options?.distanceTol))
242989
+ result.push(result[0]);
242990
+ }
242991
+ else {
242992
+ const endPoint = validatedFilletedLineString.endPoint();
242993
+ if (endPoint)
242994
+ result.push([endPoint, 0]);
242995
+ }
242996
+ return result;
242997
+ }
242753
242998
  /**
242754
242999
  * Create a `Loop` with given xy corners and fixed z.
242755
243000
  * * The corners always proceed counter clockwise from lower left.
@@ -277623,7 +277868,7 @@ class Vector3d extends XYZ {
277623
277868
  */
277624
277869
  tryNormalizeInPlace(smallestMagnitude = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallFraction) {
277625
277870
  const a = this.magnitude();
277626
- if (a < smallestMagnitude || a === 0.0)
277871
+ if (a <= Math.abs(smallestMagnitude))
277627
277872
  return false;
277628
277873
  this.scaleInPlace(1.0 / a);
277629
277874
  return true;
@@ -292513,7 +292758,7 @@ class TrigPolynomial {
292513
292758
  }
292514
292759
  return radians.length > 0;
292515
292760
  }
292516
- static _coefficientRelTol = 1.0e-12;
292761
+ static _coefficientRelTolSquared = 1.0e-24;
292517
292762
  /**
292518
292763
  * Compute intersections of the unit circle `x^2 + y^2 = 1` with the general quadric (conic)
292519
292764
  * `axx x^2 + axy xy + ayy y^2 + ax x + ay y + a = 0`.
@@ -292530,7 +292775,26 @@ class TrigPolynomial {
292530
292775
  PowerPolynomial.zero(coffs);
292531
292776
  let degree;
292532
292777
  // see core\geometry\internaldocs\unitCircleEllipseIntersection.md for derivation of these coefficients
292533
- if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXYZ(axx, axy, ayy) > TrigPolynomial._coefficientRelTol * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseXYZ(ax, ay, a)) {
292778
+ const degree1CoefficientSizeSquared = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXYZ(ax, ay, a);
292779
+ const degree2CoefficientSizeSquared = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.hypotenuseSquaredXYZ(axx, axy, ayy);
292780
+ if (degree2CoefficientSizeSquared <= TrigPolynomial._coefficientRelTolSquared * degree1CoefficientSizeSquared) {
292781
+ // terms axx, axy, ayy are small compared to ax, ay, a so ignore them
292782
+ PowerPolynomial.accumulate(coffs, this.C, ax);
292783
+ PowerPolynomial.accumulate(coffs, this.S, ay);
292784
+ PowerPolynomial.accumulate(coffs, this.W, a);
292785
+ degree = 2;
292786
+ }
292787
+ else if (degree2CoefficientSizeSquared - 2 * axx * ayy <= 2 * TrigPolynomial._coefficientRelTolSquared * degree2CoefficientSizeSquared) {
292788
+ const c = 0.5 * (axx + ayy);
292789
+ // The lhs above is (axx - ayy)^2 + axy^2. When the inequality is satisfied, both terms are "zero" (quadric is a circle).
292790
+ // With c as a stable substitute for axx and ayy, we have on the unit circle x^2 + y^2 = 1:
292791
+ // 0 = c * (x^2 + y^2) + ax*x + ay*y + a = ax*x + ay*y + a + c
292792
+ PowerPolynomial.accumulate(coffs, this.C, ax);
292793
+ PowerPolynomial.accumulate(coffs, this.S, ay);
292794
+ PowerPolynomial.accumulate(coffs, this.W, a + c);
292795
+ degree = 2;
292796
+ }
292797
+ else {
292534
292798
  PowerPolynomial.accumulate(coffs, this.CW, ax);
292535
292799
  PowerPolynomial.accumulate(coffs, this.SW, ay);
292536
292800
  PowerPolynomial.accumulate(coffs, this.WW, a);
@@ -292539,19 +292803,12 @@ class TrigPolynomial {
292539
292803
  PowerPolynomial.accumulate(coffs, this.SC, axy);
292540
292804
  degree = 4;
292541
292805
  }
292542
- else {
292543
- PowerPolynomial.accumulate(coffs, this.C, ax);
292544
- PowerPolynomial.accumulate(coffs, this.S, ay);
292545
- PowerPolynomial.accumulate(coffs, this.W, a);
292546
- degree = 2;
292547
- }
292548
292806
  const maxCoff = Math.max(Math.abs(axx), Math.abs(ayy), Math.abs(axy), Math.abs(ax), Math.abs(ay), Math.abs(a));
292549
292807
  const b = this.solveAngles(coffs, degree, maxCoff, radians);
292550
292808
  /**
292551
292809
  for (const theta of radians) {
292552
292810
  const c = Math.cos(theta)
292553
292811
  const s = Math.sin(theta)
292554
-
292555
292812
  console.log({
292556
292813
  angle: theta, co: c, si: s,
292557
292814
  f: axx * c * c + axy * c * s + ayy * s * s + ax * c + ay * s + a,
@@ -348618,7 +348875,7 @@ class TestContext {
348618
348875
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
348619
348876
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
348620
348877
  await core_frontend_1.NoRenderApp.startup({
348621
- applicationVersion: "5.9.0-dev.1",
348878
+ applicationVersion: "5.9.0-dev.2",
348622
348879
  applicationId: this.settings.gprid,
348623
348880
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
348624
348881
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -375799,7 +376056,7 @@ var loadLanguages = instance.loadLanguages;
375799
376056
  /***/ ((module) => {
375800
376057
 
375801
376058
  "use strict";
375802
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.1","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
376059
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.2","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
375803
376060
 
375804
376061
  /***/ }),
375805
376062