@itwin/core-geometry 4.9.0-dev.17 → 4.9.0-dev.19

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.
Files changed (81) hide show
  1. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +11 -6
  2. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  3. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +12 -10
  4. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  5. package/lib/cjs/curve/CurveCurve.d.ts +11 -9
  6. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  7. package/lib/cjs/curve/CurveCurve.js +11 -9
  8. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  9. package/lib/cjs/curve/CurveFactory.d.ts +4 -3
  10. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  11. package/lib/cjs/curve/CurveFactory.js +4 -3
  12. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  13. package/lib/cjs/curve/LineString3d.d.ts +7 -5
  14. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  15. package/lib/cjs/curve/LineString3d.js +7 -5
  16. package/lib/cjs/curve/LineString3d.js.map +1 -1
  17. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  18. package/lib/cjs/curve/Loop.js +6 -6
  19. package/lib/cjs/curve/Loop.js.map +1 -1
  20. package/lib/cjs/curve/Path.d.ts.map +1 -1
  21. package/lib/cjs/curve/Path.js +5 -6
  22. package/lib/cjs/curve/Path.js.map +1 -1
  23. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  24. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
  25. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  26. package/lib/cjs/curve/RegionOps.d.ts +2 -2
  27. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  28. package/lib/cjs/curve/RegionOps.js +2 -2
  29. package/lib/cjs/curve/RegionOps.js.map +1 -1
  30. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
  31. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  32. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
  33. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  34. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  35. package/lib/cjs/geometry3d/GeometryHandler.js +1 -7
  36. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  37. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
  38. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  39. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  40. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  41. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +11 -6
  42. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  43. package/lib/esm/curve/CurveChainWithDistanceIndex.js +12 -10
  44. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  45. package/lib/esm/curve/CurveCurve.d.ts +11 -9
  46. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  47. package/lib/esm/curve/CurveCurve.js +11 -9
  48. package/lib/esm/curve/CurveCurve.js.map +1 -1
  49. package/lib/esm/curve/CurveFactory.d.ts +4 -3
  50. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  51. package/lib/esm/curve/CurveFactory.js +4 -3
  52. package/lib/esm/curve/CurveFactory.js.map +1 -1
  53. package/lib/esm/curve/LineString3d.d.ts +7 -5
  54. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  55. package/lib/esm/curve/LineString3d.js +7 -5
  56. package/lib/esm/curve/LineString3d.js.map +1 -1
  57. package/lib/esm/curve/Loop.d.ts.map +1 -1
  58. package/lib/esm/curve/Loop.js +6 -6
  59. package/lib/esm/curve/Loop.js.map +1 -1
  60. package/lib/esm/curve/Path.d.ts.map +1 -1
  61. package/lib/esm/curve/Path.js +5 -6
  62. package/lib/esm/curve/Path.js.map +1 -1
  63. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  64. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
  65. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  66. package/lib/esm/curve/RegionOps.d.ts +2 -2
  67. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  68. package/lib/esm/curve/RegionOps.js +2 -2
  69. package/lib/esm/curve/RegionOps.js.map +1 -1
  70. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
  71. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  72. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
  73. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  74. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  75. package/lib/esm/geometry3d/GeometryHandler.js +1 -7
  76. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  77. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
  78. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  79. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  80. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  81. package/package.json +3 -3
@@ -7,6 +7,7 @@ import { CurveChainWithDistanceIndex } from "../CurveChainWithDistanceIndex";
7
7
  import { CurveLocationDetailPair } from "../CurveLocationDetail";
8
8
  import { CurvePrimitive } from "../CurvePrimitive";
9
9
  import { AnyCurve } from "../CurveTypes";
10
+ import { GeometryQuery } from "../GeometryQuery";
10
11
  import { LineSegment3d } from "../LineSegment3d";
11
12
  import { LineString3d } from "../LineString3d";
12
13
  /**
@@ -16,9 +17,11 @@ import { LineString3d } from "../LineString3d";
16
17
  * @internal
17
18
  */
18
19
  export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
19
- private _extendA;
20
+ private _extendA0;
21
+ private _extendA1;
20
22
  private _geometryB;
21
- private _extendB;
23
+ private _extendB0;
24
+ private _extendB1;
22
25
  private _results;
