@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
|
@@ -12,13 +12,16 @@ import { RecurseToCurvesGeometryHandler } from "../../geometry3d/GeometryHandler
|
|
|
12
12
|
import { Plane3dByOriginAndUnitNormal } from "../../geometry3d/Plane3dByOriginAndUnitNormal";
|
|
13
13
|
import { Vector2d } from "../../geometry3d/Point2dVector2d";
|
|
14
14
|
import { Point3d, Vector3d } from "../../geometry3d/Point3dVector3d";
|
|
15
|
-
import {
|
|
15
|
+
import { TrigPolynomial } from "../../numerics/Polynomials";
|
|
16
|
+
import { SmallSystem } from "../../numerics/SmallSystem";
|
|
16
17
|
import { Arc3d } from "../Arc3d";
|
|
17
18
|
import { CurveChainWithDistanceIndex } from "../CurveChainWithDistanceIndex";
|
|
18
19
|
import { CurveCollection } from "../CurveCollection";
|
|
19
20
|
import { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from "../CurveLocationDetail";
|
|
20
21
|
import { LineSegment3d } from "../LineSegment3d";
|
|
21
22
|
import { LineString3d } from "../LineString3d";
|
|
23
|
+
import { Loop } from "../Loop";
|
|
24
|
+
import { Path } from "../Path";
|
|
22
25
|
// cspell:word XYRR
|
|
23
26
|
/**
|
|
24
27
|
* Handler class for XYZ intersections between _geometryB and another geometry.
|
|
@@ -34,9 +37,11 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
34
37
|
*/
|
|
35
38
|
constructor(extendA, geometryB, extendB) {
|
|
36
39
|
super();
|
|
37
|
-
this.
|
|
40
|
+
this._extendA0 = extendA;
|
|
41
|
+
this._extendA1 = extendA;
|
|
38
42
|
this._geometryB = geometryB;
|
|
39
|
-
this.
|
|
43
|
+
this._extendB0 = extendB;
|
|
44
|
+
this._extendB1 = extendB;
|
|
40
45
|
this._results = [];
|
|
41
46
|
}
|
|
42
47
|
/** Reset the geometry, leaving all other parts unchanged (and preserving accumulated intersections). */
|
|
@@ -53,10 +58,12 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
53
58
|
this._results = [];
|
|
54
59
|
return result;
|
|
55
60
|
}
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
/** Accept the fraction if it falls inside (possibly extended) fraction range. */
|
|
62
|
+
acceptFraction(extend0, fraction, extend1, fractionTol = 1.0e-12) {
|
|
63
|
+
// Note that default tol is tighter than Geometry.smallFraction. We aggressively toss intersections past endpoints.
|
|
64
|
+
if (!extend0 && fraction < -fractionTol)
|
|
58
65
|
return false;
|
|
59
|
-
if (!extend1 && fraction > 1.0)
|
|
66
|
+
if (!extend1 && fraction > 1.0 + fractionTol)
|
|
60
67
|
return false;
|
|
61
68
|
return true;
|
|
62
69
|
}
|
|
@@ -158,13 +165,13 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
158
165
|
let lineFraction;
|
|
159
166
|
let linePoint;
|
|
160
167
|
for (const c of candidates) {
|
|
161
|
-
|
|
168
|
+
const arcFraction = arc.sweep.fractionToSignedPeriodicFraction(c.fraction, extendB0);
|
|
169
|
+
if (this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
162
170
|
lineFraction = SmallSystem.lineSegment3dClosestPointUnbounded(pointA0, pointA1, c.point);
|
|
163
171
|
if (lineFraction !== undefined) {
|
|
164
172
|
linePoint = pointA0.interpolate(lineFraction, pointA1, linePoint);
|
|
165
|
-
if (linePoint.isAlmostEqualMetric(c.point)
|
|
166
|
-
|
|
167
|
-
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, c.fraction, arc, 0, 1, reversed);
|
|
173
|
+
if (linePoint.isAlmostEqualMetric(c.point) && this.acceptFraction(extendA0, lineFraction, extendA1)) {
|
|
174
|
+
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
177
|
}
|
|
@@ -175,17 +182,17 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
175
182
|
// Passes "other" as {center, vector0, vector90} in local xy space of cpA
|
|
176
183
|
// Solves the arc-arc equations for that local ellipse with unit circle.
|
|
177
184
|
// Solution fractions map directly to original arcs.
|
|
178
|
-
dispatchArcArcInPlane(cpA,
|
|
185
|
+
dispatchArcArcInPlane(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
179
186
|
const otherVectors = cpA.otherArcAsLocalVectors(cpB);
|
|
180
187
|
if (otherVectors !== undefined) {
|
|
181
188
|
const ellipseRadians = [];
|
|
182
189
|
const circleRadians = [];
|
|
183
190
|
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);
|
|
184
191
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
185
|
-
const fractionA = cpA.sweep.
|
|
186
|
-
const fractionB = cpB.sweep.
|
|
192
|
+
const fractionA = cpA.sweep.radiansToSignedFraction(circleRadians[i], extendA0);
|
|
193
|
+
const fractionB = cpB.sweep.radiansToSignedFraction(ellipseRadians[i], extendB0);
|
|
187
194
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
188
|
-
if (this.acceptFraction(
|
|
195
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
189
196
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
190
197
|
}
|
|
191
198
|
}
|
|
@@ -194,7 +201,7 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
194
201
|
// Caller accesses data from two arcs.
|
|
195
202
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
196
203
|
// Solves the arc-arc equations.
|
|
197
|
-
dispatchArcArc(cpA,
|
|
204
|
+
dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
198
205
|
// If arcs are in different planes:
|
|
199
206
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
200
207
|
// 2) accept points that appear in both intersection sets.
|
|
@@ -205,10 +212,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
205
212
|
if (planeA === undefined || planeB === undefined)
|
|
206
213
|
return;
|
|
207
214
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
208
|
-
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef()))
|
|
209
|
-
|
|
210
|
-
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
211
|
-
}
|
|
215
|
+
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef()))
|
|
216
|
+
this.dispatchArcArcInPlane(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed);
|
|
212
217
|
}
|
|
213
218
|
else {
|
|
214
219
|
const arcBPoints = [];
|
|
@@ -218,9 +223,11 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
218
223
|
for (const detailB of arcBPoints) {
|
|
219
224
|
for (const detailA of arcAPoints) {
|
|
220
225
|
if (detailA.point.isAlmostEqual(detailB.point)) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
const arcFractionA = cpA.sweep.fractionToSignedPeriodicFraction(detailA.fraction, extendA0);
|
|
227
|
+
const arcFractionB = cpB.sweep.fractionToSignedPeriodicFraction(detailB.fraction, extendB0);
|
|
228
|
+
if (this.acceptFraction(extendA0, arcFractionA, extendA1)
|
|
229
|
+
&& this.acceptFraction(extendB0, arcFractionB, extendB1)) {
|
|
230
|
+
this.recordPointWithLocalFractions(arcFractionA, cpA, 0, 1, arcFractionB, cpB, 0, 1, reversed);
|
|
224
231
|
}
|
|
225
232
|
}
|
|
226
233
|
}
|
|
@@ -230,7 +237,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
230
237
|
// Caller accesses data from two arcs.
|
|
231
238
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
232
239
|
// Solves the arc-arc equations.
|
|
233
|
-
dispatchArcBsplineCurve3d(_arc,
|
|
240
|
+
dispatchArcBsplineCurve3d(_arc, _extendA0, _extendA1, _cpB, _extendB0, _extendB1, _reversed) {
|
|
241
|
+
// TODO: B-spline XYZ intersection implementation
|
|
234
242
|
/*
|
|
235
243
|
// Arc: X = C + cU + sV
|
|
236
244
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
@@ -291,9 +299,9 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
291
299
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
292
300
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
293
301
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
294
|
-
const arcFraction = cpA.sweep.
|
|
295
|
-
if (this.acceptFraction(
|
|
296
|
-
this.acceptFraction(
|
|
302
|
+
const arcFraction = cpA.sweep.radiansToSignedFraction(Math.atan2(s, c), _extendA0);
|
|
303
|
+
if (this.acceptFraction(_extendA0, arcFraction, _extendA1) &&
|
|
304
|
+
this.acceptFraction(_extendB0, fractionB, _extendB1)) {
|
|
297
305
|
this.recordPointWithLocalFractions(
|
|
298
306
|
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
299
307
|
);
|
|
@@ -305,6 +313,7 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
305
313
|
}
|
|
306
314
|
*/
|
|
307
315
|
}
|
|
316
|
+
// TODO: Bezier XYZ intersection implementation
|
|
308
317
|
/*
|
|
309
318
|
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
310
319
|
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
@@ -350,8 +359,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
350
359
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
351
360
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
352
361
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
353
|
-
const arcFraction = cpA.sweep.
|
|
354
|
-
if (this.acceptFraction(
|
|
362
|
+
const arcFraction = cpA.sweep.radiansToSignedFraction(Math.atan2(s, c), extendA0);
|
|
363
|
+
if (this.acceptFraction(extendA0, arcFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
355
364
|
this.recordPointWithLocalFractions(
|
|
356
365
|
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
357
366
|
);
|
|
@@ -418,6 +427,7 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
418
427
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
419
428
|
// Solves the arc-arc equations.
|
|
420
429
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
430
|
+
// TODO: B-spline XYZ intersection implementation
|
|
421
431
|
/*
|
|
422
432
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
423
433
|
const bezierSpanB = bcurveB.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -481,7 +491,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
481
491
|
// Caller accesses data from segment and bsplineCurve
|
|
482
492
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
483
493
|
// Solves the arc-arc equations
|
|
484
|
-
dispatchSegmentBsplineCurve(_cpA, _extendA0, _pointA0, _fractionA0, _pointA1, _fractionA1, _extendA1, _bcurve,
|
|
494
|
+
dispatchSegmentBsplineCurve(_cpA, _extendA0, _pointA0, _fractionA0, _pointA1, _fractionA1, _extendA1, _bcurve, _extendB0, _extendB1, _reversed) {
|
|
495
|
+
// TODO: B-spline XYZ intersection implementation
|
|
485
496
|
/*
|
|
486
497
|
const pointA0H = this.projectPoint(pointA0);
|
|
487
498
|
const pointA1H = this.projectPoint(pointA1);
|
|
@@ -498,8 +509,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
498
509
|
const curvePoint = detail.point;
|
|
499
510
|
const curvePointH = this.projectPoint(curvePoint);
|
|
500
511
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
501
|
-
if (lineFraction !== undefined && this.acceptFraction(
|
|
502
|
-
this.acceptFraction(
|
|
512
|
+
if (lineFraction !== undefined && this.acceptFraction(_extendA0, lineFraction, _extendA1) &&
|
|
513
|
+
this.acceptFraction(_extendB0, fractionB, _extendB1)) {
|
|
503
514
|
this.recordPointWithLocalFractions(
|
|
504
515
|
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
505
516
|
);
|
|
@@ -508,7 +519,8 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
508
519
|
*/
|
|
509
520
|
}
|
|
510
521
|
/** Low level dispatch of linestring with (beziers of) a bspline curve */
|
|
511
|
-
dispatchLineStringBSplineCurve(_lsA,
|
|
522
|
+
dispatchLineStringBSplineCurve(_lsA, _extendA0, _extendA1, _curveB, _extendB0, _extendB1, _reversed) {
|
|
523
|
+
// TODO: B-spline XYZ intersection implementation
|
|
512
524
|
/*
|
|
513
525
|
const numA = lsA.numPoints();
|
|
514
526
|
if (numA > 1) {
|
|
@@ -523,15 +535,15 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
523
535
|
lsA.pointAt(iA, pointA1);
|
|
524
536
|
fA1 = iA * dfA;
|
|
525
537
|
this.dispatchSegmentBsplineCurve(
|
|
526
|
-
lsA, iA === 1 &&
|
|
527
|
-
curveB,
|
|
538
|
+
lsA, iA === 1 && _extendA0, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && _extendA1,
|
|
539
|
+
curveB, _extendB0, _extendB1 reversed);
|
|
528
540
|
}
|
|
529
541
|
}
|
|
530
542
|
return undefined;
|
|
531
543
|
*/
|
|
532
544
|
}
|
|
533
545
|
/** Detail computation for segment intersecting linestring. */
|
|
534
|
-
computeSegmentLineString(lsA,
|
|
546
|
+
computeSegmentLineString(lsA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
535
547
|
const pointA0 = lsA.point0Ref;
|
|
536
548
|
const pointA1 = lsA.point1Ref;
|
|
537
549
|
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
@@ -546,13 +558,13 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
546
558
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
547
559
|
lsB.pointAt(ib, pointB1);
|
|
548
560
|
fB1 = ib * dfB;
|
|
549
|
-
this.dispatchSegmentSegment(lsA,
|
|
561
|
+
this.dispatchSegmentSegment(lsA, extendA0, pointA0, 0.0, pointA1, 1.0, extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
550
562
|
}
|
|
551
563
|
}
|
|
552
564
|
return undefined;
|
|
553
565
|
}
|
|
554
566
|
/** Detail computation for arc intersecting linestring. */
|
|
555
|
-
computeArcLineString(arcA,
|
|
567
|
+
computeArcLineString(arcA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
556
568
|
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
557
569
|
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
558
570
|
const numB = lsB.numPoints();
|
|
@@ -565,7 +577,7 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
565
577
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
566
578
|
lsB.pointAt(ib, pointB1);
|
|
567
579
|
fB1 = ib * dfB;
|
|
568
|
-
this.dispatchSegmentArc(lsB, ib === 1 &&
|
|
580
|
+
this.dispatchSegmentArc(lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, arcA, extendA0, extendA1, !reversed);
|
|
569
581
|
}
|
|
570
582
|
}
|
|
571
583
|
return undefined;
|
|
@@ -586,8 +598,6 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
586
598
|
let fB0;
|
|
587
599
|
let fA1;
|
|
588
600
|
let fB1;
|
|
589
|
-
const extendA = this._extendA;
|
|
590
|
-
const extendB = this._extendB;
|
|
591
601
|
lsA.pointAt(0, pointA0);
|
|
592
602
|
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
593
603
|
fA1 = ia * dfA;
|
|
@@ -597,53 +607,99 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
597
607
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
598
608
|
lsB.pointAt(ib, pointB1);
|
|
599
609
|
fB1 = ib * dfB;
|
|
600
|
-
this.dispatchSegmentSegment(lsA, ia === 1 &&
|
|
610
|
+
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);
|
|
601
611
|
}
|
|
602
612
|
}
|
|
603
613
|
}
|
|
604
614
|
}
|
|
605
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* Low level dispatch of curve collection.
|
|
617
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
618
|
+
*/
|
|
606
619
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
607
620
|
const geomB = this._geometryB; // save
|
|
608
621
|
if (!geomB || !geomB.children || !(geomB instanceof CurveCollection))
|
|
609
622
|
return;
|
|
610
|
-
|
|
611
|
-
|
|
623
|
+
const children = geomB.children;
|
|
624
|
+
const extendB0 = this._extendB0; // save
|
|
625
|
+
const extendB1 = this._extendB1; // save
|
|
626
|
+
for (let i = 0; i < children.length; i++) {
|
|
627
|
+
this.resetGeometry(children[i]);
|
|
628
|
+
if (geomB instanceof Path && children.length > 1) {
|
|
629
|
+
if (i === 0)
|
|
630
|
+
this._extendB1 = false; // first child can only extend from start
|
|
631
|
+
else if (i === children.length - 1)
|
|
632
|
+
this._extendB0 = false; // last child can only extend from end
|
|
633
|
+
else
|
|
634
|
+
this._extendB0 = this._extendB1 = false; // middle children cannot extend
|
|
635
|
+
}
|
|
636
|
+
else if (geomB instanceof Loop) {
|
|
637
|
+
this._extendB0 = this._extendB1 = false; // Loops cannot extend
|
|
638
|
+
}
|
|
612
639
|
geomAHandler(geomA);
|
|
640
|
+
this._extendB0 = extendB0; // restore
|
|
641
|
+
this._extendB1 = extendB1; // restore
|
|
613
642
|
}
|
|
614
|
-
this.
|
|
643
|
+
this.resetGeometry(geomB); // restore
|
|
615
644
|
}
|
|
616
|
-
/**
|
|
645
|
+
/**
|
|
646
|
+
* Low level dispatch of CurveChainWithDistanceIndex.
|
|
647
|
+
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
648
|
+
*/
|
|
617
649
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
618
650
|
if (!this._geometryB || !(this._geometryB instanceof CurveChainWithDistanceIndex))
|
|
619
651
|
return;
|
|
620
652
|
if (geomA instanceof CurveChainWithDistanceIndex) {
|
|
621
|
-
assert(
|
|
653
|
+
assert(false, "call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
622
654
|
return;
|
|
623
655
|
}
|
|
624
656
|
const index0 = this._results.length;
|
|
625
657
|
const geomB = this._geometryB; // save
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
geomAHandler(geomA);
|
|
629
|
-
}
|
|
658
|
+
this.resetGeometry(geomB.path);
|
|
659
|
+
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
630
660
|
this.resetGeometry(geomB); // restore
|
|
631
661
|
this._results = CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
632
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
665
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
666
|
+
*/
|
|
667
|
+
handleChildren(g) {
|
|
668
|
+
const children = g.children;
|
|
669
|
+
const extendA0 = this._extendA0; // save
|
|
670
|
+
const extendA1 = this._extendA1; // save
|
|
671
|
+
if (children)
|
|
672
|
+
for (let i = 0; i < children.length; i++) {
|
|
673
|
+
if (g instanceof Path && children.length > 1) {
|
|
674
|
+
if (i === 0)
|
|
675
|
+
this._extendA1 = false; // first child can only extend from start
|
|
676
|
+
else if (i === children.length - 1)
|
|
677
|
+
this._extendA0 = false; // last child can only extend from end
|
|
678
|
+
else
|
|
679
|
+
this._extendA0 = this._extendA1 = false; // middle children cannot extend
|
|
680
|
+
}
|
|
681
|
+
else if (g instanceof Loop) {
|
|
682
|
+
this._extendA0 = this._extendA1 = false; // Loops cannot extend
|
|
683
|
+
}
|
|
684
|
+
children[i].dispatchToGeometryHandler(this);
|
|
685
|
+
this._extendA0 = extendA0; // restore
|
|
686
|
+
this._extendA1 = extendA1; // restore
|
|
687
|
+
}
|
|
688
|
+
}
|
|
633
689
|
/** Double dispatch handler for strongly typed segment. */
|
|
634
690
|
handleLineSegment3d(segmentA) {
|
|
635
691
|
if (this._geometryB instanceof LineSegment3d) {
|
|
636
692
|
const segmentB = this._geometryB;
|
|
637
|
-
this.dispatchSegmentSegment(segmentA, this.
|
|
693
|
+
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);
|
|
638
694
|
}
|
|
639
695
|
else if (this._geometryB instanceof LineString3d) {
|
|
640
|
-
this.computeSegmentLineString(segmentA, this.
|
|
696
|
+
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
641
697
|
}
|
|
642
698
|
else if (this._geometryB instanceof Arc3d) {
|
|
643
|
-
this.dispatchSegmentArc(segmentA, this.
|
|
699
|
+
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
644
700
|
}
|
|
645
701
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
646
|
-
this.dispatchSegmentBsplineCurve(segmentA, this.
|
|
702
|
+
this.dispatchSegmentBsplineCurve(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 CurveCollection) {
|
|
649
705
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
@@ -660,13 +716,13 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
660
716
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
661
717
|
}
|
|
662
718
|
else if (this._geometryB instanceof LineSegment3d) {
|
|
663
|
-
this.computeSegmentLineString(this._geometryB, this.
|
|
719
|
+
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
664
720
|
}
|
|
665
721
|
else if (this._geometryB instanceof Arc3d) {
|
|
666
|
-
this.computeArcLineString(this._geometryB, this.
|
|
722
|
+
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
667
723
|
}
|
|
668
724
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
669
|
-
this.dispatchLineStringBSplineCurve(lsA, this.
|
|
725
|
+
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
670
726
|
}
|
|
671
727
|
else if (this._geometryB instanceof CurveCollection) {
|
|
672
728
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
@@ -679,16 +735,16 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
679
735
|
/** Double dispatch handler for strongly typed arc. */
|
|
680
736
|
handleArc3d(arc0) {
|
|
681
737
|
if (this._geometryB instanceof LineSegment3d) {
|
|
682
|
-
this.dispatchSegmentArc(this._geometryB, this.
|
|
738
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
683
739
|
}
|
|
684
740
|
else if (this._geometryB instanceof LineString3d) {
|
|
685
|
-
this.computeArcLineString(arc0, this.
|
|
741
|
+
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
686
742
|
}
|
|
687
743
|
else if (this._geometryB instanceof Arc3d) {
|
|
688
|
-
this.dispatchArcArc(arc0, this.
|
|
744
|
+
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
689
745
|
}
|
|
690
746
|
else if (this._geometryB instanceof BSplineCurve3d) {
|
|
691
|
-
this.dispatchArcBsplineCurve3d(arc0, this.
|
|
747
|
+
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
692
748
|
}
|
|
693
749
|
else if (this._geometryB instanceof CurveCollection) {
|
|
694
750
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
@@ -701,13 +757,13 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
701
757
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
702
758
|
handleBSplineCurve3d(curve) {
|
|
703
759
|
if (this._geometryB instanceof LineSegment3d) {
|
|
704
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this.
|
|
760
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
705
761
|
}
|
|
706
762
|
else if (this._geometryB instanceof LineString3d) {
|
|
707
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this.
|
|
763
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
708
764
|
}
|
|
709
765
|
else if (this._geometryB instanceof Arc3d) {
|
|
710
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this.
|
|
766
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
711
767
|
}
|
|
712
768
|
else if (this._geometryB instanceof BSplineCurve3dBase) {
|
|
713
769
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
@@ -733,12 +789,17 @@ export class CurveCurveIntersectXYZ extends RecurseToCurvesGeometryHandler {
|
|
|
733
789
|
// "easy" if both present BezierCurve3dH span loaders
|
|
734
790
|
if (this._geometryB instanceof LineSegment3d) {
|
|
735
791
|
this.dispatchSegmentBsplineCurve(
|
|
736
|
-
this._geometryB, this.
|
|
737
|
-
curve, this.
|
|
792
|
+
this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1,
|
|
793
|
+
curve, this._extendA0, this.extendA1, true,
|
|
794
|
+
);
|
|
738
795
|
} else if (this._geometryB instanceof LineString3d) {
|
|
739
|
-
this.dispatchLineStringBSplineCurve(
|
|
796
|
+
this.dispatchLineStringBSplineCurve(
|
|
797
|
+
this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true,
|
|
798
|
+
);
|
|
740
799
|
} else if (this._geometryB instanceof Arc3d) {
|
|
741
|
-
this.dispatchArcBsplineCurve3d(
|
|
800
|
+
this.dispatchArcBsplineCurve3d(
|
|
801
|
+
this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true,
|
|
802
|
+
);
|
|
742
803
|
}
|
|
743
804
|
*/
|
|
744
805
|
return undefined;
|