Commit 0dd4c05c authored by Andrey Fedorushkov's avatar Andrey Fedorushkov

pcbnew: add trace length from pad to die on chip (module)

parent f7009397
...@@ -632,7 +632,7 @@ const wxString& valeur_param( int valeur, wxString& buf_texte ) ...@@ -632,7 +632,7 @@ const wxString& valeur_param( int valeur, wxString& buf_texte )
switch( g_UserUnit ) switch( g_UserUnit )
{ {
case MILLIMETRES: case MILLIMETRES:
buf_texte.Printf( wxT( "%3.3f mm" ), valeur * 0.00254 ); buf_texte.Printf( _( "%3.3f mm" ), valeur * 0.00254 );
break; break;
case INCHES: case INCHES:
......
...@@ -128,6 +128,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) ...@@ -128,6 +128,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
MODULE* module; MODULE* module;
D_PAD* pad; D_PAD* pad;
double lengthnet = 0; double lengthnet = 0;
double lengthdie = 0;
frame->ClearMsgPanel(); frame->ClearMsgPanel();
...@@ -143,7 +144,10 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) ...@@ -143,7 +144,10 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
for( pad = module->m_Pads; pad != 0; pad = pad->Next() ) for( pad = module->m_Pads; pad != 0; pad = pad->Next() )
{ {
if( pad->GetNet() == GetNet() ) if( pad->GetNet() == GetNet() )
{
count++; count++;
lengthdie += pad->m_LengthDie;
}
} }
} }
...@@ -165,8 +169,15 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) ...@@ -165,8 +169,15 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
txt.Printf( wxT( "%d" ), count ); txt.Printf( wxT( "%d" ), count );
frame->AppendMsgPanel( _( "Vias" ), txt, BLUE ); frame->AppendMsgPanel( _( "Vias" ), txt, BLUE );
valeur_param( (int) (lengthnet + lengthdie), txt );
frame->AppendMsgPanel( _( "Net Length:" ), txt, RED );
valeur_param( (int) lengthnet, txt ); 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 );
} }
......
...@@ -210,6 +210,7 @@ void D_PAD::Copy( D_PAD* source ) ...@@ -210,6 +210,7 @@ void D_PAD::Copy( D_PAD* source )
m_PadShape = source->m_PadShape; m_PadShape = source->m_PadShape;
m_Attribut = source->m_Attribut; m_Attribut = source->m_Attribut;
m_Orient = source->m_Orient; m_Orient = source->m_Orient;
m_LengthDie = source->m_LengthDie;
m_LocalClearance = source->m_LocalClearance; m_LocalClearance = source->m_LocalClearance;
m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin; m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin;
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin; m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
...@@ -475,6 +476,12 @@ int D_PAD::ReadDescr( LINE_READER* aReader ) ...@@ -475,6 +476,12 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
m_Pos = m_Pos0; m_Pos = m_Pos0;
break; break;
case 'L':
int lengthdie;
nn = sscanf( PtLine, "%d", &lengthdie );
m_LengthDie = lengthdie;
break;
case '.': /* Read specific data */ case '.': /* Read specific data */
if( strnicmp( Line, ".SolderMask ", 12 ) == 0 ) if( strnicmp( Line, ".SolderMask ", 12 ) == 0 )
m_LocalSolderMaskMargin = atoi( Line + 12 ); m_LocalSolderMaskMargin = atoi( Line + 12 );
...@@ -562,6 +569,9 @@ bool D_PAD::Save( FILE* aFile ) const ...@@ -562,6 +569,9 @@ bool D_PAD::Save( FILE* aFile ) const
fprintf( aFile, "Po %d %d\n", m_Pos0.x, m_Pos0.y ); 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 ) if( m_LocalSolderMaskMargin != 0 )
fprintf( aFile, ".SolderMask %d\n", m_LocalSolderMaskMargin ); fprintf( aFile, ".SolderMask %d\n", m_LocalSolderMaskMargin );
......
...@@ -100,6 +100,9 @@ public: ...@@ -100,6 +100,9 @@ public:
static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode
// (mode used to print pads on silkscreen layer) // (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. // Local clearance. When null, the module default value is used.
// when the module default value is null, the netclass value is used // when the module default value is null, the netclass value is used
// Usually the local clearance is null // Usually the local clearance is null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment