AddCutPlane

在指定的位置添加一个通过物件的平面曲面。获取更多信息,请参考 Rhino 帮助文件中 CutPlane 指令的部分。

语法

rhinoscriptsyntax.AddCutPlane (object_ids, start_point, end_point, normal=None)

rhinoscript.surface.AddCutPlane (object_ids, start_point, end_point, normal=None)

参数

object_ids

必须参数。列表。剪切面要通过物件的ID。

start_point

必须参数。包含三个数字的列表或者 Point3d 对象。定义剪切面直线的起点。

end_point

必须参数。包含三个数字的列表或者 Point3d 对象。定义剪切面直线的终点。

normal

可选参数。控制平面曲面的向量。对于 Rhino 的 CutPlane 指令,此为法线或 当前视图构造曲面的 Z 轴。如果省略,将使用世界坐标的 Z 轴。

返回值

Guid

执行成功,返回新物件的ID。

None

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

示例

import rhinoscriptsyntax as rs

objs = rs.GetObjects("Select objects for cut plane")

if objs:

    point0 = rs.GetPoint("Start of cut plane")

    if point0:

        point1 = rs.GetPoint("End of cut plane", point0)

        if point1: rs.AddCutPlane( objs, point0, point1 )

同见

AddPlaneSurface