@itwin/ecschema-rpcinterface-tests 4.2.0-dev.32 → 4.2.0-dev.33

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.
@@ -184174,10 +184174,10 @@ __webpack_require__.r(__webpack_exports__);
184174
184174
  /* harmony export */ });
184175
184175
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
184176
184176
  /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
184177
+ /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
184177
184178
  /* harmony import */ var _internalContexts_CurveCurveCloseApproachXY__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalContexts/CurveCurveCloseApproachXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js");
184178
184179
  /* harmony import */ var _internalContexts_CurveCurveIntersectXY__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js");
184179
184180
  /* harmony import */ var _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXYZ */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js");
184180
- /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
184181
184181
  /*---------------------------------------------------------------------------------------------
184182
184182
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
184183
184183
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -184220,6 +184220,7 @@ class CurveCurve {
184220
184220
  }
184221
184221
  /**
184222
184222
  * Return xy intersections of 2 projected curves.
184223
+ * @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.
184223
184224
  * @param curveA first curve
184224
184225
  * @param extendA true to allow curveA to extend
184225
184226
  * @param curveB second curve
@@ -184232,19 +184233,20 @@ class CurveCurve {
184232
184233
  return handler.grabPairedResults();
184233
184234
  }
184234
184235
  /**
184235
- * Return full 3d xyz intersections of 2 curves.
184236
- * * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
184237
- * * Not Implemented for bspline and bezier curves.
184238
- * @beta
184239
- * @param curveA first curve
184240
- * @param extendA true to allow curveA to extend
184241
- * @param curveB second curve
184242
- * @param extendB true to allow curveB to extend
184243
- */
184244
- static intersectionXYZ(curveA, extendA, curveB, extendB) {
184236
+ * Return full 3d xyz intersections of 2 curves.
184237
+ * * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
184238
+ * * Not Implemented for bspline and bezier curves.
184239
+ * @beta
184240
+ * @param curveA first curve
184241
+ * @param extendA true to allow curveA to extend
184242
+ * @param curveB second curve
184243
+ * @param extendB true to allow curveB to extend
184244
+ * @returns array of intersections structured as CurveLocationDetailPair[]
184245
+ */
184246
+ static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
184245
184247
  const handler = new _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__.CurveCurveIntersectXYZ(extendA, curveB, extendB);
184246
184248
  curveA.dispatchToGeometryHandler(handler);
184247
- return handler.grabResults();
184249
+ return handler.grabPairedResults();
184248
184250
  }
184249
184251
  /**
184250
184252
  * Return xy intersections of input curves.
@@ -185474,7 +185476,8 @@ class CurveLocationDetailPair {
185474
185476
  }
185475
185477
  }
185476
185478
  /**
185477
- * Data bundle for a pair of arrays of CurveLocationDetail structures such as produced by [[CurveCurve.intersectionXYZ]].
185479
+ * Data bundle for a pair of arrays of CurveLocationDetail structures.
185480
+ * @deprecated in 4.x. Use CurveLocationDetailPair[] instead.
185478
185481
  * @public
185479
185482
  */
185480
185483
  class CurveLocationDetailArrayPair {
@@ -194544,15 +194547,13 @@ class BezierBezierIntersectionXYRRToRRD extends _numerics_Newton__WEBPACK_IMPORT
194544
194547
  * @internal
194545
194548
  */
194546
194549
  class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_2__.NullGeometryHandler {
194547
- reinitialize() {
194548
- this._results = [];
194549
- }
194550
194550
  /**
194551
+ * The constructor.
194551
194552
  * @param worldToLocal optional transform (possibly perspective) to project to xy plane for intersection.
194552
- * @param extendA flag to enable using extension of the other geometry.
194553
- * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
194553
+ * @param extendA flag for extension of the other geometry.
194554
+ * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
194554
194555
  * @param extendB flag for extension of geometryB.
194555
- * @param tolerance optional distance tolerance for coincidence
194556
+ * @param tolerance optional distance tolerance for coincidence.
194556
194557
  */
194557
194558
  constructor(worldToLocal, extendA, geometryB, extendB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
194558
194559
  super();
@@ -194567,7 +194568,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194567
194568
  this._worldToLocalPerspective = worldToLocal.clone();
194568
194569
  }
194569
194570
  this._coincidentGeometryContext = _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_4__.CoincidentGeometryQuery.create(tolerance);
194570
- this.reinitialize();
194571
+ this._results = [];
194571
194572
  }
194572
194573
  /** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */
194573
194574
  resetGeometry(extendA, geometryB, extendB) {
@@ -194582,10 +194583,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194582
194583
  return false;
194583
194584
  return true;
194584
194585
  }
194585
- /**
194586
- * Test the fraction by strict parameter, but allow toleranced distance test at ends.
194587
- * @param tolerance optional distance tolerance to check proximity to start/end point
194588
- */
194586
+ /** Test the fraction by strict parameter, but allow toleranced distance test at ends. */
194589
194587
  acceptFractionOnLine(extend0, fraction, extend1, pointA, pointB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
194590
194588
  if (!extend0 && fraction < 0) {
194591
194589
  return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(fraction * pointA.distanceXY(pointB), tolerance);
@@ -194595,25 +194593,32 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194595
194593
  return true;
194596
194594
  }
194597
194595
  /**
194598
- * * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair
194596
+ * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair
194599
194597
  * @param reinitialize if true, a new results structure is created for use by later calls.
194600
194598
  */
194601
194599
  grabPairedResults(reinitialize = false) {
194602
194600
  const result = this._results;
194603
194601
  if (reinitialize)
194604
- this.reinitialize();
194602
+ this._results = [];
194605
194603
  return result;
194606
194604
  }
194607
194605
  sameCurveAndFraction(cp, fraction, detail) {
194608
194606
  return cp === detail.curve && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualNumber(fraction, detail.fraction);
194609
194607
  }
194610
194608
  /**
194611
- * Compute intersection of two line segments.
194612
- * Filter by extension rules.
194613
- * Record with fraction mapping.
194609
+ * Record the pre-computed intersection between two curves. Filter by extension rules. Record with fraction mapping.
194610
+ * @param localFractionA intersection fraction local to the subcurve of cpA between fractionA0 and fractionA1
194611
+ * @param cpA the first curve
194612
+ * @param fractionA0 start of the subcurve of cpA
194613
+ * @param fractionA1 end of the subcurve of cpA
194614
+ * @param localFractionB intersection fraction local to the subcurve of cpB between fractionB0 and fractionB1
194615
+ * @param cpB the second curve
194616
+ * @param fractionB0 start of the subcurve of cpB
194617
+ * @param fractionB1 end of the subcurve of cpB
194618
+ * @param reversed whether to reverse the details in the recorded intersection pair
194619
+ * @param intervalDetails optional data for a coincident segment intersection
194614
194620
  */
194615
- recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, // Computed intersection fraction
194616
- cpB, fractionB0, fractionB1, reversed, intervalDetails) {
194621
+ recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
194617
194622
  let globalFractionA, globalFractionB;
194618
194623
  let globalFractionA1, globalFractionB1;
194619
194624
  const isInterval = intervalDetails !== undefined &&
@@ -194629,7 +194634,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194629
194634
  globalFractionA = globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
194630
194635
  globalFractionB = globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
194631
194636
  }
194632
- // ignore duplicate of most recent point . ..
194637
+ // ignore duplicate of most recent pair
194633
194638
  const numPrevious = this._results.length;
194634
194639
  if (numPrevious > 0 && !isInterval) {
194635
194640
  const oldDetailA = this._results[numPrevious - 1].detailA;
@@ -194663,10 +194668,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194663
194668
  }
194664
194669
  }
