跳到主要内容

IDP.Math.KGeomLib.curveIntersectCurve() method

对两条曲线求交。 如果两曲线完全重合,该方法返回的是空数组。 所以areCurvesTotallyOverlap方法需要在使用该方法之前使用。 对于部分重合的情况,结果是返回重叠的部分的两个端点。

Get the intersection of curve and curve. The method returns an empty array for two completely overlap curves, so the function "areCurvesTotallyOverlap" should be called before calling the interface to determine whether it is completely overlap or not. For two bounding curves, if there is a partial overlap, the return result is two endpoints of the overlap segment.

Signature:

curveIntersectCurve(curve1: KCurve3d, curve2: KCurve3d, tolerance?: number): KCurvesIntersectRet[];

Links: curveIntersectCurve(curve1: KCurve3d, curve2: KCurve3d, tolerance?: number): KCurvesIntersectRet[];

Parameters

Parameter

Type

Description

curve1

KCurve3d

第一条曲线。

The first curve.

curve2

KCurve3d

第二条曲线。

The second curve.

tolerance

number

(Optional) 特定容差,默认值是1e-6。

The specified tolerance.The default value is 1e-6.

Returns:

KCurvesIntersectRet[]

返回是一个KCurvesIntersectRet数组,包含交点信息和重合信息。

The array of KCurvesIntersectRet include status of overlap, intersection point.