Skip to content

Commit

Permalink
fixed formatting and linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Jan 11, 2024
1 parent cd4ac47 commit 996360c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/compas_timber/connections/french_ridge_lap.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def check_geometry(self):
This method checks whether the parts are aligned as necessary to create French Ridge Lap and determines which face is used as reference face for machining.
"""
if not (self.beam_a and self.beam_b):
raise(BeamJoinningError("French Ridge Lap requires 2 beams"))
raise (BeamJoinningError("French Ridge Lap requires 2 beams"))

if not (self.beam_a.width == self.beam_b.width and self.beam_a.height == self.beam_b.height):
raise(BeamJoinningError("widths and heights for both beams must match for the French Ridge Lap"))
raise (BeamJoinningError("widths and heights for both beams must match for the French Ridge Lap"))

normal = cross_vectors(self.beam_a.frame.xaxis, self.beam_b.frame.xaxis)

Expand All @@ -113,7 +113,7 @@ def check_geometry(self):
elif angle_vectors(normal, -self.beam_a.frame.zaxis) < 0.001:
indices.append(2)
else:
raise(BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))
raise (BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))

if abs(angle_vectors(normal, self.beam_b.frame.yaxis) - math.pi) < 0.001:
indices.append(3)
Expand All @@ -124,5 +124,5 @@ def check_geometry(self):
elif abs(angle_vectors(normal, -self.beam_b.frame.zaxis) - math.pi) < 0.001:
indices.append(2)
else:
raise(BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))
raise (BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))
self.reference_face_indices = {str(self.beam_a.key): indices[0], str(self.beam_b.key): indices[1]}
1 change: 0 additions & 1 deletion src/compas_timber/connections/joint.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def create(cls, assembly, *beams):

@property
def ends(self):

"""Returns a map of ehich end of each beam is joined by this joint."""

self._ends = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from compas_timber.fabrication import BTLx
from compas_timber.fabrication import BTLxProcess

# from compas_timber.fabrication import BT
...

class BTLxFrenchRidgeLap(object):
"""
BTLxFrenchRidgeLap represents a fabrication process for creating a French Ridge Lap joint.
Expand Down Expand Up @@ -78,7 +77,7 @@ def __init__(self, part, joint, is_top):
"Priority": "0",
"ProcessID": "0",
"ReferencePlaneID": str(self.ref_face_index),
} # XML attributes of the process element in the BTLx file
} # XML attributes of the process element in the BTLx file

self.process_joints()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def apply_processings(self, joint, parts):
bottom_key = joint.beams[1].key
bottom_part = parts[str(bottom_key)]
bottom_part._test.append(
bottom_part.reference_surface_planes(joint.reference_face_indices[str(bottom_part.beam.key)]))
bottom_part.reference_surface_planes(joint.reference_face_indices[str(bottom_part.beam.key)])
)
bottom_part.processings.append(BTLxFrenchRidgeLap.create_process(bottom_part, joint, False))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self):

@classmethod
def apply_processings(cls, joint, parts):
""" Apply processings to the joint and its associated parts.
"""Apply processings to the joint and its associated parts.
Parameters:
----------
Expand Down

0 comments on commit 996360c

Please sign in to comment.