194665
194670
  /**
194666
- * Emit recordPoint for multiple pairs (on full curve!)
194667
- * @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
194668
- * @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
194669
- * @param pairs array of pairs
194671
+ * Emit recordPoint for multiple pairs (on full curve).
194672
+ * @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible).
194673
+ * @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible).
194674
+ * @param pairs array of pairs.
194670
194675
  * @param reversed true to have order reversed in final structures.
194671
194676
  */
194672
194677
  recordPairs(cpA, cpB, pairs, reversed) {
@@ -194676,11 +194681,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194676
194681
  }
194677
194682
  }
194678
194683
  }
194679
- /**
194680
- * Compute intersection of two line segments.
194681
- * Filter by extension rules.
194682
- * Record with fraction mapping.
194683
- */
194684
+ /** Compute intersection of two line segments. Filter by extension rules. Record with fraction mapping. */
194684
194685
  computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
194685
194686
  const uv = CurveCurveIntersectXY._workVector2dA;
194686
194687
  // Problem: Normal practice is to do the (quick, simple) transverse intersection first
@@ -194698,7 +194699,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194698
194699
  }
194699
194700
  }
194700
194701
  }
194701
- // intersection of PROJECTED homogeneous segments ... assumes caller knows the _worldToLocal is present
194702
+ /**
194703
+ * Compute intersection of projected homogeneous line segments. Filter by extension rules. Record with
194704
+ * fraction mapping. Assumes caller knows the _worldToLocal is present.
194705
+ */
194702
194706
  computeSegmentSegment3DH(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
194703
194707
  const hA0 = CurveCurveIntersectXY._workPointA0H;
194704
194708
  const hA1 = CurveCurveIntersectXY._workPointA1H;
@@ -194719,8 +194723,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194719
194723
  }
194720
194724
  }
194721
194725
  // Caller accesses data from a line segment and passes to here.
194722
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
194723
- // The fraction and extend parameters allow all combinations to be passed in)
194726
+ // The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
194727
+ // The fraction and extend parameters allow all combinations to be passed in.
194724
194728
  // This method applies transform.
194725
194729
  dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
194726
194730
  if (this._worldToLocalAffine) {
@@ -194736,14 +194740,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194736
194740
  }
194737
194741
  }
194738
194742
  // Caller accesses data from a linestring or segment and passes it here.
194739
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
194740
- // The fraction and extend parameters allow all combinations to be passed in)
194743
+ // The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
194744
+ // The fraction and extend parameters allow all combinations to be passed in.
194741
194745
  dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
194742
194746
  // Arc: X = C + cU + sV
194743
194747
  // Line: contains points A0,A1
194744
194748
  // Arc point colinear with line if det (A0, A1, X) = 0
194745
194749
  // with homogeneous xyw points and vectors.
194746
- // With equational X: det (A0, A1, C) + c det (A0, A1,U) + s det (A0, A1, V) = 0.
194750
+ // With equational X: det (A0, A1, C) + c det (A0, A1,U) + s det (A0, A1, V) = 0.
194747
194751
  // solve for theta.
194748
194752
  // evaluate points.
194749
194753
  // project back to line.
@@ -194799,9 +194803,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194799
194803
  }
194800
194804
  }
194801
194805
  // Caller accesses data from two arcs.
194802
- // each matrix has [U V C] in (x,y,w) form from projection.
194803
- // invert the projection matrix matrixA.
194804
- // apply the inverse to matrixB. Then arc b is an ellipse in the circular space of A
194806
+ // Each matrix has [U V C] in (x,y,w) form from projection.
194807
+ // Invert the projection matrix matrixA.
194808
+ // Apply the inverse to matrixB. Then arc b is an ellipse in the circular space of A.
194805
194809
  dispatchArcArcThisOrder(cpA, matrixA, // homogeneous xyw projection !!!
194806
194810
  extendA, cpB, matrixB, // homogeneous xyw projection !!!
194807
194811
  extendB, reversed) {
@@ -194825,8 +194829,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194825
194829
  }
194826
194830
  }
194827
194831
  // Caller accesses data from two arcs.
194828
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
194829
- // Solves the arc-arc equations
194832
+ // Selects the best conditioned arc (in xy parts) as "circle after inversion".
194833
+ // Solves the arc-arc equations.
194830
194834
  dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
194831
194835
  // Arc: X = C + cU + sV
194832
194836
  // Line: contains points A0,A1
@@ -194872,9 +194876,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194872
194876
  this.recordPairs(cpA, cpB, pairs, reversed);
194873
194877
  }
194874
194878
  }
