Commit Graph

3890 Commits

Author SHA1 Message Date
jean-pierre charras f05c0cd6ce Libedit: fix Bug #994014.
Pcbnew: fix Pcbnew name capitalization in messages.
About dialog: add a link to kicad-pcb.org
2012-05-13 17:31:58 +02:00
jean-pierre charras 223642904f Remove PCB_INTERNAL_UNIT define because it is no more used in code.
3D viewer: fix incorrect scaling factor when using nanometers.
Very minor other fixes
2012-05-11 11:02:35 +02:00
jean-pierre charras 014ba087a8 Gerbview: fix incorrect processing of ICI command in Excellon drill files. 2012-05-10 13:02:44 +02:00
jean-pierre charras 6bd07d3d63 Fix capitalization issues in title bar and config files (broken by bzr rev 3543) 2012-05-10 08:25:27 +02:00
Dick Hollenbeck 82bee848a1 Fix some comments. Enhance LEGACY_PLUGIN such that it can tolerate, then fix bad legacy footprint libraries containing duplicate footprint names.
This may have been an undocumented bug from more than a year ago, which manifested itself in *.mod files containing duplicate names.
LEGACY_PLUGIN loads those now quietly, but appends "_v2", "_v3", etc. to each succeeding duplicate sharing the same name.
2012-05-08 19:26:15 -05:00
Dick Hollenbeck 41aa30c93f this helps zooming on some window types 2012-05-08 16:09:18 -05:00
Dick Hollenbeck 594c4102f6 Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom() 2012-05-07 16:47:25 -05:00
Dick Hollenbeck cf1ae599f1 Make drawframe.cpp's StatusBar use field widths which are dynamically determined
base on expected text and current window font.

Expand the virtual world to 2.14 meters in the nanometer build of PCBNEW.
This seems to be holding up for now.
2012-05-06 18:32:01 -05:00
Dick Hollenbeck 9fbc499361 more nanometer work, see comment at line 66 of pcbnew/classpcb.cpp 2012-05-06 15:10:43 -05:00
jean-pierre charras 3d747571d6 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:41:53 +02:00
jean-pierre charras 036e02e052 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:29:52 +02:00
jean-pierre charras d03a9188ae Fix a grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) now starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 20:04:14 +02:00
jean-pierre charras a07e6e4013 Fix grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 18:55:51 +02:00
Dick Hollenbeck 215b6cc634 move import directory to new branch kicad-contrib 2012-05-05 15:06:14 -05:00
Jerry Jacobs jerkejacobs@gmail.com f7460dfa9c Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:03:21 +02:00
Jerry Jacobs jerkejacobs@gmail.com 92a285378a Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:02:09 +02:00
Dick Hollenbeck d033f2235f Remove zip library by switching to wxZlibOutputStream for PDF plotter.
Delete LEGACY_PLUGIN cache after deleting library of same name.
Remove automatically generted freerouter help header.
Add Normalize() to BOX2.
Clamp some values in the virtual space of drawframe.cpp
2012-05-04 23:55:36 -05:00
jean-pierre charras 29016a1fe4 Commit missing files 2012-05-04 20:57:32 +02:00
jean-pierre charras d75596c9b8 Gerbview: remove dependencies from Pcbnew.
Should allow Pcbnew code easier to change and Gerbview code more understandable and easier to maintain.
Code cleaning (remove dead code, add comments).
Minor other enhancements.
2012-05-04 20:16:13 +02:00
jean-pierre charras 8ef3f8ade3 Gerbview: remove dependencies from Pcbnew.
Should allow Pcbnew code easier to change and Gerbview code more understandable and easier to maintain.
Code cleaning (remove dead code, add comments).
Minor other enhancements.
2012-05-04 19:44:42 +02:00
Lorenzo Marcantonio cdce807375 Commit patch from Lorenzo Marcantonio about plot functions enhancement.
Fix some warning compil issues.
Add zlib sources to avoid build issues under Windows (zlib not installed with mingw).
2012-05-03 22:17:34 +02:00
jean-pierre charras 4c9cf84dff Add missing files 2012-05-03 21:08:14 +02:00
jean-pierre charras f878e38d12 Add patch from Lorenzo Marcantonio. Fix some warning issues, and zlib issue under Windows (zlib sources added) 2012-05-03 20:37:56 +02:00
Frank Bennett 24c572b806 This import directory contains tools for importing
to Kicad from other EDA tools.

  edif2kicad        / EDIF to EEschema schematic import
    Tools with EDIF out writer:
       o OrCad
       o DataXpress
       o Viewlogic
       o IntuSoft ICAP
       o Protel nVisage
       o PADS ?
       o P-CAD ?
       o EDIF viewer (www.cimmetry.com)
       o EDIF translator (www.elgris.com/content/edif_overview.html)

  pcb123net2kicad   / converts a pcb123 netlist to Kicad default format
