29 lines
924 B
Python
29 lines
924 B
Python
# coding: utf-8
|
|
# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@yandex.com>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
'''
|
|
DESCRIPTION.
|
|
Simple FreeCAD's object test for manifold mawater-tight surface.
|
|
'''
|
|
__version__ = '0.2'
|
|
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
|
|
|
|
return obj.Shape.isClosed()
|