[python] Is there a way to check if the polysurface is closed solid polysurface?

I assume it has to be Rhino.DocObjects.RhinoObject.Description
I tried ShortDescription but it only gives me surface or polysurface.

and I can’t figure out how to use Rhino.FileIO.TextLog()


import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

#obj = rs.GetObject(message=None, filter=rs.filter.polysurface, preselect=True, select=False, custom_filter=None, subobjects=False) 
objs = [obj for obj in rs.AllObjects()]# if rs.IsPolysurface(obj) and rs.ObjectName(obj) == "Delimited molded surface.1"

print len(objs)

for obj in objs:
    tlog = Rhino.FileIO.TextLog()
    print Rhino.DocObjects.BrepObject.Description(rs.coercerhinoobject(obj),tlog)

results in None for every object it finds.

Thanks in advance.

Never mind I found it


for what it’s worth, in Rhinocommon, it would be something like:

import Rhino
for x in someListofObjects:
    if x.GetType().Name == "Mesh": print x.IsClosed
    elif x.GetType().Name == "Brep": print x.IsSolid