BB: upgrade/downgrade between IFC4 or IFC2x3

Is there a relatively easy way to upgrade/downgrade between IFC4 or IFC2x3, with BB?

Comments

  • I just did an attempt with your model from the other thread.
    Openened two sessions of BlenderBIM,

    • Imported the IFC4 in one session
    • Started a New IFC2x3 project in the other BlenderBIM sessions
    • Copied all the meshes to the IFC2x3 project.
    • Tried to re-assign all the meshes/IFC elements
      Got this error:
    AttributeError: entity instance of type 'IFC2X3.IfcPolyLoop' has no attribute 'Name'
    

    Now it's beyond my knowledge. I'm tempted to say it's not possible.

  • Tried to ignore all the error warnings and kept on going, by when I wanted to export the IFC2x3. I got this warning
    AttributeError: entity instance of type 'IFC2X3.IfcFaceOuterBound' has no attribute 'ContextOfItems'

  • edited February 2022

    I succeeded half, but it an extremely hacky way and probably lost all the data attached to the IFC elements.

  • edited February 2022

    I think there is an IfcPatch recipe just for this, I can't show a screenshot right now though.
    This is the code for the patch (I think), for information :
    https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcpatch/ifcpatch/recipes/Migrate.py
    First argument should be the schema name.

    CoenAcetheoryshaw
  • Hope it helps

    BedsonCoenAce
  • Yeah so the Migrate IFC patch does a pretty swell job at upgrading IFC2X3 to IFC4 (specify ["IFC4"] as an argument). However, although in theory it can downgrade, it would likely fail on a real project (it'll work for small subsets of data, though). This is because I never wrote the code to handle downgrading certain IFC4 geometry types since I never needed it and it was more urgent to upgrade than downgrade.

    But let me know if you need downgrading and I can find a bit of time to implement it. It's pretty straightforward, just another item in the endless todo list.

  • What's pretty awesome too is that in the latest BlenderBIM Add-on builds since this is such a common thing, there is now a one-button upgrade whilst you're loading files:

    NigeltheoryshawAcevpajicGorgiousCoenBimlooserMeetlatDarth_Blender
  • the argument for downgrading is then 'IFC2X3' ?

Sign In or Register to comment.