mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 00:30:01 +00:00
see 2007-Oct-12 change_log.txt
This commit is contained in:
parent
0abcf4507d
commit
3cd47555ca
change_log.txt
common
eeschema
gerbview
include
pcbnew
affiche.cppattribut.cppautoplac.cppautorout.cppautorout.hblock.cppboard.cppclass_board.cppclass_board_item.cppclass_equipot.cppclass_equipot.hclass_pad.cppclass_pad.hclass_track.cppclass_track.hclean.cppconnect.cppcontrole.cppcross-probing.cppdeltrack.cppdragsegm.cppdrc.cppedit.cppedit_track_width.cppeditpads.cppeditrack-part2.cppeditrack.cppeditrout.cppexport_gencad.cppioascii.cppmodules.cppmove_copy_track.cppmove_or_drag_track.cppratsnest.cpprouter.cppsolve.cppsurbrill.cpptr_modif.cppundelete.cppxchgmod.cppzones.cpp
share
@ -19,6 +19,40 @@ email address.
|
||||
with genliste.cpp.notused
|
||||
|
||||
|
||||
|
||||
2007-Oct-12 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||
================================================================================
|
||||
+ all
|
||||
* m_NetCode is now private or protected throughout.
|
||||
added SetNet() and GetNet() to all classes which have this member name.
|
||||
ditto for m_Sous_NetCode, for which there is now SetSubNet() and GetSubNet().
|
||||
+ pcbnew
|
||||
added more disambiguating text to the PcbGeneralLocateAndDisplay() popup
|
||||
menu for tracks. We need all the info we can get there I found after using
|
||||
the software for many hours.
|
||||
|
||||
|
||||
Jean-Pierre:
|
||||
|
||||
I never thought I would find a greater problem in using Kicad than having to
|
||||
lay down all the ground and power tracks, rather that just linking vias into
|
||||
pre-established zones or "tagged layers".
|
||||
|
||||
But I have, hundreds of my tracks and vias are showing
|
||||
unconnected under my BGA, (where say the track or via is NetCode==0) and it
|
||||
should not be, because the damn track ties the BGA pad to a nearby via.
|
||||
How can the software be made to think these three items are on the same net,
|
||||
without re-entering all the damn tracks?
|
||||
|
||||
This issue has been coming up for months on the user list, it must be dealt with now.
|
||||
There is always the same lame answer, "make sure your tracks go to the center of the pads".
|
||||
Nonsense, the software picked the track end points, not me, and grid was on when it did it.
|
||||
There are bugs here.
|
||||
|
||||
Does Recalcule_all_net_connexion() work, and why is not called from anywhere?
|
||||
|
||||
|
||||
|
||||
2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||
================================================================================
|
||||
+ pcbnew
|
||||
|
@ -427,7 +427,7 @@ int GetTimeStamp()
|
||||
|
||||
|
||||
/*************************************************/
|
||||
void valeur_param( int valeur, wxString& buf_texte )
|
||||
const wxString& valeur_param( int valeur, wxString& buf_texte )
|
||||
/*************************************************/
|
||||
|
||||
/* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
|
||||
@ -444,4 +444,6 @@ void valeur_param( int valeur, wxString& buf_texte )
|
||||
{
|
||||
buf_texte.Printf( wxT( "%2.4f \"" ), valeur * 0.0001 );
|
||||
}
|
||||
|
||||
return buf_texte;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
|
||||
for( ; NetItemRef < Lim; NetItemRef++ )
|
||||
{
|
||||
/* Tst changement de net */
|
||||
if( OldItem->m_NetCode != NetItemRef->m_NetCode )
|
||||
if( OldItem->GetNet() != NetItemRef->GetNet() )
|
||||
{
|
||||
MinConn = NOC;
|
||||
NetNbItems = 0;
|
||||
@ -581,7 +581,7 @@ static void Diagnose( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||
{
|
||||
Marker->m_Comment.Printf(
|
||||
_( "Warning Pin %s not driven (Net %d)" ),
|
||||
MsgPinElectricType[ii], NetItemRef->m_NetCode );
|
||||
MsgPinElectricType[ii], NetItemRef->GetNet() );
|
||||
if( screen == panel->GetScreen() )
|
||||
RedrawOneStruct( panel, DC, Marker, GR_COPY );
|
||||
return;
|
||||
@ -612,7 +612,7 @@ static void Diagnose( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||
"%s: Pin %s connected to Pin %s (net %d)" ),
|
||||
DiagLevel.GetData(),
|
||||
MsgPinElectricType[ii],
|
||||
MsgPinElectricType[jj], NetItemRef->m_NetCode );
|
||||
MsgPinElectricType[jj], NetItemRef->GetNet() );
|
||||
|
||||
if( screen == panel->GetScreen() )
|
||||
RedrawOneStruct( panel, DC, Marker, GR_COPY );
|
||||
@ -653,7 +653,7 @@ static void TestOthersItems( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||
|
||||
/* Est - on toujours dans le meme net ? */
|
||||
if( (NetItemTst >= Lim) // fin de liste (donc fin de net)
|
||||
|| (NetItemRef->m_NetCode != NetItemTst->m_NetCode) ) // fin de net
|
||||
|| (NetItemRef->GetNet() != NetItemTst->GetNet()) ) // fin de net
|
||||
{ /* Fin de netcode trouve: Tst connexion minimum */
|
||||
if( (*MinConnexion < NET_NC )
|
||||
&& (local_minconn < NET_NC ) ) /* pin non connectée ou non pilotee */
|
||||
@ -796,7 +796,7 @@ void TestLabel( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||
|
||||
/* Est - on toujours dans le meme net ? */
|
||||
if( ( NetItemTst == Lim )
|
||||
|| ( NetItemRef->m_NetCode != NetItemTst->m_NetCode ) )
|
||||
|| ( NetItemRef->GetNet() != NetItemTst->GetNet() ) )
|
||||
{
|
||||
/* Fin de netcode trouve */
|
||||
if( erc )
|
||||
|
@ -192,7 +192,7 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
|
||||
* "netname_sheetnumber" for the usual nets
|
||||
*/
|
||||
{
|
||||
int netcode = Pin->m_NetCode;
|
||||
int netcode = Pin->GetNet();
|
||||
wxString NetName;
|
||||
|
||||
if( (netcode == 0 ) || ( Pin->m_FlagOfConnection != CONNECT ) )
|
||||
@ -204,7 +204,7 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
|
||||
int jj;
|
||||
for( jj = 0; jj < g_NbrObjNet; jj++ )
|
||||
{
|
||||
if( g_TabObjNet[jj].m_NetCode != netcode )
|
||||
if( g_TabObjNet[jj].GetNet() != netcode )
|
||||
continue;
|
||||
if( ( g_TabObjNet[jj].m_Type != NET_GLOBLABEL)
|
||||
&& ( g_TabObjNet[jj].m_Type != NET_LABEL)
|
||||
@ -481,7 +481,7 @@ static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f,
|
||||
if( NetName == wxT( "0" ) || NetName == wxT( "GND" ) )
|
||||
fprintf( f, " 0" );
|
||||
else
|
||||
fprintf( f, " %d", Pin->m_NetCode );
|
||||
fprintf( f, " %d", Pin->GetNet() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -834,13 +834,13 @@ static void WriteGENERICListOfNets( FILE* f, ObjetNetListStruct* ObjNet )
|
||||
|
||||
for( ii = 0; ii < g_NbrObjNet; ii++ )
|
||||
{
|
||||
if( (NetCode = ObjNet[ii].m_NetCode) != LastNetCode ) // New net found, write net id;
|
||||
if( (NetCode = ObjNet[ii].GetNet()) != LastNetCode ) // New net found, write net id;
|
||||
{
|
||||
SameNetcodeCount = 0; // Items count for this net
|
||||
NetName.Empty();
|
||||
for( jj = 0; jj < g_NbrObjNet; jj++ ) // Find a label (if exists) for this net
|
||||
{
|
||||
if( ObjNet[jj].m_NetCode != NetCode )
|
||||
if( ObjNet[jj].GetNet() != NetCode )
|
||||
continue;
|
||||
if( ( ObjNet[jj].m_Type != NET_GLOBLABEL)
|
||||
&& ( ObjNet[jj].m_Type != NET_LABEL)
|
||||
@ -1010,12 +1010,12 @@ static void WriteListOfNetsCADSTAR( FILE* f, ObjetNetListStruct* ObjNet )
|
||||
for( ii = 0; ii < g_NbrObjNet; ii++ )
|
||||
{
|
||||
// Get the NetName of the current net :
|
||||
if( (NetCode = ObjNet[ii].m_NetCode) != LastNetCode )
|
||||
if( (NetCode = ObjNet[ii].GetNet()) != LastNetCode )
|
||||
{
|
||||
NetName.Empty();
|
||||
for( jj = 0; jj < g_NbrObjNet; jj++ )
|
||||
{
|
||||
if( ObjNet[jj].m_NetCode != NetCode )
|
||||
if( ObjNet[jj].GetNet() != NetCode )
|
||||
continue;
|
||||
if( ( ObjNet[jj].m_Type != NET_GLOBLABEL)
|
||||
&& ( ObjNet[jj].m_Type != NET_LABEL)
|
||||
@ -1089,7 +1089,7 @@ static void WriteListOfNetsCADSTAR( FILE* f, ObjetNetListStruct* ObjNet )
|
||||
// pour ne pas generer plusieurs fois la connexion
|
||||
for( jj = ii + 1; jj < g_NbrObjNet; jj++ )
|
||||
{
|
||||
if( ObjNet[jj].m_NetCode != NetCode )
|
||||
if( ObjNet[jj].GetNet() != NetCode )
|
||||
break;
|
||||
if( ObjNet[jj].m_Type != NET_PIN )
|
||||
continue;
|
||||
|
@ -66,7 +66,7 @@ void ObjetNetListStruct::Show( std::ostream& out, int ndx )
|
||||
{
|
||||
out << "<netItem ndx=\"" << ndx << '"' <<
|
||||
" type=\"" << ShowType(m_Type) << '"' <<
|
||||
" netCode=\"" << m_NetCode << '"' <<
|
||||
" netCode=\"" << GetNet() << '"' <<
|
||||
" sheet=\"" << m_SheetNumber << '"' <<
|
||||
">\n";
|
||||
|
||||
@ -226,14 +226,14 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||
case NET_PINLABEL:
|
||||
case NET_SHEETLABEL:
|
||||
case NET_NOCONNECT:
|
||||
if( g_TabObjNet[i].m_NetCode != 0 )
|
||||
if( g_TabObjNet[i].GetNet() != 0 )
|
||||
break; /* Deja connecte */
|
||||
|
||||
case NET_SEGMENT:
|
||||
/* Controle des connexions type point a point ( Sans BUS ) */
|
||||
if( g_TabObjNet[i].m_NetCode == 0 )
|
||||
if( g_TabObjNet[i].GetNet() == 0 )
|
||||
{
|
||||
g_TabObjNet[i].m_NetCode = LastNetCode;
|
||||
g_TabObjNet[i].SetNet( LastNetCode );
|
||||
LastNetCode++;
|
||||
}
|
||||
PointToPointConnect( g_TabObjNet + i, 0, istart );
|
||||
@ -241,9 +241,9 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||
|
||||
case NET_JONCTION:
|
||||
/* Controle des jonction , hors BUS */
|
||||
if( g_TabObjNet[i].m_NetCode == 0 )
|
||||
if( g_TabObjNet[i].GetNet() == 0 )
|
||||
{
|
||||
g_TabObjNet[i].m_NetCode = LastNetCode;
|
||||
g_TabObjNet[i].SetNet( LastNetCode );
|
||||
LastNetCode++;
|
||||
}
|
||||
SegmentToPointConnect( g_TabObjNet + i, 0, istart );
|
||||
@ -260,9 +260,9 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||
case NET_LABEL:
|
||||
case NET_GLOBLABEL:
|
||||
/* Controle des connexions type jonction ( Sans BUS ) */
|
||||
if( g_TabObjNet[i].m_NetCode == 0 )
|
||||
if( g_TabObjNet[i].GetNet() == 0 )
|
||||
{
|
||||
g_TabObjNet[i].m_NetCode = LastNetCode;
|
||||
g_TabObjNet[i].SetNet( LastNetCode );
|
||||
LastNetCode++;
|
||||
}
|
||||
SegmentToPointConnect( g_TabObjNet + i, 0, istart );
|
||||
@ -285,7 +285,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||
case NET_BUSLABELMEMBER:
|
||||
case NET_GLOBBUSLABELMEMBER:
|
||||
/* Controle des connexions semblables a des sur BUS */
|
||||
if( g_TabObjNet[i].m_NetCode == 0 )
|
||||
if( g_TabObjNet[i].GetNet() == 0 )
|
||||
{
|
||||
g_TabObjNet[i].m_BusNetCode = LastBusNetCode;
|
||||
LastBusNetCode++;
|
||||
@ -368,12 +368,12 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||
LastNetCode = NetCode = 0;
|
||||
for( i = 0; i < g_NbrObjNet; i++ )
|
||||
{
|
||||
if( g_TabObjNet[i].m_NetCode != LastNetCode )
|
||||
if( g_TabObjNet[i].GetNet() != LastNetCode )
|
||||
{
|
||||
NetCode++;
|
||||
LastNetCode = g_TabObjNet[i].m_NetCode;
|
||||
LastNetCode = g_TabObjNet[i].GetNet();
|
||||
}
|
||||
g_TabObjNet[i].m_NetCode = NetCode;
|
||||
g_TabObjNet[i].SetNet( NetCode );
|
||||
}
|
||||
|
||||
Affiche_1_Parametre( this, -1, wxEmptyString, _( "Done" ), GREEN );
|
||||
@ -393,7 +393,7 @@ static void SheetLabelConnection( ObjetNetListStruct* SheetLabel )
|
||||
int i;
|
||||
ObjetNetListStruct* ObjetNet;
|
||||
|
||||
if( SheetLabel->m_NetCode == 0 )
|
||||
if( SheetLabel->GetNet() == 0 )
|
||||
return;
|
||||
|
||||
/* Calcul du numero de sous feuille correspondante au sheetlabel */
|
||||
@ -409,17 +409,17 @@ static void SheetLabelConnection( ObjetNetListStruct* SheetLabel )
|
||||
&& (ObjetNet[i].m_Type != NET_GLOBBUSLABELMEMBER ) )
|
||||
continue;
|
||||
|
||||
if( ObjetNet[i].m_NetCode == SheetLabel->m_NetCode )
|
||||
if( ObjetNet[i].GetNet() == SheetLabel->GetNet() )
|
||||
continue;
|
||||
|
||||
if( ObjetNet[i].m_Label->CmpNoCase( *SheetLabel->m_Label ) != 0 )
|
||||
continue;
|
||||
|
||||
/* Propagation du Netcode a tous les Objets de meme NetCode */
|
||||
if( ObjetNet[i].m_NetCode )
|
||||
PropageNetCode( ObjetNet[i].m_NetCode, SheetLabel->m_NetCode, 0 );
|
||||
if( ObjetNet[i].GetNet() )
|
||||
PropageNetCode( ObjetNet[i].GetNet(), SheetLabel->GetNet(), 0 );
|
||||
else
|
||||
ObjetNet[i].m_NetCode = SheetLabel->m_NetCode;
|
||||
ObjetNet[i].SetNet( SheetLabel->GetNet() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -714,9 +714,9 @@ static void ConnectBusLabels( ObjetNetListStruct* Label, int NbItems )
|
||||
|| (Label->m_Type == NET_BUSLABELMEMBER)
|
||||
|| (Label->m_Type == NET_GLOBBUSLABELMEMBER) )
|
||||
{
|
||||
if( Label->m_NetCode == 0 )
|
||||
if( Label->GetNet() == 0 )
|
||||
{
|
||||
Label->m_NetCode = LastNetCode;
|
||||
Label->SetNet( LastNetCode );
|
||||
LastNetCode++;
|
||||
}
|
||||
|
||||
@ -732,10 +732,10 @@ static void ConnectBusLabels( ObjetNetListStruct* Label, int NbItems )
|
||||
if( LabelInTst->m_Member != Label->m_Member )
|
||||
continue;
|
||||
|
||||
if( LabelInTst->m_NetCode == 0 )
|
||||
LabelInTst->m_NetCode = Label->m_NetCode;
|
||||
if( LabelInTst->GetNet() == 0 )
|
||||
LabelInTst->SetNet( Label->GetNet() );
|
||||
else
|
||||
PropageNetCode( LabelInTst->m_NetCode, Label->m_NetCode, 0 );
|
||||
PropageNetCode( LabelInTst->GetNet(), Label->GetNet(), 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -886,9 +886,9 @@ static void PropageNetCode( int OldNetCode, int NewNetCode, int IsBus )
|
||||
{
|
||||
for( jj = 0; jj < g_NbrObjNet; jj++, Objet++ )
|
||||
{
|
||||
if( Objet->m_NetCode == OldNetCode )
|
||||
if( Objet->GetNet() == OldNetCode )
|
||||
{
|
||||
Objet->m_NetCode = NewNetCode;
|
||||
Objet->SetNet( NewNetCode );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -933,7 +933,7 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||
|
||||
if( IsBus == 0 ) /* Objets autres que BUS et BUSLABELS */
|
||||
{
|
||||
netCode = Ref->m_NetCode;
|
||||
netCode = Ref->GetNet();
|
||||
for( i = start; i < g_NbrObjNet; i++ )
|
||||
{
|
||||
if( netTable[i].m_SheetNumber > Ref->m_SheetNumber )
|
||||
@ -954,10 +954,10 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||
|| Ref->m_End == netTable[i].m_Start
|
||||
|| Ref->m_End == netTable[i].m_End )
|
||||
{
|
||||
if( netTable[i].m_NetCode == 0 )
|
||||
netTable[i].m_NetCode = netCode;
|
||||
if( netTable[i].GetNet() == 0 )
|
||||
netTable[i].SetNet( netCode );
|
||||
else
|
||||
PropageNetCode( netTable[i].m_NetCode, netCode, 0 );
|
||||
PropageNetCode( netTable[i].GetNet(), netCode, 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1052,11 +1052,11 @@ static void SegmentToPointConnect( ObjetNetListStruct* Jonction,
|
||||
/* Propagation du Netcode a tous les Objets de meme NetCode */
|
||||
if( IsBus == 0 )
|
||||
{
|
||||
if( Segment[i].m_NetCode )
|
||||
PropageNetCode( Segment[i].m_NetCode,
|
||||
Jonction->m_NetCode, IsBus );
|
||||
if( Segment[i].GetNet() )
|
||||
PropageNetCode( Segment[i].GetNet(),
|
||||
Jonction->GetNet(), IsBus );
|
||||
else
|
||||
Segment[i].m_NetCode = Jonction->m_NetCode;
|
||||
Segment[i].SetNet( Jonction->GetNet() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1076,14 +1076,14 @@ static void SegmentToPointConnect( ObjetNetListStruct* Jonction,
|
||||
*******************************************************************/
|
||||
static void LabelConnection( ObjetNetListStruct* LabelRef )
|
||||
{
|
||||
if( LabelRef->m_NetCode == 0 )
|
||||
if( LabelRef->GetNet() == 0 )
|
||||
return;
|
||||
|
||||
ObjetNetListStruct* netTable = g_TabObjNet;
|
||||
|
||||
for( int i=0; i<g_NbrObjNet; i++ )
|
||||
{
|
||||
if( netTable[i].m_NetCode == LabelRef->m_NetCode )
|
||||
if( netTable[i].GetNet() == LabelRef->GetNet() )
|
||||
continue;
|
||||
|
||||
if( netTable[i].m_SheetNumber != LabelRef->m_SheetNumber )
|
||||
@ -1104,10 +1104,10 @@ static void LabelConnection( ObjetNetListStruct* LabelRef )
|
||||
/* Ici 2 labels identiques */
|
||||
|
||||
/* Propagation du Netcode a tous les Objets de meme NetCode */
|
||||
if( netTable[i].m_NetCode )
|
||||
PropageNetCode( netTable[i].m_NetCode, LabelRef->m_NetCode, 0 );
|
||||
if( netTable[i].GetNet() )
|
||||
PropageNetCode( netTable[i].GetNet(), LabelRef->GetNet(), 0 );
|
||||
else
|
||||
netTable[i].m_NetCode = LabelRef->m_NetCode;
|
||||
netTable[i].SetNet( LabelRef->GetNet() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1124,7 +1124,7 @@ static int TriNetCode( const void* o1, const void* o2 )
|
||||
ObjetNetListStruct* Objet1 = (ObjetNetListStruct*) o1;
|
||||
ObjetNetListStruct* Objet2 = (ObjetNetListStruct*) o2;
|
||||
|
||||
return Objet1->m_NetCode - Objet2->m_NetCode;
|
||||
return Objet1->GetNet() - Objet2->GetNet();
|
||||
}
|
||||
|
||||
|
||||
@ -1173,7 +1173,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||
NetItemTst = NetItemRef + 1;
|
||||
|
||||
if( (NetItemTst >= Lim)
|
||||
|| (NetItemRef->m_NetCode != NetItemTst->m_NetCode) )
|
||||
|| (NetItemRef->GetNet() != NetItemTst->GetNet()) )
|
||||
{
|
||||
/* Net analyse: mise a jour de m_FlagOfConnection */
|
||||
NetEnd = NetItemTst;
|
||||
@ -1195,7 +1195,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||
for( ; ; NetItemTst++ )
|
||||
{
|
||||
if( (NetItemTst >= Lim)
|
||||
|| (NetItemRef->m_NetCode != NetItemTst->m_NetCode) )
|
||||
|| (NetItemRef->GetNet() != NetItemTst->GetNet()) )
|
||||
break;
|
||||
|
||||
switch( NetItemTst->m_Type )
|
||||
|
@ -70,7 +70,9 @@ public:
|
||||
SCH_SCREEN* m_Screen; /* Ecran d'appartenance */
|
||||
NetObjetType m_Type;
|
||||
int m_ElectricalType; /* Pour Pins et sheet labels: type electrique */
|
||||
private:
|
||||
int m_NetCode; /* pour elements simples */
|
||||
public:
|
||||
int m_BusNetCode; /* pour connexions type bus */
|
||||
int m_Member; /* pour les labels type BUSWIRE ( labels de bus eclate )
|
||||
* numero de membre */
|
||||
@ -84,7 +86,9 @@ public:
|
||||
#if defined(DEBUG)
|
||||
void Show( std::ostream& out, int ndx );
|
||||
#endif
|
||||
|
||||
|
||||
void SetNet( int aNetCode ) { m_NetCode = aNetCode; }
|
||||
int GetNet() const { return m_NetCode; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ void Affiche_Infos_Piste( WinEDA_BasePcbFrame* frame, TRACK* pt_piste )
|
||||
|
||||
frame->MsgPanel->EraseMsgBox();
|
||||
|
||||
d_index = pt_piste->m_NetCode;
|
||||
d_index = pt_piste->GetNet();
|
||||
pt_D_code = ReturnToolDescr( layer, d_index, &ii );
|
||||
|
||||
switch( pt_piste->Type() )
|
||||
|
@ -334,7 +334,7 @@ void WinEDA_BasePcbFrame::Block_Move( wxDC* DC )
|
||||
track->Draw( DrawPanel, DC, GR_XOR ); // erase the display
|
||||
track->m_Start.x += deltaX; track->m_Start.y += deltaY;
|
||||
track->m_End.x += deltaX; track->m_End.y += deltaY;
|
||||
track->m_Param += deltaX; track->m_Sous_Netcode += deltaY;
|
||||
track->m_Param += deltaX; track->SetSubNet( track->GetSubNet() + deltaY );
|
||||
track->Draw( DrawPanel, DC, GR_OR ); // redraw the moved track
|
||||
}
|
||||
track = track->Next();
|
||||
@ -349,7 +349,7 @@ void WinEDA_BasePcbFrame::Block_Move( wxDC* DC )
|
||||
zsegment->Draw( DrawPanel, DC, GR_XOR ); // erase the display
|
||||
zsegment->m_Start.x += deltaX; track->m_Start.y += deltaY;
|
||||
zsegment->m_End.x += deltaX; track->m_End.y += deltaY;
|
||||
zsegment->m_Param += deltaX; track->m_Sous_Netcode += deltaY;
|
||||
zsegment->m_Param += deltaX; track->SetSubNet( track->GetSubNet() + deltaY );
|
||||
zsegment->Draw( DrawPanel, DC, GR_OR ); // redraw the moved zone zegment
|
||||
}
|
||||
zsegment = zsegment->Next();
|
||||
|
@ -340,7 +340,7 @@ D_CODE * pt_Dcode; /* Pointeur sur le D code*/
|
||||
track = m_Pcb->m_Track;
|
||||
for ( ; track != NULL ; track = (TRACK*) track->Pnext )
|
||||
{
|
||||
pt_Dcode = ReturnToolDescr(track->GetLayer(), track->m_NetCode);
|
||||
pt_Dcode = ReturnToolDescr(track->GetLayer(), track->GetNet());
|
||||
pt_Dcode->m_InUse = TRUE;
|
||||
|
||||
if ( // Line Item
|
||||
|
@ -28,7 +28,7 @@ void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC, int dcode_value, int laye
|
||||
for( ; track != NULL; track = next_track )
|
||||
{
|
||||
next_track = track->Next();
|
||||
if( dcode_value != track->m_NetCode )
|
||||
if( dcode_value != track->GetNet() )
|
||||
continue;
|
||||
if( layer_number >= 0 && layer_number != track->GetLayer() )
|
||||
continue;
|
||||
|
@ -95,7 +95,7 @@
|
||||
* Les Flash sont représentées par des DRAWSEGMENTS
|
||||
* - ronds ou ovales: DRAWSEGMENTS
|
||||
* - rectangles: DRAWSEGMENTS
|
||||
* la reference aux D-CODES est placée dans le membre m_NetCode
|
||||
* la reference aux D-CODES est placée dans le membre GetNet()
|
||||
*/
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ static void Append_1_Flash_ROND_GERBER( int Dcode_tool,
|
||||
track->m_Start = track->m_End = pos;
|
||||
NEGATE( track->m_Start.y );
|
||||
NEGATE( track->m_End.y );
|
||||
track->m_NetCode = Dcode_tool;
|
||||
track->SetNet( Dcode_tool );
|
||||
track->m_Shape = S_SPOT_CIRCLE;
|
||||
|
||||
Trace_Segment( frame->DrawPanel, DC, track, GR_OR );
|
||||
@ -145,7 +145,7 @@ static void Append_1_Flash_GERBER( int Dcode_index,
|
||||
track->m_Start = track->m_End = pos;
|
||||
NEGATE( track->m_Start.y );
|
||||
NEGATE( track->m_End.y );
|
||||
track->m_NetCode = Dcode_index;
|
||||
track->SetNet( Dcode_index );
|
||||
|
||||
if( forme == OVALE )
|
||||
track->m_Shape = S_SPOT_OVALE;
|
||||
@ -187,7 +187,7 @@ static void Append_1_Line_GERBER( int Dcode_index,
|
||||
NEGATE( track->m_Start.y );
|
||||
track->m_End = endpoint;
|
||||
NEGATE( track->m_End.y );
|
||||
track->m_NetCode = Dcode_index;
|
||||
track->SetNet( Dcode_index );
|
||||
|
||||
Trace_Segment( frame->DrawPanel, DC, track, GR_OR );
|
||||
}
|
||||
@ -279,13 +279,15 @@ static void Append_1_SEG_ARC_GERBER( int Dcode_index,
|
||||
}
|
||||
}
|
||||
|
||||
track->m_NetCode = Dcode_index;
|
||||
track->SetNet( Dcode_index );
|
||||
track->m_Param = center.x;
|
||||
track->m_Sous_Netcode = center.y;
|
||||
track->SetSubNet( center.y );
|
||||
|
||||
NEGATE( track->m_Start.y );
|
||||
NEGATE( track->m_End.y );
|
||||
NEGATE( track->m_Sous_Netcode );
|
||||
|
||||
//NEGATE( track->GetSubNet() );
|
||||
track->SetSubNet( -track->GetSubNet() );
|
||||
|
||||
Trace_Segment( frame->DrawPanel, DC, track, GR_OR );
|
||||
}
|
||||
@ -745,7 +747,7 @@ bool GERBER_Descr::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
|
||||
NEGATE( edge_poly->m_Start.y );
|
||||
edge_poly->m_End = m_CurrentPos;
|
||||
NEGATE( edge_poly->m_End.y );
|
||||
edge_poly->m_NetCode = m_PolygonFillModeState;
|
||||
edge_poly->SetNet( m_PolygonFillModeState );
|
||||
m_PreviousPos = m_CurrentPos;
|
||||
m_PolygonFillModeState = 1;
|
||||
break;
|
||||
|
@ -112,7 +112,7 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
|
||||
if ( printmasklayer != -1 )
|
||||
if ( (track->ReturnMaskLayer() & printmasklayer) == 0 ) continue;
|
||||
|
||||
if( track->m_NetCode == 0 ) // StartPoint
|
||||
if( track->GetNet() == 0 ) // StartPoint
|
||||
{
|
||||
if( nbpoints )
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ void Draw_Track_Buffer( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb, int draw_
|
||||
if( (Track->ReturnMaskLayer() & printmasklayer) == 0 )
|
||||
continue;
|
||||
|
||||
if( (dcode_hightlight == Track->m_NetCode)
|
||||
if( (dcode_hightlight == Track->GetNet())
|
||||
&& (Track->GetLayer() == layer) )
|
||||
Trace_Segment( panel, DC, Track, draw_mode | GR_SURBRILL );
|
||||
else
|
||||
@ -122,13 +122,13 @@ void Trace_Segment( WinEDA_DrawPanel* panel, wxDC* DC, TRACK* track, int draw_mo
|
||||
{
|
||||
GRArc1( &panel->m_ClipBox, DC, track->m_Start.x, track->m_Start.y,
|
||||
track->m_End.x, track->m_End.y,
|
||||
track->m_Param, track->m_Sous_Netcode, 0, color );
|
||||
track->m_Param, track->GetSubNet(), 0, color );
|
||||
}
|
||||
else
|
||||
{
|
||||
GRArc1( &panel->m_ClipBox, DC, track->m_Start.x, track->m_Start.y,
|
||||
track->m_End.x, track->m_End.y,
|
||||
track->m_Param, track->m_Sous_Netcode,
|
||||
track->m_Param, track->GetSubNet(),
|
||||
track->m_Width, color );
|
||||
}
|
||||
}
|
||||
@ -344,7 +344,7 @@ void Affiche_DCodes_Pistes( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb, int d
|
||||
pos.x = (track->m_Start.x + track->m_End.x) / 2;
|
||||
pos.y = (track->m_Start.y + track->m_End.y) / 2;
|
||||
}
|
||||
Line.Printf( wxT( "D%d" ), track->m_NetCode );
|
||||
Line.Printf( wxT( "D%d" ), track->GetNet() );
|
||||
width = track->m_Width;
|
||||
orient = TEXT_ORIENT_HORIZ;
|
||||
if( track->m_Shape >= S_SPOT_CIRCLE ) // forme flash
|
||||
|
@ -44,7 +44,7 @@ void WinEDA_GerberFrame::UnDeleteItem( wxDC* DC )
|
||||
}
|
||||
|
||||
PtStruct = g_UnDeleteStack[g_UnDeleteStackPtr];
|
||||
net_code = ( (TRACK*) PtStruct )->m_NetCode;
|
||||
net_code = ( (TRACK*) PtStruct )->GetNet();
|
||||
pt_track = ( (TRACK*) PtStruct )->GetBestInsertPoint( m_Pcb );
|
||||
( (TRACK*) PtStruct )->Insert( m_Pcb, pt_track );
|
||||
|
||||
|
@ -588,7 +588,7 @@ int GetCommandOptions( const int argc, const char** argv, const char* st
|
||||
const char** optarg, int* optind );
|
||||
|
||||
|
||||
void valeur_param( int valeur, wxString& buf_texte );
|
||||
const wxString& valeur_param( int valeur, wxString& buf_texte );
|
||||
|
||||
/* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
|
||||
* entree : valeur en mils , buffer de texte
|
||||
|
@ -43,7 +43,7 @@ void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame )
|
||||
{
|
||||
for( pad = module->m_Pads; pad != 0; pad = (D_PAD*) pad->Pnext )
|
||||
{
|
||||
if( pad->m_NetCode == netcode )
|
||||
if( pad->GetNet() == netcode )
|
||||
ii++;
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@ void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame )
|
||||
{
|
||||
ii++;
|
||||
if( Struct->Type() == TYPEVIA )
|
||||
if( ( (SEGVIA*) Struct )->m_NetCode == netcode )
|
||||
if( ( (SEGVIA*) Struct )->GetNet() == netcode )
|
||||
nb_vias++;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ void WinEDA_PcbFrame::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
|
||||
{
|
||||
for( ; Track != NULL; Track = (TRACK*) Track->Pnext )
|
||||
{
|
||||
if( net_code == Track->m_NetCode )
|
||||
if( net_code == Track->GetNet() )
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@ void WinEDA_PcbFrame::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
|
||||
DrawPanel->CursorOff( DC ); // Erase cursor shape
|
||||
while( Track ) /* Flag change */
|
||||
{
|
||||
if( (net_code >= 0 ) && (net_code != Track->m_NetCode) )
|
||||
if( (net_code >= 0 ) && (net_code != Track->GetNet()) )
|
||||
break;
|
||||
GetScreen()->SetModify();
|
||||
Track->SetState( SEGM_FIXE, Flag_On );
|
||||
|
@ -449,7 +449,7 @@ int WinEDA_PcbFrame::GenPlaceBoard()
|
||||
TRACK TmpSegm( NULL );
|
||||
|
||||
TmpSegm.SetLayer( -1 );
|
||||
TmpSegm.m_NetCode = -1;
|
||||
TmpSegm.SetNet( -1 );
|
||||
TmpSegm.m_Width = g_GridRoutingSize / 2;
|
||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
|
||||
{
|
||||
@ -970,7 +970,7 @@ void Build_PlacedPads_List( BOARD* Pcb )
|
||||
PtPad->m_physical_connexion = 0;
|
||||
PtPad->m_logical_connexion = 0;
|
||||
PtPad->m_Parent = Module;
|
||||
if( PtPad->m_NetCode )
|
||||
if( PtPad->GetNet() )
|
||||
Pcb->m_NbNodes++;
|
||||
pt_liste_pad++;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************/
|
||||
/* PCBNEW: Autorouting command control */
|
||||
/***************************************/
|
||||
/***************************************/
|
||||
/* PCBNEW: Autorouting command control */
|
||||
/***************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
@ -16,204 +16,220 @@
|
||||
/* Variables locales */
|
||||
|
||||
/********************************************************/
|
||||
void WinEDA_PcbFrame::Autoroute(wxDC * DC, int mode)
|
||||
void WinEDA_PcbFrame::Autoroute( wxDC* DC, int mode )
|
||||
/********************************************************/
|
||||
/* init board, route traces*/
|
||||
{
|
||||
int ii, start, stop;
|
||||
CHEVELU* ptmp;
|
||||
MODULE * Module = NULL;
|
||||
D_PAD * Pad = NULL;
|
||||
int autoroute_net_code = -1;
|
||||
wxString msg;
|
||||
int ii, start, stop;
|
||||
CHEVELU* ptmp;
|
||||
MODULE* Module = NULL;
|
||||
D_PAD* Pad = NULL;
|
||||
int autoroute_net_code = -1;
|
||||
wxString msg;
|
||||
|
||||
if ( g_DesignSettings.m_CopperLayerCount > 1 )
|
||||
{
|
||||
Route_Layer_TOP = GetScreen()->m_Route_Layer_TOP;
|
||||
Route_Layer_BOTTOM = GetScreen()->m_Route_Layer_BOTTOM;
|
||||
}
|
||||
else
|
||||
{
|
||||
Route_Layer_TOP =
|
||||
Route_Layer_BOTTOM = COPPER_LAYER_N;
|
||||
}
|
||||
if( g_DesignSettings.m_CopperLayerCount > 1 )
|
||||
{
|
||||
Route_Layer_TOP = GetScreen()->m_Route_Layer_TOP;
|
||||
Route_Layer_BOTTOM = GetScreen()->m_Route_Layer_BOTTOM;
|
||||
}
|
||||
else
|
||||
{
|
||||
Route_Layer_TOP =
|
||||
Route_Layer_BOTTOM = COPPER_LAYER_N;
|
||||
}
|
||||
|
||||
switch ( mode )
|
||||
{
|
||||
case ROUTE_NET:
|
||||
if ( GetScreen()->GetCurItem() )
|
||||
{
|
||||
switch ( GetScreen()->GetCurItem()->Type() )
|
||||
{
|
||||
case TYPEPAD:
|
||||
Pad = (D_PAD*) GetScreen()->GetCurItem();
|
||||
autoroute_net_code = Pad->m_NetCode;
|
||||
break;
|
||||
switch( mode )
|
||||
{
|
||||
case ROUTE_NET:
|
||||
if( GetScreen()->GetCurItem() )
|
||||
{
|
||||
switch( GetScreen()->GetCurItem()->Type() )
|
||||
{
|
||||
case TYPEPAD:
|
||||
Pad = (D_PAD*) GetScreen()->GetCurItem();
|
||||
autoroute_net_code = Pad->GetNet();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( autoroute_net_code <= 0)
|
||||
{
|
||||
DisplayError(this, _("Net not selected")); return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( autoroute_net_code <= 0 )
|
||||
{
|
||||
DisplayError( this, _( "Net not selected" ) ); return;
|
||||
}
|
||||
break;
|
||||
|
||||
case ROUTE_MODULE:
|
||||
Module = (MODULE*) GetScreen()->GetCurItem();
|
||||
if( (Module == NULL) || (Module->Type() != TYPEMODULE) )
|
||||
{
|
||||
DisplayError(this, _("Module not selected") ); return;
|
||||
}
|
||||
break;
|
||||
|
||||
case ROUTE_PAD:
|
||||
Pad = (D_PAD*) GetScreen()->GetCurItem();
|
||||
if( (Pad == NULL) || (Pad->Type() != TYPEPAD) )
|
||||
{
|
||||
DisplayError(this, _("Pad not selected") ); return;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK ) == 0 )
|
||||
Compile_Ratsnest(DC, TRUE);
|
||||
case ROUTE_MODULE:
|
||||
Module = (MODULE*) GetScreen()->GetCurItem();
|
||||
if( (Module == NULL) || (Module->Type() != TYPEMODULE) )
|
||||
{
|
||||
DisplayError( this, _( "Module not selected" ) ); return;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Placement du flag CH_ROUTE_REQ sur les chevelus demandes */
|
||||
ptmp = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||
for ( ii = m_Pcb->GetNumRatsnests(); ii > 0; ii--, ptmp ++ )
|
||||
{
|
||||
ptmp->status &= ~CH_ROUTE_REQ;
|
||||
switch ( mode )
|
||||
{
|
||||
case ROUTE_ALL:
|
||||
ptmp->status |= CH_ROUTE_REQ; break;
|
||||
case ROUTE_PAD:
|
||||
Pad = (D_PAD*) GetScreen()->GetCurItem();
|
||||
if( (Pad == NULL) || (Pad->Type() != TYPEPAD) )
|
||||
{
|
||||
DisplayError( this, _( "Pad not selected" ) ); return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ROUTE_NET:
|
||||
if( autoroute_net_code == ptmp->m_NetCode)
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
break;
|
||||
|
||||
case ROUTE_MODULE:
|
||||
{
|
||||
D_PAD * pt_pad = (D_PAD *) Module->m_Pads;
|
||||
for( ; pt_pad != NULL; pt_pad = (D_PAD *)pt_pad->Pnext)
|
||||
{
|
||||
if( ptmp->pad_start == pt_pad )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
if( ptmp->pad_end == pt_pad )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ROUTE_PAD:
|
||||
if( (ptmp->pad_start == Pad) || (ptmp->pad_end == Pad))
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ptmp = (CHEVELU*)m_Pcb->m_Ratsnest;
|
||||
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK ) == 0 )
|
||||
Compile_Ratsnest( DC, TRUE );
|
||||
|
||||
start = time( NULL );
|
||||
/* Placement du flag CH_ROUTE_REQ sur les chevelus demandes */
|
||||
ptmp = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; ii--, ptmp++ )
|
||||
{
|
||||
ptmp->status &= ~CH_ROUTE_REQ;
|
||||
|
||||
/* Calcul du pas de routage fixe a 5 mils et plus */
|
||||
g_GridRoutingSize = GetScreen()->GetGrid().x;
|
||||
if (g_GridRoutingSize < 50 ) g_GridRoutingSize = 50 ;
|
||||
E_scale = g_GridRoutingSize / 50 ; if (E_scale < 1 ) E_scale = 1 ;
|
||||
switch( mode )
|
||||
{
|
||||
case ROUTE_ALL:
|
||||
ptmp->status |= CH_ROUTE_REQ; break;
|
||||
|
||||
/* calcule de Ncols et Nrow, taille de la matrice de routage */
|
||||
ComputeMatriceSize(this, g_GridRoutingSize);
|
||||
case ROUTE_NET:
|
||||
if( autoroute_net_code == ptmp->GetNet() )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
break;
|
||||
|
||||
MsgPanel->EraseMsgBox();
|
||||
case ROUTE_MODULE:
|
||||
{
|
||||
D_PAD* pt_pad = (D_PAD*) Module->m_Pads;
|
||||
for( ; pt_pad != NULL; pt_pad = (D_PAD*) pt_pad->Pnext )
|
||||
{
|
||||
if( ptmp->pad_start == pt_pad )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
if( ptmp->pad_end == pt_pad )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
}
|
||||
|
||||
/* Creation du mapping du board */
|
||||
Nb_Sides = ONE_SIDE;
|
||||
if(Route_Layer_TOP != Route_Layer_BOTTOM ) Nb_Sides = TWO_SIDES;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( Board.InitBoard() < 0 )
|
||||
{
|
||||
DisplayError(this, _("No memory for autorouting") );
|
||||
Board.UnInitBoard(); /* Libere la memoire BitMap */
|
||||
return;
|
||||
}
|
||||
case ROUTE_PAD:
|
||||
if( (ptmp->pad_start == Pad) || (ptmp->pad_end == Pad) )
|
||||
ptmp->status |= CH_ROUTE_REQ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Affiche_Message( _("Place Cells") );
|
||||
PlaceCells(m_Pcb, -1, FORCE_PADS);
|
||||
ptmp = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||
|
||||
/* Construction de la liste des pistes a router */
|
||||
Build_Work(m_Pcb, ptmp);
|
||||
start = time( NULL );
|
||||
|
||||
// DisplayBoard(DrawPanel, DC);
|
||||
/* Calcul du pas de routage fixe a 5 mils et plus */
|
||||
g_GridRoutingSize = GetScreen()->GetGrid().x;
|
||||
if( g_GridRoutingSize < 50 )
|
||||
g_GridRoutingSize = 50;
|
||||
E_scale = g_GridRoutingSize / 50; if( E_scale < 1 )
|
||||
E_scale = 1;
|
||||
|
||||
if( Nb_Sides == TWO_SIDES )
|
||||
Solve(DC, TWO_SIDES); /* double face */
|
||||
else Solve(DC, ONE_SIDE); /* simple face */
|
||||
|
||||
/* Liberation de la memoire */
|
||||
FreeQueue(); /* Libere la memoire de routage */
|
||||
InitWork(); /* Libere la memoire de la liste des connexions a router */
|
||||
Board.UnInitBoard(); /* Libere la memoire BitMap */
|
||||
stop = time( NULL ) - start;
|
||||
msg.Printf( wxT("time = %d second%s"), stop, (stop == 1) ? wxT("") : wxT("s") );
|
||||
Affiche_Message(msg);
|
||||
/* calcule de Ncols et Nrow, taille de la matrice de routage */
|
||||
ComputeMatriceSize( this, g_GridRoutingSize );
|
||||
|
||||
MsgPanel->EraseMsgBox();
|
||||
|
||||
/* Creation du mapping du board */
|
||||
Nb_Sides = ONE_SIDE;
|
||||
if( Route_Layer_TOP != Route_Layer_BOTTOM )
|
||||
Nb_Sides = TWO_SIDES;
|
||||
|
||||
if( Board.InitBoard() < 0 )
|
||||
{
|
||||
DisplayError( this, _( "No memory for autorouting" ) );
|
||||
Board.UnInitBoard(); /* Libere la memoire BitMap */
|
||||
return;
|
||||
}
|
||||
|
||||
Affiche_Message( _( "Place Cells" ) );
|
||||
PlaceCells( m_Pcb, -1, FORCE_PADS );
|
||||
|
||||
/* Construction de la liste des pistes a router */
|
||||
Build_Work( m_Pcb, ptmp );
|
||||
|
||||
// DisplayBoard(DrawPanel, DC);
|
||||
|
||||
if( Nb_Sides == TWO_SIDES )
|
||||
Solve( DC, TWO_SIDES ); /* double face */
|
||||
else
|
||||
Solve( DC, ONE_SIDE ); /* simple face */
|
||||
|
||||
/* Liberation de la memoire */
|
||||
FreeQueue(); /* Libere la memoire de routage */
|
||||
InitWork(); /* Libere la memoire de la liste des connexions a router */
|
||||
Board.UnInitBoard(); /* Libere la memoire BitMap */
|
||||
stop = time( NULL ) - start;
|
||||
msg.Printf( wxT( "time = %d second%s" ), stop, (stop == 1) ? wxT( "" ) : wxT( "s" ) );
|
||||
Affiche_Message( msg );
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
void WinEDA_PcbFrame::Reset_Noroutable(wxDC * DC)
|
||||
void WinEDA_PcbFrame::Reset_Noroutable( wxDC* DC )
|
||||
/*************************************************/
|
||||
/* Remet a 0 le flag CH_NOROUTABLE qui est positionne a 1 par Solve()
|
||||
lorsque un chevelu n'a pas ete route.
|
||||
Si ce flag est a 1 il n'est pas reroute
|
||||
*/
|
||||
|
||||
/* Remet a 0 le flag CH_NOROUTABLE qui est positionne a 1 par Solve()
|
||||
* lorsque un chevelu n'a pas ete route.
|
||||
* Si ce flag est a 1 il n'est pas reroute
|
||||
*/
|
||||
{
|
||||
int ii;
|
||||
CHEVELU* pt_rats;
|
||||
int ii;
|
||||
CHEVELU* pt_rats;
|
||||
|
||||
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK )== 0 )
|
||||
Compile_Ratsnest(DC, TRUE);
|
||||
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK )== 0 )
|
||||
Compile_Ratsnest( DC, TRUE );
|
||||
|
||||
pt_rats = (CHEVELU*)m_Pcb->m_Ratsnest;
|
||||
if( pt_rats == NULL ) return;
|
||||
pt_rats = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||
if( pt_rats == NULL )
|
||||
return;
|
||||
|
||||
for ( ii = m_Pcb->GetNumRatsnests(); ii > 0 ; ii-- , pt_rats++)
|
||||
{
|
||||
pt_rats->status &= ~CH_UNROUTABLE ;
|
||||
}
|
||||
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; ii--, pt_rats++ )
|
||||
{
|
||||
pt_rats->status &= ~CH_UNROUTABLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************/
|
||||
void DisplayBoard(WinEDA_DrawPanel * panel, wxDC * DC)
|
||||
void DisplayBoard( WinEDA_DrawPanel* panel, wxDC* DC )
|
||||
/****************************************************/
|
||||
/* Fonction de DEBUG : affiche le remplissage des cellules TOP et BOTTOM */
|
||||
{
|
||||
int row, col, i , j;
|
||||
int dcell0, dcell1 = 0, color;
|
||||
int maxi;
|
||||
int row, col, i, j;
|
||||
int dcell0, dcell1 = 0, color;
|
||||
int maxi;
|
||||
|
||||
maxi = (/*ActiveScreen->Lim_XD - 20*/ 500) / Ncols;
|
||||
maxi = (maxi * 3 ) / 4;
|
||||
if (!maxi) maxi = 1;
|
||||
maxi = ( /*ActiveScreen->Lim_XD - 20*/ 500) / Ncols;
|
||||
maxi = (maxi * 3 ) / 4;
|
||||
if( !maxi )
|
||||
maxi = 1;
|
||||
|
||||
for ( col = 0; col < Ncols; col++)
|
||||
{
|
||||
for(row = 0; row < Nrows; row++)
|
||||
{
|
||||
color = 0;
|
||||
dcell0 = GetCell(row,col,BOTTOM); if (dcell0 & HOLE) color = GREEN;
|
||||
if(Nb_Sides) dcell1 = GetCell(row,col,TOP);
|
||||
if ( dcell1 & HOLE ) color |= RED;
|
||||
dcell0 |= dcell1;
|
||||
if( !color && (dcell0 & VIA_IMPOSSIBLE)) color = BLUE ;
|
||||
if(color)
|
||||
{
|
||||
for (i = 0; i < maxi; i++)
|
||||
for (j = 0; j < maxi; j++)
|
||||
GRSPutPixel(&panel->m_ClipBox, DC,
|
||||
(col*maxi)+i + 10,(row*maxi) + 60 + j, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
for( col = 0; col < Ncols; col++ )
|
||||
{
|
||||
for( row = 0; row < Nrows; row++ )
|
||||
{
|
||||
color = 0;
|
||||
dcell0 = GetCell( row, col, BOTTOM ); if( dcell0 & HOLE )
|
||||
color = GREEN;
|
||||
if( Nb_Sides )
|
||||
dcell1 = GetCell( row, col, TOP );
|
||||
if( dcell1 & HOLE )
|
||||
color |= RED;
|
||||
dcell0 |= dcell1;
|
||||
if( !color && (dcell0 & VIA_IMPOSSIBLE) )
|
||||
color = BLUE;
|
||||
if( color )
|
||||
{
|
||||
for( i = 0; i < maxi; i++ )
|
||||
for( j = 0; j < maxi; j++ )
|
||||
GRSPutPixel( &panel->m_ClipBox, DC,
|
||||
(col * maxi) + i + 10, (row * maxi) + 60 + j, color );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,156 +1,167 @@
|
||||
/****************************************************/
|
||||
/* AUTOROUT.H */
|
||||
/* d‚clarations communes relative au routage, DRC */
|
||||
/* et placement automatique des composants */
|
||||
/****************************************************/
|
||||
/****************************************************/
|
||||
/* AUTOROUT.H */
|
||||
/* d‚clarations communes relative au routage, DRC */
|
||||
/* et placement automatique des composants */
|
||||
/****************************************************/
|
||||
|
||||
#ifndef AUTOROUT_H
|
||||
#define AUTOROUT_H
|
||||
|
||||
|
||||
#define TOP 0
|
||||
#define TOP 0
|
||||
#define BOTTOM 1
|
||||
#define EMPTY 0
|
||||
#define EMPTY 0
|
||||
#define ILLEGAL -1
|
||||
|
||||
|
||||
/*****************************************************/
|
||||
/* Structures de representation des pads et chevelus */
|
||||
/* pour etablissement du chevelu general complet */
|
||||
/*****************************************************/
|
||||
/*****************************************************/
|
||||
/* Structures de representation des pads et chevelus */
|
||||
/* pour etablissement du chevelu general complet */
|
||||
/*****************************************************/
|
||||
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/* description d'un segment de chevelu general */
|
||||
/***********************************************/
|
||||
/****************************/
|
||||
/* bits d'etat du chevelu : */
|
||||
/****************************/
|
||||
#define CH_VISIBLE 1 /* affichage permanent demande */
|
||||
#define CH_UNROUTABLE 2 /* non route par l'autorouteur */
|
||||
#define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */
|
||||
#define CH_ACTIF 8 /* chevelu non encore routé */
|
||||
#define LOCAL_CHEVELU 0x8000 /* indique un chevelu reliant 2 pins d'un meme
|
||||
module pour le calcul des chevelus relatifs a 1 seul module */
|
||||
/***********************************************/
|
||||
/* description d'un segment de chevelu general */
|
||||
/***********************************************/
|
||||
/****************************/
|
||||
/* bits d'etat du chevelu : */
|
||||
/****************************/
|
||||
#define CH_VISIBLE 1 /* affichage permanent demande */
|
||||
#define CH_UNROUTABLE 2 /* non route par l'autorouteur */
|
||||
#define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */
|
||||
#define CH_ACTIF 8 /* chevelu non encore routé */
|
||||
#define LOCAL_CHEVELU 0x8000 /* indique un chevelu reliant 2 pins d'un meme
|
||||
* module pour le calcul des chevelus relatifs a 1 seul module */
|
||||
|
||||
class CHEVELU
|
||||
{
|
||||
private:
|
||||
int m_NetCode; // numero de code du net ( = 0.. n , avec 0 si non connecte)
|
||||
|
||||
public:
|
||||
int m_NetCode; // numero de code du net ( = 0.. n , avec 0 si non connecte)
|
||||
int status; // etat: voir defines précédents (CH_ ...)
|
||||
D_PAD * pad_start; // pointeur sur le pad de depart
|
||||
D_PAD * pad_end ; // pointeur sur le pad de fin
|
||||
int dist; // longeur du chevelu
|
||||
int status; // etat: voir defines précédents (CH_ ...)
|
||||
D_PAD* pad_start; // pointeur sur le pad de depart
|
||||
D_PAD* pad_end; // pointeur sur le pad de fin
|
||||
int dist; // longeur du chevelu
|
||||
|
||||
/**
|
||||
* Function GetNet
|
||||
* @return int - the net code.
|
||||
*/
|
||||
int GetNet() const
|
||||
{
|
||||
return m_NetCode;
|
||||
}
|
||||
void SetNet( int aNetCode )
|
||||
{
|
||||
m_NetCode = aNetCode;
|
||||
};
|
||||
};
|
||||
|
||||
/****************************************************************/
|
||||
/* description d'un point de piste pour le suivi des connexions */
|
||||
/****************************************************************/
|
||||
#define START_SUR_PAD 0x10
|
||||
#define END_SUR_PAD 0x20
|
||||
/****************************************************************/
|
||||
/* description d'un point de piste pour le suivi des connexions */
|
||||
/****************************************************************/
|
||||
#define START_SUR_PAD 0x10
|
||||
#define END_SUR_PAD 0x20
|
||||
#define START_SUR_TRACK 0x40
|
||||
#define END_SUR_TRACK 0x80
|
||||
#define END_SUR_TRACK 0x80
|
||||
|
||||
#define START_EQU_VIA 0x10
|
||||
#define END_EQU_VIA 0x20
|
||||
#define END_EQU_VIA 0x20
|
||||
|
||||
|
||||
/* Status bit (OR'ed bits) for class BOARD member .m_Status_Pcb */
|
||||
enum StatusPcbFlags
|
||||
{
|
||||
LISTE_PAD_OK = 1, /* Pad list is Ok */
|
||||
LISTE_CHEVELU_OK = 2, /* General Rastnest is Ok */
|
||||
CHEVELU_LOCAL_OK = 4, /* current MODULE rastnest is Ok */
|
||||
CONNEXION_OK = 8, /* Bit indicant que la liste des connexions existe */
|
||||
NET_CODES_OK = 0x10, /* Bit indicant que les netcodes sont OK ( pas de modif
|
||||
de noms de net */
|
||||
DO_NOT_SHOW_GENERAL_RASTNEST = 0x20 /* Do not display the general rastnest (used in module moves) */
|
||||
enum StatusPcbFlags {
|
||||
LISTE_PAD_OK = 1, /* Pad list is Ok */
|
||||
LISTE_CHEVELU_OK = 2, /* General Rastnest is Ok */
|
||||
CHEVELU_LOCAL_OK = 4, /* current MODULE rastnest is Ok */
|
||||
CONNEXION_OK = 8, /* Bit indicant que la liste des connexions existe */
|
||||
NET_CODES_OK = 0x10, /* Bit indicant que les netcodes sont OK ( pas de modif
|
||||
* de noms de net */
|
||||
DO_NOT_SHOW_GENERAL_RASTNEST = 0x20 /* Do not display the general rastnest (used in module moves) */
|
||||
};
|
||||
|
||||
#define OK_DRC 0
|
||||
#define OK_DRC 0
|
||||
#define BAD_DRC 1
|
||||
|
||||
|
||||
/* Commandes d'autoplacement / autorouage possibles */
|
||||
enum CommandOpt
|
||||
{
|
||||
PLACE_ALL,
|
||||
PLACE_OUT_OF_BOARD,
|
||||
PLACE_INCREMENTAL,
|
||||
PLACE_1_MODULE,
|
||||
enum CommandOpt {
|
||||
PLACE_ALL,
|
||||
PLACE_OUT_OF_BOARD,
|
||||
PLACE_INCREMENTAL,
|
||||
PLACE_1_MODULE,
|
||||
|
||||
ROUTE_ALL,
|
||||
ROUTE_NET,
|
||||
ROUTE_MODULE,
|
||||
ROUTE_PAD
|
||||
};
|
||||
ROUTE_ALL,
|
||||
ROUTE_NET,
|
||||
ROUTE_MODULE,
|
||||
ROUTE_PAD
|
||||
};
|
||||
|
||||
/* parametre Pas de routage pour routage automatique et generation des zones */
|
||||
|
||||
#if defined MAIN
|
||||
int g_GridRoutingSize = 250;
|
||||
int g_GridRoutingSize = 250;
|
||||
#else
|
||||
extern int g_GridRoutingSize;
|
||||
#endif
|
||||
|
||||
/* Variables et structures d'autoroutage */
|
||||
|
||||
eda_global int E_scale; /* facteur d'echelle des tables de distance */
|
||||
eda_global int E_scale; /* facteur d'echelle des tables de distance */
|
||||
|
||||
#define ONE_SIDE 0
|
||||
#define ONE_SIDE 0
|
||||
#define TWO_SIDES 1
|
||||
eda_global int Nb_Sides; /* Nombre de couches pour autoroutage (0 ou 1) */
|
||||
eda_global int Nb_Sides; /* Nombre de couches pour autoroutage (0 ou 1) */
|
||||
|
||||
/* Bits Flags de gestion de remplissage du BOARD */
|
||||
#define FORCE_PADS 1 /* pour forcage placement pads quel que soit le netcode */
|
||||
#define FORCE_PADS 1 /* pour forcage placement pads quel que soit le netcode */
|
||||
|
||||
/* board dimensions */
|
||||
extern int Nrows, Ncols;
|
||||
extern int Nrows, Ncols;
|
||||
#if defined MAIN
|
||||
int Nrows = ILLEGAL;
|
||||
int Ncols = ILLEGAL;
|
||||
int Nrows = ILLEGAL;
|
||||
int Ncols = ILLEGAL;
|
||||
#endif
|
||||
|
||||
eda_global int Ntotal;
|
||||
|
||||
/* search statistics */
|
||||
eda_global int OpenNodes; /* total number of nodes opened */
|
||||
eda_global int ClosNodes; /* total number of nodes closed */
|
||||
eda_global int MoveNodes; /* total number of nodes moved */
|
||||
eda_global int MaxNodes; /* maximum number of nodes opened at one time */
|
||||
eda_global int OpenNodes; /* total number of nodes opened */
|
||||
eda_global int ClosNodes; /* total number of nodes closed */
|
||||
eda_global int MoveNodes; /* total number of nodes moved */
|
||||
eda_global int MaxNodes; /* maximum number of nodes opened at one time */
|
||||
|
||||
/* Structures utiles a la generation du board en Bit Map */
|
||||
|
||||
|
||||
typedef char BoardCell;
|
||||
typedef int DistCell;
|
||||
typedef int DistCell;
|
||||
|
||||
class BOARDHEAD /* header of blocks of BoardCell */
|
||||
class BOARDHEAD /* header of blocks of BoardCell */
|
||||
{
|
||||
public:
|
||||
BoardCell * m_BoardSide[2]; /* ptr to block of memory: 2-sided board */
|
||||
DistCell * m_DistSide[2]; /* ptr to block of memory: path distance to cells */
|
||||
char * m_DirSide[2]; /* header of blocks of chars:pointers back to source */
|
||||
bool m_InitBoardDone;
|
||||
int m_Layers;
|
||||
int m_Nrows, m_Ncols;
|
||||
int m_MemSize;
|
||||
BoardCell* m_BoardSide[2]; /* ptr to block of memory: 2-sided board */
|
||||
DistCell* m_DistSide[2]; /* ptr to block of memory: path distance to cells */
|
||||
char* m_DirSide[2]; /* header of blocks of chars:pointers back to source */
|
||||
bool m_InitBoardDone;
|
||||
int m_Layers;
|
||||
int m_Nrows, m_Ncols;
|
||||
int m_MemSize;
|
||||
|
||||
public:
|
||||
BOARDHEAD();
|
||||
~BOARDHEAD();
|
||||
int InitBoard();
|
||||
void UnInitBoard();
|
||||
|
||||
BOARDHEAD();
|
||||
~BOARDHEAD();
|
||||
int InitBoard();
|
||||
void UnInitBoard();
|
||||
};
|
||||
|
||||
eda_global BOARDHEAD Board ; /* 2-sided board */
|
||||
eda_global BOARDHEAD Board; /* 2-sided board */
|
||||
|
||||
|
||||
/* Constantes utilisees pour le trace des cellules sur le BOARD */
|
||||
#define WRITE_CELL 0
|
||||
#define WRITE_OR_CELL 1
|
||||
#define WRITE_CELL 0
|
||||
#define WRITE_OR_CELL 1
|
||||
#define WRITE_XOR_CELL 2
|
||||
#define WRITE_AND_CELL 3
|
||||
#define WRITE_ADD_CELL 4
|
||||
@ -159,5 +170,4 @@ eda_global BOARDHEAD Board ; /* 2-sided board */
|
||||
#include "ar_protos.h"
|
||||
|
||||
|
||||
#endif /* AUTOROUT_H */
|
||||
|
||||
#endif /* AUTOROUT_H */
|
||||
|
@ -82,8 +82,12 @@ static bool InstallBlockCmdFrame( WinEDA_BasePcbFrame* parent,
|
||||
|
||||
parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
|
||||
WinEDA_ExecBlockCmdFrame* frame = new WinEDA_ExecBlockCmdFrame( parent, title );
|
||||
nocmd = frame->ShowModal(); frame->Destroy();
|
||||
parent->GetScreen()-> m_Curseur = oldpos;
|
||||
|
||||
nocmd = frame->ShowModal();
|
||||
frame->Destroy();
|
||||
|
||||
parent->GetScreen()->m_Curseur = oldpos;
|
||||
|
||||
parent->DrawPanel->MouseToCursorSchema();
|
||||
parent->DrawPanel->m_IgnoreMouseEvents = FALSE;
|
||||
|
||||
@ -494,6 +498,7 @@ void WinEDA_BasePcbFrame::Block_Delete( wxDC* DC )
|
||||
masque_layer = EDGE_LAYER;
|
||||
if( Block_Include_Draw_Items )
|
||||
masque_layer = ALL_LAYERS;
|
||||
|
||||
if( !Block_Include_Edges_Items )
|
||||
masque_layer &= ~EDGE_LAYER;
|
||||
|
||||
|
@ -200,7 +200,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
|
||||
ptr = (LISTE_PAD*) Pcb->m_Pads; ii = Pcb->m_NbPads;
|
||||
for( ; ii > 0; ii--, ptr++ )
|
||||
{
|
||||
if( (net_code != (*ptr)->m_NetCode ) || (flag & FORCE_PADS) )
|
||||
if( (net_code != (*ptr)->GetNet() ) || (flag & FORCE_PADS) )
|
||||
{
|
||||
Place_1_Pad_Board( Pcb, *ptr, HOLE, marge, WRITE_CELL );
|
||||
}
|
||||
@ -230,7 +230,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
|
||||
TmpSegm->m_Shape = ( (EDGE_MODULE*) PtModStruct )->m_Shape;
|
||||
TmpSegm->m_Width = ( (EDGE_MODULE*) PtModStruct )->m_Width;
|
||||
TmpSegm->m_Param = ( (EDGE_MODULE*) PtModStruct )->m_Angle;
|
||||
TmpSegm->m_NetCode = -1;
|
||||
TmpSegm->SetNet( -1 );
|
||||
|
||||
TraceSegmentPcb( Pcb, TmpSegm, HOLE, marge, WRITE_CELL );
|
||||
TraceSegmentPcb( Pcb, TmpSegm, VIA_IMPOSSIBLE, via_marge,
|
||||
@ -270,7 +270,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
|
||||
TmpSegm->m_Shape = DrawSegm->m_Shape;
|
||||
TmpSegm->m_Width = DrawSegm->m_Width;
|
||||
TmpSegm->m_Param = DrawSegm->m_Angle;
|
||||
TmpSegm->m_NetCode = -1;
|
||||
TmpSegm->SetNet( -1 );
|
||||
|
||||
TraceSegmentPcb( Pcb, TmpSegm, type_cell, marge, WRITE_CELL );
|
||||
|
||||
@ -313,7 +313,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
|
||||
pt_segm = Pcb->m_Track;
|
||||
for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
|
||||
{
|
||||
if( net_code == pt_segm->m_NetCode )
|
||||
if( net_code == pt_segm->GetNet() )
|
||||
continue;
|
||||
TraceSegmentPcb( Pcb, pt_segm, HOLE, marge, WRITE_CELL );
|
||||
TraceSegmentPcb( Pcb, pt_segm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL );
|
||||
@ -323,7 +323,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
|
||||
pt_segm = (TRACK*) Pcb->m_Zone;
|
||||
for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
|
||||
{
|
||||
if( net_code == pt_segm->m_NetCode )
|
||||
if( net_code == pt_segm->GetNet() )
|
||||
continue;
|
||||
TraceSegmentPcb( Pcb, pt_segm, HOLE, marge, WRITE_CELL );
|
||||
TraceSegmentPcb( Pcb, pt_segm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL );
|
||||
@ -357,7 +357,7 @@ int Build_Work( BOARD* Pcb, CHEVELU* pt_base_chevelu )
|
||||
continue;
|
||||
pt_pad = pt_rats->pad_start;
|
||||
|
||||
current_net_code = pt_pad->m_NetCode;
|
||||
current_net_code = pt_pad->GetNet();
|
||||
pt_ch = pt_rats;
|
||||
|
||||
r1 = (pt_pad->m_Pos.y - Pcb->m_BoundaryBox.m_Pos.y + demi_pas ) / g_GridRoutingSize;
|
||||
|
@ -568,7 +568,7 @@ EQUIPOT* BOARD::FindNet( int anetcode ) const
|
||||
EQUIPOT* net = (EQUIPOT*) m_Equipots;
|
||||
while( net )
|
||||
{
|
||||
if( net->m_NetCode == anetcode )
|
||||
if( net->GetNet() == anetcode )
|
||||
break;
|
||||
net = (EQUIPOT*) net->Pnext;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
{
|
||||
case PCB_EQUIPOT_STRUCT_TYPE:
|
||||
text << _( "Net" ) << ( (EQUIPOT*) item )->m_Netname << wxT( " " ) <<
|
||||
( (EQUIPOT*) item )->m_NetCode;
|
||||
( (EQUIPOT*) item )->GetNet();
|
||||
break;
|
||||
|
||||
case TYPEMODULE:
|
||||
@ -60,7 +60,6 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
break;
|
||||
|
||||
case TYPETEXTEMODULE:
|
||||
|
||||
switch( ( (TEXTE_MODULE*) item )->m_Type )
|
||||
{
|
||||
case TEXT_is_REFERENCE:
|
||||
@ -78,7 +77,6 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
<< ( (MODULE*) GetParent() )->GetReference();
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPEEDGEMODULE:
|
||||
@ -124,13 +122,21 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
break;
|
||||
|
||||
case TYPETRACK:
|
||||
text << _( "Track" ) << wxT( " " ) << ((TRACK*)item)->ShowWidth();
|
||||
net = aPcb->FindNet( ((TRACK*)item)->m_NetCode );
|
||||
if( net )
|
||||
// deleting tracks requires all the information we can get to
|
||||
// disambiguate all the crap under the cursor!
|
||||
{
|
||||
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
|
||||
wxString txt;
|
||||
|
||||
text << _( "Track" ) << wxT( " " ) << ((TRACK*)item)->ShowWidth();
|
||||
net = aPcb->FindNet( ((TRACK*)item)->GetNet() );
|
||||
if( net )
|
||||
{
|
||||
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
|
||||
}
|
||||
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim()
|
||||
<< wxT(" ") << _("Net:") << ((TRACK*)item)->GetNet()
|
||||
<< wxT(" ") << _("Length:") << valeur_param( (int) ((TRACK*)item)->GetLength(), txt );
|
||||
}
|
||||
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim();
|
||||
break;
|
||||
|
||||
case TYPEZONE:
|
||||
@ -140,7 +146,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
TimeStampText.Printf( wxT( "(%8.8X)" ), item->m_TimeStamp );
|
||||
text << TimeStampText;
|
||||
}
|
||||
net = aPcb->FindNet( ( (SEGZONE*) item )->m_NetCode );
|
||||
net = aPcb->FindNet( ( (SEGZONE*) item )->GetNet() );
|
||||
if( net )
|
||||
{
|
||||
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
|
||||
@ -160,7 +166,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
|
||||
text << wxT(" ") << _("Buried");
|
||||
// else say nothing about normal vias
|
||||
|
||||
net = aPcb->FindNet( via->m_NetCode );
|
||||
net = aPcb->FindNet( via->GetNet() );
|
||||
if( net )
|
||||
{
|
||||
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user