194875
- // Caller accesses data from two arcs.
194876
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
194877
- // Solves the arc-arc equations
194878
194879
  dispatchArcBsplineCurve3d(cpA, extendA, cpB, extendB, reversed) {
194879
194880
  // Arc: X = C + cU + sV
194880
194881
  // implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
@@ -194945,7 +194946,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194945
194946
  }
194946
194947
  }
194947
194948
  }
194948
- /** Apply the transformation to bezier curves. optionally construct ranges. */
194949
+ /** Apply the transformation to bezier curves. Optionally construct ranges. */
194949
194950
  transformBeziers(beziers) {
194950
194951
  if (this._worldToLocalAffine) {
194951
194952
  for (const bezier of beziers)
@@ -194985,8 +194986,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
194985
194986
  const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
194986
194987
  const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
194987
194988
  if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
194988
- this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,
194989
- fractionB, cpB, 0, 1, reversed);
194989
+ this.recordPointWithLocalFractions(
194990
+ arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
194991
+ );
194990
194992
  }
194991
194993
  }
194992
194994
  */
@@ -195002,7 +195004,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195002
195004
  bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
195003
195005
  let errors = 0;
195004
195006
  const roots = univariateBezierB.roots(0.0, true);
195005
- if (roots)
195007
+ if (roots) {
195006
195008
  for (const r of roots) {
195007
195009
  let bezierBFraction = r;
195008
195010
  bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
@@ -195039,11 +195041,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195039
195041
  }
195040
195042
  }
195041
195043
  }
195044
+ }
195042
195045
  }
195043
195046
  }
195044
- // Caller accesses data from two arcs.
195045
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
195046
- // Solves the arc-arc equations
195047
195047
  dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, _reversed) {
195048
195048
  const bezierSpanA = bcurveA.collectBezierSpans(true);
195049
195049
  const bezierSpanB = bcurveB.collectBezierSpans(true);
@@ -195071,9 +195071,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195071
195071
  }
195072
195072
  }
195073
195073
  /**
195074
- * Apply the projection transform (if any) to (xyz, w)
195074
+ * Apply the projection transform (if any) to (xyz, w).
195075
195075
  * @param xyz xyz parts of input point.
195076
- * @param w weight to use for homogeneous effects
195076
+ * @param w weight to use for homogeneous effects.
195077
195077
  */
195078
195078
  projectPoint(xyz, w = 1.0) {
195079
195079
  if (this._worldToLocalPerspective)
@@ -195098,9 +195098,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195098
195098
  npcPlane.clone(worldPlane);
195099
195099
  }
195100
195100
  }
195101
- // Caller accesses data from segment and bsplineCurve
195102
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
195103
- // Solves the arc-arc equations
195101
+ // Caller accesses data from segment and bsplineCurve.
195102
+ // Selects the best conditioned arc (in xy parts) as "circle after inversion".
195103
+ // Solves the arc-arc equations.
195104
195104
  dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB, reversed) {
195105
195105
  const pointA0H = this.projectPoint(pointA0);
195106
195106
  const pointA1H = this.projectPoint(pointA1);
@@ -195182,6 +195182,38 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195182
195182
  }
195183
195183
  return undefined;
195184
195184
  }
195185
+ /** Detail computation for linestring intersecting linestring. */
195186
+ computeLineStringLineString(lsA, lsB, reversed) {
195187
+ const pointA0 = CurveCurveIntersectXY._workPointAA0;
195188
+ const pointA1 = CurveCurveIntersectXY._workPointAA1;
195189
+ const pointB0 = CurveCurveIntersectXY._workPointBB0;
195190
+ const pointB1 = CurveCurveIntersectXY._workPointBB1;
195191
+ const numA = lsA.numPoints();
195192
+ const numB = lsB.numPoints();
195193
+ if (numA > 1 && numB > 1) {
195194
+ lsA.pointAt(0, pointA0);
195195
+ const dfA = 1.0 / (numA - 1);
195196
+ const dfB = 1.0 / (numB - 1);
195197
+ let fA0 = 0.0;
195198
+ let fB0;
195199
+ let fA1;
195200
+ let fB1;
195201
+ const extendA = this._extendA;
195202
+ const extendB = this._extendB;
195203
+ lsA.pointAt(0, pointA0);
195204
+ for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
195205
+ fA1 = ia * dfA;
195206
+ fB0 = 0.0;
195207
+ lsA.pointAt(ia, pointA1);
195208
+ lsB.pointAt(0, pointB0);
195209
+ for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
195210
+ lsB.pointAt(ib, pointB1);
195211
+ fB1 = ib * dfB;
195212
+ this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
195213
+ }
195214
+ }
195215
+ }
195216
+ }
195185
195217
  static setTransformedWorkPoints(transform, pointA0, pointA1, pointB0, pointB1) {
195186
195218
  transform.multiplyPoint3d(pointA0, this._workPointA0);
195187
195219
  transform.multiplyPoint3d(pointA1, this._workPointA1);
@@ -195203,40 +195235,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
195203
195235
  else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_14__.BSplineCurve3d) {
195204
195236
  this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
195205
195237
  }
195238
+ return undefined;
195206
195239
  }
195207
195240
  /** Double dispatch handler for strongly typed linestring. */
195208
195241
  handleLineString3d(lsA) {
195209
195242
  if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_12__.LineString3d) {
195210
195243
  const lsB = this._geometryB;
195211
- const pointA0 = CurveCurveIntersectXY._workPointAA0;
195212
- const pointA1 = CurveCurveIntersectXY._workPointAA1;
195213
- const pointB0 = CurveCurveIntersectXY._workPointBB0;
195214
- const pointB1 = CurveCurveIntersectXY._workPointBB1;
195215
- const numA = lsA.numPoints();
195216
- const numB = lsB.numPoints();
195217
- if (numA > 1 && numB > 1) {
195218
- lsA.pointAt(0, pointA0);
195219
- const dfA = 1.0 / (numA - 1);
195220
- const dfB = 1.0 / (numB - 1);
195221
- let fA0 = 0.0;
195222
- let fB0;
195223
- let fA1;
195224
- let fB1;
195225
- const extendA = this._extendA;
195226
- const extendB = this._extendB;
195227
- lsA.pointAt(0, pointA0);
195228
- for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
195229
- fA1 = ia * dfA;
195230
- fB0 = 0.0;
195231
- lsA.pointAt(ia, pointA1);
195232
- lsB.pointAt(0, pointB0);
195233
- for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
195234
- lsB.pointAt(ib, pointB1);
195235
- fB1 = ib * dfB;
195236
- this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, false);
195237
- }
195238
- }
195239
- }
195244
+ this.computeLineStringLineString(lsA, lsB, false);
195240
195245
  }
