mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Spatial Elements Utilities and QOL (#2008)
* Tool to add storey to specific building
* Operator to add new storey to building
* Add new storey to building button in aggregates panel
* Minor fix
* add method to data class to retrieve ifc class name
* Extract aggregate creation logic
* Prevent aggregating non-ifc elements + display popup info
* Add tooltips + rename operators
* Rename function to get relating object
* Rename relating object data variable to be able to have access to related objects
* Add utilities to get related objects
* Add utility function to get related objects from element
* display related object in Aggregates panel in object properties
* Revert "Rename function to get relating object"
This reverts commit 5248627a41.
* Update method names
* Add Operator to select parts of an element
* Ditch box layout and only display number of parts
* Add operator to select aggregate of an element
* Display operator to select aggregate of element
* Move logic to aggregate module
* Add utility methods to Blender tool
* Add buttons to create Ifcsite and IfcBuilding from object panel
This commit is contained in:
@@ -183,6 +183,11 @@ def get_aggregate(element):
|
||||
return element.Decomposes[0].RelatingObject
|
||||
|
||||
|
||||
def get_parts(element):
|
||||
if hasattr(element, "IsDecomposedBy") and element.IsDecomposedBy:
|
||||
return element.IsDecomposedBy[0].RelatedObjects
|
||||
|
||||
|
||||
def replace_attribute(element, old, new):
|
||||
for i, attribute in enumerate(element):
|
||||
if has_element_reference(attribute, old):
|
||||
|
||||
Reference in New Issue
Block a user