diff --git a/common/common.cpp b/common/common.cpp index 8539332040..fd9b59d77d 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -632,7 +632,7 @@ const wxString& valeur_param( int valeur, wxString& buf_texte ) switch( g_UserUnit ) { case MILLIMETRES: - buf_texte.Printf( wxT( "%3.3f mm" ), valeur * 0.00254 ); + buf_texte.Printf( _( "%3.3f mm" ), valeur * 0.00254 ); break; case INCHES: diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index b60466f3d5..9e6e4d7ea2 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -128,6 +128,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) MODULE* module; D_PAD* pad; double lengthnet = 0; + double lengthdie = 0; frame->ClearMsgPanel(); @@ -143,7 +144,10 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) for( pad = module->m_Pads; pad != 0; pad = pad->Next() ) { if( pad->GetNet() == GetNet() ) + { count++; + lengthdie += pad->m_LengthDie; + } } } @@ -165,8 +169,15 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) txt.Printf( wxT( "%d" ), count ); frame->AppendMsgPanel( _( "Vias" ), txt, BLUE ); + valeur_param( (int) (lengthnet + lengthdie), txt ); + frame->AppendMsgPanel( _( "Net Length:" ), txt, RED ); + valeur_param( (int) lengthnet, txt ); - frame->AppendMsgPanel( _( "Net Length" ), txt, RED ); + frame->AppendMsgPanel( _( "on pcb" ), txt, RED ); + + valeur_param( (int) lengthdie, txt ); + frame->AppendMsgPanel( _( "on die" ), txt, RED ); + } diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 4e0efbf02a..cc7e380bcf 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -210,6 +210,7 @@ void D_PAD::Copy( D_PAD* source ) m_PadShape = source->m_PadShape; m_Attribut = source->m_Attribut; m_Orient = source->m_Orient; + m_LengthDie = source->m_LengthDie; m_LocalClearance = source->m_LocalClearance; m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin; m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin; @@ -475,6 +476,12 @@ int D_PAD::ReadDescr( LINE_READER* aReader ) m_Pos = m_Pos0; break; + case 'L': + int lengthdie; + nn = sscanf( PtLine, "%d", &lengthdie ); + m_LengthDie = lengthdie; + break; + case '.': /* Read specific data */ if( strnicmp( Line, ".SolderMask ", 12 ) == 0 ) m_LocalSolderMaskMargin = atoi( Line + 12 ); @@ -562,6 +569,9 @@ bool D_PAD::Save( FILE* aFile ) const fprintf( aFile, "Po %d %d\n", m_Pos0.x, m_Pos0.y ); + if( m_LengthDie != 0 ) + fprintf( aFile, "Le %d\n", m_LengthDie ); + if( m_LocalSolderMaskMargin != 0 ) fprintf( aFile, ".SolderMask %d\n", m_LocalSolderMaskMargin ); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 253e88c5a8..cfb583a24b 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -100,6 +100,9 @@ public: static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode // (mode used to print pads on silkscreen layer) + // Length net from pad to die on chip + int m_LengthDie; + // Local clearance. When null, the module default value is used. // when the module default value is null, the netclass value is used // Usually the local clearance is null