23
26
  private _worldToLocalPerspective;
24
27
  private _worldToLocalAffine;
@@ -120,18 +123,29 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
120
123
  private mapNPCPlaneToWorld;
121
124
  private dispatchSegmentBsplineCurve;
122
125
  /** Low level dispatch of linestring with (beziers of) a bspline curve. */
123
- dispatchLineStringBSplineCurve(lsA: LineString3d, extendA: boolean, curveB: BSplineCurve3d, extendB: boolean, reversed: boolean): any;
126
+ dispatchLineStringBSplineCurve(lsA: LineString3d, extendA0: boolean, extendA1: boolean, curveB: BSplineCurve3d, extendB0: boolean, extendB1: boolean, reversed: boolean): any;
124
127
  /** Detail computation for segment intersecting linestring. */
125
- computeSegmentLineString(lsA: LineSegment3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any;
128
+ computeSegmentLineString(lsA: LineSegment3d, extendA0: boolean, extendA1: boolean, lsB: LineString3d, extendB0: boolean, extendB1: boolean, reversed: boolean): any;
126
129
  /** Detail computation for arc intersecting linestring. */
127
- computeArcLineString(arcA: Arc3d, extendA: boolean, lsB: LineString3d, extendB: boolean, reversed: boolean): any;
130
+ computeArcLineString(arcA: Arc3d, extendA0: boolean, extendA1: boolean, lsB: LineString3d, extendB0: boolean, extendB1: boolean, reversed: boolean): any;
128
131
  /** Detail computation for linestring intersecting linestring. */
129
132
  private computeLineStringLineString;
130
133
  private static setTransformedWorkPoints;
131
- /** Low level dispatch of curve collection. */
134
+ /**
135
+ * Low level dispatch of curve collection.
136
+ * We take care of extend variables of geometry's children here if geometry is Path or Loop.
137
+ */
132
138
  private dispatchCurveCollection;
133
- /** Low level dispatch of CurveChainWithDistanceIndex. */
139
+ /**
140
+ * Low level dispatch of CurveChainWithDistanceIndex.
141
+ * We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
142
+ */
134
143
  private dispatchCurveChainWithDistanceIndex;
144
+ /**
145
+ * Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
146
+ * We take care of extend variables of geometry's children here if geometry is Path or Loop.
147
+ */
148
+ handleChildren(g: GeometryQuery): any;
135
149
  /** Double dispatch handler for strongly typed segment. */
136
150
  handleLineSegment3d(segmentA: LineSegment3d): any;
137
151
  /** Double dispatch handler for strongly typed linestring. */
@@ -142,7 +156,7 @@ export declare class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandle
142
156
  handleBSplineCurve3d(curve: BSplineCurve3d): any;
143
157
  /** Double dispatch handler for strongly typed CurveChainWithDistanceIndex. */
144
158
  handleCurveChainWithDistanceIndex(chain: CurveChainWithDistanceIndex): any;
145
- /** Double dispatch handler for strongly typed homogeneous bspline curve .. */
159
+ /** Double dispatch handler for strongly typed homogeneous bspline curve. */
146
160
  handleBSplineCurve3dH(_curve: BSplineCurve3dH): any;
147
161
  }
148
162
  //# sourceMappingURL=CurveCurveIntersectXY.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurveCurveIntersectXY.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CurveCurveIntersectXY.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAQlF,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC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AG,GAAG;IAuB7C,gEAAgE;IAChD,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG;IAsBhE,8EAA8E;IAC9D,iCAAiC,CAAC,KAAK,EAAE,2BAA2B,GAAG,GAAG;IAK1F,4EAA4E;IAC5D,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,GAAG;CAgBpE"}
@@ -27,6 +27,8 @@ const CurveCollection_1 = require("../CurveCollection");
27
27
  const CurveLocationDetail_1 = require("../CurveLocationDetail");
28
28
  const LineSegment3d_1 = require("../LineSegment3d");
29
29
  const LineString3d_1 = require("../LineString3d");
30
+ const Loop_1 = require("../Loop");
31
+ const Path_1 = require("../Path");
30
32
  // cspell:word XYRR
31
33
  /**
32
34
  * Handler class for XY intersections between _geometryB and another geometry.
@@ -45,9 +47,11 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
45
47
  */
