import FreeCAD def is_object_solid(obj): """If obj is solid return True""" if not isinstance(obj, FreeCAD.DocumentObject): return False if not hasattr(obj, 'Shape'): return False if not hasattr(obj.Shape, 'Solids'): return False if len(obj.Shape.Solids) == 0: return False return True