2012-05-02 13:58:54 -06:00
jean-pierre charras 934271b272 Cvpcb: Fix Bug #992429 2012-05-01 12:43:16 +02:00
Dick Hollenbeck 8971bf7546 Add tools/parser_gen.cpp which is the beginnings of an s-expression parser
generation tool.  For now, it is just an s-expression beautifier using
our "non-specctra mode" version of s-expressions.
2012-04-29 21:57:48 -05:00
jean-pierre charras 3a673cc06e Remove old function valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:41:51 +02:00
jean-pierre charras 8bf09f65cf Remove valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:15:11 +02:00
jean-pierre charras b7f5699b3e Fix some (not all) bad values displayed in NANOMETER mode. 2012-04-27 08:11:41 +02:00
jean-pierre charras 7d01550649 missing change. 2012-04-27 00:04:09 +02:00
jean-pierre charras 05aedc7c57 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:35:40 +02:00
jean-pierre charras 9af5367aee 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 3c1015942d 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 98329144a0 commit missing files 2012-04-25 21:46:30 +02:00
jean-pierre charras dc990a5309 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
Dick Hollenbeck c28dc2bb13 I was disappointed when I disassembled the code using the KiROUND() inline function
solution to see that it was not pre-computing constants when used in static initializers.

So we have two use cases, and need two solutions to be optimal, since the compiler 
is too stupid to do the right thing.

I think we need something else for compile time computable constants, to be optimal 
in both use cases.  There is quite a bit of code savings by using a macro for that 
situation from my testing.  To fully capitalize on this, we need to go back and make 
Mm2mils() and what not macros also, or have MACRO versions of them too.
2012-04-25 09:12:25 -05:00
Dick Hollenbeck 3c84312ac5 TODO 2012-04-24 09:23:41 -05:00
Dick Hollenbeck a88656ea5a Somebody else spelled rectangle as badly as me, fix the mingw build 2012-04-23 21:39:56 -05:00
Dick Hollenbeck 86ad0d2c62 * Add DRECT, DPOINT, and DSIZE (double rect, point, and size) using Torsten's vector2d.h
as a starting point
* Make double Distance() take double arguments and remove internal range checking.
* Start on EDA_DRAW_FRAME::AdjustScrollBars() and use "double" for most all calculations
  in anticipation of setting INT_MAX INT_MIN limits eventually.
2012-04-23 16:56:26 -05:00
Wayne Stambaugh d14d7f67b3 Pcbnew s-expression file format improvements.
* Move board item object Format() functions into PCB_IO object.
* Change file format to use layer names instead of numbers.
* Change file extension to kicad_pcb.
2012-04-22 11:16:39 -04:00
Dick Hollenbeck 48a745e934 todo 2012-04-19 15:28:54 -05:00
Dick Hollenbeck e1c9cbedd7 missing include 2012-04-19 15:07:36 -05:00
Dick Hollenbeck c53c5b47ea // 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 487ac04a1b use a block scope to invoke wxFFile's destructor before renaming temporary file 2012-04-18 07:24:40 -05:00
jean-pierre charras c98771f683 Make Gerbview working with USE_PCBNEW_NANOMETRES option ON 2012-04-18 09:07:13 +02:00
Dick Hollenbeck 9f990349ff PLUGIN API Doxygen comments 2012-04-17 09:54:48 -05:00
Dick Hollenbeck 3aed6de76e uncrustify math_for_graphics, add copyright legacy_plugin.h 2012-04-17 09:18:14 -05:00
Dick Hollenbeck 1be7a45f18 touch ups 2012-04-17 01:13:22 -05:00
Dick Hollenbeck 531228f3c0 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
Dick Hollenbeck 15a53269d2 cvpcb LEGACY_PLUGIN usage factoring 2012-04-16 21:58:03 -05:00