IfcPatch, Assume Asset Uniqueness By Name

edited April 2025 in General

What is this checkbox for?
Assume Asset Uniqueness By Name

Comments

  • edited May 2025

    From my understanding profiles, materials and styles do not support global identifiers (GUID) like rooted elements do. GUID are used to identify elements uniquely throughout the life of a project, or when you merge different projects to avoid conflicts. So one of the ways to avoid duplicating these without a global identifier is to assume that if they share the same name, they are the same asset. But it's not always true, two projects can independently define a glass material with different properties but the same name, so you can choose if you want to keep both or merge them.

    Massimozoomerberndtlangsteverugi
  • edited June 2025

    thank you guys for the link to the code and for the great explanation ...

  • edited June 2025

    from python I use this to run ifcpatch ...

    import ifcopenshell
    import ifcpatch
    in_ifcfile = ifcopenshell.open("C:/Users/BHA/Desktop/ifcpatch_work/22149_ING_N_TRW_20250328y_bimtester.ifc")
    out_ifcfile = ifcpatch.execute({
        "input": in_ifcfile,
        "file": in_ifcfile,
        "recipe": "ExtractElements",
        "arguments": ["IfcSlab"],
    })
    ifcpatch.write(out_ifcfile, "C:/Users/BHA/Desktop/ifcpatch_work/BIMPatch/ZZ_Slabs.ifc")
    

    It seams the assume_asset_uniqueness_by_name is activated with the code above.

    On some models I get corupted geometry if it is activated. If I run ifcpatch from Blender Gui and deactivate the pref I get no corrupted geometry. If I activate it, I get corupted geometry or even a run break.

    I would like to help to debugg the problem ... How can I deactivate the setting in the python code above?

    cheers

  • edited June 2025

    It helped a lot today ... Add Falseto the arguments and assume_asset_uniqueness_by_name is deactivated :-)

    import ifcopenshell
    import ifcpatch
    in_ifcfile = ifcopenshell.open("C:/Users/BHA/Desktop/ifcpatch_work/22149_ING_N_TRW_20250328y_bimtester.ifc")
    out_ifcfile = ifcpatch.execute({
        "input": in_ifcfile,
        "file": in_ifcfile,
        "recipe": "ExtractElements",
        "arguments": ["IfcSlab", False],
    })
    ifcpatch.write(out_ifcfile, "C:/Users/BHA/Desktop/ifcpatch_work/BIMPatch/ZZ_Slabs.ifc")
    
Sign In or Register to comment.