Upgrade Ifc2x3 to IFC4

I am trying to upgrade IFC2x3 files to IFC4, but using IfcPatch to "migrate"/upgrade throws the following error for most of my .ifc files. I actually only need the geometry, but I do need IFC4 in order to visualize the scheduling. I dont need the migrated .ifc files afterwards either, so it doesnt matter to me if the files have errors in them as long as I can use the 4D/5D BlenderBIM functionality for visualization, at least as a first step.

Does anyone have any tips for getting IFC4 geometry from IFC2x3 files, or how to ignore all errors when using IfcPatch Migrate, or if I need to write a script to process the geometry only myself etc?

See the attached error message (if of interest):

Comments

  • This sounds like your IFC was invalid. What produced the IFC?

    Can you check the text of your IFC for a line with "IFCAPPLICATION" and paste it here? In particular, I'm looking for the ApplicationFullName which is mandatory, but seems to be missing.

  • Moult, I DM'd you one of the .ifc files. I have filled out ApplicationFullName in previous files, but the problem I encountered was that there are "always"/often another error. I can't (dont want to) manually correct eg. 50 errors, just to arrive at one I am unable to correct. I was hoping that since the IFC2x3 file imports into Blender, perhaps there was a way to ignore all errors when migrating to IFC4? I only need the geometry upgraded to IFC4...

  • Yeah, I checked and indeed it seems as though your file is invalid and contains many invalid issues, not just one. Usually, I don't like to support invalid files, but I'll make an exception in this case since it's a schema migration tool, and would be good to be more lenient. Fixed :) https://github.com/IfcOpenShell/IfcOpenShell/commit/db9af13843b672f4b5e848b766464bf1f5fce75b

    BIMrookie92
  • Thank you very much!🙌

  • edited September 2022

    I did a few more adjustments to schema.py, and I am kind of wondering if this is a bad or really bad idea:p If you have time @Moult, I appreciate your thoughts on the matter. I did this because some more files produces some more errors, like expecting a Python sequence etc.
    My changes are on the left marked with red, which is un-intuitive but I wasnt able to flip the files in VS Code (I'm kind of new to the 'diff' functionality...)


  • You shouldn't need to add "ApplicationFullName" to the list because it should auto skip that error as non-fatal. The try except is suspicious, I won't know if it's a good idea without seeing a test file. For the final one, I don't think we should default to building element proxy there, since the class could be anything and possibly not an object at all, instead a mapping should be used. If you send me a test file (dion@thinkmoult.com if private, better than hosting on the OSArch servers) then I can make a more informed comment.

Sign In or Register to comment.