判断一个物件是否为多重曲线。多重曲线用于表示一系列相互连接的曲线段。
rhinoscriptsyntax.IsPolyCurve (object_id, segment_index=-1)
rhinoscript.curve.IsPolyCurve (object_id, segment_index=-1)
object_id |
必须参数。字符串或 Guid。物件的 ID 。 |
segment_index |
可选参数。数字。如果 object_id 标示出一个多重曲线物件,那么 segment_index 标示要计算的是多重曲线的哪一段。 |
布尔值 |
如果执行成功,返回 True,如果执行不成功返回 False。 |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a polycurve")
if rs.IsPolyCurve(obj):
print "The object is a polycurve."
else:
print "The object is not a polycurve."