Date:2016-09-14 01:00:57 (3 years 10 months ago)
Author:Werner Almesberger
Commit:bc88c3aa4eb599f5cd465f34bd96797d5770dc18
Message:components/gencon.pl: add asymmeric connectors (like D-Sub), name CONN_<n>_<n-1>

Files: components/HIERARCHY (1 diff)
components/gencon.pl (1 diff)

Change Details

components/HIERARCHY
113113        conn_38x2
114114        conn_39x2
115115        conn_40x2
116        conn_2_1
117        conn_3_2
118        conn_4_3
119        conn_5_4
120        conn_6_5
121        conn_7_6
122        conn_8_7
123        conn_9_8
124        conn_10_9
125        conn_11_10
126        conn_12_11
127        conn_13_12
128        conn_14_13
129        conn_15_14
130        conn_16_15
131        conn_17_16
132        conn_18_17
133        conn_19_18
134        conn_20_19
135        conn_21_20
136        conn_22_21
137        conn_23_22
138        conn_24_23
139        conn_25_24
140        conn_26_25
141        conn_27_26
142        conn_28_27
143        conn_29_28
144        conn_30_29
145        conn_31_30
146        conn_32_31
147        conn_33_32
148        conn_34_33
149        conn_35_34
150        conn_36_35
151        conn_37_36
152        conn_38_37
153        conn_39_38
154        conn_40_39
116155    Generic
117156        TESTPOINT
118157        conn_2
components/gencon.pl
3535        print "ENDDRAW\n";
3636        print "ENDDEF\n";
3737    }
38
39    next if $x == 1;
40
41    $name = "CONN_$x" . "_" . ($x - 1);
42    print "#\n# $name\n#\n";
43    print "DEF $name CON 0 40 Y N 1 F N\n";
44    $h = $x / 2 * 100;
45    print "F0 \"CON\" 0 " . ($h + 50) . " 60 H V C CNN\n";
46    print "F1 \"$name\" 0 " . (-$h - 50) . " 60 H V C CNN\n";
47    print "DRAW\n";
48    print "S -100 -$h 100 $h 0 1 0 N\n";
49    for ($px = 1; $px <= $x; $px++) {
50        print "X $px $px -400 " .
51            ($h - $px * 100 + 50) . " 300 R 50 50 1 1 P\n";
52        next if $px == $x;
53        $n = $px + $x;
54        print "X $n $n 400 " .
55            ($h - $px * 100) . " 300 L 50 50 1 1 P\n";
56    }
57    print "ENDDRAW\n";
58    print "ENDDEF\n";
3859}
3960print "#\n#End Library\n";

Archive Download the corresponding diff file

Branches:
master



interactive