@itwin/rpcinterface-full-stack-tests 4.3.0-dev.15 → 4.3.0-dev.17

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.
@@ -88680,6 +88680,7 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
88680
88680
  this.registerModelSelectorListeners();
88681
88681
  this.onViewedModelsChanged.raiseEvent();
88682
88682
  }
88683
+ this.markModelSelectorChanged();
88683
88684
  }
88684
88685
  /** Create a new *blank* SpatialViewState. The returned SpatialViewState will nave non-persistent empty [[CategorySelectorState]] and [[ModelSelectorState]],
88685
88686
  * and a non-persistent [[DisplayStyle3dState]] with default values for all of its components. Generally after creating a blank SpatialViewState,
@@ -145250,7 +145251,7 @@ class RealityModelTileLoader extends _internal__WEBPACK_IMPORTED_MODULE_8__.Real
145250
145251
  }
145251
145252
  get doDrapeBackgroundMap() { return this.tree.doDrapeBackgroundMap; }
145252
145253
  get wantDeduplicatedVertices() { return this._deduplicateVertices; }
145253
- get maxDepth() { return 32; } // Can be removed when element tile selector is working.
145254
+ get maxDepth() { return Number.MAX_SAFE_INTEGER; }
145254
145255
  get minDepth() { return 0; }
145255
145256
  get priority() { return _internal__WEBPACK_IMPORTED_MODULE_8__.TileLoadPriority.Context; }
145256
145257
  getBatchIdMap() { return this._batchedIdMap; }
@@ -181323,28 +181324,31 @@ __webpack_require__.r(__webpack_exports__);
181323
181324
  /* harmony export */ ClipStepAction: () => (/* binding */ ClipStepAction),
181324
181325
  /* harmony export */ ClipUtilities: () => (/* binding */ ClipUtilities)
181325
181326
  /* harmony export */ });