195241
195246
  else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
195242
195247
  this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
@@ -195329,14 +195334,14 @@ __webpack_require__.r(__webpack_exports__);
195329
195334
  /* harmony export */ CurveCurveIntersectXYZ: () => (/* binding */ CurveCurveIntersectXYZ)
195330
195335
  /* harmony export */ });
195331
195336
  /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
195332
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
195337
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
195333
195338
  /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
195334
195339
  /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
195335
195340
  /* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
195336
195341
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
195337
195342
  /* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
195338
195343
  /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
195339
- /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
195344
+ /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
195340
195345
  /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
195341
195346
  /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
195342
195347
  /*---------------------------------------------------------------------------------------------
@@ -195365,9 +195370,6 @@ __webpack_require__.r(__webpack_exports__);
195365
195370
  * @internal
195366
195371
  */
195367
195372
  class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__.NullGeometryHandler {
195368
- reinitialize() {
195369
- this._results = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetailArrayPair();
195370
- }
195371
195373
  /**
195372
195374
  * @param extendA flag to enable using extension of the other geometry.
195373
195375
  * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
@@ -195378,16 +195380,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195378
195380
  this._extendA = extendA;
195379
195381
  this._geometryB = geometryB;
195380
195382
  this._extendB = extendB;
195381
- this.reinitialize();
195383
+ this._results = [];
195382
195384
  }
195383
195385
  /**
195384
- * * Return the results structure for the intersection calculation.
195386
+ * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
195385
195387
  * @param reinitialize if true, a new results structure is created for use by later calls.
195386
195388
  */
195387
- grabResults(reinitialize = false) {
195389
+ grabPairedResults(reinitialize = false) {
195388
195390
  const result = this._results;
195389
195391
  if (reinitialize)
195390
- this.reinitialize();
195392
+ this._results = [];
195391
195393
  return result;
195392
195394
  }
195393
195395
  acceptFraction(extend0, fraction, extend1) {
@@ -195403,23 +195405,22 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195403
195405
  * Reject if evaluated points do not match coordinates (e.g. close approach point).
195404
195406
  * Record with fraction mapping.
195405
195407
  */
195406
- recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, // Computed intersection fraction
195407
- cpB, fractionB0, fractionB1, reversed) {
195408
- const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
195409
- const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
195408
+ recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed) {
195409
+ const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
195410
+ const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
195410
195411
  // ignore duplicate of most recent point . ..
195411
- const numPrevious = this._results.dataA.length;
195412
+ const numPrevious = this._results.length;
195412
195413
  if (numPrevious > 0) {
195413
- const topFractionA = this._results.dataA[numPrevious - 1].fraction;
195414
- const topFractionB = this._results.dataB[numPrevious - 1].fraction;
195414
+ const topFractionA = this._results[numPrevious - 1].detailA.fraction;
195415
+ const topFractionB = this._results[numPrevious - 1].detailB.fraction;
195415
195416
  if (reversed) {
195416
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
195417
- _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
195417
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
195418
+ _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
195418
195419
  return;
195419
195420
  }
195420
195421
  else {
195421
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) &&
195422
- _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))
195422
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) &&
195423
+ _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))
195423
195424
  return;
195424
195425
  }
195425
195426
  }
@@ -195427,17 +195428,17 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195427
195428
  const pointB = cpB.fractionToPoint(globalFractionB);
195428
195429
  if (!pointA.isAlmostEqualMetric(pointB))
195429
195430
  return;
195430
- const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, pointA);
195431
- detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveIntervalRole.isolated);
195432
- const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
195433
- detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveIntervalRole.isolated);
195431
+ const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, pointA);
195432
+ detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
195433
+ const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
195434
+ detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
195434
195435
  if (reversed) {
195435
- this._results.dataA.push(detailB);
195436
- this._results.dataB.push(detailA);
195436
+ const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailB, detailA);
195437
+ this._results.push(pair);
195437
195438
  }
195438
195439
  else {
195439
- this._results.dataA.push(detailA);
195440
- this._results.dataB.push(detailB);
195440
+ const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailA, detailB);
195441
+ this._results.push(pair);
195441
195442
  }
195442
195443
  }
195443
195444
  /**
@@ -195453,8 +195454,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195453
195454
  }
195454
195455
  }
195455
195456
  // Caller accesses data from a line segment and passes to here.
195456
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters
195457
- // allow all combinations to be passed in)
195457
+ // The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
195458
+ // The fraction and extend parameters allow all combinations to be passed in.
195458
195459
  // This method applies transform.
195459
195460
  dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
195460
195461
  this.computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed);
@@ -195469,12 +195470,12 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195469
195470
  * @param origin plane origin
195470
195471
  * @param vectorA vector which must be in the plane.
195471
195472
  * @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
195472
- * passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
195473
+ * passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
195473
195474
  * @param vectorB first candidate for additional in-plane vector
195474
195475
  * @param vectorC second candidate for additional in-plane vector
195475
195476
  */
195476
195477
  createPlaneWithPreferredPerpendicular(origin, vectorA, cosineValue, vectorB, vectorC) {
195477
- cosineValue = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallFraction);
195478
+ cosineValue = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallFraction);
195478
195479
  const dotAA = vectorA.magnitudeSquared();
195479
195480
  const dotBB = vectorB.magnitudeSquared();
195480
195481
  const dotAB = Math.abs(vectorA.dotProduct(vectorB));
@@ -195484,8 +195485,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195484
195485
  return undefined;
195485
195486
  }
195486
195487
  // Caller accesses data from a linestring or segment and passes it here.
195487
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters
195488
- // allow all combinations to be passed in)
195488
+ // The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
195489
+ // The fraction and extend parameters allow all combinations to be passed in.
195489
195490
  dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
195490
195491
  const lineVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.createStartEnd(pointA0, pointA1);
195491
195492
  const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);
