summaryrefslogtreecommitdiff
path: root/gerber/render/rs274x_backend.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-03-05 14:56:08 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-03-05 14:56:08 +0800
commit0f1d1c3a29017ea82e1f0f7795798405ef346706 (patch)
tree605a4c07276e5d63dd249cf2feec0fe83f560a2f /gerber/render/rs274x_backend.py
parent5cb60d6385f167e814df7a608321a4f33da0e193 (diff)
downloadgerbonara-0f1d1c3a29017ea82e1f0f7795798405ef346706.tar.gz
gerbonara-0f1d1c3a29017ea82e1f0f7795798405ef346706.tar.bz2
gerbonara-0f1d1c3a29017ea82e1f0f7795798405ef346706.zip
Remove some testing code from gerber writer. More implementation for excellon writer - not working yet
Diffstat (limited to 'gerber/render/rs274x_backend.py')
-rw-r--r--gerber/render/rs274x_backend.py32
1 files changed, 4 insertions, 28 deletions
diff --git a/gerber/render/rs274x_backend.py b/gerber/render/rs274x_backend.py
index 5a15fe5..81e86f2 100644
--- a/gerber/render/rs274x_backend.py
+++ b/gerber/render/rs274x_backend.py
@@ -93,30 +93,11 @@ class Rs274xContext(GerberContext):
self.settings = settings
self._start_header(settings)
- #self._define_dcodes()
def _start_header(self, settings):
self.header.append(FSParamStmt.from_settings(settings))
self.header.append(MOParamStmt.from_units(settings.units))
- def _define_dcodes(self):
-
- self._get_circle(.1575, 10)
- self._get_circle(.035, 17)
- self._get_rectangle(0.1575, 0.1181, 15)
- self._get_rectangle(0.0492, 0.0118, 16)
- self._get_circle(.0197, 11)
- self._get_rectangle(0.0236, 0.0591, 12)
- self._get_circle(.005, 18)
- self._get_circle(.008, 19)
- self._get_circle(.009, 20)
- self._get_circle(.01, 21)
- self._get_circle(.02, 22)
- self._get_circle(.006, 23)
- self._get_circle(.015, 24)
- self._get_rectangle(0.1678, 0.1284, 26)
- self._get_rectangle(0.0338, 0.0694, 25)
-
def _simplify_point(self, point):
return (point[0] if point[0] != self._pos[0] else None, point[1] if point[1] != self._pos[1] else None)
@@ -330,11 +311,10 @@ class Rs274xContext(GerberContext):
pass
def _render_polygon(self, polygon, color):
- raise NotImplementedError('Not implemented yet')
- pass
+ raise ValueError('Polygons can only exist in the context of aperture macro')
- def _render_drill(self, circle, color):
- pass
+ def _render_drill(self, drill, color):
+ raise ValueError('Drills are not valid in RS274X files')
def _hash_amacro(self, amgroup):
'''Calculate a very quick hash code for deciding if we should even check AM groups for comparision'''
@@ -420,8 +400,4 @@ class Rs274xContext(GerberContext):
def _render_inverted_layer(self):
pass
-
- def post_render_primitives(self):
- '''No more primitives, so set the end marker'''
-
- self.body.append() \ No newline at end of file
+ \ No newline at end of file