Commit f45c260a 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 naming this net.
parent dba4a692
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 C F0 "#PWR" 0 200 40 H I C CNN
F1 "+12V" 0 150 40 H V C C F1 "+12V" 0 150 40 H V C CNN
DRAW DRAW
P 2 0 1 0 0 60 0 0 N
C 0 80 20 0 1 0 N
X +12V 1 0 0 0 R 40 40 0 0 W N X +12V 1 0 0 0 R 40 40 0 0 W N
C 0 80 20 0 1 0 N
P 2 0 1 0 0 60 0 0 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 C F0 "#GND" 0 -100 40 H I C CNN
F1 "0" 0 -70 40 H V C C F1 "0" 0 -70 40 H V C CNN
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
...@@ -27,8 +26,8 @@ ENDDEF ...@@ -27,8 +26,8 @@ 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 C F0 "C" 100 150 50 V V C CNN
F1 "CAP" 100 -150 50 V V C C F1 "CAP" 100 -150 50 V V C CNN
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
...@@ -40,42 +39,42 @@ ENDDEF ...@@ -40,42 +39,42 @@ ENDDEF
# #
# INDUCTOR # INDUCTOR
# #
DEF INDUCTOR L 0 0 N Y 0 F N DEF INDUCTOR L 0 0 N Y 1 F N
F0 "L" 0 100 70 H V C C F0 "L" 0 100 70 H V C CNN
F1 "INDUCTOR" 0 -100 70 H V C C F1 "INDUCTOR" 0 -100 70 H V C CNN
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 2 2 700 0 300 L 70 70 1 1 I
X 1 1 -700 0 300 R 70 70 1 1 I X 1 1 -700 0 300 R 70 70 1 1 I
X 2 2 700 0 300 L 70 70 1 1 I
ENDDRAW ENDDRAW
ENDDEF ENDDEF
# #
# QNPN # QNPN
# #
DEF QNPN Q 0 0 Y Y 0 F N DEF QNPN Q 0 0 Y Y 1 F N
F0 "Q" -100 300 50 H V C C F0 "Q" -100 300 50 H V C CNN
F1 "QNPN" -100 200 50 H V C C F1 "QNPN" -100 200 50 H V C CNN
DRAW DRAW
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 0 0 0 0 150 -150 N P 2 0 0 0 0 0 150 -150 N
P 2 0 1 0 0 0 150 150 N P 4 0 0 0 150 -150 150 -50 50 -150 150 -150 F
P 2 0 1 0 0 -150 0 150 N P 2 0 1 0 0 -150 0 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
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 Substrat 4 -100 -350 200 U 50 20 1 1 I
X E 3 150 -350 200 U 40 40 1 1 P X E 3 150 -350 200 U 40 40 1 1 P
X Substrat 4 -100 -350 200 U 50 20 1 1 I
ENDDRAW ENDDRAW
ENDDEF ENDDEF
# #
# R # R
# #
DEF R R 0 0 N Y 0 F N DEF R R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C C F0 "R" 80 0 50 V V C CNN
F1 "R" 0 0 50 V V C C F1 "R" 0 0 50 V V C CNN
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
...@@ -86,16 +85,16 @@ ENDDEF ...@@ -86,16 +85,16 @@ 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 C F0 "V" 0 -100 60 H V C CNN
F1 "VSOURCE" 0 100 60 H V C C F1 "VSOURCE" 0 100 60 H V C CNN
DRAW DRAW
P 3 0 1 0 -300 150 -250 250 -200 150 F
P 2 0 1 0 -250 -250 -250 150 F
C 0 0 400 0 1 0 N C 0 0 400 0 1 0 N
T 0 -320 -10 100 0 0 1 V T 0 -320 -10 100 0 0 1 V Normal 1 C C
P 2 0 1 0 -250 -250 -250 150 F
P 3 0 1 0 -300 150 -250 250 -200 150 F
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
# #
#EndLibrary #End Library
* 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 14:49:50
.model Q2N2222 npn (bf=200)
.AC 10 1Meg *1.2
.DC V1 10 12 0.5
R12 /VOUT N-000003 22K R12 VOUT N-000010 22K
R11 +12V N-000003 100 R11 +12V N-000010 100
L1 N-000003 /VOUT 100mH L1 N-000010 VOUT 100mH
R10 N-000005 N-000004 220 R10 N-000009 N-000004 220
C3 N-000005 0 10uF C3 N-000009 0 10uF
C2 N-000009 0 1nF C2 N-000008 0 1nF
R8 N-000004 0 2.2K R8 N-000004 0 2.2K
Q3 /VOUT N-000009 N-000004 N-000004 Q2N2222 Q3 VOUT N-000008 N-000004 N-000004 Q2N2222
V2 N-000008 0 AC 0.1 V2 N-000003 0 AC 0.1
C1 /VIN N-000008 1UF C1 VIN N-000003 1UF
V1 +12V 0 DC 12V V1 +12V 0 DC 12V
R2 /VIN 0 10K R2 VIN 0 10K
R6 +12V /VIN 22K R6 +12V VIN 22K
R5 +12V N-000012 22K R5 +12V N-000006 22K
R1 N-000012 0 10K R1 N-000006 0 10K
R7 N-000007 0 470 R7 N-000005 0 470
R4 +12V N-000009 1K R4 +12V N-000008 1K
R3 +12V N-000010 1K R3 +12V N-000007 1K
Q2 N-000009 N-000012 N-000007 N-000007 Q2N2222 Q2 N-000008 N-000006 N-000005 N-000005 Q2N2222
Q1 N-000010 /VIN N-000007 N-000007 Q2N2222 Q1 N-000007 VIN N-000005 N-000005 Q2N2222
.print ac v(vout) .model Q2N2222 npn (bf=200)
.plot ac v(nodes) (-1,5) .print tran v(nodes)
.print dc v(nodes)
.tran 10 10000 10 > x.txt
.save all
.end .end
This diff is collapsed.
...@@ -24,18 +24,17 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, ...@@ -24,18 +24,17 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 ); m_staticText1->Wrap( -1 );
m_staticText1->SetToolTip( _("Enter the text to be used within the schematic") );
m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 ); m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 );
wxBoxSizer* bSizeText; wxBoxSizer* bSizeText;
bSizeText = new wxBoxSizer( wxVERTICAL ); bSizeText = new wxBoxSizer( wxVERTICAL );
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_textLabelSingleLine->SetToolTip( _("Enter the text to be used within the schematic") );
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 ); bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER ); m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
m_textLabelMultiLine->SetToolTip( _("Enter the text to be used within the schematic") );
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) ); m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 ); bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
...@@ -65,7 +64,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, ...@@ -65,7 +64,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") }; wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString ); int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rietation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS ); m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rientation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
m_TextOrient->SetSelection( 0 ); m_TextOrient->SetSelection( 0 );
m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 ); m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 );
...@@ -78,7 +77,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, ...@@ -78,7 +77,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") }; wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") };
int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString ); int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS ); m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
m_TextShape->SetSelection( 2 ); m_TextShape->SetSelection( 0 );
m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 ); m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 ); bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Enter the text to be used within the schematic</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style">wxTE_PROCESS_ENTER</property> <property name="style">wxTE_PROCESS_ENTER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Enter the text to be used within the schematic</property> <property name="tooltip"></property>
<property name="value"></property> <property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style">wxTE_MULTILINE|wxTE_PROCESS_ENTER</property> <property name="style">wxTE_MULTILINE|wxTE_PROCESS_ENTER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Enter the text to be used within the schematic</property> <property name="tooltip"></property>
<property name="value"></property> <property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">O&amp;rietation</property> <property name="label">O&amp;rientation</property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
...@@ -570,7 +570,7 @@ ...@@ -570,7 +570,7 @@
<property name="name">m_TextShape</property> <property name="name">m_TextShape</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">2</property> <property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
......
...@@ -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.
...@@ -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 */
......
...@@ -54,52 +54,60 @@ static NETLIST_OBJECT_LIST s_SortedComponentPinList; ...@@ -54,52 +54,60 @@ static NETLIST_OBJECT_LIST s_SortedComponentPinList;
static wxArrayString s_ReferencesAlreadyFound; static wxArrayString s_ReferencesAlreadyFound;
/* Create the netlist file ( Format is given by frame->m_NetlistFormat ) /** function WriteNetListFile
* bool use_netnames is used only for Spice netlist * Create the netlist file. Netlist info must be existing
* @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.
*/ */
void WriteNetList( WinEDA_SchematicFrame* frame, const wxString& FileNameNL, bool WinEDA_SchematicFrame::WriteNetListFile( int aFormat, const wxString& aFullFileName,
bool use_netnames ) bool aUse_netnames )
{ {
FILE* f = NULL; FILE* f = NULL;
if( frame->m_NetlistFormat < NET_TYPE_CUSTOM1 ) if( aFormat < NET_TYPE_CUSTOM1 )
{ {
if( ( f = wxFopen( FileNameNL, wxT( "wt" ) ) ) == NULL ) if( ( f = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL )
{ {
wxString msg = _( "Failed to create file " ) + FileNameNL; wxString msg = _( "Failed to create file " ) + aFullFileName;
DisplayError( frame, msg ); DisplayError( this, msg );
return; return false;
} }
} }
wxBusyCursor Busy; wxBusyCursor Busy;
switch( frame->m_NetlistFormat ) switch( aFormat )
{ {
case NET_TYPE_PCBNEW: case NET_TYPE_PCBNEW:
WriteNetListPCBNEW( frame, f, TRUE ); WriteNetListPCBNEW( this, f, TRUE );
fclose( f ); fclose( f );
break; break;
case NET_TYPE_ORCADPCB2: case NET_TYPE_ORCADPCB2:
WriteNetListPCBNEW( frame, f, FALSE ); WriteNetListPCBNEW( this, f, FALSE );
fclose( f ); fclose( f );
break; break;
case NET_TYPE_CADSTAR: case NET_TYPE_CADSTAR:
WriteNetListCADSTAR( frame, f ); WriteNetListCADSTAR( this, f );
fclose( f ); fclose( f );
break; break;
case NET_TYPE_SPICE: case NET_TYPE_SPICE:
WriteNetListPspice( frame, f, use_netnames ); WriteNetListPspice( this, f, aUse_netnames );
fclose( f ); fclose( f );
break; break;
default: default:
Write_GENERIC_NetList( frame, FileNameNL ); Write_GENERIC_NetList( this, aFullFileName );
break; break;
} }
return true;
} }
...@@ -218,7 +226,8 @@ static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, const wxString& DefaultFo ...@@ -218,7 +226,8 @@ static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, const wxString& DefaultFo
if( !NetName.IsEmpty() ) if( !NetName.IsEmpty() )
{ {
// prefix non global labels names by the sheet path, to avoid names collisions // prefix non global labels names by the sheet path, to avoid names collisions
if( netref->m_Type != NET_PINLABEL ) if( ( netref->m_Type != NET_PINLABEL )
&& ( netref->m_Type != NET_GLOBLABEL ) )
{ {
wxString lnet = NetName; wxString lnet = NetName;
NetName = netref->m_SheetList.PathHumanReadable(); NetName = netref->m_SheetList.PathHumanReadable();
...@@ -418,6 +427,7 @@ static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, bool use_ ...@@ -418,6 +427,7 @@ static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, bool use_
} }
text = DRAWTEXT->m_Text.AfterFirst( ' ' ); text = DRAWTEXT->m_Text.AfterFirst( ' ' );
// First BUFYPOS_LEN char are the Y position. // First BUFYPOS_LEN char are the Y position.
msg.Printf( wxT( "%s %s" ), bufnum, text.GetData() ); msg.Printf( wxT( "%s %s" ), bufnum, text.GetData() );
if( ident == '+' ) if( ident == '+' )
...@@ -736,6 +746,7 @@ static void EraseDuplicatePins( NETLIST_OBJECT_LIST& aPinList ) ...@@ -736,6 +746,7 @@ static void EraseDuplicatePins( NETLIST_OBJECT_LIST& aPinList )
{ {
if( aPinList[jj] == NULL ) // Already removed if( aPinList[jj] == NULL ) // Already removed
continue; continue;
// other pin num end of duplicate list. // other pin num end of duplicate list.
if( aPinList[idxref]->m_PinNum != aPinList[jj]->m_PinNum ) if( aPinList[idxref]->m_PinNum != aPinList[jj]->m_PinNum )
break; break;
...@@ -860,7 +871,8 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) ...@@ -860,7 +871,8 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList )
NetcodeName += wxT( "\"" ); NetcodeName += wxT( "\"" );
if( !NetName.IsEmpty() ) if( !NetName.IsEmpty() )
{ {
if( netref->m_Type != NET_PINLABEL ) if( ( netref->m_Type != NET_PINLABEL )
&& ( netref->m_Type != NET_GLOBLABEL ) )
{ {
// usual net name, prefix it by the sheet path // usual net name, prefix it by the sheet path
NetcodeName += netref->m_SheetList.PathHumanReadable(); NetcodeName += netref->m_SheetList.PathHumanReadable();
...@@ -1037,7 +1049,8 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) ...@@ -1037,7 +1049,8 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList )
NetcodeName = wxT( "\"" ); NetcodeName = wxT( "\"" );
if( !NetName.IsEmpty() ) if( !NetName.IsEmpty() )
{ {
if( netref->m_Type != NET_PINLABEL ) if( ( netref->m_Type != NET_PINLABEL )
&& ( netref->m_Type != NET_GLOBLABEL ) )
{ {
// usual net name, prefix it by the sheet path // usual net name, prefix it by the sheet path
NetcodeName += NetcodeName +=
...@@ -1074,10 +1087,10 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) ...@@ -1074,10 +1087,10 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList )
buf[4] = 0; buf[4] = 0;
str_pinnum = CONV_FROM_UTF8( buf ); str_pinnum = CONV_FROM_UTF8( buf );
InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ), InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ),
GetChars(InitNetDesc), GetChars( InitNetDesc ),
GetChars(refstr), GetChars( refstr ),
GetChars(str_pinnum), GetChars( str_pinnum ),
GetChars(NetcodeName) ); GetChars( NetcodeName ) );
} }
print_ter++; print_ter++;
break; break;
......
...@@ -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,37 +393,22 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) ...@@ -378,37 +393,22 @@ 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;
else if( candidate->m_Type == NET_HIERLABEL )
{ {
if( candidate->m_Label.Cmp( item->m_Label ) < 0 ) candidate_priority = ii;
item = candidate;
}
break; break;
case NET_LABEL:
if( candidate->m_Type == NET_LABEL )
{
if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate;
} }
else }
if( candidate_priority > item_priority )
item = candidate; item = candidate;
break; else if( candidate_priority == item_priority )
{
case NET_PINLABEL:
if( candidate->m_Type != NET_PINLABEL )
break;
if( candidate->m_Label.Cmp( item->m_Label ) < 0 ) if( candidate->m_Label.Cmp( item->m_Label ) < 0 )
item = candidate; item = candidate;
break;
default: // Should not occur.
break;
} }
} }
return item; return item;
......
...@@ -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();
} }
...@@ -446,19 +445,16 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -446,19 +445,16 @@ 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();
EndModal( NET_OK ); return success;
} }
...@@ -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 );
} }
......
...@@ -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();
......
...@@ -39,8 +39,7 @@ class wxFindReplaceData; ...@@ -39,8 +39,7 @@ class wxFindReplaceData;
/* enum used in RotationMiroir() */ /* enum used in RotationMiroir() */
enum fl_rot_cmp enum fl_rot_cmp {
{
CMP_NORMAL, // Normal orientation, no rotation or mirror CMP_NORMAL, // Normal orientation, no rotation or mirror
CMP_ROTATE_CLOCKWISE, // Rotate -90 CMP_ROTATE_CLOCKWISE, // Rotate -90
CMP_ROTATE_COUNTERCLOCKWISE, // Rotate +90 CMP_ROTATE_COUNTERCLOCKWISE, // Rotate +90
...@@ -137,6 +136,7 @@ public: ...@@ -137,6 +136,7 @@ public:
return m_TemplateFieldNames.AddTemplateFieldName( aFieldName ); return m_TemplateFieldNames.AddTemplateFieldName( aFieldName );
} }
/** /**
* Function GetTemplateFieldName * Function GetTemplateFieldName
* returns a template fieldnames list for read only access. * returns a template fieldnames list for read only access.
...@@ -146,6 +146,7 @@ public: ...@@ -146,6 +146,7 @@ public:
return m_TemplateFieldNames.GetTemplateFieldNames(); return m_TemplateFieldNames.GetTemplateFieldNames();
} }
/** /**
* Function DeleteAllTemplateFieldNames * Function DeleteAllTemplateFieldNames
* removes all template fieldnames. * removes all template fieldnames.
...@@ -155,6 +156,7 @@ public: ...@@ -155,6 +156,7 @@ public:
m_TemplateFieldNames.DeleteAllTemplateFieldNames(); m_TemplateFieldNames.DeleteAllTemplateFieldNames();
} }
PARAM_CFG_ARRAY& GetConfigurationSettings( void ); PARAM_CFG_ARRAY& GetConfigurationSettings( void );
void LoadSettings(); void LoadSettings();
void SaveSettings(); void SaveSettings();
...@@ -177,12 +179,13 @@ public: ...@@ -177,12 +179,13 @@ public:
m_CurrentField = aCurrentField; m_CurrentField = aCurrentField;
} }
/** Function OnModify() /** Function OnModify()
* Must be called after a schematic change * Must be called after a schematic change
* in order to set the "modify" flag of the current screen * in order to set the "modify" flag of the current screen
* and update the date in frame reference * and update the date in frame reference
*/ */
void OnModify( ); void OnModify();
SCH_SHEET_PATH* GetSheet(); SCH_SHEET_PATH* GetSheet();
...@@ -236,6 +239,35 @@ public: ...@@ -236,6 +239,35 @@ public:
/* netlist generation */ /* netlist generation */
void BuildNetListBase(); void BuildNetListBase();
/** 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 CreateNetlist( int aFormat,
const wxString& aFullFileName,
bool aUse_netnames );
/** function WriteNetListFile
* Create the netlist file. Netlist info must be existing
* @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 WriteNetListFile( int aFormat,
const wxString& aFullFileName,
bool aUse_netnames );
/** /**
* Function DeleteAnnotation * Function DeleteAnnotation
* Remove current component annotations * Remove current component annotations
...@@ -282,7 +314,8 @@ public: ...@@ -282,7 +314,8 @@ public:
*/ */
virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref,
int aPrintMask, bool aPrintMirrorMode, int aPrintMask, bool aPrintMirrorMode,
void * aData = NULL); void* aData = NULL );
/** /**
* Show the print dialog * Show the print dialog
*/ */
...@@ -299,6 +332,8 @@ public: ...@@ -299,6 +332,8 @@ public:
{ {
m_printDialogPosition = aPoint; m_printDialogPosition = aPoint;
} }
void SetPrintDialogSize( const wxSize& aSize ) { m_printDialogSize = aSize; } void SetPrintDialogSize( const wxSize& aSize ) { m_printDialogSize = aSize; }
const wxPoint& GetPrintDialogPosition() { return m_printDialogPosition; } const wxPoint& GetPrintDialogPosition() { return m_printDialogPosition; }
const wxSize& GetPrintDialogSize() { return m_printDialogSize; } const wxSize& GetPrintDialogSize() { return m_printDialogSize; }
...@@ -327,7 +362,7 @@ public: ...@@ -327,7 +362,7 @@ public:
* gets footprint info from each line in the Stuff File by Ref Desg * gets footprint info from each line in the Stuff File by Ref Desg
* @param aFilename The file to read from. * @param aFilename The file to read from.
* @param aSetFielsAttributeToVisible = true to set the footprint field * @param aSetFielsAttributeToVisible = true to set the footprint field
flag to visible * flag to visible
* @return bool - true if success, else true. * @return bool - true if success, else true.
*/ */
bool ProcessStuffFile( FILE* aFilename, bool ProcessStuffFile( FILE* aFilename,
...@@ -504,6 +539,7 @@ public: ...@@ -504,6 +539,7 @@ public:
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ); const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
private: private:
/** Function PutDataInPreviousState() /** Function PutDataInPreviousState()
* Used in undo or redo command. * Used in undo or redo command.
* Put data pointed by List in the previous state, i.e. the state * Put data pointed by List in the previous state, i.e. the state
...@@ -520,7 +556,7 @@ private: ...@@ -520,7 +556,7 @@ private:
* - Get an old version of the schematic from Redo list * - Get an old version of the schematic from Redo list
* @return none * @return none
*/ */
void GetSchematicFromRedoList(wxCommandEvent& event); void GetSchematicFromRedoList( wxCommandEvent& event );
/** Function GetSchematicFromUndoList /** Function GetSchematicFromUndoList
* Undo the last edition: * Undo the last edition:
...@@ -528,7 +564,7 @@ private: ...@@ -528,7 +564,7 @@ private:
* - Get an old version of the schematic from Undo list * - Get an old version of the schematic from Undo list
* @return none * @return none
*/ */
void GetSchematicFromUndoList(wxCommandEvent& event); void GetSchematicFromUndoList( wxCommandEvent& event );
public: public:
...@@ -547,6 +583,7 @@ public: ...@@ -547,6 +583,7 @@ public:
LIB_PIN* LocatePinEnd( SCH_ITEM* DrawList, const wxPoint& pos ); LIB_PIN* LocatePinEnd( SCH_ITEM* DrawList, const wxPoint& pos );
// ERC: // ERC:
/** /**
* Function CheckAnnotate * Function CheckAnnotate
* Check errors relatives to annotation: * Check errors relatives to annotation:
...@@ -561,7 +598,7 @@ public: ...@@ -561,7 +598,7 @@ public:
* @param aOneSheetOnly : true = search is made only in the current sheet * @param aOneSheetOnly : true = search is made only in the current sheet
* false = search in whole hierarchy (usual search). * false = search in whole hierarchy (usual search).
*/ */
int CheckAnnotate( wxArrayString * aMessageList, bool aOneSheetOnly ); int CheckAnnotate( wxArrayString* aMessageList, bool aOneSheetOnly );
/** /**
* Load component libraries defined in project file. * Load component libraries defined in project file.
......
...@@ -215,7 +215,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) ...@@ -215,7 +215,7 @@ 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 )
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
#include "dialog_set_grid_base.h" #include "dialog_set_grid_base.h"
class DIALOG_SET_GRID: public DIALOG_SET_GRID_BASE class DIALOG_SET_GRID : public DIALOG_SET_GRID_BASE
{ {
public: public:
int m_internalUnits; int m_internalUnits;
public: public:
DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos ); DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos );
~DIALOG_SET_GRID() { } ~DIALOG_SET_GRID() { }
void SetGridSize( const wxRealPoint& grid ); void SetGridSize( const wxRealPoint& grid );
...@@ -29,7 +29,7 @@ class DIALOG_SET_GRID: public DIALOG_SET_GRID_BASE ...@@ -29,7 +29,7 @@ class DIALOG_SET_GRID: public DIALOG_SET_GRID_BASE
void SetGridOrigin( const wxPoint& grid ); void SetGridOrigin( const wxPoint& grid );
wxPoint GetGridOrigin(); wxPoint GetGridOrigin();
private: private:
void OnResetGridOrgClick( wxCommandEvent& event ); void OnResetGridOrgClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
...@@ -48,8 +48,8 @@ void WinEDA_BasePcbFrame::InstallGridFrame( const wxPoint& pos ) ...@@ -48,8 +48,8 @@ void WinEDA_BasePcbFrame::InstallGridFrame( const wxPoint& pos )
return; return;
m_UserGridSize = dlg.GetGridSize(); m_UserGridSize = dlg.GetGridSize();
m_UserGridUnit = (UserUnitType)dlg.GetGridUnits(); m_UserGridUnit = (UserUnitType) dlg.GetGridUnits();
GetScreen()->m_GridOrigin = dlg.GetGridOrigin( ); GetScreen()->m_GridOrigin = dlg.GetGridOrigin();
GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER );
...@@ -62,14 +62,16 @@ void WinEDA_BasePcbFrame::InstallGridFrame( const wxPoint& pos ) ...@@ -62,14 +62,16 @@ void WinEDA_BasePcbFrame::InstallGridFrame( const wxPoint& pos )
} }
DIALOG_SET_GRID::DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos ) DIALOG_SET_GRID::DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos ) :
: DIALOG_SET_GRID_BASE( parent ) DIALOG_SET_GRID_BASE( parent )
{ {
SetFocus();
m_TextPosXUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_TextPosXUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_TextPosYUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_TextPosYUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre( ); Centre();
} }
...@@ -103,11 +105,13 @@ void DIALOG_SET_GRID::SetGridUnits( int units ) ...@@ -103,11 +105,13 @@ void DIALOG_SET_GRID::SetGridUnits( int units )
m_UnitGrid->SetSelection( 1 ); m_UnitGrid->SetSelection( 1 );
} }
int DIALOG_SET_GRID::GetGridUnits() int DIALOG_SET_GRID::GetGridUnits()
{ {
return m_UnitGrid->GetSelection(); return m_UnitGrid->GetSelection();
} }
wxPoint DIALOG_SET_GRID::GetGridOrigin() wxPoint DIALOG_SET_GRID::GetGridOrigin()
{ {
wxPoint grid; wxPoint grid;
...@@ -119,31 +123,33 @@ wxPoint DIALOG_SET_GRID::GetGridOrigin() ...@@ -119,31 +123,33 @@ wxPoint DIALOG_SET_GRID::GetGridOrigin()
return grid; return grid;
} }
void DIALOG_SET_GRID::SetGridOrigin( const wxPoint& grid ) void DIALOG_SET_GRID::SetGridOrigin( const wxPoint& grid )
{ {
wxString msg; wxString msg;
PutValueInLocalUnits( *m_GridOriginXCtrl, grid.x, m_internalUnits ); PutValueInLocalUnits( *m_GridOriginXCtrl, grid.x, m_internalUnits );
PutValueInLocalUnits( *m_GridOriginYCtrl, grid.y, m_internalUnits ); PutValueInLocalUnits( *m_GridOriginYCtrl, grid.y, m_internalUnits );
} }
void DIALOG_SET_GRID::OnResetGridOrgClick(wxCommandEvent& event) void DIALOG_SET_GRID::OnResetGridOrgClick( wxCommandEvent& event )
{ {
wxString msg(_("0") ); SetGridOrigin( wxPoint(0,0) );
m_GridOriginXCtrl->SetValue(msg);
m_GridOriginYCtrl->SetValue(msg);
} }
/*****************************************************************/ /*****************************************************************/
void DIALOG_SET_GRID::OnCancelClick( wxCommandEvent& event ) void DIALOG_SET_GRID::OnCancelClick( wxCommandEvent& event )
/*****************************************************************/ /*****************************************************************/
{ {
EndModal(wxID_CANCEL); EndModal( wxID_CANCEL );
} }
/*************************************************************************/ /*************************************************************************/
void DIALOG_SET_GRID::OnOkClick(wxCommandEvent& event) void DIALOG_SET_GRID::OnOkClick( wxCommandEvent& event )
/*************************************************************************/ /*************************************************************************/
{ {
EndModal(wxID_OK); EndModal( wxID_OK );
} }
...@@ -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