[BlenderBIM] weird geometry results with simple geometry on import

edited June 2022 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 2022

    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?

  • I don't understand what is going on, I have download the lates stable version of BlenderBIM for Blender 3.3.3

    Started using the BIM tool again to create IfcWallTypes,

    When I go into edit mode, I see they are tris again, and not quads. Didn't see this with the previous version I was using.
    I probaly did something which caused this.

    Another question:
    What's a fast way of modeling IfcWallTypes, I go into
    Edit Mode > Select Vertice -> Shif +s -> Cursor to Selected -> Object Mode -> Set Origin -> Set Origin to 3D Cursor -> Shift + A.
    These are a lot of cliks to get the wall where I want, is there no option to create a macro+keyboard shorcut for this in Blender?
    Or how do you do it?

  • Hey Coen from my tinkering, whether it is tris or quads depends on each time it is loaded to blender, I've had the same wall be unedited but change how it is in several ways over multiple days of reloading the same file.
    you can clean up the wireframe with 'x' -> 'limited dissolve' (while in edit mode) or the clean wireframes button in the Blenderbim tab

    As for adding walls and adjusting them
    I don't really go into edit mode?
    I use snaps to place the cursor, shift-A to add, Shift-E to extend.
    if it's rough dimension then I use the grid background as a guide (1x1m squares), if I need exact I'll type in the amount in the wall length or height, recently added and super useful.

    Here's a little video attached, just remove the .txt

    NigelCoen
  • @Ace
    Hi, thank you for your post, I had no idea how to add walls like that.
    I preface my question with an admission, I'm OK with asking dumb questions:)
    How do I get this display? outlined in red below

  • edited October 2022

    it's Tool Settings, I just found it
    but I cannot display Height and length as seen above?
    I am using 3.3.0 on windows 10 with BBim 0.0.220516

  • Hey @Nigel, I'm not sure when the feature was added but it's pretty recent, update to the latest BlenderBim here:
    https://github.com/IfcOpenShell/IfcOpenShell/releases
    And it should be there

    Nigel
  • @Nigel also too, you have to select an object that has an ifctype associated with it... that is an ifcwall, for example, that is tied to an ifcwalltype. Then that menu will show up.

  • ... upon looking at it closer, it looks like the file only needs to have an ifctype in it, for the menu to show up.

    NigelAce
  • @Ace

    Thank you very much for the explanation. How do I get the desired side of the IfcWallType instance when adding a new wall instance ?

    I used the flip function, but it only adjust the origin point.

  • Hey @Coen I for sure thought the flip tool would work,
    When I use it it flips the wall along the axis in addition to changing the origin, is the behaviour different for you?
    small vid of it working attached

    Coen
  • @Ace

    Thanks, you're using the latest BlenderBIM version I see, I am using the stable version. That's probably it.

    Ace
Sign In or Register to comment.