summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/graphic_primitives.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-12-29 19:58:20 +0100
committerjaseg <git@jaseg.de>2021-12-29 19:58:20 +0100
commit3fb26e6940b5ae752308d8a33f2608d266795153 (patch)
treea563b0cf512e5661b2a450ebf73eafe655ac18b2 /gerbonara/gerber/graphic_primitives.py
parent30dabef9ee83021067957854187b9bbf245c14cf (diff)
downloadgerbonara-3fb26e6940b5ae752308d8a33f2608d266795153.tar.gz
gerbonara-3fb26e6940b5ae752308d8a33f2608d266795153.tar.bz2
gerbonara-3fb26e6940b5ae752308d8a33f2608d266795153.zip
Basic round-trip works
Diffstat (limited to 'gerbonara/gerber/graphic_primitives.py')
-rw-r--r--gerbonara/gerber/graphic_primitives.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gerbonara/gerber/graphic_primitives.py b/gerbonara/gerber/graphic_primitives.py
index 391a452..9518501 100644
--- a/gerbonara/gerber/graphic_primitives.py
+++ b/gerbonara/gerber/graphic_primitives.py
@@ -4,7 +4,7 @@ import itertools
from dataclasses import dataclass, KW_ONLY, replace
-from gerber_statements import *
+from .gerber_statements import *
class GraphicPrimitive:
@@ -69,10 +69,10 @@ class ArcPoly(GraphicPrimitive):
# list of (x : float, y : float) tuples. Describes closed outline, i.e. first and last point are considered
# connected.
- outline : list(tuple(float))
+ outline : [(float,)]
# list of radii of segments, must be either None (all segments are straight lines) or same length as outline.
# Straight line segments have None entry.
- arc_centers : list(tuple(float))
+ arc_centers : [(float,)]
@property
def segments(self):
@@ -116,7 +116,7 @@ class Rectangle(GraphicPrimitive):
def bounds(self):
return ((self.x, self.y), (self.x+self.w, self.y+self.h))
- @prorperty
+ @property
def center(self):
return self.x + self.w/2, self.y + self.h/2