@itwin/core-geometry 5.9.0-dev.9 → 5.9.1

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 (38) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  3. package/lib/cjs/curve/Loop.js +3 -1
  4. package/lib/cjs/curve/Loop.js.map +1 -1
  5. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  6. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +21 -27
  7. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  8. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +97 -152
  9. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  10. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +15 -14
  11. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  12. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +144 -163
  13. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  14. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/PointHelpers.js +6 -7
  16. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  17. package/lib/cjs/numerics/Newton.d.ts +10 -2
  18. package/lib/cjs/numerics/Newton.d.ts.map +1 -1
  19. package/lib/cjs/numerics/Newton.js.map +1 -1
  20. package/lib/esm/curve/Loop.d.ts.map +1 -1
  21. package/lib/esm/curve/Loop.js +3 -1
  22. package/lib/esm/curve/Loop.js.map +1 -1
  23. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  24. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +21 -27
  25. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  26. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +98 -153
  27. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  28. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +15 -14
  29. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  30. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +144 -163
  31. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  32. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  33. package/lib/esm/geometry3d/PointHelpers.js +6 -7
  34. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  35. package/lib/esm/numerics/Newton.d.ts +10 -2
  36. package/lib/esm/numerics/Newton.d.ts.map +1 -1
  37. package/lib/esm/numerics/Newton.js.map +1 -1
  38. package/package.json +3 -3
@@ -152,7 +152,8 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
152
152
  * @param fractionB1 end of the subcurve of cpB
153
153
  * @param reversed whether to reverse the details in the recorded intersection pair
154
154
  * @param intervalDetails optional data for a coincident segment intersection
155
- * @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults to [[Geometry.smallAngleRadians]].
155
+ * @param fractionTol relative tolerance for comparing fractions to avoid duplicating the last intersection. Defaults
156
+ * to [[Geometry.smallAngleRadians]].
156
157
  */
157
158
  recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails, fractionTol) {
158
159
  let globalFractionA, globalFractionB;
@@ -579,9 +580,9 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
579
580
  bezierA.fractionToPoint4d(f1, this._xyzwA1);
580
581
  Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
581
582
  bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
582
- let errors = 0;
583
583
  const roots = univariateBezierB.roots(0.0, true);
584
584
  if (roots) {
585
+ const strictTolerance = this._coincidentGeometryContext.tolerance * 0.0001;
585
586
  for (const r of roots) {
586
587
  let bezierBFraction = r;
587
588
  bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
@@ -593,28 +594,19 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
593
594
  const xyMatchingFunction = new CurveCurveIntersectionXYRRToRRD(bezierA, bezierB);
594
595
  const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
595
596
  newtonSearcher.setUV(bezierAFraction, bezierBFraction);
596
- if (newtonSearcher.runIterations()) {
597
- bezierAFraction = newtonSearcher.getU();
598
- bezierBFraction = newtonSearcher.getV();
599
- }
597
+ let converged = newtonSearcher.runIterations();
598
+ bezierAFraction = newtonSearcher.getU();
599
+ bezierBFraction = newtonSearcher.getV();
600
600
  const bcurveAFraction = bezierA.fractionToParentFraction(bezierAFraction);
601
601
  const bcurveBFraction = bezierB.fractionToParentFraction(bezierBFraction);
602
- if (false) { // verify results
603
- const xyzA0 = bezierA.fractionToPoint(bezierAFraction);
604
- const xyzA1 = bcurveA.fractionToPoint(bcurveAFraction);
605
- const xyzB0 = bezierB.fractionToPoint(bezierBFraction);
606
- const xyzB1 = bcurveB.fractionToPoint(bcurveBFraction);
607
- if (!xyzA0.isAlmostEqualXY(xyzA1))
608
- errors++;
609
- if (!xyzB0.isAlmostEqualXY(xyzB1))
610
- errors++;
611
- if (errors > 0 && !xyzA0.isAlmostEqual(xyzB0))
612
- errors++;
613
- if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
614
- errors++;
615
- }
616
602
  if (this.acceptFraction(false, bcurveAFraction, false) && this.acceptFraction(false, bcurveBFraction, false)) {
617
- this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed);
603
+ const pointA = bezierA.fractionToPoint(bezierAFraction, CurveCurveIntersectXY._workPointA0);
604
+ const pointB = bezierB.fractionToPoint(bezierBFraction, CurveCurveIntersectXY._workPointB0);
605
+ if (!converged) { // Newton may have found close points even if it didn't converge parametrically
606
+ converged = pointA.isAlmostEqualXY(pointB, strictTolerance); // we can afford to be choosy
607
+ }
608
+ if (converged)
609
+ this.recordPointWithLocalFractions(bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed);
618
610
  }
619
611
  }
620
612
  }
