diff --git a/src/gerbonara/rs274x.py b/src/gerbonara/rs274x.py index 6279f9b..5477916 100644 --- a/src/gerbonara/rs274x.py +++ b/src/gerbonara/rs274x.py @@ -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)