181326
- /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
181327
- /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
181328
- /* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
181329
- /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
181330
- /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
181331
- /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
181332
- /* harmony import */ var _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
181333
- /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
181334
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
181335
- /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
181336
- /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
181337
- /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
181338
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
181339
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
181340
- /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
181341
- /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
181342
- /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
181343
- /* harmony import */ var _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ClipPrimitive */ "../../core/geometry/lib/esm/clipping/ClipPrimitive.js");
181344
- /* harmony import */ var _ClipVector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ClipVector */ "../../core/geometry/lib/esm/clipping/ClipVector.js");
181345
- /* harmony import */ var _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
181346
- /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
181347
- /* harmony import */ var _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./UnionOfConvexClipPlaneSets */ "../../core/geometry/lib/esm/clipping/UnionOfConvexClipPlaneSets.js");
181327
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
181328
+ /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
181329
+ /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
181330
+ /* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
181331
+ /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
181332
+ /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
181333
+ /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
181334
+ /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
181335
+ /* harmony import */ var _curve_RegionOps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
181336
+ /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
181337
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
181338
+ /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
181339
+ /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
181340
+ /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
181341
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
181342
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
181343
+ /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
181344
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
181345
+ /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
181346
+ /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
181347
+ /* harmony import */ var _ClipPrimitive__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ClipPrimitive */ "../../core/geometry/lib/esm/clipping/ClipPrimitive.js");
181348
+ /* harmony import */ var _ClipVector__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ClipVector */ "../../core/geometry/lib/esm/clipping/ClipVector.js");
181349
+ /* harmony import */ var _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
181350
+ /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
181351
+ /* harmony import */ var _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./UnionOfConvexClipPlaneSets */ "../../core/geometry/lib/esm/clipping/UnionOfConvexClipPlaneSets.js");
181348
181352
  /*---------------------------------------------------------------------------------------------
181349
181353
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
181350
181354
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -181370,6 +181374,9 @@ __webpack_require__.r(__webpack_exports__);
181370
181374
 
181371
181375
 
181372
181376
 
181377
+
181378
+
181379
+
181373
181380
 
181374
181381
 
181375
181382
 
@@ -181435,7 +181442,7 @@ class ClipUtilities {
181435
181442
  const n = unsortedFractions.length;
181436
181443
  for (let i = 1; i < n; i++) {
181437
181444
  f1 = unsortedFractions.atUncheckedIndex(i);
181438
- if (f1 > f0 + _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallFraction) {
181445
+ if (f1 > f0 + _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallFraction) {
181439
181446
  fMid = 0.5 * (f0 + f1);
181440
181447
  if (fMid >= 0.0 && fMid <= 1.0) {
181441
181448
  curve.fractionToPoint(fMid, testPoint);
@@ -181492,7 +181499,7 @@ class ClipUtilities {
181492
181499
  let result;
181493
181500
  // Create "local region" which is the result of rotating region to make
181494
181501
  // it parallel to the xy-plane and then translating it to the xy-plane.
181495
- const localToWorld = ClipUtilities._workTransform = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_1__.FrameBuilder.createRightHandedFrame(undefined, region, ClipUtilities._workTransform);
181502
+ const localToWorld = ClipUtilities._workTransform = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_2__.FrameBuilder.createRightHandedFrame(undefined, region, ClipUtilities._workTransform);
181496
181503
  if (!localToWorld)
181497
181504
  return result;
181498
181505
  const worldToLocal = localToWorld?.inverse();
@@ -181509,24 +181516,24 @@ class ClipUtilities {
181509
181516
  const localRegionRange = ClipUtilities._workRange = localRegion.range();
181510
181517
  const xLength = localRegionRange.xLength();
181511
181518
  const yLength = localRegionRange.yLength();
181512
- const rectangle = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createRectangleXY(localRegionRange.low, xLength, yLength, true);
181519
+ const rectangle = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createRectangleXY(localRegionRange.low, xLength, yLength, true);
181513
181520
  rectangle.tryTransformInPlace(localToWorld);
181514
181521
  // Clip the rectangle to produce fragment(s) which we can Boolean intersect with the input region.
181515
181522
  const insideFragments = [];
181516
181523
  const outsideFragments = [];
181517
- const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
181524
+ const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_4__.GrowableXYZArrayCache();
181518
181525
  clipper.appendPolygonClip?.(rectangle.packedPoints, insideFragments, outsideFragments, cache);
181519
181526
  if (insideFragments.length === 0)
181520
181527
  return result;
181521
181528
  // Create the "clipped region".
181522
181529
  for (const fragment of insideFragments) {
181523
- const loop = _curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(fragment);
181530
+ const loop = _curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop.createPolygon(fragment);
181524
181531
  loop.tryTransformInPlace(worldToLocal);
181525
- const clippedLocalRegion = _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__.RegionOps.regionBooleanXY(localRegion, loop, _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__.RegionBinaryOpType.Intersection);
181532
+ const clippedLocalRegion = _curve_RegionOps__WEBPACK_IMPORTED_MODULE_6__.RegionOps.regionBooleanXY(localRegion, loop, _curve_RegionOps__WEBPACK_IMPORTED_MODULE_6__.RegionBinaryOpType.Intersection);
181526
181533
  if (clippedLocalRegion) {
181527
181534
  clippedLocalRegion.tryTransformInPlace(localToWorld);
181528
181535
  if (!result)
181529
- result = (clippedLocalRegion instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__.UnionRegion) ? clippedLocalRegion : _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__.UnionRegion.create(clippedLocalRegion);
181536
+ result = (clippedLocalRegion instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_7__.UnionRegion) ? clippedLocalRegion : _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_7__.UnionRegion.create(clippedLocalRegion);
181530
181537
  else if (!result.tryAddChild(clippedLocalRegion))
181531
181538
  result.children.push(...clippedLocalRegion.children);
181532
181539
  }
@@ -181540,14 +181547,14 @@ class ClipUtilities {
181540
181547
  * @return array of clipped components of the input curve or region that lie inside the clipper
181541
181548
  */
