Get Brep object

I’m stepping through all objects in the model to find a specific object named, ‘HULL’. Once I’ve found it, I need the Brep it represents, but I just can’t seem to get from the object to its geomerty.

            var rh_objects = doc.Objects.FindByFilter(settings);
            
            if (null == rh_objects || 0 == rh_objects.Length)
            {
                return Result.Failure;
            }

            foreach (var obj in rh_objects)
            {
                if (null != obj.Attributes.Name)
                {
                    if (obj.Attributes.Name.ToUpper() == "HULL")
                    {
                        strId = obj.Id;
                        var brep = obj.???;
                        break;
                    }//if (obj.Attributes.Name.ToUpper() == "HULL")
                }//if (null != obj.Attributes.Name)
            }//foreach (var obj in rh_objects)

obj.Geometry ?

not tested but something similar to …

     //var brep = obj.???;
     Brep myBrep = obj.Geometry as Brep;
     if (myBrep == null)
     {
         return Result.Failure;
     }
     else
     {
         // do something with myBrep
     }

Thx. That did it.