Commit Graph

63 Commits

Author SHA1 Message Date
jean-pierre charras f96d557e73 Fix issues in zones creation (DRC and merging) I created in 3658.1 2012-07-30 09:40:25 +02:00
jean-pierre charras 99b90d2fa3 More work on a better support of polygons in Kicad (code cleaning). 2012-07-25 20:46:25 +02:00
jean-pierre charras ef5f1b9e6b Start work on a better support of polygons in Kicad (code cleaning).
Some coding style policy fix.
2012-07-25 09:36:56 +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 6d1fe6fe5e Fix 2 minor warning compil (unused variables) 2012-05-16 22:44:21 +02:00
Dick Hollenbeck 3fa7c200b7 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 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
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
jean-pierre charras 36dac0c14d Pcbnew nanometer: fix hatch lines issue in polyline.cpp
Some minor code cleaning.
2012-04-11 11:47:57 +02:00
Dick Hollenbeck e730219b31 add PCNBEW nanometer support to specctra round-tripper, use micro-meters to do it. 2012-04-10 11:28:26 -05:00
Dick Hollenbeck 107ef8f102 see CHANGELOG.txt 2012-02-19 22:33:54 -06:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Dick Hollenbeck e6c8515873 switch to C++'s false and true from C's FALSE and TRUE 2012-01-22 11:20:22 -06:00
jean-pierre charras 3383d6c8a5 Code cleaning and better comments.
Gebview: fix issue in export to pcbnew (Track arc shapes are now exported, approximated by segments)
2012-01-13 19:35:46 +01:00
jean-pierre charras 1c98200721 Pcbnew: fix issue when KICAD_NANOMETER is defined: when zones use htcth to show zones areas, hatch lines were incorrectly calculated (hunded of thousand lines created)
Eeschema: fix issue in search: search not made in reference strings.
Minor fixes, code cleaning and comment enhancements.
2012-01-10 21:12:46 +01:00
jean-pierre charras 2df818b844 Fix issue in GPcb footprints import.
Better code in test connections in zones.
Very minor other fixes
2011-12-22 09:07:50 +01:00
Wayne Stambaugh a338e0e5b3 Minor GCC3 compiler warning fixes. 2011-03-17 09:53:19 -04:00
Marco Mattila d3932f5f25 Pcbnew: Fix add similar/cutout zone. Fix zone corner smoothing for zones with cutouts. 2011-02-23 23:34:28 +02:00
Wayne Stambaugh c9688deedf MSVC compiler error and GCC warning fixes.
* Fixed ambiguous call to sqrt() MSVC compiler error.
* Fixed a bunch of type conversion warnings in GCC 3 (MinGW).
2011-02-22 09:38:48 -05:00
Marco Mattila cbee247737 Add zone corner smoothing to pcbnew. 2011-02-21 21:43:59 +02:00
jean-pierre charras e7d5770f42 Fix some Doxygen warnings.
Eeschema: cleaning code. Start work to enhance annotation algorithm.
Already added an option to annotate using sheet number (sheet 1 uses numbers 100 to 199, sheet 2 uses 200 to 299..).
Works fine if deleting existing annotation, but needs work to be used when the existing annotation is kept .
2011-01-01 18:28:21 +01:00
jean-pierre charras fdb18547a6 Eeschema: fix bug 676532. Minor enhancements. 2010-11-17 19:41:20 +01:00
Dick Hollenbeck 636b2d301e function comments, fix ones in *.cpp files until they can be deleted if they exist in the headers 2010-11-12 10:36:43 -06:00
jean-pierre charras fd1c159a59 Fix bug in PolyLine.cpp, Fix bug in DRC calculations (see changelog). Cvpcb: move dialog files in dialogs/ 2010-10-28 15:02:07 +02:00
jean-pierre charras a188f9d06e added orto2 patch 2010-10-04 14:58:07 +02:00
charras da20f1109f Fixed my filling problem in pcbnew by changing some parameters in kbool
But this problem needs more investigations
2009-11-16 12:10:37 +00:00
charras ab66f9ecba rework on zones:try to fix a filling problem with kbool 2009-11-14 19:47:52 +00:00
charras 4537ac8c99 Fixed cvpcb crash (only when compiled in Debug version) 2009-09-19 16:15:40 +00:00
charras 7776dd61eb use kbool 2.1 in zones calculations. see CHANGELOG for others changes and more info 2009-09-17 17:48:40 +00:00
charras ef2e41e347 2009-09-10 13:04:04 +00:00
charras cfdb28394e Pcbnew: Work on undo/redo in Pcbnew almost finished. 2009-08-23 15:22:44 +00:00
charras cffe0cfcaa support for bezier curves 2009-06-25 20:45:27 +00:00
stambaughw 8bf7911125 Build improvements, compiler warning fixes and build fixes, and lots of clean up.
* Created separate SVN version header.
* Add true config.h for platform dependency checks.
* Add dependency check cmake module.
* Remove some leftover hand crafted make files.
* Remove non-cmake build instructions from COMPILING.txt.
* Fix split _() strings causing Visual C++ compiler error.
* Fix lots of compiler warnings.
* Change project file parameter container from wxArray to boost::vector_ptr.
* Removed lots of redundant header definitions.
* Fixed green_xpm redefinition in ercgreen.xpm.
* Remove some dead code and unnecessary class methods.
2009-05-21 17:42:42 +00:00
charras 67fa1ddb92 comments updated 2008-12-03 19:45:57 +00:00
charras 43f75cda0d code cleaning 2008-11-23 17:43:53 +00:00
charras 1c6ff86768 Zones now have a min thickness filled area parameter 2008-11-22 20:50:30 +00:00
charras b3c064b0b4 Thermal shapes modification for round and oblong pads.
This is a workaround for a bug (i believe) of kbool.
2008-11-09 17:14:53 +00:00
charras 134c07f94b Thermal shapes modification for round and oblong pads.
This is a workaround for a bug (i believe) of kbool.
2008-11-09 15:01:35 +00:00
charras f723c540d0 code cleaning. Some comments translated into English.
Added: Zones unfill in polygon mode
2008-10-29 15:26:53 +00:00
charras 3c97a45f48 code cleaning, and some minor bugs solved 2008-10-25 10:21:46 +00:00
charras b7db0ef850 updating polygon lib code. A bug removed. 2008-10-12 15:29:43 +00:00
charras 4cccb0dd7e First tests about copper zones filled by polygons, without grid (see changelog)
Only for tests! not for production.
2008-10-02 13:24:31 +00:00
charras ab1df3f1d7 more about non copper zones (see changelog) 2008-09-27 19:26:29 +00:00
charras 27cf4ad0ad pcbnew: addded zones in non copper areas and starting work to use polygons in zone fill algos in not copper areas
work in progress: see changelog
2008-09-26 19:51:36 +00:00
kajtek1 a8a351327d Fixed compiler warnings 2008-06-20 22:17:59 +00:00
charras 9131e2a104 compiling problems in kbool 2008-06-02 10:23:50 +00:00
charras 44743723d1 removed GPC library due to its unacceptable license. Using the great and powerfull kbool library insteed 2008-05-30 18:06:21 +00:00
charras b8ea76fe63 Solved netlist problems for multiple parts per package components in complex hierarchies.
B.O.M. generation still have a minor problem wih this.
2008-05-15 11:20:19 +00:00
f3nix 6ed78f5b16 Compiler warnings fixes. 2008-05-01 17:12:38 +00:00
CHARRAS 4a0b560766 zone outlines edition refinements 2008-02-01 11:01:32 +00:00