OSArch Community

BlenderBIM: Arrays, IfcRelAggregates, IfcOpeningElements, IfcMaterials

  1. C

    I have the following use-case:

    1. Creating an IfcRelAggregate out of an IFC Array:

    I have used the IfcRelAggregate tool to make them into one IfcElementAssembly

    With the next Save Project four IfcBeams appeared, I've seen this in BIMVision

    Closing Blender and importing the IFC again, to get rid of the excessive IFC Beams, it worked:

     

    Is it possible there could be a checkbox button in which you could say the Array is by defintion already going to be an IfcRelAggregate? This will save me from trying to select the items I want in the Scene Collection or 3D view and it would be easier to create IfcElementAssemblies out of various IfcElementAssemblies.

     

    2. Adding an IfcOpening to an IfcElementAssembly:

    Now I have added an IfcOpeningElement to the IfcElementAssembly,

    as you can see it cuts nicely through the IfcSlabs and IfcBeam:

    IFC save worked perfect:

    This is not alway the case, sometimes it has troubles cutting through all the geometry. But I can't reproduce it...

     

    3. Question about materials:

    In the Demo library the IfcSlab and IfcBeam are made with an IfcProfile which have an Unknown material.

    If I remove this material and make new material called my_material. I have to assign the material to one instance of an IfcBeam under profile and it will update all the beamtype instances.

    With succesful IFC save.

    This is the correct worflow of swapping materials, or only for materials needed by profiles?

     

    4. How to use python to create an IfcElementAssembly?

    I have this code snippet

    
        def create_assembly(self, model, element_list):
    
            assembled_element = run("root.create_entity", model, ifc_class="IfcElementAssembly",name='my_collection')
    
            for i in element_list:
    
                run("aggregate.assign_object", model, product=assembled_element, relating_object=i)
    

    element_list looks like this:

    
    [#202=IfcCovering('3Qn21p1p5EL8y2qdjXrWg6',$,'insulation',$,$,#223,#213,$,$), #225=IfcCovering('0Z7y9GduPDkwEkOkhAzED6',$,'insulation',$,$,#246,#236,$,$), #248=IfcCovering('1A4n9VM5XD9fjZdtJ3lhFj',$,'insulation',$,$,#269,#259,$,$), #271=IfcCovering('1AIix1i916xBNV_TOWHCGx',$,'insulation',$,$,#292,#282,$,$), #294=IfcCovering('1N65f0cKf1cwFvuV8H7Tfk',$,'insulation',$,$,#315,#305,$,$), #346=IfcCovering('2eeTeOBmX7_eobur6$sl4W',$,'insulation',$,$,#367,#357,$,$), #38=IfcMember('1yqJ4GTn5AqeX2x3ju6l9F',$,'my_beam',$,$,#56,#57,$,$), #59=IfcMember('3ZKjHPpWb8V8WLMu1qE1uw',$,'my_beam',$,$,#76,#77,$,$), #79=IfcMember('0UH0M7Iiv6yvCU3PosVy7I',$,'my_beam',$,$,#96,#97,$,$), #99=IfcMember('2qt0xIrZPCm8CeqKBcgchd',$,'my_beam',$,$,#116,#117,$,$), #119=IfcMember('1dRfBa9zLAlu05ax4a_3Mv',$,'my_beam',$,$,#136,#137,$,$), #139=IfcMember('3pkeFk8zH7W9h0uHP9Pl2w',$,'my_beam',$,$,#156,#157,$,$), #159=IfcMember('1_LmUDkbHAAgr$DQ4Yv$D0',$,'my_beam',$,$,#176,#177,$,$), #179=IfcBeam('0j7rHy9OnBvAB9vMKrg2oj',$,'my_beam',$,$,#196,#197,$,$)]
    

    When I load the IFC in BlenderBIM I see on the last item of the list is added to the collection. Or the Collection takes the name from the last IfcElement in the list. Don't really understand why.

     

    5. Duplicating an IfcElementAssembly

    How to duplicate an IfcElementAssembly while it could also store the IFC array modfiers of the different element in the IfcElementAssembly?

     

    Attached is the IFC.

    All this functionality is very incredible by the way, it allows for such fast workflows.

  2. T

    Is it possible there could be a checkbox button in which you could say the Array is by defintion already going to be an IfcRelAggregate?

    I think this is a great idea. It seems arrays should automatically default to aggregates. Would think this would the use case majority of the times, anyway.

  3. B

    As far as I understand, it would be possible to define arrays to be aggregates (I will play with this later). But I was also thinking that would be nice to apply an array to an assembly. This would be harder because IfcElementAssembly are empty objects in blender, and modifiers can't be used in them. So I wouldn't know where to start.

    What I was able to create was an operator to duplicate assemblies, basically you have to select the empty that represents the IfcElementAssembly, and it duplicates all the related elements and create a new aggregation. The code is very simple, and I created it just as a test, but I think it works. It can be useful in some use cases (I saw this in another discussion, which I couldn't find). Thoughts?

  4. B

    @bruno_perdigao my thought was that when you duplicate like this, all the copies could be put in an IfcGroup with an epset that declares something like "all children of this group should be the same".

    This wouldn't stop the user editing one of them and making it different, but then there could be a new operator for "update all other items in this group to be the same as the selected item".

    This would allow an IFC project to contain things that are intended to be identical (eg. the entire aggregated contents of building storeys), and provide a mechanism for keeping them synchronised.

    (The update operator could initially be a crude 'delete everything and replace' function, but ultimately a refined Native IFC version would recurse through the children and only change things that are actually different)

  5. C

    I think a perfect use case for this would be a framed wall with several openings?

  6. B

    @coen you should be able to do this with existing functionality: Create your framing with typed studs, either by simply copying them or using the array modifier, put them in a 'wall' aggregate along with your boarding, cladding, skirting etc.. then add your openings to the wall aggregate object.

  7. C

    @brunopostle said:

    @coen you should be able to do this with existing functionality: Create your framing with typed studs, either by simply copying them or using the array modifier, put them in a 'wall' aggregate along with your boarding, cladding, skirting etc.. then add your openings to the wall aggregate object.

    This wouldn't stop the user editing one of them and making it different, but then there could be a new operator for "update all other items in this group to be the same as the selected item".

    This would allow an IFC project to contain things that are intended to be identical (eg. the entire aggregated contents of building storeys), and provide a mechanism for keeping them synchronised.

    I'm definitly going to try, since there is no IfcOpeningElementType? I wonder if this could be a workaround to 'type' IfcOpenings?

  8. B

    @Coen it might if it was implemented.

    Do you have a need for typed openings independent of fillings (windows & doors)? The current blenderbim shares the geometry for openings when they are filled by typed window/doors, I think.

  9. C

    The current blenderbim shares the geometry for openings when they are filled by typed window/doors, I think.

    I see, how does this work? Does it cut the blender geometry? or does it also work with an IfcOpeningElement? What if you want to swap an entire window for another?

  10. B

    @coen (I may be wrong and may be unwittingly spreading disinformation) if you add a window to a wall using a window type, an opening is generated, either from the bounding box of the window or by extruding the Profile representation if it has one. If you create another window of this type, the mapped geometry of the first opening is reused for the second opening.

    This new opening geometry is shared, if you edit one then they all change. This is what you are after, but blenderbim doesn't have a way to pull this trick without filling the opening with a window or door.

  11. B

    @bruno_perdigao my thought was that when you duplicate like this, all the copies could be put in an IfcGroup with an epset that declares something like "all children of this group should be the same".

    This wouldn't stop the user editing one of them and making it different, but then there could be a new operator for "update all other items in this group to be the same as the selected item".

    This would allow an IFC project to contain things that are intended to be identical (eg. the entire aggregated contents of building storeys), and provide a mechanism for keeping them synchronised.

    (The update operator could initially be a crude 'delete everything and replace' function, but ultimately a refined Native IFC version would recurse through the children and only change things that are actually different)

    There are a few ideas from the IfcArray that I think can be adapted to your idea. I'm definitely going to try this. Maybe the editing and deleting of the children should only be possible when breaking the link, as I suggest here: https://github.com/IfcOpenShell/IfcOpenShell/issues/3063

  12. B

    Some progress:

    And it seems to be working in other viewers:

  13. B

    There is no array yet, the assemblies are manually duplicated. But I think the only reason why the array is not possible in assembly elements is because the array UI is stored inside blender's modifiers panel, and blender hides them when an empty object is selected. IFC-wise, it seems to be possible to store BB array properties in an empty IfcElementAssembly.

  14. T

  15. C

    @bruno_perdigao said:

    Some progress:

    And it seems to be working in other viewers:

    YES!!! :-D

  16. T
  17. T
  18. B

    @theoryshaw I'm not sure how to make it available. I couldn't create a working ".zip". If someone can point me how to do it, I'll be glad to.

    Anyway, here is the branch where I'm working on: https://github.com/brunoperdigao/IfcOpenShell/commits/duplicate-assembly, maybe you can copy the two files that have changes.

    About the functionality, this is how it works:

    • Once you have all the elements in one assembly, you have to select only the empty that has the IfcElementAssembly class. Then press "ctrl+F"* to duplicate, and you will be able to move the new copy.

    • When you want to make a change, you have to work on the original assembly.

    • To sync them, select only the empty from the original assembly, then "F3" and "IFC Refresh Aggregate"

    Keep in mind that it deletes and recreates all the elements, so I don't know how it will perform with a lot of elements. Let me know your thoughts on how it should work. There are a lot of other things to be implemented after this to create a good UX.

  19. C

    @bruno_perdigao

    Keep in mind that it deletes and recreates all the elements, so I don't know how it will perform with a lot of elements.

    Seems to work fine so far. I've IFC arrayed an entire cladding ?

  20. T

    Let me know your thoughts on how it should work.

    Love it! Any chance to accommodate rotation? :)

  21. B

    @theoryshaw said:

    Let me know your thoughts on how it should work.

    Love it! Any chance to accommodate rotation? :)

    It definitely should. I messed up some of the matrix operations, but I'll take a look at that.

  22. B

    @theoryshaw Just pushed a new commit that fixes the rotation. It should be working now

  23. T
  24. C

    @theoryshaw said:

    I feel something like the following, would help greatly when working with aggregates...

    https://github.com/IfcOpenShell/IfcOpenShell/issues/3101

    I agree, also would be nice if there is an option where you could go back to selection of previous selected items. So you don't have to scroll through the entire Blender Scene collection to find the assembly which has the openings. I would think a clipboard like Windows has, for when you press Windows key + V. All your previous copied pasted items are in there, something similar with the last 10 selected previous items in a pop up menu. Just brainstorming... Maybe you have a better idea.

  25. T

    Possible to duplicate an aggregate within an aggregate? :)

  1. Page 1
  2. 2
  3. 3
  4. 4
  5. 5

Login or Register to reply.