From 3886c79a2c35695aa252e891347fb21c4af570d1 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 10 Mar 2025 18:52:15 +0500 Subject: [PATCH] black . --- src/bonsai/bonsai/bim/module/model/slab.py | 6 ++++-- src/bonsai/bonsai/bim/module/project/operator.py | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/slab.py b/src/bonsai/bonsai/bim/module/model/slab.py index 54f8f57fa8..8d12a15049 100644 --- a/src/bonsai/bonsai/bim/module/model/slab.py +++ b/src/bonsai/bonsai/bim/module/model/slab.py @@ -300,9 +300,11 @@ class DumbSlabPlaner: existing_x_angle = tool.Model.get_existing_x_angle(extrusion) existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, 0, tolerance=0.001) else existing_x_angle existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, pi, tolerance=0.001) else existing_x_angle - existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, 2*pi, tolerance=0.001) else existing_x_angle + existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, 2 * pi, tolerance=0.001) else existing_x_angle direction_ratios = Vector(extrusion.ExtrudedDirection.DirectionRatios) - offset_direction = Vector((abs(direction_ratios.x), abs(direction_ratios.y), abs(direction_ratios.z))) # The offset direction doesn't change with direction sense + offset_direction = Vector( + (abs(direction_ratios.x), abs(direction_ratios.y), abs(direction_ratios.z)) + ) # The offset direction doesn't change with direction sense perpendicular_depth = thickness * abs(1 / cos(existing_x_angle)) perpendicular_offset = layer_params["offset"] * abs(1 / cos(existing_x_angle)) / self.unit_scale diff --git a/src/bonsai/bonsai/bim/module/project/operator.py b/src/bonsai/bonsai/bim/module/project/operator.py index 57262a7da5..36abbe8ffd 100644 --- a/src/bonsai/bonsai/bim/module/project/operator.py +++ b/src/bonsai/bonsai/bim/module/project/operator.py @@ -1282,7 +1282,7 @@ class UnloadLink(bpy.types.Operator): if empty_handle := link.empty_handle: bpy.data.objects.remove(empty_handle) - #following lines removes the library also when use_relative_path=True, otherwise it doesn't + # following lines removes the library also when use_relative_path=True, otherwise it doesn't libraries = bpy.data.libraries for library in libraries: if library.name == self.filepath + ".cache.blend": @@ -1452,8 +1452,8 @@ class ReloadLink(bpy.types.Operator): is_abs = os.path.isabs(Path(self.filepath)) use_relative_path = not is_abs - bpy.ops.bim.unlink_ifc(filepath = self.filepath) - status = bpy.ops.bim.link_ifc(filepath=self.filepath, use_cache=False, use_relative_path = use_relative_path) + bpy.ops.bim.unlink_ifc(filepath=self.filepath) + status = bpy.ops.bim.link_ifc(filepath=self.filepath, use_cache=False, use_relative_path=use_relative_path) return {"FINISHED"}