Convert polygonal aperture rotations to radians
Polygonal aperture rotations are specified in degrees, however gerbonara wants radians. This is a fix for issue #12 : https://gitlab.com/gerbolyze/gerbonara/-/issues/12
This commit is contained in:
parent
dd8ad98f13
commit
a47a694ba0
1 changed files with 4 additions and 0 deletions
|
|
@ -878,6 +878,10 @@ class GerberParser:
|
|||
if match['shape'] in 'RO' and (math.isclose(modifiers[0], 0) or math.isclose(modifiers[1], 0)):
|
||||
self.warn('Definition of zero-width and/or zero-height rectangle or obround aperture. This is invalid according to spec.' )
|
||||
|
||||
# Polygon aperture rotation is specified in degrees, but radians are easier to work with
|
||||
if match['shape'] == 'P':
|
||||
modifiers[2] = math.radians(modifiers[2])
|
||||
|
||||
new_aperture = kls(*modifiers, unit=self.file_settings.unit, attrs=tuple(self.aperture_attrs.items()),
|
||||
original_number=number)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue