OSArch Community

BlenderBIM: Arrays, IfcRelAggregates, IfcOpeningElements, IfcMaterials

  1. W

    For my use case, shown here, I need to create type assemblies (IfcElementAssemblyType) for the precast concrete elements (20 different types) and instantiate copies (IfcElementAssembly) for the individual elements (32 modules x 36 elements).

    It's not exactly an array because the types can vary from one module to another and different types can appear in the same module.

    Using existing types in BIMTool (such as IfcWallType) I can via script using the commands:

    id_tip = 123 #id IfcWallType from ifc file

    bpy.context.scene.BIMModelProperties.ifc_class = 'IfcWallType'

    bpy.ops.bim.add_constr_type_instance(relating_type_id=id_tip, from_invoke=True)

    But for IfcElementAssemblyType it's not working.

    Do you know of any way to do this?

    Please forgive me if it's not related to the subject of the discussion.

    Thanks

  2. G

    @walpa Maybe try with bpy.ops.bim.add_constr_type_instance(ifc_class="IfcElementAssemblyType", relating_type_id=id_tip, from_invoke=True) ?

  3. W
  4. W

    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.

    @bruno_perdigao I'm trying to test it, but in the latest version (blenderbim-230818) "crtl+F" is not doing anything.

    In @theoryshaw's video I couldn't identify the shortcut keys he used.

    Can you show me how to do it?

  5. T
  6. W

    @bruno_perdigao , @theoryshaw Works well ! Thanks for the great contribution.

  7. B

    @walpa Nice to hear you are testing it. Let me know if you have any feedback.

  8. T
  9. B

    @theoryshaw I think it’s a bug. I’ll take a closer look later to find out

  10. B
  11. T

    still seems glitchy, unfortunately.

  12. T

    I think i know what it's related to... after I created the aggregate, I moved the origin of the aggregate empty.

  13. T

    Should the movement of the aggregates' origin be accommodated? or should it always remain at 0,0,0?

  14. B

    Is it the same file you shared before? Did I do anything different here?

  15. B

    @theoryshaw said:

    I think i know what it's related to... after I created the aggregate, I moved the origin of the aggregate empty.

    It takes into account the location and rotation of the original objects in relation to the original empty. Then it reproduces the same relationship based on the duplicate empty position and rotation. Here's what happens when you change it:

  16. B

    @theoryshaw Any updates on this? The PR didn't solve your problem after all?

  17. T

    Hi @bruno_perdigao Just saw this, sorry.

    I'm keeping the aggregate empty at (0,0,0), and it seems to work.

    ...

    As you saw, there's this problem.

    ...

    Also, as a feature request, would it be possible to increment the duplicates?

    So instead of...

    • IfcElementAssembly/Assembly (original)

    • IfcElementAssembly/Assembly.001 (duplicate)

    • IfcElementAssembly/Assembly.002 (duplicate)

    It changes the name to something like...

    • IfcElementAssembly/Assembly (original)

    • IfcElementAssembly/Assembly_1 (duplicate)

    • IfcElementAssembly/Assembly_2 (duplicate)

    Reason being, when they are named with .001 etc, upon a reopening of the IFC, these aggregates get renamed. That is IfcElementAssembly/Assembly.001 could be renamed to IfcElementAssembly/Assembly, for example.

    This makes in confusing, when adding stuff to the original (or parent) aggregate--as the name essentially always changes, when the IFC is opened again.

    Hope that makes sense.

  18. A

    It takes into account the location and rotation of the original objects in relation to the original empty. Then it reproduces the same relationship based on the duplicate empty position and rotation. Here's what happens when you change it:

    I think I've met similar problem - when you move the entire assembly (relation between original objects and empty doesn't change), "refresh assembly" still moves the objects.

    Demo - https://imgur.com/a/5g345O2

    Example to reproduce the issue attached (just run "Aggregate Refresh" on the second assembly")

    Update! Just noticed the pull request and it solves the issue for me. Can we merge it or there is still something to add? @bruno_perdigao

  19. B

    @Andrej730 Let me take a look at these new issues to see if they are related. Then I'll try to add everything into a single PR

  20. B

    @Andrej730 I changed my mind, since this PR is simple and already solved your issue, I think you can merge it. The other issues are related to another part of the code.

  21. T

    The following scenario doesn't seem to refresh.

    Am I missing something, or is this just not possible currently.

    file attached.

  22. B

    The refresh seems to be working as intended, but the instances are not organized the way as you expected (see below). I suspect the problem happened when you were duplicating them. Do you recall the order in which you created them?

  23. T
  24. T

    @bruno_perdigao said:

    The refresh seems to be working as intended, but the instances are not organized the way as you expected (see below). I suspect the problem happened when you were duplicating them. Do you recall the order in which you created them?

    hmm, not sure i quite follow you. See following video

    I'm not sure where you got D and E from.

  25. T

    Sorry for the onslaught of feature requests. Just using the 'duplicate aggregate' a lot lately so just want to write them down somewhere. :)

    ...

    Possible to have 'duplicate aggregate' work with arrays?

    video:

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

Login or Register to reply.