@itwin/core-geometry 4.10.0-dev.3 → 4.10.0-dev.30
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.
- package/CHANGELOG.md +31 -1
- package/lib/cjs/Geometry.d.ts +2 -2
- package/lib/cjs/Geometry.js +2 -2
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +1 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +21 -10
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +66 -38
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +11 -13
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +19 -46
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +2 -2
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -4
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +40 -65
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +131 -70
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +14 -11
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +5 -5
- package/lib/cjs/geometry3d/Angle.js +5 -5
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +101 -13
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +156 -57
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +4 -4
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +35 -31
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +55 -31
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +2 -2
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +2 -2
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +4 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +4 -2
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.d.ts +5 -5
- package/lib/cjs/geometry4d/Map4d.js +5 -5
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +4 -7
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +2 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/Newton.d.ts +3 -0
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +2 -5
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +46 -201
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +132 -445
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +164 -0
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/cjs/numerics/SmallSystem.js +321 -0
- package/lib/cjs/numerics/SmallSystem.js.map +1 -0
- package/lib/cjs/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +7 -7
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +2 -2
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js +2 -2
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +1 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +2 -2
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/esm/Geometry.d.ts +2 -2
- package/lib/esm/Geometry.js +2 -2
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +21 -10
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +66 -38
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +11 -13
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +17 -44
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +4 -3
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +35 -60
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +130 -69
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +14 -11
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +5 -5
- package/lib/esm/geometry3d/Angle.js +5 -5
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +101 -13
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +156 -57
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +35 -31
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +55 -31
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +2 -2
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +4 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +4 -2
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.d.ts +5 -5
- package/lib/esm/geometry4d/Map4d.js +5 -5
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +4 -7
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +2 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/Newton.d.ts +3 -0
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +1 -4
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +46 -201
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +132 -444
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +164 -0
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/esm/numerics/SmallSystem.js +317 -0
- package/lib/esm/numerics/SmallSystem.js.map +1 -0
- package/lib/esm/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +4 -4
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +1 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/package.json +7 -19
|
@@ -16,12 +16,15 @@ const Plane3dByOriginAndUnitNormal_1 = require("../../geometry3d/Plane3dByOrigin
|
|
|
16
16
|
const Point2dVector2d_1 = require("../../geometry3d/Point2dVector2d");
|
|
17
17
|
const Point3dVector3d_1 = require("../../geometry3d/Point3dVector3d");
|
|
18
18
|
const Polynomials_1 = require("../../numerics/Polynomials");
|
|
19
|
+
const SmallSystem_1 = require("../../numerics/SmallSystem");
|
|
19
20
|
const Arc3d_1 = require("../Arc3d");
|
|
20
21
|
const CurveChainWithDistanceIndex_1 = require("../CurveChainWithDistanceIndex");
|
|
21
22
|
const CurveCollection_1 = require("../CurveCollection");
|
|
22
23
|
const CurveLocationDetail_1 = require("../CurveLocationDetail");
|
|
23
24
|
const LineSegment3d_1 = require("../LineSegment3d");
|
|
24
25
|
const LineString3d_1 = require("../LineString3d");
|
|
26
|
+
const Loop_1 = require("../Loop");
|
|
27
|
+
const Path_1 = require("../Path");
|
|
25
28
|
// cspell:word XYRR
|
|
26
29
|
/**
|
|
27
30
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
@@ -37,9 +40,11 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
37
40
|
*/
|
|
38
41
|
constructor(extendA, geometryB, extendB) {
|
|
39
42
|
super();
|
|
40
|
-
this.
|
|
43
|
+
this._extendA0 = extendA;
|
|
44
|
+
this._extendA1 = extendA;
|
|
41
45
|
this._geometryB = geometryB;
|
|
42
|
-
this.
|
|
46
|
+
this._extendB0 = extendB;
|
|
47
|
+
this._extendB1 = extendB;
|
|
43
48
|
this._results = [];
|
|
44
49
|
}
|
|
45
50
|
/** Reset the geometry, leaving all other parts unchanged (and preserving accumulated intersections). */
|
|
@@ -56,10 +61,12 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
56
61
|
this._results = [];
|
|
57
62
|
return result;
|
|
58
63
|
}
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
/** Accept the fraction if it falls inside (possibly extended) fraction range. */
|
|
65
|
+
acceptFraction(extend0, fraction, extend1, fractionTol = 1.0e-12) {
|
|
66
|
+
// Note that default tol is tighter than Geometry.smallFraction. We aggressively toss intersections past endpoints.
|
|
67
|
+
if (!extend0 && fraction < -fractionTol)
|
|
61
68
|
return false;
|
|
62
|
-
if (!extend1 && fraction > 1.0)
|
|
69
|
+
if (!extend1 && fraction > 1.0 + fractionTol)
|
|
63
70
|
return false;
|
|
64
71
|
return true;
|
|
65
72
|
}
|
|
@@ -112,7 +119,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
112
119
|
*/
|
|
113
120
|
computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
114
121
|
const uv = CurveCurveIntersectXYZ._workVector2dA;
|
|
115
|
-
if (
|
|
122
|
+
if (SmallSystem_1.SmallSystem.lineSegment3dClosestApproachUnbounded(pointA0, pointA1, pointB0, pointB1, uv) &&
|
|
116
123
|
this.acceptFraction(extendA0, uv.x, extendA1) && this.acceptFraction(extendB0, uv.y, extendB1)) {
|
|
117
124
|
this.recordPointWithLocalFractions(uv.x, cpA, fractionA0, fractionA1, uv.y, cpB, fractionB0, fractionB1, reversed);
|
|
118
125
|
}
|
|
@@ -161,13 +168,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
161
168
|
let lineFraction;
|
|
162
169
|
let linePoint;
|
|
163
170
|
for (const c of candidates) {
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
const arcFraction = arc.sweep.fractionToSignedPeriodicFraction(c.fraction, extendB0);
|
|
172
|
+
if (this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
173
|
+
lineFraction = SmallSystem_1.SmallSystem.lineSegment3dClosestPointUnbounded(pointA0, pointA1, c.point);
|
|
166
174
|
if (lineFraction !== undefined) {
|
|
167
175
|
linePoint = pointA0.interpolate(lineFraction, pointA1, linePoint);
|
|
168
|
-
if (linePoint.isAlmostEqualMetric(c.point)
|
|
169
|
-
|
|
170
|
-
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, c.fraction, arc, 0, 1, reversed);
|
|
176
|
+
if (linePoint.isAlmostEqualMetric(c.point) && this.acceptFraction(extendA0, lineFraction, extendA1)) {
|
|
177
|
+
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
180
|
}
|
|
@@ -178,17 +185,17 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
178
185
|
// Passes "other" as {center, vector0, vector90} in local xy space of cpA
|
|
179
186
|
// Solves the arc-arc equations for that local ellipse with unit circle.
|
|
180
187
|
// Solution fractions map directly to original arcs.
|
|
181
|
-
dispatchArcArcInPlane(cpA,
|
|
188
|
+
dispatchArcArcInPlane(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
182
189
|
const otherVectors = cpA.otherArcAsLocalVectors(cpB);
|
|
183
190
|
if (otherVectors !== undefined) {
|
|
184
191
|
const ellipseRadians = [];
|
|
185
192
|
const circleRadians = [];
|
|
186
193
|
Polynomials_1.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);
|
|
187
194
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
188
|
-
const fractionA = cpA.sweep.
|
|
189
|
-
const fractionB = cpB.sweep.
|
|
195
|
+
const fractionA = cpA.sweep.radiansToSignedFraction(circleRadians[i], extendA0);
|
|
196
|
+
const fractionB = cpB.sweep.radiansToSignedFraction(ellipseRadians[i], extendB0);
|
|
190
197
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
191
|
-
if (this.acceptFraction(
|
|
198
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
192
199
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
193
200
|
}
|
|
194
201
|
}
|
|
@@ -197,7 +204,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
197
204
|
// Caller accesses data from two arcs.
|
|
198
205
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
199
206
|
// Solves the arc-arc equations.
|
|
200
|
-
dispatchArcArc(cpA,
|
|
207
|
+
dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
201
208
|
// If arcs are in different planes:
|
|
202
209
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
203
210
|
// 2) accept points that appear in both intersection sets.
|
|
@@ -208,10 +215,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
208
215
|
if (planeA === undefined || planeB === undefined)
|
|
209
216
|
return;
|
|
210
217
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
211
|
-
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef()))
|
|
212
|
-
|
|
213
|
-
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
214
|
-
}
|
|
218
|
+
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef()))
|
|
219
|
+
this.dispatchArcArcInPlane(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed);
|
|
215
220
|
}
|
|
216
221
|
else {
|
|
217
222
|
const arcBPoints = [];
|
|
@@ -221,9 +226,11 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
221
226
|
for (const detailB of arcBPoints) {
|
|
222
227
|
for (const detailA of arcAPoints) {
|
|
223
228
|
if (detailA.point.isAlmostEqual(detailB.point)) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
const arcFractionA = cpA.sweep.fractionToSignedPeriodicFraction(detailA.fraction, extendA0);
|
|
230
|
+
const arcFractionB = cpB.sweep.fractionToSignedPeriodicFraction(detailB.fraction, extendB0);
|
|
231
|
+
if (this.acceptFraction(extendA0, arcFractionA, extendA1)
|
|
232
|
+
&& this.acceptFraction(extendB0, arcFractionB, extendB1)) {
|
|
233
|
+
this.recordPointWithLocalFractions(arcFractionA, cpA, 0, 1, arcFractionB, cpB, 0, 1, reversed);
|
|
227
234
|
}
|
|
228
235
|
}
|
|
229
236
|
}
|
|
@@ -233,7 +240,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
233
240
|
// Caller accesses data from two arcs.
|
|
234
241
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
235
242
|
// Solves the arc-arc equations.
|
|
236
|
-
dispatchArcBsplineCurve3d(_arc,
|
|
243
|
+
dispatchArcBsplineCurve3d(_arc, _extendA0, _extendA1, _cpB, _extendB0, _extendB1, _reversed) {
|
|
244
|
+
// TODO: B-spline XYZ intersection implementation
|
|
237
245
|
/*
|
|
238
246
|
// Arc: X = C + cU + sV
|
|
239
247
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
@@ -294,9 +302,9 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
294
302
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
295
303
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
296
304
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
297
|
-
const arcFraction = cpA.sweep.
|
|
298
|
-
if (this.acceptFraction(
|
|
299
|
-
this.acceptFraction(
|
|
305
|
+
const arcFraction = cpA.sweep.radiansToSignedFraction(Math.atan2(s, c), _extendA0);
|
|
306
|
+
if (this.acceptFraction(_extendA0, arcFraction, _extendA1) &&
|
|
307
|
+
this.acceptFraction(_extendB0, fractionB, _extendB1)) {
|
|
300
308
|
this.recordPointWithLocalFractions(
|
|
301
309
|
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
302
310
|
);
|
|
@@ -308,6 +316,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
308
316
|
}
|
|
309
317
|
*/
|
|
310
318
|
}
|
|
319
|
+
// TODO: Bezier XYZ intersection implementation
|
|
311
320
|
/*
|
|
312
321
|
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
313
322
|
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
@@ -353,8 +362,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
353
362
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
354
363
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
355
364
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
356
|
-
const arcFraction = cpA.sweep.
|
|
357
|
-
if (this.acceptFraction(
|
|
365
|
+
const arcFraction = cpA.sweep.radiansToSignedFraction(Math.atan2(s, c), extendA0);
|
|
366
|
+
if (this.acceptFraction(extendA0, arcFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
358
367
|
this.recordPointWithLocalFractions(
|
|
359
368
|
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
360
369
|
);
|
|
@@ -421,6 +430,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
421
430
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
422
431
|
// Solves the arc-arc equations.
|
|
423
432
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
433
|
+
// TODO: B-spline XYZ intersection implementation
|
|
424
434
|
/*
|
|
425
435
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
426
436
|
const bezierSpanB = bcurveB.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -484,7 +494,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
484
494
|
// Caller accesses data from segment and bsplineCurve
|
|
485
495
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
486
496
|
// Solves the arc-arc equations
|
|
487
|
-
dispatchSegmentBsplineCurve(_cpA, _extendA0, _pointA0, _fractionA0, _pointA1, _fractionA1, _extendA1, _bcurve,
|
|
497
|
+
dispatchSegmentBsplineCurve(_cpA, _extendA0, _pointA0, _fractionA0, _pointA1, _fractionA1, _extendA1, _bcurve, _extendB0, _extendB1, _reversed) {
|
|
498
|
+
// TODO: B-spline XYZ intersection implementation
|
|
488
499
|
/*
|
|
489
500
|
const pointA0H = this.projectPoint(pointA0);
|
|
490
501
|
const pointA1H = this.projectPoint(pointA1);
|
|
@@ -501,8 +512,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
501
512
|
const curvePoint = detail.point;
|
|
502
513
|
const curvePointH = this.projectPoint(curvePoint);
|
|
503
514
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
504
|
-
if (lineFraction !== undefined && this.acceptFraction(
|
|
505
|
-
this.acceptFraction(
|
|
515
|
+
if (lineFraction !== undefined && this.acceptFraction(_extendA0, lineFraction, _extendA1) &&
|
|
516
|
+
this.acceptFraction(_extendB0, fractionB, _extendB1)) {
|
|
506
517
|
this.recordPointWithLocalFractions(
|
|
507
518
|
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
508
519
|
);
|
|
@@ -511,7 +522,8 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
511
522
|
*/
|
|
512
523
|
}
|
|
513
524
|
/** Low level dispatch of linestring with (beziers of) a bspline curve */
|
|
514
|
-
dispatchLineStringBSplineCurve(_lsA,
|
|
525
|
+
dispatchLineStringBSplineCurve(_lsA, _extendA0, _extendA1, _curveB, _extendB0, _extendB1, _reversed) {
|
|
526
|
+
// TODO: B-spline XYZ intersection implementation
|
|
515
527
|
/*
|
|
516
528
|
const numA = lsA.numPoints();
|
|
517
529
|
if (numA > 1) {
|
|
@@ -526,15 +538,15 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
526
538
|
lsA.pointAt(iA, pointA1);
|
|
527
539
|
fA1 = iA * dfA;
|
|
528
540
|
this.dispatchSegmentBsplineCurve(
|
|
529
|
-
lsA, iA === 1 &&
|
|
530
|
-
curveB,
|
|
541
|
+
lsA, iA === 1 && _extendA0, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && _extendA1,
|
|
542
|
+
curveB, _extendB0, _extendB1 reversed);
|
|
531
543
|
}
|
|
532
544
|
}
|
|
533
545
|
return undefined;
|
|
534
546
|
*/
|
|
535
547
|
}
|
|
536
548
|
/** Detail computation for segment intersecting linestring. */
|
|
537
|
-
computeSegmentLineString(lsA,
|
|
549
|
+
computeSegmentLineString(lsA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
538
550
|
const pointA0 = lsA.point0Ref;
|
|
539
551
|
const pointA1 = lsA.point1Ref;
|
|
540
552
|
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
@@ -549,13 +561,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
549
561
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
550
562
|
lsB.pointAt(ib, pointB1);
|
|
551
563
|
fB1 = ib * dfB;
|
|
552
|
-
this.dispatchSegmentSegment(lsA,
|
|
564
|
+
this.dispatchSegmentSegment(lsA, extendA0, pointA0, 0.0, pointA1, 1.0, extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
553
565
|
}
|
|
554
566
|
}
|
|
555
567
|
return undefined;
|
|
556
568
|
}
|
|
557
569
|
/** Detail computation for arc intersecting linestring. */
|
|
558
|
-
computeArcLineString(arcA,
|
|
570
|
+
computeArcLineString(arcA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
559
571
|
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
560
572
|
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
561
573
|
const numB = lsB.numPoints();
|
|
@@ -568,7 +580,7 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
568
580
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
569
581
|
lsB.pointAt(ib, pointB1);
|
|
570
582
|
fB1 = ib * dfB;
|
|
571
|
-
this.dispatchSegmentArc(lsB, ib === 1 &&
|
|
583
|
+
this.dispatchSegmentArc(lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, arcA, extendA0, extendA1, !reversed);
|
|
572
584
|
}
|
|
573
585
|
}
|
|
574
586
|
return undefined;
|
|
@@ -589,8 +601,6 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
589
601
|
let fB0;
|
|
590
602
|
let fA1;
|
|
591
603
|
let fB1;
|
|
592
|
-
const extendA = this._extendA;
|
|
593
|
-
const extendB = this._extendB;
|
|
594
604
|
lsA.pointAt(0, pointA0);
|
|
595
605
|
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
596
606
|
fA1 = ia * dfA;
|
|
@@ -600,53 +610,99 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
600
610
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
601
611
|
lsB.pointAt(ib, pointB1);
|
|
602
612
|
fB1 = ib * dfB;
|
|
603
|
-
this.dispatchSegmentSegment(lsA, ia === 1 &&
|
|
613
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && this._extendA0, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && this._extendA1, lsB, ib === 1 && this._extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && this._extendB1, reversed);
|
|
604
614
|
}
|
|
605
615
|
}
|
|
606
616
|
}
|
|
607
617
|
}
|
|
608
|
-
/**
|
|
618
|
+
/**
|
|
619
|
+
* Low level dispatch of curve collection.
|
|
620
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
621
|
+
*/
|
|
609
622
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
610
623
|
const geomB = this._geometryB; // save
|
|
611
624
|
if (!geomB || !geomB.children || !(geomB instanceof CurveCollection_1.CurveCollection))
|
|
612
625
|
return;
|
|
613
|
-
|
|
614
|
-
|
|
626
|
+
const children = geomB.children;
|
|
627
|
+
const extendB0 = this._extendB0; // save
|
|
628
|
+
const extendB1 = this._extendB1; // save
|
|
629
|
+
for (let i = 0; i < children.length; i++) {
|
|
630
|
+
this.resetGeometry(children[i]);
|
|
631
|
+
if (geomB instanceof Path_1.Path && children.length > 1) {
|
|
632
|
+
if (i === 0)
|
|
633
|
+
this._extendB1 = false; // first child can only extend from start
|
|
634
|
+
else if (i === children.length - 1)
|
|
635
|
+
this._extendB0 = false; // last child can only extend from end
|
|
636
|
+
else
|
|
637
|
+
this._extendB0 = this._extendB1 = false; // middle children cannot extend
|
|
638
|
+
}
|
|
639
|
+
else if (geomB instanceof Loop_1.Loop) {
|
|
640
|
+
this._extendB0 = this._extendB1 = false; // Loops cannot extend
|
|
641
|
+
}
|
|
615
642
|
geomAHandler(geomA);
|
|
643
|
+
this._extendB0 = extendB0; // restore
|
|
644
|
+
this._extendB1 = extendB1; // restore
|
|
616
645
|
}
|
|
617
|
-
this.
|
|
646
|
+
this.resetGeometry(geomB); // restore
|
|
618
647
|
}
|
|
619
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* Low level dispatch of CurveChainWithDistanceIndex.
|
|
650
|
+
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
651
|
+
*/
|
|
620
652
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
621
653
|
if (!this._geometryB || !(this._geometryB instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex))
|
|
622
654
|
return;
|
|
623
655
|
if (geomA instanceof CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex) {
|
|
624
|
-
(0, core_bentley_1.assert)(
|
|
656
|
+
(0, core_bentley_1.assert)(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
625
657
|
return;
|
|
626
658
|
}
|
|
627
659
|
const index0 = this._results.length;
|
|
628
660
|
const geomB = this._geometryB; // save
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
geomAHandler(geomA);
|
|
632
|
-
}
|
|
661
|
+
this.resetGeometry(geomB.path);
|
|
662
|
+
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
633
663
|
this.resetGeometry(geomB); // restore
|
|
634
664
|
this._results = CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
635
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
668
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
669
|
+
*/
|
|
670
|
+
handleChildren(g) {
|
|
671
|
+
const children = g.children;
|
|
672
|
+
const extendA0 = this._extendA0; // save
|
|
673
|
+
const extendA1 = this._extendA1; // save
|
|
674
|
+
if (children)
|
|
675
|
+
for (let i = 0; i < children.length; i++) {
|
|
676
|
+
if (g instanceof Path_1.Path && children.length > 1) {
|
|
677
|
+
if (i === 0)
|
|
678
|
+
this._extendA1 = false; // first child can only extend from start
|
|
679
|
+
else if (i === children.length - 1)
|
|
680
|
+
this._extendA0 = false; // last child can only extend from end
|
|
681
|
+
else
|
|
682
|
+
this._extendA0 = this._extendA1 = false; // middle children cannot extend
|
|
683
|
+
}
|
|
684
|
+
else if (g instanceof Loop_1.Loop) {
|
|
685
|
+
this._extendA0 = this._extendA1 = false; // Loops cannot extend
|
|
686
|
+
}
|
|
687
|
+
children[i].dispatchToGeometryHandler(this);
|
|
688
|
+
this._extendA0 = extendA0; // restore
|
|
689
|
+
this._extendA1 = extendA1; // restore
|
|
690
|
+
}
|
|
691
|
+
}
|
|
636
692
|
/** Double dispatch handler for strongly typed segment. */
|
|
637
693
|
handleLineSegment3d(segmentA) {
|
|
638
694
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
639
695
|
const segmentB = this._geometryB;
|
|
640
|
-
this.dispatchSegmentSegment(segmentA, this.
|
|
696
|
+
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);
|
|
641
697
|
}
|
|
642
698
|
else if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
643
|
-
this.computeSegmentLineString(segmentA, this.
|
|
699
|
+
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
644
700
|
}
|
|
645
701
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
646
|
-
this.dispatchSegmentArc(segmentA, this.
|
|
702
|
+
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
647
703
|
}
|
|
648
704
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
|
|
649
|
-
this.dispatchSegmentBsplineCurve(segmentA, this.
|
|
705
|
+
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
650
706
|
}
|
|
651
707
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
652
708
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
@@ -663,13 +719,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
663
719
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
664
720
|
}
|
|
665
721
|
else if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
666
|
-
this.computeSegmentLineString(this._geometryB, this.
|
|
722
|
+
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
667
723
|
}
|
|
668
724
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
669
|
-
this.computeArcLineString(this._geometryB, this.
|
|
725
|
+
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
670
726
|
}
|
|
671
727
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
|
|
672
|
-
this.dispatchLineStringBSplineCurve(lsA, this.
|
|
728
|
+
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
673
729
|
}
|
|
674
730
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
675
731
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
@@ -682,16 +738,16 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
682
738
|
/** Double dispatch handler for strongly typed arc. */
|
|
683
739
|
handleArc3d(arc0) {
|
|
684
740
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
685
|
-
this.dispatchSegmentArc(this._geometryB, this.
|
|
741
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
686
742
|
}
|
|
687
743
|
else if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
688
|
-
this.computeArcLineString(arc0, this.
|
|
744
|
+
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
689
745
|
}
|
|
690
746
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
691
|
-
this.dispatchArcArc(arc0, this.
|
|
747
|
+
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
692
748
|
}
|
|
693
749
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3d) {
|
|
694
|
-
this.dispatchArcBsplineCurve3d(arc0, this.
|
|
750
|
+
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
695
751
|
}
|
|
696
752
|
else if (this._geometryB instanceof CurveCollection_1.CurveCollection) {
|
|
697
753
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
@@ -704,13 +760,13 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
704
760
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
705
761
|
handleBSplineCurve3d(curve) {
|
|
706
762
|
if (this._geometryB instanceof LineSegment3d_1.LineSegment3d) {
|
|
707
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this.
|
|
763
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
708
764
|
}
|
|
709
765
|
else if (this._geometryB instanceof LineString3d_1.LineString3d) {
|
|
710
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this.
|
|
766
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
711
767
|
}
|
|
712
768
|
else if (this._geometryB instanceof Arc3d_1.Arc3d) {
|
|
713
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this.
|
|
769
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
714
770
|
}
|
|
715
771
|
else if (this._geometryB instanceof BSplineCurve_1.BSplineCurve3dBase) {
|
|
716
772
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
@@ -736,12 +792,17 @@ class CurveCurveIntersectXYZ extends GeometryHandler_1.RecurseToCurvesGeometryHa
|
|
|
736
792
|
// "easy" if both present BezierCurve3dH span loaders
|
|
737
793
|
if (this._geometryB instanceof LineSegment3d) {
|
|
738
794
|
this.dispatchSegmentBsplineCurve(
|
|
739
|
-
this._geometryB, this.
|
|
740
|
-
curve, this.
|
|
795
|
+
this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1,
|
|
796
|
+
curve, this._extendA0, this.extendA1, true,
|
|
797
|
+
);
|
|
741
798
|
} else if (this._geometryB instanceof LineString3d) {
|
|
742
|
-
this.dispatchLineStringBSplineCurve(
|
|
799
|
+
this.dispatchLineStringBSplineCurve(
|
|
800
|
+
this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true,
|
|
801
|
+
);
|
|
743
802
|
} else if (this._geometryB instanceof Arc3d) {
|
|
744
|
-
this.dispatchArcBsplineCurve3d(
|
|
803
|
+
this.dispatchArcBsplineCurve3d(
|
|
804
|
+
this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true,
|
|
805
|
+
);
|
|
745
806
|
}
|
|
746
807
|
*/
|
|
747
808
|
return undefined;
|