181542
181549
  static clipAnyCurve(curve, clipper) {
181543
- if (curve instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__.CurvePrimitive)
181550
+ if (curve instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_8__.CurvePrimitive)
181544
181551
  return ClipUtilities.collectClippedCurves(curve, clipper);
181545
181552
  if (curve.isAnyRegion()) {
181546
181553
  const ret = ClipUtilities.clipAnyRegion(curve, clipper);
181547
181554
  return ret ? [ret] : [];
181548
181555
  }
181549
181556
  const result = [];
181550
- if (curve instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_8__.Path || curve instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_9__.BagOfCurves) {
181557
+ if (curve instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_9__.Path || curve instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_10__.BagOfCurves) {
181551
181558
  for (const child of curve.children) {
181552
181559
  const partialClip = ClipUtilities.clipAnyCurve(child, clipper);
181553
181560
  result.push(...partialClip);
@@ -181593,8 +181600,8 @@ class ClipUtilities {
181593
181600
  for (const plane of convexSet.planes) {
181594
181601
  let numInside = 0, numOutside = 0;
181595
181602
  const planeDistance = plane.distance - tolerance;
181596
- const currPt = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Point3d.create();
181597
- const currVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Vector3d.create();
181603
+ const currPt = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_11__.Point3d.create();
181604
+ const currVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_11__.Vector3d.create();
181598
181605
  for (let i = 0; i < points.length; i++) {
181599
181606
  points.getPoint3dAtUncheckedPointIndex(i, currPt);
181600
181607
  currVec.setFrom(currPt);
@@ -181622,15 +181629,15 @@ class ClipUtilities {
181622
181629
  * @param ignoreInvisiblePlanes if true, do NOT compute a facet for convex set faces marked invisible.
181623
181630
  */
181624
181631
  static announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet, range, loopFunction, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181625
- const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181632
+ const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181626
181633
  if (includeConvexSetFaces) {
181627
181634
  // Clip convexSet planes to the range and to the rest of the convexSet . .
181628
- if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet) {
181635
+ if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet) {
181629
181636
  for (const plane of convexSet.planes) {
181630
181637
  if (ignoreInvisiblePlanes && plane.invisible)
181631
181638
  continue;
181632
181639
  const pointsClippedToRange = plane.intersectRange(range, true);
181633
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181640
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181634
181641
  if (pointsClippedToRange) {
181635
181642
  convexSet.polygonClip(pointsClippedToRange, finalPoints, work, plane);
181636
181643
  if (finalPoints.length > 0)
@@ -181653,10 +181660,10 @@ class ClipUtilities {
181653
181660
  // clip range faces to the convex set . . .
181654
181661
  const corners = range.corners();
181655
181662
  for (let i = 0; i < 6; i++) {
181656
- const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.faceCornerIndices(i);
181657
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181658
- const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createIndexedPoints(corners, indices);
181659
- if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet) {
181663
+ const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.faceCornerIndices(i);
181664
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181665
+ const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createIndexedPoints(corners, indices);
181666
+ if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet) {
181660
181667
  convexSet.polygonClip(lineString.packedPoints, finalPoints, work);
181661
181668
  if (finalPoints.length > 0)
181662
181669
  loopFunction(finalPoints);
@@ -181681,18 +181688,18 @@ class ClipUtilities {
181681
181688
  */
181682
181689
  static loopsOfConvexClipPlaneIntersectionWithRange(allClippers, range, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181683
181690
  const result = [];
181684
- if (allClippers instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181691
+ if (allClippers instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_15__.UnionOfConvexClipPlaneSets) {
181685
181692
  for (const clipper of allClippers.convexSets) {
181686
181693
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(clipper, range, (points) => {
181687
181694
  if (points.length > 0)
181688
- result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(points));
181695
+ result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop.createPolygon(points));
181689
181696
  }, includeConvexSetFaces, includeRangeFaces, ignoreInvisiblePlanes);
181690
181697
  }
181691
181698
  }
181692
- else if (allClippers instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet || allClippers instanceof _ClipPlane__WEBPACK_IMPORTED_MODULE_15__.ClipPlane) {
181699
+ else if (allClippers instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet || allClippers instanceof _ClipPlane__WEBPACK_IMPORTED_MODULE_16__.ClipPlane) {
181693
181700
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(allClippers, range, (points) => {
181694
181701
  if (points.length > 0)
181695
- result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(points));
181702
+ result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop.createPolygon(points));
181696
181703
  }, includeConvexSetFaces, includeRangeFaces, ignoreInvisiblePlanes);
181697
181704
  }
181698
181705
  return result;
@@ -181704,7 +181711,7 @@ class ClipUtilities {
181704
181711
  * @param range range to intersect
181705
181712
  */
181706
181713
  static rangeOfConvexClipPlaneSetIntersectionWithRange(convexSet, range) {
181707
- const result = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
181714
+ const result = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.createNull();
181708
181715
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet, range, (points) => {
181709
181716
  if (points.length > 0)
181710
181717
  result.extendArray(points);
@@ -181727,22 +181734,22 @@ class ClipUtilities {
181727
181734
  static rangeOfClipperIntersectionWithRange(clipper, range, observeInvisibleFlag = true) {
181728
181735
  if (clipper === undefined)
181729
181736
  return range.clone();
181730
- if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet)
181737
+ if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet)
181731
181738
  return this.rangeOfConvexClipPlaneSetIntersectionWithRange(clipper, range);
181732
- if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181733
- const rangeUnion = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
181739
+ if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_15__.UnionOfConvexClipPlaneSets) {
181740
+ const rangeUnion = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.createNull();
181734
181741
  for (const c of clipper.convexSets) {
181735
181742
  const rangeC = this.rangeOfConvexClipPlaneSetIntersectionWithRange(c, range);
181736
181743
  rangeUnion.extendRange(rangeC);
181737
181744
  }
181738
181745
  return rangeUnion;
181739
181746
  }
181740
- if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__.ClipPrimitive) {
181747
+ if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_17__.ClipPrimitive) {
181741
181748
  if (observeInvisibleFlag && clipper.invisible)
181742
181749
  return range.clone();
181743
181750
  return this.rangeOfClipperIntersectionWithRange(clipper.fetchClipPlanesRef(), range);
181744
181751
  }
181745
- if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_17__.ClipVector) {
181752
+ if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_18__.ClipVector) {
181746
181753
  const rangeIntersection = range.clone();
181747
181754
  for (const c of clipper.clips) {
181748
181755
  if (observeInvisibleFlag && c.invisible) {
@@ -181774,21 +181781,21 @@ class ClipUtilities {
181774
181781
  static doesClipperIntersectRange(clipper, range, observeInvisibleFlag = true) {
181775
181782
  if (clipper === undefined)
181776
181783
  return true;
181777
- if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet)
181784
+ if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet)
181778
181785
  return this.doesConvexClipPlaneSetIntersectRange(clipper, range);
181779
- if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181786
+ if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_15__.UnionOfConvexClipPlaneSets) {
181780
181787
  for (const c of clipper.convexSets) {
181781
181788
  if (this.doesConvexClipPlaneSetIntersectRange(c, range))
181782
181789
  return true;
181783
181790
  }
181784
181791
  return false;
181785
181792
  }
181786
- if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__.ClipPrimitive) {
181793
+ if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_17__.ClipPrimitive) {
181787
181794
  if (observeInvisibleFlag && clipper.invisible) // um is there an easy way to detect range-completely-inside?
181788
181795
  return true;
181789
181796
  return this.doesClipperIntersectRange(clipper.fetchClipPlanesRef(), range);
181790
181797
  }
181791
- if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_17__.ClipVector) {
181798
+ if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_18__.ClipVector) {
181792
181799
  const rangeIntersection = range.clone();
181793
181800
  for (const c of clipper.clips) {
181794
181801
  if (observeInvisibleFlag && c.invisible) {
@@ -181813,7 +181820,7 @@ class ClipUtilities {
181813
181820
  * @param ignoreInvisiblePlanes if true, do NOT compute a facet for convex set faces marked invisible.
181814
181821
  */
181815
181822
  static doesConvexClipPlaneSetIntersectRange(convexSet, range, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181816
- const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181823
+ const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181817
181824
  if (includeConvexSetFaces) {
181818
181825
  // Clip convexSet planes to the range and to the rest of the convexSet . .
181819
181826
  for (const plane of convexSet.planes) {
@@ -181821,7 +181828,7 @@ class ClipUtilities {
181821
181828
  continue;
181822
181829
  const pointsClippedToRange = plane.intersectRange(range, true);
181823
181830
  if (pointsClippedToRange) {
181824
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181831
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181825
181832
  convexSet.polygonClip(pointsClippedToRange, finalPoints, work, plane);
181826
181833
  if (finalPoints.length > 0)
181827
181834
  return true;
@@ -181832,9 +181839,9 @@ class ClipUtilities {
181832
181839
  // clip range faces to the convex set . . .
181833
181840
  const corners = range.corners();
181834
181841
  for (let i = 0; i < 6; i++) {
181835
- const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.faceCornerIndices(i);
181836
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181837
- const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createIndexedPoints(corners, indices);
181842
+ const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.faceCornerIndices(i);
181843
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray();
181844
+ const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createIndexedPoints(corners, indices);
181838
181845
  convexSet.polygonClip(lineString.packedPoints, finalPoints, work);
181839
181846
  if (finalPoints.length > 0)
181840
181847
  return true;
@@ -181842,32 +181849,110 @@ class ClipUtilities {
181842
181849
  }
181843
181850
  return false;
181844
181851
  }
181852
+ /**
181853
+ * Create a clipper from the transformed range.
181854
+ * @param range input range to create clipper from
181855
+ * @param transform how to transform the range (NOTE: applied to the range faces without swelling the range volume)
181856
+ * @param degeneratePoints optionally populated with the 1 or 2 points defining the transformed range if it is degenerate (all points colinear/coincident); otherwise untouched
181857
+ * @returns newly constructed clipper. If no clip planes could be computed, fill `degeneratePoints` and return undefined.
181858
+ */
181859
+ static createClipperFromTransformedRange3d(range, transform, degeneratePoints) {
181860
+ if (!transform)
181861
+ transform = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_19__.Transform.createIdentity();
181862
+ const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_20__.PolyfaceBuilder.create();
181863
+ builder.addTransformedRangeMesh(transform, range);
181864
+ const mesh = builder.claimPolyface();
181865
+ const clipper = this._workClipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet.createConvexPolyface(mesh, this._workClipper).clipper;
181866
+ if (clipper.planes.length > 0)
181867
+ return clipper;
181868
+ // no faces found in the compressed mesh
181869
+ if (degeneratePoints) {
181870
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(mesh.data.point.length <= 2);
181871
+ for (let i = 0; i < 2; ++i) {
181872
+ const point = mesh.data.point.getPoint3dAtCheckedPointIndex(i);
181873
+ if (point)
181874
+ degeneratePoints.push(point);
181875
+ }
181876
+ }
181877
+ return undefined;
181878
+ }
181879
+ /**
181880
+ * Handle pathological cases of range-range intersection, where one of the ranges defines no area or volume (is a line segment or single point).
181881
+ * @param range local range to intersect with the point/segment
181882
+ * @param points isolated local point, or local segment's start and end
181883
+ * @param localToWorld optional transform for output range
181884
+ * @param intersection optional range of the intersection, in world coordinates, or null range if no intersection.
181885
+ * @returns whether the point/segment intersects the range
181886
+ */
181887
+ static rangeIntersectPointOrSegment(range, points, localToWorld, intersection) {
181888
+ const announceInterval = intersection ?
181889
+ (f0, f1, cp) => {
181890
+ intersection.extendPoint(cp.fractionToPoint(f0), localToWorld);
181891
+ intersection.extendPoint(cp.fractionToPoint(f1), localToWorld);
181892
+ } : undefined;
181893
+ let hasIntersection = false;
181894
+ if (points.length > 1) {
181895
+ const segment = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_21__.LineSegment3d.createCapture(points[0], points[1]);
181896
+ const clipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet.createRange3dPlanes(range);
181897
+ hasIntersection = segment.announceClipIntervals(clipper, announceInterval);
181898
+ }
181899
+ else if (points.length > 0) {
181900
+ hasIntersection = range.containsPoint(points[0]);
181901
+ if (hasIntersection && intersection)
181902
+ intersection.extendPoint(points[0], localToWorld);
181903
+ }
181904
+ return hasIntersection;
181905
+ }
181845
181906
  /**
181846
181907
  * Test for intersection of two ranges in different local coordinates.
181847
181908
  * * Useful for clash detection of elements in iModels, using their stored (tight) local ranges and placement transforms.
181848
- * @param range0 range in local coordinates of first geometry
181849
- * @param local0ToWorld placement transform for first geometry
181850
- * @param range1 range in local coordinates of second geometry
181851
- * @param local1ToWorld placement transform for second geometry. Assumed to be invertible.
181909
+ * @param range0 first range in local coordinates
181910
+ * @param local0ToWorld placement transform for first range
181911
+ * @param range1 second range in local coordinates
181912
+ * @param local1ToWorld placement transform for second range. Assumed to be invertible.
181852
181913
  * @param range1Margin optional signed local distance to expand/contract the second range before intersection. Positive expands.
181853
181914
  * @return whether the local ranges are adjacent or intersect. Also returns false if local1ToWorld is singular.
181854
181915
  */
181855
181916
  static doLocalRangesIntersect(range0, local0ToWorld, range1, local1ToWorld, range1Margin) {
181856
- const worldToLocal1 = ClipUtilities._workTransform = local1ToWorld.inverse(ClipUtilities._workTransform);
181917
+ const worldToLocal1 = this._workTransform = local1ToWorld.inverse(this._workTransform);
181857
181918
  if (!worldToLocal1)
181858
181919
  return false;
181859
181920
  let myRange1 = range1;
181860
181921
  if (range1Margin) {
181861
- myRange1 = ClipUtilities._workRange = range1.clone(ClipUtilities._workRange);
181922
+ myRange1 = this._workRange = range1.clone(this._workRange);
181862
181923
  myRange1.expandInPlace(range1Margin);
181863
181924
  }
181925
+ const degeneratePoints = [];
181926
+ const local0ToLocal1 = worldToLocal1.multiplyTransformTransform(local0ToWorld, worldToLocal1);
181864
181927
  // convert range0 into a clipper in local1 coordinates, then intersect with range1
181928
+ const clipper = this.createClipperFromTransformedRange3d(range0, local0ToLocal1, degeneratePoints);
181929
+ if (clipper)
181930
+ return this.doesClipperIntersectRange(clipper, myRange1);
181931
+ return this.rangeIntersectPointOrSegment(myRange1, degeneratePoints, local1ToWorld);
181932
+ }
181933
+ /**
181934
+ * Compute the range of the intersection between two local (e.g., element-aligned) ranges.
181935
+ * @param range0 first range in local coordinates
181936
+ * @param local0ToWorld placement transform for first range
181937
+ * @param range1 second range in local coordinates
181938
+ * @param local1ToWorld placement transform for second range. Assumed to be invertible.
181939
+ * @param result optional pre-allocated range to fill and return
181940
+ * @return range of the intersection (aligned to world axes). Returns null range if local1ToWorld is singular.
181941
+ */
181942
+ static rangeOfIntersectionOfLocalRanges(range0, local0ToWorld, range1, local1ToWorld, result) {
181943
+ const myResult = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range3d.createNull(result);
181944
+ const worldToLocal1 = this._workTransform = local1ToWorld.inverse(this._workTransform);
181945
+ if (!worldToLocal1)
181946
+ return myResult;
181947
+ const degeneratePoints = [];
181865
181948
  const local0ToLocal1 = worldToLocal1.multiplyTransformTransform(local0ToWorld, worldToLocal1);
181866
- const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_18__.PolyfaceBuilder.create();
181867
- builder.addTransformedRangeMesh(local0ToLocal1, range0);
181868
- const mesh0 = builder.claimPolyface();
181869
- const clipper = ClipUtilities._workClipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet.createConvexPolyface(mesh0, ClipUtilities._workClipper).clipper;
181870
- return ClipUtilities.doesClipperIntersectRange(clipper, myRange1);
181949
+ // convert range0 into a clipper in local1 coordinates, then intersect with range1
181950
+ const clipper = this.createClipperFromTransformedRange3d(range0, local0ToLocal1, degeneratePoints);
181951
+ if (clipper)
181952
+ this.announceLoopsOfConvexClipPlaneSetIntersectRange(clipper, range1, (loopPoints) => { loopPoints.extendRange(myResult, local1ToWorld); });
181953
+ else
181954
+ this.rangeIntersectPointOrSegment(range1, degeneratePoints, local1ToWorld, myResult);
181955
+ return myResult;
181871
181956
  }
181872
181957
  /**
181873
181958
  * Test if `obj` is a `Clipper` object.
@@ -181918,9 +182003,9 @@ class ClipUtilities {
181918
182003
  */
181919
182004
  static createXYOffsetClipFromLineString(points, leftOffset, rightOffset, z0, z1) {
181920
182005
  if (Array.isArray(points)) {
181921
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_20__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
182006
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_22__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_23__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
181922
182007
  }
181923
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
182008
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_22__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
181924
182009
  }
181925
182010
  /** If data.length >= minLength threshold, push it to destination; if smaller drop it back to the cache. */
181926
182011
  static captureOrDrop(data, minLength, destination, cache) {
@@ -182110,7 +182195,7 @@ class ClipUtilities {
182110
182195
  */
182111
182196
  static doPolygonClipSequence(xyz, clippers, acceptedIn, acceptedOut, finalCandidates, inAction, outAction, finalFragmentAction, arrayCache) {
182112
182197
  if (arrayCache === undefined)
182113
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
182198
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_4__.GrowableXYZArrayCache();
182114
182199
  let candidates = [arrayCache.grabAndFill(xyz)];
182115
182200
  let nextCandidates = [];
182116
182201
  const intermediateIn = [];
@@ -182147,7 +182232,7 @@ class ClipUtilities {
182147
182232
  /** Pass polygon `xyz` through a sequence of PolygonClip steps with "parity" rules */
182148
182233
  static doPolygonClipParitySequence(xyz, clippers, acceptedIn, acceptedOut, arrayCache) {
182149
182234
  if (arrayCache === undefined)
182150
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
182235
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_4__.GrowableXYZArrayCache();
182151
182236
  let candidatesOut = [arrayCache.grabAndFill(xyz)];
182152
182237
  let candidatesIn = [];
182153
182238
  let nextCandidatesIn = [];
@@ -182199,22 +182284,22 @@ class ClipUtilities {
182199
182284
  */
182200
182285
  static createComplementaryClips(clipper) {
182201
182286
  const planes = clipper.planes;
182202
- const interval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range1d.createNull();
182287
+ const interval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_14__.Range1d.createNull();
182203
182288
  const n = planes.length;
182204
182289
  const newClippers = [];
182205
182290
  for (const p of planes) {
182206
- const outerSet = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet.createEmpty();
182291
+ const outerSet = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_13__.ConvexClipPlaneSet.createEmpty();
182207
182292
  outerSet.addPlaneToConvexSet(p.cloneNegated());
182208
182293
  newClippers.push(outerSet);
182209
182294
  }
182210
182295
  for (let i = 0; i < n; i++) {
182211
182296
  for (let j = i + 1; j < n; j++) {
182212
- const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_21__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
182297
+ const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_24__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
182213
182298
  if (ray) {
182214
182299
  if (clipper.hasIntersectionWithRay(ray, interval)) {
182215
182300
  // the normal-to-normal vector is bisector (or close to bisector?)
182216
182301
  const newNormal = planes[j].inwardNormalRef.minus(planes[i].inwardNormalRef);
182217
- const plane1 = _ClipPlane__WEBPACK_IMPORTED_MODULE_15__.ClipPlane.createNormalAndPoint(newNormal, ray.origin);
182302
+ const plane1 = _ClipPlane__WEBPACK_IMPORTED_MODULE_16__.ClipPlane.createNormalAndPoint(newNormal, ray.origin);
182218
182303
  if (plane1) {
182219
182304
  const plane2 = plane1.cloneNegated();
182220
182305
  newClippers[i].addPlaneToConvexSet(plane1);
@@ -182224,10 +182309,10 @@ class ClipUtilities {
182224
182309
  }
182225
182310
  }
182226
182311
  }
182227
- return _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets.createConvexSets(newClippers);
182312
+ return _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_15__.UnionOfConvexClipPlaneSets.createConvexSets(newClippers);
182228
182313
  }
182229
182314
  }
182230
- ClipUtilities._selectIntervals01TestPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Point3d.create();
182315
+ ClipUtilities._selectIntervals01TestPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_11__.Point3d.create();
182231
182316
 
182232
182317
  function moveFragments(fragments, destination, arrayCache) {
182233
182318
  if (destination === undefined)
@@ -228785,7 +228870,8 @@ class Newton2dUnboundedWithDerivative extends AbstractNewtonIterator {
228785
228870
  computeStep() {
228786
228871
  if (this._func.evaluate(this._currentUV.x, this._currentUV.y)) {
228787
228872
  const fA = this._func.currentF;
228788
- if (_Polynomials__WEBPACK_IMPORTED_MODULE_3__.SmallSystem.linearSystem2d(fA.vectorU.x, fA.vectorV.x, fA.vectorU.y, fA.vectorV.y, fA.origin.x, fA.origin.y, this._currentStep))
228873
+ if ( // Given X_{n+1} = X_n - dX = X_n - JInv(X_n) F(X_n), we solve J(X_n) dX = F(X_n) for dX:
228874
+ _Polynomials__WEBPACK_IMPORTED_MODULE_3__.SmallSystem.linearSystem2d(fA.vectorU.x, fA.vectorV.x, fA.vectorU.y, fA.vectorV.y, fA.origin.x, fA.origin.y, this._currentStep))
228789
228875
  return true;
228790
228876
  }
228791
228877
  return false;
@@ -234470,6 +234556,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234470
234556
  this.addTransformedRangeMesh(transform, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__.Range3d.createXYZXYZ(0, 0, 0, 1, 1, 1));
234471
234557
  }
234472
234558
  /** Add facets for a transformed range box.
234559
+ * * For best results, the transformed range corners should define a nonzero volume or area.
234473
234560
  * @param transform applied to the range points before adding to the polyface
234474
234561
  * @param range sides become 6 quad polyface facets
234475
234562
  * @param faceSelector for each face in the order of BoxTopology.cornerIndexCCW, faceSelector[i]===false skips that facet.
@@ -281703,7 +281790,7 @@ class TestContext {
281703
281790
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
281704
281791
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
281705
281792
  await core_frontend_1.NoRenderApp.startup({
281706
- applicationVersion: "4.3.0-dev.15",
281793
+ applicationVersion: "4.3.0-dev.17",
281707
281794
  applicationId: this.settings.gprid,
281708
281795
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
281709
281796
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -285849,32 +285936,36 @@ class ContentPropertyValueFormatter {
285849
285936
  this._koqValueFormatter = _koqValueFormatter;
285850
285937
  }
285851
285938
  async formatPropertyValue(field, value, unitSystem) {
285852
- if (isFieldWithKoq(field) && typeof value === "number") {
285853
- const koq = field.properties[0].property.kindOfQuantity;
285854
- const formattedValue = await this._koqValueFormatter.format(value, { koqName: koq.name, unitSystem });
285855
- if (formattedValue !== undefined)
285856
- return formattedValue;
285857
- }
285858
- return this.formatValue(field.type, value);
285859
- }
285860
- formatValue(type, value) {
285939
+ const doubleFormatter = isFieldWithKoq(field)
285940
+ ? async (rawValue) => {
285941
+ const koq = field.properties[0].property.kindOfQuantity;
285942
+ const formattedValue = await this._koqValueFormatter.format(rawValue, { koqName: koq.name, unitSystem });
285943
+ if (formattedValue !== undefined)
285944
+ return formattedValue;
285945
+ return formatDouble(rawValue);
285946
+ }
285947
+ : async (rawValue) => formatDouble(rawValue);
285948
+ return this.formatValue(field.type, value, { doubleFormatter });
285949
+ }
285950
+ async formatValue(type, value, ctx) {
285861
285951
  switch (type.valueFormat) {
285862
285952
  case _TypeDescription__WEBPACK_IMPORTED_MODULE_1__.PropertyValueFormat.Primitive:
285863
- return this.formatPrimitiveValue(type, value);
285953
+ return this.formatPrimitiveValue(type, value, ctx);
285864
285954
  case _TypeDescription__WEBPACK_IMPORTED_MODULE_1__.PropertyValueFormat.Array:
285865
285955
  return this.formatArrayValue(type, value);
285866
285956
  case _TypeDescription__WEBPACK_IMPORTED_MODULE_1__.PropertyValueFormat.Struct:
285867
285957
  return this.formatStructValue(type, value);
285868
285958
  }
285869
285959
  }
285870
- formatPrimitiveValue(type, value) {
285960
+ async formatPrimitiveValue(type, value, ctx) {
285871
285961
  if (value === undefined)
285872
285962
  return "";
285963
+ const formatDoubleValue = async (raw) => ctx ? ctx.doubleFormatter(raw) : formatDouble(raw);
285873
285964
  if (type.typeName === "point2d" && isPoint2d(value)) {
285874
- return `X: ${formatDouble(value.x)} Y: ${formatDouble(value.y)}`;
285965
+ return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;
285875
285966
  }
285876
285967
  if (type.typeName === "point3d" && isPoint3d(value)) {
285877
- return `X: ${formatDouble(value.x)} Y: ${formatDouble(value.y)} Z: ${formatDouble(value.z)}`;
285968
+ return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;
285878
285969
  }
285879
285970
  if (type.typeName === "dateTime") {
285880
285971
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(typeof value === "string");
@@ -285890,7 +285981,7 @@ class ContentPropertyValueFormatter {
285890
285981
  }
285891
285982
  if (type.typeName === "double") {
285892
285983
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(isNumber(value));
285893
- return formatDouble(value);
285984
+ return formatDoubleValue(value);
285894
285985
  }
285895
285986
  if (type.typeName === "navigation") {
285896
285987
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isNavigationValue(value));
@@ -285898,19 +285989,19 @@ class ContentPropertyValueFormatter {
285898
285989
  }
285899
285990
  return value.toString();
285900
285991
  }
285901
- formatStructValue(type, value) {
285992
+ async formatStructValue(type, value) {
285902
285993
  if (!_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isMap(value))
285903
285994
  return {};
285904
285995
  const formattedMember = {};
285905
285996
  for (const member of type.members) {
285906
- formattedMember[member.name] = this.formatValue(member.type, value[member.name]);
285997
+ formattedMember[member.name] = await this.formatValue(member.type, value[member.name]);
285907
285998
  }
285908
285999
  return formattedMember;
285909
286000
  }
285910
- formatArrayValue(type, value) {
286001
+ async formatArrayValue(type, value) {
285911
286002
  if (!_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isArray(value))
285912
286003
  return [];
285913
- return value.map((arrayVal) => this.formatValue(type.memberType, arrayVal));
286004
+ return Promise.all(value.map(async (arrayVal) => this.formatValue(type.memberType, arrayVal)));
285914
286005
  }
285915
286006
  }
285916
286007
  function formatDouble(value) {
@@ -301111,7 +301202,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
301111
301202
  /***/ ((module) => {
301112
301203
 
301113
301204
  "use strict";
301114
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.15","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","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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.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 && 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:^4.3.0-dev.15","@itwin/core-bentley":"workspace:^4.3.0-dev.15","@itwin/core-common":"workspace:^4.3.0-dev.15","@itwin/core-geometry":"workspace:^4.3.0-dev.15","@itwin/core-orbitgt":"workspace:^4.3.0-dev.15","@itwin/core-quantity":"workspace:^4.3.0-dev.15"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
301205
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.17","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","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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.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 && 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:^4.3.0-dev.17","@itwin/core-bentley":"workspace:^4.3.0-dev.17","@itwin/core-common":"workspace:^4.3.0-dev.17","@itwin/core-geometry":"workspace:^4.3.0-dev.17","@itwin/core-orbitgt":"workspace:^4.3.0-dev.17","@itwin/core-quantity":"workspace:^4.3.0-dev.17"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
301115
301206
 
301116
301207
  /***/ }),
301117
301208