判断一个物件是否为曲面。只有一个面的 Brep 物件同样被认为是曲面。
rhinoscriptsyntax.IsSurface (objectId)
rhinoscript.surface.IsSurface (objectId)
objectId |
必须参数。Guid。物件的 ID 。 |
布尔值 |
如果执行成功,返回 True,如果执行不成功返回 False。 |
import rhinoscriptsyntax as rs
objectId = rs.GetObject("Select a surface")
if rs.IsSurface(objectId):
print "The object is a surface."
else:
print "The object is not a surface."