Pcbnew: netlist.cpp: code cleaning. Comments added and updated

This commit is contained in:
jean-pierre charras 2011-05-03 14:57:44 +02:00
parent 1a8e45104a
commit 79b6e4278e
8 changed files with 572 additions and 546 deletions

View File

@ -269,6 +269,18 @@ public:
*/
void SetLastNetListRead( const wxString& aNetListFile );
/**
* Function Test_Duplicate_Missing_And_Extra_Footprints
* Build a list of duplicate, missing and extra footprints
* from the current board and a netlist netlist :
* Shows 3 lists:
* 1 - duplicate footprints on board
* 2 - missing footprints (found in netlist but not on board)
* 3 - footprints not in netlist but on board
* @param aNetlistFullFilename = the full filename netlist
*/
void Test_Duplicate_Missing_And_Extra_Footprints( const wxString& aNetlistFullFilename );
/**
* Function OnHotKey.
* ** Commands are case insensitive **
@ -1044,17 +1056,16 @@ public:
// netlist handling:
void InstallNetlistFrame( wxDC* DC, const wxPoint& pos );
void InstallNetlistFrame( wxDC* DC );
/**
* Function ReadPcbNetlist
* Update footprints (load missing footprints and delete on request extra
* Update footprints (load missing footprints and delete on demand extra
* footprints)
* Update connectivity info ( Net Name list )
* Update Reference, value and "TIME STAMP"
* Update connectivity info, references, values and "TIME STAMP"
* @param aNetlistFullFilename = netlist file name (*.net)
* @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found,
* only the netlist will be used
* @param aCmpFullFileName = cmp/footprint link file name (*.cmp).
* if not found, only the netlist will be used
* @param aMessageWindow = a reference to a wxTextCtrl where to display messages.
* can be NULL
* @param aChangeFootprint if true, footprints that have changed in netlist will be changed
@ -1064,20 +1075,6 @@ public:
* footprints from components (use after reannotation of the
* schematic)
* @return true if Ok
*
* the format of the netlist is something like:
# EESchema Netlist Version 1.0 generee le 18/5/2005-12:30:22
* (
* ( 40C08647 $noname R20 4,7K {Lib=R}
* ( 1 VCC )
* ( 2 MODB_1 )
* )
* ( 40C0863F $noname R18 4,7_k {Lib=R}
* ( 1 VCC )
* ( 2 MODA_1 )
* )
* }
* #End
*/
bool ReadPcbNetlist( const wxString& aNetlistFullFilename,
const wxString& aCmpFullFileName,

View File

@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.04.28"
!define PRODUCT_VERSION "2011.04.29"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""

View File

@ -291,22 +291,15 @@ void MODULE::Flip(const wxPoint& aCentre )
void MODULE::SetPosition( const wxPoint& newpos )
{
int deltaX = newpos.x - m_Pos.x;
int deltaY = newpos.y - m_Pos.y;
wxPoint delta = newpos - m_Pos;
m_Pos.x += deltaX;
m_Pos.y += deltaY;
m_Reference->m_Pos.x += deltaX;
m_Reference->m_Pos.y += deltaY;
m_Value->m_Pos.x += deltaX;
m_Value->m_Pos.y += deltaY;
m_Pos += delta;
m_Reference->m_Pos += delta;
m_Value->m_Pos += delta;
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
pad->m_Pos.x += deltaX;
pad->m_Pos.y += deltaY;
pad->m_Pos += delta;
}
EDA_ITEM* PtStruct = m_Drawings;
@ -325,8 +318,7 @@ void MODULE::SetPosition( const wxPoint& newpos )
case TYPE_TEXTE_MODULE:
{
TEXTE_MODULE* pt_texte = (TEXTE_MODULE*) PtStruct;
pt_texte->m_Pos.x += deltaX;
pt_texte->m_Pos.y += deltaY;
pt_texte->m_Pos += delta;
break;
}
@ -357,7 +349,7 @@ void MODULE::SetOrientation( int newangle )
pad->m_Orient += newangle; /* change m_Orientation */
NORMALIZE_ANGLE_POS( pad->m_Orient );
RotatePoint( &px, &py, (int) m_Orient );
RotatePoint( &px, &py, m_Orient );
pad->m_Pos.x = m_Pos.x + px;
pad->m_Pos.y = m_Pos.y + py;
}

View File

@ -14,13 +14,7 @@
#include "dialog_netlist.h"
extern void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* frame,
const wxString& NetlistFullFilename,
BOARD* Pcb );
void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC )
{
/* Setup the netlist file name to the last net list file read or the board file
* name if no last file read is not set.
@ -62,8 +56,7 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC,
Init();
if( GetSizer() )
GetSizer()->SetSizeHints( this );
GetSizer()->SetSizeHints( this );
}
@ -117,8 +110,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
{
TestFor_Duplicate_Missing_And_Extra_Footprints( this, m_NetlistFilenameCtrl->GetValue(),
m_Parent->GetBoard() );
m_Parent->Test_Duplicate_Missing_And_Extra_Footprints( m_NetlistFilenameCtrl->GetValue() );
}

View File

@ -217,7 +217,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_GET_NETLIST:
InstallNetlistFrame( &dc, wxPoint( -1, -1 ) );
InstallNetlistFrame( &dc );
break;
case ID_GET_TOOLS:

View File

@ -5,7 +5,7 @@
/**
* These strings are used in menus and tools, that do the same command
* But they are internatinalized, and therefore must be created
* But they are internationalized, and therefore must be created
* at run time, on the fly.
* So they cannot be static.
*

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
release version:
2011 apr 28
2011 apr 29
files (.zip,.tgz):
kicad-2011-04-28
kicad-2011-04-29