测量两个点之间的角度。
rhinoscriptsyntax.Angle (point1, point2, plane=True)
rhinoscript.utility.Angle (point1, point2, plane=True)
point1 |
必须参数。三个数字组成的列表或 Point3d 对象。第一个 3-D 点。 |
point2 |
必须参数。三个数字组成的列表或 Point3d 对象。第二个 3-D 点。 |
plane |
可选参数。布尔值或平面。如果为 True,基于世界坐标系统计算角度。如果为 False,基于活动的工作平面计算角度。如果传递一个平面,将使用这个平面计算角度。 |
元组 |
元组包含以下元素.
|
||||||||||
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]