@@ -195520,7 +195521,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195520
195521
  _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_3__.TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(otherVectors.center.x, otherVectors.center.y, 1.0, otherVectors.vector0.x, otherVectors.vector0.y, 0.0, otherVectors.vector90.x, otherVectors.vector90.y, 0.0, ellipseRadians, circleRadians);
195521
195522
  for (let i = 0; i < ellipseRadians.length; i++) {
195522
195523
  const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
195523
- const fractionB = cpA.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
195524
+ const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
195524
195525
  // hm .. do we really need to check the fractions? We know they are internal to the beziers
195525
195526
  if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
195526
195527
  this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
@@ -195529,13 +195530,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195529
195530
  }
195530
195531
  }
195531
195532
  // Caller accesses data from two arcs.
195532
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
195533
- // Solves the arc-arc equations
195533
+ // Selects the best conditioned arc (in xy parts) as "circle after inversion".
195534
+ // Solves the arc-arc equations.
195534
195535
  dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
195535
195536
  // If arcs are in different planes:
195536
195537
  // 1) Intersect each plane with the other arc (quadratic)
195537
195538
  // 2) accept points that appear in both intersection sets.
195538
- // If arcs are in parallel planes -- no intersections
195539
+ // If arcs are in parallel planes -- no intersections.
195539
195540
  // If arcs are in the same plane -- xy intersection in that plane.
195540
195541
  const planeA = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);
195541
195542
  const planeB = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);
@@ -195543,7 +195544,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195543
195544
  return;
195544
195545
  if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
195545
195546
  if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {
195546
- // coplanar !!!
195547
+ // coplanar
195547
195548
  this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
195548
195549
  }
195549
195550
  }
@@ -195565,8 +195566,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195565
195566
  }
195566
195567
  }
195567
195568
  // Caller accesses data from two arcs.
195568
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
195569
- // Solves the arc-arc equations
195569
+ // Selects the best conditioned arc (in xy parts) as "circle after inversion".
195570
+ // Solves the arc-arc equations.
195570
195571
  dispatchArcBsplineCurve3d(_arc, _extendA, _cpB, _extendB, _reversed) {
195571
195572
  /*
195572
195573
  // Arc: X = C + cU + sV
@@ -195574,7 +195575,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195574
195575
  let matrixA: Matrix3d;
195575
195576
  if (this._worldToLocalPerspective) {
195576
195577
  const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
195577
- matrixA = Matrix3d.createColumnsXYW(dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w);
195578
+ matrixA = Matrix3d.createColumnsXYW(
195579
+ dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w,
195580
+ );
195578
195581
  } else {
195579
195582
  const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
195580
195583
  matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
@@ -195586,12 +195589,21 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195586
195589
  const matrixAInverse = matrixA.inverse();
195587
195590
  if (matrixAInverse) {
195588
195591
  const orderF = cpB.order; // order of the beziers for simple coordinates
195589
- const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
195592
+ const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
195590
195593
  const coffF = new Float64Array(orderF);
195591
195594
  const univariateBezierG = new UnivariateBezier(orderG);
195592
- const axx = matrixAInverse.at(0, 0); const axy = matrixAInverse.at(0, 1); const axz = 0.0; const axw = matrixAInverse.at(0, 2);
195593
- const ayx = matrixAInverse.at(1, 0); const ayy = matrixAInverse.at(1, 1); const ayz = 0.0; const ayw = matrixAInverse.at(1, 2);
195594
- const awx = matrixAInverse.at(2, 0); const awy = matrixAInverse.at(2, 1); const awz = 0.0; const aww = matrixAInverse.at(2, 2);
195595
+ const axx = matrixAInverse.at(0, 0);
195596
+ const axy = matrixAInverse.at(0, 1);
195597
+ const axz = 0.0;
195598
+ const axw = matrixAInverse.at(0, 2);
195599
+ const ayx = matrixAInverse.at(1, 0);
195600
+ const ayy = matrixAInverse.at(1, 1);
195601
+ const ayz = 0.0;
195602
+ const ayw = matrixAInverse.at(1, 2);
195603
+ const awx = matrixAInverse.at(2, 0);
195604
+ const awy = matrixAInverse.at(2, 1);
195605
+ const awz = 0.0;
195606
+ const aww = matrixAInverse.at(2, 2);
195595
195607
 
195596
195608
  if (matrixAInverse) {
195597
195609
  let bezier: BezierCurve3dH | undefined;
@@ -195618,9 +195630,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195618
195630
  const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
195619
195631
  const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
195620
195632
  const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
195621
- if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
195622
- this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,
195623
- fractionB, cpB, 0, 1, reversed);
195633
+ if (this.acceptFraction(extendA, arcFraction, extendA) &&
195634
+ this.acceptFraction(extendB, fractionB, extendB)) {
195635
+ this.recordPointWithLocalFractions(
195636
+ arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
195637
+ );
195624
195638
  }
195625
195639
  }
195626
195640
  }
@@ -195630,8 +195644,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195630
195644
  */
195631
195645
  }
