Commit Graph

231 Commits

Author SHA1 Message Date
Marco Mattila 3ed33e3912 Move pcbnew pcb edge layer plot checkbox to common plot options 2012-09-17 21:14:41 +03:00
jean-pierre charras a9744e3f84 Pcbnew: added: SVG plotter. Need refinements, but works.
Mainly to plot drill maps, but can be used to plot boards, for documentation.
The print svg still exists, but the plot SVG has more options (mirroring, holes in pads),
however  print svg allows color print, and full board printing, and plot does not.
2012-09-15 14:13:03 +02:00
jean-pierre charras 819589cf05 All: fix most of Doxygen warnings. 2012-09-12 19:28:55 +02:00
jean-pierre charras b810135e4e Code cleaning, minor fixes and minor coding style fixes. wxWidgets 2.9.4 compatibility fix( deprecated function MakeModal ) 2012-09-11 21:03:21 +02:00
jean-pierre charras bb6795ddf1 Pcbnew: drag functions: serious cleanup and better code. Use now the connectivity functions to find tracks connected to pads,
and therefore  tracks are now dragged when a end point is inside a pad, not necessary on the pad position.
However, drag functions still need more cleanup.
2012-09-11 09:33:17 +02:00
jean-pierre charras 3668f4ccc3 Pcbnew: cleanup functions: now, cleanup uses same algorithm as connectivity calculations to detect pads connections, and is faster.
therefore tracks which have a end point inside a pad, but not necessaryexactly  to the pad position are seen as connected, and are no more removed.
Side effect: reconnect to pads option is removed, because it is useless.
TODO: use this algorithm in drag functions.
Minor other fixes
2012-09-07 21:29:44 +02:00
Lorenzo Marcantonio 7d154606be Substituted the few remaining uses of long instead of time_t 2012-09-05 14:13:33 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
jean-pierre charras 37ee239449 Pcbnew: in SVG export, add option to export only the board area, not the full page.
dialog plot functions: fix compil warnings with wxWidgets 2.8
2012-08-31 09:43:37 +02:00
Lorenzo Marcantonio fef8347176 Script plotting patch 2012-08-29 18:59:50 +02:00
jean-pierre charras 79d55c0460 Minor cosmetic enhancements.
Kicad manager: shows now svg files in tree files.
Pcbnew: fix incorrect printing (board out of page) when creating drill map in postscript format ( noticeable mainly for small boards)
2012-08-29 14:40:09 +02:00
jean-pierre charras 0ebc3f063e 3D-viewer: code cleanup.
Eeschema: annotate and netlist dialogs: enhancements.
Minor  coding policy fixes and  changes.
2012-08-21 12:45:54 +02:00
jean-pierre charras abe5c08e20 3D-viewer: code cleaning. Added option in menu: show a 3D grid.
All: press ctrl+shift key when moving the mouse allows the graphic cursor to be moved outside the grid.
(useful to place graphic objects, texts in any position, regardless the current grid)
2012-08-11 14:52:13 +02:00
jean-pierre charras 1f277fd66d Remove Kbool from Kicad. Use Clipper instead. 2012-08-04 11:43:27 +02:00
jean-pierre charras 7fd24c7f03 Very minor fixes. 2012-08-03 17:43:15 +02:00
jean-pierre charras 3b56ea6732 Eeschema: fix crash when changing a label type to a global label during creation.
Pcbnew: code cleaning in polygons
2012-08-02 15:23:53 +02:00
Miguel Angel Ajo 465dabd919 Fixes Win32 compilation that my previous commit broke, thanks to JP 2012-07-16 16:48:51 +02:00
Miguel Angel Ajo 863c1b4823 Merged with testing 2012-07-15 22:38:25 +02:00
jean-pierre charras f20bf0d217 Pcbnew: more about keepout areas: remove keepout for pads option and add keepout for copper zones option.
Export keepout to Specctra DSN file.
2012-07-14 18:27:25 +02:00
jean-pierre charras 018b080001 Pcbnew: Add keepout areas (Copper zones without tracks or/and vias).
This is *a work in progress*, so some features are missing, and/or could be modified.
Mainly keepout zones are not yet exported to autorouters, and pads are not taken in account.
Some code cleanup in polygon.*
2012-07-13 20:55:29 +02:00
jean-pierre charras af0d21474d Pcbnew: commit Lorenzo Marcantonio's patch for THT thermals (added loading/saving using S. expr).
Fix incorrect import of smd pads from Gpcb.
Very minor change in dialog print.
2012-07-09 09:10:07 +02:00
Marco Mattila 096f4a1080 Add rotation field to pcbnew text item property dialog. 2012-07-09 01:02:00 +03:00
jean-pierre charras c7f6343bb4 Pcbnew: fix 2 minor issues, noticeable only in debug mode.
When reading board files, the net 0 was stored twice.
It creates only log messges in debug mode, because the list of nets is rebuild after reading files.
2012-06-30 10:20:04 +02:00
jean-pierre charras a6bc4a0dc6 Pcbnew: fix compil issue under wxGTK 2.8.12 2012-06-26 22:18:01 +02:00
jean-pierre charras 0c946870c5 All: fix a truncation issue in ReturnValueFromString that creates sometimes a small error for values entered in dialogs.
Pcbnew: fix a compatibility issue with nano version for zones parameters.
2012-06-25 22:59:19 +02:00
Miguel Angel Ajo db427cb2cd merge with lp:kicad 2012-06-25 22:51:19 +02:00
jean-pierre charras 52ee7c6e2a Pcbnew: fix incorrect arc export in SVG file export.
Very minor other fixes.
2012-06-19 21:25:41 +02:00
jean-pierre charras 0028c05484 Pcbnew: fix issues in kicad nanometer in zone ediition and detection.
autoroute functions: code cleaning
2012-06-17 18:06:12 +02:00
jean-pierre charras d9ed8a3085 Pcbnew: automatic selection of plugin when loading a file with .kicad_pcb extension from history list.
Very minor other fixes
2012-06-14 21:10:32 +02:00
jean-pierre charras de471744cd Fix some minor bugs in plot functions 2012-06-09 11:38:58 +02:00
Miguel Angel Ajo b5c0cada0d merges tip, conflict resolved 2012-06-03 22:21:53 +02:00
Miguel Angel Ajo 30e251bfba merge 1 with tip 2012-06-03 22:06:51 +02:00
jean-pierre charras 808020b1eb Eeschema, Libedit: Fix bug that can crashes Eeschema: In libedit 2 mandatory fields could be deleted. Fixed now.
Very minor other fixes.
2012-05-31 15:47:02 +02:00
Marco Mattila ad86e50a69 Derive pcbnew find dialog from DIALOG_SHIM. 2012-05-29 23:43:17 +03:00
Dick Hollenbeck f2bd20ab34 Mostly EAGLE_PLUGIN work:
* Derive the pcbnew copper zone and non-copper zone dialog windows from DIAG_SHIM,
  which injects some template code.
