From 6d07a157a9cf6f8300bd23088e800d980f3c52fd Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 30 Jan 2024 14:31:00 +0500 Subject: [PATCH] black format --- .../blenderbim/bim/module/void/operator.py | 13 ++++++------- src/blenderbim/blenderbim/tool/model.py | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/void/operator.py b/src/blenderbim/blenderbim/bim/module/void/operator.py index 5914049d02..627f5cd980 100644 --- a/src/blenderbim/blenderbim/bim/module/void/operator.py +++ b/src/blenderbim/blenderbim/bim/module/void/operator.py @@ -29,8 +29,9 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.add_opening" bl_label = "Add Opening" bl_options = {"REGISTER", "UNDO"} - bl_description = "Adds an opening to an element.\n" \ - "Need to select two elements, order of selection is not important" + bl_description = ( + "Adds an opening to an element.\n" "Need to select two elements, order of selection is not important" + ) @classmethod def poll(cls, context): @@ -41,12 +42,10 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator): def _execute(self, context): props = context.scene.BIMModelProperties selected_objects = context.selected_objects - target_object = selected_objects[0] - + target_object = selected_objects[0] opening_objects = [obj for obj in selected_objects if obj != target_object] - for opening_obj in opening_objects: element1 = tool.Ifc.get_entity(target_object) obj1 = target_object @@ -58,7 +57,7 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator): if element1 and element2: if element1.is_a("IfcOpeningElement") and element2.is_a("IfcOpeningElement"): - self.report({'INFO'}, "You can't add an opening to another opening.") + self.report({"INFO"}, "You can't add an opening to another opening.") continue elif not element1.is_a("IfcOpeningElement") and not element2.is_a("IfcOpeningElement"): if element1.is_a("IfcWindow") or element1.is_a("IfcDoor"): # Add a fill to an element. @@ -75,7 +74,7 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator): element1, element2 = element2, element1 if element1.is_a("IfcOpeningElement"): - self.report({'INFO'}, "You can't add an opening to another opening.") + self.report({"INFO"}, "You can't add an opening to another opening.") continue if tool.Ifc.is_moved(obj1): diff --git a/src/blenderbim/blenderbim/tool/model.py b/src/blenderbim/blenderbim/tool/model.py index 8f9d08759a..12b1432e56 100644 --- a/src/blenderbim/blenderbim/tool/model.py +++ b/src/blenderbim/blenderbim/tool/model.py @@ -979,8 +979,8 @@ class Model(blenderbim.core.tool.Model): if nosing_length < 0: # tread gaps length += abs(nosing_length) * number_of_treads calculated_params["Length"] = round(length, 5) - pitch = height/length - pitch_formatted = str(round(pitch*100, 1)) + ' % / ' + str(round(degrees(atan(pitch)), 1)) + ' deg' + pitch = height / length + pitch_formatted = str(round(pitch * 100, 1)) + " % / " + str(round(degrees(atan(pitch)), 1)) + " deg" calculated_params["Pitch"] = str(pitch_formatted) return calculated_params