@@ -843,137 +835,6 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
843
835
  this.resetGeometryB(geomB); // restore
844
836
  this._results = CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
845
837
  }
846
- /**
847
- * Invoke dispatch on each child of `g` as "geometryA".
848
- * * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
849
- */
850
- handleChildren(g) {
851
- const children = g.children;
852
- if (!children)
853
- return;
854
- const saveExtendA0 = this._extendA0;
855
- const saveExtendA1 = this._extendA1;
856
- for (let i = 0; i < children.length; i++) {
857
- let extendA0 = saveExtendA0;
858
- let extendA1 = saveExtendA1;
859
- if (g instanceof Path && children.length > 1) {
860
- if (i === 0)
861
- extendA1 = false; // first child can only extend from start
862
- else if (i === children.length - 1)
863
- extendA0 = false; // last child can only extend from end
864
- else
865
- extendA0 = extendA1 = false; // middle children cannot extend
866
- }
867
- else if (g instanceof Loop) {
868
- extendA0 = extendA1 = false; // Loops cannot extend
869
- }
870
- this.resetGeometryA(extendA0, extendA1);
871
- children[i].dispatchToGeometryHandler(this);
872
- }
873
- this.resetGeometryA(saveExtendA0, saveExtendA1);
874
- }
875
- /** Double dispatch handler for strongly typed segment. */
876
- handleLineSegment3d(segmentA) {
877
- if (this._geometryB instanceof LineSegment3d) {
878
- const segmentB = this._geometryB;
879
- 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);
880
- }
881
- else if (this._geometryB instanceof LineString3d) {
882
- this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
883
- }
884
- else if (this._geometryB instanceof Arc3d) {
885
- this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
886
- }
887
- else if (this._geometryB instanceof BSplineCurve3d) {
888
- this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
889
- }
890
- else if (this._geometryB instanceof TransitionSpiral3d) {
891
- this.dispatchCurveSpiral(segmentA, this._extendA0, this._extendA1, this._geometryB, false);
892
- }
893
- else if (this._geometryB instanceof CurveCollection) {
894
- this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
895
- }
896
- else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
897
- this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
898
- }
899
- return undefined;
900
- }
901
- /** Double dispatch handler for strongly typed linestring. */
902
- handleLineString3d(lsA) {
903
- if (this._geometryB instanceof LineString3d) {
904
- const lsB = this._geometryB;
905
- this.computeLineStringLineString(lsA, this._extendA0, this._extendA1, lsB, this._extendB0, this._extendB1, false);
906
- }
907
- else if (this._geometryB instanceof LineSegment3d) {
908
- this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
909
- }
910
- else if (this._geometryB instanceof Arc3d) {
911
- this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
912
- }
913
- else if (this._geometryB instanceof BSplineCurve3d) {
914
- this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
915
- }
916
- else if (this._geometryB instanceof TransitionSpiral3d) {
917
- this.dispatchCurveSpiral(lsA, this._extendA0, this._extendA1, this._geometryB, false);
918
- }
919
- else if (this._geometryB instanceof CurveCollection) {
920
- this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
921
- }
922
- else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
923
- this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
924
- }
925
- return undefined;
926
- }
927
- /** Double dispatch handler for strongly typed arc. */
928
- handleArc3d(arcA) {
929
- if (this._geometryB instanceof LineSegment3d) {
930
- this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arcA, this._extendA0, this._extendA1, true);
931
- }
932
- else if (this._geometryB instanceof LineString3d) {
933
- this.computeArcLineString(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
934
- }
935
- else if (this._geometryB instanceof Arc3d) {
936
- this.dispatchArcArc(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
937
- }
938
- else if (this._geometryB instanceof BSplineCurve3d) {
939
- this.dispatchArcBsplineCurve3d(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
940
- }
941
- else if (this._geometryB instanceof TransitionSpiral3d) {
942
- this.dispatchCurveSpiral(arcA, this._extendA0, this._extendA1, this._geometryB, false);
943
- }
944
- else if (this._geometryB instanceof CurveCollection) {
945
- this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
946
- }
947
- else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
948
- this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
949
- }
950
- return undefined;
951
- }
952
- /** Double dispatch handler for strongly typed bspline curve. */
953
- handleBSplineCurve3d(curveA) {
954
- if (this._geometryB instanceof LineSegment3d) {
955
- this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
956
- }
957
- else if (this._geometryB instanceof LineString3d) {
958
- this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
959
- }
960
- else if (this._geometryB instanceof Arc3d) {
961
- this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
962
- }
963
- else if (this._geometryB instanceof BSplineCurve3dBase) {
964
- this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
965
- }
966
- else if (this._geometryB instanceof TransitionSpiral3d) {
967
- this.dispatchCurveSpiral(curveA, this._extendA0, this._extendA1, this._geometryB, false);
968
- }
969
- else if (this._geometryB instanceof CurveCollection) {
970
- this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
971
- }
972
- else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
973
- this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
974
- }
975
- return undefined;
976
- }
977
838
  /**
978
839
  * Process tail of `this._results` for xy-intersections between the curve and spiral.
979
840
  * * Refine each result via Newton iteration. If it doesn't converge, remove it.
@@ -1112,6 +973,137 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
1112
973
  this.appendDiscreteCloseApproachResults(cpA, cpB, maxError, reversed); // seeds for finding tangent intersections
1113
974
  this.refineSpiralResultsByNewton(curveA, spiralB, index0, reversed);
1114
975
  }
976
+ /**
977
+ * Invoke dispatch on each child of `g` as "geometryA".
978
+ * * If `g` is a `Path` or `Loop`, adjust extension flags for geometryA accordingly.
979
+ */
980
+ handleChildren(g) {
981
+ const children = g.children;
982
+ if (!children)
983
+ return;
984
+ const saveExtendA0 = this._extendA0;
985
+ const saveExtendA1 = this._extendA1;
986
+ for (let i = 0; i < children.length; i++) {
987
+ let extendA0 = saveExtendA0;
988
+ let extendA1 = saveExtendA1;
989
+ if (g instanceof Path && children.length > 1) {
990
+ if (i === 0)
991
+ extendA1 = false; // first child can only extend from start
992
+ else if (i === children.length - 1)
993
+ extendA0 = false; // last child can only extend from end
994
+ else
995
+ extendA0 = extendA1 = false; // middle children cannot extend
996
+ }
997
+ else if (g instanceof Loop) {
998
+ extendA0 = extendA1 = false; // Loops cannot extend
999
+ }
1000
+ this.resetGeometryA(extendA0, extendA1);
1001
+ children[i].dispatchToGeometryHandler(this);
1002
+ }
1003
+ this.resetGeometryA(saveExtendA0, saveExtendA1);
1004
+ }
1005
+ /** Double dispatch handler for strongly typed segment. */
1006
+ handleLineSegment3d(segmentA) {
1007
+ if (this._geometryB instanceof LineSegment3d) {
1008
+ const segmentB = this._geometryB;
1009
+ 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);
1010
+ }
1011
+ else if (this._geometryB instanceof LineString3d) {
1012
+ this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1013
+ }
1014
+ else if (this._geometryB instanceof Arc3d) {
1015
+ this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1016
+ }
1017
+ else if (this._geometryB instanceof BSplineCurve3d) {
1018
+ this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1019
+ }
1020
+ else if (this._geometryB instanceof TransitionSpiral3d) {
1021
+ this.dispatchCurveSpiral(segmentA, this._extendA0, this._extendA1, this._geometryB, false);
1022
+ }
1023
+ else if (this._geometryB instanceof CurveCollection) {
1024
+ this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
1025
+ }
1026
+ else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
1027
+ this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
1028
+ }
1029
+ return undefined;
1030
+ }
1031
+ /** Double dispatch handler for strongly typed linestring. */
1032
+ handleLineString3d(lsA) {
1033
+ if (this._geometryB instanceof LineString3d) {
1034
+ const lsB = this._geometryB;
1035
+ this.computeLineStringLineString(lsA, this._extendA0, this._extendA1, lsB, this._extendB0, this._extendB1, false);
1036
+ }
1037
+ else if (this._geometryB instanceof LineSegment3d) {
1038
+ this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
1039
+ }
1040
+ else if (this._geometryB instanceof Arc3d) {
1041
+ this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
1042
+ }
1043
+ else if (this._geometryB instanceof BSplineCurve3d) {
1044
+ this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1045
+ }
1046
+ else if (this._geometryB instanceof TransitionSpiral3d) {
1047
+ this.dispatchCurveSpiral(lsA, this._extendA0, this._extendA1, this._geometryB, false);
1048
+ }
1049
+ else if (this._geometryB instanceof CurveCollection) {
1050
+ this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
1051
+ }
1052
+ else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
1053
+ this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
1054
+ }
1055
+ return undefined;
1056
+ }
1057
+ /** Double dispatch handler for strongly typed arc. */
1058
+ handleArc3d(arcA) {
1059
+ if (this._geometryB instanceof LineSegment3d) {
1060
+ this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arcA, this._extendA0, this._extendA1, true);
1061
+ }
1062
+ else if (this._geometryB instanceof LineString3d) {
1063
+ this.computeArcLineString(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1064
+ }
1065
+ else if (this._geometryB instanceof Arc3d) {
1066
+ this.dispatchArcArc(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1067
+ }
1068
+ else if (this._geometryB instanceof BSplineCurve3d) {
1069
+ this.dispatchArcBsplineCurve3d(arcA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
1070
+ }
1071
+ else if (this._geometryB instanceof TransitionSpiral3d) {
1072
+ this.dispatchCurveSpiral(arcA, this._extendA0, this._extendA1, this._geometryB, false);
1073
+ }
1074
+ else if (this._geometryB instanceof CurveCollection) {
1075
+ this.dispatchCurveCollection(arcA, this.handleArc3d.bind(this));
1076
+ }
1077
+ else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
1078
+ this.dispatchCurveChainWithDistanceIndex(arcA, this.handleArc3d.bind(this));
1079
+ }
1080
+ return undefined;
1081
+ }
1082
+ /** Double dispatch handler for strongly typed bspline curve. */
1083
+ handleBSplineCurve3d(curveA) {
1084
+ if (this._geometryB instanceof LineSegment3d) {
1085
+ this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
1086
+ }
1087
+ else if (this._geometryB instanceof LineString3d) {
1088
+ this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
1089
+ }
1090
+ else if (this._geometryB instanceof Arc3d) {
1091
+ this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curveA, this._extendA0, this._extendA1, true);
1092
+ }
1093
+ else if (this._geometryB instanceof BSplineCurve3dBase) {
1094
+ this.dispatchBSplineCurve3dBSplineCurve3d(curveA, this._geometryB, false);
1095
+ }
1096
+ else if (this._geometryB instanceof TransitionSpiral3d) {
1097
+ this.dispatchCurveSpiral(curveA, this._extendA0, this._extendA1, this._geometryB, false);
1098
+ }
1099
+ else if (this._geometryB instanceof CurveCollection) {
1100
+ this.dispatchCurveCollection(curveA, this.handleBSplineCurve3d.bind(this));
1101
+ }
1102
+ else if (this._geometryB instanceof CurveChainWithDistanceIndex) {
1103
+ this.dispatchCurveChainWithDistanceIndex(curveA, this.handleBSplineCurve3d.bind(this));
1104
+ }
1105
+ return undefined;
1106
+ }
1115
1107
  /** Double dispatch handler for strongly typed spiral curve. */
1116
1108
  handleTransitionSpiral(spiral) {
1117
1109
  if (this._geometryB instanceof CurveChainWithDistanceIndex) {
@@ -1133,19 +1125,8 @@ export class CurveCurveIntersectXY extends RecurseToCurvesGeometryHandler {
1133
1125
  }
1134
1126
  /** Double dispatch handler for strongly typed homogeneous bspline curve. */
1135
1127
  handleBSplineCurve3dH(_curve) {
1136
- /*
1137
1128
  // NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH .
1138
1129
  // "easy" if both present BezierCurve3dH span loaders
1139
- if (this._geometryB instanceof LineSegment3d) {
1140
- this.dispatchSegmentBsplineCurve(
1141
- this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,
1142
- curve, this._extendA, true);
1143
- } else if (this._geometryB instanceof LineString3d) {
1144
- this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB, curve, this._extendA, true);
1145
- } else if (this._geometryB instanceof Arc3d) {
1146
- this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB, curve, this._extendA, true);
1147
- }
1148
- */
1149
1130
  return undefined;
1150
1131
  }
1151
1132
  }