IfcOpenShell / IfcOpenShell

Open source IFC library and geometry engine
GNU Lesser General Public License v3.0
1.88k stars 737 forks source link

v0.8.0 'Settings' object has no attribute 'DISABLE_TRIANGULATION' #4909

Open brunopostle opened 5 months ago

brunopostle commented 5 months ago

I see this error trying to create the SVG for a drawing in BlenderBIM. This is with both IfcOpenShell and BlenderBIM from 2024-06-19, so they are in sync:

Error: Python: Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 219, in invoke
    return self.execute(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/blender/4.0/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 272, in execute
    linework_svg = self.generate_linework(context)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/blender/4.0/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 539, in generate_linework
    self.setup_serialiser(target_view)
  File "/usr/share/blender/4.0/scripts/addons/blenderbim/bim/module/drawing/operator.py", line 877, in setup_serialiser
    self.svg_settings = ifcopenshell.geom.settings(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/ifcopenshell/geom/main.py", line 117, in __init__
    self.set(getattr(self, k), v)
             ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/ifcopenshell/geom/main.py", line 178, in __getattr__
    raise AttributeError("'Settings' object has no attribute '%s'" % k)
AttributeError: 'Settings' object has no attribute 'DISABLE_TRIANGULATION'
aothms commented 5 months ago

This is indeed one of the settings that got renamed in v0.8.

ITERATOR_OUTPUT=ifcopenshell.ifcopenshell_wrapper.NATIVE
brunopostle commented 5 months ago

There are still a few references to DISABLE_TRIANGULATION:

src/ifcgeom/IteratorSettings.h
src/serializers/HdfSerializer.cpp
src/ifcopenshell-python/ifcopenshell/draw.py
src/ifcopenshell-python/docs/ifcopenshell/geometry_settings.rst
src/blenderbim/blenderbim/bim/module/drawing/operator.py
Moult commented 4 months ago

Should be all clear on the Python side now. Just C++ and the docs to be updated.