195632
195646
  /*
195633
- // apply the transformation to bezier curves. optionally construct ranges.
195634
- private transformBeziers(beziers: BezierCurve3dH[]) {
195647
+ // Apply the transformation to bezier curves. Optionally construct ranges.
195648
+ private transformBeziers(beziers: BezierCurve3dH[]): void {
195635
195649
  if (this._worldToLocalAffine) {
195636
195650
  for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);
195637
195651
  } else if (this._worldToLocalPerspective) {
@@ -195648,11 +195662,6 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195648
195662
  }
195649
195663
  return ranges;
195650
195664
  }
195651
- private _xyzwA0?: Point4d;
195652
- private _xyzwA1?: Point4d;
195653
- private _xyzwPlane?: Point4d;
195654
- private _xyzwB?: Point4d;
195655
-
195656
195665
  private dispatchBezierBezierStrokeFirst(
195657
195666
  bezierA: BezierCurve3dH,
195658
195667
  bcurveA: BSplineCurve3dBase,
@@ -195661,11 +195670,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195661
195670
  bcurveB: BSplineCurve3dBase,
195662
195671
  _strokeCountB: number,
195663
195672
  univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.
195664
- reversed: boolean) {
195665
- if (!this._xyzwA0) this._xyzwA0 = Point4d.create();
195666
- if (!this._xyzwA1) this._xyzwA1 = Point4d.create();
195667
- if (!this._xyzwPlane) this._xyzwPlane = Point4d.create();
195668
- if (!this._xyzwB) this._xyzwB = Point4d.create();
195673
+ reversed: boolean,
195674
+ ) {
195675
+ if (!this._xyzwA0)
195676
+ this._xyzwA0 = Point4d.create();
195677
+ if (!this._xyzwA1)
195678
+ this._xyzwA1 = Point4d.create();
195679
+ if (!this._xyzwPlane)
195680
+ this._xyzwPlane = Point4d.create();
195681
+ if (!this._xyzwB)
195682
+ this._xyzwB = Point4d.create();
195669
195683
  const roots = univariateBezierG.roots(0.0, true);
195670
195684
  if (roots) {
195671
195685
  for (const root of roots) {
@@ -195676,8 +195690,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195676
195690
  const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
195677
195691
  const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
195678
195692
  if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
195679
- this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1,
195680
- fractionB, cpB, 0, 1, reversed);
195693
+ this.recordPointWithLocalFractions(
195694
+ arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
195695
+ );
195681
195696
  }
195682
195697
  }
195683
195698
  bezierA.fractionToPoint4d(0.0, this._xyzwA0);
@@ -195689,7 +195704,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195689
195704
  f1 = i * df;
195690
195705
  bezierA.fractionToPoint4d(f1, this._xyzwA1);
195691
195706
  Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
195692
- bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
195707
+ bezierB.poleProductsXYZW(
195708
+ univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w,
195709
+ );
195693
195710
  let errors = 0;
195694
195711
  const roots = univariateBezierB.roots(0.0, true);
195695
195712
  if (roots)
@@ -195699,7 +195716,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195699
195716
  const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
195700
195717
  if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
195701
195718
  const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);
195702
- /*- TODO implement newton search
195719
+ // TODO implement newton search
195703
195720
  const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);
195704
195721
  const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
195705
195722
  newtonSearcher.setUV(bezierAFraction, bezierBFraction);
@@ -195724,9 +195741,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195724
195741
  errors++;
195725
195742
  if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
195726
195743
  errors++;
195727
- if (this.acceptFraction(false, bcurveAFraction, false) && this.acceptFraction(false, bcurveBFraction, false)) {
195728
- this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1,
195729
- bcurveBFraction, bcurveB, 0, 1, reversed);
195744
+ if (this.acceptFraction(false, bcurveAFraction, false) &&
195745
+ this.acceptFraction(false, bcurveBFraction, false)) {
195746
+ this.recordPointWithLocalFractions(
195747
+ bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed,
195748
+ );
195730
195749
  }
195731
195750
  }
195732
195751
  }
@@ -195734,8 +195753,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195734
195753
  }
195735
195754
  */
195736
195755
  // Caller accesses data from two arcs.
195737
- // Selects the best conditioned arc (in xy parts) as "circle after inversion"
195738
- // Solves the arc-arc equations
195756
+ // Selects the best conditioned arc (in xy parts) as "circle after inversion".
195757
+ // Solves the arc-arc equations.
195739
195758
  dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
195740
195759
  /*
195741
195760
  const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
@@ -195756,9 +195775,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195756
195775
  const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();
195757
195776
  const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();
195758
195777
  if (strokeCountA < strokeCountB)
195759
- this.dispatchBezierBezierStrokeFirst(bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, !_reversed);
195778
+ this.dispatchBezierBezierStrokeFirst(
195779
+ bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, _reversed,
195780
+ );
195760
195781
  else
195761
- this.dispatchBezierBezierStrokeFirst(bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, _reversed);
195782
+ this.dispatchBezierBezierStrokeFirst(
195783
+ bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, !_reversed,
195784
+ );
195762
195785
  }
195763
195786
  }
195764
195787
  }
@@ -195766,9 +195789,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195766
195789
  }
195767
195790
  /*
195768
195791
  /**
195769
- * Apply the projection transform (if any) to (xyz, w)
195792
+ * Apply the projection transform (if any) to (xyz, w).
195770
195793
  * @param xyz xyz parts of input point.
195771
- * @param w weight to use for homogeneous effects
195794
+ * @param w weight to use for homogeneous effects.
195772
195795
  */
195773
195796
  /*
195774
195797
  private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {
@@ -195805,16 +195828,19 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195805
195828
  // NOW .. we have a plane in world space. Intersect it with the bspline:
195806
195829
  const intersections: CurveLocationDetail[] = [];
195807
195830
  bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);
195808
- // intersections has WORLD points with bspline fractions. (The bspline fractions are all good 0..1 fractions within the spline.)
195831
+ // intersections has WORLD points with bspline fractions.
195832
+ // (the bspline fractions are all good 0..1 fractions within the spline).
195809
195833
  // accept those that are within the segment range.
195810
195834
  for (const detail of intersections) {
195811
195835
  const fractionB = detail.fraction;
195812
195836
  const curvePoint = detail.point;
195813
195837
  const curvePointH = this.projectPoint(curvePoint);
195814
195838
  const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
195815
- if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB, fractionB, extendB)) {
195816
- this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1,
195817
- fractionB, bcurve, 0, 1, reversed);
195839
+ if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
195840
+ this.acceptFraction(extendB, fractionB, extendB)) {
195841
+ this.recordPointWithLocalFractions(
195842
+ lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
195843
+ );
195818
195844
  }
195819
195845
  }
195820
195846
  */
@@ -195831,7 +195857,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195831
195857
  const pointA0 = CurveCurveIntersectXYZ._workPointA0;
195832
195858
  const pointA1 = CurveCurveIntersectXYZ._workPointA1;
195833
195859
  lsA.pointAt(0, pointA0);
195834
- for (let iA = 1; iA < numA; iA++ , pointA0.setFrom(pointA1), fA0 = fA1) {
195860
+ for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
195835
195861
  lsA.pointAt(iA, pointA1);
195836
195862
  fA1 = iA * dfA;
195837
195863
  this.dispatchSegmentBsplineCurve(
@@ -195882,6 +195908,38 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195882
195908
  }
195883
195909
  return undefined;
195884
195910
  }
