fix a issue that coordinate normalization for excellon is imperfect
This commit is contained in:
parent
242dc2ae17
commit
d7a0693242
3 changed files with 7 additions and 4 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue