pcbnew: add trace length from pad to die on chip (module)
This commit is contained in:
parent
f7009397b7
commit
0dd4c05c4f
|
@ -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:
|
||||
|
|
|
@ -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 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue