IsSphere

判断曲面是否为球体的一部分。

语法

rhinoscriptsyntax.IsSphere (surface_id)

rhinoscript.surface.IsSphere (surface_id)

参数

surface_id

必须参数。字符串或 Guid。曲面物件的 ID 。

返回值

布尔值

如果执行成功,返回 True,如果执行不成功返回 False。

示例

import rhinoscriptsyntax as rs

surface = rs.GetObject("Select a surface", rs.filter.surface)

if surface:

    if rs.IsSphere(surface):

        print "The surface is a portion of a sphere."

    else:

        print "The surface is not a portion of a sphere."

同见

IsCone

IsCylinder

IsSurface

IsTorus