Install BlenderIFC error question

edited May 2020 in General

new machine, new install..
How did one fix this message?

Comments

  • Unlike other export formats, you can't just press "File export IFC" and expect it to work - it requires an IFC project to be set up first. The easiest way to do this is to use the Quick Project Setup button, assign your object an IFC class, and then place it in the ground floor building storey.

    engfernando
  • ... but clearly since users expect otherwise, I've just added a new feature where a project will be auto set-up for you if you don't have one at export-time. That'll prevent this problem in the future and will be in the next release: https://github.com/IfcOpenShell/IfcOpenShell/commit/ec8a07ec6a75015187b47e0c477685eb94c59a36

    basweinmagicalcloud_75bitacovir
  • @moult Following the very clear instructions here https://blenderbim.org/blenderbim-tutorial.html
    I was able to get a very comfortable looking cube chair to export.
    But when I tried exporting the file that @magicalcloud_75 shared earlier today although it looks like he has a set up I get this error (I think it is the same one at the beginning of this thread)

    Using those same steps as the cube I also get this error.


    If I then delete his original structure It exports fine.
    Obviously I don't need you to solve anything here I am just new to IFC and am trying to understand how it all works. Plus it is is probably good for you to see all the stupid ways that people can break things.

  • For some reason, as you see in that screenshot, you have two IfcProjects, one of which has no objects. This is an invalid IFC structure and so results in an error. Just delete the blank IfcProject and it should work.

  • Thank you @Moult that is great to have a auto assignment embedded. For some people IFC still is good way to transfer geometry and parts of structures. I know there is some initiative called IFC [partfile transfer] might be interesting for you to look at fron a Blender view. I will look this up for you. Its a dutch initiative.

  • edited May 2020

    Here it is. This can be part of a workflow. I will point out Mathijs.
    https://technical.buildingsmart.org/idea/user-request-for-bcf-bimsnippet/
    The doubling in ifc project is probably on my side in the DWG format. Will check. I was never never aware of some adminstration ifcproject. Never used it. Probably never will :P

  • The doubling is my fault @magicalcloud_75. I added it when I followed the basic instructions that got the cube to export. When I first open your file the IFC project tree looks like this:

    But won't export.
    So I followed the instructions for setting up a project and that doubles the IFC tree. https://blenderbim.org/blenderbim-tutorial.html
    If I then drag the V object to the new IFC project tree and delete the original IFC project it works.

  • @Moult said:
    ... but clearly since users expect otherwise, I've just added a new feature where a project will be auto set-up for you if you don't have one at export-time. That'll prevent this problem in the future and will be in the next release: https://github.com/IfcOpenShell/IfcOpenShell/commit/ec8a07ec6a75015187b47e0c477685eb94c59a36

    like FreeCAD ;)

  • @bitacovir correct, FreeCAD does the same ;)
    @baswein I find it interesting when you first open his file you get that - I would expect a few more objects (e.g. IfcProject and IfcSite object), or perhaps you aren't running the latest BlenderBIM Add-on?

  • Hi all,
    Around this question, I am testing blender bim addon and get error importing IFC files. The model I use was generated with Freecad 0.18 and import was successful with addons versions 200413 and 200428 (windows). With versions 200511 and 200525 import fails and get this messages (I can attach the model if necessary but is around 3.3 MB size):

    For version version 200511

    bpy.context.space_data.recent_folders_active = 1
    Modules Installed (blenderbim) from 'C:\Users\usuario\Downloads\blender28-bim-200511-win.zip' into 'C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons'
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False, confirm=False)
    Deleted 3 object(s)
    Traceback (most recent call last):
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\operator.py", line 86, in execute ifc_importer.execute()
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 259, in execute self.create_products()
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 474, in create_products self.create_product(self.file.by_id(shape.guid), shape)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 527, in create_product self.add_product_representation_contexts(element, obj)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 641, in add_product_representation_contexts r.ContextOfItems.TargetView))
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 68, in getattr
    "entity instance of type '%s' has no attribute '%s'" % (self.wrapped_data.is_a(), name))
    AttributeError: entity instance of type 'IfcGeometricRepresentationContext' has no attribute 'TargetView'

    location: :-1

    For version 200525

    bpy.context.space_data.recent_folders_active = 1
    Modules Installed (blenderbim) from 'C:\Users\usuario\Downloads\blender28-bim-200525-win.zip' into 'C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons'
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False, confirm=False)
    Deleted 3 object(s)
    Traceback (most recent call last):
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\operator.py", line 88, in execute ifc_importer.execute()
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 245, in execute self.create_spatial_hierarchy()
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 952, in create_spatial_hierarchy self.add_related_objects(self.project['blender'], rel_aggregate.RelatedObjects)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 966, in add_related_objects obj = self.create_product(element)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 548, in create_product obj.matrix_world = self.get_element_matrix(element)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 1169, in get_element_matrix element_matrix = self.get_local_placement(element.ObjectPlacement)
    File "C:\Users\usuario\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\blenderbim\bim\import_ifc.py", line 1301, in get_local_placement
    if plc.PlacementRelTo is None:
    AttributeError: 'NoneType' object has no attribute 'PlacementRelTo'

    location: :-1

  • @avico The last error looks similar to this (https://community.osarch.org/discussion/71/the-seed#Comment_916) which was fixed. I guess with the new version of blenderbim you will be allright

  • @avico agree with @Jesusbill 's conclusion - there is ambiguity in the IFC spec, and BlenderBIM is playing catch-up with the FreeCAD flavour :)

    Jesusbill
  • There is a lot of ambiguity and "dialects".. i spent a lot of time to address specific revit things in freecad, for ex. I like a lot that blenderbim is resetting the game, somehow.. a more "barebone" vision of ifc. Not unlike what they did with sketchup in the short timespan when it supported ifc natively. And then you find that ifc can be much simpler than all the recent fuss. I think more than half the complexity of the arch/bim tools in freecad is to address special ifc cases, and more and more i want to scrap it all and redo it from scratch..

  • edited June 2020

    I just managed to meself sign up for the 2019 GEOBIM benchmark and downloaded the samples.
    Also i updated the file export_ifc.py Still, these messages appear with all three files. Different codelines seem involved @Moult .

    These files are still very intresting. However, it has be said that this data is not open / public data, which is a pity imo.
    Maybe we can ask them to do. 2019 seems so long ago and the work on this benchmark seems closed.
    Was there a 2020 GEOBIM benchmark edition? How many universities and professors we're involved :P ?
    Could be very intressting files the github inittaitives @yorik and for my own IFC for DWG quest.

    https://3d.bk.tudelft.nl/projects/geobim-benchmark/
    https://3d.bk.tudelft.nl/projects/geobim-benchmark/ws_slides/13_Task2_Harrie.pdf

  • @magicalcloud_75 can you send me the samples? I'd like to take a look. The errors are different to those earlier in this thread - the error says "unable to open file for reading". This can be because what you've downloaded actually is not an IFC file (indeed, that fact that all three are exactly 356kb looks like you've downloaded something else that calls itself an IFC), or if you've got it on a disk that you don't have permission to access.

  • Dooohh.. ! you are absolutely right. I imported some kind of dropbox link that was saved as .ifc
    I'll send you a link to the right content ! Still great models for testing :)

  • edited June 2020

    Direct import is working now i think :)
    For Blender dummies maybe add a
    1. 'is the really a .ifc file?' ** (for me @mould ;-)
    with a
    **2. 'how long is this gonna take to import? Are you sure?' checking mechanism
    if case user didn't save his work yet..

    ad. 2
    I'm testing the GEOBIM benchmark file 'uptown.ifc' and i think it is taken way too long to import.
    My computer is has agarage specs, it is not the fastest bimming machine available.
    Now the BuildingSmart allicance does not concider speed an aspect for certification but i think this is very wrong.
    Software should be able to read a 240 mB ifc in at least 3 minutes. I am making a video of this to share the pain of importing.
    It would be an advantage if open source software would be able to import complex ifc files faster than commercial ones. Game on!

    please check .

    https://forums.buildingsmart.org/t/processing-speed-ifc-imports/2622/8

    Any thoughts?

  • @magicalcloud_75 - yeah better error reporting is needed. At the moment, however, a full debug output is good for me as a developer, so user-friendly errors are a lower priority than developer-friendly errors.

    Speed matters. Completely agree. I requested access from my Google account dionmoult@gmail.com (try reshare to that email) and hopefully I can download the files and figure out some optimisations. But sometimes, the geometry in IFC makes it hard to optimise for speed. IFC SPFC is designed for rich data, not speed.

  • The 'one file is one building' (or discipline) concept using IFC not a solid workable method. You will notice reach the boundaries of the capabilities of IFC format very quick. As in this sample with the UP:TOWN project. You would expect that the reseachers came acrsoss this data stuggle. Good study material..

    https://3d.bk.tudelft.nl/projects/geobim-benchmark/presentations-publications.html

  • @Moult would it be appropriate to start adding plain language error messages for problems like trying to export invalid IFC files? "The IFC schema doesn't support multiple IFC project in one IFC file" for example.
    @magicalcloud_75 if you find relevant public data sets please add them to the list here: https://wiki.osarch.org/index.php?title=AEC_Open_Data_directory

  • @duncan definitely appropriate, but perhaps further down the track when it is a bit more stable.

Sign In or Register to comment.