SurfaceSurfaceIntersection - PYTHON 不支持

计算一个曲面物件和另一个曲面物件的相交。Note, this function works on untrimmed surfaces.

语法

Rhino.SurfaceSurfaceIntersection (strSurfaceA, strSurfaceB [, dblTolerance [, blnCreate]])

参数

strSurfaceA

Required.字符串。The identifier of the first surface object.

strSurfaceB

Required.字符串。The identifier of the second surface object.

dblTolerance

可选参数。Number.The absolute tolerance in drawing units.If omitted, the document's current absolute tolerance is used.

blnCreate

可选参数。Boolean.Create the intersection curves and points.If omitted, intersection geometry will not be created.

返回值

Array

If blnCreate is not specified or is equal to False, an array numbers identifying the intersection event type if successful.The array will contain one or more of the following intersection event types:

Type

描述

1

Transverse surface-surface intersection curve.

2

Tangent surface-surface intersection curve.

3

Overlap surface-surface intersection curve.

4

Transverse surface-surface intersection point.

5

Tangent surface-surface intersection point.

Array

If blnCreate is specified and is equal to True, a two-dimensional array of intersection information if successful.The array will contain one or more of the following elements:

Element

Type

描述

(n, 0)

Number

The intersection event type.See the above table for details.

(n, 1)

String

The identifier of the intersection curve or point object that was created.

Null

如果执行不成功或出错,返回空值。

示例

Sub SSX()

Const rhObjectSurface = 8

Dim strSurfaceA, strSurfaceB, arrSSX

strSurfaceA = Rhino.GetObject("Select first surface", rhObjectSurface)

If IsNull(strSurfaceA) Or Rhino.IsSurface(strSurfaceA) = False Then Exit Sub

strSurfaceB = Rhino.GetObject("Select second surface", rhObjectSurface)

If IsNull(strSurfaceB) Or Rhino.IsSurface(strSurfaceB) = False Then Exit Sub

arrSSX = Rhino.SurfaceSurfaceIntersection(strSurfaceA, strSurfaceB,, True)

If Not IsArray(arrSSX) Then

Rhino.Print "Surfaces do not intersect."

Exit Sub

End If

For i = 0 to UBound(arrSSX)

Select Case arrSSX(i,0)

Case 1 Rhino.Print "Transverse surface-surface intersection curve."

Case 2 Rhino.Print "Tangent surface-surface intersection curve."

Case 3 Rhino.Print "Overlap surface-surface intersection curve."

Case 4 Rhino.Print "Transverse surface-surface intersection point."

Case 5 Rhino.Print "Tangent surface-surface intersection point."

End Select

Rhino.SelectObject arrSSX(i,1)

Next

End Sub

同见

CurveCurveIntersection

CurveSurfaceIntersection