Can't import IFC in Blender
I have been trying to model a traditional hay barrack in Blender and exported the IFC with BlenderBIM.
I never saved the .blend file because I want the IFC to be the single source of truth.
Import and exporting worked perfectly all the time, with deleting, moving, rotating object and using modifiers in Blender.
This is the IFC result so far.
Now I wanted to import the IFC in Blender again and I am completely clueless about the error.
It says instance #74 is not found, so I went to take a look in the IFC file with a text editor.
#52=IFCAXIS2PLACEMENT3D(#49,#50,#51);
#53=IFCLOCALPLACEMENT(#47,#52);
#54=IFCFOOTING('0_wNcyxBTDYveCIR9WfDF2',$,'kolomvoet_350x350mm',$,$,#284,#72,$,.PILE_CAP.);
#72=IFCPRODUCTDEFINITIONSHAPE($,$,(#293,#296));
#73=IFCRELCONTAINEDINSPATIALSTRUCTURE('0gtnMjx_r5dvs_KZEnqMyF',$,$,$,(#54,#18388,#403,#4878,#13778,#9328,#428,#18401,#18448,#18568,#18603,#18628,#23083,#27538,#31993,#36448,#36526,#36561,#36586,#41041,#45496,#49951,#54406,#54489,#54524,#54549,#59004,#63459,#67914,#72369,#72447,#72490,#72538,#72569,#72830,#72934,#73386,#73542,#73576,#75062,#74985,#75093,#75135,#75136,#73843,#74220,#74659,#74688,#75106),#30);
#79=IFCGRID('19d2Q$ilf29waioKA$NL7w',$,'Grid',$,$,#90,$,(#95,#99),(#107,#111),$,$);
#85=IFCRELCONTAINEDINSPATIALSTRUCTURE('1aJm8I1W1E0A4aIOGnf9UP',$,$,$,(#79),#18);
#86=IFCCARTESIANPOINT((0.,0.,0.));
#87=IFCDIRECTION((0.,0.,1.));
#88=IFCDIRECTION((1.,0.,0.));
#89=IFCAXIS2PLACEMENT3D(#86,#87,#88);
#90=IFCLOCALPLACEMENT(#41,#89);
#92=IFCCARTESIANPOINT((-2000.,0.,0.));
And indeed #74 is missing, I have no idea what should have been here, I also can't find #74 references anywhere else in the IFC file. Any idea on how to restore this error without having a .blend file?
Tagged:
Comments
I just manually added this:
Then moved the .ifc file to another folder, imported it in Blender and it worked.

Bug happened again and for some odd reason it works again when I move the IFC file and import it again.
IFC doesn't require all numbers to exist, if #74 is not referenced anywhere in the file then you shouldn't have to fill the gaps like this
Bug? BugReport?
A bug report with your file shared would be really appreciated :) Yes indeed there should be no need to fill in gaps. You say the error happens upon import, but the screenshot (though some is cropped) suggests that the error happens during geometry updating, which is not when importing. So perhaps that error occured when exporting, and there is a different error during importing? In any case, we have yet to narrow down the root cause of the problem.
I will see if I'm able to recreate the bug, then I will post it here. It seems to be appear when using the Boolean modifier extensively.
Can't export now, I think I now what caused it.
Here is the the IFC I imported:

The roof beams are under quite complex miter joins. It worked when I used the Boolean modifier one by one for each beam. And exported it each time to be safe. Then I became lazy. And thought I would try a quicker method.
In Blender I decided to do the following:
This is the result
Now when trying to assing an IFC class again I get the following output in the console
As show in the image above it made the first beam an IfcBeam, despite the console error. So I tried exporting it to IFC and I get the following error.
I think I made too many changes in the .blend file before exporting it to IFC. What would be a good solution?