summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-28 12:19:03 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-28 12:19:03 -0500
commit5df38c014fd09792995b2b12b1982c535c962c9a (patch)
tree3dd1f118a752b7b6e75511e1f3b3af3ac1b67bdc /gerber/rs274x.py
parentb9f1b106c3006f1dddb1279ae9622630a29d18c7 (diff)
downloadgerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.tar.gz
gerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.tar.bz2
gerbonara-5df38c014fd09792995b2b12b1982c535c962c9a.zip
Cleanup, rendering fixes.
fixed rendering of tented vias fixed rendering of semi-transparent layers fixed file type detection issues added some examples
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index b19913b..76e5101 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -48,7 +48,7 @@ def read(filename):
return GerberParser().parse(filename)
-def loads(data):
+def loads(data, filename=None):
""" Generate a GerberFile object from rs274x data in memory
Parameters
@@ -56,12 +56,15 @@ def loads(data):
data : string
string containing gerber file contents
+ filename : string, optional
+ string containing the filename of the data source
+
Returns
-------
file : :class:`gerber.rs274x.GerberFile`
A GerberFile created from the specified file.
"""
- return GerberParser().parse_raw(data)
+ return GerberParser().parse_raw(data, filename)
class GerberFile(CamFile):