diff --git a/fabrication.py b/fabrication.py index d19d94f..178c68c 100644 --- a/fabrication.py +++ b/fabrication.py @@ -91,24 +91,14 @@ def fix_rotation(self, footprint): def rotate(self, footprint, rotation, correction): """Calculate the actual correction.""" - if footprint.GetLayer() == 0: - rotation = (rotation + int(correction)) % 360 - self.logger.info( - "Fixed rotation of %s (%s / %s) on Top Layer by %d degrees", - footprint.GetReference(), - footprint.GetValue(), - footprint.GetFPID().GetLibItemName(), - correction, - ) - else: - rotation = (rotation - int(correction)) % 360 - self.logger.info( - "Fixed rotation of %s (%s / %s) on Bottom Layer by %d degrees", - footprint.GetReference(), - footprint.GetValue(), - footprint.GetFPID().GetLibItemName(), - correction, - ) + rotation = (rotation + int(correction)) % 360 + self.logger.info( + "Fixed rotation of %s (%s / %s) on Top Layer by %d degrees", + footprint.GetReference(), + footprint.GetValue(), + footprint.GetFPID().GetLibItemName(), + correction, + ) return rotation def get_position(self, footprint):