Skip to content

Commit

Permalink
Regression: 4th decimal precision was lost in imperial mode (fixes #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Fenor committed Jan 25, 2022
1 parent d2fff0e commit 36eb23a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gerbmerge/gerbmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,14 @@ def writeExcellonFooter(fid):
fid.write('M30\n')

def writeExcellonTool(fid, tool, size=None):
if size:
fid.write('%sC%.3f\n' % (tool, size))
if size and config.Config['measurementunits'] == 'inch':
fmtstr = '%sC%.4f\n'
elif size:
fmtstr = '%sC%.3f\n'
else:
fid.write('%s\n' % (tool, ))
return
fid.write(fmtstr % (tool, size))

def writeFiducials(fid, drawcode, OriginX, OriginY, MaxXExtent, MaxYExtent):
"""Place fiducials at arbitrary points. The FiducialPoints list in the config specifies
Expand Down

0 comments on commit 36eb23a

Please sign in to comment.