46
48
  constructor(worldToLocal, extendA, geometryB, extendB, tolerance = Geometry_1.Geometry.smallMetricDistance) {
47
49
  super();
48
- this._extendA = extendA;
50
+ this._extendA0 = extendA;
51
+ this._extendA1 = extendA;
49
52
  this._geometryB = geometryB;
50
- this._extendB = extendB;
53
+ this._extendB0 = extendB;
54
+ this._extendB1 = extendB;
51
55
  this._worldToLocalPerspective = undefined;
52
56
  this._worldToLocalAffine = undefined;
53
57
  if (worldToLocal !== undefined && !worldToLocal.isIdentity()) {
@@ -249,7 +253,11 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
249
253
  const numRoots = Polynomials_1.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
250
254
  for (let i = 0; i < numRoots; i++) {
251
255
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
252
- const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
256
+ let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
257
+ if (extendB0 && arcFraction > 1)
258
+ arcFraction -= 2;
259
+ else if (extendB1 && arcFraction < 0)
260
+ arcFraction += 2;
253
261
  const lineFraction = Polynomials_1.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
254
262
  if (lineFraction !== undefined &&
255
263
  this.acceptFraction(extendA0, lineFraction, extendA1) &&
@@ -277,7 +285,11 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
277
285
  const arcFractionTol = 1.0e-7;
278
286
  for (let i = 0; i < numRoots; i++) {
279
287
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
280
- const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
288
+ let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
289
+ if (extendB0 && arcFraction > 1)
290
+ arcFraction -= 2;
291
+ else if (extendB1 && arcFraction < 0)
292
+ arcFraction += 2;
281
293
  const lineFraction = Polynomials_1.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
282
294
  if (lineFraction !== undefined &&
283
295
  this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
@@ -293,7 +305,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
293
305
  * * Arcs are ordered so that matrixA is better conditioned.
294
306
  */
295
307
  dispatchArcArcThisOrder(cpA, // arc closer to being circular
296
- matrixA, extendA, cpB, matrixB, extendB, reversed) {
308
+ matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed) {
297
309
  // inverseA transforms arcA to its local coordinates, where it is the unit xy-circle.
298
310
  const inverseA = matrixA.inverse();
299
311
  if (inverseA) {
@@ -308,11 +320,18 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
308
320
  ellipseRadians, circleRadians);
309
321
  // the intersections are transform-invariant, so the solution angles apply directly to the input arcs
310
322
  for (let i = 0; i < ellipseRadians.length; i++) {
311
- const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
312
- const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
313
- if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
323
+ let fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
324
+ let fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
325
+ if (extendA0 && fractionA > 1)
326
+ fractionA -= 2;
327
+ else if (extendA1 && fractionA < 0)
328
+ fractionA += 2;
329
+ if (extendB0 && fractionB > 1)
330
+ fractionB -= 2;
331
+ else if (extendB1 && fractionB < 0)
332
+ fractionB += 2;
333
+ if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
314
334
  this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
315
- }
316
335
  }
317
336
  }
318
337
  }
@@ -324,7 +343,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
324
343
  * 4- Find the intersection of arc and unit circle.
325
344
  * 5- Convert intersection angles to fractions and record intersections.
326
345
  */
327
- dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
346
+ dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
328
347
  let matrixA;
329
348
  let matrixB;
330
349
  if (this._worldToLocalPerspective) {
@@ -343,9 +362,9 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
343
362
  const conditionB = matrixB.conditionNumber();
344
363
  // pick the arc that is closest to circular.
345
364
  if (conditionA > conditionB)
346
- this.dispatchArcArcThisOrder(cpA, matrixA, extendA, cpB, matrixB, extendB, reversed);
365
+ this.dispatchArcArcThisOrder(cpA, matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed);
347
366
  else
348
- this.dispatchArcArcThisOrder(cpB, matrixB, extendB, cpA, matrixA, extendA, !reversed);
367
+ this.dispatchArcArcThisOrder(cpB, matrixB, extendB0, extendB1, cpA, matrixA, extendA0, extendA1, !reversed);
349
368
  // overlap handling. perspective is not handled.
350
369
  if (!this._coincidentGeometryContext) {
351
370
  // do nothing
@@ -362,7 +381,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
362
381
  this.recordPairs(cpA, cpB, pairs, reversed);
363
382
  }
364
383
  }
365
- dispatchArcBsplineCurve3d(cpA, extendA, cpB, extendB, reversed) {
384
+ dispatchArcBsplineCurve3d(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
366
385
  // Arc: X = C + cU + sV
367
386
  // implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
368
387
  let matrixA;
@@ -421,11 +440,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
421
440
  const bcurvePoint4d = bezier.fractionToPoint4d(root);
422
441
  const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
423
442
  const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
424
- const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
425
- if (this.acceptFraction(extendA, arcFraction, extendA) &&
426
- this.acceptFraction(extendB, fractionB, extendB)) {
443
+ let arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
444
+ if (extendA0 && arcFraction > 1)
445
+ arcFraction -= 2;
446
+ else if (extendA1 && arcFraction < 0)
447
+ arcFraction += 2;
448
+ if (this.acceptFraction(extendA0, arcFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
427
449
  this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
428
- }
429
450
  }
430
451
  }
431
452
  }
@@ -587,7 +608,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
587
608
  // Caller accesses data from segment and bsplineCurve.
588
609
  // Selects the best conditioned arc (in xy parts) as "circle after inversion".
589
610
  // Solves the arc-arc equations.
590
- dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB, reversed) {
611
+ dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB0, extendB1, reversed) {
591
612
  const pointA0H = this.projectPoint(pointA0);
592
613
  const pointA1H = this.projectPoint(pointA1);
593
614
  const planeCoffs = Point4d_1.Point4d.createPlanePointPointZ(pointA0H, pointA1H);
@@ -604,14 +625,14 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
604
625
  const curvePointH = this.projectPoint(curvePoint);
605
626
  const lineFraction = Polynomials_1.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
606
627
  if (lineFraction !== undefined) {
607
- if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB, fractionB, extendB)) {
628
+ if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
608
629
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed);
609
630
  }
610
631
  }
611
632
  }
612
633
  }
