Commit 94e51aa3 authored by jean-pierre charras's avatar jean-pierre charras

Code cleaning. Minor fixes. Better link to gnucap.

Fixed a minor issue when creating a netlist: for nets having global labels, global label names were ignored when searching a name for this net.
parents 80715622 6190502d
PCBNEW-LibModule-V1
$INDEX
LOGO
$EndINDEX
#
# LOGO
# pixmap w = 229, h = 270
#
$MODULE LOGO
Po 0 0 0 15 00000000 00000000 ~~
T0 0 4800 600 600 0 120 N I 21 "G***"
T1 0 -4800 600 600 0 120 N I 21 "LOGO"
DP 0 0 0 0 5 1 21
Dl -3783 4516
Dl -3766 -4466
Dl 3850 -4483
Dl -3800 -4500
Dl -3783 4516
DP 0 0 0 0 390 1 21
Dl 1632 4131
Dl 1638 4131
Dl 1780 4126
Dl 1890 4102
Dl 2002 4043
Dl 2149 3930
Dl 2363 3747
Dl 2609 3558
Dl 2925 3367
Dl 2953 3353
Dl 3208 3199
Dl 3374 3049
Dl 3430 2920
Dl 3427 2889
Dl 3408 2899
Dl 3352 2984
Dl 3273 3033
Dl 3265 3034
Dl 3196 3087
Dl 3127 3137
Dl 2968 3224
Dl 2766 3322
Dl 2565 3409
Dl 2409 3464
Dl 2322 3492
Dl 2250 3532
Dl 2193 3578
Dl 2046 3649
Dl 1874 3708
Dl 1736 3733
Dl 1669 3729
Dl 1582 3691
Dl 1484 3578
Dl 1479 3570
Dl 1408 3458
Dl 1371 3333
Dl 1360 3154
Dl 1369 2883
Dl 1374 2686
Dl 1361 2510
Dl 1318 2351
Dl 1286 2218
Dl 1266 2017
Dl 1257 1890
Dl 1233 1816
Dl 1230 1815
Dl 1208 1871
Dl 1199 2043
Dl 1199 2110
Dl 1190 2365
Dl 1158 2536
Dl 1091 2664
Dl 977 2790
Dl 920 2843
Dl 516 3128
Dl 70 3289
Dl -404 3323
Dl -637 3292
Dl -853 3202
Dl -1017 3037
Dl -1126 2886
Dl -999 2829
Dl -983 2821
Dl -843 2712
Dl -822 2563
Dl -822 2562
Dl -856 2472
Dl -936 2370
Dl -1082 2234
Dl -1316 2041
Dl -1493 1900
Dl -1665 1757
Dl -1767 1658
Dl -1816 1577
Dl -1831 1491
Dl -1832 1376
Dl -1818 1157
Dl -1783 920
Dl -1783 919
Dl -1720 715
Dl -1617 463
Dl -1494 206
Dl -1372 -10
Dl -1272 -144
Dl -1237 -179
Dl -1193 -249
Dl -1222 -335
Dl -1248 -399
Dl -1243 -481
Dl -1185 -620
Dl -1093 -804
Dl -979 -1005
Dl -973 -1016
Dl -889 -1183
Dl -877 -1295
Dl -885 -1396
Dl -865 -1410
Dl -865 -2009
Dl -930 -2105
Dl -953 -2213
Dl -966 -2390
Dl -966 -2426
Dl -943 -2572
Dl -861 -2701
Dl -786 -2787
Dl -733 -2833
Dl -692 -2808
Dl -592 -2724
Dl -547 -2679
Dl -450 -2495
Dl -476 -2314
Dl -523 -2224
Dl -543 -2349
Dl -559 -2417
Dl -638 -2554
Dl -744 -2596
Dl -848 -2525
Dl -897 -2373
Dl -832 -2172
Dl -798 -2106
Dl -784 -2031
Dl -794 -2018
Dl -865 -2009
Dl -865 -1410
Dl -838 -1429
Dl -731 -1345
Dl -637 -1263
Dl -471 -1159
Dl -412 -1136
Dl -412 -1333
Dl -483 -1366
Dl -484 -1369
Dl -453 -1399
Dl -412 -1380
Dl -412 -1473
Dl -617 -1494
Dl -737 -1573
Dl -743 -1597
Dl -719 -1723
Dl -644 -1899
Dl -626 -1935
Dl -600 -2011
Dl -580 -2047
Dl -496 -2136
Dl -472 -2157
Dl -369 -2218
Dl -221 -2228
Dl -123 -2221
Dl -125 -2209
Dl -133 -2208
Dl -197 -2165
Dl -133 -2116
Dl -123 -2113
Dl -33 -2118
Dl -18 -2168
Dl -24 -2193
Dl 49 -2183
Dl 233 -2099
Dl 245 -2094
Dl 391 -2027
Dl 478 -1999
Dl 495 -1996
Dl 495 -2037
Dl 423 -2065
Dl 467 -2158
Dl 520 -2276
Dl 512 -2442
Dl 434 -2577
Dl 303 -2633
Dl 230 -2607
Dl 138 -2490
Dl 98 -2320
Dl 97 -2183
Dl 31 -2262
Dl -55 -2423
Dl -45 -2589
Dl 74 -2708
Dl 142 -2741
Dl 313 -2816
Dl 412 -2842
Dl 473 -2829
Dl 484 -2822
Dl 533 -2739
Dl 536 -2719
Dl 596 -2627
Dl 644 -2561
Dl 685 -2383
Dl 659 -2182
Dl 614 -2083
Dl 532 -2040
Dl 495 -2037
Dl 495 -1996
Dl 506 -1993
Dl 604 -1935
Dl 656 -1882
Dl 640 -1827
Dl 614 -1805
Dl 569 -1828
Dl 561 -1839
Dl 511 -1850
Dl 413 -1805
Dl 236 -1690
Dl 89 -1608
Dl -108 -1528
Dl -159 -1513
Dl -412 -1473
Dl -412 -1380
Dl -383 -1366
Dl -381 -1363
Dl -412 -1333
Dl -412 -1136
Dl -399 -1131
Dl -220 -1110
Dl -22 -1170
Dl 232 -1318
Dl 324 -1377
Dl 514 -1477
Dl 628 -1491
Dl 684 -1425
Dl 697 -1388
Dl 760 -1249
Dl 850 -1065
Dl 884 -995
Dl 985 -757
Dl 1053 -548
Dl 1117 -358
Dl 1203 -199
Dl 1383 97
Dl 1511 450
Dl 1536 567
Dl 1577 892
Dl 1589 1224
Dl 1567 1496
Dl 1556 1560
Dl 1545 1685
Dl 1569 1735
Dl 1579 1744
Dl 1583 1813
Dl 1535 1967
Dl 1534 1970
Dl 1486 2117
Dl 1481 2211
Dl 1516 2321
Dl 1522 2335
Dl 1658 2502
Dl 1859 2582
Dl 2077 2554
Dl 2078 2554
Dl 2201 2473
Dl 2339 2346
Dl 2453 2214
Dl 2499 2120
Dl 2526 2030
Dl 2595 1887
Dl 2618 1845
Dl 2736 1510
Dl 2760 1129
Dl 2690 686
Dl 2526 166
Dl 2419 -91
Dl 2285 -326
Dl 2107 -549
Dl 2084 -575
Dl 1788 -972
Dl 1513 -1466
Dl 1410 -1707
Dl 1349 -1962
Dl 1333 -2269
Dl 1331 -2416
Dl 1285 -2920
Dl 1171 -3320
Dl 982 -3631
Dl 710 -3865
Dl 349 -4036
Dl 179 -4082
Dl -197 -4100
Dl -546 -4006
Dl -639 -3959
Dl -881 -3774
Dl -1056 -3508
Dl -1150 -3316
Dl -1150 -1281
Dl -1262 -1095
Dl -1314 -1016
Dl -1453 -826
Dl -1612 -629
Dl -1622 -616
Dl -1775 -422
Dl -1887 -238
Dl -1983 -19
Dl -2086 281
Dl -2109 349
Dl -2204 591
Dl -2300 793
Dl -2310 812
Dl -2400 976
Dl -2460 1087
Dl -2484 1146
Dl -2519 1309
Dl -2527 1476
Dl -2503 1579
Dl -2486 1643
Dl -2536 1765
Dl -2631 1904
Dl -2761 1977
Dl -2975 2009
Dl -2990 2010
Dl -3154 2034
Dl -3249 2066
Dl -3294 2122
Dl -3338 2308
Dl -3323 2604
Dl -3321 2625
Dl -3304 2811
Dl -3316 2944
Dl -3361 3099
Dl -3407 3256
Dl -3427 3451
Dl -3365 3565
Dl -3216 3619
Dl -3085 3647
Dl -2900 3701
Dl -2717 3757
Dl -2500 3813
Dl -2192 3895
Dl -1716 4063
Dl -1618 4091
Dl -1618 3724
Dl -1877 3667
Dl -2040 3621
Dl -2194 3587
Dl -2223 3583
Dl -2405 3553
Dl -2631 3514
Dl -2857 3472
Dl -3038 3437
Dl -3132 3416
Dl -3176 3385
Dl -3212 3269
Dl -3178 3139
Dl -3169 3121
Dl -3143 2964
Dl -3148 2711
Dl -3185 2390
Dl -3188 2367
Dl -3179 2222
Dl -3088 2153
Dl -2893 2138
Dl -2693 2117
Dl -2509 2005
Dl -2421 1802
Dl -2395 1718
Dl -2299 1601
Dl -2175 1580
Dl -2092 1629
Dl -1936 1793
Dl -1734 2069
Dl -1482 2464
Dl -1128 3045
Dl -1150 3247
Dl -1168 3355
Dl -1249 3572
Dl -1367 3700
Dl -1418 3719
Dl -1618 3724
Dl -1618 4091
Dl -1549 4111
Dl -1325 4130
Dl -1156 4095
Dl -1096 4057
Dl -973 3961
Dl -901 3905
Dl -829 3866
Dl -823 3866
Dl -748 3819
Dl -729 3806
Dl -585 3769
Dl -337 3745
Dl -7 3736
Dl 382 3744
Dl 652 3757
Dl 868 3774
Dl 998 3797
Dl 1067 3833
Dl 1100 3885
Dl 1142 3947
Dl 1256 4047
Dl 1334 4094
Dl 1450 4125
Dl 1632 4131
DP 0 0 0 0 5 1 21
Dl 3387 2800
Dl 3383 2766
Dl 3346 2733
Dl 3350 2766
Dl 3387 2800
DP 0 0 0 0 5 1 21
Dl 3283 2733
Dl 3300 2716
Dl 3283 2700
Dl 3266 2716
Dl 3283 2733
DP 0 0 0 0 5 1 21
Dl 3216 2700
Dl 3233 2683
Dl 3216 2666
Dl 3200 2683
Dl 3216 2700
DP 0 0 0 0 9 1 21
Dl 3129 2633
Dl 3119 2613
Dl 3050 2533
Dl 2990 2474
Dl 2937 2433
Dl 2946 2453
Dl 3016 2533
Dl 3076 2591
Dl 3129 2633
DP 0 0 0 0 5 1 21
Dl 2920 2400
Dl 2916 2366
Dl 2879 2333
Dl 2883 2366
Dl 2920 2400
DP 0 0 0 0 7 1 21
Dl 2812 2179
Dl 2823 2175
Dl 2825 2161
Dl 2823 2025
Dl 2814 2012
Dl 2809 2100
Dl 2812 2179
$EndMODULE LOGO
$EndLIBRARY
PCBNEW-LibModule-V1
$INDEX
LOGO
$EndINDEX
#
# LOGO
# pixmap w = 229, h = 270
#
$MODULE LOGO
Po 0 0 0 15 00000000 00000000 ~~
T0 0 4800 600 600 0 120 N I 21 "G***"
T1 0 -4800 600 600 0 120 N I 21 "LOGO"
DP 0 0 0 0 5 1 21
Dl -3783 4516
Dl -3766 -4466
Dl 3850 -4483
Dl -3800 -4500
Dl -3783 4516
DP 0 0 0 0 374 1 21
Dl 1586 4128
Dl 1741 4127
Dl 1914 4087
Dl 2086 3984
Dl 2299 3797
Dl 2405 3706
Dl 2593 3565
Dl 2790 3434
Dl 2958 3337
Dl 3061 3300
Dl 3100 3266
Dl 3141 3233
Dl 3183 3218
Dl 3268 3162
Dl 3338 3098
Dl 3343 3067
Dl 3281 3102
Dl 3276 3107
Dl 3189 3159
Dl 3027 3244
Dl 2829 3342
Dl 2634 3436
Dl 2479 3505
Dl 2402 3533
Dl 2382 3539
Dl 2296 3595
Dl 2249 3627
Dl 2059 3716
Dl 1845 3777
Dl 1678 3788
Dl 1640 3780
Dl 1454 3667
Dl 1338 3469
Dl 1319 3353
Dl 1305 3143
Dl 1299 2894
Dl 1299 2844
Dl 1294 2599
Dl 1279 2454
Dl 1251 2381
Dl 1236 2362
Dl 1207 2349
Dl 1201 2444
Dl 1189 2532
Dl 1134 2627
Dl 1008 2763
Dl 936 2831
Dl 528 3122
Dl 80 3288
Dl -401 3325
Dl -608 3301
Dl -844 3210
Dl -1024 3038
Dl -1134 2893
Dl -992 2821
Dl -954 2801
Dl -865 2731
Dl -839 2625
Dl -837 2569
Dl -862 2466
Dl -947 2359
Dl -1116 2214
Dl -1179 2163
Dl -1377 2002
Dl -1579 1835
Dl -1841 1616
Dl -1824 1266
Dl -1819 1172
Dl -1786 912
Dl -1724 699
Dl -1692 618
Dl -1583 370
Dl -1465 134
Dl -1367 -33
Dl -1364 -38
Dl -1314 -165
Dl -1273 -345
Dl -1257 -430
Dl -1191 -626
Dl -1068 -856
Dl -980 -1011
Dl -917 -1160
Dl -900 -1283
Dl -888 -1401
Dl -868 -1420
Dl -868 -1985
Dl -915 -2076
Dl -948 -2201
Dl -966 -2388
Dl -966 -2389
Dl -948 -2566
Dl -878 -2706
Dl -813 -2784
Dl -737 -2832
Dl -721 -2830
Dl -620 -2763
Dl -512 -2643
Dl -448 -2523
Dl -443 -2483
Dl -468 -2328
Dl -511 -2224
Dl -552 -2363
Dl -560 -2387
Dl -644 -2554
Dl -745 -2602
Dl -848 -2525
Dl -897 -2371
Dl -830 -2170
Dl -817 -2147
Dl -781 -2061
Dl -813 -2005
Dl -825 -1993
Dl -868 -1985
Dl -868 -1420
Dl -836 -1450
Dl -745 -1373
Dl -541 -1197
Dl -400 -1160
Dl -400 -1304
Dl -476 -1320
Dl -477 -1322
Dl -491 -1381
Dl -476 -1382
Dl -476 -1470
Dl -650 -1498
Dl -674 -1510
Dl -778 -1593
Dl -786 -1603
Dl -817 -1655
Dl -801 -1727
Dl -730 -1867
Dl -632 -2020
Dl -543 -2102
Dl -518 -2114
Dl -466 -2178
Dl -459 -2204
Dl -368 -2255
Dl -216 -2267
Dl -52 -2234
Dl 2 -2214
Dl 26 -2228
Dl -18 -2327
Dl -40 -2384
Dl -60 -2540
Dl -51 -2589
Dl 0 -2668
Dl 133 -2759
Dl 241 -2816
Dl 411 -2854
Dl 513 -2783
Dl 528 -2757
Dl 606 -2639
Dl 638 -2586
Dl 684 -2413
Dl 677 -2232
Dl 622 -2090
Dl 526 -2032
Dl 520 -2031
Dl 483 -2021
Dl 558 -1983
Dl 616 -1953
Dl 662 -1883
Dl 647 -1744
Dl 641 -1722
Dl 532 -1594
Dl 324 -1498
Dl 305 -1493
Dl 235 -1496
Dl 269 -1559
Dl 399 -1666
Dl 517 -1756
Dl 565 -1808
Dl 552 -1831
Dl 457 -1806
Dl 266 -1699
Dl 248 -1688
Dl 55 -1585
Dl -114 -1516
Dl -250 -1485
Dl -476 -1470
Dl -476 -1382
Dl -391 -1393
Dl -338 -1384
Dl -283 -1349
Dl -309 -1323
Dl -400 -1304
Dl -400 -1160
Dl -275 -1128
Dl -171 -1130
Dl -63 -1156
Dl 68 -1224
Dl 266 -1351
Dl 418 -1450
Dl 539 -1507
Dl 623 -1484
Dl 704 -1367
Dl 815 -1145
Dl 903 -954
Dl 1000 -716
Dl 1059 -536
Dl 1100 -405
Dl 1224 -170
Dl 1308 -54
Dl 1383 67
Dl 1438 197
Dl 1522 510
Dl 1576 870
Dl 1593 1222
Dl 1567 1512
Dl 1544 1668
Dl 1563 1731
Dl 1584 1788
Dl 1572 1958
Dl 1560 2157
Dl 1608 2331
Dl 1733 2423
Dl 1883 2459
Dl 2126 2431
Dl 2335 2277
Dl 2391 2209
Dl 2531 1991
Dl 2657 1745
Dl 2733 1537
Dl 2762 1168
Dl 2694 707
Dl 2526 166
Dl 2414 -95
Dl 2261 -352
Dl 2042 -630
Dl 2039 -634
Dl 1815 -939
Dl 1598 -1302
Dl 1431 -1655
Dl 1399 -1737
Dl 1356 -1884
Dl 1337 -2043
Dl 1332 -2275
Dl 1326 -2501
Dl 1263 -3000
Dl 1132 -3390
Dl 1008 -3600
Dl 817 -3793
Dl 541 -3955
Dl 354 -4037
Dl 194 -4077
Dl -19 -4093
Dl -97 -4097
Dl -266 -4095
Dl -392 -4069
Dl -541 -4006
Dl -702 -3920
Dl -910 -3735
Dl -1069 -3466
Dl -1169 -3249
Dl -1150 -1249
Dl -1325 -996
Dl -1358 -949
Dl -1522 -731
Dl -1678 -538
Dl -1734 -472
Dl -1828 -347
Dl -1902 -210
Dl -1976 -24
Dl -2068 250
Dl -2214 634
Dl -2433 1050
Dl -2487 1173
Dl -2523 1386
Dl -2501 1563
Dl -2490 1592
Dl -2485 1678
Dl -2546 1795
Dl -2570 1831
Dl -2659 1933
Dl -2776 1984
Dl -2975 2008
Dl -2990 2009
Dl -3154 2033
Dl -3249 2066
Dl -3281 2100
Dl -3337 2285
Dl -3323 2581
Dl -3306 2722
Dl -3308 2881
Dl -3348 3059
Dl -3393 3229
Dl -3424 3383
Dl -3419 3473
Dl -3382 3534
Dl -3358 3556
Dl -3265 3600
Dl -3252 3601
Dl -3135 3627
Dl -2962 3678
Dl -2944 3684
Dl -2724 3749
Dl -2533 3800
Dl -2391 3837
Dl -2145 3908
Dl -1912 3984
Dl -1750 4046
Dl -1700 4068
Dl -1600 4109
Dl -1550 4119
Dl -1550 3783
Dl -1727 3764
Dl -1907 3729
Dl -2022 3690
Dl -2031 3686
Dl -2142 3655
Dl -2332 3617
Dl -2555 3579
Dl -2766 3550
Dl -2913 3526
Dl -3105 3479
Dl -3206 3434
Dl -3287 3323
Dl -3247 3161
Dl -3225 3111
Dl -3209 3031
Dl -3208 2908
Dl -3222 2711
Dl -3252 2413
Dl -3262 2297
Dl -3249 2202
Dl -3195 2135
Dl -3168 2112
Dl -3081 2074
Dl -2933 2076
Dl -2752 2073
Dl -2597 1997
Dl -2485 1818
Dl -2462 1769
Dl -2348 1613
Dl -2206 1566
Dl -2169 1579
Dl -2053 1669
Dl -1908 1817
Dl -1763 1989
Dl -1651 2152
Dl -1584 2266
Dl -1463 2467
Dl -1327 2690
Dl -1219 2874
Dl -1100 3138
Dl -1071 3345
Dl -1130 3521
Dl -1276 3693
Dl -1322 3727
Dl -1470 3782
Dl -1550 3783
Dl -1550 4119
Dl -1512 4126
Dl -1332 4126
Dl -1180 4098
Dl -1108 4061
Dl -976 3965
Dl -901 3905
Dl -829 3866
Dl -823 3866
Dl -748 3819
Dl -729 3806
Dl -585 3769
Dl -337 3745
Dl -7 3736
Dl 382 3744
Dl 646 3756
Dl 865 3773
Dl 997 3797
Dl 1066 3832
Dl 1100 3883
Dl 1140 3955
Dl 1313 4075
Dl 1586 4128
DP 0 0 0 0 5 1 21
Dl 3050 2566
Dl 3066 2550
Dl 3050 2533
Dl 3033 2550
Dl 3050 2566
DP 0 0 0 0 7 1 21
Dl 2811 2149
Dl 2823 2141
Dl 2826 2124
Dl 2822 2007
Dl 2813 2000
Dl 2808 2083
Dl 2811 2149
DP 0 0 0 0 14 1 21
Dl 347 -2071
Dl 464 -2154
Dl 497 -2207
Dl 530 -2389
Dl 451 -2551
Dl 403 -2590
Dl 303 -2633
Dl 232 -2607
Dl 139 -2493
Dl 100 -2337
Dl 100 -2318
Dl 125 -2186
Dl 216 -2106
Dl 347 -2071
DP 0 0 0 0 7 1 21
Dl -81 -2117
Dl -33 -2168
Dl -35 -2175
Dl -100 -2199
Dl -164 -2171
Dl -125 -2123
Dl -81 -2117
$EndMODULE LOGO
$EndLIBRARY
EESchema-LIBRARY Version 18/6/2008-08:34:30 EESchema-LIBRARY Version 2.3 Date: 14/07/2010 15:02:10
# #
# # +12V
# +12V #
# DEF +12V #PWR 0 0 N Y 1 F N
DEF +12V #PWR 0 0 N Y 1 F N F0 "#PWR" 0 200 40 H I C CNN
F0 "#PWR" 0 200 40 H I C C F1 "+12V" 0 150 40 H V C CNN
F1 "+12V" 0 150 40 H V C C DRAW
DRAW X +12V 1 0 0 0 R 40 40 0 0 W N
P 2 0 1 0 0 60 0 0 N C 0 80 20 0 1 0 N
C 0 80 20 0 1 0 N P 2 0 1 0 0 60 0 0 N
X +12V 1 0 0 0 R 40 40 0 0 W N ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # 0
# 0 #
# DEF 0 #GND 0 0 Y Y 1 F N
DEF 0 #GND 0 0 Y Y 1 F N F0 "#GND" 0 -100 40 H I C CNN
F0 "#GND" 0 -100 40 H I C C F1 "0" 0 -70 40 H V C CNN
F1 "0" 0 -70 40 H V C C DRAW
DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X 0 1 0 0 0 R 40 40 1 1 W N
X 0 1 0 0 0 R 40 40 1 1 W N ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # CAP
# CAP #
# DEF CAP C 0 10 Y Y 1 F N
DEF CAP C 0 10 Y Y 1 F N F0 "C" 100 150 50 V V C CNN
F0 "C" 100 150 50 V V C C F1 "CAP" 100 -150 50 V V C CNN
F1 "CAP" 100 -150 50 V V C C ALIAS C
ALIAS C DRAW
DRAW P 2 0 1 0 -150 -50 150 -50 N
P 2 0 1 0 -150 -50 150 -50 N P 2 0 1 0 -150 50 150 50 N
P 2 0 1 0 -150 50 150 50 N X ~ 1 0 250 200 D 40 40 1 1 P
X ~ 1 0 250 200 D 40 40 1 1 P X ~ 2 0 -250 200 U 40 40 1 1 P
X ~ 2 0 -250 200 U 40 40 1 1 P ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # INDUCTOR
# INDUCTOR #
# DEF INDUCTOR L 0 0 N Y 1 F N
DEF INDUCTOR L 0 0 N Y 0 F N F0 "L" 0 100 70 H V C CNN
F0 "L" 0 100 70 H V C C F1 "INDUCTOR" 0 -100 70 H V C CNN
F1 "INDUCTOR" 0 -100 70 H V C C DRAW
DRAW A -300 0 100 0 1800 0 0 0 N -200 0 -400 0
A -300 0 100 0 1800 0 0 0 N -200 0 -400 0 A -100 0 100 0 1800 0 0 0 N 0 0 -200 0
A -100 0 100 0 1800 0 0 0 N 0 0 -200 0 A 100 0 100 0 1800 0 0 0 N 200 0 0 0
A 100 0 100 0 1800 0 0 0 N 200 0 0 0 A 300 0 100 0 1800 0 0 0 N 400 0 200 0
A 300 0 100 0 1800 0 0 0 N 400 0 200 0 X 1 1 -700 0 300 R 70 70 1 1 I
X 2 2 700 0 300 L 70 70 1 1 I X 2 2 700 0 300 L 70 70 1 1 I
X 1 1 -700 0 300 R 70 70 1 1 I ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # QNPN
# QNPN #
# DEF QNPN Q 0 0 Y Y 1 F N
DEF QNPN Q 0 0 Y Y 0 F N F0 "Q" -100 300 50 H V C CNN
F0 "Q" -100 300 50 H V C C F1 "QNPN" -100 200 50 H V C CNN
F1 "QNPN" -100 200 50 H V C C DRAW
DRAW P 2 0 0 0 0 0 150 -150 N
P 4 0 0 0 150 -150 150 -50 50 -150 150 -150 F P 4 0 0 0 150 -150 150 -50 50 -150 150 -150 F
P 4 0 1 0 -100 -150 0 -150 0 -150 0 -150 N P 2 0 1 0 0 -150 0 150 N
P 2 0 0 0 0 0 150 -150 N P 2 0 1 0 0 0 150 150 N
P 2 0 1 0 0 0 150 150 N P 4 0 1 0 -100 -150 0 -150 0 -150 0 -150 N
P 2 0 1 0 0 -150 0 150 N X C 1 150 350 200 D 40 40 1 1 P
X C 1 150 350 200 D 40 40 1 1 P X B 2 -300 0 300 R 40 40 1 1 I
X B 2 -300 0 300 R 40 40 1 1 I X E 3 150 -350 200 U 40 40 1 1 P
X Substrat 4 -100 -350 200 U 50 20 1 1 I X Substrat 4 -100 -350 200 U 50 20 1 1 I
X E 3 150 -350 200 U 40 40 1 1 P ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # R
# R #
# DEF R R 0 0 N Y 1 F N
DEF R R 0 0 N Y 0 F N F0 "R" 80 0 50 V V C CNN
F0 "R" 80 0 50 V V C C F1 "R" 0 0 50 V V C CNN
F1 "R" 0 0 50 V V C C DRAW
DRAW S -40 150 40 -150 0 1 0 N
S -40 150 40 -150 0 1 0 N X ~ 1 0 250 100 D 60 60 1 1 P
X ~ 1 0 250 100 D 60 60 1 1 P X ~ 2 0 -250 100 U 60 60 1 1 P
X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# # VSOURCE
# VSOURCE #
# DEF VSOURCE V 0 40 Y Y 1 F N
DEF VSOURCE V 0 40 Y Y 1 F N F0 "V" 0 -100 60 H V C CNN
F0 "V" 0 -100 60 H V C C F1 "VSOURCE" 0 100 60 H V C CNN
F1 "VSOURCE" 0 100 60 H V C C DRAW
DRAW C 0 0 400 0 1 0 N
P 3 0 1 0 -300 150 -250 250 -200 150 F T 0 -320 -10 100 0 0 1 V Normal 1 C C
P 2 0 1 0 -250 -250 -250 150 F P 2 0 1 0 -250 -250 -250 150 F
C 0 0 400 0 1 0 N P 3 0 1 0 -300 150 -250 250 -200 150 F
T 0 -320 -10 100 0 0 1 V X E1 1 0 700 300 D 60 60 1 1 I
X E1 1 0 700 300 D 60 60 1 1 I X E2 2 0 -700 300 U 60 60 1 1 I
X E2 2 0 -700 300 U 60 60 1 1 I ENDDRAW
ENDDRAW ENDDEF
ENDDEF #
# #End Library
#EndLibrary
* EESchema Netlist Version 1.1 (Spice format) creation date: 18/6/2008-08:38:03 * EESchema Netlist Version 1.1 (Spice format) creation date: 14/07/2010 20:09:58
.model Q2N2222 npn (bf=200)
.AC 10 1Meg *1.2 R12 /VOUT N-000010 22K
.DC V1 10 12 0.5 R11 +12V N-000010 100
L1 N-000010 /VOUT 100mH
R12 /VOUT N-000003 22K R10 N-000009 N-000004 220
R11 +12V N-000003 100 C3 N-000009 0 10uF
L1 N-000003 /VOUT 100mH C2 N-000008 0 1nF
R10 N-000005 N-000004 220 R8 N-000004 0 2.2K
C3 N-000005 0 10uF Q3 /VOUT N-000008 N-000004 N-000004 Q2N2222
C2 N-000009 0 1nF V2 N-000003 0 AC 0.1
R8 N-000004 0 2.2K C1 /VIN N-000003 1UF
Q3 /VOUT N-000009 N-000004 N-000004 Q2N2222 V1 +12V 0 DC 12V
V2 N-000008 0 AC 0.1 R2 /VIN 0 10K
C1 /VIN N-000008 1UF R6 +12V /VIN 22K
V1 +12V 0 DC 12V R5 +12V N-000006 22K
R2 /VIN 0 10K R1 N-000006 0 10K
R6 +12V /VIN 22K R7 N-000005 0 470
R5 +12V N-000012 22K R4 +12V N-000008 1K
R1 N-000012 0 10K R3 +12V N-000007 1K
R7 N-000007 0 470 Q2 N-000008 N-000006 N-000005 N-000005 Q2N2222
R4 +12V N-000009 1K Q1 N-000007 /VIN N-000005 N-000005 Q2N2222
R3 +12V N-000010 1K
Q2 N-000009 N-000012 N-000007 N-000007 Q2N2222 .model Q2N2222 npn (bf=200)
Q1 N-000010 /VIN N-000007 N-000007 Q2N2222 .print tran v(nodes)
.print dc v(nodes)
.print ac v(vout) .tran 10 10000 10 > pspice.dat
.plot ac v(nodes) (-1,5)
.end
.end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_label_base__ #ifndef __dialog_edit_label_base__
#define __dialog_edit_label_base__ #define __dialog_edit_label_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DialogLabelEditor_Base /// Class DialogLabelEditor_Base
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DialogLabelEditor_Base : public wxDialog class DialogLabelEditor_Base : public wxDialog
{ {
private: private:
protected: protected:
enum enum
{ {
wxID_VALUESINGLE = 1000, wxID_VALUESINGLE = 1000,
wxID_VALUEMULTI, wxID_VALUEMULTI,
wxID_SIZE, wxID_SIZE,
}; };
wxFlexGridSizer* m_textControlSizer; wxFlexGridSizer* m_textControlSizer;
wxStaticText* m_staticText1; wxStaticText* m_staticText1;
wxTextCtrl* m_textLabelSingleLine; wxTextCtrl* m_textLabelSingleLine;
wxTextCtrl* m_textLabelMultiLine; wxTextCtrl* m_textLabelMultiLine;
wxStaticText* m_SizeTitle; wxStaticText* m_SizeTitle;
wxTextCtrl* m_TextSize; wxTextCtrl* m_TextSize;
wxStaticText* m_staticSizeUnits; wxStaticText* m_staticSizeUnits;
wxRadioBox* m_TextOrient; wxRadioBox* m_TextOrient;
wxRadioBox* m_TextStyle; wxRadioBox* m_TextStyle;
wxRadioBox* m_TextShape; wxRadioBox* m_TextShape;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnEnterKey( wxCommandEvent& event ){ event.Skip(); } virtual void OnEnterKey( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
public: public:
DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 359,347 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 359,347 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DialogLabelEditor_Base(); ~DialogLabelEditor_Base();
}; };
#endif //__dialog_edit_label_base__ #endif //__dialog_edit_label_base__
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// Global variables // Global variables
int g_OptNetListUseNames; /* TRUE to use names rather than net bool g_OptNetListUseNames; /* TRUE to use names rather than net
* The numbers (PSPICE netlist only) */ * The numbers (PSPICE netlist only) */
SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure
* for duplicatation by the repeat command. * for duplicatation by the repeat command.
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h" #include "common.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
...@@ -12,6 +11,7 @@ ...@@ -12,6 +11,7 @@
#include "gestfich.h" #include "gestfich.h"
#include "program.h" #include "program.h"
#include "general.h" #include "general.h"
#include "netlist.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "eeschema_config.h" #include "eeschema_config.h"
...@@ -363,11 +363,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void ) ...@@ -363,11 +363,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptLab" ), m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptLab" ),
&g_RepeatDeltaLabel, &g_RepeatDeltaLabel,
1, -10, +10 ) ); 1, -10, +10 ) );
m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "SimCmd" ),
&g_SimulatorCommandLine ) );
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "UseNetN" ),
&g_OptNetListUseNames,
0, 0, 1 ) );
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ), m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
&g_DefaultTextLabelSize, &g_DefaultTextLabelSize,
DEFAULT_SIZE_TEXT, 0, DEFAULT_SIZE_TEXT, 0,
...@@ -473,6 +468,8 @@ static const wxString ReplaceStringEntry( wxT( "LastReplaceString" ) ); ...@@ -473,6 +468,8 @@ static const wxString ReplaceStringEntry( wxT( "LastReplaceString" ) );
static const wxString FindStringHistoryEntry( wxT( "FindStringHistoryList%d" ) ); static const wxString FindStringHistoryEntry( wxT( "FindStringHistoryList%d" ) );
static const wxString ReplaceStringHistoryEntry( wxT( "ReplaceStringHistoryList%d" ) ); static const wxString ReplaceStringHistoryEntry( wxT( "ReplaceStringHistoryList%d" ) );
static const wxString FieldNamesEntry( wxT( "FieldNames" ) ); static const wxString FieldNamesEntry( wxT( "FieldNames" ) );
static const wxString SpiceNetNamesEntry( wxT( "SpiceUseNetNames" ) );
static const wxString SimulatorCommandEntry( wxT( "SimCmdLine" ) );
/* /*
* Return the EESchema applications settings list. * Return the EESchema applications settings list.
...@@ -496,7 +493,7 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void ) ...@@ -496,7 +493,7 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
return m_configSettings; return m_configSettings;
m_configSettings.push_back( new PARAM_CFG_INT( wxT( "Unite" ), m_configSettings.push_back( new PARAM_CFG_INT( wxT( "Unite" ),
(int*)&g_UserUnit, 0 ) ); (int*)&g_UserUnit, 0 ) );
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColWire" ), m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColWire" ),
&g_LayerDescr.LayerColor[LAYER_WIRE], &g_LayerDescr.LayerColor[LAYER_WIRE],
GREEN ) ); GREEN ) );
...@@ -615,6 +612,10 @@ void WinEDA_SchematicFrame::LoadSettings() ...@@ -615,6 +612,10 @@ void WinEDA_SchematicFrame::LoadSettings()
cfg->Read( PrintDialogHeightEntry, &tmp, -1 ); cfg->Read( PrintDialogHeightEntry, &tmp, -1 );
m_printDialogSize.SetHeight( (int) tmp ); m_printDialogSize.SetHeight( (int) tmp );
// Load netlists options:
cfg->Read( SpiceNetNamesEntry, &g_OptNetListUseNames, false );
cfg->Read( SimulatorCommandEntry, &g_SimulatorCommandLine );
/* Load find dialog session setting. */ /* Load find dialog session setting. */
cfg->Read( FindDialogPositionXEntry, &tmp, -1 ); cfg->Read( FindDialogPositionXEntry, &tmp, -1 );
m_findDialogPosition.x = (int) tmp; m_findDialogPosition.x = (int) tmp;
...@@ -668,6 +669,7 @@ void WinEDA_SchematicFrame::LoadSettings() ...@@ -668,6 +669,7 @@ void WinEDA_SchematicFrame::LoadSettings()
CONV_TO_UTF8(e.errorText) );) CONV_TO_UTF8(e.errorText) );)
} }
} }
} }
...@@ -700,6 +702,10 @@ void WinEDA_SchematicFrame::SaveSettings() ...@@ -700,6 +702,10 @@ void WinEDA_SchematicFrame::SaveSettings()
cfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() ); cfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() );
cfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() ); cfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() );
// Save netlists options:
cfg->Write( SpiceNetNamesEntry, g_OptNetListUseNames );
cfg->Write( SimulatorCommandEntry, g_SimulatorCommandLine );
/* Save find dialog session setting. */ /* Save find dialog session setting. */
cfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x ); cfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x );
cfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y ); cfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y );
......
...@@ -249,14 +249,3 @@ void WinEDA_SchematicFrame::SaveProject() ...@@ -249,14 +249,3 @@ void WinEDA_SchematicFrame::SaveProject()
LibArchive( this, fn.GetFullPath() ); LibArchive( this, fn.GetFullPath() );
} }
/**
* Return the number of components in the schematic.
*
* Power components are not included.
*/
int CountCmpNumber()
{
return g_RootSheet->ComponentCount();
}
...@@ -95,9 +95,6 @@ typedef enum ...@@ -95,9 +95,6 @@ typedef enum
} FileSaveType; } FileSaveType;
extern int g_OptNetListUseNames; /* TRUE to use names rather than
* net numbers (PSPICE netlist
* only) */
extern SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure used extern SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure used
* by the repeat command. NULL if no * by the repeat command. NULL if no
* item to repeat */ * item to repeat */
......
This diff is collapsed.
...@@ -342,6 +342,7 @@ void FindBestNetNameForEachNet( NETLIST_OBJECT_LIST& aNetItemBuffer ) ...@@ -342,6 +342,7 @@ void FindBestNetNameForEachNet( NETLIST_OBJECT_LIST& aNetItemBuffer )
case NET_HIERLABEL: case NET_HIERLABEL:
case NET_LABEL: case NET_LABEL:
case NET_PINLABEL: case NET_PINLABEL:
case NET_GLOBLABEL:
candidates.push_back( item ); candidates.push_back( item );
break; break;
...@@ -368,8 +369,22 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) ...@@ -368,8 +369,22 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
if( aLabelItemBuffer.size() == 0 ) if( aLabelItemBuffer.size() == 0 )
return NULL; return NULL;
int priority_order[4] =
{ NET_LABEL, NET_HIERLABEL, NET_PINLABEL, NET_GLOBLABEL };
NETLIST_OBJECT*item = aLabelItemBuffer[0]; NETLIST_OBJECT*item = aLabelItemBuffer[0];
// Calculate item priority
int item_priority = 0;
for( unsigned ii = 0; ii < 4; ii++ )
{
if ( item->m_Type == priority_order[ii] )
{
item_priority = ii;
break;
}
}
for( unsigned ii = 1; ii < aLabelItemBuffer.size(); ii++ ) for( unsigned ii = 1; ii < aLabelItemBuffer.size(); ii++ )
{ {
NETLIST_OBJECT* candidate = aLabelItemBuffer[ii]; NETLIST_OBJECT* candidate = aLabelItemBuffer[ii];
...@@ -378,38 +393,23 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) ...@@ -378,38 +393,23 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
item = candidate; item = candidate;
continue; continue;
} }
switch ( item->m_Type ) // Calculate candidate priority
int candidate_priority = 0;
for( unsigned ii = 0; ii < 4; ii++ )
{ {
case NET_HIERLABEL: if ( candidate->m_Type == priority_order[ii] )
if( candidate->m_Type == NET_PINLABEL ) {
item = candidate; candidate_priority = ii;
else if( candidate->m_Type == NET_HIERLABEL )
{
if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate;
}
break;
case NET_LABEL:
if( candidate->m_Type == NET_LABEL )
{
if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate;
}
else
item = candidate;
break;
case NET_PINLABEL:
if( candidate->m_Type != NET_PINLABEL )
break;
if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate;
break;
default: // Should not occur.
break; break;
} }
}
if( candidate_priority > item_priority )
item = candidate;
else if( candidate_priority == item_priority )
{
if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate;
}
} }
return item; return item;
} }
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
SCH_COMPONENT* m_RootCmp; // the component in schematic SCH_COMPONENT* m_RootCmp; // the component in schematic
LIB_COMPONENT* m_Entry; // the source component in library LIB_COMPONENT* m_Entry; // the source component in library
int m_Unit; /* Selected part (For multi parts per int m_Unit; /* Selected part (For multi parts per
* package) depending on sheet path */ * package) depending on sheet path */
SCH_SHEET_PATH m_SheetPath; /* the sheet path for this component */ SCH_SHEET_PATH m_SheetPath; /* the sheet path for this component */
unsigned long m_TimeStamp; /* unique identification number unsigned long m_TimeStamp; /* unique identification number
* depending on sheet path */ * depending on sheet path */
...@@ -104,11 +104,11 @@ public: ...@@ -104,11 +104,11 @@ public:
typedef std::vector <NETLIST_OBJECT*> NETLIST_OBJECT_LIST; typedef std::vector <NETLIST_OBJECT*> NETLIST_OBJECT_LIST;
extern NETLIST_OBJECT_LIST g_NetObjectslist; extern NETLIST_OBJECT_LIST g_NetObjectslist;
extern bool g_OptNetListUseNames; /* TRUE to use names rather than
* net numbers. SPICE netlist only
*/
/* Prototypes: */ /* Prototypes: */
void WriteNetList( WinEDA_SchematicFrame* frame,
const wxString& FileNameNL,
bool use_netnames );
void FreeNetObjectsList( std::vector <NETLIST_OBJECT*>& aNetObjectslist ); void FreeNetObjectsList( std::vector <NETLIST_OBJECT*>& aNetObjectslist );
/** Function ReturnUserNetlistTypeName /** Function ReturnUserNetlistTypeName
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "netlist_control.h" #include "netlist_control.h"
//Imported function: //Imported function:
int TestDuplicateSheetNames(bool aCreateMarker); int TestDuplicateSheetNames( bool aCreateMarker );
// ID for configuration: // ID for configuration:
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" ) #define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
...@@ -62,14 +62,14 @@ wxString ReturnUserNetlistTypeName( bool first_item ) ...@@ -62,14 +62,14 @@ wxString ReturnUserNetlistTypeName( bool first_item )
BEGIN_EVENT_TABLE( WinEDA_NetlistFrame, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_NetlistFrame, wxDialog )
EVT_BUTTON( wxID_CANCEL, WinEDA_NetlistFrame::OnCancelClick ) EVT_BUTTON( wxID_CANCEL, WinEDA_NetlistFrame::OnCancelClick )
EVT_BUTTON( ID_CREATE_NETLIST, WinEDA_NetlistFrame::GenNetlist ) EVT_BUTTON( ID_CREATE_NETLIST, WinEDA_NetlistFrame::GenNetlist )
EVT_BUTTON( ID_SETUP_PLUGIN, WinEDA_NetlistFrame::SetupPluginData ) EVT_BUTTON( ID_SETUP_PLUGIN, WinEDA_NetlistFrame::SetupPluginData )
EVT_BUTTON( ID_DELETE_PLUGIN, WinEDA_NetlistFrame::DeletePluginPanel ) EVT_BUTTON( ID_DELETE_PLUGIN, WinEDA_NetlistFrame::DeletePluginPanel )
EVT_BUTTON( ID_VALIDATE_PLUGIN, WinEDA_NetlistFrame::ValidatePluginPanel ) EVT_BUTTON( ID_VALIDATE_PLUGIN, WinEDA_NetlistFrame::ValidatePluginPanel )
EVT_CHECKBOX( ID_CURRENT_FORMAT_IS_DEFAULT, EVT_CHECKBOX( ID_CURRENT_FORMAT_IS_DEFAULT,
WinEDA_NetlistFrame::SelectNetlistType ) WinEDA_NetlistFrame::SelectNetlistType )
EVT_BUTTON( ID_RUN_SIMULATOR, WinEDA_NetlistFrame::RunSimulator ) EVT_BUTTON( ID_RUN_SIMULATOR, WinEDA_NetlistFrame::RunSimulator )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -185,8 +185,6 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) : ...@@ -185,8 +185,6 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) :
m_PanelNetType[ii] = NULL; m_PanelNetType[ii] = NULL;
} }
Centre();
wxBoxSizer* GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( GeneralBoxSizer ); SetSizer( GeneralBoxSizer );
...@@ -231,6 +229,7 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) : ...@@ -231,6 +229,7 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) :
GetSizer()->Fit( this ); GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre();
} }
...@@ -245,15 +244,15 @@ void WinEDA_NetlistFrame::InstallPageSpice() ...@@ -245,15 +244,15 @@ void WinEDA_NetlistFrame::InstallPageSpice()
EDA_NoteBookPage* page; EDA_NoteBookPage* page;
page = m_PanelNetType[PANELSPICE] = page = m_PanelNetType[PANELSPICE] =
new EDA_NoteBookPage( m_NoteBook, new EDA_NoteBookPage( m_NoteBook,
wxT( "Spice" ), wxT( "Spice" ),
NET_TYPE_SPICE, NET_TYPE_SPICE,
0, 0, 0, 0,
m_Parent->m_NetlistFormat == NET_TYPE_SPICE ); m_Parent->m_NetlistFormat == NET_TYPE_SPICE );
page->m_IsCurrentFormat = page->m_IsCurrentFormat =
new wxCheckBox( page, ID_CURRENT_FORMAT_IS_DEFAULT, new wxCheckBox( page, ID_CURRENT_FORMAT_IS_DEFAULT,
_( "Default format" ) ); _( "Default format" ) );
page->m_IsCurrentFormat->SetValue( m_Parent->m_NetlistFormat == NET_TYPE_SPICE ); page->m_IsCurrentFormat->SetValue( m_Parent->m_NetlistFormat == NET_TYPE_SPICE );
page->m_LeftBoxSizer->Add( page->m_IsCurrentFormat, 0, wxGROW | wxALL, 5 ); page->m_LeftBoxSizer->Add( page->m_IsCurrentFormat, 0, wxGROW | wxALL, 5 );
...@@ -291,8 +290,8 @@ void WinEDA_NetlistFrame::InstallCustomPages() ...@@ -291,8 +290,8 @@ void WinEDA_NetlistFrame::InstallCustomPages()
/* create the pages for custom netlist format selection: /* create the pages for custom netlist format selection:
*/ */
{ {
bool selected; bool selected;
int ii, CustomCount; int ii, CustomCount;
wxString title, previoustitle, msg; wxString title, previoustitle, msg;
EDA_NoteBookPage* CurrPage; EDA_NoteBookPage* CurrPage;
...@@ -381,8 +380,8 @@ void WinEDA_NetlistFrame::SetupPluginData( wxCommandEvent& event ) ...@@ -381,8 +380,8 @@ void WinEDA_NetlistFrame::SetupPluginData( wxCommandEvent& event )
wxString title = CurrPage->m_TitleStringCtrl->GetValue(); wxString title = CurrPage->m_TitleStringCtrl->GetValue();
if( title.IsEmpty() ) if( title.IsEmpty() )
DisplayInfoMessage( this, DisplayInfoMessage( this,
_( "Do not forget to choose a title for this \ _( "Do not forget to choose a title for this \
netlist control page" ) ); netlist control page" ) );
} }
...@@ -444,21 +443,18 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -444,21 +443,18 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
*/ */
{ {
wxFileName fn; wxFileName fn;
wxString FileWildcard, FileExt; wxString FileWildcard, FileExt;
wxString msg, Command; wxString msg, Command;
int netformat_tmp = m_Parent->m_NetlistFormat;
NetlistUpdateOpt(); NetlistUpdateOpt();
EDA_NoteBookPage* CurrPage; EDA_NoteBookPage* CurrPage;
CurrPage = (EDA_NoteBookPage*) m_NoteBook->GetCurrentPage();
CurrPage = (EDA_NoteBookPage*) m_NoteBook->GetCurrentPage();
m_Parent->m_NetlistFormat = CurrPage->m_IdNetType;
/* Calculate the netlist filename */ /* Calculate the netlist filename */
fn = g_RootSheet->m_AssociatedScreen->m_FileName; fn = g_RootSheet->m_AssociatedScreen->m_FileName;
switch( m_Parent->m_NetlistFormat ) switch( CurrPage->m_IdNetType )
{ {
case NET_TYPE_SPICE: case NET_TYPE_SPICE:
FileExt = wxT( "cir" ); FileExt = wxT( "cir" );
...@@ -480,25 +476,55 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -480,25 +476,55 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
wxFileDialog dlg( this, _( "Save Netlist Files" ), fn.GetPath(), wxFileDialog dlg( this, _( "Save Netlist Files" ), fn.GetPath(),
fn.GetFullName(), FileWildcard, fn.GetFullName(), FileWildcard,
wxFD_SAVE /*| wxFD_OVERWRITE_PROMPT*/ ); wxFD_SAVE );
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
m_Parent->ClearMsgPanel(); m_Parent->ClearMsgPanel();
if( CurrPage->m_CommandStringCtrl )
g_NetListerCommandLine = CurrPage->m_CommandStringCtrl->GetValue();
else
g_NetListerCommandLine.Empty();
m_Parent->CreateNetlist( CurrPage->m_IdNetType, dlg.GetPath(), g_OptNetListUseNames );
WriteCurrentNetlistSetup();
EndModal( NET_OK );
}
/** Function CreateNetlist
* Create a netlist file:
* build netlist info
* test issues
* create file
* @param aFormat = netlist format (NET_TYPE_PCBNEW ...)
* @param aFullFileName = full netlist file name
* @param aUse_netnames = bool. if true, use net names from labels in schematic
* if false, use net numbers (net codes)
* bool aUse_netnames is used only for Spice netlist
* @return true if success.
*/
bool WinEDA_SchematicFrame::CreateNetlist( int aFormat, const wxString& aFullFileName,
bool aUse_netnames )
{
ReAnnotatePowerSymbolsOnly(); ReAnnotatePowerSymbolsOnly();
if( m_Parent->CheckAnnotate( NULL, 0 ) )
// Performs some controls:
if( CheckAnnotate( NULL, 0 ) )
{ {
if( !IsOK( this, _( "Must be Annotated, Continue ?" ) ) ) if( !IsOK( NULL, _( "Must be Annotated, Continue ?" ) ) )
return; return false;
} }
// Test duplicate sheet names: // Test duplicate sheet names:
if( TestDuplicateSheetNames(false ) > 0 ) if( TestDuplicateSheetNames( false ) > 0 )
{ {
if( !IsOK( this, _( "Error: duplicate sheet names. Continue?" ) ) ) if( !IsOK( NULL, _( "Error: duplicate sheet names. Continue?" ) ) )
return; return false;
} }
/* Cleanup the entire hierarchy */ /* Cleanup the entire hierarchy */
...@@ -516,35 +542,10 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -516,35 +542,10 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
screen->ClearUndoRedoList(); screen->ClearUndoRedoList();
} }
m_Parent->BuildNetListBase(); BuildNetListBase();
if( CurrPage->m_CommandStringCtrl ) bool success = WriteNetListFile( aFormat, aFullFileName, g_OptNetListUseNames );
g_NetListerCommandLine = CurrPage->m_CommandStringCtrl->GetValue();
else
g_NetListerCommandLine.Empty();
switch( m_Parent->m_NetlistFormat )
{
default:
WriteNetList( m_Parent, dlg.GetPath(), TRUE );
break;
case NET_TYPE_CADSTAR:
case NET_TYPE_ORCADPCB2:
WriteNetList( m_Parent, dlg.GetPath(), FALSE );
case NET_TYPE_SPICE:
g_OptNetListUseNames = TRUE; // Used for pspice, gnucap
if( m_UseNetNamesInNetlist->GetSelection() == 1 )
g_OptNetListUseNames = FALSE;
WriteNetList( m_Parent, dlg.GetPath(), g_OptNetListUseNames );
break;
}
m_Parent->m_NetlistFormat = netformat_tmp;
WriteCurrentNetlistSetup(); return success;
EndModal( NET_OK );
} }
...@@ -561,7 +562,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event ) ...@@ -561,7 +562,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event )
/***********************************************************/ /***********************************************************/
{ {
wxFileName fn; wxFileName fn;
wxString ExecFile, CommandLine; wxString ExecFile, CommandLine;
g_SimulatorCommandLine = g_SimulatorCommandLine =
m_PanelNetType[PANELSPICE]->m_CommandStringCtrl->GetValue(); m_PanelNetType[PANELSPICE]->m_CommandStringCtrl->GetValue();
...@@ -576,6 +577,13 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event ) ...@@ -576,6 +577,13 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event )
fn.SetExt( wxT( "cir" ) ); fn.SetExt( wxT( "cir" ) );
CommandLine += wxT( " \"" ) + fn.GetFullPath() + wxT( "\"" ); CommandLine += wxT( " \"" ) + fn.GetFullPath() + wxT( "\"" );
g_OptNetListUseNames = m_UseNetNamesInNetlist->GetSelection() == 0;
EDA_NoteBookPage* CurrPage;
CurrPage = (EDA_NoteBookPage*) m_NoteBook->GetCurrentPage();
if( ! m_Parent->CreateNetlist( CurrPage->m_IdNetType, fn.GetFullPath(), g_OptNetListUseNames ) )
return;
ExecuteFile( this, ExecFile, CommandLine ); ExecuteFile( this, ExecFile, CommandLine );
} }
...@@ -588,7 +596,7 @@ void WinEDA_NetlistFrame::WriteCurrentNetlistSetup( void ) ...@@ -588,7 +596,7 @@ void WinEDA_NetlistFrame::WriteCurrentNetlistSetup( void )
* Write the current netlist options setup in the configuration * Write the current netlist options setup in the configuration
*/ */
{ {
wxString msg, Command; wxString msg, Command;
wxConfig* config = wxGetApp().m_EDA_Config; wxConfig* config = wxGetApp().m_EDA_Config;
NetlistUpdateOpt(); NetlistUpdateOpt();
......
...@@ -171,11 +171,6 @@ EDA_Colors ReturnLayerColor( int Layer ); ...@@ -171,11 +171,6 @@ EDA_Colors ReturnLayerColor( int Layer );
void DisplayColorSetupFrame( WinEDA_DrawFrame* parent, void DisplayColorSetupFrame( WinEDA_DrawFrame* parent,
const wxPoint& pos ); const wxPoint& pos );
/*************/
/* EELOAD.CPP */
/*************/
int CountCmpNumber();
/***************/ /***************/
/* EECONFIG.CPP */ /* EECONFIG.CPP */
/***************/ /***************/
......
...@@ -563,8 +563,6 @@ void WinEDA_SchematicFrame::OnUpdateSelectCursor( wxUpdateUIEvent& event ) ...@@ -563,8 +563,6 @@ void WinEDA_SchematicFrame::OnUpdateSelectCursor( wxUpdateUIEvent& event )
void WinEDA_SchematicFrame::OnUpdateUnits( wxUpdateUIEvent& event ) void WinEDA_SchematicFrame::OnUpdateUnits( wxUpdateUIEvent& event )
{ {
bool is_metric = ( g_UserUnit == MILLIMETRES ) ? true : false;
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM, g_UserUnit == MILLIMETRES ); m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM, g_UserUnit == MILLIMETRES );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, g_UserUnit == INCHES ); m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, g_UserUnit == INCHES );
DisplayUnitsMsg(); DisplayUnitsMsg();
......
This diff is collapsed.
...@@ -215,8 +215,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) ...@@ -215,8 +215,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL_RANGE( ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_END_CMD, EVT_TOOL_RANGE( ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_END_CMD,
WinEDA_PcbFrame::ProcessMuWaveFunctions ) WinEDA_PcbFrame::ProcessMuWaveFunctions )
EVT_TOOL( ID_PCB_PLACE_GRID_COORD_BUTT, EVT_TOOL( ID_PCB_PLACE_GRID_COORD_BUTT,
WinEDA_PcbFrame::Process_Special_Functions ) WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL_RCLICKED( ID_TRACK_BUTT, WinEDA_PcbFrame::ToolOnRightClick ) EVT_TOOL_RCLICKED( ID_TRACK_BUTT, WinEDA_PcbFrame::ToolOnRightClick )
EVT_TOOL_RCLICKED( ID_PCB_CIRCLE_BUTT, WinEDA_PcbFrame::ToolOnRightClick ) EVT_TOOL_RCLICKED( ID_PCB_CIRCLE_BUTT, WinEDA_PcbFrame::ToolOnRightClick )
......
This diff is collapsed.
...@@ -18,8 +18,6 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event ) ...@@ -18,8 +18,6 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
int id = event.GetSelection(); int id = event.GetSelection();
wxGetMousePosition( &pos.x, &pos.y ); wxGetMousePosition( &pos.x, &pos.y );
pos.x -= 400;
pos.y -= 30;
switch( id ) switch( id )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment