auto-sync

This commit is contained in:
rusEfi 2017-02-05 20:04:28 -05:00
parent dfb79c592e
commit 09f5cd1070
4 changed files with 1507 additions and 11 deletions

View File

@ -12,7 +12,7 @@ AllowMissingLayers = 0
searchtimeout = 10
[MergeOutputFiles]
Prefix = %(projdir)s/merged2
Prefix = %(projdir)s/merged2layer
*TopLayer=%(prefix)s/Top.gbr
*BottomLayer=%(prefix)s/Bottom.gbr
*TopSilkscreen=%(prefix)s/TopSilk.gbr
@ -24,16 +24,16 @@ BoardOutline=%(prefix)s/BoardOutline.gbr
ToolList = %(prefix)s/Tools.drl
Placement = %(prefix)s/Placement.txt
[aa]
Prefix=%(projdir)s/aa
*TopLayer=%(prefix)s/Top.gbr
*BottomLayer=%(prefix)s/Bottom.gbr
*TopSilkscreen=%(prefix)s/TopSilk.gbr
*TopSoldermask=%(prefix)s/TopMask.gbr
*BottomSilkscreen=%(prefix)s/BottomSilk.gbr
*BottomSoldermask=%(prefix)s/BottomMask.gbr
Drills=%(prefix)s/Through.drl
BoardOutline=%(prefix)s/BoardOutline.gbr
[brain100]
Prefix=%(projdir)s/../brain_board/gerber/brain_board_STM32F407_R0.3/brain_board_STM32F407
*TopLayer=%(prefix)s-F.Cu.gtl
*BottomLayer=%(prefix)s-B.Cu.gbl
*TopSilkscreen=%(prefix)s-F.SilkS.gto
*TopSoldermask=%(prefix)s-F.Mask.gts
*BottomSilkscreen=%(prefix)s-B.SilkS.gbo
*BottomSoldermask=%(prefix)s-B.Mask.gbs
Drills=%(prefix)s_gm.drl
BoardOutline=%(prefix)s-Edge.Cuts.gm1
Repeat = 10

1426
hardware/gerbmerge/jobs.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
#!/usr/bin/python
# Copyright 2012 by Wayne C. Gramlich
#
# ki2gm.py is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ki2gm.py is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# The complete text of the license can be found at:
#
# http://www.gnu.org/licenses/.
# This program takes a KiCAD .drl file and converts it to
# a .drl file that can be read by the gerbmerge program.
# The gerbmege program can be found at:
#
# http://ruggedcircuits.com/gerbmerge/
import sys
def main():
""" ki2gm: This program takes a KiCAD .drl file an converts it
to a .drl file that can be used by gerbmerge. """
args = sys.argv
if len(args) < 3:
print "Usage: ki2gm in.drl out.drl"
else:
# Do argument checking:
in_file_name = args[1]
out_file_name = args[2]
assert in_file_name != out_file_name, \
"Input file '{0}' must be different from output file name {1}". \
format(in_file_name, out_file_name)
assert in_file_name.endswith(".drl"), \
"Input file '{0}' must end with .drl suffix".format(in_file_name)
assert out_file_name.endswith(".drl"), \
"Output file '{0}' must end with .drl suffix".format(out_file_name)
# Read in {in_file_name}:
in_file = open(in_file_name, "r")
lines = in_file.readlines()
in_file.close()
# Create {mappings} table:
mappings = {}
mappings["G90\n"] = ";G90\n"
mappings["G05\n"] = ";G05\n"
mappings["FMAT,2\n"] = ";FMAT,2\n"
mappings["T0\n"] = ";T0\n"
# Output the modified .drl file:
out_file = open(out_file_name, "w")
for line in lines:
# Remap any {line} that needs to be changed:
if line in mappings:
line = mappings[line]
out_file.write(line)
out_file.close()
main()

View File

@ -1,4 +1,7 @@
rd /s /q merged2layer
mkdir merged2layer
c:\Python26\python.exe ki2gm.py ../brain_board/gerber/brain_board_STM32F407_R0.3/brain_board_STM32F407.drl ../brain_board/gerber/brain_board_STM32F407_R0.3/brain_board_STM32F407_gm.drl
c:\Python26\python.exe gerbmerge.py brain2layer.cfg