613
634
  /** Low level dispatch of linestring with (beziers of) a bspline curve. */
614
- dispatchLineStringBSplineCurve(lsA, extendA, curveB, extendB, reversed) {
635
+ dispatchLineStringBSplineCurve(lsA, extendA0, extendA1, curveB, extendB0, extendB1, reversed) {
615
636
  const numA = lsA.numPoints();
616
637
  if (numA > 1) {
617
638
  const dfA = 1.0 / (numA - 1);
@@ -624,13 +645,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
624
645
  for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
625
646
  lsA.pointAt(iA, pointA1);
626
647
  fA1 = iA * dfA;
627
- this.dispatchSegmentBsplineCurve(lsA, iA === 1 && extendA, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA, curveB, extendB, reversed);
648
+ this.dispatchSegmentBsplineCurve(lsA, iA === 1 && extendA0, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA1, curveB, extendB0, extendB1, reversed);
628
649
  }
629
650
  }
630
651
  return undefined;
631
652
  }
632
653
  /** Detail computation for segment intersecting linestring. */
633
- computeSegmentLineString(lsA, extendA, lsB, extendB, reversed) {
654
+ computeSegmentLineString(lsA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
634
655
  const pointA0 = lsA.point0Ref;
635
656
  const pointA1 = lsA.point1Ref;
636
657
  const pointB0 = CurveCurveIntersectXY._workPointBB0;
@@ -645,13 +666,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
645
666
  for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
646
667
  lsB.pointAt(ib, pointB1);
647
668
  fB1 = ib * dfB;
648
- this.dispatchSegmentSegment(lsA, extendA, pointA0, 0.0, pointA1, 1.0, extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
669
+ this.dispatchSegmentSegment(lsA, extendA0, pointA0, 0.0, pointA1, 1.0, extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
649
670
  }
650
671
  }
651
672
  return undefined;
652
673
  }
653
674
  /** Detail computation for arc intersecting linestring. */
654
- computeArcLineString(arcA, extendA, lsB, extendB, reversed) {
675
+ computeArcLineString(arcA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
655
676
  const pointB0 = CurveCurveIntersectXY._workPointBB0;
656
677
  const pointB1 = CurveCurveIntersectXY._workPointBB1;
657
678
  const numB = lsB.numPoints();
@@ -664,7 +685,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
664
685
  for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
665
686
  lsB.pointAt(ib, pointB1);
666
687
  fB1 = ib * dfB;
667
- this.dispatchSegmentArc(lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, arcA, extendA, extendA, !reversed);
688
+ this.dispatchSegmentArc(lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, arcA, extendA0, extendA1, !reversed);
668
689
  }
669
690
  }
670
691
  return undefined;
@@ -685,8 +706,10 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
685
706
  let fB0;
686
707
  let fA1;
687
708
  let fB1;
688
- const extendA = this._extendA;
689
- const extendB = this._extendB;
709
+ const extendA0 = this._extendA0;
710
+ const extendA1 = this._extendA1;
711
+ const extendB0 = this._extendB0;
712
+ const extendB1 = this._extendB1;
690
713
  lsA.pointAt(0, pointA0);
691
714
  for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
692
715
  fA1 = ia * dfA;
@@ -696,7 +719,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
696
719
  for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
697
720
  lsB.pointAt(ib, pointB1);
698
721
  fB1 = ib * dfB;
699
- 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);
722
+ this.dispatchSegmentSegment(lsA, ia === 1 && extendA0, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
700
723
  }
