You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9 KiB

  1. /**********************************************************/
  2. /* Routines d'affichage de parametres et caracteristiques */
  3. /**********************************************************/
  4. #include "fctsys.h"
  5. #include "gr_basic.h"
  6. #include "common.h"
  7. #include "pcbnew.h"
  8. #include "autorout.h"
  9. #include "3d_struct.h"
  10. #include "protos.h"
  11. /* Routines locales */
  12. /*******************************************************************/
  13. void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame )
  14. /*******************************************************************/
  15. /* Affiche les infos relatives a une equipot: nb de pads, nets , connexions.. */
  16. {
  17. int nb_vias = 0, ii;
  18. EDA_BaseStruct* Struct;
  19. wxString txt;
  20. MODULE* module;
  21. D_PAD* pad;
  22. EQUIPOT* equipot;
  23. frame->MsgPanel->EraseMsgBox();
  24. equipot = frame->m_Pcb->FindNet( netcode );
  25. if( equipot )
  26. Affiche_1_Parametre( frame, 1, _( "Net Name" ), equipot->m_Netname, RED );
  27. else
  28. Affiche_1_Parametre( frame, 1, _( "No Net (not connected)" ), wxEmptyString, RED );
  29. txt.Printf( wxT( "%d" ), netcode );
  30. Affiche_1_Parametre( frame, 30, _( "Net Code" ), txt, RED );
  31. for( ii = 0, module = frame->m_Pcb->m_Modules; module != 0;
  32. module = (MODULE*) module->Pnext )
  33. {
  34. for( pad = module->m_Pads; pad != 0; pad = (D_PAD*) pad->Pnext )
  35. {
  36. if( pad->m_NetCode == netcode )
  37. ii++;
  38. }
  39. }
  40. txt.Printf( wxT( "%d" ), ii );
  41. Affiche_1_Parametre( frame, 40, _( "Pads" ), txt, DARKGREEN );
  42. for( ii = 0, Struct = frame->m_Pcb->m_Track; Struct != NULL; Struct = Struct->Pnext )
  43. {
  44. ii++;
  45. if( Struct->Type() == TYPEVIA )
  46. if( ( (SEGVIA*) Struct )->m_NetCode == netcode )
  47. nb_vias++;
  48. }
  49. txt.Printf( wxT( "%d" ), nb_vias );
  50. Affiche_1_Parametre( frame, 50, _( "Vias" ), txt, BLUE );
  51. }