195911
+ /** Detail computation for linestring intersecting linestring. */
195912
+ computeLineStringLineString(lsA, lsB, reversed) {
195913
+ const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
195914
+ const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
195915
+ const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
195916
+ const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
195917
+ const numA = lsA.numPoints();
195918
+ const numB = lsB.numPoints();
195919
+ if (numA > 1 && numB > 1) {
195920
+ lsA.pointAt(0, pointA0);
195921
+ const dfA = 1.0 / (numA - 1);
195922
+ const dfB = 1.0 / (numB - 1);
195923
+ let fA0 = 0.0;
195924
+ let fB0;
195925
+ let fA1;
195926
+ let fB1;
195927
+ const extendA = this._extendA;
195928
+ const extendB = this._extendB;
195929
+ lsA.pointAt(0, pointA0);
195930
+ for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
195931
+ fA1 = ia * dfA;
195932
+ fB0 = 0.0;
195933
+ lsA.pointAt(ia, pointA1);
195934
+ lsB.pointAt(0, pointB0);
195935
+ for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
195936
+ lsB.pointAt(ib, pointB1);
195937
+ fB1 = ib * dfB;
195938
+ this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
195939
+ }
195940
+ }
195941
+ }
195942
+ }
195885
195943
  /** Double dispatch handler for strongly typed segment. */
195886
195944
  handleLineSegment3d(segmentA) {
195887
195945
  if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
@@ -195897,38 +195955,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195897
195955
  else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d) {
195898
195956
  this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
195899
195957
  }
195958
+ return undefined;
195900
195959
  }
195901
- /** double dispatch handler for strongly typed linestring .. */
195960
+ /** double dispatch handler for strongly typed linestring. */
195902
195961
  handleLineString3d(lsA) {
195903
195962
  if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
195904
195963
  const lsB = this._geometryB;
195905
- const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
195906
- const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
195907
- const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
195908
- const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
195909
- const numA = lsA.numPoints();
195910
- const numB = lsB.numPoints();
195911
- if (numA > 1 && numB > 1) {
195912
- lsA.pointAt(0, pointA0);
195913
- const dfA = 1.0 / (numA - 1);
195914
- const dfB = 1.0 / (numB - 1);
195915
- let fA0 = 0.0;
195916
- let fA1, fB0, fB1;
195917
- const extendA = this._extendA;
195918
- const extendB = this._extendB;
195919
- lsA.pointAt(0, pointA0);
195920
- for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
195921
- fA1 = ia * dfA;
195922
- fB0 = 0.0;
195923
- lsA.pointAt(ia, pointA1);
195924
- lsB.pointAt(0, pointB0);
195925
- for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
195926
- lsB.pointAt(ib, pointB1);
195927
- fB1 = ib * dfB;
195928
- this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, false);
195929
- }
195930
- }
195931
- }
195964
+ this.computeLineStringLineString(lsA, lsB, false);
195932
195965
  }
195933
195966
  else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
195934
195967
  this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
@@ -195957,7 +195990,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
195957
195990
  }
195958
195991
  return undefined;
195959
195992
  }
195960
- /** Double dispatch handler for strongly typed bspline curve.. */
195993
+ /** Double dispatch handler for strongly typed bspline curve. */
195961
195994
  handleBSplineCurve3d(curve) {
195962
195995
  if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
195963
195996
  this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
@@ -220775,7 +220808,8 @@ __webpack_require__.r(__webpack_exports__);
220775
220808
 
220776
220809
 
220777
220810
 
220778
- /** Map4 carries two Matrix4d which are inverses of each other.
220811
+ /**
220812
+ * Map4 carries two Matrix4d which are inverses of each other.
220779
220813
  * @public
220780
220814
  */
220781
220815
  class Map4d {
@@ -220784,16 +220818,23 @@ class Map4d {
220784
220818
  this._matrix1 = matrix1;
220785
220819
  }
220786
220820
  /** Return a reference to (not copy of) the "forward" Matrix4d */
220787
- get transform0() { return this._matrix0; }
220821
+ get transform0() {
220822
+ return this._matrix0;
220823
+ }
220788
220824
  /** Return a reference to (not copy of) the "reverse" Matrix4d */
220789
- get transform1() { return this._matrix1; }
220825
+ get transform1() {
220826
+ return this._matrix1;
220827
+ }
220790
220828
  /** Create a Map4d, capturing the references to the two matrices. */
220791
220829
  static createRefs(matrix0, matrix1) {
220792
220830
  return new Map4d(matrix0, matrix1);
220793
220831
  }
220794
220832
  /** Create an identity map. */
220795
- static createIdentity() { return new Map4d(_Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity(), _Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity()); }
220796
- /** Create a Map4d with given transform pair.
220833
+ static createIdentity() {
220834
+ return new Map4d(_Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity(), _Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity());
220835
+ }
220836
+ /**
220837
+ * Create a Map4d with given transform pair.
220797
220838
  * @returns undefined if the transforms are not inverses of each other.
220798
220839
  */
220799
220840
  static createTransform(transform0, transform1) {
@@ -220827,11 +220868,19 @@ class Map4d {
220827
220868
  return undefined;
220828
220869
  }
220829
220870
  /** Copy contents from another Map4d */
220830
- setFrom(other) { this._matrix0.setFrom(other._matrix0), this._matrix1.setFrom(other._matrix1); }
220871
+ setFrom(other) {
220872
+ this._matrix0.setFrom(other._matrix0);
220873
+ this._matrix1.setFrom(other._matrix1);
220874
+ }
220831
220875
  /** Return a clone of this Map4d */
220832
- clone() { return new Map4d(this._matrix0.clone(), this._matrix1.clone()); }
220876
+ clone() {
220877
+ return new Map4d(this._matrix0.clone(), this._matrix1.clone());
220878
+ }
220833
220879
  /** Reinitialize this Map4d as an identity. */
220834
- setIdentity() { this._matrix0.setIdentity(); this._matrix1.setIdentity(); }
220880
+ setIdentity() {
220881
+ this._matrix0.setIdentity();
220882
+ this._matrix1.setIdentity();
220883
+ }
220835
220884
  /** Set this map4d from a json object that the two Matrix4d values as properties named matrix0 and matrix1 */
220836
220885
  setFromJSON(json) {
220837
220886
  if (json.matrix0 && json.matrix1) {
@@ -220848,15 +220897,18 @@ class Map4d {
220848
220897
  return result;
220849
220898
  }
220850
220899
  /** Return a json object `{matrix0: value0, matrix1: value1}` */
220851
- toJSON() { return { matrix0: this._matrix0.toJSON(), matrix1: this._matrix1.toJSON() }; }
220900
+ toJSON() {
220901
+ return { matrix0: this._matrix0.toJSON(), matrix1: this._matrix1.toJSON() };
220902
+ }
220852
220903
  /** Test if both matrices are almost equal to those */
220853
220904
  isAlmostEqual(other) {
220854
220905
  return this._matrix0.isAlmostEqual(other._matrix0) && this._matrix1.isAlmostEqual(other._matrix1);
220855
220906
  }
220856
- /** Create a map between a frustum and world coordinates.
220907
+ /**
220908
+ * Create a map between a frustum and world coordinates.
220857
220909
  * @param origin lower left of frustum
220858
- * @param uVector Vector from lower left rear to lower right rear
220859
- * @param vVector Vector from lower left rear to upper left rear
220910
+ * @param uVector Vector from lower left rear to lower right rear.
220911
+ * @param vVector Vector from lower left rear to upper left rear.
220860
220912
  * @param wVector Vector from lower left rear to lower left front, i.e. lower left rear towards eye.
220861
220913
  * @param fraction front size divided by rear size.
220862
220914
  */
@@ -220885,7 +220937,8 @@ class Map4d {
220885
220937
  */
220886
220938
  return result;
220887
220939
  }
220888
- /** multiply this*other. The output matrices are
220940
+ /**
220941
+ * Multiply this*other. The output matrices are
220889
220942
  * * output matrix0 = `this.matrix0 * other.matrix0`
220890
220943
  * * output matrix1 = 'other.matrix1 * this.matrix1`
220891
220944
  */
@@ -220898,19 +220951,21 @@ class Map4d {
220898
220951
  this._matrix0 = this._matrix1;
220899
220952
  this._matrix1 = temp;
220900
220953
  }
220901
- /** return a Map4d whose transform0 is
220954
+ /**
220955
+ * Return a Map4d whose transform0 is
220902
220956
  * other.transform0 * this.transform0 * other.transform1
220903
220957
  */
220904
220958
  sandwich0This1(other) {
220905
220959
  return new Map4d(other._matrix0.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix1)), other._matrix0.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix1)));
220906
220960
  }
220907
- /** return a Map4d whose transform0 is
220961
+ /**
220962
+ * Return a Map4d whose transform0 is
220908
220963
  * other.transform1 * this.transform0 * other.transform0
220909
220964
  */
220910
220965
  sandwich1This0(other) {
220911
220966
  return new Map4d(other._matrix1.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix0)), other._matrix1.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix0)));
