OSArch Community

BlenderBIM: Arrays, IfcRelAggregates, IfcOpeningElements, IfcMaterials

  1. A

    I meant to do the following as a pull request

    https://github.com/IfcOpenShell/IfcOpenShell/commit/9e67565c71bbe3d0ea45302674345f47572ed874

    It's easier just selecting a part, verses trying to track down the aggregate empty, to refresh.

    Hmm, it's now not refreshing aggregate if it's just IfcElementAssembly selected. Was it intended? Intuitively it seems that it should still work. And for the cases if you have assembly of assemblies you won't be able to refresh the main assembly by other ways besides selecting the main IfcElementAssembly empty.

    Noticed another idea similar to that PR - when you add object to an assembly with eyedropper, perhaps it should be possible to select assembly child object and it would deduce actual IfcElementAssembly from that child. And not sure if there is any need for the eyedropper, similarly to Ryan's report about product assignment.

  2. T
  3. B

    @theoryshaw said:

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

    Keep it coming! I'll try my best to keep up.

    The following scenario doesn't seem to refresh.

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

    What I meant earlier is that the organization of parents and children is different from what you showed (or maybe I didn't understand correctly). What mean is shown in the image below. The refresh won't work if the assembly selected is a parent. So, in this case, it would work, for example, if you change parent B and refresh the child B. Maybe you are trying to refresh parent B because you expected it to be a child of A, is that right? If so, maybe the problem happened when you were duplicating them. Makes sense?

    To get this, I checked the ID in the pset BBIM_Aggregate_Data. There has to be a better way to know which is the parent is which is the child, it's on my todo list to build this functionality

  4. B

    I saw this UI for "representation utilities" with this warning for advanced users, and I thought maybe we could have a subpanel under aggregates, called "duplicate aggregates", with the same warning. It would allow me to start testing a UI for it. Maybe it's too soon for this, since it is highly experimental, I don't know. What you guys think?

  5. T

    I've attached another file, to hopefully better explain.

  6. T

    What you guys think?

    I like it! :)

    All open source development is experimental. ;)

  7. T

    When you Shift+Ctrl+D an aggregate it will attach a BBIM_Aggregate_Data Pset to the objects inside both the parent aggregate and child aggregate.

    If, however, you add an object to the parent aggregate after its initial creation, this new object does not have a BBIM_Aggregate_Data Pset. I assume that it should, correct?

    video:

  8. T

    I'm not sure how it happened, but if I refresh the following child, from this file, it makes the child disappear, and oddly highlights a few random objects in the parent, as you can see from the screenshot below.

  9. T

    ... could it be because some of the objects don't have BBIM_Aggregate_Data Pset, as mentioned above?

  10. T

    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.

    ...or does it make sense, on import(open) to assure that the parent is always named IfcElementAssembly/Assembly and the children are IfcElementAssembly/Assembly.001, IfcElementAssembly/Assembly.002, etc.

  11. B

    If, however, you add an object to the parent aggregate after its initial creation, this new object does not have a BBIM_Aggregate_Data

    @theoryshaw Could you test this before I submit to pull request? It should fix this problem. Hopefully, all the other problems were caused by this

  12. T

    Seems to work for me!

  13. T

    Would it be relatively easy to process multiple children at a time?

    Reason being, processing each house module for this pocket neighborhood takes a lot of time, for just one refresh. If I could select multiple children modules and run the refresh on them, I could have it run over lunch, for example, and the entire model would be updated.

  14. T

    Might have spoke too soon. (might be a different problem though)

    I recreated the following parent from scratch (after your fix), and then created the following child and rotated it 90 degrees.

    If I refresh the child, it disappears.

    file, here.

  15. B

    @theoryshaw said:

    Would it be relatively easy to process multiple children at a time?

    Reason being, processing each house module for this pocket neighborhood takes a lot of time, for just one refresh. If I could select multiple children modules and run the refresh on them, I could have it run over lunch, for example, and the entire model would be updated.

    The reason I only allowed to refresh each child at a time was to prevent the user to start a very time-consuming process without knowing, but since you are aware of this, I can change the code to allow this behavior.

    I recreated the following parent from scratch (after your fix), and then created the following child and rotated it 90 degrees.

    If I refresh the child, it disappears.

    I'll take a look

  16. B

    @theoryshaw For now, try using this script. Make sure to select only one object from each aggregate:

    
    objs = bpy.context.selected_objects
    
    for obj in objs:
    
        for s in bpy.context.selected_objects:
    
            s.select_set(False)
    
        obj.select_set(True)
    
        bpy.ops.bim.refresh_aggregate()
    
  17. T

    See this file, as a more simplified parent/child relationship.

    If you try to refresh any of the children, they disappear w/ following error.

    
    Python: Traceback (most recent call last):
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1167, in execute
    
        IfcStore.execute_ifc_operator(self, context)
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\ifc.py", line 336, in execute_ifc_operator
    
        result = getattr(operator, "_execute")(context)
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1347, in _execute
    
        duplicate_children(parent)
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1264, in duplicate_children
    
        new_part = duplicate_objects(part_obj)
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1289, in duplicate_objects
    
        new_entity = blenderbim.core.root.copy_class(
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\core\root.py", line 34, in copy_class
    
        root.link_object_data(ifc.get_object(relating_type), obj)
    
      File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\tool\root.py", line 135, in link_object_data
    
        destination_obj.data = source_obj.data
    
    AttributeError: 'NoneType' object has no attribute 'data'
    
    
  18. T

    This is an odd one. I had, for the last couple days kept these blender/ifc files in sync.

    If you open the blender file, and try to shift+ctrl+d one of the parent modules, you can see the child aggregate is missing objects.

    The strange thing, however, is when you open the IFC file anew, shift+ctrl+d works.

  19. B

    @theoryshaw I'll take a look

  20. B

    @theoryshaw The bug is a problem in your blend file. Don't know why, but the "Super King bed" type is missing and that's causing the error, which will also happen with normal shift+d. The type exists in ifc, but not as blender object. I don't know how to recreate it. I saw the script to resync the files, but it seems that it doesn't handle this problem. Just for you know, the Ifc entity for the type is #1073758=IfcFurnitureType('0k0UHYuCPDiBqscGw44wcu',$,'Super King bed',$,$,$,(#1073742),$,$,.NOTDEFINED.,.NOTDEFINED.)

  21. T

    Thanks. I was able to just use a earlier version and bypass this bug. I think these bugs happen when i add/delete representation contexts to an object. I've noticed other stuff that disappears in the past, as well. Still haven't found a consistent way to replicate it though.

  22. T

    @bruno_perdigao, Relative to this concept...

    ...here's a real world scenario, that would have been easier to pull off, if this functionality existed...

  23. B
  24. T

    Just another thought. It might be a good idea that if an object inside an aggregate is duplicated (shift+d), that it removes the `BBIM_Aggregate_Data' pset. Similar to how the 'BBIM_Array' pset is removed when an object from an array is duplicated (shift+d).

  25. T

    When there so many aggregates around, it's easy to forget where the parent is. :)

    Would be nice if there was an easy way to 'find' the parent, from selecting an object in the child aggregate.

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

Login or Register to reply.