Index: doc-rnd/djopt/unjag.pcb =================================================================== --- doc-rnd/djopt/unjag.pcb (revision 1055) +++ doc-rnd/djopt/unjag.pcb (nonexistent) @@ -1,81 +0,0 @@ -# release: pcb-rnd 1.0.7 - -# To read pcb files, the pcb version (or the git source date) must be >= the file version -FileVersion[20070407] - -PCB["" 140000 67500] - -Grid[2500.0 0 0 1] -Cursor[12500 10000 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" "mm") - -Element["" "Standard SMT resistor, capacitor etc" "R101" "1206" 17500 32500 -5650 4350 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["" "Standard SMT resistor, capacitor etc" "R102" "1206" 65000 12500 -5650 4350 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] - - ) -Layer(1 "component") -( - Line[23405 32500 30000 32500 1000 4000 "clearline"] - Line[30000 22500 37500 22500 1000 4000 "clearline"] - Line[37500 22500 37500 15000 1000 4000 "clearline"] - Line[30000 32500 30000 22500 1000 4000 "clearline"] - Line[37500 15000 45000 15000 1000 4000 "clearline"] - Line[45000 15000 45000 10000 1000 4000 "clearline"] - Line[45000 10000 56595 10000 1000 4000 "clearline"] -) -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") -( -) -NetList() -( - Net("GND" "(unknown)") - ( - Connect("R101-1") - Connect("R102-2") - ) -) Index: doc-rnd/djopt/Makefile =================================================================== --- doc-rnd/djopt/Makefile (nonexistent) +++ doc-rnd/djopt/Makefile (revision 1056) @@ -0,0 +1,47 @@ +PCB=../../src/pcb-rnd +HTML=index.html +CASES = \ + debumpify.$(TARGET) \ + miter.$(TARGET) \ + orthopull.$(TARGET) \ + unjaggy.$(TARGET) \ + vianudge.$(TARGET) \ + viatrim.$(TARGET) + +all: + make conv TARGET=out.png + make conv TARGET=png + make index.html + +index.html: + cat Pre.html > $(HTML) + make conv TARGET=tbl + cat Post.html >>$(HTML) + +conv: $(CASES) + +.SUFFIXES: .pcb .out.pcb .png .out.png .tbl +.PRECIOUS: %.pcb %.out.pcb %.png %.out.png + +.pcb.out.pcb: + echo "OptAutoOnly(); djopt($*); SaveTo(LayoutAs, $*.out.pcb.tmp);"| $(PCB) --gui batch $*.pcb + awk '/Symbol.. . 1800./,/^Attribute/ { next } { print $$0 }' < $*.out.pcb.tmp > $*.out.pcb + rm $*.out.pcb.tmp + +.pcb.tbl: + echo '$*'>>$(HTML) + cat $*.txt >>$(HTML) + echo ' '>>$(HTML) + +.pcb.png: + $(PCB) -x png --dpi 300 $*.pcb + +out.pcb.out.png: + $(PCB) -x png --dpi 300 $*.out.pcb + +clean: + rm *.out.pcb *.png index.html 2>/dev/null; true + + + + Index: doc-rnd/djopt/Post.html =================================================================== --- doc-rnd/djopt/Post.html (nonexistent) +++ doc-rnd/djopt/Post.html (revision 1056) @@ -0,0 +1,4 @@ +autorun all the above except miter; run them multiple times until there's no more change possible     + + + Index: doc-rnd/djopt/Pre.html =================================================================== --- doc-rnd/djopt/Pre.html (nonexistent) +++ doc-rnd/djopt/Pre.html (revision 1056) @@ -0,0 +1,13 @@ + + +

Action djopt()

+ +The different types of optimizations change your board in order to +reduce the total trace length and via count. Each optimization is accessible +using an argument, e.g. djopt(miter). The basic actions have to be run multiple +times as each iteration will change the design making new changes possible for +subsequent iterations with the same or other actions. +

+ + +
argument name description example in example out after 1st iteration Index: doc-rnd/djopt/debumpify.txt =================================================================== --- doc-rnd/djopt/debumpify.txt (nonexistent) +++ doc-rnd/djopt/debumpify.txt (revision 1056) @@ -0,0 +1,2 @@ +Looks for U-shaped traces (with 90 degree corners) that can be shortened +or eliminated. Index: doc-rnd/djopt/index.html =================================================================== --- doc-rnd/djopt/index.html (nonexistent) +++ doc-rnd/djopt/index.html (revision 1056) @@ -0,0 +1,44 @@ + + +

