Skip to content

Commit 6a63c65

Browse files
committed
black .
1 parent 22f91e1 commit 6a63c65

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/bonsai/bonsai/bim/module/model/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _execute(self, context):
204204
if child_obj := tool.Ifc.get_object(tool.Ifc.get().by_guid(child)):
205205
tool.Geometry.delete_ifc_object(child_obj)
206206
array["children"].clear()
207-
print('cleared array', arrays)
207+
print("cleared array", arrays)
208208
tool.Model.regenerate_array(obj, arrays)
209209
tool.Blender.Modifier.Array.constrain_children_to_parent(element)
210210

src/bonsai/bonsai/tool/model.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,9 @@ def regenerate_array(
10671067
parent_element = tool.Ifc.get_entity(parent_obj)
10681068

10691069
if pset := ifcopenshell.util.element.get_pset(parent_element, "BBIM_Array"):
1070-
ifcopenshell.api.pset.remove_pset(tool.Ifc.get(), product=parent_element, pset=tool.Ifc.get().by_id(pset["id"]))
1070+
ifcopenshell.api.pset.remove_pset(
1071+
tool.Ifc.get(), product=parent_element, pset=tool.Ifc.get().by_id(pset["id"])
1072+
)
10711073

10721074
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
10731075
obj_stack = [parent_obj]
@@ -1104,7 +1106,9 @@ def regenerate_array(
11041106

11051107
# add child pset
11061108
if not (child_pset := tool.Pset.get_element_pset(child_element, "BBIM_Array")):
1107-
child_pset = ifcopenshell.api.pset.add_pset(tool.Ifc.get(), product=child_element, name="BBIM_Array")
1109+
child_pset = ifcopenshell.api.pset.add_pset(
1110+
tool.Ifc.get(), product=child_element, name="BBIM_Array"
1111+
)
11081112
ifcopenshell.api.pset.edit_pset(
11091113
tool.Ifc.get(),
11101114
pset=child_pset,
@@ -1148,7 +1152,9 @@ def regenerate_array(
11481152

11491153
pset = ifcopenshell.api.pset.add_pset(tool.Ifc.get(), product=parent_element, name="BBIM_Array")
11501154
json_data = tool.Ifc.get().createIfcText(json.dumps(data))
1151-
ifcopenshell.api.pset.edit_pset(tool.Ifc.get(), pset=pset, properties={"Data": json_data, "Parent": parent_element.GlobalId})
1155+
ifcopenshell.api.pset.edit_pset(
1156+
tool.Ifc.get(), pset=pset, properties={"Data": json_data, "Parent": parent_element.GlobalId}
1157+
)
11521158

11531159
@classmethod
11541160
def replace_object_ifc_representation(

0 commit comments

Comments
 (0)