- 19 Apr, 2012 1 commit
-
-
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; }
-
- 26 Mar, 2012 1 commit
-
-
Wayne Stambaugh authored
* BLOCK_SELECTOR class is not longer derived from EDA_ITEM. * Encapsulate BLOCK_SELECTOR class member variables and add access methods. * Move HandleBlockBegin() function from block_commande.cpp to drawframe.cpp. * Remove virtual methods from top level derived objects per future coding policy change. * Remove Doxygen copydoc statement from objects derived from EDA_ITEM since the comments are automatically copied to the derived object. * Removed copy and pasted Doxygen comments from objects derived from EDA_ITEM.
-
- 19 Feb, 2012 1 commit
-
-
Dick Hollenbeck authored
-
- 23 Jan, 2012 1 commit
-
-
Dick Hollenbeck authored
-
- 22 Jan, 2012 1 commit
-
-
Dick Hollenbeck authored
-
- 16 Dec, 2011 1 commit
-
-
Wayne Stambaugh authored
-
- 14 Dec, 2011 1 commit
-
-
Dick Hollenbeck authored
-
- 12 Dec, 2011 1 commit
-
-
Dick Hollenbeck authored
-
- 05 Dec, 2011 1 commit
-
-
Dick Hollenbeck authored
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes having a BOARD being edited by more than one editor, it was a bad design. And this meant removing m_PcbFrame from BOARD. * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed, such as dialog_mask_clearance, dialog_drc, etc. * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it with build_version.h's #define BOARD_FILE_VERSION, although there may be a better place for this constant. * Made the public functions in PARAM_CFG_ARRAY be type const. void SaveParam(..) const and void ReadParam(..) const * PARAM_CFG_BASE now has virtual destructor since we have various way of destroying the derived class and boost::ptr_vector must be told about this. * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use an automatic PARAM_CFG_ARRAY which is on the stack.\ * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array, since it has to access the current BOARD and the BOARD can change. Remember BOARD_DESIGN_SETTINGS are now in the BOARD. * Made the m_BoundingBox member private, this was a brutally hard task, and indicative of the lack of commitment to accessors and object oriented design on the part of KiCad developers. We must do better. Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox(). * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
-
- 24 Nov, 2011 1 commit
-
-
Dick Hollenbeck authored
-
- 15 Nov, 2011 1 commit
-
-
Vladimir Ur authored
Some code restyling: VECTOR_PCB is an array. Cleanup uncontrolled definitions of abs, max, etc. max is now overloaded function and MAX is a macro.
-
- 11 Nov, 2011 1 commit
-
-
Vladimir Ur authored
Metric KiCad work continues. Partially processed D_PAD class. It is still need to be tested including all these import and export procedures...
-
- 01 Oct, 2011 1 commit
-
-
Wayne Stambaugh authored
-
- 30 Sep, 2011 1 commit
-
-
Wayne Stambaugh authored
* Correct all user strings and comments for the correct capitalization of application names according to JP. They are KiCad, Pcbnew, CvPcb, Eeschema, and GerbView. * Add a note the the user interface policy about the correct capitalization.
-
- 23 Sep, 2011 1 commit
-
-
Wayne Stambaugh authored
* All header files used to create the PCB common library now compile as stand alone code. This prevents the need to define them in a specific order to make source code compile properly. It should also now be possible to relocate the source code to build the common PCB library to a separate folder.
-
- 07 Sep, 2011 1 commit
-
-
Wayne Stambaugh authored
* Changed <wx-2.8/xml/xml.h> to "xnode.h" in pcbnew_config.cpp to fix bug when building against wxWidgets 2.9 and above. * Convert broken wxXmlNode code to use XNODE. * Overloaded XNODE constructor for creating child nodes. * Translate French naming conventions. * Translate French comments. * Remove tabs from several source files. * Coding style policy and Doxygen comment fixes.
-
- 06 Sep, 2011 1 commit
-
-
Wayne Stambaugh authored
-
- 29 Aug, 2011 1 commit
-
-
Dick Hollenbeck authored
-
- 12 Mar, 2011 1 commit
-
-
jean-pierre charras authored
others: fix minor issues.
-
- 01 Mar, 2011 1 commit
-
-
Wayne Stambaugh authored
* Fix grid select box update bug on context menu. * Fix via size and track width select box update bugs. * Fix layer pair indicator button update bug. * Fix auto track width tool bar control enable bug. * Fix via size and track width select status bug in context menu. * Fix layer select box and layer control widget select bug when current layer is removed. * Add virtual function to notify objects derived from EDA_DRAW_FRAME that the units setting has changed. * Coding policy class naming fixes.
-
- 28 Feb, 2011 1 commit
-
-
jean-pierre charras authored
Use UTF-8 encoding only in kicad files. Under Linux, this was already the case. Under Windows, texts with non ascii characters must be corrected. This ensure compatibility between platforms.
-
- 25 Feb, 2011 1 commit
-
-
Marco Mattila authored
Change board bounding box calculation to include all board items by default in pcbnew. Add a parameter to look for board edges only.
-
- 20 Jan, 2011 1 commit
-
-
Wayne Stambaugh authored
* Encapsulate file name member of base screen object. * Encapsulate associated screen member of schematic sheet object. * Create add screen method to schematic sheet object to simplify setting the associated screen. * Move the change file name code in the schematic sheet object to the edit sheet method in the schematic editor frame object to eliminate message dialogs. * Improve reference counting in schematic screen object. * Add helper type definitions for changing schematic object storage to C++ containers.
-
- 19 Jan, 2011 1 commit
-
-
jean-pierre charras authored
Eeschem: fix bug when moving fields in schematic: incorrect field move for rotated+mirrored components (added InverseTransform( ) in TRANSFORM class)
-
- 15 Jan, 2011 2 commits
-
-
jean-pierre charras authored
-
jean-pierre charras authored
Pcbnew: fix that prevents loading modules from libraries (footprint name not identified in lib) Module Editor: Try to fix incorrect printing. Fixed now only for scale 1. Nor working for other scales. (Work in progress). Gerbview: Known bug: printing not working. VRML export: Fix incorrect export of 3D shapes rotations when the 3D shape was rotated.
-
- 08 Dec, 2010 1 commit
-
-
Wayne Stambaugh authored
-
- 23 Aug, 2010 1 commit
-
-
Wayne Stambaugh authored
* Fix build errors for ambiguous wxDialog constructor using gcc 3.4.5 on MinGW/MSYS. * Fix compiler warnings in VRML export.
-
- 19 Aug, 2010 1 commit
-
-
jean-pierre charras authored
3D export: Added patch from Lorenzo Marcantonio. Fixed issue in VRML export dialog. Removed useless messages in debug mode.
-
- 19 Apr, 2010 2 commits
-
-
jean-pierre charras authored
-
jean-pierre charras authored
-