summaryrefslogtreecommitdiff
path: root/gerber/primitives.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-06-25 16:46:44 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-06-25 16:46:44 +0800
commitccb6eb7a766bd6edf314978f3ec4fc0dcd61652d (patch)
tree0f752f20823644f1950ab6bd4c85e66700498602 /gerber/primitives.py
parentefcb221fc7bd8dae583357e6c4e1c2d3fc9e9df6 (diff)
downloadgerbonara-ccb6eb7a766bd6edf314978f3ec4fc0dcd61652d.tar.gz
gerbonara-ccb6eb7a766bd6edf314978f3ec4fc0dcd61652d.tar.bz2
gerbonara-ccb6eb7a766bd6edf314978f3ec4fc0dcd61652d.zip
Add support for polygon apertures
Diffstat (limited to 'gerber/primitives.py')
-rw-r--r--gerber/primitives.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py
index aa6e661..211acb8 100644
--- a/gerber/primitives.py
+++ b/gerber/primitives.py
@@ -721,14 +721,15 @@ class Obround(Primitive):
class Polygon(Primitive):
"""
- Polygon flash defined by a set number of sized.
+ Polygon flash defined by a set number of sides.
"""
- def __init__(self, position, sides, radius, **kwargs):
+ def __init__(self, position, sides, radius, hole_radius, **kwargs):
super(Polygon, self).__init__(**kwargs)
validate_coordinates(position)
self.position = position
self.sides = sides
self.radius = radius
+ self.hole_radius = hole_radius
self._to_convert = ['position', 'radius']
@property
@@ -753,7 +754,7 @@ class Polygon(Primitive):
@property
def vertices(self):
- offset = math.degrees(self.rotation)
+ offset = self.rotation
da = 360.0 / self.sides
points = []