@itwin/ecschema-rpcinterface-tests 4.1.0-dev.25 → 4.1.0-dev.26

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.
@@ -149603,18 +149603,25 @@ class ImageryMapLayerTreeSupplier {
149603
149603
  * This allows the ID to serve as a lookup key to find the corresponding TileTree.
149604
149604
  */
149605
149605
  compareTileTreeIds(lhs, rhs) {
149606
- let cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.settings.url, rhs.settings.url);
149606
+ let cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.settings.formatId, rhs.settings.formatId);
149607
149607
  if (0 === cmp) {
149608
- cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.settings.userName, rhs.settings.userName);
149608
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.settings.url, rhs.settings.url);
149609
149609
  if (0 === cmp) {
149610
- cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.settings.password, rhs.settings.password);
149610
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.settings.userName, rhs.settings.userName);
149611
149611
  if (0 === cmp) {
149612
- cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.settings.transparentBackground, rhs.settings.transparentBackground);
149612
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.settings.password, rhs.settings.password);
149613
149613
  if (0 === cmp) {
149614
- cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.settings.subLayers.length, rhs.settings.subLayers.length);
149614
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.settings.transparentBackground, rhs.settings.transparentBackground);
149615
149615
  if (0 === cmp) {
149616
- for (let i = 0; i < lhs.settings.subLayers.length && 0 === cmp; i++)
149617
- cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.settings.subLayers[i].visible, rhs.settings.subLayers[i].visible);
149616
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.settings.subLayers.length, rhs.settings.subLayers.length);
149617
+ if (0 === cmp) {
149618
+ for (let i = 0; i < lhs.settings.subLayers.length && 0 === cmp; i++) {
149619
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs.settings.subLayers[i].name, rhs.settings.subLayers[i].name);
149620
+ if (0 === cmp) {
149621
+ cmp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.settings.subLayers[i].visible, rhs.settings.subLayers[i].visible);
149622
+ }
149623
+ }
149624
+ }
149618
149625
  }
149619
149626
  }
149620
149627
  }
@@ -180053,6 +180060,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
180053
180060
  /**
180054
180061
  * Return a clone of this arc, projected to given z value.
180055
180062
  * * If `z` is omitted, the clone is at the z of the center.
180063
+ * * This function projects the arc into a plane parallel to xy-plane.
180056
180064
  * * Note that projection to fixed z can change circle into ellipse (and (rarely) ellipse to circle)
180057
180065
  */
