FreeCAD Workbench as Python-module
This commit is contained in:
parent
362e0f7a6f
commit
946e83fd15
118 changed files with 1282 additions and 322 deletions
18
freecad_workbench/freecad/robossembler/helper/is_solid.py
Normal file
18
freecad_workbench/freecad/robossembler/helper/is_solid.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue