mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Move has_occ() function to __init__
This commit is contained in:
committed by
Thomas Krijnen
parent
f84982f99a
commit
1426c7066b
@@ -21,5 +21,25 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from . import occ_utils as utils
|
||||
def _has_occ():
|
||||
try:
|
||||
import OCC.Core.BRepTools
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import OCC.BRepTools
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
return False
|
||||
|
||||
|
||||
has_occ = _has_occ()
|
||||
|
||||
if has_occ:
|
||||
from . import occ_utils as utils
|
||||
|
||||
from .main import *
|
||||
|
||||
@@ -28,24 +28,7 @@ from .. import ifcopenshell_wrapper
|
||||
from ..file import file
|
||||
from ..entity_instance import entity_instance
|
||||
|
||||
|
||||
def has_occ():
|
||||
try:
|
||||
import OCC.Core.BRepTools
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import OCC.BRepTools
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
return False
|
||||
|
||||
|
||||
has_occ = has_occ()
|
||||
from . import has_occ
|
||||
|
||||
|
||||
def wrap_shape_creation(settings, shape):
|
||||
|
||||
Reference in New Issue
Block a user