2007-08-20 01:20:48 +00:00
|
|
|
/**********************************************************/
|
|
|
|
/* Routines d'affichage de parametres et caracteristiques */
|
|
|
|
/**********************************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
#include "common.h"
|
|
|
|
#include "pcbnew.h"
|
|
|
|
#include "autorout.h"
|
|
|
|
|
|
|
|
#include "3d_struct.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
/* Routines locales */
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/*******************************************************************/
|
2007-08-20 01:20:48 +00:00
|
|
|
void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame )
|
2007-06-05 12:10:51 +00:00
|
|
|
/*******************************************************************/
|
|
|
|
/* Affiche les infos relatives a une equipot: nb de pads, nets , connexions.. */
|
|
|
|
{
|
2007-08-20 01:20:48 +00:00
|
|
|
int nb_vias = 0, ii;
|
|
|
|
EDA_BaseStruct* Struct;
|
|
|
|
wxString txt;
|
|
|
|
MODULE* module;
|
|
|
|
D_PAD* pad;
|
|
|
|
EQUIPOT* equipot;
|
2008-07-08 12:48:20 +00:00
|
|
|
double lengthnet = 0;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
|
|
|
frame->MsgPanel->EraseMsgBox();
|
|
|
|
|
2007-08-20 19:33:15 +00:00
|
|
|
equipot = frame->m_Pcb->FindNet( netcode );
|
2007-08-20 01:20:48 +00:00
|
|
|
if( equipot )
|
|
|
|
Affiche_1_Parametre( frame, 1, _( "Net Name" ), equipot->m_Netname, RED );
|
|
|
|
else
|
|
|
|
Affiche_1_Parametre( frame, 1, _( "No Net (not connected)" ), wxEmptyString, RED );
|
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), netcode );
|
|
|
|
Affiche_1_Parametre( frame, 30, _( "Net Code" ), txt, RED );
|
|
|
|
|
|
|
|
for( ii = 0, module = frame->m_Pcb->m_Modules; module != 0;
|
|
|
|
module = (MODULE*) module->Pnext )
|
|
|
|
{
|
|
|
|
for( pad = module->m_Pads; pad != 0; pad = (D_PAD*) pad->Pnext )
|
|
|
|
{
|
2007-10-13 06:18:44 +00:00
|
|
|
if( pad->GetNet() == netcode )
|
2007-08-20 01:20:48 +00:00
|
|
|
ii++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), ii );
|
|
|
|
Affiche_1_Parametre( frame, 40, _( "Pads" ), txt, DARKGREEN );
|
|
|
|
|
|
|
|
for( ii = 0, Struct = frame->m_Pcb->m_Track; Struct != NULL; Struct = Struct->Pnext )
|
|
|
|
{
|
|
|
|
ii++;
|
2007-09-01 12:00:30 +00:00
|
|
|
if( Struct->Type() == TYPEVIA )
|
2007-10-13 06:18:44 +00:00
|
|
|
if( ( (SEGVIA*) Struct )->GetNet() == netcode )
|
2007-08-20 01:20:48 +00:00
|
|
|
nb_vias++;
|
2008-07-08 12:48:20 +00:00
|
|
|
if( Struct->Type() == TYPETRACK )
|
|
|
|
if( ( (TRACK*) Struct )->GetNet() == netcode )
|
|
|
|
lengthnet += ( (TRACK*) Struct )->GetLength();
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), nb_vias );
|
|
|
|
Affiche_1_Parametre( frame, 50, _( "Vias" ), txt, BLUE );
|
2008-07-08 12:48:20 +00:00
|
|
|
|
|
|
|
valeur_param( (int) lengthnet, txt );
|
|
|
|
Affiche_1_Parametre( frame, 60, _( "Net Length" ), txt, RED );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|