Loading change_log.txt +8 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,12 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2008-Mar-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +pcbnew MODULE::GetBoundingBox() takes in account the clearence around the pads (the clearence limit shape around pads (when shown) was not always erased ) 2008-Mar-17 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ Loading Loading @@ -35,8 +41,8 @@ email address. some code cleaning and comment translations. added: /** EDA_Rect::Merge( EDA_Rect & aRect ) * Modify Position and Size of this in order to contains the given rect * mainly used to calculate bouding boxes * Modify Position and Size of this in order to contain the given rect * mainly used to calculate bounding boxes * @param aRect = given rect to merge with this */ Loading common/base_struct.cpp +73 −30 Original line number Diff line number Diff line Loading @@ -729,11 +729,20 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const /**************************************************/ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) /**************************************************/ /** Function Inflate * Inflate "this": move each horizontal edge by dx and each vertical edge by dy * toward rect outside * if dx and/or dy is negative, move toward rect inside (deflate) * Works for positive and negative rect size * */ { if( -2 * dx > m_Size.x ) if( m_Size.x >= 0 ) { if( m_Size.x < -2 * dx ) { // Don't allow deflate to eat more width than we have, // a well-defined rectangle cannot have negative width. m_Pos.x += m_Size.x / 2; m_Size.x = 0; } Loading @@ -743,11 +752,29 @@ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) m_Pos.x -= dx; m_Size.x += 2 * dx; } } else // size.x < 0: { if( m_Size.x > -2 * dx ) { // Don't allow deflate to eat more width than we have, m_Pos.x -= m_Size.x / 2; m_Size.x = 0; } else { // The inflate is valid. m_Pos.x += dx; m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 } } if( -2 * dy > m_Size.y ) if( m_Size.y >= 0 ) { if( m_Size.y < -2 * dy ) { // Don't allow deflate to eat more height than we have, // a well-defined rectangle cannot have negative height. m_Pos.y += m_Size.y / 2; m_Size.y = 0; } Loading @@ -757,6 +784,22 @@ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) m_Pos.y -= dy; m_Size.y += 2 * dy; } } else // size.y < 0: { if( m_Size.y > 2 * dy ) { // Don't allow deflate to eat more height than we have, m_Pos.y -= m_Size.y / 2; m_Size.y = 0; } else { // The inflate is valid. m_Pos.y += dy; m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 } } return *this; } Loading eeschema/cmpclass.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -282,13 +282,9 @@ EDA_Rect EDA_SchComponentStruct::GetBoundingBox() ret.Merge( m_Field[i].GetBoundaryBox() ); } // ... add padding TODO: improve this ret.m_Pos.x -= PADDING; ret.m_Pos.y -= PADDING; ret.m_Size.x += 2*PADDING; ret.m_Size.y += 2*PADDING; // ... add padding ret.Inflate(PADDING, PADDING); // D( printf("final box: %d,%d, %d,%d\n", ret.m_Pos.x, ret.m_Pos.y, ret.m_Size.x, ret.m_Size.y); ) return ret; } Loading how-to-build-kicad.txt +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ and then: -- debug cd build-debug ../confgiure --enable-unicode --enable-monolithic --enable-debug --enable-debug_gdb --disable-shared --with-msw --with-opengl ../configure --enable-unicode --enable-monolithic --enable-debug --enable-debug_gdb --disable-shared --with-msw --with-opengl make make install Loading kicad/minizip/CMakeLists.txt +7 −10 Original line number Diff line number Diff line Loading @@ -3,16 +3,13 @@ if(ZLIB_FOUND) message(STATUS "Check for installed zlib -- found") else(ZLIB_FOUND) message(STATUS "Check for installed zlib -- not found") if(NOT MINGW) message(FATAL_ERROR "zlib was not found - it is required to build KiCad") else(NOT MINGW) message(STATUS "Use wxWidgets zlib") # zlib is not installed, and in this case wxWidgets creates its own zlib library # include files are in ${wxWidgets_ROOT_DIR}/src/zlib # and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a) # and we try to use it include_directories(${wxWidgets_ROOT_DIR}/src/zlib) endif(NOT MINGW) INCLUDE_DIRECTORIES( ${wxWidgets_ROOT_DIR}/src/zlib) set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a) endif(ZLIB_FOUND) set(MINIZIP_SRCS Loading Loading
change_log.txt +8 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,12 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2008-Mar-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +pcbnew MODULE::GetBoundingBox() takes in account the clearence around the pads (the clearence limit shape around pads (when shown) was not always erased ) 2008-Mar-17 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ Loading Loading @@ -35,8 +41,8 @@ email address. some code cleaning and comment translations. added: /** EDA_Rect::Merge( EDA_Rect & aRect ) * Modify Position and Size of this in order to contains the given rect * mainly used to calculate bouding boxes * Modify Position and Size of this in order to contain the given rect * mainly used to calculate bounding boxes * @param aRect = given rect to merge with this */ Loading
common/base_struct.cpp +73 −30 Original line number Diff line number Diff line Loading @@ -729,11 +729,20 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const /**************************************************/ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) /**************************************************/ /** Function Inflate * Inflate "this": move each horizontal edge by dx and each vertical edge by dy * toward rect outside * if dx and/or dy is negative, move toward rect inside (deflate) * Works for positive and negative rect size * */ { if( -2 * dx > m_Size.x ) if( m_Size.x >= 0 ) { if( m_Size.x < -2 * dx ) { // Don't allow deflate to eat more width than we have, // a well-defined rectangle cannot have negative width. m_Pos.x += m_Size.x / 2; m_Size.x = 0; } Loading @@ -743,11 +752,29 @@ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) m_Pos.x -= dx; m_Size.x += 2 * dx; } } else // size.x < 0: { if( m_Size.x > -2 * dx ) { // Don't allow deflate to eat more width than we have, m_Pos.x -= m_Size.x / 2; m_Size.x = 0; } else { // The inflate is valid. m_Pos.x += dx; m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 } } if( -2 * dy > m_Size.y ) if( m_Size.y >= 0 ) { if( m_Size.y < -2 * dy ) { // Don't allow deflate to eat more height than we have, // a well-defined rectangle cannot have negative height. m_Pos.y += m_Size.y / 2; m_Size.y = 0; } Loading @@ -757,6 +784,22 @@ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) m_Pos.y -= dy; m_Size.y += 2 * dy; } } else // size.y < 0: { if( m_Size.y > 2 * dy ) { // Don't allow deflate to eat more height than we have, m_Pos.y -= m_Size.y / 2; m_Size.y = 0; } else { // The inflate is valid. m_Pos.y += dy; m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 } } return *this; } Loading
eeschema/cmpclass.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -282,13 +282,9 @@ EDA_Rect EDA_SchComponentStruct::GetBoundingBox() ret.Merge( m_Field[i].GetBoundaryBox() ); } // ... add padding TODO: improve this ret.m_Pos.x -= PADDING; ret.m_Pos.y -= PADDING; ret.m_Size.x += 2*PADDING; ret.m_Size.y += 2*PADDING; // ... add padding ret.Inflate(PADDING, PADDING); // D( printf("final box: %d,%d, %d,%d\n", ret.m_Pos.x, ret.m_Pos.y, ret.m_Size.x, ret.m_Size.y); ) return ret; } Loading
how-to-build-kicad.txt +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ and then: -- debug cd build-debug ../confgiure --enable-unicode --enable-monolithic --enable-debug --enable-debug_gdb --disable-shared --with-msw --with-opengl ../configure --enable-unicode --enable-monolithic --enable-debug --enable-debug_gdb --disable-shared --with-msw --with-opengl make make install Loading
kicad/minizip/CMakeLists.txt +7 −10 Original line number Diff line number Diff line Loading @@ -3,16 +3,13 @@ if(ZLIB_FOUND) message(STATUS "Check for installed zlib -- found") else(ZLIB_FOUND) message(STATUS "Check for installed zlib -- not found") if(NOT MINGW) message(FATAL_ERROR "zlib was not found - it is required to build KiCad") else(NOT MINGW) message(STATUS "Use wxWidgets zlib") # zlib is not installed, and in this case wxWidgets creates its own zlib library # include files are in ${wxWidgets_ROOT_DIR}/src/zlib # and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a) # and we try to use it include_directories(${wxWidgets_ROOT_DIR}/src/zlib) endif(NOT MINGW) INCLUDE_DIRECTORIES( ${wxWidgets_ROOT_DIR}/src/zlib) set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a) endif(ZLIB_FOUND) set(MINIZIP_SRCS Loading