Please add to the Python wishlist

Hi Dan,

this might be one way to distinguish between closed cylinders and fillets (which are cylindric but not closed):

import rhinoscriptsyntax as rs

def SubSelectCylinder():
    obj_ref = rs.GetObject(message="Sel", filter=8, preselect=False, subobjects=True)
    if obj_ref:
        subsrf=obj_ref.Surface()
        if subsrf:
            # check if part of cylinder
            res, cyl = subsrf.TryGetCylinder()
            if res:
                # check if cylinder is closed in u or v direction
                if subsrf.IsClosed(0) or subsrf.IsClosed(1):
                    circle = cyl.CircleAt(0.0)
                    print "Closed cylinder properties:"
                    print "axis vector:", cyl.Axis
                    print "center:", cyl.Center
                    print "height:", cyl.TotalHeight
                    print "diameter:", circle.Diameter
                else:
                    print "this cylinder is not closed"
            else:
                print "sorry, i am not a cylinder"

if __name__=="__main__":
    SubSelectCylinder()

greetings,
c.