Bonsai | Cant Open and Read the IFC file :(

Hi all,
When I open the IFC File, no geometry is read, the error msg is

os: Windows
os_version: 10.0.19044
python_version: 3.11.7
architecture: ('64bit', 'WindowsPE')
machine: AMD64
processor: Intel64 Family 6 Model 165 Stepping 3, GenuineIntel
blender_version: 4.2.5 LTS
bonsai_version: 0.8.3-alpha250613
bonsai_commit_hash: 9b8357c
bonsai_commit_date: 2025-06-13T19:33:30+05:00
last_actions: 
last_error: Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 1004, in finish_loading_project
    bpy.ops.bim.load_project_elements()
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 1093, in execute
    ifc_importer.execute()
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 267, in execute
    self.parse_native_elements()
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 399, in parse_native_elements
    if self.is_native(element):
       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 433, in is_native
    rep_matrix = ifcopenshell.util.placement.get_mappeditem_transformation(rep.Items[0])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\ifcopenshell\util\placement.py", line 190, in get_mappeditem_transformation
    m4 = get_axis2placement(item.MappingSource.MappingOrigin)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'MappingOrigin'
Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109


ifc: Sreekesh.ifc
schema: IFC4X3
preprocessor_version: IfcOpenShell 0.8.3-alpha250613
originating_system: Bonsai 0.8.3-alpha250613-9b8357c

The github repository
https://github.com/Arunarchitect/SreekeshIFC

Tagged:

Comments

  • @arunarchitect

    I loaded it without geometries to check its spatial decomposition and looks like there are some errors
    a site in a storey or a road (name = Site) in a storey is not an accepted decomposition I think
    it might be the cause probably

    zoomer
  • @steverugi said:
    I loaded it without geometries to check its spatial decomposition and looks like there are some errors

    How did you load it without geometry?

    a site in a storey or a road (name = Site) in a storey is not an accepted decomposition I think

    How to correct this?

  • @arunarchitect said:

    How did you load it without geometry?

    uncheck "Load Geometry" when this panel pops up

    a site in a storey or a road (name = Site) in a storey is not an accepted decomposition I think

    How to correct this?

    need to study it.. ;)

    arunarchitect
  • @steverugi said:
    need to study it.. ;)

    The file somehow opens in BIMVision. Also the previous commit of branch 'final' is also openable in Bonsai. Confused how to correct the file, Now I am planning to redo the works starting from the previous commit.

  • I don't know if it may help, I split the model into storey with the Quality and Coordination > Patch SplitByBuildingStorey and it returned the following separate models:

    only the first "0-GF.ifc" returned an error on opening it

    arunarchitect
  • edited June 27

    @steverugi said:
    need to study it.. ;)

    I did the checkout to previous commit and opened it , in that I corrected the Site spatial structure like this,


    I deleted the aggregate decorator after selecrting the site geometry, (dont know the concept), and then the Site detached from the GF when I reopened the file after saving.

  • @arunarchitect said:
    -----apart from that , somehow corrected the file

    Learned a lesson to git commit after smaller intervals to avoid more data corruption. Thanks @steverugi

    steverugi
  • i would also recommend constantly syncing files, via dropbox, or similar.

    steverugiarunarchitect
Sign In or Register to comment.