Index: trunk/tests/gsch2pcb-rnd/Makefile.common =================================================================== --- trunk/tests/gsch2pcb-rnd/Makefile.common (nonexistent) +++ trunk/tests/gsch2pcb-rnd/Makefile.common (revision 2261) @@ -0,0 +1,9 @@ +CONF = \ + -c rc/library_search_paths+=$(TRUNK)/pcblib \ + -c rc/default_pcb_file=$(TRUNK)/src/default.pcb + +GSCH2PCB = $(TRUNK)/util/gsch2pcb-rnd/gsch2pcb-rnd + +DIFF = diff -u + +FORCE: Index: trunk/tests/gsch2pcb-rnd/simple/Makefile =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/Makefile (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/Makefile (revision 2261) @@ -0,0 +1,9 @@ +TRUNK=../../.. +all: + +include ../Makefile.common + +test: FORCE + @rm main.pcb main.pcb.new main.cmd main.net main.out 2>/dev/null; true + @$(GSCH2PCB) $(CONF) main.sch > main.out + @$(DIFF) main.pcb.ref main.pcb Index: trunk/tests/gsch2pcb-rnd/simple/main.cmd.ref =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/main.cmd.ref (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/main.cmd.ref (revision 2261) @@ -0,0 +1,26 @@ +# Pin name action command file + +# Start of element C3 +ChangePinName(C3, 2, 2) +ChangePinName(C3, 1, 1) + +# Start of element CONN2 +ChangePinName(CONN2, 2, 2) +ChangePinName(CONN2, 1, 1) + +# Start of element CONN1 +ChangePinName(CONN1, 2, 2) +ChangePinName(CONN1, 1, 1) + +# Start of element C1 +ChangePinName(C1, 2, -) +ChangePinName(C1, 1, +) + +# Start of element C2 +ChangePinName(C2, 2, 2) +ChangePinName(C2, 1, 1) + +# Start of element U1 +ChangePinName(U1, 3, 3) +ChangePinName(U1, 2, 2) +ChangePinName(U1, 1, 1) Index: trunk/tests/gsch2pcb-rnd/simple/main.net.ref =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/main.net.ref (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/main.net.ref (revision 2261) @@ -0,0 +1,3 @@ +unnamed_net2 C3-2 CONN2-1 U1-3 +GND C3-1 CONN2-2 CONN1-2 C1-2 C2-1 U1-2 +unnamed_net1 C2-2 C1-1 CONN1-1 U1-1 Index: trunk/tests/gsch2pcb-rnd/simple/main.out.ref =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/main.out.ref (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/main.out.ref (revision 2261) @@ -0,0 +1,20 @@ + ../../../src/default.pcb -> 0 + +---------------------------------- +Done processing. Work performed: +6 file elements added to main.pcb. + +Next step: +1. Run pcb on your file main.pcb. + You will find all your footprints in a bundle ready for you to place + or disperse with "Select -> Disperse all elements" in PCB. + +2. From within PCB, select "File -> Load netlist file" and select + main.net to load the netlist. + +3. From within PCB, enter + + :ExecuteFile(main.cmd) + + to propagate the pin names of all footprints to the layout. + Index: trunk/tests/gsch2pcb-rnd/simple/main.pcb.ref =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/main.pcb.ref (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/main.pcb.ref (revision 2261) @@ -0,0 +1,136 @@ +# release: pcb 20110918 + +# To read pcb files, the pcb version (or the git source date) must be >= the file version +FileVersion[20070407] + +PCB["" 600000 500000] + +Grid[2500.0 0 0 1] +Cursor[2500 62500 0.000000] +PolyArea[3100.006200] +Thermal[0.500000] +DRC[1200 900 1000 700 1500 1000] +Flags("nameonpcb,clearnew,snappin") +Groups("1,3,4,c:2,5,6,s:7:8") +Styles["Signal,1000,7874,3150,2000:Power,2000,8661,3937,2000:Fat,8000,13780,4724,2500:Sig-tight,1000,6400,3150,1200"] + +Attribute("PCB::grid::unit" "mil") +Layer(1 "component") +( +) +Layer(2 "solder") +( +) +Layer(3 "comp-GND") +( +) +Layer(4 "comp-power") +( +) +Layer(5 "sold-GND") +( +) +Layer(6 "sold-power") +( +) +Layer(7 "signal3") +( +) +Layer(8 "outline") +( +) +Layer(9 "silk") +( +) +Layer(10 "silk") +( +) + +Element[0x00000000 "1206" "C3" "unknown" 0 0 -3150 -3150 0 100 ""] +( + Pad[-5905 -1181 + -5905 1181 + 5118 2000 5718 "1" "1" "square"] + Pad[5905 -1181 + 5905 1181 + 5118 2000 5718 "2" "2" "square"] + ElementLine[-2362 -3740 2362 -3740 800] + ElementLine[-2362 3740 2362 3740 800] +) +Element["" "connector(1,2)" "CONN2" "unknown" 0 0 0 -10000 0 100 ""] +( + Pin[0 0 8000 5000 8600 3937 "" "1" "square"] + Pin[0 10000 8000 5000 8600 3937 "" "2" ""] + ElementLine[-5000 -5000 -5000 15000 1000] + ElementLine[-5000 -5000 5000 -5000 1000] + ElementLine[5000 15000 -5000 15000 1000] + ElementLine[5000 15000 5000 -5000 1000] + ElementLine[-5000 5000 5000 5000 1000] + ElementLine[5000 -5000 5000 5000 1000] +) +Element["" "connector(1,2)" "CONN1" "unknown" 0 0 0 -10000 0 100 ""] +( + Pin[0 0 8000 5000 8600 3937 "" "1" "square"] + Pin[0 10000 8000 5000 8600 3937 "" "2" ""] + ElementLine[-5000 -5000 -5000 15000 1000] + ElementLine[-5000 -5000 5000 -5000 1000] + ElementLine[5000 15000 -5000 15000 1000] + ElementLine[5000 15000 5000 -5000 1000] + ElementLine[-5000 5000 5000 5000 1000] + ElementLine[5000 -5000 5000 5000 1000] +) + +Element(0x00 "TANT_A" "C1" "unknown" 0 0 106 0 3 100 0x00) +( + ElementLine(-96 -43 -96 43 20) + ElementLine(-96 43 -72 55 10) + ElementLine(-72 55 86 55 10) + ElementLine(86 55 86 -55 10) + ElementLine(86 -55 -72 -55 10) + ElementLine(-72 -55 -96 -43 10) + Pad(-50 -18 + -50 18 + 49 20 55 "1" "1" 0x00000100) + Pad(50 -18 + 50 18 + 49 20 55 "2" "2" 0x00000100) +) + +Element[0x00000000 "1206" "C2" "unknown" 0 0 -3150 -3150 0 100 ""] +( + Pad[-5905 -1181 + -5905 1181 + 5118 2000 5718 "1" "1" "square"] + Pad[5905 -1181 + 5905 1181 + 5118 2000 5718 "2" "2" "square"] + ElementLine[-2362 -3740 2362 -3740 800] + ElementLine[-2362 3740 2362 3740 800] +) +Element(0x00 "TO220" "U1" "unknown" 0 0 1 100 0x00) +( + Pin(100 800 90 60 "1" 0x101) + Pin(200 800 90 60 "2" 0x01) + Pin(300 800 90 60 "3" 0x01) + Pin(200 130 150 130 "4" 0x01) + ElementLine(100 800 100 620 30) + ElementLine(200 800 200 620 30) + ElementLine(300 800 300 620 30) + ElementLine( 0 620 400 620 20) + ElementLine(400 620 400 245 20) + ElementLine(400 245 0 245 20) + ElementLine( 0 245 0 620 20) + ElementLine( 0 245 400 245 20) + ElementLine(400 245 400 120 20) + ElementLine(400 120 385 120 20) + ElementLine(385 120 385 50 20) + ElementLine(385 50 400 50 20) + ElementLine(400 50 400 10 20) + ElementLine(400 10 0 10 20) + ElementLine( 0 10 0 50 20) + ElementLine( 0 50 15 50 20) + ElementLine( 15 50 15 120 20) + ElementLine( 15 120 0 120 20) + ElementLine( 0 120 0 245 20) + Mark(200 800) +) Index: trunk/tests/gsch2pcb-rnd/simple/main.sch =================================================================== --- trunk/tests/gsch2pcb-rnd/simple/main.sch (nonexistent) +++ trunk/tests/gsch2pcb-rnd/simple/main.sch (revision 2261) @@ -0,0 +1,80 @@ +v 20130925 2 +C 27800 50500 1 0 0 lm7805-1.sym +{ +T 29400 51800 5 10 0 0 0 0 1 +device=7805 +T 29200 51500 5 10 1 1 0 6 1 +refdes=U1 +T 28100 51500 5 10 1 1 0 0 1 +footprint=TO220 +} +C 27700 50000 1 90 0 capacitor-1.sym +{ +T 27000 50200 5 10 0 0 90 0 1 +device=CAPACITOR +T 27800 50600 5 10 1 1 90 0 1 +refdes=C2 +T 26800 50200 5 10 0 0 90 0 1 +symversion=0.1 +T 27800 49900 5 10 1 1 90 0 1 +footprint=1206 +} +C 26500 50900 1 270 0 capacitor-2.sym +{ +T 27200 50700 5 10 0 0 270 0 1 +device=POLARIZED_CAPACITOR +T 26400 49700 5 10 1 1 90 0 1 +refdes=C1 +T 27400 50700 5 10 0 0 270 0 1 +symversion=0.1 +T 26400 50100 5 10 1 1 90 0 1 +footprint=TANT_A +} +C 25700 50300 1 0 1 connector2-2.sym +{ +T 25000 51600 5 10 1 1 0 0 1 +refdes=CONN1 +T 25400 51550 5 10 0 0 0 6 1 +device=CONNECTOR_2 +T 25400 51750 5 10 0 0 0 6 1 +footprint=connector(1,2) +} +N 25700 51100 27800 51100 4 +C 31700 50300 1 0 0 connector2-2.sym +{ +T 32400 51600 5 10 1 1 0 6 1 +refdes=CONN2 +T 32000 51550 5 10 0 0 0 0 1 +device=CONNECTOR_2 +T 32000 51750 5 10 0 0 0 0 1 +footprint=connector(1,2) +} +N 31700 51100 29400 51100 4 +C 30100 50000 1 90 0 capacitor-1.sym +{ +T 29400 50200 5 10 0 0 90 0 1 +device=CAPACITOR +T 30200 50600 5 10 1 1 90 0 1 +refdes=C3 +T 29200 50200 5 10 0 0 90 0 1 +symversion=0.1 +T 30200 49900 5 10 1 1 90 0 1 +footprint=1206 +} +N 25700 50700 26000 50700 4 +N 26000 50700 26000 49300 4 +N 31700 50700 31500 50700 4 +N 31500 50700 31500 49300 4 +N 26700 50900 26700 51100 4 +N 27500 50900 27500 51100 4 +N 29900 50900 29900 51100 4 +N 28600 50500 28600 49300 4 +C 28500 49000 1 0 0 gnd-1.sym +C 29800 49000 1 0 0 gnd-1.sym +C 31400 49000 1 0 0 gnd-1.sym +C 27400 49000 1 0 0 gnd-1.sym +C 26600 49000 1 0 0 gnd-1.sym +C 25900 49000 1 0 0 gnd-1.sym +N 26700 49300 26700 50000 4 +N 27500 49300 27500 50000 4 +N 29900 49300 29900 50000 4