aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gerberex/composition.py4
-rw-r--r--gerberex/dxf.py5
-rw-r--r--gerberex/excellon.py2
3 files changed, 7 insertions, 4 deletions
diff --git a/gerberex/composition.py b/gerberex/composition.py
index 634640e..b5dffb1 100644
--- a/gerberex/composition.py
+++ b/gerberex/composition.py
@@ -138,7 +138,9 @@ class DrillComposition(Composition):
if num == t.number:
yield statement.to_excellon(self.settings)
yield EndOfProgramStmt().to_excellon()
-
+
+ self.settings.notation = 'absolute'
+ self.settings.zeros = 'trailing'
with open(path, 'w') as f:
gerberex.excellon.write_excellon_header(f, self.settings, self.tools)
for statement in statements():
diff --git a/gerberex/dxf.py b/gerberex/dxf.py
index eca246c..00b7695 100644
--- a/gerberex/dxf.py
+++ b/gerberex/dxf.py
@@ -475,9 +475,8 @@ class DxfFile(CamFile):
self.statements.pitch = value
def write(self, filename=None, filetype=FT_RX274X):
- if self.settings.notation != 'absolute':
- raise Exception('DXF file\'s notation must be absolute ')
-
+ self.settings.notation = 'absolute'
+ self.settings.zeros = 'trailing'
filename = filename if filename is not None else self.filename
with open(filename, 'w') as f:
if filetype == self.FT_RX274X:
diff --git a/gerberex/excellon.py b/gerberex/excellon.py
index 4f867be..570f94e 100644
--- a/gerberex/excellon.py
+++ b/gerberex/excellon.py
@@ -200,6 +200,8 @@ class ExcellonFileEx(ExcellonFile):
self.units = 'metric'
def write(self, filename=None):
+ self.notation = 'absolute'
+ self.zeros = 'trailing'
filename = filename if filename is not None else self.filename
with open(filename, 'w') as f:
write_excellon_header(f, self.settings, [self.tools[t] for t in self.tools])