Action djopt()

+ +The different types of optimizations change your board in order to +reduce the total trace length and via count. Each optimization is accessible +using an argument, e.g. djopt(miter). The basic actions have to be run multiple +times as each iteration will change the design making new changes possible for +subsequent iterations with the same or other actions. +

+ + +
argument name description example in example out after 1st iteration +
debumpify +Looks for U-shaped traces (with 90 degree corners) that can be shortened +or eliminated. + +
miter +Replaces 90 degree corners with a pair of 45 degree corners, to reduce +RF losses and trace length. + +
orthopull +Looks for chains of traces all going in one direction, with more +traces orthogonal on one side than on the other. Moves the chain in +that direction, causing a net reduction in trace length, possibly +eliminating traces and/or corners. + +
unjaggy +Looks for corners which could be flipped to eliminate one or more +corners (i.e. jaggy lines become simpler). + +
vianudge +Looks for vias where all traces leave in the same direction. Tries to +move via in that direction to eliminate one of the traces (and thus a +corner). + +
viatrim +Looks for traces that go from via to via, where moving that trace to a +different layer eliminates one or both vias. + +
autorun all the above except miter; run them multiple times until there's no more change possible     +
+ + Index: doc-rnd/djopt/miter.txt =================================================================== --- doc-rnd/djopt/miter.txt (nonexistent) +++ doc-rnd/djopt/miter.txt (revision 1056) @@ -0,0 +1,2 @@ +Replaces 90 degree corners with a pair of 45 degree corners, to reduce +RF losses and trace length. Index: doc-rnd/djopt/orthopull.txt =================================================================== --- doc-rnd/djopt/orthopull.txt (nonexistent) +++ doc-rnd/djopt/orthopull.txt (revision 1056) @@ -0,0 +1,4 @@ +Looks for chains of traces all going in one direction, with more +traces orthogonal on one side than on the other. Moves the chain in +that direction, causing a net reduction in trace length, possibly +eliminating traces and/or corners. Index: doc-rnd/djopt/unjaggy.pcb =================================================================== --- doc-rnd/djopt/unjaggy.pcb (nonexistent) +++ doc-rnd/djopt/unjaggy.pcb (revision 1056) @@ -0,0 +1,81 @@ +# release: pcb-rnd 1.0.7 + +# To read pcb files, the pcb version (or the git source date) must be >= the file version +FileVersion[20070407] + +PCB["" 140000 67500] + +Grid[2500.0 0 0 1] +Cursor[12500 10000 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" "mm") + +Element["" "Standard SMT resistor, capacitor etc" "R101" "1206" 17500 32500 -5650 4350 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["" "Standard SMT resistor, capacitor etc" "R102" "1206" 65000 12500 -5650 4350 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] + + ) +Layer(1 "component") +( + Line[23405 32500 30000 32500 1000 4000 "clearline"] + Line[30000 22500 37500 22500 1000 4000 "clearline"] + Line[37500 22500 37500 15000 1000 4000 "clearline"] + Line[30000 32500 30000 22500 1000 4000 "clearline"] + Line[37500 15000 45000 15000 1000 4000 "clearline"] + Line[45000 15000 45000 10000 1000 4000 "clearline"] + Line[45000 10000 56595 10000 1000 4000 "clearline"] +) +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") +( +) +NetList() +( + Net("GND" "(unknown)") + ( + Connect("R101-1") + Connect("R102-2") + ) +) Index: doc-rnd/djopt/unjaggy.txt =================================================================== --- doc-rnd/djopt/unjaggy.txt (nonexistent) +++ doc-rnd/djopt/unjaggy.txt (revision 1056) @@ -0,0 +1,2 @@ +Looks for corners which could be flipped to eliminate one or more +corners (i.e. jaggy lines become simpler). Index: doc-rnd/djopt/vianudge.txt =================================================================== --- doc-rnd/djopt/vianudge.txt (nonexistent) +++ doc-rnd/djopt/vianudge.txt (revision 1056) @@ -0,0 +1,3 @@ +Looks for vias where all traces leave in the same direction. Tries to +move via in that direction to eliminate one of the traces (and thus a +corner). Index: doc-rnd/djopt/viatrim.txt =================================================================== --- doc-rnd/djopt/viatrim.txt (nonexistent) +++ doc-rnd/djopt/viatrim.txt (revision 1056) @@ -0,0 +1,2 @@ +Looks for traces that go from via to via, where moving that trace to a +different layer eliminates one or both vias.