判断曲面是否为圆环的一部分。
rhinoscriptsyntax.IsTorus (surface_id)
rhinoscript.surface.IsTorus (surface_id)
surface_id |
必须参数。字符串或 Guid。曲面物件的 ID 。 |
布尔值 |
如果执行成功,返回 True,如果执行不成功返回 False。 |
None |
出错返回空值。 |
import rhinoscriptsyntax as rs
surface = rs.GetObject("Select a surface", rs.filter.surface)
if surface:
if rs.IsTorus(surface):
print "The surface is a portion of a torus."
else:
print "The surface is not a portion of a torus."