701
724
  }
702
725
  }
@@ -707,18 +730,43 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
707
730
  transform.multiplyPoint3d(pointB0, this._workPointB0);
708
731
  transform.multiplyPoint3d(pointB1, this._workPointB1);
709
732
  }
710
- /** Low level dispatch of curve collection. */
733
+ /**
734
+ * Low level dispatch of curve collection.
735
+ * We take care of extend variables of geometry's children here if geometry is Path or Loop.
736
+ */
711
737
  dispatchCurveCollection(geomA, geomAHandler) {
712
738
  const geomB = this._geometryB; // save
713
739
  if (!geomB || !geomB.children || !(geomB instanceof CurveCollection_1.CurveCollection))
714
740
  return;
715
- for (const child of geomB.children) {
716
- this.resetGeometry(child);
741
+ const children = geomB.children;
742
+ const extendB0 = this._extendB0; // save
743
+ const extendB1 = this._extendB1; // save
744
+ for (let i = 0; i < children.length; i++) {
745
+ this.resetGeometry(children[i]);
746
+ if (geomB instanceof Path_1.Path) {
747
+ if (i === 0) // first child only extends from start
748
+ this._extendB1 = false;
749
+ else if (i === children.length - 1) // last child only extends from end
750
+ this._extendB0 = false;
751
+ else { // middle children do not extend
752
+ this._extendB0 = false;
753
+ this._extendB1 = false;
754
+ }
755
+ }
756
+ else if (geomB instanceof Loop_1.Loop) { // Loop never extends
757
+ this._extendB0 = false;
758
+ this._extendB1 = false;
759
+ }
717
760
  geomAHandler(geomA);
761
+ this._extendB0 = extendB0; // restore
762
+ this._extendB1 = extendB1; // restore
718
763
  }
719
- this._geometryB = geomB; // restore
764
+ this.resetGeometry(geomB); // restore
720
765
  }
721
- /** Low level dispatch of CurveChainWithDistanceIndex. */
766
+ /**
767
+ * Low level dispatch of CurveChainWithDistanceIndex.
768
+ * We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
769
+ */
722
770
  dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
723
771
  if (!this._geometryB || !(this._geometryB instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex))
724
772
  return;
@@ -728,27 +776,54 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
728
776
  }
729
777
  const index0 = this._results.length;
730
778
  const geomB = this._geometryB; // save
731
- for (const child of geomB.path.children) {
732
- this.resetGeometry(child);
733
- geomAHandler(geomA);
734
- }
779
+ this.resetGeometry(geomB.path);
780
+ this.dispatchCurveCollection(geomA, geomAHandler);
735
781
  this.resetGeometry(geomB); // restore
736
782
  this._results = CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
737
783
  }
