summaryrefslogtreecommitdiff
path: root/gerber/primitives.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-07-16 15:49:48 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-07-16 15:49:48 +0800
commit52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d (patch)
tree7e117c69b2c2310926bf677f719bb7406c2e3e43 /gerber/primitives.py
parent09ebeb6e244ff91f20e1813bca51102fd2e1077f (diff)
downloadgerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.tar.gz
gerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.tar.bz2
gerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.zip
Fix most broken tests so that I can safely merge into changes with known expected test result
Diffstat (limited to 'gerber/primitives.py')
-rw-r--r--gerber/primitives.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py
index 211acb8..90b6fb9 100644
--- a/gerber/primitives.py
+++ b/gerber/primitives.py
@@ -1112,7 +1112,7 @@ class Drill(Primitive):
self.position = position
self.diameter = diameter
self.hit = hit
- self._to_convert = ['position', 'diameter']
+ self._to_convert = ['position', 'diameter', 'hit']
@property
def flashed(self):
@@ -1133,6 +1133,9 @@ class Drill(Primitive):
def offset(self, x_offset=0, y_offset=0):
self.position = tuple(map(add, self.position, (x_offset, y_offset)))
+ def __str__(self):
+ return '<Drill %f (%f, %f) [%s]>' % (self.diameter, self.position[0], self.position[1], self.hit)
+
class Slot(Primitive):
""" A drilled slot
@@ -1145,7 +1148,7 @@ class Slot(Primitive):
self.end = end
self.diameter = diameter
self.hit = hit
- self._to_convert = ['start', 'end', 'diameter']
+ self._to_convert = ['start', 'end', 'diameter', 'hit']
@property
def flashed(self):