* Update UIpolicies.txt to talk about DIALOG_SHIM support.
* Add zone support to eagle_plugin.
* Organize ZONE_CONTAINER class declaration for future privacy and accessors.
2012-05-29 13:10:56 -05:00
jean-pierre charras 52318f6988 Pcbnew: menu Edit/Reset modules fields size: Add dialog to select what modules are modified. 2012-05-29 14:25:10 +02:00
Marco Mattila fd8bfe0cb1 Move pcbnew find dialog into dialogs subdirectory and use wxFormBuilder for it. 2012-05-28 23:01:51 +03:00
brian. afdf5258f3 Commit patch from Brian Sidebotham (Bus width value option) 2012-05-24 08:51:52 +02:00
Andrey Fedorushkov 43caa734ac Pcbnew: fix control data valid in design rules when define USE_PCBNEW_NANOMETRES 2012-05-23 18:25:15 +04:00
jean-pierre charras ea467e6730 Pcbnew: fix bug Bug #1001107 (Solder Mask Ratio Clearance bad value)
Because this bug could create bad values in footprint libraries, this parameter is now checked
when reading a footprint description in legacy format
2012-05-18 10:33:57 +02:00
Miguel Angel Ajo 70df15175b Footprint wizard, plus fixes 2012-05-16 11:35:18 +02:00
Miguel Angel Ajo 351e08c8a9 Footprint wizard UI gets the module from python wizard, and show it 2012-05-10 10:53:05 +02:00
Miguel Angel Ajo c051c1a4a9 footprint wizard UI and footprint wizard lists 2012-05-10 01:04:08 +02:00
Miguel Angel Ajo f35037238c merged to testing, fixed some scripting imports 2012-04-30 18:05:22 +02:00
jean-pierre charras 758f22161a All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM)
Also fix bug 985654.
2012-04-26 23:34:20 +02:00
jean-pierre charras 3b671e09d1 All: change MILS_TO_IU_SCALING_FACTOR constant to MILS_PER_IU ( and MM_TO_IU_SCALING_FACTOR to MM_PER_IU)
Also fix bug 985654.
2012-04-26 22:21:31 +02:00
jean-pierre charras fa3ebc4043 Define MM_TO_IU_SCALING_FACTOR (scaling factor from mm to internal units) only in convert_to_biu.h
Other scaling factors (MILS_TO_IU_SCALING_FACTOR and DECIMILS_TO_IU_SCALING_FACTOR)
also defined only in convert_to_biu.h.
Allows different scaling value for Gerbview.
Needs more tests.
2012-04-25 21:33:24 +02:00
Miguel Angel Ajo aef92a345c Merged to testing, needs some fixes 2012-04-21 22:04:02 +02:00
Dick Hollenbeck c24863c078 // Dick Hollenbeck's KiROUND R&D
// This provides better project control over rounding to int from double
// than wxRound() did.  This scheme provides better logging in Debug builds
// and it provides for compile time calculation of constants.


