MeshMeshIntersection

计算一个网格物件和另一个网格物件的相交。

语法

rhinoscriptsyntax.MeshMeshIntersection (mesh1, mesh2, tolerance=None)

rhinoscript.mesh.MeshMeshIntersection (mesh1, mesh2, tolerance=None)

参数

mesh1

必须参数。字符串或 Guid。第一个网格物件ID。

mesh2

必须参数。字符串或 Guid。第二个网格物件ID。

tolerance

可选参数。数字。相交公差。如果省略,将使用 Rhino 内部的零公差 (1.0e-12)。

返回值

列表

代表相交曲线(多重直线)顶点的3-D 点数组。

None

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

示例

import rhinoscriptsyntax as rs

mesh1 = rs.GetObject("Select first mesh to intersect", rs.filter.mesh)

mesh2 = rs.GetObject("Select second mesh to intersect", rs.filter.mesh)

results = rs.MeshMeshIntersection(mesh1, mesh2)

if results:

    for points in results: rs.AddPolyline(points)

同见

CurveMeshIntersection

MeshClosestPoint