summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-08 21:50:48 +0100
committerjaseg <git@jaseg.de>2022-01-08 21:50:48 +0100
commitf09ef6f1172ca362c025048b45538c087cab0dc3 (patch)
treebac51961895fe2ac3ee156a35321d3325be4cea6
parent5885b60f14c35a65b67071a439a53aaacf39b594 (diff)
downloadgerbonara-f09ef6f1172ca362c025048b45538c087cab0dc3.tar.gz
gerbonara-f09ef6f1172ca362c025048b45538c087cab0dc3.tar.bz2
gerbonara-f09ef6f1172ca362c025048b45538c087cab0dc3.zip
Fix rotation tests
-rw-r--r--gerbonara/gerber/graphic_objects.py2
-rw-r--r--gerbonara/gerber/rs274x.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/gerber/graphic_objects.py b/gerbonara/gerber/graphic_objects.py
index d9736cf..81d68f3 100644
--- a/gerbonara/gerber/graphic_objects.py
+++ b/gerbonara/gerber/graphic_objects.py
@@ -40,7 +40,7 @@ class GerberObject:
def rotate(self, rotation, cx=0, cy=0, unit='mm'):
cx, cy = self._conv(cx, unit), self._conv(cy, unit)
- return self._rotate(cx, cy)
+ self._rotate(rotation, cx, cy)
def bounding_box(self, unit=None):
bboxes = [ p.bounding_box for p in self.to_primitives(unit) ]
diff --git a/gerbonara/gerber/rs274x.py b/gerbonara/gerber/rs274x.py
index f53c78a..53b4e5e 100644
--- a/gerbonara/gerber/rs274x.py
+++ b/gerbonara/gerber/rs274x.py
@@ -59,7 +59,7 @@ def points_close(a, b):
else:
return math.isclose(a[0], b[0]) and math.isclose(a[1], b[1])
-def Tag:
+class Tag:
def __init__(self, name, children=None, **attrs):
self.name, self.children, self.attrs = name, children, attrs