From f4b2e74923cc95c683cd7f5c4732d92e4aafd3ba Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 30 Dec 2021 16:40:14 +0100 Subject: Fix rotation bugs, all tests run through --- gerbonara/gerber/cam.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gerbonara/gerber/cam.py') diff --git a/gerbonara/gerber/cam.py b/gerbonara/gerber/cam.py index d00194b..fa38382 100644 --- a/gerbonara/gerber/cam.py +++ b/gerbonara/gerber/cam.py @@ -31,19 +31,19 @@ class FileSettings: `zeros='trailing'` ''' notation : str = 'absolute' - units : str = 'inch' - angle_units : str = 'degrees' + unit : str = 'inch' + angle_unit : str = 'degree' zeros : bool = None number_format : tuple = (2, 5) # input validation def __setattr__(self, name, value): - if name == 'units' and value not in ['inch', 'mm']: - raise ValueError(f'Units must be either "inch" or "mm", not {value}') + if name == 'unit' and value not in ['inch', 'mm']: + raise ValueError(f'Unit must be either "inch" or "mm", not {value}') elif name == 'notation' and value not in ['absolute', 'incremental']: raise ValueError(f'Notation must be either "absolute" or "incremental", not {value}') - elif name == 'angle_units' and value not in ('degrees', 'radians'): - raise ValueError(f'Angle units may be "degrees" or "radians", not {value}') + elif name == 'angle_unit' and value not in ('degree', 'radian'): + raise ValueError(f'Angle unit may be "degree" or "radian", not {value}') elif name == 'zeros' and value not in [None, 'leading', 'trailing']: raise ValueError(f'zeros must be either "leading" or "trailing" or None, not {value}') elif name == 'number_format': @@ -60,7 +60,7 @@ class FileSettings: return deepcopy(self) def __str__(self): - return f'' + return f'' def parse_gerber_value(self, value): if not value: -- cgit