#include <stdio.h>
#include <assert.h>
#include <limits.h>

//-----<KiROUND KIT>------------------------------------------------------------

/**
 * KiROUND
 * rounds a floating point number to an int using
 * "round halfway cases away from zero".
 * In Debug build an assert fires if will not fit into an int.
 */

#if defined( DEBUG )

// DEBUG: a macro to capture line and file, then calls this inline

static inline int KiRound( double v, int line, const char* filename )
{
    v = v < 0 ? v - 0.5 : v + 0.5;
    if( v > INT_MAX + 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    else if( v < INT_MIN - 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    return int( v );
}

#define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )

#else

// RELEASE: a macro so compile can pre-compute constants.

#define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )

#endif


//-----</KiROUND KIT>-----------------------------------------------------------

// Only a macro is compile time calculated, an inline function causes a static constructor
// in a situation like this.
// Therefore the Release build is best done with a MACRO not an inline function.
int Computed = KiROUND( 14.3 * 8 );


int main( int argc, char** argv )
{
    for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
    {
        int i = KiROUND( d );

        printf( "t: %d  %.16g\n", i, d );
    }

    return 0;
}
2012-04-19 01:55:45 -05:00
Dick Hollenbeck e88bc8e58b LEGACY_PLUGIN is now in full use:
*) for footprint access into *.mod files and 
*) BOARD save/load

The item_io.cpp and ioascii.cpp have been set off to the side for reference
as *.notused, for awhile.

The CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are gone,
this is now the mandatory usage of the LEGACY_PLUGIN.  This should reduce
code maintenance for awhile until the s-expression plugin comes into 
play.  But at least for legacy format, there is not two code bodies
to maintain any more.

A new LEGACY_PLUGIN footprint library caching scheme is in place which 
needs some testing.  It should not be any faster, but might give better 
results in a networked environment if there is *.mod files on the server.
2012-04-16 22:12:53 -05:00