mirror of https://github.com/rusefi/gerbmerge.git
parent
0dccdc0328
commit
352c4ef984
|
@ -172,6 +172,7 @@ def writeExcellonHeader(fid):
|
||||||
fid.write("INCH,%s\n" % zerosDef)
|
fid.write("INCH,%s\n" % zerosDef)
|
||||||
else: # metric - mm
|
else: # metric - mm
|
||||||
fid.write("METRIC,%s\n" % zerosDef)
|
fid.write("METRIC,%s\n" % zerosDef)
|
||||||
|
def writeExcellonHeaderEnd(fid):
|
||||||
fid.write('%\n')
|
fid.write('%\n')
|
||||||
|
|
||||||
def writeExcellonFooter(fid):
|
def writeExcellonFooter(fid):
|
||||||
|
@ -180,6 +181,9 @@ def writeExcellonFooter(fid):
|
||||||
def writeExcellonTool(fid, tool, size):
|
def writeExcellonTool(fid, tool, size):
|
||||||
fid.write('%sC%f\n' % (tool, size))
|
fid.write('%sC%f\n' % (tool, size))
|
||||||
|
|
||||||
|
def writeExcellonToolSelection(fid, tool, size):
|
||||||
|
fid.write('%s\n' % (tool))
|
||||||
|
|
||||||
def writeFiducials(fid, drawcode, OriginX, OriginY, MaxXExtent, MaxYExtent):
|
def writeFiducials(fid, drawcode, OriginX, OriginY, MaxXExtent, MaxYExtent):
|
||||||
"""Place fiducials at arbitrary points. The FiducialPoints list in the config specifies
|
"""Place fiducials at arbitrary points. The FiducialPoints list in the config specifies
|
||||||
sets of X,Y co-ordinates. Positive values of X/Y represent offsets from the lower left
|
sets of X,Y co-ordinates. Positive values of X/Y represent offsets from the lower left
|
||||||
|
@ -706,9 +710,13 @@ def merge(opts, args, gui = None):
|
||||||
size = config.GlobalToolMap[tool]
|
size = config.GlobalToolMap[tool]
|
||||||
except:
|
except:
|
||||||
raise RuntimeError, "INTERNAL ERROR: Tool code %s not found in global tool map" % tool
|
raise RuntimeError, "INTERNAL ERROR: Tool code %s not found in global tool map" % tool
|
||||||
|
|
||||||
writeExcellonTool(fid, tool, size)
|
writeExcellonTool(fid, tool, size)
|
||||||
|
|
||||||
|
writeExcellonHeaderEnd(fid)
|
||||||
|
|
||||||
|
for tool in Tools:
|
||||||
|
size = config.GlobalToolMap[tool]
|
||||||
|
writeExcellonToolSelection(fid, tool, size)
|
||||||
#for row in Layout:
|
#for row in Layout:
|
||||||
# row.writeExcellon(fid, size)
|
# row.writeExcellon(fid, size)
|
||||||
for job in Place.jobs:
|
for job in Place.jobs:
|
||||||
|
|
Loading…
Reference in New Issue