220912
220967
  }
220913
- } // Map4d
220968
+ }
220914
220969
 
220915
220970
 
220916
220971
  /***/ }),
@@ -230826,7 +230881,6 @@ __webpack_require__.r(__webpack_exports__);
230826
230881
 
230827
230882
 
230828
230883
 
230829
- /* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/prefer-for-of */
230830
230884
  /**
230831
230885
  * A FacetSector
230832
230886
  * * initially holds coordinate data for a place where xyz and sectionDerivative are known
@@ -231969,16 +232023,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
231969
232023
  this.addBetweenLineStringsWithStoredIndices(strokeA, strokeB);
231970
232024
  }
231971
232025
  else if (stroke0 instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_12__.ParityRegion) {
231972
- for (let i = 0; i < stroke0.children.length; i++) { // eslint-disable-line @typescript-eslint/prefer-for-of
231973
- this.addBetweenRotatedStrokeSets(stroke0.children[i], transformA, vA, transformB, vB);
232026
+ for (const child of stroke0.children) {
232027
+ this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
231974
232028
  }
231975
232029
  }
231976
232030
  else if (stroke0 instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveChain) {
231977
- const chainA = stroke0.children;
231978
- for (let i = 0; i < chainA.length; i++) { // eslint-disable-line @typescript-eslint/prefer-for-of
231979
- const cpA = chainA[i];
231980
- if (cpA instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
231981
- this.addBetweenRotatedStrokeSets(cpA, transformA, vA, transformB, vB);
232031
+ for (const child of stroke0.children) {
232032
+ if (child instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
232033
+ this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
231982
232034
  }
231983
232035
  }
231984
232036
  }
@@ -232013,8 +232065,8 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
232013
232065
  let stroke0;
232014
232066
  let stroke1;
232015
232067
  const sectionMaps = [];
232016
- for (let i = 0; i < contours.length; i++) { // eslint-disable-line @typescript-eslint/prefer-for-of
232017
- sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(contours[i].curves, this._options));
232068
+ for (const contour of contours) {
232069
+ sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(contour.curves, this._options));
232018
232070
  }
232019
232071
  if (_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceStrokeCountCompatibility(sectionMaps)) {
232020
232072
  _curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceCompatibleDistanceSums(sectionMaps);
@@ -288024,7 +288076,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
288024
288076
  /***/ ((module) => {
288025
288077
 
288026
288078
  "use strict";
288027
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.32","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.32","@itwin/core-bentley":"workspace:^4.2.0-dev.32","@itwin/core-common":"workspace:^4.2.0-dev.32","@itwin/core-geometry":"workspace:^4.2.0-dev.32","@itwin/core-orbitgt":"workspace:^4.2.0-dev.32","@itwin/core-quantity":"workspace:^4.2.0-dev.32"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","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"}}');
288079
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.33","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.33","@itwin/core-bentley":"workspace:^4.2.0-dev.33","@itwin/core-common":"workspace:^4.2.0-dev.33","@itwin/core-geometry":"workspace:^4.2.0-dev.33","@itwin/core-orbitgt":"workspace:^4.2.0-dev.33","@itwin/core-quantity":"workspace:^4.2.0-dev.33"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","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"}}');
288028
288080
 
288029
288081
  /***/ })
288030
288082