OSArch Community

BlenderBIM imported geometry wrong

  1. B
  2. M

    @bernd the BlenderBIM Add-on is correct, I believe. The IFC file has duplicate GlobalIds - clearly other IFC viewers (including the web based IfcConvert) are lenient. Perhaps a bug in FreeCAD?

    This will fix it:

    
    >>> f = ifcopenshell.open('/home/dion/drive/bim/DhFundament.ifc')
    
    >>> for e in f.by_type('IfcElement'):
    
    ...     e.GlobalId = ifcopenshell.guid.new()
    
    >>> f.write('/home/dion/drive/bim/DhFundament2.ifc')
    

  3. C

    @moult, @bernd

    Thx for investigations.

  4. D

    I think it would be great if BlenderBIM Add-on also can be lenient, and offer a report of errors and warnings.

  5. M

    @duncan for some things, the BlenderBIM Add-on is lenient - the validate tool will also produce a report of errors and warnings. This is not one of those cases, unfortunately. When building an authoring tool - the GlobalId is an indicator of whether or not an element already exists - needed for the ability to "refresh / reload" an existing model. This is not required in a pure viewer, which can just re-display with minimal computing expense. This is why it is strict here.

  6. B
  7. B

    BTW: it is good to have some software which is very strict with ifc standard. We would not have found this bug. Well done BlenderBIM :-)

  8. B

    @Moult

    How do you solve this in Blender? A object should keep his uuid over his livetime, no matter how often a project is saved to Blender format, even under a different file name. But if a object is copied, no matter which tools of Blender is used to copy the uuid should be reseted and a new should be used.

    That is exactly the problem in FreeCAD. ATM the id is saved just in a dict. If an object is copied the id is duplicated. It is impossible to attrac this in the copy method as there are dozens of possibilities to copy a object in FreeCAD. I opened a topic about this but it is not solved yet: https://forum.freecadweb.org/viewtopic.php?f=10&t=49818

  9. M

    @bernd in Blender, there are two ways to solve it. The first is to have a callback watching the depgraph - whenever an object is copied, it can automatically reset just that attribute. The second way is to leave the attribute as a duplicate, and wait for the user to manually resolve it, or resolve it at export time and force a new GlobalId at export time when it detects a duplicate GlobalId.

    I use the second approach.

  10. B

    @Moult said:

    leave the attribute as a duplicate, and wait for the user to manually resolve it, or resolve it at export time and force a new GlobalId at export time when it detects a duplicate GlobalId.

    If you find a duplicate GlobalId on export? How do you know which one is the original and which is the copy?

  11. M

    @bernd the copy is later in the list of objects.

  12. B

    :-)

    exactly this was my first idea for FreeCAD too ... But I am not 100 % happy with it because it might be not failsafe in all cases.

    I might go for this for a first fast solution.

Login or Register to reply.