summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/panelize/common.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-10-07 11:13:12 +0200
committerjaseg <git@jaseg.de>2021-10-07 11:13:12 +0200
commit4565712869ef4269d62de593a245ca8d001c4ea9 (patch)
tree32a8a2245e11c8dfad9bbd486ab7678a32b969c1 /gerbonara/gerber/panelize/common.py
parentdd8944709c5a48ccb52ba41a2310218770eb1669 (diff)
downloadgerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.tar.gz
gerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.tar.bz2
gerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.zip
WIP
Diffstat (limited to 'gerbonara/gerber/panelize/common.py')
-rw-r--r--gerbonara/gerber/panelize/common.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/gerbonara/gerber/panelize/common.py b/gerbonara/gerber/panelize/common.py
index ac25138..aa3ba0e 100644
--- a/gerbonara/gerber/panelize/common.py
+++ b/gerbonara/gerber/panelize/common.py
@@ -10,9 +10,7 @@ from ..utils import detect_file_format
from .. import rs274x
from .. import ipc356
-from . import rs274x as ex_rs274x
from . import excellon
-from . import dxf
def read(filename, format=None):
with open(filename, 'r') as f:
@@ -21,14 +19,11 @@ def read(filename, format=None):
def loads(data, filename=None, format=None):
- if os.path.splitext(filename if filename else '')[1].lower() == '.dxf':
- return dxf.loads(data, filename)
+ # if os.path.splitext(filename if filename else '')[1].lower() == '.dxf':
+ # return dxf.loads(data, filename)
fmt = detect_file_format(data)
- if fmt == 'rs274x':
- file = ex_rs274x.loads(data, filename=filename)
- return ex_rs274x.GerberFile.from_gerber_file(file)
- elif fmt == 'excellon':
+ if fmt == 'excellon':
return excellon.loads(data, filename=filename, format=format)
elif fmt == 'ipc_d_356':
return ipc356.loads(data, filename=filename)
@@ -36,6 +31,6 @@ def loads(data, filename=None, format=None):
raise ParseError('Unable to detect file format')
-def rectangle(width, height, left=0, bottom=0, units='metric', draw_mode=None, filename=None):
- return dxf.DxfFile.rectangle(
- width, height, left, bottom, units, draw_mode, filename)
+# def rectangle(width, height, left=0, bottom=0, units='metric', draw_mode=None, filename=None):
+# return dxf.DxfFile.rectangle(
+# width, height, left, bottom, units, draw_mode, filename)