180058
180066
  cloneAtZ(z) {
@@ -182067,10 +182075,12 @@ __webpack_require__.r(__webpack_exports__);
182067
182075
  * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:
182068
182076
  * - `CurveChain` is a (non-instantiable) intermediate class for a sequence of `CurvePrimitive` joining head-to-tail.
182069
182077
  * The two instantiable forms of `CurveChain` are
182070
- * - `Path` - A chain not required to close, and not enclosing a planar area
182071
- * - `Loop` - A chain required to close from last to first so that a planar area is enclosed.
182072
- * - `ParityRegion` -- a collection of coplanar `Loop`s, with "in/out" classification by parity rules
182073
- * - `UnionRegion` -- a collection of coplanar `Loop`s, with "in/out" classification by union rules
182078
+ * - `Path` - A chain not required to close and not enclosing a planar area (so curves do not have to be on the
182079
+ * same plane).
182080
+ * - `Loop` - A chain required to close from last to first so that a planar area is enclosed (so curves have to
182081
+ * be on the same plane).
182082
+ * - `ParityRegion` -- a collection of coplanar `Loop`s, with "in/out" classification by parity rules.
182083
+ * - `UnionRegion` -- a collection of coplanar `Loop`s, with "in/out" classification by union rules.
182074
182084
  * - `BagOfCurves` -- a collection of `AnyCurve` with no implied structure.
182075
182085
  *
182076
182086
  * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.
@@ -182110,7 +182120,7 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182110
182120
  * Return the max gap between adjacent primitives in Path and Loop collections.
182111
182121
  * * In a Path, gaps are computed between consecutive primitives.
182112
182122
  * * In a Loop, gaps are computed between consecutive primitives and between last and first.
182113
- * * gaps are NOT computed between consecutive CurvePrimitives in "unstructured" collections. The type is
182123
+ * * Gaps are NOT computed between consecutive CurvePrimitives in "unstructured" collections. The type is
182114
182124
  * "unstructured" so gaps should not be semantically meaningful.
182115
182125
  */
182116
182126
  maxGap() {
@@ -182132,11 +182142,15 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182132
182142
  cloneTransformed(transform) {
182133
182143
  return _internalContexts_CloneCurvesContext__WEBPACK_IMPORTED_MODULE_7__.CloneCurvesContext.clone(this, transform);
182134
182144
  }
182135
- /** Create a deep copy with all linestrings expanded to multiple LineSegment3d. */
182145
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
182136
182146
  cloneWithExpandedLineStrings() {
182137
182147
  return _internalContexts_CloneWithExpandedLineStrings__WEBPACK_IMPORTED_MODULE_8__.CloneWithExpandedLineStrings.clone(this);
182138
182148
  }
182139
- /** Recurse through children to collect CurvePrimitive's in flat array. */
182149
+ /**
182150
+ * Push all CurvePrimitives contained in the instance onto the `results` array.
182151
+ * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives
182152
+ * of the Loop are pushed onto `results`.
182153
+ */
182140
182154
  collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings = false) {
182141
182155
  if (this.children) {
182142
182156
  for (const child of this.children) {
@@ -182148,10 +182162,12 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182148
182162
  }
182149
182163
  }
182150
182164
  /**
182151
- * Return an array containing only the curve primitives.
182165
+ * Return an array containing all CurvePrimitives in the instance.
182166
+ * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of
182167
+ * the Loop are pushed onto the returned array.
182152
182168
  * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without
182153
- * clearing the array.)
182154
- * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,
182169
+ * clearing the array).
182170
+ * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,
182155
182171
  * it recurses to its (otherwise hidden) children.
182156
182172
  */
182157
182173
  collectCurvePrimitives(collectorArray, smallestPossiblePrimitives = false, explodeLineStrings = false) {
@@ -182166,7 +182182,7 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182166
182182
  * * `UnionRegion`
182167
182183
  */
182168
182184
  get isAnyRegionType() {
182169
- return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 5 || this.dgnBoundaryType() === 4;
182185
+ return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;
182170
182186
  }
182171
182187
  /** Return true for a `Path`, i.e. a chain of curves joined head-to-tail */
182172
182188
  get isOpenPath() {
@@ -182174,12 +182190,16 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182174
182190
  }
182175
182191
  /**
182176
182192
  * Return true for a single-loop planar region type, i.e. `Loop`.
182177
- * * This is _not- a test for physical closure of a `Path`
182193
+ * * This is NOT a test for physical closure of a `Path`.
182178
182194
  */
182179
182195
  get isClosedPath() {
182180
182196
  return this.dgnBoundaryType() === 2;
182181
182197
  }
182182
- /** Extend (increase) `rangeToExtend` as needed to include these curves (optionally transformed) */
182198
+ /**
182199
+ * Extend (increase) the given range as needed to encompass all curves in the curve collection.
182200
+ * @param rangeToExtend the given range.
182201
+ * @param transform if supplied, the range is extended with transformed curves.
182202
+ */
182183
182203
  extendRange(rangeToExtend, transform) {
182184
182204
  const children = this.children;
182185
182205
  if (children) {
@@ -182189,8 +182209,8 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182189
182209
  }
182190
182210
  }
182191
182211
  /**
182192
- * * Find any curve primitive in the source.
182193
- * * Evaluate it at a fraction (which by default is an interior fraction)
182212
+ * Find any CurvePrimitive in the source and evaluate it at the given fraction.
182213
+ * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.
182194
182214
  * @param source containing `CurvePrimitive` or `CurveCollection`
182195
182215
  * @param fraction fraction to use in `curve.fractionToPoint(fraction)`
182196
182216
  */
@@ -182222,19 +182242,20 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
182222
182242
  }
182223
182243
  /**
182224
182244
  * Shared base class for use by both open and closed paths.
182225
- * - A `CurveChain` contains only curvePrimitives. No other paths, loops, or regions allowed.
182226
- * - A single entry in the chain can in fact contain multiple curve primitives if the entry itself is (for instance)
182227
- * `CurveChainWithDistanceIndex`
182228
- * which presents itself (through method interface) as a CurvePrimitive with well defined mappings from fraction
182229
- * to xyz, but in fact does all the
182230
- * calculations over multiple primitives.
182231
- * - The specific derived classes are `Path` and `Loop`
182232
- * - `CurveChain` is an intermediate class. It is not instantiable on its own.
182245
+ * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.
182246
+ * * The specific derived classes are `Path` and `Loop`
182247
+ * * `CurveChain` is an intermediate class. It is not instantiable on its own.
182248
+ * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings
182249
+ * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.
182233
182250
  * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.
182234
182251
  * @public
182235
182252
  */
182236
182253
  class CurveChain extends CurveCollection {
182237
- constructor() { super(); this._curves = []; }
182254
+ /** Constructor */
182255
+ constructor() {
182256
+ super();
182257
+ this._curves = [];
182258
+ }
182238
182259
  /** Return the array of `CurvePrimitive` */
182239
182260
  get children() {
182240
182261
  if (this._curves === undefined)
@@ -182242,7 +182263,7 @@ class CurveChain extends CurveCollection {
182242
182263
  return this._curves;
182243
182264
  }
182244
182265
  /**
182245
- * Return the `[index]` curve primitive, optionally using `modulo` to map`index` to the cyclic indexing.
182266
+ * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.
182246
182267
  * * In particular, `-1` is the final curve.
182247
182268
  * @param index cyclic index
182248
182269
  */
@@ -182250,8 +182271,7 @@ class CurveChain extends CurveCollection {
182250
182271
  const n = this.children.length;
182251
182272
  if (n === 0)
182252
182273
  return undefined;
182253
- /** Try simplest non-cyclic access first . . */
182254
- if (index >= 0 && index < n)
182274
+ if (index >= 0 && index < n) // try simplest non-cyclic access first
182255
182275
  return this.children[index];
182256
182276
  if (cyclic) {
182257
182277
  const index2 = _Geometry__WEBPACK_IMPORTED_MODULE_10__.Geometry.modulo(index, n);
@@ -182264,6 +182284,11 @@ class CurveChain extends CurveCollection {
182264
182284
  * @param options tolerance parameters controlling the stroking.
182265
182285
  */
182266
182286
  getPackedStrokes(options) {
182287
+ /**
182288
+ * The object returned by "cloneStroked" has the same type (Loop or Path) but instead of a chain of
182289
+ * CurvePrimitives as children, it has a single LineString3d child. "getPackedStrokes" just returns
182290
+ * the points of that LineString3d using "packedPoints".
182291
+ */
182267
182292
  const tree = this.cloneStroked(options);
182268
182293
  if (tree instanceof CurveChain) {
182269
182294
  const children = tree.children;
@@ -182275,16 +182300,6 @@ class CurveChain extends CurveCollection {
182275
182300
  }
182276
182301
  return undefined;
182277
182302
  }
182278
- /* EDL 01/20 Path, Loop, CurveChainWithDistanceIndex all implement this.
182279
- Reducing it to abstract.
182280
- Hypothetically, a derived class in the wild might be depending on this.
182281
- {
182282
- const strokes = LineString3d.create();
182283
- for (const curve of this.children)
182284
- curve.emitStrokes(strokes, options);
182285
- return strokes;
182286
- }
182287
- */
182288
182303
  /**
182289
182304
  * Add a child curve.
182290
182305
  * * Returns false if the given child is not a CurvePrimitive.
@@ -182317,7 +182332,7 @@ class CurveChain extends CurveCollection {
182317
182332
  this._curves.reverse();
182318
182333
  }
182319
182334
  /**
182320
- * Return the index where target is found in the array of children
182335
+ * Return the index where target is found in the array of children.
182321
182336
  * @param alsoSearchProxies whether to also check proxy curves of the children
182322
182337
  */
182323
182338
  childIndex(target, alsoSearchProxies) {
@@ -182336,7 +182351,7 @@ class CurveChain extends CurveCollection {
182336
182351
  }
182337
182352
  return undefined;
182338
182353
  }
182339
- /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */
182354
+ /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */
182340
182355
  primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index, fraction, cyclic = false, result) {
182341
182356
  const primitive = this.cyclicCurvePrimitive(index, cyclic);
182342
182357
  if (primitive) {
@@ -185568,7 +185583,7 @@ var CurveIntervalRole;
185568
185583
  (function (CurveIntervalRole) {
185569
185584
  /** This point is an isolated point NOT at a primary vertex. */
185570
185585
  CurveIntervalRole[CurveIntervalRole["isolated"] = 0] = "isolated";
185571
- /** This point is an isolated vertex hit */
185586
+ /** This point is an isolated vertex hit */
185572
185587
  CurveIntervalRole[CurveIntervalRole["isolatedAtVertex"] = 1] = "isolatedAtVertex";
185573
185588
  /** This is the beginning of an interval */
185574
185589
  CurveIntervalRole[CurveIntervalRole["intervalStart"] = 10] = "intervalStart";
@@ -185583,11 +185598,11 @@ var CurveIntervalRole;
185583
185598
  */
185584
185599
  var CurveSearchStatus;
185585
185600
  (function (CurveSearchStatus) {
185586
- /** unimplemented or zero length curve */
185601
+ /** Unimplemented or zero length curve */
185587
185602
  CurveSearchStatus[CurveSearchStatus["error"] = 0] = "error";
185588
- /** complete success of search */
185603
+ /** Complete success of search */
185589
185604
  CurveSearchStatus[CurveSearchStatus["success"] = 1] = "success";
185590
- /** search ended prematurely (e.g. at incomplete distance moved) at start or end of curve */
185605
+ /** Search ended prematurely (e.g. at incomplete distance moved) at start or end of curve */
185591
185606
  CurveSearchStatus[CurveSearchStatus["stoppedAtBoundary"] = 2] = "stoppedAtBoundary";
185592
185607
  })(CurveSearchStatus || (CurveSearchStatus = {}));
185593
185608
  /**
@@ -185610,7 +185625,7 @@ function optionalVectorUpdate(source, result) {
185610
185625
  * @public
185611
185626
  */
185612
185627
  class CurveLocationDetail {
185613
- /** constructor */
185628
+ /** Constructor */
185614
185629
  constructor() {
185615
185630
  this.pointQ = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
185616
185631
  this.fraction = 0;
@@ -185708,8 +185723,10 @@ class CurveLocationDetail {
185708
185723
  return this.setFP(fraction, ray.origin, ray.direction, a);
185709
185724
  }
185710
185725
  /** Set the CurvePrimitive pointer, leaving all other properties untouched. */
185711
- setCurve(curve) { this.curve = curve; }
185712
- /** record the distance from the CurveLocationDetail's point to the parameter point. */
185726
+ setCurve(curve) {
185727
+ this.curve = curve;
185728
+ }
185729
+ /** Record the distance from the CurveLocationDetail's point to the parameter point. */
185713
185730
  setDistanceTo(point) {
185714
185731
  this.a = this.point.distance(point);
185715
185732
  }
@@ -186112,7 +186129,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
186112
186129
  }
186113
186130
  /**
186114
186131
  * Returns a (high accuracy) range of the curve between fractional positions
186115
- * * Default implementation returns the range of the curve from clonePartialCurve
186132
+ * * Default implementation returns the range of the curve from clonePartialCurve.
186116
186133
  */
186117
186134
  rangeBetweenFractions(fraction0, fraction1, transform) {
186118
186135
  return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);
@@ -186141,6 +186158,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
186141
186158
  * @param fraction0 start fraction for evaluation
186142
186159
  * @param fraction1 end fraction for evaluation
186143
186160
  * @param count number of points to evaluate
186161
+ * @param transform optional transform to be applied to the curve
186144
186162
  * @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier
186145
186163
  * to any increase in size.
186146
186164
  */
@@ -186228,8 +186246,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
186228
186246
  * * `curveStartState` = `CurveSearchStatus.error`
186229
186247
  * @param startFraction fractional position where the move starts
186230
186248
  * @param signedDistance distance to move. Negative distance is backwards in the fraction space
186231
- * @param allowExtension if true, all the move to go beyond the startPoint or endpoint of the curve. If false, do not
186232
- * allow movement beyond the startPoint or endpoint
186249
+ * @param allowExtension if true, allow the move to go beyond the startPoint or endpoint of the curve. If false,
186250
+ * do not allow movement beyond the startPoint or endpoint
186233
186251
  * @param result optional result.
186234
186252
  * @returns A CurveLocationDetail annotated as above. Note that if the curve does not support the calculation, there is
186235
186253
  * still a result which contains the point at the input startFraction, with failure indicated in the `curveStartState`
@@ -186938,8 +186956,8 @@ __webpack_require__.r(__webpack_exports__);
186938
186956
  * * A 3d line segment represented by its start and end coordinates
186939
186957
  * * startPoint
186940
186958
  * * endPoint
186941
- * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these
186942
- * equivalent forms to map fraction `f` to a point `X(f)`
186959
+ * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these
186960
+ * equivalent forms maps fraction `f` to a point `X(f)`:
186943
186961
  * ```
186944
186962
  * equation
186945
186963
  * X(f) = P_0 + f*(P_1 - P_0)\newline
@@ -186954,14 +186972,14 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
186954
186972
  }
186955
186973
  /**
186956
186974
  * Return REFERENCE to the start point of this segment.
186957
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
186975
+ * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.
186958
186976
  */
186959
186977
  get point0Ref() {
186960
186978
  return this._point0;
186961
186979
  }
186962
186980
  /**
186963
186981
  * Return REFERENCE to the end point of this segment.
186964
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
186982
+ * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.
186965
186983
  */
186966
186984
  get point1Ref() {
186967
186985
  return this._point1;
@@ -188361,7 +188379,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
188361
188379
  return ls;
188362
188380
  }
188363
188381
  /**
188364
- * Evaluate a curve at uniform fractions. Append the evaluations to this linestring.
188382
+ * Evaluate a curve at uniform fractions. Append the evaluations to this linestring.
188365
188383
  * @param curve primitive to evaluate.
188366
188384
  * @param numStrokes number of strokes (edges).
188367
188385
  * @param fraction0 starting fraction coordinate
@@ -191158,8 +191176,8 @@ var RegionBinaryOpType;
191158
191176
  * * `ParityRegion` -- a collection of loops, interpreted by parity rules.
191159
191177
  * The common "One outer loop and many Inner loops" is a parity region.
191160
191178
  * * `UnionRegion` -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
191161
- * * Most of the methods in this class ignore z-coordinates, so callers should ensure that input geometry has been
191162
- * rotated parallel to the xy-plane.
191179
+ * * **NOTE:** Most of the methods in this class ignore z-coordinates, so callers should ensure that input geometry has
191180
+ * been rotated parallel to the xy-plane.
191163
191181
  * @public
191164
191182
  */
191165
191183
  class RegionOps {
@@ -191409,34 +191427,29 @@ class RegionOps {
191409
191427
  return RegionOps.sortOuterAndHoleLoopsXY(allLoops);
191410
191428
  }
191411
191429
  /**
191412
- * Construct a wire (not area!!) that is offset from given polyline or polygon.
191413
- * * This is a simple wire offset, not an area.
191430
+ * Construct a wire that is offset from the given polyline or polygon.
191431
+ * * This is a simple wire offset, not an area offset.
191432
+ * * Since z-coordinates are ignored, for best results the input points should lie in (a plane parallel to)
191433
+ * the xy-plane.
191414
191434
  * * The construction algorithm attempts to eliminate some self-intersections within the offsets, but does not
191415
191435
  * guarantee a simple area offset.
191416
- * * The construction algorithm is subject to being changed, resulting in different (hopefully better)
191417
- * self-intersection behavior on the future.
191436
+ * * If offsetDistance is given as a number, default OffsetOptions are applied.
191437
+ * * See [[JointOptions]] class doc for offset construction rules.
191418
191438
  * @param points a single loop or path
191419
191439
  * @param wrap true to include wraparound
191420
- * @param offsetDistance distance of offset from wire. Positive is left.
191440
+ * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
191441
+ * object.
191421
191442
  */
191422
- static constructPolygonWireXYOffset(points, wrap, offsetDistance) {
191443
+ static constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions) {
191423
191444
  const context = new _internalContexts_PolygonOffsetContext__WEBPACK_IMPORTED_MODULE_17__.PolygonWireOffsetContext();
191424
- return context.constructPolygonWireXYOffset(points, wrap, offsetDistance);
191445
+ return context.constructPolygonWireXYOffset(points, wrap, offsetDistanceOrOptions);
191425
191446
  }
191426
191447
  /**
191427
191448
  * Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
191428
191449
  * * The construction will remove "some" local effects of features smaller than the offset distance, but will
191429
191450
  * not detect self intersection among widely separated edges.
191430
191451
  * * If offsetDistance is given as a number, default OffsetOptions are applied.
191431
- * * When the offset needs to do an "outside" turn, the first applicable construction is applied:
191432
- * * If the turn is larger than `options.minArcDegrees`, a circular arc is constructed.
191433
- * * If the turn is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
191434
- * single intersection point.
191435
- * * If the turn is larger than `options.maxChamferDegrees`, the turn is constructed as a sequence of straight
191436
- * lines that are:
191437
- * * outside the arc
191438
- * * have uniform turn angle less than `options.maxChamferDegrees`
191439
- * * each line segment (except first and last) touches the arc at its midpoint.
191452
+ * * See [[JointOptions]] class doc for offset construction rules.
191440
191453
  * @param curves base curves.
191441
191454
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
191442
191455
  */
@@ -192611,12 +192624,16 @@ class StrokeOptions {
192611
192624
  get needNormals() {
192612
192625
  return this._needNormals !== undefined ? this._needNormals : false;
192613
192626
  }
192614
- set needNormals(value) { this._needNormals = value; }
192627
+ set needNormals(value) {
192628
+ this._needNormals = value;
192629
+ }
192615
192630
  /** Whether twoSided is requested. */
192616
192631
  get needTwoSided() {
192617
192632
  return this._needTwoSided !== undefined ? this._needTwoSided : false;
192618
192633
  }
192619
- set needTwoSided(value) { this._needTwoSided = value; }
192634
+ set needTwoSided(value) {
192635
+ this._needTwoSided = value;
192636
+ }
192620
192637
  /** Ask if angleTol is specified */
192621
192638
  get hasAngleTol() {
192622
192639
  return this.angleTol !== undefined && Math.abs(this.angleTol.radians) > 0.0;
@@ -194335,7 +194352,7 @@ __webpack_require__.r(__webpack_exports__);
194335
194352
 
194336
194353
 
194337
194354
  /**
194338
- * Classification of contortions at a joint.
194355
+ * Classification of how the joint is constructed.
194339
194356
  * @internal
194340
194357
  */
194341
194358
  var JointMode;
@@ -194348,26 +194365,44 @@ var JointMode;
194348
194365
  JointMode[JointMode["Gap"] = 4] = "Gap";
194349
194366
  })(JointMode || (JointMode = {}));
194350
194367
  /**
194351
- * * Control parameters for joint construction.
194352
- * * Decision order is:
194353
- * * if turn angle is greater than minArcDegrees, make an arc.
194354
- * * if turn angle is less than or equal maxChamferTurnDegrees, extend curves along tangent to single intersection point.
194355
- * * if turn angle is greater than maxChamferTurnDegrees, construct multiple lines that are tangent to the turn circle "from the outside",
194356
- * with each equal turn less than maxChamferTurnDegrees.
194357
- * * otherwise make single edge.
194368
+ * Control parameters for joint construction.
194369
+ * * Define a "joint" as the common point between adjacent segments of the input curve.
194370
+ * * Define the "turn angle" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of
194371
+ * the segments at the joint.
194372
+ * * When creating offsets, if an offset needs to do an "outside" turn, the first applicable construction is applied:
194373
+ * * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.
194374
+ * * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
194375
+ * single intersection point (to create a sharp corner).
194376
+ * * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:
194377
+ * * lie outside the arc that would have been created by the first construction
194378
+ * * have uniform turn angle less than `options.maxChamferDegrees`
194379
+ * * touch the arc at their midpoint (except first and last edge).
194358
194380
  * @public
194359
194381
  */
194360
194382
  class JointOptions {
194361
- /** Construct JointOptions.
194383
+ /**
194384
+ * Construct JointOptions.
194362
194385
  * * leftOffsetDistance is required
194363
194386
  * * minArcDegrees and maxChamferDegrees are optional.
194364
194387
  */
194365
- constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false) {
194366
- /** smallest arc to construct.
194367
- * * If this control angle is large, arcs are never created.
194388
+ constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false, allowSharpestCorners = false) {
194389
+ /**
194390
+ * Smallest arc to construct.
194391
+ * * If this control angle is 180 degrees or more, arcs are never created.
194368
194392
  */
194369
194393
  this.minArcDegrees = 180.0;
194394
+ /** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */
194370
194395
  this.maxChamferTurnDegrees = 90;
194396
+ /**
194397
+ * Whether to remove the internal turn angle upper bound for sharp corner construction.
194398
+ * * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose
194399
+ * ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.
194400
+ * * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles
194401
+ * up to `maxChamferTurnDegrees`.
194402
+ * * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset
194403
+ * with sharp corners at each joint by setting `minArcDegrees` to 180 and `allowSharpestCorners` to true.
194404
+ */
194405
+ this.allowSharpestCorners = false;
194371
194406
  /** Offset distance, positive to left of base curve. */
194372
194407
  this.leftOffsetDistance = 0;
194373
194408
  /** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */
@@ -194376,10 +194411,11 @@ class JointOptions {
194376
194411
  this.minArcDegrees = minArcDegrees;
194377
194412
  this.maxChamferTurnDegrees = maxChamferDegrees;
194378
194413
  this.preserveEllipticalArcs = preserveEllipticalArcs;
194414
+ this.allowSharpestCorners = allowSharpestCorners;
194379
194415
  }
194380
194416
  /** Return a deep clone. */
194381
194417
  clone() {
194382
- return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs);
194418
+ return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs, this.allowSharpestCorners);
194383
194419
  }
194384
194420
  /** Copy values of input options */
194385
194421
  setFrom(other) {
@@ -194387,6 +194423,7 @@ class JointOptions {
194387
194423
  this.minArcDegrees = other.minArcDegrees;
194388
194424
  this.maxChamferTurnDegrees = other.maxChamferTurnDegrees;
194389
194425
  this.preserveEllipticalArcs = other.preserveEllipticalArcs;
194426
+ this.allowSharpestCorners = other.allowSharpestCorners;
194390
194427
  }
194391
194428
  /**
194392
194429
  * Parse a number or JointOptions up to JointOptions:
@@ -194397,17 +194434,22 @@ class JointOptions {
194397
194434
  static create(leftOffsetDistanceOrOptions) {
194398
194435
  if (leftOffsetDistanceOrOptions instanceof JointOptions)
194399
194436
  return leftOffsetDistanceOrOptions;
194400
- // if (Number.isFinite(leftOffsetDistanceOrOptions))
194401
194437
  return new JointOptions(leftOffsetDistanceOrOptions);
194402
194438
  }
194403
- /** return true if the options indicate this amount of turn should be handled with an arc. */
194439
+ /**
194440
+ /** Return true if the options indicate this amount of turn should be handled with an arc. */
194404
194441
  needArc(theta) {
194405
194442
  return Math.abs(theta.degrees) >= this.minArcDegrees;
194406
194443
  }
194407
- /** Test if turn by theta should be output as single point. */
194444
+ /** Return the number of corners needed to chamfer the given turn angle. */
194408
194445
  numChamferPoints(theta) {
194409
194446
  const degrees = Math.abs(theta.degrees);
194410
- const stepDegrees = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.clamp(this.maxChamferTurnDegrees, 10, 120);
194447
+ const minStepDegreesClamp = 10;
194448
+ let maxStepDegreesClamp = 120;
194449
+ if (this.allowSharpestCorners) {
194450
+ maxStepDegreesClamp = this.maxChamferTurnDegrees;
194451
+ }
194452
+ const stepDegrees = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.clamp(this.maxChamferTurnDegrees, minStepDegreesClamp, maxStepDegreesClamp);
194411
194453
  if (degrees <= stepDegrees)
194412
194454
  return 1;
194413
194455
  return Math.ceil(degrees / stepDegrees);
@@ -194423,17 +194465,41 @@ class OffsetOptions {
194423
194465
  this.jointOptions = JointOptions.create(offsetDistanceOrOptions);
194424
194466
  this.strokeOptions = (strokeOptions !== undefined) ? strokeOptions : _StrokeOptions__WEBPACK_IMPORTED_MODULE_1__.StrokeOptions.createForCurves();
194425
194467
  }
194426
- get minArcDegrees() { return this.jointOptions.minArcDegrees; }
194427
- set minArcDegrees(value) { this.jointOptions.minArcDegrees = value; }
194428
- get maxChamferTurnDegrees() { return this.jointOptions.maxChamferTurnDegrees; }
194429
- set maxChamferTurnDegrees(value) { this.jointOptions.maxChamferTurnDegrees = value; }
194430
- get leftOffsetDistance() { return this.jointOptions.leftOffsetDistance; }
194431
- set leftOffsetDistance(value) { this.jointOptions.leftOffsetDistance = value; }
194432
- get preserveEllipticalArcs() { return this.jointOptions.preserveEllipticalArcs; }
194433
- set preserveEllipticalArcs(value) { this.jointOptions.preserveEllipticalArcs = value; }
194434
- /** Convert variant input into OffsetOptions.
194468
+ get minArcDegrees() {
194469
+ return this.jointOptions.minArcDegrees;
194470
+ }
194471
+ set minArcDegrees(value) {
194472
+ this.jointOptions.minArcDegrees = value;
194473
+ }
194474
+ get maxChamferTurnDegrees() {
194475
+ return this.jointOptions.maxChamferTurnDegrees;
194476
+ }
194477
+ set maxChamferTurnDegrees(value) {
194478
+ this.jointOptions.maxChamferTurnDegrees = value;
194479
+ }
194480
+ get allowSharpestCorners() {
194481
+ return this.jointOptions.allowSharpestCorners;
194482
+ }
194483
+ set allowSharpestCorners(value) {
194484
+ this.jointOptions.allowSharpestCorners = value;
194485
+ }
194486
+ get leftOffsetDistance() {
194487
+ return this.jointOptions.leftOffsetDistance;
194488
+ }
194489
+ set leftOffsetDistance(value) {
194490
+ this.jointOptions.leftOffsetDistance = value;
194491
+ }
194492
+ get preserveEllipticalArcs() {
194493
+ return this.jointOptions.preserveEllipticalArcs;
194494
+ }
194495
+ set preserveEllipticalArcs(value) {
194496
+ this.jointOptions.preserveEllipticalArcs = value;
194497
+ }
194498
+ /**
194499
+ * Convert variant input into OffsetOptions.
194435
194500
  * * If a JointOptions is provided, it is captured.
194436
- * * If an OffsetOptions is provided, a reference to it is returned. */
194501
+ * * If an OffsetOptions is provided, a reference to it is returned.
194502
+ */
194437
194503
  static create(offsetDistanceOrOptions) {
194438
194504
  if (offsetDistanceOrOptions instanceof OffsetOptions)
194439
194505
  return offsetDistanceOrOptions;
@@ -194462,7 +194528,9 @@ class Joint {
194462
194528
  this.swingPoint = swingPoint;
194463
194529
  this.flexure = JointMode.Unknown;
194464
194530
  }
194465
- /** try to construct an arc transition from ray0 to ray1 with given center. */
194531
+ /**
194532
+ * Try to construct an arc transition from ray0 to ray1 with given center.
194533
+ */
194466
194534
  static constructArc(ray0, center, ray1) {
194467
194535
  if (center !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(ray0.origin.distance(center), ray1.origin.distance(center))) {
194468
194536
  const angle = ray0.direction.angleToXY(ray1.direction);
@@ -194507,6 +194575,7 @@ class Joint {
194507
194575
  destination.packedPoints.push(point);
194508
194576
  }
194509
194577
  }
194578
+ /** Append stroke points along the offset curve defined by the Joint chain to the destination line string. */
194510
194579
  static collectStrokesFromChain(start, destination, maxTest = 100) {
194511
194580
  let numOut = -2 * maxTest; // allow extra things to happen
194512
194581
  Joint.visitJointsOnChain(start, (joint) => {
@@ -194518,7 +194587,7 @@ class Joint {
194518
194587
  if (fA === 0.0 && fB === 1.0)
194519
194588
  curve1 = joint.curve1.clone();
194520
194589
  else if (fA < fB)
194521
- curve1 = joint.curve1.clonePartialCurve(fA, fB);
194590
+ curve1 = joint.curve1.clonePartialCurve(fA, fB); // trimming is done by clonePartialCurve
194522
194591
  if (curve1) {
194523
194592
  if (!joint.jointCurve) {
194524
194593
  this.addPoint(destination, curve1.startPoint());
@@ -194558,6 +194627,7 @@ class Joint {
194558
194627
  }
194559
194628
  }
194560
194629
  }
194630
+ /** Append CurvePrimitives along the offset curve defined by the Joint chain to the destination array. */
194561
194631
  static collectCurvesFromChain(start, destination, maxTest = 100) {
194562
194632
  if (start === undefined)
194563
194633
  return;
@@ -194572,13 +194642,13 @@ class Joint {
194572
194642
  if (fA === 0.0 && fB === 1.0)
194573
194643
  curve1 = joint.curve1.clone();
194574
194644
  else if (fA < fB)
194575
- curve1 = joint.curve1.clonePartialCurve(fA, fB);
194645
+ curve1 = joint.curve1.clonePartialCurve(fA, fB); // trimming is done by clonePartialCurve
194576
194646
  this.collectPrimitive(destination, curve1);
194577
194647
  }
194578
194648
  return numOut++ < maxTest;
194579
194649
  }, maxTest);
194580
194650
  }
194581
- /** Execute `joint.annotateJointMode()` at all joints on the chain. */
194651
+ /** Execute `joint.annotateJointMode()` at all joints on the chain to set some of the joints attributes. */
194582
194652
  static annotateChain(start, options, maxTest = 100) {
194583
194653
  if (start)
194584
194654
  Joint.visitJointsOnChain(start, (joint) => { joint.annotateJointMode(options); return true; }, maxTest);
@@ -194586,7 +194656,7 @@ class Joint {
194586
194656
  /**
194587
194657
  * Visit joints on a chain.
194588
194658
  * * terminate on `false` return from `callback`
194589
- * @param start first (and, for cyclic chain, final) Joint
194659
+ * @param start first (and, for cyclic chain, final) joint
194590
194660
  * @param callback function to call with each Joint as a single parameter.
194591
194661
  */
194592
194662
  static visitJointsOnChain(start, callback, maxTest = 100) {
@@ -194594,7 +194664,7 @@ class Joint {
194594
194664
  if (joint) {
194595
194665
  let numTest = 0;
194596
194666
  while (joint !== undefined) {
194597
- if (numTest++ >= maxTest + 5)
194667
+ if (numTest++ >= maxTest + 5) // allow extra things to happen
194598
194668
  return true;
194599
194669
  if (!callback(joint))
194600
194670
  return false;
@@ -194610,13 +194680,13 @@ class Joint {
194610
194680
  if (this.curve0 && this.curve1) {
194611
194681
  const ray0 = this.curve0.fractionToPointAndDerivative(1.0);
194612
194682
  const ray1 = this.curve1.fractionToPointAndDerivative(0.0);
194613
- const intersection = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__.Ray3d.closestApproachRay3dRay3d(ray0, ray1);
194683
+ const intersection = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__.Ray3d.closestApproachRay3dRay3d(ray0, ray1); // intersection of the 2 ray lines
194614
194684
  if (intersection.approachType === _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveCurveApproachType.Intersection) {
194615
194685
  if (intersection.detailA.fraction >= 0.0 && intersection.detailB.fraction <= 0.0) {
194616
194686
  this.fraction0 = 1.0;
194617
194687
  this.fraction1 = 0.0;
194618
194688
  this.flexure = JointMode.Extend;
194619
- const theta = ray0.getDirectionRef().angleToXY(ray1.getDirectionRef());
194689
+ const theta = ray0.getDirectionRef().angleToXY(ray1.getDirectionRef()); // angle between the 2 ray lines
194620
194690
  if (options.needArc(theta)) {
194621
194691
  const arc = Joint.constructArc(ray0, this.curve0.baseCurveEnd, ray1);
194622
194692
  if (arc) {
@@ -194624,13 +194694,12 @@ class Joint {
194624
194694
  return;
194625
194695
  }
194626
194696
  }
194627
- const numChamferPoints = options.numChamferPoints(theta);
194628
- if (numChamferPoints <= 1) {
194697
+ const numChamferPoints = options.numChamferPoints(theta); // how many interior points in the linestring
194698
+ if (numChamferPoints <= 1) { // create sharp corner
194629
194699
  this.jointCurve = _LineString3d__WEBPACK_IMPORTED_MODULE_6__.LineString3d.create(ray0.origin, intersection.detailA.point, ray1.origin);
194630
194700
  return;
194631
194701
  }
194632
- if (numChamferPoints > 1) {
194633
- // A nontrivial linestring ...
194702
+ if (numChamferPoints > 1) { // create chamfer corner (a line string)
194634
194703
  const radians0 = theta.radians;
194635
194704
  const numHalfStep = 2.0 * numChamferPoints;
194636
194705
  const halfStepRadians = radians0 / numHalfStep;
@@ -194650,19 +194719,20 @@ class Joint {
194650
194719
  }
194651
194720
  }
194652
194721
  }
194653
- // desperation appears ...
194722
+ // if there is no intersection between the 2 ray lines, fill the gap by a line segment
194654
194723
  this.flexure = JointMode.Gap;
194655
194724
  this.jointCurve = _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d.create(this.curve0.fractionToPoint(1.0), this.curve1.fractionToPoint(0.0));
194656
194725
  this.fraction0 = 1.0;
194657
194726
  this.fraction1 = 0.0;
194658
194727
  }
194659
194728
  }
194660
- // Select the index at which summed fraction difference is smallest.
194729
+ /** Select the index at which summed fraction difference is smallest */
194661
194730
  selectIntersectionIndexByFraction(fractionA, fractionB, intersections) {
194662
194731
  let index = -1;
194663
194732
  let aMin = Number.MAX_VALUE;
194664
194733
  for (let i = 0; i < intersections.length; i++) {
194665
- const a = Math.abs(intersections[i].detailA.fraction - fractionA) + Math.abs(intersections[i].detailB.fraction - fractionB);
194734
+ const a = Math.abs(intersections[i].detailA.fraction - fractionA)
194735
+ + Math.abs(intersections[i].detailB.fraction - fractionB);
194666
194736
  if (a < aMin) {
194667
194737
  aMin = a;
194668
194738
  index = i;
@@ -194671,42 +194741,42 @@ class Joint {
194671
194741
  return index;
194672
194742
  }
194673
194743
  /**
194674
- * Examine the adjacent geometry
194675
- * * set JointMode: one of Cap Extend, or Trim
194744
+ * Examine the adjacent geometry to set some of joint attributes:
194745
+ * * set JointMode: one of Cap, Extend, or Trim
194676
194746
  * * set fraction0 and fraction1 of intersection of curve0 and curve1
194747
+ * * set joint curve
194677
194748
  * * this REFERENCES curve0, curve1, fraction0, fraction1
194678
194749
  * * this does not reference nextJoint and previousJoint
194679
194750
  */
194680
194751
  annotateJointMode(options) {
194681
- if (this.curve0 && !this.curve1) {
194752
+ if (!this.curve0 && this.curve1) { // joint at the start of the chain
194682
194753
  this.flexure = JointMode.Cap;
194683
- this.fraction0 = 1.0;
194754
+ this.fraction1 = 0.0;
194684
194755
  }
194685
- else if (this.curve1 && !this.curve0) {
194756
+ else if (this.curve0 && !this.curve1) { // joint at the end of the chain
194686
194757
  this.flexure = JointMode.Cap;
194687
- this.fraction1 = 0.0;
194758
+ this.fraction0 = 1.0;
194688
194759
  }
194689
- else if (this.curve0 && this.curve1) {
194690
- // check for direct intersection -- occurs on offset of colinear base segments, and closed primitives
194691
- if (this.curve0.endPoint().isAlmostEqual(this.curve1.startPoint())) {
194760
+ else if (this.curve0 && this.curve1) { // joints at the middle of the chain
194761
+ if (this.curve0.endPoint().isAlmostEqual(this.curve1.startPoint())) { // joint between colinear segments
194692
194762
  this.fraction0 = 1.0;
194693
194763
  this.fraction1 = 0.0;
194694
194764
  this.flexure = JointMode.Trim;
194695
194765
  }
194696
- else if (this.curve0 instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d && this.curve1 instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d) {
194697
- const ray0 = this.curve0.fractionToPointAndDerivative(0.0); // And we know that is full length ray !
194698
- const ray1 = this.curve1.fractionToPointAndDerivative(0.0); // ditto
194699
- const intersection = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__.Ray3d.closestApproachRay3dRay3d(ray0, ray1);
194766
+ else if (this.curve0 instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d && this.curve1 instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d) { // pair of lines
194767
+ const ray0 = this.curve0.fractionToPointAndDerivative(0.0);
194768
+ const ray1 = this.curve1.fractionToPointAndDerivative(0.0);
194769
+ const intersection = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__.Ray3d.closestApproachRay3dRay3d(ray0, ray1); // intersection of the 2 ray lines
194700
194770
  if (intersection.approachType === _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveCurveApproachType.Intersection) {
194701
194771
  this.fraction0 = intersection.detailA.fraction;
194702
194772
  this.fraction1 = intersection.detailB.fraction;
194703
- if (this.fraction0 >= 1.0 && this.fraction1 <= 0.0) {
194773
+ if (this.fraction0 >= 1.0 && this.fraction1 <= 0.0) { // need to extend
194704
194774
  this.annotateExtension(options);
194705
194775
  }
194706
- else if (this.fraction0 < 1.0 && this.fraction1 > 0.0) {
194776
+ else if (this.fraction0 < 1.0 && this.fraction1 > 0.0) { // need to trim
194707
194777
  this.flexure = JointMode.Trim;
194708
194778
  }
194709
- else if (this.fraction0 > 1.0 && this.fraction1 > 1.0) {
194779
+ else if (this.fraction0 > 1.0 && this.fraction1 > 1.0) { // need to fill gap with a single line segment
194710
194780
  this.flexure = JointMode.Gap;
194711
194781
  this.jointCurve = _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d.create(this.curve0.fractionToPoint(1.0), this.curve1.fractionToPoint(0.0));
194712
194782
  this.fraction0 = 1.0;
@@ -194714,15 +194784,15 @@ class Joint {
194714
194784
  }
194715
194785
  }
194716
194786
  }
194717
- else { // generic pair of curves ...
194787
+ else { // generic pair of curves
194718
194788
  const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_9__.CurveCurve.intersectionXYPairs(this.curve0, false, this.curve1, false);
194719
194789
  const intersectionIndex = this.selectIntersectionIndexByFraction(1.0, 0.0, intersections);
194720
- if (intersectionIndex >= 0) {
194790
+ if (intersectionIndex >= 0) { // need to trim
194721
194791
  this.flexure = JointMode.Trim;
194722
194792
  this.fraction0 = intersections[intersectionIndex].detailA.fraction;
194723
194793
  this.fraction1 = intersections[intersectionIndex].detailB.fraction;
194724
194794
  }
194725
- else {
194795
+ else { // need to extend
194726
194796
  this.annotateExtension(options);
194727
194797
  }
194728
194798
  }
@@ -194730,7 +194800,8 @@ class Joint {
194730
194800
  }
194731
194801
  /**
194732
194802
  * * Examine the primitive trim fractions between each pair of joints.
194733
- * * If trim fractions indicate the primitive must disappear, replace the joint pair by a new joint pointing at surrounding primitives
194803
+ * * If trim fractions indicate the primitive must disappear, replace the joint pair by a new joint pointing at
194804
+ * surrounding primitives
194734
194805
  * @param start
194735
194806
  */
194736
194807
  static removeDegeneratePrimitives(start, options, maxTest) {
@@ -194765,8 +194836,7 @@ class Joint {
194765
194836
  }
194766
194837
  */
194767
194838
  const eliminateF = f0 >= f1 || f0 > 1.0;
194768
- const eliminateG = (g0 !== undefined && g0 > 1.0)
194769
- || (g0 !== undefined && g1 !== undefined && g0 >= g1);
194839
+ const eliminateG = (g0 !== undefined && g0 > 1.0) || (g0 !== undefined && g1 !== undefined && g0 >= g1);
194770
194840
  if (eliminateF && eliminateG) {
194771
194841
  const jointC = jointB.nextJoint;
194772
194842
  const newJoint = new Joint(jointA.curve0, jointC.curve1, undefined);
@@ -194822,9 +194892,8 @@ class Joint {
194822
194892
  * @internal
194823
194893
  */
194824
194894
  class PolygonWireOffsetContext {
194825
- /** construct a context. */
194826
- constructor() {
194827
- }
194895
+ /** Construct a context. */
194896
+ constructor() { }
194828
194897
  // Construct a single offset from base points
194829
194898
  static createOffsetSegment(basePointA, basePointB, distance) {
194830
194899
  _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(basePointA, basePointB, this._unitAlong);
@@ -194837,13 +194906,25 @@ class PolygonWireOffsetContext {
194837
194906
  return undefined;
194838
194907
  }
194839
194908
  /**
194840
- * Construct curves that are offset from a polygon.
194841
- * * The construction will remove "some" local effects of features smaller than the offset distance, but will not detect self intersection with far-away edges.
194842
- * @param points
194843
- * @param wrap
194844
- * @param offsetDistance
194909
+ * Construct a wire (not area) that is offset from given polyline or polygon (which must be in xy-plane or in
194910
+ * a plane parallel to xy-plane).
194911
+ * * This is a simple wire offset (in the form of a line string), not an area.
194912
+ * * If offsetDistance is given as a number, default OffsetOptions are applied.
194913
+ * * See [[JointOptions]] class doc for offset construction rules.
194914
+ * @param points a single loop or path
194915
+ * @param wrap true to offset the wraparound joint. Assumes first = last point.
194916
+ * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
194917
+ * object.
194845
194918
  */
194846
194919
  constructPolygonWireXYOffset(points, wrap, leftOffsetDistanceOrOptions) {
194920
+ /**
194921
+ * if "wrap = true", then first and last point in the points array must be close; otherwise
194922
+ * generated offset will be invalid.
194923
+ */
194924
+ if (wrap && !points[0].isAlmostEqual(points[points.length - 1])) {
194925
+ wrap = false;
194926
+ }
194927
+ /** create raw offsets as a linked list (joint0) */
194847
194928
  const options = JointOptions.create(leftOffsetDistanceOrOptions);
194848
194929
  const numPoints = points.length;
194849
194930
  let fragment0 = PolygonWireOffsetContext.createOffsetSegment(points[0], points[1], options.leftOffsetDistance);
@@ -194863,7 +194944,9 @@ class PolygonWireOffsetContext {
194863
194944
  newJoint = new Joint(fragment0, undefined, points[numPoints - 1]);
194864
194945
  Joint.link(previousJoint, newJoint);
194865
194946
  }
194947
+ /** annotateChain sets some of the joints attributes (including how to extend curves or fill the gap between curves) */
194866
194948
  Joint.annotateChain(joint0, options, numPoints);
194949
+ /** make limited passes through the Joint chain until no self-intersections are removed */
194867
194950
  for (let pass = 0; pass++ < 5;) {
194868
194951
  const state = Joint.removeDegeneratePrimitives(joint0, options, numPoints);
194869
194952
  joint0 = state.newStart;
@@ -194877,6 +194960,7 @@ class PolygonWireOffsetContext {
194877
194960
  */
194878
194961
  }
194879
194962
  // Joint.collectPrimitivesFromChain(joint0, result, numPoints);
194963
+ /** turn the Joint linked list into a CurveCollection (Loop or Path). trimming is done in collectStrokesFromChain */
194880
194964
  const chain = _LineString3d__WEBPACK_IMPORTED_MODULE_6__.LineString3d.create();
194881
194965
  Joint.collectStrokesFromChain(joint0, chain, numPoints);
194882
194966
  const n = chain.packedPoints.length;
@@ -194900,14 +194984,13 @@ PolygonWireOffsetContext._offsetB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTE
194900
194984
  */
194901
194985
  class CurveChainWireOffsetContext {
194902
194986
  /** construct a context. */
194903
- constructor() {
194904
- }
194987
+ constructor() { }
194905
194988
  /**
194906
194989
  * Annotate a CurvePrimitive with properties `baseCurveStart` and `baseCurveEnd`.
194907
- * * return cp
194908
- * @param cp primitive to annotate
194990
+ * @param cp curve primitive to annotate
194909
194991
  * @param startPoint optional start point
194910
194992
  * @param endPoint optional end point
194993
+ * @return the input CurvePrimitive with annotations
194911
194994
  */
194912
194995
  static applyBasePoints(cp, startPoint, endPoint) {
194913
194996
  if (cp !== undefined) {
@@ -194919,7 +195002,7 @@ class CurveChainWireOffsetContext {
194919
195002
  return cp;
194920
195003
  }
194921
195004
  /**
194922
- * Create the offset of a single primitive.
195005
+ * Create the offset of a single primitive as viewed in the xy-plane (ignoring z).
194923
195006
  * * each primitive may be labeled (as an `any` object) with start or end point of base curve:
194924
195007
  * * `(primitive as any).baseCurveStart: Point3d`
194925
195008
  * * `(primitive as any).baseCurveEnd: Point3d`
@@ -194943,15 +195026,10 @@ class CurveChainWireOffsetContext {
194943
195026
  }
194944
195027
  /**
194945
195028
  * Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
194946
- * * The construction will remove "some" local effects of features smaller than the offset distance, but will not detect self intersection among widely separated edges.
195029
+ * * The construction will remove "some" local effects of features smaller than the offset distance, but will
195030
+ * not detect self intersection among widely separated edges.
194947
195031
  * * If offsetDistance is given as a number, default OffsetOptions are applied.
194948
- * * When the offset needs to do an "outside" turn, the first applicable construction is applied:
194949
- * * If the turn is larger than `options.minArcDegrees`, a circular arc is constructed.
194950
- * * If the turn is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to single intersection point.
194951
- * * If the turn is larger than `options.maxChamferDegrees`, the turn is constructed as a sequence of straight lines that are:
194952
- * * outside the arc
194953
- * * have uniform turn angle less than `options.maxChamferDegrees`
194954
- * * each line segment (except first and last) touches the arc at its midpoint.
195032
+ * * See [[JointOptions]] class doc for offset construction rules.
194955
195033
  * @param curves base curves.
194956
195034
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
194957
195035
  */
@@ -194959,14 +195037,15 @@ class CurveChainWireOffsetContext {
194959
195037
  const wrap = curves instanceof _Loop__WEBPACK_IMPORTED_MODULE_10__.Loop;
194960
195038
  const offsetOptions = OffsetOptions.create(offsetDistanceOrOptions);
194961
195039
  const simpleOffsets = [];
194962
- // setup pass: get simple offsets of each primitive
195040
+ /** traverse primitives (children of curves) and create simple offsets of each primitive as an array */
194963
195041
  for (const c of curves.children) {
194964
195042
  const c1 = CurveChainWireOffsetContext.createSingleOffsetPrimitiveXY(c, offsetOptions);
194965
195043
  if (c1 === undefined) {
194966
195044
  // bad .. maybe arc to inside?
194967
195045
  }
194968
- else if (c1 instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_12__.CurvePrimitive)
195046
+ else if (c1 instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_12__.CurvePrimitive) {
194969
195047
  simpleOffsets.push(c1);
195048
+ }
194970
195049
  else if (Array.isArray(c1)) {
194971
195050
  for (const c2 of c1) {
194972
195051
  if (c2 instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_12__.CurvePrimitive)
@@ -194974,6 +195053,7 @@ class CurveChainWireOffsetContext {
194974
195053
  }
194975
195054
  }
194976
195055
  }
195056
+ /** create joints between array elements to make offsets as a linked list (joint0) */
194977
195057
  let fragment0;
194978
195058
  let newJoint;
194979
195059
  let previousJoint;
@@ -194992,8 +195072,10 @@ class CurveChainWireOffsetContext {
194992
195072
  }
194993
195073
  if (joint0 && previousJoint && curves instanceof _Loop__WEBPACK_IMPORTED_MODULE_10__.Loop)
194994
195074
  Joint.link(previousJoint, joint0);
195075
+ /** annotateChain sets some of the joints attributes (including how to extend curves or fill the gap between curves) */
194995
195076
  const numOffset = simpleOffsets.length;
194996
195077
  Joint.annotateChain(joint0, offsetOptions.jointOptions, numOffset);
195078
+ /** turn the Joint linked list into a CurveCollection. trimming is done in collectCurvesFromChain */
194997
195079
  const outputCurves = [];
194998
195080
  Joint.collectCurvesFromChain(joint0, outputCurves, numOffset);
194999
195081
  return _RegionOps__WEBPACK_IMPORTED_MODULE_13__.RegionOps.createLoopPathOrBagOfCurves(outputCurves, wrap, true);
@@ -207680,10 +207762,12 @@ __webpack_require__.r(__webpack_exports__);
207680
207762
  * * are NOT required to be unit vectors.
207681
207763
  * * are NOT required to be perpendicular vectors.
207682
207764
  * * The skewed, non-uniform scaling of the grid directions is the primary focus of this class.
207683
- * * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU and vectorV as plane normal.
207765
+ * * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU
207766
+ * and vectorV as plane normal.
207684
207767
  * * Hence these are cartesian distances.
207685
207768
  * * If numerous calls to these are expected, the repeated normalization may be a performance issue.
207686
- * * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide better performance.
207769
+ * * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide
207770
+ * better performance.
207687
207771
  * @public
207688
207772
  */
207689
207773
  class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
@@ -207693,7 +207777,7 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207693
207777
  this.vectorU = vectorU;
207694
207778
  this.vectorV = vectorV;
207695
207779
  }
207696
- /** create a new plane from origin and 2 in-plane vectors. */
207780
+ /** Create a new plane from origin and 2 in-plane vectors. */
207697
207781
  static createOriginAndVectors(origin, vectorU, vectorV, result) {
207698
207782
  if (result) {
207699
207783
  result.origin.setFrom(origin);
@@ -207703,13 +207787,14 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207703
207787
  }
207704
207788
  return new Plane3dByOriginAndVectors(origin.clone(), vectorU.clone(), vectorV.clone());
207705
207789
  }
207706
- /** clone to a new plane. */
207790
+ /** Clone to a new plane. */
207707
207791
  clone(result) {
207708
207792
  if (result !== undefined)
207709
207793
  result.setOriginAndVectors(this.origin, this.vectorU, this.vectorV);
207710
207794
  return new Plane3dByOriginAndVectors(this.origin.clone(), this.vectorU.clone(), this.vectorV.clone());
207711
207795
  }
207712
- /** create a new Plane3dByOriginAndVectors from a variety of plane types.
207796
+ /**
207797
+ * Create a new Plane3dByOriginAndVectors from a variety of plane types.
207713
207798
  * * The input is NOT captured.
207714
207799
  */
207715
207800
  static createFrom(source, result) {
@@ -207768,7 +207853,8 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207768
207853
  this.vectorV.set(vx, vy, vz);
207769
207854
  return this;
207770
207855
  }
207771
- /** Set all origin and both vectors from coordinates in given origin and vectors.
207856
+ /**
207857
+ * Set all origin and both vectors from coordinates in given origin and vectors.
207772
207858
  * * Note that coordinates are copied out of the parameters -- the given parameters are NOT retained by reference.
207773
207859
  */
207774
207860
  setOriginAndVectors(origin, vectorU, vectorV) {
@@ -207783,7 +207869,8 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207783
207869
  return result.setOriginAndVectorsXYZ(x0, y0, z0, ux, uy, uz, vx, vy, vz);
207784
207870
  return new Plane3dByOriginAndVectors(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x0, y0, z0), _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(ux, uy, uz), _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(vx, vy, vz));
207785
207871
  }
207786
- /** Define a plane by three points in the plane.
207872
+ /**
207873
+ * Define a plane by three points in the plane.
207787
207874
  * @param origin origin for the parameterization.
207788
207875
  * @param targetU target point for the vectorU starting at the origin.
207789
207876
  * @param targetV target point for the vectorV originating at the origin.
@@ -207796,7 +207883,8 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207796
207883
  static createXYPlane(result) {
207797
207884
  return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(0, 0, 0, 1, 0, 0, 0, 1, 0, result);
207798
207885
  }
207799
- /** create a plane from data presented as Float64Arrays.
207886
+ /**
207887
+ * Create a plane from data presented as Float64Arrays.
207800
207888
  * @param origin x,y,z of origin.
207801
207889
  * @param vectorU x,y,z of vectorU
207802
207890
  * @param vectorV x,y,z of vectorV
@@ -207804,7 +207892,8 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207804
207892
  static createOriginAndVectorsArrays(origin, vectorU, vectorV, result) {
207805
207893
  return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(origin[0], origin[1], origin[2], vectorU[0], vectorU[1], vectorU[2], vectorV[0], vectorV[1], vectorV[2], result);
207806
207894
  }
207807
- /** create a plane from data presented as Float64Array with weights
207895
+ /**
207896
+ * Create a plane from data presented as Float64Array with weights
207808
207897
  * @param origin x,y,z,w of origin.
207809
207898
  * @param vectorU x,y,z,w of vectorU
207810
207899
  * @param vectorV x,y,z,w of vectorV
@@ -207868,7 +207957,7 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207868
207957
  vectorV: this.vectorV.toJSON(),
207869
207958
  };
207870
207959
  }
207871
- /** create a new plane. See `setFromJSON` for layout example. */
207960
+ /** Create a new plane. See `setFromJSON` for layout example. */
207872
207961
  static fromJSON(json) {
207873
207962
  const result = Plane3dByOriginAndVectors.createXYPlane();
207874
207963
  result.setFromJSON(json);
@@ -207880,7 +207969,8 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207880
207969
  && this.vectorU.isAlmostEqual(other.vectorU)
207881
207970
  && this.vectorV.isAlmostEqual(other.vectorV);
207882
207971
  }
207883
- /** Normalize both `vectorU` and `vectorV` in place. This does NOT make them perpendicular.
207972
+ /**
207973
+ * Normalize both `vectorU` and `vectorV` in place. This does NOT make them perpendicular.
207884
207974
  * * Return true if both succeeded.
207885
207975
  */
207886
207976
  normalizeInPlace() {
@@ -207888,9 +207978,7 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207888
207978
  const okV = this.vectorV.normalizeInPlace();
207889
207979
  return okU && okV;
207890
207980
  }
207891
- /**
207892
- * Return (if possible) a unit normal to the plane.
207893
- */
207981
+ /** Return (if possible) a unit normal to the plane */
207894
207982
  getUnitNormal(result) {
207895
207983
  return this.vectorU.unitCrossProduct(this.vectorV, result);
207896
207984
  }
@@ -207907,9 +207995,7 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207907
207995
  getAnyPointOnPlane(result) {
207908
207996
  return this.origin.clone(result);
207909
207997
  }
207910
- /**
207911
- * Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane.
207912
- */
207998
+ /** Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane */
207913
207999
  unitNormalRay(result) {
207914
208000
  if (!Plane3dByOriginAndVectors._workVector)
207915
208001
  Plane3dByOriginAndVectors._workVector = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
@@ -207929,27 +208015,24 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207929
208015
  toRigidFrame(result) {
207930
208016
  return _Transform__WEBPACK_IMPORTED_MODULE_5__.Transform.createRigidFromOriginAndColumns(this.origin, this.vectorU, this.vectorV, _Geometry__WEBPACK_IMPORTED_MODULE_3__.AxisOrder.XYZ, result);
207931
208017
  }
207932
- /**
207933
- * Apply the transform to the origin and vectors in place.
207934
- */
208018
+ /** Apply the transform to the origin and vectors in place */
207935
208019
  transformInPlace(transform) {
207936
208020
  transform.multiplyPoint3d(this.origin, this.origin);
207937
208021
  transform.multiplyVector(this.vectorU, this.vectorU);
207938
208022
  transform.multiplyVector(this.vectorV, this.vectorV);
207939
208023
  }
207940
- // Implement PlaneAltitudeEvaluator methods . . .
207941
208024
  /**
207942
208025
  * Return x component of the (normalized!) {vectorU CROSS vectorV}.
207943
208026
  * Return 0 if the cross product is zero.
207944
- * */
208027
+ */
207945
208028
  normalX() {
207946
208029
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207947
208030
  return unitNormal !== undefined ? unitNormal.x : 0.0;
207948
208031
  }
207949
208032
  /**
207950
- * Return y component of the (normalized!) {vectorU CROSS vectorV}.
207951
- * Return 0 if the cross product is zero.
207952
- * */
208033
+ * Return y component of the (normalized!) {vectorU CROSS vectorV}.
208034
+ * Return 0 if the cross product is zero.
208035
+ */
207953
208036
  normalY() {
207954
208037
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207955
208038
  return unitNormal !== undefined ? unitNormal.y : 0.0;
@@ -207957,41 +208040,43 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
207957
208040
  /**
207958
208041
  * Return z component of the (normalized!) {vectorU CROSS vectorV}.
207959
208042
  * Return 0 if the cross product is zero.
207960
- * */
208043
+ */
207961
208044
  normalZ() {
207962
208045
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207963
208046
  return unitNormal !== undefined ? unitNormal.z : 0.0;
207964
208047
  }
207965
- /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
208048
+ /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
207966
208049
  altitude(xyz) {
207967
208050
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207968
208051
  if (unitNormal === undefined)
207969
208052
  return 0.0;
207970
208053
  return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYZXYZ((xyz.x - this.origin.x), (xyz.y - this.origin.y), (xyz.z - this.origin.z), unitNormal.x, unitNormal.y, unitNormal.z);
207971
208054
  }
207972
- /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
208055
+ /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
207973
208056
  altitudeXYZ(x, y, z) {
207974
208057
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207975
208058
  if (unitNormal === undefined)
207976
208059
  return 0.0;
207977
208060
  return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYZXYZ((x - this.origin.x), (y - this.origin.y), (z - this.origin.z), unitNormal.x, unitNormal.y, unitNormal.z);
207978
208061
  }
207979
- /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
208062
+ /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
207980
208063
  velocity(xyzVector) {
207981
208064
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207982
208065
  if (unitNormal === undefined)
207983
208066
  return 0.0;
207984
208067
  return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYZXYZ(xyzVector.x, xyzVector.y, xyzVector.z, unitNormal.x, unitNormal.y, unitNormal.z);
207985
208068
  }
207986
- /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
208069
+ /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
207987
208070
  velocityXYZ(x, y, z) {
207988
208071
  const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
207989
208072
  if (unitNormal === undefined)
207990
208073
  return 0.0;
207991
208074
  return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYZXYZ(x, y, z, unitNormal.x, unitNormal.y, unitNormal.z);
207992
208075
  }
207993
- /** Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.
207994
- * * In the usual manner of homogeneous calculations, this is proportional to true cartesian distance from the plane but is not a physical distance.
208076
+ /**
208077
+ * Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.
208078
+ * * In the usual manner of homogeneous calculations, this is proportional to true cartesian distance from the
208079
+ * plane but is not a physical distance.
207995
208080
  */
207996
208081
  weightedAltitude(xyzw) {
207997
208082
  const w = xyzw.w;
@@ -214161,7 +214246,7 @@ class Range3d extends RangeBase {
214161
214246
  const coffs = transform.matrix.coffs;
214162
214247
  this.extendXYZW(origin.x * w + coffs[0] * x + coffs[1] * y + coffs[2] * z, origin.y * w + coffs[3] * x + coffs[4] * y + coffs[5] * z, origin.z * w + coffs[6] * x + coffs[7] * y + coffs[8] * z, w);
214163
214248
  }
214164
- /** Multiply the point x,y,z by transform and use the coordinate to extend this range. */
214249
+ /** Multiply the point x,y,z by the inverse of the transform and use the coordinate to extend this range. */
214165
214250
  extendInverseTransformedXYZ(transform, x, y, z) {
214166
214251
  const origin = transform.origin;
214167
214252
  if (!transform.matrix.computeCachedInverse(true))
@@ -284650,7 +284735,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
284650
284735
  /***/ ((module) => {
284651
284736
 
284652
284737
  "use strict";
284653
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.1.0-dev.25","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/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && 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.1.0-dev.25","@itwin/core-bentley":"workspace:^4.1.0-dev.25","@itwin/core-common":"workspace:^4.1.0-dev.25","@itwin/core-geometry":"workspace:^4.1.0-dev.25","@itwin/core-orbitgt":"workspace:^4.1.0-dev.25","@itwin/core-quantity":"workspace:^4.1.0-dev.25"},"//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.33","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.36.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~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/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.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","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
284738
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.1.0-dev.26","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/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && 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.1.0-dev.26","@itwin/core-bentley":"workspace:^4.1.0-dev.26","@itwin/core-common":"workspace:^4.1.0-dev.26","@itwin/core-geometry":"workspace:^4.1.0-dev.26","@itwin/core-orbitgt":"workspace:^4.1.0-dev.26","@itwin/core-quantity":"workspace:^4.1.0-dev.26"},"//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.33","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.36.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~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/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.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","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
284654
284739
 
284655
284740
  /***/ })
284656
284741