@itwin/rpcinterface-full-stack-tests 4.2.0-dev.1 → 4.2.0-dev.11

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.
@@ -29472,10 +29472,10 @@ class Tracing {
29472
29472
  static enableOpenTelemetry(tracer, api) {
29473
29473
  Tracing._tracer = tracer;
29474
29474
  Tracing._openTelemetry = api;
29475
- _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace = (category, message, metaData) => Tracing.withOpenTelemetry(() => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(category, message, metaData));
29476
- _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo = (category, message, metaData) => Tracing.withOpenTelemetry(() => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(category, message, metaData));
29477
- _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning = (category, message, metaData) => Tracing.withOpenTelemetry(() => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(category, message, metaData));
29478
- _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logError = (category, message, metaData) => Tracing.withOpenTelemetry(() => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(category, message, metaData));
29475
+ _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace = Tracing.withOpenTelemetry(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace.bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger)).bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger);
29476
+ _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo = Tracing.withOpenTelemetry(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo.bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger)).bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger);
29477
+ _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning = Tracing.withOpenTelemetry(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning.bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger)).bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger);
29478
+ _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logError = Tracing.withOpenTelemetry(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logError.bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger)).bind(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger);
29479
29479
  }
29480
29480
  static withOpenTelemetry(base, isError = false) {
29481
29481
  return (category, message, metaData) => {
@@ -34593,7 +34593,7 @@ __webpack_require__.r(__webpack_exports__);
34593
34593
  */
34594
34594
 
34595
34595
 
34596
- /** @beta */
34596
+ /** @public */
34597
34597
  class PropertyMetaDataMap {
34598
34598
  constructor(properties) {
34599
34599
  this.properties = properties;
@@ -34655,8 +34655,7 @@ class PropertyMetaDataMap {
34655
34655
  *
34656
34656
  * @note When iterating over the results, the current row will be a [[QueryRowProxy]] object. To get the row as a basic
34657
34657
  * JavaScript object, call [[QueryRowProxy.toRow]] on it.
34658
- *
34659
- * @beta
34658
+ * @public
34660
34659
  */
34661
34660
  class ECSqlReader {
34662
34661
  /**
@@ -34804,7 +34803,7 @@ class ECSqlReader {
34804
34803
  return this._done;
34805
34804
  }
34806
34805
  /**
34807
- *
34806
+ * @internal
34808
34807
  */
34809
34808
  getRowInternal() {
34810
34809
  if (this._localRows.length <= this._localOffset)
@@ -34884,7 +34883,7 @@ class ECSqlReader {
34884
34883
  return resp;
34885
34884
  }
34886
34885
  /**
34887
- *
34886
+ * @internal
34888
34887
  */
34889
34888
  formatCurrentRow(onlyReturnObject = false) {
34890
34889
  if (!onlyReturnObject && this._options.rowFormat === _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyIndexes) {
@@ -68491,6 +68490,9 @@ class Property {
68491
68490
  this._customAttributes = new Map();
68492
68491
  this._customAttributes.set(customAttribute.className, customAttribute);
68493
68492
  }
68493
+ setName(name) {
68494
+ this._name = name;
68495
+ }
68494
68496
  /**
68495
68497
  * Retrieve all custom attributes in the current property and its base
68496
68498
  * This is the async version of getCustomAttributesSync()
@@ -77043,6 +77045,7 @@ class ModelChangeMonitor {
77043
77045
  this.processBuffered();
77044
77046
  };
77045
77047
  this._removals.push(briefcase.txns.onCommitted.addListener(maybeProcess));
77048
+ this._removals.push(briefcase.txns.onReplayedExternalTxns.addListener(maybeProcess));
77046
77049
  this._removals.push(briefcase.txns.onAfterUndoRedo.addListener(maybeProcess));
77047
77050
  this._removals.push(briefcase.txns.onChangesPulled.addListener(maybeProcess));
77048
77051
  }
@@ -77374,6 +77377,14 @@ class BriefcaseTxns extends BriefcaseNotificationHandler {
77374
77377
  * @see [[onCommit]] for the event raised before the operation.
77375
77378
  */
77376
77379
  this.onCommitted = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
77380
+ /** Event raised for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.
77381
+ * @see [[onReplayedExternalTxns]] for the event raised after all such changes have been applied.
77382
+ */
77383
+ this.onReplayExternalTxns = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
77384
+ /** Event raised for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.
77385
+ * @see [[onReplayExternalTxns]] for the event raised before the changes are applied.
77386
+ */
77387
+ this.onReplayedExternalTxns = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
77377
77388
  /** Event raised after a changeset has been applied to the briefcase.
77378
77389
  * Changesets may be applied as a result of [[BriefcaseConnection.pullChanges]], or by undo/redo operations.
77379
77390
  */
@@ -77509,6 +77520,14 @@ class BriefcaseTxns extends BriefcaseNotificationHandler {
77509
77520
  this.onCommitted.raiseEvent(hasPendingTxns, time);
77510
77521
  }
77511
77522
  /** @internal */
77523
+ notifyReplayExternalTxns() {
77524
+ this.onReplayExternalTxns.raiseEvent();
77525
+ }
77526
+ /** @internal */
77527
+ notifyReplayedExternalTxns() {
77528
+ this.onReplayedExternalTxns.raiseEvent();
77529
+ }
77530
+ /** @internal */
77512
77531
  notifyChangesApplied() {
77513
77532
  this.onChangesApplied.raiseEvent();
77514
77533
  }
@@ -83274,7 +83293,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
83274
83293
  * @param params The values to bind to the parameters (if the ECSQL has any).
83275
83294
  * @param config Allow to specify certain flags which control how query is executed.
83276
83295
  * @returns Returns an [ECSqlReader]($common) which helps iterate over the result set and also give access to metadata.
83277
- * @beta
83296
+ * @public
83278
83297
  * */
83279
83298
  createQueryReader(ecsql, params, config) {
83280
83299
  const executor = {
@@ -179530,6 +179549,7 @@ __webpack_require__.r(__webpack_exports__);
179530
179549
  /* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
179531
179550
  /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
179532
179551
  /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
179552
+ /* harmony import */ var _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/Plane3d */ "../../core/geometry/lib/esm/geometry3d/Plane3d.js");
179533
179553
  /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
179534
179554
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
179535
179555
  /* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
@@ -179538,7 +179558,6 @@ __webpack_require__.r(__webpack_exports__);
179538
179558
  /* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
179539
179559
  /* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
179540
179560
  /* harmony import */ var _ClipUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
179541
- /* harmony import */ var _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/Plane3d */ "../../core/geometry/lib/esm/geometry3d/Plane3d.js");
179542
179561
  /*---------------------------------------------------------------------------------------------
179543
179562
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
179544
179563
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -179560,6 +179579,7 @@ __webpack_require__.r(__webpack_exports__);
179560
179579
  * A ClipPlane is a single plane represented as
179561
179580
  * * An inward unit normal (u,v,w)
179562
179581
  * * A signedDistance
179582
+ * More details can be found at docs/learning/geometry/Clipping.md
179563
179583
  *
179564
179584
  * Hence
179565
179585
  * * The halfspace function evaluation for "point" (x,y,z) is `(x,y,z) DOT (u,v,w) - signedDistance`.
@@ -180072,8 +180092,9 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d
180072
180092
  xyzOut.pushWrap(1);
180073
180093
  return xyzOut;
180074
180094
  }
180075
- /** Implement appendPolygonClip, as defined in interface PolygonClipper.
180076
- * @param xyz input polygon. This is not changed.
180095
+ /**
180096
+ * Implement appendPolygonClip, as defined in interface PolygonClipper.
180097
+ * @param xyz convex polygon. This is not changed.
180077
180098
  * @param insideFragments Array to receive "inside" fragments. Each fragment is a GrowableXYZArray grabbed
180078
180099
  * from the cache. This is NOT cleared.
180079
180100
  * @param outsideFragments Array to receive "outside" fragments. Each fragment is a GrowableXYZArray grabbed
@@ -180851,22 +180872,28 @@ __webpack_require__.r(__webpack_exports__);
180851
180872
  /* harmony export */ ClipStepAction: () => (/* binding */ ClipStepAction),
180852
180873
  /* harmony export */ ClipUtilities: () => (/* binding */ ClipUtilities)
180853
180874
  /* harmony export */ });
180854
- /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
180855
- /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
180856
- /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
180875
+ /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
180876
+ /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
180877
+ /* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
180878
+ /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
180879
+ /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
180880
+ /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
180881
+ /* harmony import */ var _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
180882
+ /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
180857
180883
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
180858
- /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
180859
- /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
180860
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
180861
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
180862
- /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
180863
- /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
180864
- /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
180865
- /* harmony import */ var _ClipPrimitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ClipPrimitive */ "../../core/geometry/lib/esm/clipping/ClipPrimitive.js");
180866
- /* harmony import */ var _ClipVector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ClipVector */ "../../core/geometry/lib/esm/clipping/ClipVector.js");
180867
- /* harmony import */ var _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
180868
- /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
180869
- /* harmony import */ var _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./UnionOfConvexClipPlaneSets */ "../../core/geometry/lib/esm/clipping/UnionOfConvexClipPlaneSets.js");
180884
+ /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
180885
+ /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
180886
+ /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
180887
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
180888
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
180889
+ /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
180890
+ /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
180891
+ /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
180892
+ /* harmony import */ var _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ClipPrimitive */ "../../core/geometry/lib/esm/clipping/ClipPrimitive.js");
180893
+ /* harmony import */ var _ClipVector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ClipVector */ "../../core/geometry/lib/esm/clipping/ClipVector.js");
180894
+ /* harmony import */ var _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
180895
+ /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
180896
+ /* harmony import */ var _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./UnionOfConvexClipPlaneSets */ "../../core/geometry/lib/esm/clipping/UnionOfConvexClipPlaneSets.js");
180870
180897
  /*---------------------------------------------------------------------------------------------
180871
180898
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
180872
180899
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -180888,6 +180915,12 @@ __webpack_require__.r(__webpack_exports__);
180888
180915
 
180889
180916
 
180890
180917
 
180918
+
180919
+
180920
+
180921
+
180922
+
180923
+
180891
180924
 
180892
180925
 
180893
180926
  /**
@@ -180935,7 +180968,7 @@ var ClipStatus;
180935
180968
  */
180936
180969
  class ClipUtilities {
180937
180970
  /**
180938
- * * Augment the unsortedFractionsArray with 0 and 1
180971
+ * Augment the unsortedFractionsArray with 0 and 1
180939
180972
  * * sort
180940
180973
  * * test the midpoint of each interval with `clipper.isPointOnOrInside`
180941
180974
  * * pass accepted intervals to `announce(f0,f1,curve)`
@@ -180982,7 +181015,7 @@ class ClipUtilities {
180982
181015
  return intervals.length > 0;
180983
181016
  }
180984
181017
  /**
180985
- * Find portions of the curve that are within the clipper.
181018
+ * Find portions of the curve primitive that are within the clipper.
180986
181019
  * Collect them into an array of curve primitives.
180987
181020
  */
180988
181021
  static collectClippedCurves(curve, clipper) {
@@ -180996,6 +181029,75 @@ class ClipUtilities {
180996
181029
  });
180997
181030
  return result;
180998
181031
  }
181032
+ /**
181033
+ * Find portions of the planar region that are within the clipper.
181034
+ * Collect them into a single region to return.
181035
+ */
181036
+ static clipAnyRegion(region, clipper) {
181037
+ let result;
181038
+ // Create "local region" which is the result of rotating region to make
181039
+ // it parallel to the xy-plane and then translating it to the xy-plane.
181040
+ const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_1__.FrameBuilder.createRightHandedFrame(undefined, region);
181041
+ if (!localToWorld)
181042
+ return result;
181043
+ const worldToLocal = localToWorld?.inverse();
181044
+ if (!worldToLocal)
181045
+ return result;
181046
+ const localRegion = region.cloneTransformed(worldToLocal);
181047
+ if (!localRegion)
181048
+ return result;
181049
+ // We can only clip convex polygons with our clipper machinery, but the input region doesn't have to be
181050
+ // convex or even a polygon. We get around this limitation by using a Boolean operation, which admits
181051
+ // *any* planar regions, albeit in local coordinates. First, we clip a rectangle that covers the input region
181052
+ // (in world coordinates), then we intersect the resulting fragments with the input region in local coordinates.
181053
+ // Finally, we assemble the results into a UnionRegion back in world coordinates.
181054
+ const localRegionRange = ClipUtilities._workRange = localRegion.range();
181055
+ const xLength = localRegionRange.xLength();
181056
+ const yLength = localRegionRange.yLength();
181057
+ const rectangle = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createRectangleXY(localRegionRange.low, xLength, yLength, true);
181058
+ rectangle.tryTransformInPlace(localToWorld);
181059
+ // Clip the rectangle to produce fragment(s) which we can Boolean intersect with the input region.
181060
+ const insideFragments = [];
181061
+ const outsideFragments = [];
181062
+ const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
181063
+ clipper.appendPolygonClip?.(rectangle.packedPoints, insideFragments, outsideFragments, cache);
181064
+ if (insideFragments.length === 0)
181065
+ return result;
181066
+ // Create the "clipped region".
181067
+ for (const fragment of insideFragments) {
181068
+ const loop = _curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(fragment);
181069
+ loop.tryTransformInPlace(worldToLocal);
181070
+ const clippedLocalRegion = _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__.RegionOps.regionBooleanXY(localRegion, loop, _curve_RegionOps__WEBPACK_IMPORTED_MODULE_5__.RegionBinaryOpType.Intersection);
181071
+ if (clippedLocalRegion) {
181072
+ clippedLocalRegion.tryTransformInPlace(localToWorld);
181073
+ if (!result)
181074
+ result = (clippedLocalRegion instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__.UnionRegion) ? clippedLocalRegion : _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_6__.UnionRegion.create(clippedLocalRegion);
181075
+ else if (!result.tryAddChild(clippedLocalRegion))
181076
+ result.children.push(...clippedLocalRegion.children);
181077
+ }
181078
+ }
181079
+ return result;
181080
+ }
181081
+ /**
181082
+ * Find portions of any curve that are within the clipper.
181083
+ * Collect them into an array of any curves.
181084
+ */
181085
+ static clipAnyCurve(curve, clipper) {
181086
+ if (curve instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_7__.CurvePrimitive)
181087
+ return ClipUtilities.collectClippedCurves(curve, clipper);
181088
+ if (curve.isAnyRegionType) {
181089
+ const ret = ClipUtilities.clipAnyRegion(curve, clipper);
181090
+ return ret ? [ret] : [];
181091
+ }
181092
+ const result = [];
181093
+ if (curve instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_8__.Path || curve instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_9__.BagOfCurves) {
181094
+ for (const child of curve.children) {
181095
+ const partialClip = ClipUtilities.clipAnyCurve(child, clipper);
181096
+ result.push(...partialClip);
181097
+ }
181098
+ }
181099
+ return result;
181100
+ }
180999
181101
  /**
181000
181102
  * Clip a polygon down to regions defined by each shape of a ClipShape.
181001
181103
  * @return An multidimensional array of points, where each array is the boundary of part of the remaining polygon.
@@ -181034,8 +181136,8 @@ class ClipUtilities {
181034
181136
  for (const plane of convexSet.planes) {
181035
181137
  let numInside = 0, numOutside = 0;
181036
181138
  const planeDistance = plane.distance - tolerance;
181037
- const currPt = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
181038
- const currVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
181139
+ const currPt = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Point3d.create();
181140
+ const currVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Vector3d.create();
181039
181141
  for (let i = 0; i < points.length; i++) {
181040
181142
  points.getPoint3dAtUncheckedPointIndex(i, currPt);
181041
181143
  currVec.setFrom(currPt);
@@ -181063,15 +181165,15 @@ class ClipUtilities {
181063
181165
  * @param ignoreInvisiblePlanes if true, do NOT compute a facet for convex set faces marked invisible.
181064
181166
  */
181065
181167
  static announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet, range, loopFunction, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181066
- const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181168
+ const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181067
181169
  if (includeConvexSetFaces) {
181068
181170
  // Clip convexSet planes to the range and to the rest of the convexSet . .
181069
- if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet) {
181171
+ if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet) {
181070
181172
  for (const plane of convexSet.planes) {
181071
181173
  if (ignoreInvisiblePlanes && plane.invisible)
181072
181174
  continue;
181073
181175
  const pointsClippedToRange = plane.intersectRange(range, true);
181074
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181176
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181075
181177
  if (pointsClippedToRange) {
181076
181178
  convexSet.polygonClip(pointsClippedToRange, finalPoints, work, plane);
181077
181179
  if (finalPoints.length > 0)
@@ -181094,10 +181196,10 @@ class ClipUtilities {
181094
181196
  // clip range faces to the convex set . . .
181095
181197
  const corners = range.corners();
181096
181198
  for (let i = 0; i < 6; i++) {
181097
- const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.faceCornerIndices(i);
181098
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181099
- const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d.createIndexedPoints(corners, indices);
181100
- if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet) {
181199
+ const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.faceCornerIndices(i);
181200
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181201
+ const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createIndexedPoints(corners, indices);
181202
+ if (convexSet instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet) {
181101
181203
  convexSet.polygonClip(lineString.packedPoints, finalPoints, work);
181102
181204
  if (finalPoints.length > 0)
181103
181205
  loopFunction(finalPoints);
@@ -181122,18 +181224,18 @@ class ClipUtilities {
181122
181224
  */
181123
181225
  static loopsOfConvexClipPlaneIntersectionWithRange(allClippers, range, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181124
181226
  const result = [];
181125
- if (allClippers instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__.UnionOfConvexClipPlaneSets) {
181227
+ if (allClippers instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181126
181228
  for (const clipper of allClippers.convexSets) {
181127
181229
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(clipper, range, (points) => {
181128
181230
  if (points.length > 0)
181129
- result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.createPolygon(points));
181231
+ result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(points));
181130
181232
  }, includeConvexSetFaces, includeRangeFaces, ignoreInvisiblePlanes);
181131
181233
  }
181132
181234
  }
181133
- else if (allClippers instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet || allClippers instanceof _ClipPlane__WEBPACK_IMPORTED_MODULE_8__.ClipPlane) {
181235
+ else if (allClippers instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet || allClippers instanceof _ClipPlane__WEBPACK_IMPORTED_MODULE_15__.ClipPlane) {
181134
181236
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(allClippers, range, (points) => {
181135
181237
  if (points.length > 0)
181136
- result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_7__.Loop.createPolygon(points));
181238
+ result.push(_curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.createPolygon(points));
181137
181239
  }, includeConvexSetFaces, includeRangeFaces, ignoreInvisiblePlanes);
181138
181240
  }
181139
181241
  return result;
@@ -181145,7 +181247,7 @@ class ClipUtilities {
181145
181247
  * @param range range to intersect
181146
181248
  */
181147
181249
  static rangeOfConvexClipPlaneSetIntersectionWithRange(convexSet, range) {
181148
- const result = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createNull();
181250
+ const result = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
181149
181251
  this.announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet, range, (points) => {
181150
181252
  if (points.length > 0)
181151
181253
  result.extendArray(points);
@@ -181168,22 +181270,22 @@ class ClipUtilities {
181168
181270
  static rangeOfClipperIntersectionWithRange(clipper, range, observeInvisibleFlag = true) {
181169
181271
  if (clipper === undefined)
181170
181272
  return range.clone();
181171
- if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet)
181273
+ if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet)
181172
181274
  return this.rangeOfConvexClipPlaneSetIntersectionWithRange(clipper, range);
181173
- if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__.UnionOfConvexClipPlaneSets) {
181174
- const rangeUnion = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createNull();
181275
+ if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181276
+ const rangeUnion = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
181175
181277
  for (const c of clipper.convexSets) {
181176
181278
  const rangeC = this.rangeOfConvexClipPlaneSetIntersectionWithRange(c, range);
181177
181279
  rangeUnion.extendRange(rangeC);
181178
181280
  }
181179
181281
  return rangeUnion;
181180
181282
  }
181181
- if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_9__.ClipPrimitive) {
181283
+ if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__.ClipPrimitive) {
181182
181284
  if (observeInvisibleFlag && clipper.invisible)
181183
181285
  return range.clone();
181184
181286
  return this.rangeOfClipperIntersectionWithRange(clipper.fetchClipPlanesRef(), range);
181185
181287
  }
181186
- if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_10__.ClipVector) {
181288
+ if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_17__.ClipVector) {
181187
181289
  const rangeIntersection = range.clone();
181188
181290
  for (const c of clipper.clips) {
181189
181291
  if (observeInvisibleFlag && c.invisible) {
@@ -181215,21 +181317,21 @@ class ClipUtilities {
181215
181317
  static doesClipperIntersectRange(clipper, range, observeInvisibleFlag = true) {
181216
181318
  if (clipper === undefined)
181217
181319
  return true;
181218
- if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet)
181320
+ if (clipper instanceof _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet)
181219
181321
  return this.doesConvexClipPlaneSetIntersectRange(clipper, range);
181220
- if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__.UnionOfConvexClipPlaneSets) {
181322
+ if (clipper instanceof _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets) {
181221
181323
  for (const c of clipper.convexSets) {
181222
181324
  if (this.doesConvexClipPlaneSetIntersectRange(c, range))
181223
181325
  return true;
181224
181326
  }
181225
181327
  return false;
181226
181328
  }
181227
- if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_9__.ClipPrimitive) {
181329
+ if (clipper instanceof _ClipPrimitive__WEBPACK_IMPORTED_MODULE_16__.ClipPrimitive) {
181228
181330
  if (observeInvisibleFlag && clipper.invisible) // um is there an easy way to detect range-completely-inside?
181229
181331
  return true;
181230
181332
  return this.doesClipperIntersectRange(clipper.fetchClipPlanesRef(), range);
181231
181333
  }
181232
- if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_10__.ClipVector) {
181334
+ if (clipper instanceof _ClipVector__WEBPACK_IMPORTED_MODULE_17__.ClipVector) {
181233
181335
  const rangeIntersection = range.clone();
181234
181336
  for (const c of clipper.clips) {
181235
181337
  if (observeInvisibleFlag && c.invisible) {
@@ -181254,7 +181356,7 @@ class ClipUtilities {
181254
181356
  * @param ignoreInvisiblePlanes if true, do NOT compute a facet for convex set faces marked invisible.
181255
181357
  */
181256
181358
  static doesConvexClipPlaneSetIntersectRange(convexSet, range, includeConvexSetFaces = true, includeRangeFaces = true, ignoreInvisiblePlanes = false) {
181257
- const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181359
+ const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181258
181360
  if (includeConvexSetFaces) {
181259
181361
  // Clip convexSet planes to the range and to the rest of the convexSet . .
181260
181362
  for (const plane of convexSet.planes) {
@@ -181262,7 +181364,7 @@ class ClipUtilities {
181262
181364
  continue;
181263
181365
  const pointsClippedToRange = plane.intersectRange(range, true);
181264
181366
  if (pointsClippedToRange) {
181265
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181367
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181266
181368
  convexSet.polygonClip(pointsClippedToRange, finalPoints, work, plane);
181267
181369
  if (finalPoints.length > 0)
181268
181370
  return true;
@@ -181273,9 +181375,9 @@ class ClipUtilities {
181273
181375
  // clip range faces to the convex set . . .
181274
181376
  const corners = range.corners();
181275
181377
  for (let i = 0; i < 6; i++) {
181276
- const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.faceCornerIndices(i);
181277
- const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray();
181278
- const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_5__.LineString3d.createIndexedPoints(corners, indices);
181378
+ const indices = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.faceCornerIndices(i);
181379
+ const finalPoints = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYZArray();
181380
+ const lineString = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.createIndexedPoints(corners, indices);
181279
181381
  convexSet.polygonClip(lineString.packedPoints, finalPoints, work);
181280
181382
  if (finalPoints.length > 0)
181281
181383
  return true;
@@ -181304,10 +181406,10 @@ class ClipUtilities {
181304
181406
  }
181305
181407
  // convert range0 into a clipper in local1 coordinates, then intersect with range1
181306
181408
  const local0ToLocal1 = worldToLocal1.multiplyTransformTransform(local0ToWorld, worldToLocal1);
181307
- const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.create();
181409
+ const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_18__.PolyfaceBuilder.create();
181308
181410
  builder.addTransformedRangeMesh(local0ToLocal1, range0);
181309
181411
  const mesh0 = builder.claimPolyface();
181310
- const clipper = ClipUtilities._workClipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet.createConvexPolyface(mesh0, ClipUtilities._workClipper).clipper;
181412
+ const clipper = ClipUtilities._workClipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet.createConvexPolyface(mesh0, ClipUtilities._workClipper).clipper;
181311
181413
  return ClipUtilities.doesClipperIntersectRange(clipper, myRange1);
181312
181414
  }
181313
181415
  /**
@@ -181359,9 +181461,9 @@ class ClipUtilities {
181359
181461
  */
181360
181462
  static createXYOffsetClipFromLineString(points, leftOffset, rightOffset, z0, z1) {
181361
181463
  if (Array.isArray(points)) {
181362
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_13__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
181464
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_20__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
181363
181465
  }
181364
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
181466
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_19__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
181365
181467
  }
181366
181468
  /** If data.length >= minLength threshold, push it to destination; if smaller drop it back to the cache. */
181367
181469
  static captureOrDrop(data, minLength, destination, cache) {
@@ -181551,7 +181653,7 @@ class ClipUtilities {
181551
181653
  */
181552
181654
  static doPolygonClipSequence(xyz, clippers, acceptedIn, acceptedOut, finalCandidates, inAction, outAction, finalFragmentAction, arrayCache) {
181553
181655
  if (arrayCache === undefined)
181554
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__.GrowableXYZArrayCache();
181656
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
181555
181657
  let candidates = [arrayCache.grabAndFill(xyz)];
181556
181658
  let nextCandidates = [];
181557
181659
  const intermediateIn = [];
@@ -181588,7 +181690,7 @@ class ClipUtilities {
181588
181690
  /** Pass polygon `xyz` through a sequence of PolygonClip steps with "parity" rules */
181589
181691
  static doPolygonClipParitySequence(xyz, clippers, acceptedIn, acceptedOut, arrayCache) {
181590
181692
  if (arrayCache === undefined)
181591
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__.GrowableXYZArrayCache();
181693
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_3__.GrowableXYZArrayCache();
181592
181694
  let candidatesOut = [arrayCache.grabAndFill(xyz)];
181593
181695
  let candidatesIn = [];
181594
181696
  let nextCandidatesIn = [];
@@ -181640,22 +181742,22 @@ class ClipUtilities {
181640
181742
  */
181641
181743
  static createComplementaryClips(clipper) {
181642
181744
  const planes = clipper.planes;
181643
- const interval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createNull();
181745
+ const interval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range1d.createNull();
181644
181746
  const n = planes.length;
181645
181747
  const newClippers = [];
181646
181748
  for (const p of planes) {
181647
- const outerSet = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet.createEmpty();
181749
+ const outerSet = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_12__.ConvexClipPlaneSet.createEmpty();
181648
181750
  outerSet.addPlaneToConvexSet(p.cloneNegated());
181649
181751
  newClippers.push(outerSet);
181650
181752
  }
181651
181753
  for (let i = 0; i < n; i++) {
181652
181754
  for (let j = i + 1; j < n; j++) {
181653
- const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_15__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
181755
+ const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_21__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
181654
181756
  if (ray) {
181655
181757
  if (clipper.hasIntersectionWithRay(ray, interval)) {
181656
181758
  // the normal-to-normal vector is bisector (or close to bisector?)
181657
181759
  const newNormal = planes[j].inwardNormalRef.minus(planes[i].inwardNormalRef);
181658
- const plane1 = _ClipPlane__WEBPACK_IMPORTED_MODULE_8__.ClipPlane.createNormalAndPoint(newNormal, ray.origin);
181760
+ const plane1 = _ClipPlane__WEBPACK_IMPORTED_MODULE_15__.ClipPlane.createNormalAndPoint(newNormal, ray.origin);
181659
181761
  if (plane1) {
181660
181762
  const plane2 = plane1.cloneNegated();
181661
181763
  newClippers[i].addPlaneToConvexSet(plane1);
@@ -181665,10 +181767,10 @@ class ClipUtilities {
181665
181767
  }
181666
181768
  }
181667
181769
  }
181668
- return _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__.UnionOfConvexClipPlaneSets.createConvexSets(newClippers);
181770
+ return _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_14__.UnionOfConvexClipPlaneSets.createConvexSets(newClippers);
181669
181771
  }
181670
181772
  }
181671
- ClipUtilities._selectIntervals01TestPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
181773
+ ClipUtilities._selectIntervals01TestPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_10__.Point3d.create();
181672
181774
 
181673
181775
  function moveFragments(fragments, destination, arrayCache) {
181674
181776
  if (destination === undefined)
@@ -182328,6 +182430,7 @@ class ConvexClipPlaneSet {
182328
182430
  * Create a convex clip plane set that clips to `x0 <= x <= x1` and `y0 <= y <= y1`.
182329
182431
  * * Note that there is no test for the usual ordering `x0 <= x1` or `y0 <= y1`.
182330
182432
  * * if the usual ordering is violated, the convex set is an empty set.
182433
+ * * More details can be found at docs/learning/geometry/Clipping.md
182331
182434
  */
182332
182435
  static createXYBox(x0, y0, x1, y1, result) {
182333
182436
  result = result ? result : new ConvexClipPlaneSet();
@@ -182773,7 +182876,7 @@ class ConvexClipPlaneSet {
182773
182876
  * valid clip in a parity sense.
182774
182877
  * * The containingPlane parameter allows callers within ConvexClipPlane set to bypass planes known to contain
182775
182878
  * the polygon.
182776
- * @param input input polygon, usually convex.
182879
+ * @param input polygon, usually convex.
182777
182880
  * @param output output polygon
182778
182881
  * @param work work array.
182779
182882
  * @param containingPlane if this plane is found in the convex set, it is NOT applied.
@@ -182906,7 +183009,7 @@ class ConvexClipPlaneSet {
182906
183009
  }
182907
183010
  /**
182908
183011
  * Implement appendPolygonClip, as defined in interface PolygonClipper.
182909
- * @param xyz input polygon. This is not changed.
183012
+ * @param xyz convex polygon. This is not changed.
182910
183013
  * @param insideFragments Array to receive "inside" fragments. Each fragment is a GrowableXYZArray grabbed from
182911
183014
  * the cache. This is NOT cleared.
182912
183015
  * @param outsideFragments Array to receive "outside" fragments. Each fragment is a GrowableXYZArray grabbed from
@@ -183283,8 +183386,8 @@ class UnionOfConvexClipPlaneSets {
183283
183386
  }
183284
183387
  }
183285
183388
  /**
183286
- *
183287
- * @param xyz input polygon. This is not changed.
183389
+ * Implement appendPolygonClip, as defined in interface PolygonClipper.
183390
+ * @param xyz convex polygon. This is not changed.
183288
183391
  * @param insideFragments Array to receive "inside" fragments. Each fragment is a GrowableXYZArray grabbed from
183289
183392
  * the cache. This is NOT cleared.
183290
183393
  * @param outsideFragments Array to receive "outside" fragments. Each fragment is a GrowableXYZArray grabbed from
@@ -185316,7 +185419,8 @@ __webpack_require__.r(__webpack_exports__);
185316
185419
 
185317
185420
 
185318
185421
 
185319
- /** A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.
185422
+ /**
185423
+ * A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.
185320
185424
  * @public
185321
185425
  */
185322
185426
  class CoordinateXYZ extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.GeometryQuery {
@@ -185339,9 +185443,9 @@ class CoordinateXYZ extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geometry
185339
185443
  static createXYZ(x = 0, y = 0, z = 0) {
185340
185444
  return new CoordinateXYZ(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x, y, z));
185341
185445
  }
185342
- /** return the range of the point */
185446
+ /** Return the range of the point */
185343
185447
  range() { return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(this._xyz); }
185344
- /** extend `rangeToExtend` to include this point (optionally transformed) */
185448
+ /** Extend `rangeToExtend` to include this point (optionally transformed) */
185345
185449
  extendRange(rangeToExtend, transform) {
185346
185450
  if (transform)
185347
185451
  rangeToExtend.extendTransformedXYZ(transform, this._xyz.x, this._xyz.y, this._xyz.z);
@@ -185353,31 +185457,30 @@ class CoordinateXYZ extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geometry
185353
185457
  transform.multiplyPoint3d(this._xyz, this._xyz);
185354
185458
  return true;
185355
185459
  }
185356
- /** return a transformed clone.
185357
- */
185460
+ /** Return a transformed clone */
185358
185461
  cloneTransformed(transform) {
185359
185462
  const result = new CoordinateXYZ(this._xyz.clone());
185360
185463
  result.tryTransformInPlace(transform);
185361
185464
  return result;
185362
185465
  }
185363
- /** return a clone */
185466
+ /** Return a clone */
185364
185467
  clone() {
185365
185468
  return new CoordinateXYZ(this._xyz.clone());
185366
185469
  }
185367
- /** return GeometryQuery children for recursive queries.
185368
- *
185369
- * * leaf classes do not need to implement.
185470
+ /**
185471
+ * Return GeometryQuery children for recursive queries.
185472
+ * * Leaf classes do not need to implement.
185370
185473
  */
185371
- /** test if (other instanceof Coordinate). */
185474
+ /** Test if (other instanceof Coordinate). */
185372
185475
  isSameGeometryClass(other) {
185373
185476
  return other instanceof CoordinateXYZ;
185374
185477
  }
185375
- /** test for exact structure and nearly identical geometry.
185376
- *
185478
+ /**
185479
+ * Test for exact structure and nearly identical geometry.
185377
185480
  * * Leaf classes must implement !!!
185378
- * * base class implementation recurses through children.
185379
- * * base implementation is complete for classes with children and no properties.
185380
- * * classes with both children and properties must implement for properties, call super for children.
185481
+ * * Base class implementation recurses through children.
185482
+ * * Base implementation is complete for classes with children and no properties.
185483
+ * * Classes with both children and properties must implement for properties, call super for children.
185381
185484
  */
185382
185485
  isAlmostEqual(other) {
185383
185486
  return (other instanceof CoordinateXYZ) && this._xyz.isAlmostEqual(other._xyz);
@@ -186445,7 +186548,7 @@ class CurveChain extends CurveCollection {
186445
186548
  /**
186446
186549
  * Return the index where target is found in the array of children.
186447
186550
  * @param alsoSearchProxies whether to also check proxy curves of the children
186448
- */
186551
+ */
186449
186552
  childIndex(target, alsoSearchProxies) {
186450
186553
  for (let i = 0; i < this._curves.length; i++) {
186451
186554
  if (this._curves[i] === target)
@@ -186787,7 +186890,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
186787
186890
  resetGeometry(geometryB) {
186788
186891
  this.setGeometryB(geometryB);
186789
186892
  }
186790
- /** @returns whether the `fraction` is in [0,1] within tolerance */
186893
+ /** returns true if `fraction` is in [0,1] within tolerance */
186791
186894
  acceptFraction(fraction, fractionTol = 1.0e-12) {
186792
186895
  if (fraction < -fractionTol)
186793
186896
  return false;
@@ -186829,8 +186932,9 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
186829
186932
  cpB, fractionB0, fractionB1, reversed, intervalDetails) {
186830
186933
  let globalFractionA, globalFractionB;
186831
186934
  let globalFractionA1, globalFractionB1;
186832
- const isInterval = (intervalDetails !== undefined) &&
186833
- intervalDetails.detailA.hasFraction1 && intervalDetails.detailB.hasFraction1;
186935
+ const isInterval = intervalDetails !== undefined &&
186936
+ intervalDetails.detailA.hasFraction1 &&
186937
+ intervalDetails.detailB.hasFraction1;
186834
186938
  if (isInterval) {
186835
186939
  globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
186836
186940
  globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
@@ -186964,8 +187068,8 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
186964
187068
  * @param a1 end point of line a
186965
187069
  * @param b0 start point of line b
186966
187070
  * @param b1 end point of line b
186967
- * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a.
186968
- * result.y is fraction on line b.
187071
+ * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y
187072
+ * is fraction on line b.
186969
187073
  */
186970
187074
  static segmentSegmentBoundedApproach(a0, a1, b0, b1, minDistanceSquared) {
186971
187075
  const ux = a1.x - a0.x;
@@ -187003,6 +187107,17 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
187003
187107
  closestApproach = this.updatePointToSegmentDistance(1, a1, b0, b1, -_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.dotProductXYXY(vx, vy, e10x, e10y) / vv, minDistanceSquared, closestApproach);
187004
187108
  return closestApproach;
187005
187109
  }
187110
+ /**
187111
+ * Return fractions of close approach within minDistance between two line segments( a0,a1) and (b0, b1)
187112
+ * * minDistance is assumed positive
187113
+ * Return the fractional (not xy) coordinates in result.x, result.y
187114
+ * @param a0 start point of line a
187115
+ * @param a1 end point of line a
187116
+ * @param b0 start point of line b
187117
+ * @param b1 end point of line b
187118
+ * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y
187119
+ * is fraction on line b.
187120
+ */
187006
187121
  testAndRecordFractionalPairApproach(cpA, fA0, fA1, testProjectionOnA, cpB, fB0, fB1, testProjectionOnB, reversed) {
187007
187122
  const pointA0 = cpA.fractionToPoint(fA0);
187008
187123
  const pointA1 = cpA.fractionToPoint(fA1);
@@ -187591,7 +187706,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
187591
187706
  let globalFractionA, globalFractionB;
187592
187707
  let globalFractionA1, globalFractionB1;
187593
187708
  const isInterval = intervalDetails !== undefined &&
187594
- intervalDetails.detailA.hasFraction1 && intervalDetails.detailB.hasFraction1;
187709
+ intervalDetails.detailA.hasFraction1 &&
187710
+ intervalDetails.detailB.hasFraction1;
187595
187711
  if (isInterval) {
187596
187712
  globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
187597
187713
  globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
@@ -187665,8 +187781,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
187665
187781
  this.recordPointWithLocalFractions(overlap.detailA.fraction, cpA, fractionA0, fractionA1, overlap.detailB.fraction, cpB, fractionB0, fractionB1, reversed, overlap);
187666
187782
  }
187667
187783
  else if (_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYTransverseIntersectionUnbounded(pointA0, pointA1, pointB0, pointB1, uv)) {
187668
- if (this.acceptFractionOnLine(extendA0, uv.x, extendA1, pointA0, pointA1, this._coincidentGeometryContext.tolerance)
187669
- && this.acceptFractionOnLine(extendB0, uv.y, extendB1, pointB0, pointB1, this._coincidentGeometryContext.tolerance)) {
187784
+ if (this.acceptFractionOnLine(extendA0, uv.x, extendA1, pointA0, pointA1, this._coincidentGeometryContext.tolerance) &&
187785
+ this.acceptFractionOnLine(extendB0, uv.y, extendB1, pointB0, pointB1, this._coincidentGeometryContext.tolerance)) {
187670
187786
  this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);
187671
187787
  }
187672
187788
  }
@@ -187709,8 +187825,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
187709
187825
  }
187710
187826
  }
187711
187827
  // Caller accesses data from a linestring or segment and passes it here.
187712
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters
187713
- // allow all combinations to be passed in)
187828
+ // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
187829
+ // The fraction and extend parameters allow all combinations to be passed in)
187714
187830
  dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
187715
187831
  // Arc: X = C + cU + sV
187716
187832
  // Line: contains points A0,A1
@@ -187735,7 +187851,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
187735
187851
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
187736
187852
  const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
187737
187853
  const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
187738
- if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
187854
+ if (lineFraction !== undefined &&
187855
+ this.acceptFraction(extendA0, lineFraction, extendA1) &&
187739
187856
  this.acceptFraction(extendB0, arcFraction, extendB1)) {
187740
187857
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
187741
187858
  }
@@ -187762,8 +187879,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
187762
187879
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
187763
187880
  const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
187764
187881
  const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
187765
- if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol)
187766
- && this.acceptFraction(extendB0, arcFraction, extendB1, arcFractionTol)) {
187882
+ if (lineFraction !== undefined &&
187883
+ this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
187884
+ this.acceptFraction(extendB0, arcFraction, extendB1, arcFractionTol)) {
187767
187885
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
187768
187886
  }
187769
187887
  }
@@ -188088,8 +188206,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
188088
188206
  const curvePoint = detail.point;
188089
188207
  const curvePointH = this.projectPoint(curvePoint);
188090
188208
  const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
188091
- if (lineFraction !== undefined &&
188092
- this.acceptFraction(extendA0, lineFraction, extendA1) &&
188209
+ if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
188093
188210
  this.acceptFraction(extendB, fractionB, extendB)) {
188094
188211
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed);
188095
188212
  }
@@ -193692,7 +193809,7 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
193692
193809
  curve.emitStrokes(strokes, options);
193693
193810
  return Path.create(strokes);
193694
193811
  }
193695
- /** Return the boundary type (1) of a corresponding MicroStation CurveVector */
193812
+ /** Return the boundary type (1) of a corresponding MicroStation CurveVector */
193696
193813
  dgnBoundaryType() {
193697
193814
  return 1;
193698
193815
  }
@@ -197386,7 +197503,7 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
197386
197503
  * * Returns false if the `AnyCurve` child is not a region type.
197387
197504
  */
197388
197505
  tryAddChild(child) {
197389
- if (child && child instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_1__.ParityRegion || child instanceof _Loop__WEBPACK_IMPORTED_MODULE_2__.Loop) {
197506
+ if (child && (child instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_1__.ParityRegion || child instanceof _Loop__WEBPACK_IMPORTED_MODULE_2__.Loop)) {
197390
197507
  this._children.push(child);
197391
197508
  return true;
197392
197509
  }
@@ -205418,7 +205535,6 @@ __webpack_require__.r(__webpack_exports__);
205418
205535
 
205419
205536
 
205420
205537
 
205421
- /* eslint-disable @typescript-eslint/naming-convention, no-empty */
205422
205538
 
205423
205539
 
205424
205540
 
@@ -205426,6 +205542,7 @@ __webpack_require__.r(__webpack_exports__);
205426
205542
 
205427
205543
 
205428
205544
 
205545
+ /* eslint-disable @typescript-eslint/naming-convention, no-empty */
205429
205546
  /**
205430
205547
  * Helper class to accumulate points and vectors until there is enough data to define a coordinate system.
205431
205548
  *
@@ -205433,10 +205550,10 @@ __webpack_require__.r(__webpack_exports__);
205433
205550
  * * create the FrameBuilder and make calls to announcePoint and announceVector.
205434
205551
  * * the frame will be fully determined by an origin and two vectors.
205435
205552
  * * the first call to announcePoint will set the origin.
205436
- * * additional calls to announcePoint will produce announceVector call with the vector from the origin.
205437
- * * After each announcement, call getValidatedFrame(false)
205553
+ * * additional calls to announcePoint will produce announceVector call with the vector from the origin.
205554
+ * * after each announcement, call getValidatedFrame(false)
205438
205555
  * * getValidatedFrame will succeed when it has two independent vectors.
205439
- * * to build a left handed frame,
205556
+ * * To build a left handed frame,
205440
205557
  * * an origin and 3 independent vectors are required.
205441
205558
  * * announce as above, but query with getValidatedFrame (true).
205442
205559
  * * this will use the third vector to select right or left handed frame.
@@ -205451,11 +205568,18 @@ class FrameBuilder {
205451
205568
  }
205452
205569
  return false;
205453
205570
  }
205454
- /** clear all accumulated point and vector data */
205455
- clear() { this._origin = undefined; this._vector0 = undefined; this._vector1 = undefined; this._vector2 = undefined; }
205456
- constructor() { this.clear(); }
205457
- /** Try to assemble the data into a non-singular transform.
205458
- *
205571
+ /** Clear all accumulated point and vector data */
205572
+ clear() {
205573
+ this._origin = undefined;
205574
+ this._vector0 = undefined;
205575
+ this._vector1 = undefined;
205576
+ this._vector2 = undefined;
205577
+ }
205578
+ constructor() {
205579
+ this.clear();
205580
+ }
205581
+ /**
205582
+ * Try to assemble the data into a non-singular transform.
205459
205583
  * * If allowLeftHanded is false, vector0 and vector1 determine a right handed coordinate system.
205460
205584
  * * if allowLeftHanded is true, the z vector of the right handed system can be flipped to agree with vector2 direction.
205461
205585
  */
@@ -205490,8 +205614,11 @@ class FrameBuilder {
205490
205614
  }
205491
205615
  }
205492
205616
  /** Ask if there is a defined origin for the evolving frame */
205493
- get hasOrigin() { return this._origin !== undefined; }
205494
- /** Return the number of vectors saved. Because the save process checks numerics, this should be the rank of the system.
205617
+ get hasOrigin() {
205618
+ return this._origin !== undefined;
205619
+ }
205620
+ /**
205621
+ * Return the number of vectors saved. Because the save process checks numerics, this should be the rank of the system.
205495
205622
  */
205496
205623
  savedVectorCount() {
205497
205624
  if (!this._vector0)
@@ -205502,7 +205629,9 @@ class FrameBuilder {
205502
205629
  return 2;
205503
205630
  return 3;
205504
205631
  }
205505
- /** announce a new point. If this point is different from the origin, also compute and announce the vector from the origin.*/
205632
+ /**
205633
+ * Announce a new point. If this point is different from the origin, also compute and announce the vector from the origin.
205634
+ */
205506
205635
  announcePoint(point) {
205507
205636
  if (!this._origin) {
205508
205637
  this._origin = point.clone();
@@ -205513,7 +205642,7 @@ class FrameBuilder {
205513
205642
  return this.savedVectorCount();
205514
205643
  return this.announceVector(this._origin.vectorTo(point));
205515
205644
  }
205516
- /** announce a new vector. */
205645
+ /** Announce a new vector. */
205517
205646
  announceVector(vector) {
205518
205647
  if (vector.isAlmostZero)
205519
205648
  return this.savedVectorCount();
@@ -205540,8 +205669,9 @@ class FrameBuilder {
205540
205669
  // fall through if prior vectors are all there -- no need for the new one.
205541
205670
  return 3;
205542
205671
  }
205543
- /** Inspect the content of the data. Announce points and vectors. Return when savedVectorCount becomes
205544
- * sufficient for a coordinate system.
205672
+ /**
205673
+ * Inspect the content of the data. Announce points and vectors. Return when savedVectorCount becomes sufficient
205674
+ * for a coordinate system.
205545
205675
  */
205546
205676
  announce(data) {
205547
205677
  if (this.savedVectorCount() > 1)
@@ -205622,11 +205752,11 @@ class FrameBuilder {
205622
205752
  }
205623
205753
  }
205624
205754
  }
205625
- /** create a localToWorld frame for the given data.
205626
- *
205627
- * * origin is at first point
205628
- * * x axis in direction of first nonzero vector present or implied by the input.
205629
- * * y axis is perpendicular to x and contains (in positive side) the next vector present or implied by the input.
205755
+ /**
205756
+ * Create a localToWorld frame for the given data.
205757
+ * * origin is at first point.
205758
+ * * x axis in direction of first nonzero vector present or implied by the input.
205759
+ * * y axis is perpendicular to x and contains (in positive side) the next vector present or implied by the input.
205630
205760
  */
205631
205761
  static createRightHandedFrame(defaultUpVector, ...params) {
205632
205762
  const builder = new FrameBuilder();
@@ -205661,10 +205791,11 @@ class FrameBuilder {
205661
205791
  }
205662
205792
  return undefined;
205663
205793
  }
205664
- /** create a transform containing points or vectors in the given data.
205794
+ /**
205795
+ * Create a transform containing points or vectors in the given data.
205665
205796
  * * The xy columns of the transform contain the first points or vectors of the data.
205666
205797
  * * The z column is perpendicular to that xy plane.
205667
- * * The calculation favors the first points found. It does not try to get a "best" plane.
205798
+ * * The calculation favors the first points found. It does not try to get a "best" plane.
205668
205799
  */
205669
205800
  static createRightHandedLocalToWorld(...params) {
205670
205801
  const builder = new FrameBuilder();
@@ -205677,10 +205808,9 @@ class FrameBuilder {
205677
205808
  return undefined;
205678
205809
  }
205679
205810
  /**
205680
- * try to create a frame whose xy plane is through points.
205681
- *
205682
- * * if 3 or more distinct points are present, the x axis is from the first point to the most distance, and y direction is toward the
205683
- * point most distant from that line.
205811
+ * Try to create a frame whose xy plane is through points.
205812
+ * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y
205813
+ * direction is toward the point most distant from that line.
205684
205814
  * @param points array of points
205685
205815
  */
205686
205816
  static createFrameToDistantPoints(points) {
@@ -205697,10 +205827,10 @@ class FrameBuilder {
205697
205827
  return undefined;
205698
205828
  }
205699
205829
  /**
205700
- * try to create a frame whose xy plane is through points, with the points appearing CCW in the local frame.
205830
+ * Try to create a frame whose xy plane is through points, with the points appearing CCW in the local frame.
205701
205831
  *
205702
- * * if 3 or more distinct points are present, the x axis is from the first point to the most distance, and y direction is toward the
205703
- * point most distant from that line.
205832
+ * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y
205833
+ * direction is toward the point most distant from that line.
205704
205834
  * @param points array of points
205705
205835
  */
205706
205836
  static createFrameWithCCWPolygon(points) {
@@ -206701,12 +206831,11 @@ __webpack_require__.r(__webpack_exports__);
206701
206831
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
206702
206832
  /* harmony export */ GrowableXYArray: () => (/* binding */ GrowableXYArray)
206703
206833
  /* harmony export */ });
206704
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
206834
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
206705
206835
  /* harmony import */ var _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
206706
206836
  /* harmony import */ var _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndexedXYCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYCollection.js");
206707
206837
  /* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
206708
- /* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
206709
- /* harmony import */ var _PointStreaming__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
206838
+ /* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
206710
206839
  /*---------------------------------------------------------------------------------------------
206711
206840
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
206712
206841
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -206719,7 +206848,6 @@ __webpack_require__.r(__webpack_exports__);
206719
206848
 
206720
206849
 
206721
206850
 
206722
-
206723
206851
  /** `GrowableXYArray` manages a (possibly growing) Float64Array to pack xy coordinates.
206724
206852
  * @public
206725
206853
  */
@@ -206814,26 +206942,33 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
206814
206942
  return newPoints;
206815
206943
  }
206816
206944
  /** Create an array populated from
206817
- * * An array of Point2d
206818
- * * An array of Point3d (hidden as XAndY)
206819
- * * An array of objects with keyed values, et `{x:1, y:1}`
206820
- * * A `GrowableXYZArray`
206945
+ * Valid inputs are:
206946
+ * * Point2d
206947
+ * * Point3d
206948
+ * * An array of 2 doubles
206949
+ * * An array of 3 doubles
206950
+ * * A GrowableXYZArray
206951
+ * * A GrowableXYArray
206952
+ * * Any json object satisfying Point3d.isXAndY
206953
+ * * A Float64Array of doubles, interpreted as xyxy
206954
+ * * An array of any of the above
206821
206955
  */
206822
- static create(data) {
206823
- const newPoints = new GrowableXYArray(data.length);
206824
- if (data instanceof _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray) {
206825
- newPoints.pushAllXYAndZ(data);
206956
+ static create(data, result) {
206957
+ if (result) {
206958
+ result.clear();
206826
206959
  }
206827
206960
  else {
206828
- newPoints.pushAll(data);
206961
+ const pointCount = typeof data[0] === "number" ? data.length / 2 : data.length;
206962
+ result = new GrowableXYArray(pointCount);
206829
206963
  }
206830
- return newPoints;
206964
+ result.pushFrom(data);
206965
+ return result;
206831
206966
  }
206832
- /** Restructure MultiLineStringDataVariant as array of GrowableXYZArray */
206967
+ /** Restructure MultiLineStringDataVariant as array of GrowableXYZArray
206968
+ * @deprecated in 4.x. Moved to GrowableXYZArray class.
206969
+ */
206833
206970
  static createArrayOfGrowableXYZArray(data) {
206834
- const collector = new _PointStreaming__WEBPACK_IMPORTED_MODULE_2__.PointStreamGrowableXYZArrayCollector();
206835
- _PointStreaming__WEBPACK_IMPORTED_MODULE_2__.VariantPointDataStream.streamXYZ(data, collector);
206836
- return collector.claimArrayOfGrowableXYZArray();
206971
+ return _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray.createArrayOfGrowableXYZArray(data);
206837
206972
  }
206838
206973
  /** push a point to the end of the array */
206839
206974
  push(toPush) {
@@ -206859,6 +206994,51 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
206859
206994
  this.pushXY(p.x, p.y);
206860
206995
  }
206861
206996
  }
206997
+ /** Push points from variant sources.
206998
+ * Valid inputs are:
206999
+ * * Point2d
207000
+ * * Point3d
207001
+ * * An array of 2 doubles
207002
+ * * A GrowableXYArray
207003
+ * * A GrowableXYZArray
207004
+ * * Any json object satisfying Point3d.isXAndY
207005
+ * * A Float64Array of doubles, interpreted as xyxy
207006
+ * * An array of any of the above
207007
+ */
207008
+ pushFrom(p) {
207009
+ if (p instanceof _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d) {
207010
+ this.pushXY(p.x, p.y);
207011
+ }
207012
+ else if (p instanceof _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray) {
207013
+ this.pushAllXYAndZ(p);
207014
+ }
207015
+ else if (p instanceof _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d) {
207016
+ this.pushXY(p.x, p.y);
207017
+ }
207018
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isNumberArray(p, 3) || p instanceof Float64Array) {
207019
+ const xyToAdd = Math.trunc(p.length / 2);
207020
+ this.ensureCapacity(this._xyInUse + xyToAdd, false);
207021
+ this.copyData(p, xyToAdd, this._xyInUse);
207022
+ this._xyInUse += xyToAdd;
207023
+ }
207024
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isNumberArray(p, 2)) {
207025
+ this.pushXY(p[0], p[1]);
207026
+ }
207027
+ else if (Array.isArray(p)) {
207028
+ // direct recursion re-wraps p and goes infinite. Unroll here.
207029
+ for (const q of p)
207030
+ this.pushFrom(q);
207031
+ }
207032
+ else if (_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.isXAndY(p)) {
207033
+ this.pushXY(p.x, p.y);
207034
+ }
207035
+ else if (p instanceof _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.IndexedXYCollection) {
207036
+ const n = p.length;
207037
+ this.ensureCapacity(this._xyInUse + n, false);
207038
+ for (let i = 0; i < n; i++)
207039
+ this.pushXY(p.getXAtUncheckedPointIndex(i), p.getYAtUncheckedPointIndex(i));
207040
+ }
207041
+ }
206862
207042
  /**
206863
207043
  * Replicate numWrap xy values from the front of the array as new values at the end.
206864
207044
  * @param numWrap number of xy values to replicate
@@ -207094,7 +207274,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207094
207274
  const result = [];
207095
207275
  const data = this._data;
207096
207276
  for (let i = 0; i < n; i += 2)
207097
- result.push(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(data[i], data[i + 1], z));
207277
+ result.push(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(data[i], data[i + 1], z));
207098
207278
  return result;
207099
207279
  }
207100
207280
  /** reverse the order of points. */
@@ -207188,7 +207368,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207188
207368
  const n = 2 * (this._xyInUse - 1); // Length already takes into account what specifically is in use
207189
207369
  const data = this._data;
207190
207370
  for (let i = 0; i < n; i += 2)
207191
- sum += _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.hypotenuseXY(data[i + 2] - data[i], data[i + 3] - data[i + 1]);
207371
+ sum += _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXY(data[i + 2] - data[i], data[i + 3] - data[i + 1]);
207192
207372
  return sum;
207193
207373
  }
207194
207374
  /**
@@ -207227,7 +207407,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207227
207407
  for (let i = 2; i < n; i += 2, dx1 = dx2, dy1 = dy2) {
207228
207408
  dx2 = this._data[i] - x0;
207229
207409
  dy2 = this._data[i + 1] - y0;
207230
- area += _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.crossProductXYXY(dx1, dy1, dx2, dy2);
207410
+ area += _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(dx1, dy1, dx2, dy2);
207231
207411
  }
207232
207412
  }
207233
207413
  return 0.5 * area;
@@ -207257,7 +207437,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207257
207437
  const j = targetAIndex * 2;
207258
207438
  const k = targetBIndex * 2;
207259
207439
  const data = this._data;
207260
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.crossProductXYXY(data[j] - data[i], data[j + 1] - data[i + 1], data[k] - data[i], data[k + 1] - data[i + 1]);
207440
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(data[j] - data[i], data[j + 1] - data[i + 1], data[k] - data[i], data[k + 1] - data[i + 1]);
207261
207441
  }
207262
207442
  return undefined;
207263
207443
  }
@@ -207267,7 +207447,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207267
207447
  const j = targetAIndex * 2;
207268
207448
  const k = targetBIndex * 2;
207269
207449
  const data = this._data;
207270
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.crossProductXYXY(data[j] - origin.x, data[j + 1] - origin.y, data[k] - origin.x, data[k + 1] - origin.y);
207450
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(data[j] - origin.x, data[j + 1] - origin.y, data[k] - origin.x, data[k + 1] - origin.y);
207271
207451
  }
207272
207452
  return undefined;
207273
207453
  }
@@ -207276,7 +207456,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207276
207456
  if (this.isIndexValid(i) && this.isIndexValid(j)) {
207277
207457
  const i0 = 2 * i;
207278
207458
  const j0 = 2 * j;
207279
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.hypotenuseXY(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1]);
207459
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXY(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1]);
207280
207460
  }
207281
207461
  return undefined;
207282
207462
  }
@@ -207284,7 +207464,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207284
207464
  distanceIndexToPoint(i, spacePoint) {
207285
207465
  if (this.isIndexValid(i)) {
207286
207466
  const i0 = 2 * i;
207287
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.hypotenuseXY(spacePoint.x - this._data[i0], spacePoint.y - this._data[i0 + 1]);
207467
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXY(spacePoint.x - this._data[i0], spacePoint.y - this._data[i0 + 1]);
207288
207468
  }
207289
207469
  return undefined;
207290
207470
  }
@@ -207334,7 +207514,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
207334
207514
  return this._data[2 * pointIndex + componentIndex];
207335
207515
  }
207336
207516
  /** Toleranced equality test */
207337
- isAlmostEqual(other, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallMetricDistance) {
207517
+ isAlmostEqual(other, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.smallMetricDistance) {
207338
207518
  const numXY = this._xyInUse;
207339
207519
  if (other._xyInUse !== numXY)
207340
207520
  return false;
@@ -207362,12 +207542,13 @@ __webpack_require__.r(__webpack_exports__);
207362
207542
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
207363
207543
  /* harmony export */ GrowableXYZArray: () => (/* binding */ GrowableXYZArray)
207364
207544
  /* harmony export */ });
207365
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
207545
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
207366
207546
  /* harmony import */ var _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
207367
- /* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
207368
- /* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
207369
- /* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
207370
- /* harmony import */ var _Transform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
207547
+ /* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
207548
+ /* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
207549
+ /* harmony import */ var _PointStreaming__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
207550
+ /* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
207551
+ /* harmony import */ var _Transform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
207371
207552
  /*---------------------------------------------------------------------------------------------
207372
207553
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
207373
207554
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -207381,6 +207562,7 @@ __webpack_require__.r(__webpack_exports__);
207381
207562
 
207382
207563
 
207383
207564
 
207565
+
207384
207566
  /** `GrowableXYArray` manages a (possibly growing) Float64Array to pack xy coordinates.
207385
207567
  * @public
207386
207568
  */
@@ -207483,7 +207665,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207483
207665
  /** Create an array from various point data formats.
207484
207666
  * Valid inputs are:
207485
207667
  * * Point2d
207486
- * * point3d
207668
+ * * Point3d
207487
207669
  * * An array of 2 doubles
207488
207670
  * * An array of 3 doubles
207489
207671
  * * A GrowableXYZArray
@@ -207505,6 +207687,12 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207505
207687
  result.pushFrom(data);
207506
207688
  return result;
207507
207689
  }
207690
+ /** Restructure MultiLineStringDataVariant as array of GrowableXYZArray */
207691
+ static createArrayOfGrowableXYZArray(data) {
207692
+ const collector = new _PointStreaming__WEBPACK_IMPORTED_MODULE_1__.PointStreamGrowableXYZArrayCollector();
207693
+ _PointStreaming__WEBPACK_IMPORTED_MODULE_1__.VariantPointDataStream.streamXYZ(data, collector);
207694
+ return collector.claimArrayOfGrowableXYZArray();
207695
+ }
207508
207696
  /** push a point to the end of the array */
207509
207697
  push(toPush) {
207510
207698
  this.pushXYZ(toPush.x, toPush.y, toPush.z);
@@ -207518,7 +207706,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207518
207706
  /** Push points from variant sources.
207519
207707
  * Valid inputs are:
207520
207708
  * * Point2d
207521
- * * point3d
207709
+ * * Point3d
207522
207710
  * * An array of 2 doubles
207523
207711
  * * An array of 3 doubles
207524
207712
  * * A GrowableXYZArray
@@ -207528,30 +207716,30 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207528
207716
  * * An array of any of the above
207529
207717
  */
207530
207718
  pushFrom(p) {
207531
- if (p instanceof _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d)
207719
+ if (p instanceof _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d)
207532
207720
  this.pushXYZ(p.x, p.y, p.z);
207533
207721
  else if (p instanceof GrowableXYZArray)
207534
207722
  this.pushFromGrowableXYZArray(p);
207535
- else if (p instanceof _Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d)
207723
+ else if (p instanceof _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d)
207536
207724
  this.pushXYZ(p.x, p.y, 0.0);
207537
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isNumberArray(p, 4) || p instanceof Float64Array) {
207725
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isNumberArray(p, 4) || p instanceof Float64Array) {
207538
207726
  const xyzToAdd = Math.trunc(p.length / 3);
207539
207727
  this.ensureCapacity(this._xyzInUse + xyzToAdd, false);
207540
207728
  this.copyData(p, xyzToAdd, this._xyzInUse);
207541
207729
  this._xyzInUse += xyzToAdd;
207542
207730
  }
207543
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isNumberArray(p, 3))
207731
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isNumberArray(p, 3))
207544
207732
  this.pushXYZ(p[0], p[1], p[2]);
207545
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isNumberArray(p, 2))
207733
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isNumberArray(p, 2))
207546
207734
  this.pushXYZ(p[0], p[1], 0.0);
207547
207735
  else if (Array.isArray(p)) {
207548
- // direct recursion re-wraps p and goes infinite. unroll here .
207736
+ // direct recursion re-wraps p and goes infinite. Unroll here.
207549
207737
  for (const q of p)
207550
207738
  this.pushFrom(q);
207551
207739
  }
207552
- else if (_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.isXYAndZ(p))
207740
+ else if (_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.isXYAndZ(p))
207553
207741
  this.pushXYZ(p.x, p.y, p.z);
207554
- else if (_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.isXAndY(p))
207742
+ else if (_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.isXAndY(p))
207555
207743
  this.pushXYZ(p.x, p.y, 0.0);
207556
207744
  else if (p instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0__.IndexedXYZCollection) {
207557
207745
  const n = p.length;
@@ -207652,7 +207840,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207652
207840
  */
207653
207841
  getPoint3dAtUncheckedPointIndex(pointIndex, result) {
207654
207842
  const index = 3 * pointIndex;
207655
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207843
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207656
207844
  }
207657
207845
  /**
207658
207846
  * Get a point by index, strongly typed as a Point2d. This is unchecked. Use getPoint2dAtCheckedPointIndex to have validity test.
@@ -207661,13 +207849,13 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207661
207849
  */
207662
207850
  getPoint2dAtUncheckedPointIndex(pointIndex, result) {
207663
207851
  const index = 3 * pointIndex;
207664
- return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(this._data[index], this._data[index + 1], result);
207852
+ return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d.create(this._data[index], this._data[index + 1], result);
207665
207853
  }
207666
207854
  /** copy xyz into strongly typed Point3d */
207667
207855
  getPoint3dAtCheckedPointIndex(pointIndex, result) {
207668
207856
  if (this.isIndexValid(pointIndex)) {
207669
207857
  const index = 3 * pointIndex;
207670
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207858
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207671
207859
  }
207672
207860
  return undefined;
207673
207861
  }
@@ -207690,7 +207878,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207690
207878
  getPoint2dAtCheckedPointIndex(pointIndex, result) {
207691
207879
  if (this.isIndexValid(pointIndex)) {
207692
207880
  const index = 3 * pointIndex;
207693
- return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(this._data[index], this._data[index + 1], result);
207881
+ return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d.create(this._data[index], this._data[index + 1], result);
207694
207882
  }
207695
207883
  return undefined;
207696
207884
  }
@@ -207698,7 +207886,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207698
207886
  getVector3dAtCheckedVectorIndex(vectorIndex, result) {
207699
207887
  if (this.isIndexValid(vectorIndex)) {
207700
207888
  const index = 3 * vectorIndex;
207701
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207889
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
207702
207890
  }
207703
207891
  return undefined;
207704
207892
  }
@@ -207797,7 +207985,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207797
207985
  const result = [];
207798
207986
  const data = this._data;
207799
207987
  for (let i = 0; i < n; i += 3)
207800
- result.push(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(data[i], data[i + 1], data[i + 2]));
207988
+ result.push(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(data[i], data[i + 1], data[i + 2]));
207801
207989
  return result;
207802
207990
  }
207803
207991
  /** multiply each point by the transform, replace values. */
@@ -207883,7 +208071,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207883
208071
  if (!matrix.computeCachedInverse(true))
207884
208072
  return false;
207885
208073
  const coffs = matrix.inverseCoffs;
207886
- const tol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallFloatingPoint;
208074
+ const tol = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.smallFloatingPoint;
207887
208075
  let x = 0;
207888
208076
  let y = 0;
207889
208077
  let z = 0;
@@ -207926,7 +208114,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207926
208114
  multiplyMatrix4dAndQuietRenormalizeMatrix4d(matrix) {
207927
208115
  const data = this._data;
207928
208116
  const nDouble = this.float64Length;
207929
- const xyz1 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
208117
+ const xyz1 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create();
207930
208118
  for (let i = 0; i + 2 <= nDouble; i += 3) {
207931
208119
  matrix.multiplyXYZWQuietRenormalize(data[i], data[i + 1], data[i + 2], 1.0, xyz1);
207932
208120
  data[i] = xyz1.x;
@@ -207975,7 +208163,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207975
208163
  }
207976
208164
  /** get range of points. */
207977
208165
  getRange(transform) {
207978
- const range = _Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createNull();
208166
+ const range = _Range__WEBPACK_IMPORTED_MODULE_5__.Range3d.createNull();
207979
208167
  this.extendRange(range, transform);
207980
208168
  return range;
207981
208169
  }
@@ -207990,7 +208178,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
207990
208178
  const n = 3 * (this._xyzInUse - 1); // Length already takes into account what specifically is in use
207991
208179
  const data = this._data;
207992
208180
  for (let i = 0; i < n; i += 3)
207993
- sum += _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseXYZ(data[i + 3] - data[i], data[i + 4] - data[i + 1], data[i + 5] - data[i + 2]);
208181
+ sum += _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXYZ(data[i + 3] - data[i], data[i + 4] - data[i + 1], data[i + 5] - data[i + 2]);
207994
208182
  return sum;
207995
208183
  }
207996
208184
  /**
@@ -208005,7 +208193,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208005
208193
  }
208006
208194
  }
208007
208195
  /** test if all points are within tolerance of a plane. */
208008
- isCloseToPlane(plane, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
208196
+ isCloseToPlane(plane, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.smallMetricDistance) {
208009
208197
  const numCoordinate = 3 * this._xyzInUse;
208010
208198
  const data = this._data;
208011
208199
  for (let i = 0; i < numCoordinate; i += 3)
@@ -208018,7 +208206,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208018
208206
  * * If already closed within tolerance, force exact copy
208019
208207
  * * otherwise leave unchanged.
208020
208208
  */
208021
- forceClosure(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
208209
+ forceClosure(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.smallMetricDistance) {
208022
208210
  const d = this.distanceIndexIndex(0, this.length - 1);
208023
208211
  // leave the empty array alone.
208024
208212
  // Note that singleton will generate 0 distance and do nothing.
@@ -208040,7 +208228,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208040
208228
  const data = this._data;
208041
208229
  i = 3 * i;
208042
208230
  j = 3 * j;
208043
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(fraction0 * data[i] + fraction * data[j], fraction0 * data[i + 1] + fraction * data[j + 1], fraction0 * data[i + 2] + fraction * data[j + 2], result);
208231
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(fraction0 * data[i] + fraction * data[j], fraction0 * data[i + 1] + fraction * data[j + 1], fraction0 * data[i + 2] + fraction * data[j + 2], result);
208044
208232
  }
208045
208233
  return undefined;
208046
208234
  }
@@ -208071,7 +208259,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208071
208259
  for (let i = 3; i < n; i += 3, dx1 = dx2, dy1 = dy2) {
208072
208260
  dx2 = this._data[i] - x0;
208073
208261
  dy2 = this._data[i + 1] - y0;
208074
- area += _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(dx1, dy1, dx2, dy2);
208262
+ area += _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYXY(dx1, dy1, dx2, dy2);
208075
208263
  }
208076
208264
  }
208077
208265
  return 0.5 * area;
@@ -208083,14 +208271,14 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208083
208271
  const data = this._data;
208084
208272
  i = 3 * i;
208085
208273
  j = 3 * j;
208086
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(data[j] - data[i], data[j + 1] - data[i + 1], data[j + 2] - data[i + 2], result);
208274
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(data[j] - data[i], data[j + 1] - data[i + 1], data[j + 2] - data[i + 2], result);
208087
208275
  }
208088
208276
  /** Compute a vector from origin to indexed target j */
208089
208277
  vectorXYAndZIndex(origin, j, result) {
208090
208278
  if (this.isIndexValid(j)) {
208091
208279
  const data = this._data;
208092
208280
  j = 3 * j;
208093
- return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(data[j] - origin.x, data[j + 1] - origin.y, data[j + 2] - origin.z, result);
208281
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(data[j] - origin.x, data[j + 1] - origin.y, data[j + 2] - origin.z, result);
208094
208282
  }
208095
208283
  return undefined;
208096
208284
  }
@@ -208101,7 +208289,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208101
208289
  const j = targetAIndex * 3;
208102
208290
  const k = targetBIndex * 3;
208103
208291
  const data = this._data;
208104
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYZXYZ(data[j] - data[i], data[j + 1] - data[i + 1], data[j + 2] - data[i + 2], data[k] - data[i], data[k + 1] - data[i + 1], data[k + 2] - data[i + 2], result);
208292
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYZXYZ(data[j] - data[i], data[j + 1] - data[i + 1], data[j + 2] - data[i + 2], data[k] - data[i], data[k + 1] - data[i + 1], data[k + 2] - data[i + 2], result);
208105
208293
  }
208106
208294
  return undefined;
208107
208295
  }
@@ -208149,7 +208337,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208149
208337
  const j = targetAIndex * 3;
208150
208338
  const k = targetBIndex * 3;
208151
208339
  const data = this._data;
208152
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYZXYZ(data[j] - origin.x, data[j + 1] - origin.y, data[j + 2] - origin.z, data[k] - origin.x, data[k + 1] - origin.y, data[k + 2] - origin.z, result);
208340
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.crossProductXYZXYZ(data[j] - origin.x, data[j + 1] - origin.y, data[j + 2] - origin.z, data[k] - origin.x, data[k + 1] - origin.y, data[k + 2] - origin.z, result);
208153
208341
  }
208154
208342
  return undefined;
208155
208343
  }
@@ -208157,7 +208345,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208157
208345
  distanceIndexToPoint(i, spacePoint) {
208158
208346
  if (this.isIndexValid(i)) {
208159
208347
  const i0 = 3 * i;
208160
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseXYZ(spacePoint.x - this._data[i0], spacePoint.y - this._data[i0 + 1], spacePoint.z - this._data[i0 + 2]);
208348
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXYZ(spacePoint.x - this._data[i0], spacePoint.y - this._data[i0 + 1], spacePoint.z - this._data[i0 + 2]);
208161
208349
  }
208162
208350
  return undefined;
208163
208351
  }
@@ -208170,7 +208358,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208170
208358
  if (this.isIndexValid(i) && this.isIndexValid(j)) {
208171
208359
  const i0 = 3 * i;
208172
208360
  const j0 = 3 * j;
208173
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseSquaredXYZ(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1], this._data[j0 + 2] - this._data[i0 + 2]);
208361
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseSquaredXYZ(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1], this._data[j0 + 2] - this._data[i0 + 2]);
208174
208362
  }
208175
208363
  return undefined;
208176
208364
  }
@@ -208183,7 +208371,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208183
208371
  if (this.isIndexValid(i) && this.isIndexValid(j)) {
208184
208372
  const i0 = 3 * i;
208185
208373
  const j0 = 3 * j;
208186
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseXYZ(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1], this._data[j0 + 2] - this._data[i0 + 2]);
208374
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXYZ(this._data[j0] - this._data[i0], this._data[j0 + 1] - this._data[i0 + 1], this._data[j0 + 2] - this._data[i0 + 2]);
208187
208375
  }
208188
208376
  return undefined;
208189
208377
  }
@@ -208192,7 +208380,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208192
208380
  if (arrayA.isIndexValid(i) && arrayB.isIndexValid(j)) {
208193
208381
  const i0 = 3 * i;
208194
208382
  const j0 = 3 * j;
208195
- return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseXYZ(arrayB._data[j0] - arrayA._data[i0], arrayB._data[j0 + 1] - arrayA._data[i0 + 1], arrayB._data[j0 + 2] - arrayA._data[i0 + 2]);
208383
+ return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXYZ(arrayB._data[j0] - arrayA._data[i0], arrayB._data[j0 + 1] - arrayA._data[i0 + 1], arrayB._data[j0 + 2] - arrayA._data[i0 + 2]);
208196
208384
  }
208197
208385
  return undefined;
208198
208386
  }
@@ -208271,10 +208459,10 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208271
208459
  const n = Math.min(arrayA.length, arrayB.length);
208272
208460
  let i = 0;
208273
208461
  let k0;
208274
- const range = _Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createNull();
208462
+ const range = _Range__WEBPACK_IMPORTED_MODULE_5__.Range1d.createNull();
208275
208463
  while (i < n) {
208276
208464
  k0 = 3 * i;
208277
- range.extendX(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseXYZ(dataA[k0] - dataB[k0], dataA[k0 + 1] - dataB[k0 + 1], dataA[k0 + 2] - dataB[k0 + 2]));
208465
+ range.extendX(_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.hypotenuseXYZ(dataA[k0] - dataB[k0], dataA[k0 + 1] - dataB[k0 + 1], dataA[k0 + 2] - dataB[k0 + 2]));
208278
208466
  i++;
208279
208467
  }
208280
208468
  return range;
@@ -208284,7 +208472,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208284
208472
  * @param points
208285
208473
  * @param tolerance
208286
208474
  */
208287
- static removeClosure(points, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
208475
+ static removeClosure(points, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.smallMetricDistance) {
208288
208476
  while (points.length > 1 && points.distanceIndexIndex(0, points.length - 1) < tolerance)
208289
208477
  points.pop();
208290
208478
  }
@@ -208310,7 +208498,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
208310
208498
  const vx = data[i0++] - ax;
208311
208499
  const vy = data[i0++] - ay;
208312
208500
  const vz = data[i0++] - az;
208313
- result = _Transform__WEBPACK_IMPORTED_MODULE_5__.Transform.createRowValues(ux, vx, 0, ax, uy, vy, 0, ay, uz, vz, 1, az, result);
208501
+ result = _Transform__WEBPACK_IMPORTED_MODULE_6__.Transform.createRowValues(ux, vx, 0, ax, uy, vy, 0, ay, uz, vz, 1, az, result);
208314
208502
  return result.computeCachedInverse() ? result : undefined;
208315
208503
  }
208316
208504
  return undefined;
@@ -234199,11 +234387,15 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234199
234387
  }
234200
234388
  }
234201
234389
  /** Add a polygon to the evolving facets.
234202
- *
234203
- * * Add points to the polyface
234204
- * * indices are added (in reverse order if indicated by the builder state)
234205
- * @param normals array of points. This may contain extra points not to be used in the polygon
234206
- * @param numPointsToUse number of points to use.
234390
+ * * add points to the polyface
234391
+ * * compute each point index as the point is added
234392
+ * * all data arrays are parallel to the point array
234393
+ * * point indices are added in reverse order if indicated by the builder state
234394
+ * @param points array of vertices in order around the facet
234395
+ * @param normals optional array of normals, one per vertex
234396
+ * @param params optional array of uv-parameters, one per vertex
234397
+ * @param colors optional array of colors, one per vertex
234398
+ * @param edgeVisible optional array of flags, one per vertex, true iff edge starting at corresponding vertex is visible
234207
234399
  */
234208
234400
  addFacetFromGrowableArrays(points, normals, params, colors, edgeVisible) {
234209
234401
  // don't use trailing points that match start point.
@@ -279565,7 +279757,7 @@ class TestContext {
279565
279757
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
279566
279758
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
279567
279759
  await core_frontend_1.NoRenderApp.startup({
279568
- applicationVersion: "4.2.0-dev.1",
279760
+ applicationVersion: "4.2.0-dev.11",
279569
279761
  applicationId: this.settings.gprid,
279570
279762
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
279571
279763
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -279667,6 +279859,7 @@ __webpack_require__.r(__webpack_exports__);
279667
279859
  /* harmony export */ combineFieldNames: () => (/* reexport safe */ _presentation_common_content_ContentTraverser__WEBPACK_IMPORTED_MODULE_31__.combineFieldNames),
279668
279860
  /* harmony export */ compareDiagnosticsSeverities: () => (/* reexport safe */ _presentation_common_Diagnostics__WEBPACK_IMPORTED_MODULE_1__.compareDiagnosticsSeverities),
279669
279861
  /* harmony export */ createFieldHierarchies: () => (/* reexport safe */ _presentation_common_content_ContentTraverser__WEBPACK_IMPORTED_MODULE_31__.createFieldHierarchies),
279862
+ /* harmony export */ getFieldByDescriptor: () => (/* reexport safe */ _presentation_common_content_Fields__WEBPACK_IMPORTED_MODULE_25__.getFieldByDescriptor),
279670
279863
  /* harmony export */ getFieldByName: () => (/* reexport safe */ _presentation_common_content_Fields__WEBPACK_IMPORTED_MODULE_25__.getFieldByName),
279671
279864
  /* harmony export */ getInstancesCount: () => (/* reexport safe */ _presentation_common_Utils__WEBPACK_IMPORTED_MODULE_11__.getInstancesCount),
279672
279865
  /* harmony export */ isComputeSelectionRequestOptions: () => (/* reexport safe */ _presentation_common_PresentationManagerOptions__WEBPACK_IMPORTED_MODULE_6__.isComputeSelectionRequestOptions),
@@ -282938,6 +283131,13 @@ class Descriptor {
282938
283131
  getFieldByName(name, recurse) {
282939
283132
  return (0,_Fields__WEBPACK_IMPORTED_MODULE_3__.getFieldByName)(this.fields, name, recurse);
282940
283133
  }
283134
+ /**
283135
+ * Get field by its descriptor.
283136
+ * @beta
283137
+ */
283138
+ getFieldByDescriptor(fieldDescriptor, recurse) {
283139
+ return (0,_Fields__WEBPACK_IMPORTED_MODULE_3__.getFieldByDescriptor)(this.fields, fieldDescriptor, recurse);
283140
+ }
282941
283141
  /**
282942
283142
  * Create descriptor overrides object from this descriptor.
282943
283143
  * @public
@@ -283036,6 +283236,7 @@ __webpack_require__.r(__webpack_exports__);
283036
283236
  /* harmony export */ FieldDescriptorType: () => (/* binding */ FieldDescriptorType),
283037
283237
  /* harmony export */ NestedContentField: () => (/* binding */ NestedContentField),
283038
283238
  /* harmony export */ PropertiesField: () => (/* binding */ PropertiesField),
283239
+ /* harmony export */ getFieldByDescriptor: () => (/* binding */ getFieldByDescriptor),
283039
283240
  /* harmony export */ getFieldByName: () => (/* binding */ getFieldByName)
283040
283241
  /* harmony export */ });
283041
283242
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
@@ -283191,6 +283392,14 @@ class Field {
283191
283392
  fieldName: this.name,
283192
283393
  };
283193
283394
  }
283395
+ /**
283396
+ * Checks if this field matches given field descriptor
283397
+ * @see [[getFieldDescriptor]]
283398
+ * @beta
283399
+ */
283400
+ matchesDescriptor(descriptor) {
283401
+ return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;
283402
+ }
283194
283403
  }
283195
283404
  /**
283196
283405
  * Describes a content field that's based on one or more similar
@@ -283267,6 +283476,37 @@ class PropertiesField extends Field {
283267
283476
  })),
283268
283477
  };
283269
283478
  }
283479
+ /**
283480
+ * Checks if this field matches given field descriptor
283481
+ * @see [[getFieldDescriptor]]
283482
+ * @beta
283483
+ */
283484
+ matchesDescriptor(descriptor) {
283485
+ if (!FieldDescriptor.isProperties(descriptor)) {
283486
+ return false;
283487
+ }
283488
+ // ensure at least one descriptor property matches at least one property of this field
283489
+ if (!this.properties.some(({ property: fieldProperty }) => descriptor.properties.some((descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class))) {
283490
+ return false;
283491
+ }
283492
+ // ensure path from select to property in field and in descriptor matches
283493
+ let stepsCount = 0;
283494
+ let currAncestor = this.parent;
283495
+ while (currAncestor) {
283496
+ const pathFromCurrentToItsParent = _EC__WEBPACK_IMPORTED_MODULE_1__.RelationshipPath.reverse(currAncestor.pathToPrimaryClass);
283497
+ for (const step of pathFromCurrentToItsParent) {
283498
+ if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {
283499
+ return false;
283500
+ }
283501
+ if (!_EC__WEBPACK_IMPORTED_MODULE_1__.RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {
283502
+ return false;
283503
+ }
283504
+ ++stepsCount;
283505
+ }
283506
+ currAncestor = currAncestor.parent;
283507
+ }
283508
+ return true;
283509
+ }
283270
283510
  }
283271
283511
  /**
283272
283512
  * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
@@ -283392,6 +283632,19 @@ const getFieldByName = (fields, name, recurse) => {
283392
283632
  }
283393
283633
  return undefined;
283394
283634
  };
283635
+ /** @internal */
283636
+ const getFieldByDescriptor = (fields, fieldDescriptor, recurse) => {
283637
+ for (const field of fields) {
283638
+ if (field.matchesDescriptor(fieldDescriptor))
283639
+ return field;
283640
+ if (recurse && field.isNestedContentField()) {
283641
+ const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);
283642
+ if (nested)
283643
+ return nested;
283644
+ }
283645
+ }
283646
+ return undefined;
283647
+ };
283395
283648
  /**
283396
283649
  * Types of different field descriptors.
283397
283650
  * @public
@@ -298938,7 +299191,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
298938
299191
  /***/ ((module) => {
298939
299192
 
298940
299193
  "use strict";
298941
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.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","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.2.0-dev.1","@itwin/core-bentley":"workspace:^4.2.0-dev.1","@itwin/core-common":"workspace:^4.2.0-dev.1","@itwin/core-geometry":"workspace:^4.2.0-dev.1","@itwin/core-orbitgt":"workspace:^4.2.0-dev.1","@itwin/core-quantity":"workspace:^4.2.0-dev.1"},"//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.1.2","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","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.0.0","@itwin/object-storage-core":"^2.0.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"}}');
299194
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.11","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.2.0-dev.11","@itwin/core-bentley":"workspace:^4.2.0-dev.11","@itwin/core-common":"workspace:^4.2.0-dev.11","@itwin/core-geometry":"workspace:^4.2.0-dev.11","@itwin/core-orbitgt":"workspace:^4.2.0-dev.11","@itwin/core-quantity":"workspace:^4.2.0-dev.11"},"//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.1.2","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","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"}}');
298942
299195
 
298943
299196
  /***/ }),
298944
299197