784
+ /**
785
+ * Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
786
+ * We take care of extend variables of geometry's children here if geometry is Path or Loop.
787
+ */
788
+ handleChildren(g) {
789
+ const children = g.children;
790
+ const extendA0 = this._extendA0; // save
791
+ const extendA1 = this._extendA1; // save
792
+ if (children)
793
+ for (let i = 0; i < children.length; i++) {
794
+ if (g instanceof Path_1.Path) {
795
+ if (i === 0) // first child only extends from start
796
+ this._extendA1 = false;
797
+ else if (i === children.length - 1) // last child only extends from end
798
+ this._extendA0 = false;
799
+ else { // middle children do not extend
800
+ this._extendA0 = false;
801
+ this._extendA1 = false;
802
+ }
803
+ }
804
+ else if (g instanceof Loop_1.Loop) { // Loop never extends
805
+ this._extendA0 = false;
806
+ this._extendA1 = false;
807
+ }
808
+ children[i].dispatchToGeometryHandler(this);
809
+ this._extendA0 = extendA0; // restore
810
+ this._extendA1 = extendA1; // restore
811
+ }
812
+ }
738
813
  /** Double dispatch handler for strongly typed segment. */
739
814
  handleLineSegment3d(segmentA) {
740
815
  if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
741
816
  const segmentB = this._geometryB;
742
- this.dispatchSegmentSegment(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, segmentB, this._extendB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB, false);
817
+ this.dispatchSegmentSegment(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, segmentB, this._extendB0, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB1, false);
743
818
  }
744
819
  else if (this._geometryB instanceof LineString3d_1.LineString3d) {
745
- this.computeSegmentLineString(segmentA, this._extendA, this._geometryB, this._extendB, false);
820
+ this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
746
821
  }
747
822
  else if (this._geometryB instanceof Arc3d_1.Arc3d) {
748
- this.dispatchSegmentArc(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, this._extendB, false);
823
+ this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
749
824
  }
750
825
  else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
751
- this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
826
+ this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
752
827
  }
753
828
  else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
754
829
  this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
@@ -765,13 +840,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
765
840
  this.computeLineStringLineString(lsA, lsB, false);
766
841
  }
767
842
  else if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
768
- this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
843
+ this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
769
844
  }
770
845
  else if (this._geometryB instanceof Arc3d_1.Arc3d) {
771
- this.computeArcLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
846
+ this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
772
847
  }
773
848
  else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
774
- this.dispatchLineStringBSplineCurve(lsA, this._extendA, this._geometryB, this._extendB, false);
849
+ this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
775
850
  }
776
851
  else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
777
852
  this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
@@ -784,16 +859,16 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
784
859
  /** Double dispatch handler for strongly typed arc. */
785
860
  handleArc3d(arc0) {
786
861
  if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
787
- this.dispatchSegmentArc(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, arc0, this._extendA, this._extendA, true);
862
+ this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
788
863
  }
789
864
  else if (this._geometryB instanceof LineString3d_1.LineString3d) {
790
- this.computeArcLineString(arc0, this._extendA, this._geometryB, this._extendB, false);
865
+ this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
791
866
  }
792
867
  else if (this._geometryB instanceof Arc3d_1.Arc3d) {
793
- this.dispatchArcArc(arc0, this._extendA, this._geometryB, this._extendB, false);
868
+ this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
794
869
  }
795
870
  else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
796
- this.dispatchArcBsplineCurve3d(arc0, this._extendA, this._geometryB, this._extendB, false);
871
+ this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
797
872
  }
798
873
  else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
799
874
  this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
@@ -806,13 +881,13 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
806
881
  /** Double dispatch handler for strongly typed bspline curve. */
807
882
  handleBSplineCurve3d(curve) {
808
883
  if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
809
- this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
884
+ this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
810
885
  }
811
886
  else if (this._geometryB instanceof LineString3d_1.LineString3d) {
812
- this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);
887
+ this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
813
888
  }
814
889
  else if (this._geometryB instanceof Arc3d_1.Arc3d) {
815
- this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);
890
+ this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
816
891
  }
817
892
  else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3dBase) {
818
893
  this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
@@ -831,7 +906,7 @@ class CurveCurveIntersectXY extends GeometryHandler_1.RecurseToCurvesGeometryHan
831
906
  // if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
832
907
  this._results = CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
833
908
  }
834
- /** Double dispatch handler for strongly typed homogeneous bspline curve .. */
909
+ /** Double dispatch handler for strongly typed homogeneous bspline curve. */
835
910
  handleBSplineCurve3dH(_curve) {
836
911
  /*
837
912
  // NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH .