mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix USE_PYTHON_OPENCASCADE setting #4832
This commit is contained in:
@@ -57,13 +57,15 @@ if has_occ:
|
|||||||
class missing_setting:
|
class missing_setting:
|
||||||
def __repr__(self): return '-'
|
def __repr__(self): return '-'
|
||||||
|
|
||||||
class settings_mixin:
|
class settings_mixin:
|
||||||
"""
|
"""
|
||||||
Pythonic interface mixin to the settings modules and
|
Pythonic interface mixin to the settings modules and
|
||||||
to provide an additional setting to enable pythonOCC
|
to provide an additional setting to enable pythonOCC
|
||||||
when available
|
when available
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
USE_PYTHON_OPENCASCADE = 'USE_PYTHON_OPENCASCADE'
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super(settings_mixin, self).__init__()
|
super(settings_mixin, self).__init__()
|
||||||
for k, v in kwargs.items():
|
for k, v in kwargs.items():
|
||||||
@@ -95,7 +97,7 @@ class settings_mixin:
|
|||||||
"""
|
"""
|
||||||
if k == "USE_PYTHON_OPENCASCADE":
|
if k == "USE_PYTHON_OPENCASCADE":
|
||||||
if not has_occ:
|
if not has_occ:
|
||||||
raise ArgumentError("Python OpenCASCADE is not installed")
|
raise AttributeError("Python OpenCASCADE is not installed")
|
||||||
if v:
|
if v:
|
||||||
self.set_("iterator-output", ifcopenshell_wrapper.SERIALIZED)
|
self.set_("iterator-output", ifcopenshell_wrapper.SERIALIZED)
|
||||||
self.set_("use-world-coords", True)
|
self.set_("use-world-coords", True)
|
||||||
|
|||||||
Reference in New Issue
Block a user