- 19 Apr, 2012 3 commits
-
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
// 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; }
-
- 18 Apr, 2012 2 commits
-
-
Dick Hollenbeck authored
-
jean-pierre charras authored
-
- 17 Apr, 2012 6 commits
-
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
*) 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.
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
-
- 16 Apr, 2012 5 commits
-
-
Wayne Stambaugh authored
* Remove internal units from BASE_SCREEN and it's derivatives. * Remove internal units from EDA_DRAW_FRAME and it's derivatives. * Use build time code to replace internal units conversions. * Fix scaling bug in page layout sample window that I created in my last commit.
-
Wayne Stambaugh authored
* Move all convert from user to internal units into base_units.cpp. * Remove internal units parameters from all moved conversion functions. * Revise all source code that calls the moved conversion functions. * Remove internal units from all dialog text control helper classes.
-
jean-pierre charras authored
Kicad manager: code cleaning. Dead code removed and minor fixes. support of new .kicad_brd extension.
-
Dick Hollenbeck authored
-
Wayne Stambaugh authored
* Scale page reference border and title block, grid sizes, and zoom factors correctly for nanometers.
-
- 15 Apr, 2012 1 commit
-
-
lajos kamocsay authored
Other minor fixes.
-
- 13 Apr, 2012 2 commits
-
-
Wayne Stambaugh authored
* Move all convert from internal to user units functions into separate file. * Remove internal units parameter from all moved conversion functions. * Revise all source code that calls the moved conversion functions. * Compile these conversion routines separately for the appropriate pcb or schematic internal units. * Move internal units specific status bar update code into the appropriate application for updating the status bar. * Move millimeter user units rounding function to common.cpp.
-
jean-pierre charras authored
drawframe.cpp: commit a fix about scrollbars from lajos kamocsay
-
- 12 Apr, 2012 2 commits
-
-
Wayne Stambaugh authored
* Move EDA_TEXT object into separate header and source file. * Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units. * Compile PAGE_INFO class separately for BOARD_ITEM and SCH_ITEM units. * Minor formatting tweaks to Pcbnew s-expression file. * Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
-
lajos kamocsay authored
-
- 11 Apr, 2012 8 commits
-
-
Dick Hollenbeck authored
-
Dick Hollenbeck authored
* Fix bug in PCBNEW dialog_pad_properties.cpp that I introduced several days ago. The m_Master_Pad stuff is stored in the PCB_EDIT_FRAME's BOARD_DESIGN_SETTINGS, not in the FOOTPRINT_EDIT_FRAME's BOARD_DESIGN_SETTINGS (i.e. not stored in the module editor's dummy BOARD). Now we properly initialize the DIALOG_PAD_PROPERTIES::m_Pad_Master reference to the correct master pad dope, instead of to the dummy module BOARD's master pad, which is not used.
-
jean-pierre charras authored
-
jean-pierre charras authored
If enable in preference menu, allow the pan with drag mouse with middle button down. both unlimited and limited pan is allowed.
-
Dick Hollenbeck authored
-
lajos kamocsay authored
-
Dick Hollenbeck authored
-
jean-pierre charras authored
Some minor code cleaning.
-
- 10 Apr, 2012 1 commit
-
-
Dick Hollenbeck authored
-
- 09 Apr, 2012 2 commits
-
-
Dick Hollenbeck authored
-
jean-pierre charras authored
Enhancements in AddMenuItem (that accepts now a menu type) Partial use of the Edwin van den Oetelaar's patch (patch not fully working or correct)
-
- 08 Apr, 2012 3 commits
-
-
Alexander Zakamaldin authored
But when using raw printing (for linux - 'lpr some_file.ps') the bug gets out. Alexander.
-
Dick Hollenbeck authored
Instrument saveNETCLASS() with fmtBIU(). Can now round trip to mm board file using LEGACY_PLUGIN in DEBUG build.
-
Dick Hollenbeck authored
*) Allow building without defining USE_NEW_PCBNEW_LOAD & USE_NEW_PCBNEW_SAVE. pcbnew/files.cpp would not link.
-
- 07 Apr, 2012 3 commits
-
-
Wayne Stambaugh authored
* Save dialog now supports saving boards to new file format. * Add CMake option to build s-expression file save. * Add check to main CMakeList.txt file to make sure nanometers are enables when the new file format is built. * Minor tweaks to object format functions for improved output. * Rename kicad_plugin.h/cpp to legacy_plugin.h/cpp.
-
jean-pierre charras authored
-
jean-pierre charras authored
-
- 06 Apr, 2012 2 commits
-
-
Dick Hollenbeck authored
This uses the new LEGACY_PLUGIN, so we can force more usage & testing of it before ioascii.cpp and item_io.cpp are deleted, along with BOARD_ITEM::Save() and BOARD_ITEM::ReadDescr() associated functions.
-
jean-pierre charras authored
-