From 9ce28e066da123fcb49cbfabb96e169cec3d5280 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Sun, 29 Mar 2020 15:06:18 +0200 Subject: [PATCH] Fix rotation in mnbtool --- helpers/mnbtool.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/helpers/mnbtool.py b/helpers/mnbtool.py index ceaca28..7692b65 100755 --- a/helpers/mnbtool.py +++ b/helpers/mnbtool.py @@ -28,16 +28,9 @@ for reader in [reader_t, reader_b]: for row in reader: row = list(filter(None, row[0].split(' '))) rotation = int(row[3]) - # special behaviour for SOIC8: - print(len(row)) - if len(row) >= 6: - print(row[5]) + if layer == 'Bottom': + rotation = (360 - rotation + 180) % 360 - if "SOIC8" in row[5]: - if rotation == 180: - rotation = 0 - elif rotation == 0: - rotation = 180 writer.writerow({'Designator': row[0], 'Mid X': row[1], 'Mid Y': row[2], 'Layer': layer, 'Rotation': rotation})