FreeCAD Workbench as Python-module

This commit is contained in:
Igor Brylyov 2024-04-19 09:57:35 +00:00
parent 362e0f7a6f
commit 946e83fd15
118 changed files with 1282 additions and 322 deletions

View file

@ -0,0 +1,18 @@
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