Bonsai | Copy and Paste IFC data/geometry from one IFC file to another IFC file

edited December 2024 in General

What is the right method to copy and paste the building geometry from one file to another?

Simply copy pasting doesnt include the BIM data along with the geometry.

Comments

  • edited December 2024

    My use case involves two people collaborating. Person A branches the design and makes some design interventions, while Person B explores a different direction. Later, Person A finds some of Person B's design elements appealing and wants to copy and paste them into the project file while preserving the object's IFC data (including size, material, location, etc.). What is the best workflow available for this scenario? please advise @theoryshaw @brunopostle @bruno_perdigao @dionmoult

  • Is it a large or small project?

    arunarchitect
  • @theoryshaw said:
    Is it a large or small project?

    Small project , total built-up area of 3500 square feet.

  • Thank you @JanF , I am actually using git , but if I only want to copy some of the design elements from a branch, for eg . A wall , door and a furniture and paste it exactly same location on another branch with all its IFC properties , how can it be done? Please correct me if I am wrong.

  • Did you see the first link? Basically you link your second file l, select your elements and append.

    arunarchitect
  • Given that it isn't possible to cherry pick when merging git branches, it would be very useful to be able to copy-paste elements and their metadata from one file to another.

    steverugitheoryshawarunarchitect
  • edited December 2024

    With the linking method, it would be nice if you could pick multiple objects at a time to 'append'. Or being able to append aggregates, which would then pull in all their parts.
    ...
    The link method might be sufficient enough, but I would probably explore using the GIT method.
    If there's (2) people working on (1) option each, I would just copy all the objects in the scene over like 100meters, and each person can work in their area.
    If each person just sticks to their area, there shouldn't be any conflicts when merging with GIT. This assumes, however...

    • that no one is touching things like spatial elements--IfcBuildingStorey, IfcSite, etc.
    • that you're not changing 'type' definitions. This is probably the hard one to accommodate--because this happens a lot during design. Maybe have a rule that if you want to change the type, you have to create a new type.
    • Same would apply for IfcMaterial definitions, as well.

    Upon the merge, the elements of one design can be copied over 100m to the other, or vice versa.

    ...

    It's worth noting that the 'linked method' will choke, too, if someone changes a type definition, or material definition. It would be nice to develop functionality whereby a type or ifcmateral definition would increment (or automatically duplicate) if there was a conflict during an 'append'.

    steverugiOwura_quarunarchitect
  • edited December 2024

    @JanF said:
    Did you see the first link? Basically you link your second file l, select your elements and append.

    Got it ! thank you @JanF

  • @theoryshaw said:
    With the linking method, it would be nice if you could pick multiple objects at a time to 'append'. Or being able to append aggregates, which would then pull in all their parts.
    ...
    The link method might be sufficient enough, but I would probably explore using the GIT method.
    If there's (2) people working on (1) option each, I would just copy all the objects in the scene over like 100meters, and each person can work in their area.
    If each person just sticks to their area, there shouldn't be any conflicts when merging with GIT. This assumes, however...

    • that no one is touching things like spatial elements--IfcBuildingStorey, IfcSite, etc.
    • that you're not changing 'type' definitions. This is probably the hard one to accommodate--because this happens a lot during design. Maybe have a rule that if you want to change the type, you have to create a new type.
    • Same would apply for IfcMaterial definitions, as well.

    Upon the merge, the elements of one design can be copied over 100m to the other, or vice versa.

    ...

    It's worth noting that the 'linked method' will choke, too, if someone changes a type definition, or material definition. It would be nice to develop functionality whereby a type or ifcmateral definition would increment (or automatically duplicate) if there was a conflict during an 'append'.

    I tried linking and appending the object and it works fine, but is there a way we can select more than one objects to append? Now I can only select and append one at a time .

  • Aah yes @theoryshaw , but there is another option called append elements by query, I randomly typed IfcWall and it worked, and how can we explore this to select and append the elements we need, Any idea about providing the queries.

    theoryshawsteverugiRoel
  • Oh, very cool. Thanks for sharing.

    arunarchitect
  • Any idea about providing the queries.

    would imagine, it would follow this syntax:
    https://docs.ifcopenshell.org/ifcopenshell-python/selector_syntax.html

    arunarchitect
  • @arunarchitect

    Aah yes @theoryshaw , but there is another option called append elements by query, I randomly typed IfcWall and it worked, and how can we explore this to select and append the elements we need, Any idea about providing the queries.

    nice one!

    you can use the same query you would in Grouping and Filtering, click on the funnel icon next to "Add Search Group" to see its syntax

    selector page suggested by @theoryshaw is very useful but if you like have a look at the shared folder

    where you can find an Excel table I prepared with some examples on how to query elements to be exported in Spreadsheet Import/Export
    there are also ready made .json files that can be imported directly in the same panel as shown here

    cheers

    arunarchitect
  • unfortunately, having just experimented, it doesn't look like things like location="My Building" or parent="My Aggregate" seem to work with bim.append_library_element_by_query()... which would be awesome, if it did.

    arunarchitect
  • edited December 2024

    @theoryshaw

    unfortunately, having just experimented, it doesn't look like things like location="My Building" or parent="My Aggregate" seem to work with bim.append_library_element_by_query()... which would be awesome, if it did.

    I tested it on mine and it worked fine with a simple query like IfcWall, location="1F", type="WAL-200"

    also IfcCovering, location="GF-SFL", parent="PB-04" returned the expected result
    the only thing is that elements are parked in a "Unsorted" container turned off, so you need to look for them in the Outliner I'd guess

    arunarchitect
  • Is the option to append elements either from a linked file or a custom project library as shown in https://community.osarch.org/discussion/2021/copy-and-paste-from-one-ifcproject-to-the-other#Comment_19730 still available latest Bonsai builds?
    I am running in Linux latest version (blender 4.3.2 Bonsai v0.8.1-alpha250124-35d20e6) but it looks that there are no "append" buttons, and the linked files behave monolithic, without possibility to select individual elements.

    Thanks!

  • @Andrej730 How de you append objects from linked files/libraries in current versions of Bonsai?
    Thanks!

  • I might be speaking non sense, nevertheless for copying objects from one IFC to the other I would just delete all elements that I don't want to copy and then use IFCPatch to merge the files. To me sounds a task that would take the same time than other solutions.

    Roel
  • @camontellano Yes, I think that is a good option when the files are rather different. If they are similar and you have ifcsites, ifbuildings, ifbuildingstoreys and similar equal in both, the merging will get you quite a bit of duplications unless you delete quite a lot.
    I believe that the append option talked about at the begining of this discussion would be a very good way. I just do not know how to do it in current versions of Bonsai.
    Do you guys have append in your Bonsai versions? Maybe my setup has something broken?

  • @vdl said:
    @Andrej730 How de you append objects from linked files/libraries in current versions of Bonsai?
    Thanks!

    There is an issue #6044 already posted by @theoryshaw

    otherwise once the linked model is loaded you can use the "arrow-to-cube" Explore Tool from the left menu (T) and select an element with it using the right button of your mouse (RMB) to visualize its info on the panel and append the element using the paper clip icon

  • vdlvdl
    edited January 26

    @steverugi Thanks so much! I missed the right button of the mouse (RMB)! while in "Explore Tool"
    However when I try that, at the moment of clicking the paper clip icon blender crashes altogether. I guess is the same issue #6044 already posted by @theoryshaw
    What version of Blender/Bonsai do you have this working?
    Thanks!
    "

  • @vdl
    An issue #6044 was posted to fix the problem, maybe coming future release

  • @steverugi said:
    @vdl
    An issue #6044 was posted to fix the problem, maybe coming future release

    Perfect. Thanks!

  • @vdl
    it should be fixed in the latest release

  • @steverugi Indeed.
    (Linux Blender 4.3.2 Bonsai v0.8.1 - alpha250129 - 871710a)
    It works like a charm!

Sign In or Register to comment.