diff --git a/common/common_plotPDF_functions.cpp b/common/common_plotPDF_functions.cpp index bffdf049e6..a410441a3f 100644 --- a/common/common_plotPDF_functions.cpp +++ b/common/common_plotPDF_functions.cpp @@ -3,6 +3,30 @@ * @brief Kicad: Common plot PDF Routines */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 Lorenzo Marcantonio, l.marcantonio@logossrl.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/common/dialogs/dialog_image_editor.fbp b/common/dialogs/dialog_image_editor.fbp index 27ec5a178e..a7ae6141bb 100644 --- a/common/dialogs/dialog_image_editor.fbp +++ b/common/dialogs/dialog_image_editor.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -15,9 +15,9 @@ none 1 dialog_image_editor - + . - + 1 1 0 @@ -28,15 +28,15 @@ 1 1 0 - - - - + + + + 1 wxBOTH 0 1 - + 1 0 Dock @@ -44,82 +44,82 @@ Left 1 impl_virtual - - + + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 DIALOG_IMAGE_EDITOR_BASE 1 - - + + 1 - - + + Resizable - + 1 340,299 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Image Editor 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bSizerMain wxVERTICAL none @@ -128,7 +128,7 @@ wxEXPAND 1 - + bUpperSizer wxVERTICAL none @@ -137,7 +137,7 @@ wxEXPAND 1 - + bSizerLeft wxHORIZONTAL none @@ -150,79 +150,79 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 256,256 1 m_panelDraw 1 - - + + protected 1 - - + + Resizable - + 1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + OnRedrawPanel - - - - - - + + + + + + @@ -230,7 +230,7 @@ wxEXPAND 0 - + bSizerRight wxVERTICAL none @@ -243,14 +243,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -258,68 +258,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Mirror X - - + + 0 - - + + 0 - + 1 m_buttonMirrorX 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMirrorX_click - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -331,14 +331,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -346,68 +346,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Mirror Y - - + + 0 - - + + 0 - + 1 m_buttonMirrorY 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMirrorY_click - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -419,14 +419,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -434,68 +434,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Rotate - - + + 0 - - + + 0 - + 1 m_buttonRotate 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRotateClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -507,14 +507,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -522,68 +522,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Grey - - + + 0 - - + + 0 - + 1 m_buttonGrey 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnGreyScaleConvert - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -595,14 +595,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 1 0 @@ -610,68 +610,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Half Size - - + + 0 - - + + 0 - + 1 m_buttonHalfSize 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnHalfSize - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -683,14 +683,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -698,68 +698,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Undo Last - - + + 0 - - + + 0 - + 1 m_buttonUndoLast 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnUndoLastChange - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -771,82 +771,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Image Scale: - - + + 0 - - + + 0 - + 1 m_staticTextScale 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -858,86 +858,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 0 - + 0 - + 1 m_textCtrlScale 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -959,17 +959,17 @@ 1 0 0 - + m_sdbSizer1 protected - + OnCancel_Button - - - + + + OnOK_Button - - + + diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 12f62d4fce..99867a7a33 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -170,32 +170,6 @@ protected: */ virtual bool isAutoSaveRequired() const; - /** - * Function propagate - * Used now only in autoplace calculations - * Uses the routing matrix to fill the cells within the zone - * Search and mark cells within the zone, and agree with DRC options. - * Requirements: - * Start from an initial point, to fill zone - * The zone must have no "copper island" - * Algorithm: - * If the current cell has a neighbor flagged as "cell in the zone", it - * become a cell in the zone - * The first point in the zone is the starting point - * 4 searches within the matrix are made: - * 1 - Left to right and top to bottom - * 2 - Right to left and top to bottom - * 3 - bottom to top and Right to left - * 4 - bottom to top and Left to right - * Given the current cell, for each search, we consider the 2 neighbor cells - * the previous cell on the same line and the previous cell on the same column. - * - * This function can request some iterations - * Iterations are made until no cell is added to the zone. - * @return: added cells count (i.e. which the attribute CELL_is_ZONE is set) - */ - int propagate(); - /** * Function duplicateZone * duplicates the given zone. @@ -1460,7 +1434,7 @@ public: * The cost is the longest ratsnest distance with penalty for connections * approaching 45 degrees. */ - float Compute_Ratsnest_PlaceModule( wxDC* DC ); + double Compute_Ratsnest_PlaceModule( wxDC* DC ); /** * Function GenPlaceBoard diff --git a/pcbnew/attribut.cpp b/pcbnew/attribut.cpp index f51fb6c86a..fdac1a24b9 100644 --- a/pcbnew/attribut.cpp +++ b/pcbnew/attribut.cpp @@ -1,7 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * diff --git a/pcbnew/autorouter/automove.cpp b/pcbnew/autorouter/automove.cpp index 0b211e9d95..154fdcc831 100644 --- a/pcbnew/autorouter/automove.cpp +++ b/pcbnew/autorouter/automove.cpp @@ -1,9 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/autorouter/autoplac.cpp b/pcbnew/autorouter/autoplac.cpp index 624bc1ffb1..f09cdf4d8b 100644 --- a/pcbnew/autorouter/autoplac.cpp +++ b/pcbnew/autorouter/autoplac.cpp @@ -1,9 +1,16 @@ +/** + * @file autoplac.cpp + * @brief Routiness to automatically place MODULES on a board. + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,11 +30,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file autoplac.cpp - * @brief Routiness to automatically place MODULES on a board. - */ - #include #include #include @@ -77,8 +79,6 @@ static const float OrientPenality[11] = #define OCCUPED_By_MODULE -1 -static EDA_RECT bbbox; // boards bounding box - static wxPoint CurrPosition; // Current position of the current module placement static bool AutoPlaceShowAll = true; @@ -86,28 +86,18 @@ float MinCout; static int TstModuleOnBoard( BOARD* Pcb, MODULE* Module, bool TstOtherSide ); -static void CreateKeepOutRectangle( BOARD* Pcb, - int ux0, - int uy0, - int ux1, - int uy1, - int marge, - int aKeepOut, - int aLayerMask ); +static void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, + int marge, int aKeepOut, int aLayerMask ); static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC ); - +static int propagate(); void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) { - int ii, activ; - MODULE* ThisModule = NULL; + MODULE* currModule = NULL; wxPoint PosOK; wxPoint memopos; int error; - int NbModules = 0; - int NbTotalModules = 0; - float Pas; int lay_tmp_TOP, lay_tmp_BOTTOM; // Undo: init list @@ -122,27 +112,27 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) switch( place_mode ) { - case PLACE_1_MODULE: - ThisModule = Module; + case PLACE_1_MODULE: + currModule = Module; - if( ThisModule == NULL ) - return; + if( currModule == NULL ) + return; - ThisModule->m_ModuleStatus &= ~(MODULE_is_PLACED | MODULE_to_PLACE); - break; + currModule->m_ModuleStatus &= ~(MODULE_is_PLACED | MODULE_to_PLACE); + break; - case PLACE_OUT_OF_BOARD: - break; + case PLACE_OUT_OF_BOARD: + break; - case PLACE_ALL: - if( !IsOK( this, _( "Footprints NOT LOCKED will be moved" ) ) ) - return; + case PLACE_ALL: + if( !IsOK( this, _( "Footprints NOT LOCKED will be moved" ) ) ) + return; - break; + break; - case PLACE_INCREMENTAL: - if( !IsOK( this, _( "Footprints NOT PLACED will be moved" ) ) ) - return; + case PLACE_INCREMENTAL: + if( !IsOK( this, _( "Footprints NOT PLACED will be moved" ) ) ) + return; break; } @@ -158,18 +148,10 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) RoutingMatrix.m_GridRouting = 10*IU_PER_MILS; // Min value = 1/1000 inch /* Compute module parameters used in auto place */ - Module = GetBoard()->m_Modules; - NbTotalModules = 0; - - for( ; Module != NULL; Module = Module->Next() ) - { - Module->CalculateBoundingBox(); - NbTotalModules ++; - } - if( GenPlaceBoard() == 0 ) return; + int moduleCount = 0; Module = GetBoard()->m_Modules; for( ; Module != NULL; Module = Module->Next() ) @@ -179,10 +161,10 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) switch( place_mode ) { case PLACE_1_MODULE: - if( ThisModule == Module ) + if( currModule == Module ) { // Module will be placed, add to undo. - picker.SetItem( ThisModule ); + picker.SetItem( currModule ); newList.PushItem( picker ); Module->m_ModuleStatus |= MODULE_to_PLACE; @@ -191,12 +173,12 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) break; case PLACE_OUT_OF_BOARD: - Module->m_ModuleStatus &= ~MODULE_is_PLACED; + Module->SetIsPlaced( false ); - if( Module->m_ModuleStatus & MODULE_is_LOCKED ) + if( Module->IsLocked() ) break; - if( !bbbox.Contains( Module->m_Pos ) ) + if( !RoutingMatrix.m_BrdBox.Contains( Module->m_Pos ) ) { // Module will be placed, add to undo. picker.SetItem( Module ); @@ -208,9 +190,9 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) break; case PLACE_ALL: - Module->m_ModuleStatus &= ~MODULE_is_PLACED; + Module->SetIsPlaced( false ); - if( Module->m_ModuleStatus & MODULE_is_LOCKED ) + if( Module->IsLocked() ) break; // Module will be placed, add to undo. @@ -221,9 +203,9 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) break; case PLACE_INCREMENTAL: - if( Module->m_ModuleStatus & MODULE_is_LOCKED ) + if( Module->IsLocked() ) { - Module->m_ModuleStatus &= ~MODULE_is_PLACED; + Module->SetIsPlaced( false ); break; } @@ -242,7 +224,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) if( Module->m_ModuleStatus & MODULE_to_PLACE ) // Erase from screen { - NbModules++; + moduleCount++; Module->Draw( m_canvas, DC, GR_XOR ); } else @@ -251,26 +233,25 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) } } - // Undo: commit + // Undo command: commit list if( newList.GetCount() ) SaveCopyInUndoList( newList, UR_CHANGED ); - activ = 0; - Pas = 100.0; - - if( NbModules ) - Pas = 100.0 / (float) NbModules; + int cnt = 0; + int ii; + wxString msg; while( ( Module = PickModule( this, DC ) ) != NULL ) { - float BestScore; - DisplayActivity( (int) (activ * Pas), wxEmptyString ); activ++; + // Display some info about activity, module placement can take a while: + msg.Printf( _("Place module %d of %d"), cnt, moduleCount ); + SetStatusText( msg ); /* Display fill area of interest, barriers, penalties. */ DrawInfoPlace( DC ); error = GetOptimalModulePlacement( Module, DC ); - BestScore = MinCout; + float BestScore = MinCout; PosOK = CurrPosition; if( error == ESC ) @@ -366,13 +347,13 @@ end_of_tst: Module->CalculateBoundingBox(); GenModuleOnBoard( Module ); - Module->m_ModuleStatus |= MODULE_is_PLACED; + Module->SetIsPlaced( true ); Module->m_ModuleStatus &= ~MODULE_to_PLACE; } CurrPosition = memopos; - RoutingMatrix.UnInitBoard(); + RoutingMatrix.UnInitRoutingMatrix(); Route_Layer_TOP = lay_tmp_TOP; Route_Layer_BOTTOM = lay_tmp_BOTTOM; @@ -400,11 +381,11 @@ void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC ) for( ii = 0; ii < RoutingMatrix.m_Nrows; ii++ ) { - oy = bbbox.GetY() + ( ii * RoutingMatrix.m_GridRouting ); + oy = RoutingMatrix.m_BrdBox.GetY() + ( ii * RoutingMatrix.m_GridRouting ); for( jj = 0; jj < RoutingMatrix.m_Ncols; jj++ ) { - ox = bbbox.GetX() + (jj * RoutingMatrix.m_GridRouting); + ox = RoutingMatrix.m_BrdBox.GetX() + (jj * RoutingMatrix.m_GridRouting); color = BLACK; top_state = GetCell( ii, jj, TOP ); @@ -434,37 +415,20 @@ void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC ) int PCB_EDIT_FRAME::GenPlaceBoard() { - int jj, ii; int NbCells; - EDA_ITEM* PtStruct; wxString msg; - RoutingMatrix.UnInitBoard(); + RoutingMatrix.UnInitRoutingMatrix(); - bbbox = GetBoard()->ComputeBoundingBox( true ); + EDA_RECT bbox = GetBoard()->ComputeBoundingBox( true ); - if( bbbox.GetWidth() == 0 && bbbox.GetHeight() == 0 ) + if( bbox.GetWidth() == 0 || bbox.GetHeight() == 0 ) { DisplayError( this, _( "No PCB edge found, unknown board size!" ) ); return 0; } - /* The boundary box must have its start point on placing grid: */ - bbbox.SetX( bbbox.GetX() - ( bbbox.GetX() % RoutingMatrix.m_GridRouting ) ); - bbbox.SetY( bbbox.GetY() - ( bbbox.GetY() % RoutingMatrix.m_GridRouting ) ); - - /* The boundary box must have its end point on placing grid: */ - wxPoint end = bbbox.GetEnd(); - end.x -= end.x % RoutingMatrix.m_GridRouting; - end.x += RoutingMatrix.m_GridRouting; - end.y -= end.y % RoutingMatrix.m_GridRouting; - end.y += RoutingMatrix.m_GridRouting; - bbbox.SetEnd( end ); - - Nrows = bbbox.GetHeight() / RoutingMatrix.m_GridRouting; - Ncols = bbbox.GetWidth() / RoutingMatrix.m_GridRouting; - /* get a small margin for memory allocation: */ - Ncols += 2; Nrows += 2; + RoutingMatrix.ComputeMatrixSize( GetBoard(), true ); NbCells = Ncols * Nrows; m_messagePanel->EraseMsgBox(); @@ -478,10 +442,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard() /* Choose the number of board sides. */ Nb_Sides = TWO_SIDES; - m_messagePanel->SetMessage( 22, wxT( "S" ), - ( Nb_Sides == TWO_SIDES ) ? wxT( "2" ) : wxT( "1" ), WHITE ); - - RoutingMatrix.InitBoard(); + RoutingMatrix.InitRoutingMatrix(); /* Display memory usage. */ msg.Printf( wxT( "%d" ), RoutingMatrix.m_MemSize / 1024 ); @@ -495,13 +456,14 @@ int PCB_EDIT_FRAME::GenPlaceBoard() Route_Layer_TOP = LAYER_N_FRONT; /* Place the edge layer segments */ - PtStruct = GetBoard()->m_Drawings; TRACK TmpSegm( NULL ); TmpSegm.SetLayer( -1 ); TmpSegm.SetNet( -1 ); TmpSegm.m_Width = RoutingMatrix.m_GridRouting / 2; + EDA_ITEM* PtStruct = GetBoard()->m_Drawings; + for( ; PtStruct != NULL; PtStruct = PtStruct->Next() ) { DRAWSEGMENT* DrawSegm; @@ -529,21 +491,16 @@ int PCB_EDIT_FRAME::GenPlaceBoard() } } - /* Init the point of attachment to the area. */ + // Mark cells of the routing matrix to CELL_is_ZONE + // (i.e. availlable cell to place a module ) + // Init a starting point of attachment to the area. OrCell( Nrows / 2, Ncols / 2, BOTTOM, CELL_is_ZONE ); - /* Fill bottom layer zones. */ - ii = 1; - jj = 1; - - while( ii ) - { - msg.Printf( wxT( "%d" ), jj++ ); - m_messagePanel->SetMessage( 50, _( "Loop" ), msg, CYAN ); + // find and mark all other availlable cells: + for( int ii = 1; ii != 0; ) ii = propagate(); - } - /* Initialize top layer. */ + // Initialize top layer. to the same value as the bottom layer if( RoutingMatrix.m_BoardSide[TOP] ) memcpy( RoutingMatrix.m_BoardSide[TOP], RoutingMatrix.m_BoardSide[BOTTOM], NbCells * sizeof(MATRIX_CELL) ); @@ -566,29 +523,29 @@ void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module ) oy = Module->m_BoundaryBox.GetY() - marge; fy = Module->m_BoundaryBox.GetBottom() + marge; - if( ox < bbbox.GetX() ) - ox = bbbox.GetX(); + if( ox < RoutingMatrix.m_BrdBox.GetX() ) + ox = RoutingMatrix.m_BrdBox.GetX(); - if( ox > bbbox.GetRight() ) - ox = bbbox.GetRight(); + if( ox > RoutingMatrix.m_BrdBox.GetRight() ) + ox = RoutingMatrix.m_BrdBox.GetRight(); - if( fx < bbbox.GetX() ) - fx = bbbox.GetX(); + if( fx < RoutingMatrix.m_BrdBox.GetX() ) + fx = RoutingMatrix.m_BrdBox.GetX(); - if( fx > bbbox.GetRight() ) - fx = bbbox.GetRight(); + if( fx > RoutingMatrix.m_BrdBox.GetRight() ) + fx = RoutingMatrix.m_BrdBox.GetRight(); - if( oy < bbbox.GetY() ) - oy = bbbox.GetY(); + if( oy < RoutingMatrix.m_BrdBox.GetY() ) + oy = RoutingMatrix.m_BrdBox.GetY(); - if( oy > bbbox.GetBottom() ) - oy = bbbox.GetBottom(); + if( oy > RoutingMatrix.m_BrdBox.GetBottom() ) + oy = RoutingMatrix.m_BrdBox.GetBottom(); - if( fy < bbbox.GetY() ) - fy = bbbox.GetY(); + if( fy < RoutingMatrix.m_BrdBox.GetY() ) + fy = RoutingMatrix.m_BrdBox.GetY(); - if( fy > bbbox.GetBottom() ) - fy = bbbox.GetBottom(); + if( fy > RoutingMatrix.m_BrdBox.GetBottom() ) + fy = RoutingMatrix.m_BrdBox.GetBottom(); layerMask = 0; @@ -614,7 +571,7 @@ void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module ) /* Trace clearance. */ marge = ( RoutingMatrix.m_GridRouting * Module->m_PadNum ) / GAIN; - CreateKeepOutRectangle( GetBoard(), ox, oy, fx, fy, marge, KEEP_OUT_MARGIN, layerMask ); + CreateKeepOutRectangle( ox, oy, fx, fy, marge, KEEP_OUT_MARGIN, layerMask ); } @@ -625,14 +582,17 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) int error = 1; int showRat = 0; wxPoint LastPosOK; - float mincout, cout, Score; + double mincout, cout, Score; int keepOut; bool TstOtherSide; + bool showRats = g_Show_Module_Ratsnest; + + g_Show_Module_Ratsnest = false; aModule->DisplayInfo( this ); - LastPosOK.x = bbbox.GetX(); - LastPosOK.y = bbbox.GetY(); + LastPosOK.x = RoutingMatrix.m_BrdBox.GetX(); + LastPosOK.y = RoutingMatrix.m_BrdBox.GetY(); cx = aModule->m_Pos.x; cy = aModule->m_Pos.y; ox = aModule->m_BoundaryBox.GetX() - cx; @@ -640,8 +600,8 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) oy = aModule->m_BoundaryBox.GetY() - cy; fy = aModule->m_BoundaryBox.GetHeight() + oy; - CurrPosition.x = bbbox.GetX() - ox; - CurrPosition.y = bbbox.GetY() - oy; + CurrPosition.x = RoutingMatrix.m_BrdBox.GetX() - ox; + CurrPosition.y = RoutingMatrix.m_BrdBox.GetY() - oy; /* Module placement on grid. */ CurrPosition.x -= CurrPosition.x % RoutingMatrix.m_GridRouting; @@ -680,7 +640,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) mincout = -1.0; SetStatusText( wxT( "Score ??, pos ??" ) ); - for( ; CurrPosition.x < bbbox.GetRight() - fx; + for( ; CurrPosition.x < RoutingMatrix.m_BrdBox.GetRight() - fx; CurrPosition.x += RoutingMatrix.m_GridRouting ) { wxYield(); @@ -700,14 +660,14 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) DrawModuleOutlines( m_canvas, aDC, aModule ); g_Offset_Module.x = cx - CurrPosition.x; - CurrPosition.y = bbbox.GetY() - oy; + CurrPosition.y = RoutingMatrix.m_BrdBox.GetY() - oy; /* Placement on grid. */ CurrPosition.y -= CurrPosition.y % RoutingMatrix.m_GridRouting; DrawModuleOutlines( m_canvas, aDC, aModule ); - for( ; CurrPosition.y < bbbox.GetBottom() - fy; + for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; CurrPosition.y += RoutingMatrix.m_GridRouting ) { /* Erase traces. */ @@ -724,21 +684,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) DrawModuleOutlines( m_canvas, aDC, aModule ); keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); - if( keepOut >= 0 ) /* c a d if the module can be placed. */ + if( keepOut >= 0 ) // i.e. if the module can be put here { error = 0; build_ratsnest_module( aModule ); cout = Compute_Ratsnest_PlaceModule( aDC ); showRat = 1; - Score = cout + (float) keepOut; + Score = cout + keepOut; if( (mincout >= Score ) || (mincout < 0 ) ) { LastPosOK = CurrPosition; mincout = Score; wxString msg; - msg.Printf( wxT( "Score %d, pos %3.4f, %3.4f" ), - (int) mincout, + msg.Printf( wxT( "Score %g, pos %3.4f, %3.4f" ), + mincout, (float) LastPosOK.x / 10000, (float) LastPosOK.y / 10000 ); SetStatusText( msg ); @@ -754,6 +714,8 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) DrawModuleOutlines( m_canvas, aDC, aModule ); /* erasing the last traces */ + g_Show_Module_Ratsnest = showRats; + if( showRat ) Compute_Ratsnest_PlaceModule( aDC ); @@ -832,16 +794,16 @@ int TstRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int side ) * (ux, ux .. y0, y1): * (Sum of cells in terms of distance) */ -unsigned int CalculateKeepOutArea( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int side ) +unsigned int CalculateKeepOutArea( int ux0, int uy0, int ux1, int uy1, int side ) { int row, col; int row_min, row_max, col_min, col_max; unsigned int keepOut; - ux0 -= Pcb->GetBoundingBox().GetX(); - uy0 -= Pcb->GetBoundingBox().GetY(); - ux1 -= Pcb->GetBoundingBox().GetX(); - uy1 -= Pcb->GetBoundingBox().GetY(); + ux0 -= RoutingMatrix.m_BrdBox.GetX(); + uy0 -= RoutingMatrix.m_BrdBox.GetY(); + ux1 -= RoutingMatrix.m_BrdBox.GetX(); + uy1 -= RoutingMatrix.m_BrdBox.GetY(); row_max = uy1 / RoutingMatrix.m_GridRouting; col_max = ux1 / RoutingMatrix.m_GridRouting; @@ -917,15 +879,15 @@ int TstModuleOnBoard( BOARD* Pcb, MODULE* Module, bool TstOtherSide ) marge = ( RoutingMatrix.m_GridRouting * Module->m_PadNum ) / GAIN; - return CalculateKeepOutArea( Pcb, ox - marge, oy - marge, fx + marge, fy + marge, side ); + return CalculateKeepOutArea( ox - marge, oy - marge, fx + marge, fy + marge, side ); } -float PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) +double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) { double cout, icout; - int ox, oy; - int fx, fy; + wxPoint start; // start point of a ratsnest + wxPoint end; // end point of a ratsnest int dx, dy; if( ( GetBoard()->m_Status_Pcb & RATSNEST_ITEM_LOCAL_OK ) == 0 ) @@ -942,60 +904,58 @@ float PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) { RATSNEST_ITEM* pt_local_rats_nest = &GetBoard()->m_LocalRatsnest[ii]; - if( !( pt_local_rats_nest->m_Status & LOCAL_RATSNEST_ITEM ) ) + if( ( pt_local_rats_nest->m_Status & LOCAL_RATSNEST_ITEM ) ) + continue; // Skip ratsnest between 2 pads of the current module + + // Skip modules not inside the board area + MODULE * module = pt_local_rats_nest->m_PadEnd->GetParent(); + if( !RoutingMatrix.m_BrdBox.Contains( module->GetPosition() ) ) + continue; + + start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; + end = pt_local_rats_nest->m_PadEnd->GetPosition(); + + if( AutoPlaceShowAll ) { - ox = pt_local_rats_nest->m_PadStart->GetPosition().x - g_Offset_Module.x; - oy = pt_local_rats_nest->m_PadStart->GetPosition().y - g_Offset_Module.y; - fx = pt_local_rats_nest->m_PadEnd->GetPosition().x; - fy = pt_local_rats_nest->m_PadEnd->GetPosition().y; - - if( AutoPlaceShowAll ) - { - GRLine( m_canvas->GetClipBox(), DC, ox, oy, fx, fy, 0, color ); - } - - /* Cost of the ratsnest. */ - dx = fx - ox; - dy = fy - oy; - - dx = abs( dx ); - dy = abs( dy ); - - if( dx < dy ) - EXCHG( dx, dy ); /* dx >= dy */ - - /* Cost of the longest connection. */ - icout = (float) dx * dx; - - /* Cost of inclination. */ - icout += 3 * (float) dy * dy; - icout = sqrt( icout ); - cout += icout; /* Total cost = sum of costs of each connection. */ + GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); } + + /* Cost of the ratsnest. */ + dx = end.x - start.x; + dy = end.y - start.y; + + dx = abs( dx ); + dy = abs( dy ); + + // ttry to have always dx >= dy to calculate the cost of the rastsnet + if( dx < dy ) + EXCHG( dx, dy ); + + // Cost of the connection = lenght + penalty due to the slope + // dx is the biggest lenght relative to the X or Y axis + // the penalty is max for 45 degrees ratsnests, + // and 0 for horizontal or vertical ratsnests. + // For Horizontal and Vertical ratsnests, dy = 0; + icout = hypot( (double) dx, (double) dy * 2.0 ); + cout += icout; /* Total cost = sum of costs of each connection. */ } - return (float) cout; + return cout; } /** * Function CreateKeepOutRectangle - * builds the cost map. - * Cells ( in Dist mao ) inside the rect x0,y0 a x1,y1 are + * builds the cost map: + * Cells ( in Dist map ) inside the rect x0,y0 a x1,y1 are * incremented by value aKeepOut * Cell outside this rectangle, but inside the rectangle - * x0,y0 -marge to x1,y1 + marge sont incrementede by a decreasing value + * x0,y0 -marge to x1,y1 + marge are incremented by a decreasing value * (aKeepOut ... 0). The decreasing value de pends on the distance to the first rectangle * Therefore the cost is high in rect x0,y0 a x1,y1, and decrease outside this rectangle */ -static void CreateKeepOutRectangle( BOARD* Pcb, - int ux0, - int uy0, - int ux1, - int uy1, - int marge, - int aKeepOut, - int aLayerMask ) +void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, + int marge, int aKeepOut, int aLayerMask ) { int row, col; int row_min, row_max, col_min, col_max, pmarge; @@ -1012,10 +972,10 @@ static void CreateKeepOutRectangle( BOARD* Pcb, if( trace == 0 ) return; - ux0 -= Pcb->GetBoundingBox().GetX(); - uy0 -= Pcb->GetBoundingBox().GetY(); - ux1 -= Pcb->GetBoundingBox().GetX(); - uy1 -= Pcb->GetBoundingBox().GetY(); + ux0 -= RoutingMatrix.m_BrdBox.GetX(); + uy0 -= RoutingMatrix.m_BrdBox.GetY(); + ux1 -= RoutingMatrix.m_BrdBox.GetX(); + uy1 -= RoutingMatrix.m_BrdBox.GetY(); ux0 -= marge; ux1 += marge; uy0 -= marge; uy1 += marge; @@ -1187,7 +1147,31 @@ static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) } -int PCB_EDIT_FRAME::propagate() +/** + * Function propagate + * Used only in autoplace calculations + * Uses the routing matrix to fill the cells within the zone + * Search and mark cells within the zone, and agree with DRC options. + * Requirements: + * Start from an initial point, to fill zone + * The zone must have no "copper island" + * Algorithm: + * If the current cell has a neighbor flagged as "cell in the zone", it + * become a cell in the zone + * The first point in the zone is the starting point + * 4 searches within the matrix are made: + * 1 - Left to right and top to bottom + * 2 - Right to left and top to bottom + * 3 - bottom to top and Right to left + * 4 - bottom to top and Left to right + * Given the current cell, for each search, we consider the 2 neighbor cells + * the previous cell on the same line and the previous cell on the same column. + * + * This function can request some iterations + * Iterations are made until no cell is added to the zone. + * @return: added cells count (i.e. which the attribute CELL_is_ZONE is set) + */ +int propagate() { int row, col; long current_cell, old_cell_H; @@ -1195,10 +1179,6 @@ int PCB_EDIT_FRAME::propagate() int nbpoints = 0; #define NO_CELL_ZONE (HOLE | CELL_is_EDGE | CELL_is_ZONE) - wxString msg; - - m_messagePanel->SetMessage( 57, wxT( "Detect" ), msg, CYAN ); - m_messagePanel->SetMessage( -1, wxEmptyString, wxT( "1" ), CYAN ); pt_cell_V.reserve( MAX( Nrows, Ncols ) ); fill( pt_cell_V.begin(), pt_cell_V.end(), 0 ); @@ -1227,7 +1207,6 @@ int PCB_EDIT_FRAME::propagate() } // Search from right to left and top to bottom/ - m_messagePanel->SetMessage( -1, wxEmptyString, wxT( "2" ), CYAN ); fill( pt_cell_V.begin(), pt_cell_V.end(), 0 ); for( row = 0; row < Nrows; row++ ) @@ -1253,7 +1232,6 @@ int PCB_EDIT_FRAME::propagate() } // Search from bottom to top and right to left. - m_messagePanel->SetMessage( -1, wxEmptyString, wxT( "3" ), CYAN ); fill( pt_cell_V.begin(), pt_cell_V.end(), 0 ); for( col = Ncols - 1; col >= 0; col-- ) @@ -1279,7 +1257,6 @@ int PCB_EDIT_FRAME::propagate() } // Search from bottom to top and left to right. - m_messagePanel->SetMessage( -1, wxEmptyString, wxT( "4" ), CYAN ); fill( pt_cell_V.begin(), pt_cell_V.end(), 0 ); for( col = 0; col < Ncols; col++ ) diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index dc3f8ac2af..00398a2231 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -3,6 +3,33 @@ * @brief Autorouting command and control. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include @@ -156,10 +183,10 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) if( Route_Layer_TOP != Route_Layer_BOTTOM ) Nb_Sides = TWO_SIDES; - if( RoutingMatrix.InitBoard() < 0 ) + if( RoutingMatrix.InitRoutingMatrix() < 0 ) { wxMessageBox( _( "No memory for autorouting" ) ); - RoutingMatrix.UnInitBoard(); /* Free memory. */ + RoutingMatrix.UnInitRoutingMatrix(); /* Free memory. */ return; } @@ -179,7 +206,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) /* Free memory. */ FreeQueue(); InitWork(); /* Free memory for the list of router connections. */ - RoutingMatrix.UnInitBoard(); + RoutingMatrix.UnInitRoutingMatrix(); stop = time( NULL ) - start; msg.Printf( wxT( "time = %d second%s" ), stop, ( stop == 1 ) ? wxT( "" ) : wxT( "s" ) ); SetStatusText( msg ); diff --git a/pcbnew/autorouter/autorout.h b/pcbnew/autorouter/autorout.h index d5f8a3c8b3..8bc85b9a43 100644 --- a/pcbnew/autorouter/autorout.h +++ b/pcbnew/autorouter/autorout.h @@ -1,9 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -95,7 +97,7 @@ public: * cells */ DIR_CELL* m_DirSide[MAX_SIDES_COUNT]; /* header of blocks of chars:pointers back to * source */ - bool m_InitBoardDone; + bool m_InitMatrixDone; int m_Layers; int m_GridRouting; // Size of grid for autoplace/autoroute EDA_RECT m_BrdBox; // Actual board bounding box @@ -110,8 +112,11 @@ public: * Function ComputeMatrixSize * calculates the number of rows and columns of dimensions of \a aPcb for routing and * automatic calculation of area. + * @param aPcb = the physical board + * @param aUseBoardEdgesOnly = true to use board edges only, + * = false to use the full board bounding box (default) */ - bool ComputeMatrixSize( BOARD* aPcb ); + bool ComputeMatrixSize( BOARD* aPcb, bool aUseBoardEdgesOnly = false ); /** * Function InitBoard @@ -119,9 +124,9 @@ public: * * @return the amount of memory used or -1 if default. */ - int InitBoard(); + int InitRoutingMatrix(); - void UnInitBoard(); + void UnInitRoutingMatrix(); }; extern MATRIX_ROUTING_HEAD RoutingMatrix; /* 2-sided board */ @@ -143,8 +148,6 @@ class RATSNEST_ITEM; class TRACK; -int Propagation( PCB_EDIT_FRAME* frame ); - /* Initialize a color value, the cells included in the board edge of the * pad surface by pt_pad, with the margin reserved for isolation and the * half width of the runway diff --git a/pcbnew/autorouter/cell.h b/pcbnew/autorouter/cell.h index a4116362c0..63b76aeddb 100644 --- a/pcbnew/autorouter/cell.h +++ b/pcbnew/autorouter/cell.h @@ -2,6 +2,36 @@ * @file cell.h */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * First copyright (C) Randy Nevin, 1989 (see PCBCA package) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + #ifndef _CELL_H_ #define _CELL_H_ diff --git a/pcbnew/autorouter/dist.cpp b/pcbnew/autorouter/dist.cpp index 11c390b2e7..8bc91921cf 100644 --- a/pcbnew/autorouter/dist.cpp +++ b/pcbnew/autorouter/dist.cpp @@ -3,6 +3,30 @@ * @brief Routines to calculate PCB editor auto routing distances. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * First copyright (C) Randy Nevin, 1989 (see PCBCA package) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index d65d00e4de..591c6ede8b 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -3,6 +3,33 @@ * @brief PCB editor autorouting and "graphics" routines. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/autorouter/queue.cpp b/pcbnew/autorouter/queue.cpp index eb9384de41..cf82a63633 100644 --- a/pcbnew/autorouter/queue.cpp +++ b/pcbnew/autorouter/queue.cpp @@ -1,9 +1,13 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * First copyright (C) Randy Nevin, 1989 (see PCBCA package) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,6 +27,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + /** * @file queue.cpp */ diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index da07b483a8..5771caac12 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -1,9 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -44,14 +46,15 @@ #include -bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb ) +bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb, bool aUseBoardEdgesOnly ) { - aPcb->ComputeBoundingBox(); + aPcb->ComputeBoundingBox( aUseBoardEdgesOnly ); // The boundary box must have its start point on routing grid: m_BrdBox = aPcb->GetBoundingBox(); - m_BrdBox.Offset( -(m_BrdBox.GetX() % m_GridRouting), -(m_BrdBox.GetY() % m_GridRouting) ); + m_BrdBox.SetX( m_BrdBox.GetX() - ( m_BrdBox.GetX() % m_GridRouting ) ); + m_BrdBox.SetY( m_BrdBox.GetY() - ( m_BrdBox.GetY() % m_GridRouting ) ); // The boundary box must have its end point on routing grid: wxPoint end = m_BrdBox.GetEnd(); @@ -71,7 +74,9 @@ bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb ) /* get a small margin for memory allocation: */ Ncols += 1; + m_Nrows = Nrows; Nrows += 1; + m_Ncols = Ncols; return true; } @@ -79,10 +84,10 @@ bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb ) MATRIX_ROUTING_HEAD::MATRIX_ROUTING_HEAD() { - m_BoardSide[0] = m_BoardSide[1] = NULL; - m_DistSide[0] = m_DistSide[1] = NULL; - m_DirSide[0] = m_DirSide[1] = NULL; - m_InitBoardDone = false; + m_BoardSide[0] = m_BoardSide[1] = NULL; + m_DistSide[0] = m_DistSide[1] = NULL; + m_DirSide[0] = m_DirSide[1] = NULL; + m_InitMatrixDone = false; m_Layers = MAX_SIDES_COUNT; m_Nrows = m_Ncols = 0; m_MemSize = 0; @@ -94,7 +99,7 @@ MATRIX_ROUTING_HEAD::~MATRIX_ROUTING_HEAD() } -int MATRIX_ROUTING_HEAD::InitBoard() +int MATRIX_ROUTING_HEAD::InitRoutingMatrix() { int ii, kk; @@ -103,9 +108,10 @@ int MATRIX_ROUTING_HEAD::InitBoard() m_Nrows = Nrows; m_Ncols = Ncols; - m_InitBoardDone = true; /* we have been called */ + m_InitMatrixDone = true; // we have been called - ii = (Nrows + 1) * (Ncols + 1); + // give a small margin for memory allocation: + ii = (Nrows + 1) * (Ncols + 1); for( kk = 0; kk < m_Layers; kk++ ) { @@ -113,21 +119,21 @@ int MATRIX_ROUTING_HEAD::InitBoard() m_DistSide[kk] = NULL; m_DirSide[kk] = NULL; - /* allocate Board & initialize everything to empty */ + /* allocate matrix & initialize everything to empty */ m_BoardSide[kk] = (MATRIX_CELL*) operator new( ii * sizeof(MATRIX_CELL) ); memset( m_BoardSide[kk], 0, ii * sizeof(MATRIX_CELL) ); if( m_BoardSide[kk] == NULL ) return -1; - /***** allocate Distances *****/ + // allocate Distances m_DistSide[kk] = (DIST_CELL*) operator new( ii * sizeof(DIST_CELL) ); memset( m_DistSide[kk], 0, ii * sizeof(DIST_CELL) ); if( m_DistSide[kk] == NULL ) return -1; - /***** allocate Dir (chars) *****/ + // allocate Dir (chars) m_DirSide[kk] = (char*) operator new( ii ); memset( m_DirSide[kk], 0, ii ); @@ -141,29 +147,29 @@ int MATRIX_ROUTING_HEAD::InitBoard() } -void MATRIX_ROUTING_HEAD::UnInitBoard() +void MATRIX_ROUTING_HEAD::UnInitRoutingMatrix() { int ii; - m_InitBoardDone = false; + m_InitMatrixDone = false; for( ii = 0; ii < MAX_SIDES_COUNT; ii++ ) { - /***** de-allocate Dir matrix *****/ + // de-allocate Dir matrix if( m_DirSide[ii] ) { delete m_DirSide[ii]; m_DirSide[ii] = NULL; } - /***** de-allocate Distances matrix *****/ + // de-allocate Distances matrix if( m_DistSide[ii] ) { delete m_DistSide[ii]; m_DistSide[ii] = NULL; } - /**** de-allocate cells matrix *****/ + // de-allocate cells matrix if( m_BoardSide[ii] ) { delete m_BoardSide[ii]; diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 00df5b9a72..2af2369e00 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -1,9 +1,12 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * First copyright (C) Randy Nevin, 1989 (see PCBCA package) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,6 +26,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +/* see "Autorouting With the A* Algorithm" (Dr.Dobbs journal) +*/ + /** * @file solve.cpp */ diff --git a/pcbnew/autorouter/work.cpp b/pcbnew/autorouter/work.cpp index 5e3987245b..35150b16f9 100644 --- a/pcbnew/autorouter/work.cpp +++ b/pcbnew/autorouter/work.cpp @@ -1,9 +1,13 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * + * First copyright (C) Randy Nevin, 1989 (see PCBCA package) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,6 +27,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + /** * @file work.cpp * @brief Automatic routing routines diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 87eecffca8..eda2eff44a 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -1,7 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 4caaa7700e..a95a6c159e 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -1,7 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 3a6e174b9f..d139c38f28 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 79303bcac4..35f9415c2e 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -2,6 +2,31 @@ /* board editor: undo and redo functions for board editor */ /*************************************************************/ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c3a38201a3..6589ba0fc2 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -3,6 +3,33 @@ * @brief BOARD class functions. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Wayne Stambaugh + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include diff --git a/pcbnew/class_board_connected_item.cpp b/pcbnew/class_board_connected_item.cpp index b48776d9f3..8f829e8387 100644 --- a/pcbnew/class_board_connected_item.cpp +++ b/pcbnew/class_board_connected_item.cpp @@ -3,6 +3,31 @@ * @brief BOARD_CONNECTED_ITEM class functions. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index e9639b4fbb..8795948220 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -3,6 +3,31 @@ * @brief Class BOARD_ITEM definition and some basic functions. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 49083ed105..a105008b26 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 04f360b4d1..2984d7c6c1 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 241f6182e0..dde127d5e3 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index bdc42ab9c4..5c115e1aa4 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -1,8 +1,32 @@ -/*****************************************************************************/ -/* Functions to handle markers used to show something (usually a drc problem) */ -/*****************************************************************************/ +/** + * @file class_marker_pcb.cpp + * @brief Functions to handle markers used to show something (usually a drc problem) + */ -/* file class_marker.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index 21f0840cd1..459458ae39 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 51ee5ce91b..75b71a5773 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index acf67bf47e..c6498fc51b 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -1,6 +1,31 @@ -/*************************************************************************/ -/* NETINFO_ITEM class, to handle info on nets (netnames, net constraints */ -/*************************************************************************/ +/** + * @brief NETINFO_ITEM class, to handle info on nets: netnames, net constraints + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 86aa6c60cf..5b338ebeca 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 8587d71808..639e25fc03 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index ed98248d9d..b365cf2a12 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 9a4f5f7590..67837dcff6 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index e69eceb527..65f7401cb8 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2009 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 635d08160b..ef2511683c 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index 3368d30522..09f98f60c9 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -1,18 +1,31 @@ -/******************************************************/ -/* class ZONE_SETTINGS used to handle zones parameters */ -/******************************************************/ - -#ifndef WX_PRECOMP -#include -#endif - -/* For compilers that support precompilation: +/** + * @brief class ZONE_SETTINGS used to handle zones parameters */ -#include -#ifdef __BORLANDC__ -#pragma hdrstop -#endif +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include diff --git a/pcbnew/classpcb.cpp b/pcbnew/classpcb.cpp index a41abd50f2..b9e205e203 100644 --- a/pcbnew/classpcb.cpp +++ b/pcbnew/classpcb.cpp @@ -4,6 +4,32 @@ * except for tracks (see class_track.cpp). */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 8f82c1bf7c..bc3f83f15f 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -6,8 +6,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2011 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 3e8b52b9e4..74f697e8e0 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index da680175e1..8fbea30913 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -1,10 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. - * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 45d614ac3c..adb895ad12 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -3,6 +3,31 @@ * @brief Dialog and code for editing a dimension object. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index ac959dec6d..7757094c5b 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index d1e55c5de0..194d94b742 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index 249c223b65..c04f6556fa 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index 66a5171ac2..9969e83e2d 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index c9f265a5b9..467cb6b999 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index ca3e87cd43..472e1ca18d 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index 5bcc2ce502..9ae7d4bef0 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/gpcb_exchange.cpp b/pcbnew/gpcb_exchange.cpp index 4649825972..58642bdbb4 100644 --- a/pcbnew/gpcb_exchange.cpp +++ b/pcbnew/gpcb_exchange.cpp @@ -3,6 +3,30 @@ * @brief Import functions to import footprints from a gpcb (Newlib) library. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/highlight.cpp b/pcbnew/highlight.cpp index 1a918893e1..ef7d7cd599 100644 --- a/pcbnew/highlight.cpp +++ b/pcbnew/highlight.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 615ac1a322..5c261d2b11 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp index ff4c0afb37..731a584390 100644 --- a/pcbnew/menubar_modedit.cpp +++ b/pcbnew/menubar_modedit.cpp @@ -1,10 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2009-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. - * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 8e8877dab9..64389263e0 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2010-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/modeditoptions.cpp b/pcbnew/modeditoptions.cpp index a8d1de43f2..97a24151bc 100644 --- a/pcbnew/modeditoptions.cpp +++ b/pcbnew/modeditoptions.cpp @@ -1,10 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. - * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 3c6261dede..125f648380 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 379189e01a..2770048f4e 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -515,20 +516,16 @@ void DrawModuleOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* module ) module->DrawEdgesOnly( panel, DC, g_Offset_Module, GR_XOR ); - if( g_Show_Pads_Module_in_Move ) - { - pad_fill_tmp = DisplayOpt.DisplayPadFill; - DisplayOpt.DisplayPadFill = true; + // Show pads in sketch mode to speedu up drawings + pad_fill_tmp = DisplayOpt.DisplayPadFill; + DisplayOpt.DisplayPadFill = true; - pt_pad = module->m_Pads; + pt_pad = module->m_Pads; - for( ; pt_pad != NULL; pt_pad = pt_pad->Next() ) - { - pt_pad->Draw( panel, DC, GR_XOR, g_Offset_Module ); - } + for( ; pt_pad != NULL; pt_pad = pt_pad->Next() ) + pt_pad->Draw( panel, DC, GR_XOR, g_Offset_Module ); - DisplayOpt.DisplayPadFill = pad_fill_tmp; - } + DisplayOpt.DisplayPadFill = pad_fill_tmp; if( g_Show_Module_Ratsnest && panel ) { diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index f99f26c12b..b72387ccfe 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 6f85dbe20b..8f07a6e430 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index dd3304462e..c1f18fa25b 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -1,8 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -54,7 +55,6 @@ bool Drc_On = true; bool g_AutoDeleteOldTrack = true; bool g_Drag_Pistes_On; bool g_Show_Module_Ratsnest; -bool g_Show_Pads_Module_in_Move = true; bool g_Raccord_45_Auto = true; bool g_Alternate_Track_Posture = false; bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 45deg only tracks diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index cf39455997..bc5df44334 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -53,7 +53,6 @@ extern bool Drc_On; extern bool g_AutoDeleteOldTrack; extern bool g_Drag_Pistes_On; extern bool g_Show_Module_Ratsnest; -extern bool g_Show_Pads_Module_in_Move; extern bool g_Raccord_45_Auto; extern bool g_Track_45_Only_Allowed; extern bool g_Alternate_Track_Posture; diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 709d16e51b..99c9a4dfa2 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 85bfc7580c..0a6e80510b 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2005 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 3d0967caad..85237ce72c 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/tool_onrightclick.cpp b/pcbnew/tool_onrightclick.cpp index dcdbadba12..0ec61d8d74 100644 --- a/pcbnew/tool_onrightclick.cpp +++ b/pcbnew/tool_onrightclick.cpp @@ -1,6 +1,31 @@ -/*************************/ -/* tool_onrightclick.cpp */ -/*************************/ +/** + * @file tool_onrightclick.cpp + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index f8f346594c..5d0c5a60d1 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2005 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index a325d66711..ba8f651f29 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2007-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 11eac8c990..2bfa2e5725 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index f1c26eb47f..ec9e1a1c1d 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index f850c84f1a..3dd711c60f 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -2,6 +2,30 @@ * @file xchgmod.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index 38e626c46c..aadd43472c 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -2,6 +2,29 @@ * @file zone_filling_algorithm.cpp: * Algorithms used to fill a zone defined by a polygon and a filling starting point. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include // sort diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9d6c613018..daf585f210 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index f844b5a6a4..20edbff31d 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -1,6 +1,29 @@ /** * @file zones_convert_brd_items_to_polygons_with_Boost.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ /* Functions to convert some board items to polygons * (pads, tracks ..) diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index f65a296d68..8b3376fe63 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -2,6 +2,30 @@ * @file zones_convert_to_polygons_aux_functions.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pcbnew/zones_polygons_insulated_copper_islands.cpp b/pcbnew/zones_polygons_insulated_copper_islands.cpp index f0f81e1ca0..d0a0d09970 100644 --- a/pcbnew/zones_polygons_insulated_copper_islands.cpp +++ b/pcbnew/zones_polygons_insulated_copper_islands.cpp @@ -1,8 +1,29 @@ /** * @file zones_polygons_insulated_copper_islands.cpp */ - -using namespace std; +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pcbnew/zones_polygons_test_connections.cpp b/pcbnew/zones_polygons_test_connections.cpp index 91b4695717..5ee92ff48e 100644 --- a/pcbnew/zones_polygons_test_connections.cpp +++ b/pcbnew/zones_polygons_test_connections.cpp @@ -2,7 +2,29 @@ * @file zones_polygons_test_connections.cpp */ -using namespace std; +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include // sort diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index c9b1bf5fc0..b22ea9c4a2 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -4,6 +4,32 @@ * some pieces of code come from FreePCB. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * Some code comes from FreePCB. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include