Angle

测量两个点之间的角度。

语法

rhinoscriptsyntax.Angle (point1, point2, plane=True)

rhinoscript.utility.Angle (point1, point2, plane=True)

参数

point1

必须参数。三个数字组成的列表或 Point3d 对象。第一个 3-D 点。

point2

必须参数。三个数字组成的列表或 Point3d 对象。第二个 3-D 点。

plane

可选参数。布尔值或平面。如果为 True,基于世界坐标系统计算角度。如果为 False,基于活动的工作平面计算角度。如果传递一个平面,将使用这个平面计算角度。

返回值

元组

元组包含以下元素.

0

X,Y 的角度值。

1

高度。

2

X 方向的 delta 值。

3

Y 方向的 delta 值。

4

Z 方向的 delta 值。

None

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

示例

import rhinoscriptsyntax as rs

point1 = rs.GetPoint("First point")

if point1:

    point2 = rs.GetPoint("Second point")

    if point2:

        angle = rs.Angle(point1, point2)

        if angle: print "Angle:", angle[0]

同见

Angle2

Distance