1
0
mirror of git://projects.qi-hardware.com/kicad-libs.git synced 2024-11-22 06:55:56 +02:00

components/gencon.pl: add asymmeric connectors (like D-Sub), name CONN_<n>_<n-1>

This commit is contained in:
Werner Almesberger 2016-09-13 20:00:57 -03:00
parent c3ebae8a40
commit bc88c3aa4e
2 changed files with 60 additions and 0 deletions

View File

@ -113,6 +113,45 @@ Connector
conn_38x2
conn_39x2
conn_40x2
conn_2_1
conn_3_2
conn_4_3
conn_5_4
conn_6_5
conn_7_6
conn_8_7
conn_9_8
conn_10_9
conn_11_10
conn_12_11
conn_13_12
conn_14_13
conn_15_14
conn_16_15
conn_17_16
conn_18_17
conn_19_18
conn_20_19
conn_21_20
conn_22_21
conn_23_22
conn_24_23
conn_25_24
conn_26_25
conn_27_26
conn_28_27
conn_29_28
conn_30_29
conn_31_30
conn_32_31
conn_33_32
conn_34_33
conn_35_34
conn_36_35
conn_37_36
conn_38_37
conn_39_38
conn_40_39
Generic
TESTPOINT
conn_2

View File

@ -35,5 +35,26 @@ for ($x = 1; $x <= 40; $x++) {
print "ENDDRAW\n";
print "ENDDEF\n";
}
next if $x == 1;
$name = "CONN_$x" . "_" . ($x - 1);
print "#\n# $name\n#\n";
print "DEF $name CON 0 40 Y N 1 F N\n";
$h = $x / 2 * 100;
print "F0 \"CON\" 0 " . ($h + 50) . " 60 H V C CNN\n";
print "F1 \"$name\" 0 " . (-$h - 50) . " 60 H V C CNN\n";
print "DRAW\n";
print "S -100 -$h 100 $h 0 1 0 N\n";
for ($px = 1; $px <= $x; $px++) {
print "X $px $px -400 " .
($h - $px * 100 + 50) . " 300 R 50 50 1 1 P\n";
next if $px == $x;
$n = $px + $x;
print "X $n $n 400 " .
($h - $px * 100) . " 300 L 50 50 1 1 P\n";
}
print "ENDDRAW\n";
print "ENDDEF\n";
}
print "#\n#End Library\n";