[BlenderBIM] weird geometry results with simple geometry on import

edited June 25 in General

I have made a very simple wall, with extrude tool and exported it to IFC


Then I re-started Blender and imported the IFC

I don't get why the IFC Viewer shows it "correctly" and on import blenderBIM makes surfaces I don't want.

What can I do to prevent this?

Comments

  • Attached the IFC file in quesiton

  • It looks like the mesh handler is confused by some of the faces there. Are the vertices of the two wall ends in the lower left corner welded ?

    Coen
  • @Gorgious said:
    It looks like the mesh handler is confused by some of the faces there. Are the vertices of the two wall ends in the lower left corner welded ?

    That's a very good point,
    I made the wall by extruding verts to get edges. I never realised I have two overlapping vertices. Maybe that's what causing it?

    How can I make this into one vert?

  • Hi @Coen try selecting the verts and use merge by distance

    Coen

  • How to prevent triangulation on import? Is it possible?

    paullee
  • Select the overlapping vert and press "V" (or Vertex > Rip vertices) to rip it.

    I don't know if you can force quads on import since they're a feature that's not that common in mesh representations but you can force two triangles back into a quad with Faces > Tris to Quads and play with the settings. It might not solve all triangulated quads though.

    Coen
  • @Gorgious

    Faces > Tris to Quads and play with the settings. It might not solve all triangulated quads though.

    I tried this with a very simple IfcWall, when I want to export it to IFC again I get this error:

    location: <unknown location>:-1
    Error: Python: Traceback (most recent call last):
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 733, in invoke
        return self.execute(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 741, in execute
        return IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\ifc.py", line 369, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 768, in _execute
        ifc_exporter.export()
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\export_ifc.py", line 49, in export
        self.sync_all_objects()
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\export_ifc.py", line 111, in sync_all_objects
        tool.Collector.sync(obj)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\tool\collector.py", line 45, in sync
        object_collection = cls._get_collection(element, obj)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\tool\collector.py", line 184, in _get_collection
        collection = bpy.data.collections.get(container_obj.name)
    AttributeError: 'NoneType' object has no attribute 'name'
    

  • Added the simple IFC file

  • I don't understand, I checked the first example, and was able to create that mesh in IFC without issues. Similarly with the last example. What is the issue? How can I recreate it? Can you share a .blend that I can recreate the export issue in?

  • @Moult
    I managed to create the error, I am on BlenderBIM version 0.0.220516
    This is the .blend file with the mesh created for the IfcWall

    IfcExport worked, nothings strange

    Closed Blender completely, and imported the IFC file

    The mesh is now triangulated, I wanted to get rid of the triangulation so I used tris to quads

    Going into object mode, to export it. Used no other function. Again the same error

    location: <unknown location>:-1
    Error: Python: Traceback (most recent call last):
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 733, in invoke
        return self.execute(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 741, in execute
        return IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\ifc.py", line 369, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\module\project\operator.py", line 768, in _execute
        ifc_exporter.export()
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\export_ifc.py", line 49, in export
        self.sync_all_objects()
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\bim\export_ifc.py", line 111, in sync_all_objects
        tool.Collector.sync(obj)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\tool\collector.py", line 45, in sync
        object_collection = cls._get_collection(element, obj)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderbim\tool\collector.py", line 184, in _get_collection
        collection = bpy.data.collections.get(container_obj.name)
    AttributeError: 'NoneType' object has no attribute 'name'
    
    

    I wanted to attach the .blend file but the file format is not allowed.

  • @Coen can you jump into the OSArch chat for a screenshare? I still cannot recreate it.

    Firstly, you shouldn't see a triangulated mesh. It should be auto cleaned. Secondly, if I import your IFC, use tris to quads (which for me does nothing since it's already quads), then press save project, I don't get your error.

  • Thanks for the help in the chat, will let you know when the error appears/or not appear...

  • edited June 9

    Found the bug and fixed :) https://github.com/IfcOpenShell/IfcOpenShell/commit/b5e27e4cedf2461b6f5580493f701e2205158a45

    However, are you able to replicate the first bug at the beginning of this topic? Perhaps a Blend file with the original geometry that when saved into IFC creates that weird geometric artifact?

    I have now enabled sharing of .blend files on this forum.

    GorgiousCoen
  • @Moult

    However, are you able to replicate the first bug at the beginning of this topic? Perhaps a Blend file with the original geometry that when saved into IFC creates that weird geometric artifact?

    Yes, I managed to reproduce it.

  • Hmm, none of those files get me the result you showed in your first post. How do you recreate it?

Sign In or Register to comment.