bug solved: netlist calculations could crash eeschema under very rare circumstances. See also changelog
This commit is contained in:
parent
c10fdc422b
commit
88b1c9b7d3
|
@ -5,6 +5,15 @@ Started 2007-June-11
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
2008-Aug-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
|
================================================================================
|
||||||
|
+eeschema:
|
||||||
|
bug solved: netlist calculations could crash eeschema under very rare circumstances.
|
||||||
|
recent bug solved: background filled shapes (filled but not solid: texts are readables inside shapes)
|
||||||
|
were drawn (and plotted) as filled (solid) shapes
|
||||||
|
enhancements needed for plotting background filled shapes, in color mode
|
||||||
|
(cannot be filled in black and white mode)
|
||||||
|
|
||||||
2008-Aug-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
2008-Aug-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
================================================================================
|
================================================================================
|
||||||
+pcbnew:
|
+pcbnew:
|
||||||
|
|
|
@ -238,7 +238,7 @@ class LibDrawArc : public LibEDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Rayon;
|
int m_Rayon;
|
||||||
bool m_Fill;
|
int m_Fill; // NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR
|
||||||
int t1, t2; /* position des 2 extremites de l'arc en 0,1 degres */
|
int t1, t2; /* position des 2 extremites de l'arc en 0,1 degres */
|
||||||
wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/
|
wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class LibDrawCircle : public LibEDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Rayon;
|
int m_Rayon;
|
||||||
bool m_Fill;
|
int m_Fill;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LibDrawCircle();
|
LibDrawCircle();
|
||||||
|
@ -299,7 +299,7 @@ class LibDrawSquare : public LibEDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPoint m_End;
|
wxPoint m_End;
|
||||||
bool m_Fill;
|
int m_Fill;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LibDrawSquare();
|
LibDrawSquare();
|
||||||
|
@ -337,7 +337,7 @@ class LibDrawPolyline : public LibEDA_BaseStruct
|
||||||
public:
|
public:
|
||||||
int n;
|
int n;
|
||||||
int* PolyList;
|
int* PolyList;
|
||||||
bool m_Fill;
|
int m_Fill;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LibDrawPolyline();
|
LibDrawPolyline();
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
/* Routines locales */
|
/* Routines locales */
|
||||||
static void PropageNetCode( int OldNetCode, int NewNetCode, int IsBus );
|
static void PropageNetCode( int OldNetCode, int NewNetCode, int IsBus );
|
||||||
static void SheetLabelConnect( ObjetNetListStruct* SheetLabel );
|
static void SheetLabelConnect( ObjetNetListStruct* SheetLabel );
|
||||||
static int ListeObjetConnection( DrawSheetPath* sheetlist,
|
static int ListeObjetConnection( DrawSheetPath* sheetlist,
|
||||||
ObjetNetListStruct* ObjNet );
|
ObjetNetListStruct* ObjNet );
|
||||||
static int ConvertBusToMembers( ObjetNetListStruct* ObjNet );
|
static int ConvertBusToMembers( ObjetNetListStruct* ObjNet );
|
||||||
static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus,
|
static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus,
|
||||||
|
@ -28,7 +28,7 @@ static void LabelConnect( ObjetNetListStruct* Label );
|
||||||
static int TriNetCode( const void* o1, const void* o2 );
|
static int TriNetCode( const void* o1, const void* o2 );
|
||||||
static void ConnectBusLabels( ObjetNetListStruct* Label, int NbItems );
|
static void ConnectBusLabels( ObjetNetListStruct* Label, int NbItems );
|
||||||
static void SetUnconnectedFlag( ObjetNetListStruct* ObjNet, int NbItems );
|
static void SetUnconnectedFlag( ObjetNetListStruct* ObjNet, int NbItems );
|
||||||
static int TriBySheet( const void* o1, const void* o2 );
|
static int TriBySheet( const void* o1, const void* o2 );
|
||||||
|
|
||||||
/* Variable locales */
|
/* Variable locales */
|
||||||
static int FirstNumWireBus, LastNumWireBus, RootBusNameLength;
|
static int FirstNumWireBus, LastNumWireBus, RootBusNameLength;
|
||||||
|
@ -36,7 +36,7 @@ static int LastNetCode, LastBusNetCode;
|
||||||
static int s_PassNumber;
|
static int s_PassNumber;
|
||||||
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined (DEBUG)
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
const char* ShowType( NetObjetType aType )
|
const char* ShowType( NetObjetType aType )
|
||||||
{
|
{
|
||||||
|
@ -44,22 +44,52 @@ const char* ShowType( NetObjetType aType )
|
||||||
|
|
||||||
switch( aType )
|
switch( aType )
|
||||||
{
|
{
|
||||||
case NET_SEGMENT: ret = "segment"; break;
|
case NET_SEGMENT:
|
||||||
case NET_BUS: ret = "bus"; break;
|
ret = "segment"; break;
|
||||||
case NET_JONCTION: ret = "junction"; break;
|
|
||||||
case NET_LABEL: ret = "label"; break;
|
case NET_BUS:
|
||||||
case NET_HIERLABEL: ret = "hierlabel"; break;
|
ret = "bus"; break;
|
||||||
case NET_GLOBLABEL: ret = "glabel"; break;
|
|
||||||
case NET_BUSLABELMEMBER: ret = "buslblmember"; break;
|
case NET_JONCTION:
|
||||||
case NET_HIERBUSLABELMEMBER: ret = "hierbuslblmember"; break;
|
ret = "junction"; break;
|
||||||
case NET_GLOBBUSLABELMEMBER: ret = "gbuslblmember"; break;
|
|
||||||
case NET_SHEETBUSLABELMEMBER: ret = "sbuslblmember"; break;
|
case NET_LABEL:
|
||||||
case NET_SHEETLABEL: ret = "sheetlabel"; break;
|
ret = "label"; break;
|
||||||
case NET_PINLABEL: ret = "pinlabel"; break;
|
|
||||||
case NET_PIN: ret = "pin"; break;
|
case NET_HIERLABEL:
|
||||||
case NET_NOCONNECT: ret = "noconnect"; break;
|
ret = "hierlabel"; break;
|
||||||
default: ret = "??"; break;
|
|
||||||
|
case NET_GLOBLABEL:
|
||||||
|
ret = "glabel"; break;
|
||||||
|
|
||||||
|
case NET_BUSLABELMEMBER:
|
||||||
|
ret = "buslblmember"; break;
|
||||||
|
|
||||||
|
case NET_HIERBUSLABELMEMBER:
|
||||||
|
ret = "hierbuslblmember"; break;
|
||||||
|
|
||||||
|
case NET_GLOBBUSLABELMEMBER:
|
||||||
|
ret = "gbuslblmember"; break;
|
||||||
|
|
||||||
|
case NET_SHEETBUSLABELMEMBER:
|
||||||
|
ret = "sbuslblmember"; break;
|
||||||
|
|
||||||
|
case NET_SHEETLABEL:
|
||||||
|
ret = "sheetlabel"; break;
|
||||||
|
|
||||||
|
case NET_PINLABEL:
|
||||||
|
ret = "pinlabel"; break;
|
||||||
|
|
||||||
|
case NET_PIN:
|
||||||
|
ret = "pin"; break;
|
||||||
|
|
||||||
|
case NET_NOCONNECT:
|
||||||
|
ret = "noconnect"; break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ret = "??"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,11 +97,12 @@ const char* ShowType( NetObjetType aType )
|
||||||
void ObjetNetListStruct::Show( std::ostream& out, int ndx )
|
void ObjetNetListStruct::Show( std::ostream& out, int ndx )
|
||||||
{
|
{
|
||||||
wxString path = m_SheetList.PathHumanReadable();
|
wxString path = m_SheetList.PathHumanReadable();
|
||||||
|
|
||||||
out << "<netItem ndx=\"" << ndx << '"' <<
|
out << "<netItem ndx=\"" << ndx << '"' <<
|
||||||
" type=\"" << ShowType(m_Type) << '"' <<
|
" type=\"" << ShowType( m_Type ) << '"' <<
|
||||||
" netCode=\"" << GetNet() << '"' <<
|
" netCode=\"" << GetNet() << '"' <<
|
||||||
" sheet=\"" << CONV_TO_UTF8(path) << '"' <<
|
" sheet=\"" << CONV_TO_UTF8( path ) << '"' <<
|
||||||
">\n";
|
">\n";
|
||||||
|
|
||||||
out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
|
out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
|
||||||
|
|
||||||
|
@ -86,13 +117,16 @@ void ObjetNetListStruct::Show( std::ostream& out, int ndx )
|
||||||
out << "</netItem>\n";
|
out << "</netItem>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void dumpNetTable()
|
void dumpNetTable()
|
||||||
{
|
{
|
||||||
for( int i=0; i<g_NbrObjNet; ++i )
|
for( int i = 0; i<g_NbrObjNet; ++i )
|
||||||
{
|
{
|
||||||
g_TabObjNet[i].Show( std::cout, i );
|
g_TabObjNet[i].Show( std::cout, i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,6 +165,7 @@ void FreeTabNetList( ObjetNetListStruct* TabNetItems, int NbrNetItems )
|
||||||
case NET_SHEETBUSLABELMEMBER:
|
case NET_SHEETBUSLABELMEMBER:
|
||||||
case NET_BUSLABELMEMBER:
|
case NET_BUSLABELMEMBER:
|
||||||
SAFE_DELETE( TabNetItems[i].m_Label );
|
SAFE_DELETE( TabNetItems[i].m_Label );
|
||||||
|
|
||||||
//see the note in ConvertBustToMembers
|
//see the note in ConvertBustToMembers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -143,27 +178,28 @@ void FreeTabNetList( ObjetNetListStruct* TabNetItems, int NbrNetItems )
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
void* WinEDA_SchematicFrame::BuildNetListBase()
|
void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
|
|
||||||
/* Routine qui construit le tableau des elements connectes du projet
|
/* Routine qui construit le tableau des elements connectes du projet
|
||||||
* met a jour:
|
* met a jour:
|
||||||
* g_TabObjNet
|
* g_TabObjNet
|
||||||
* g_NbrObjNet
|
* g_NbrObjNet
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int NetNumber;
|
int NetNumber;
|
||||||
int i, istart, NetCode;
|
int i, istart, NetCode;
|
||||||
DrawSheetPath* sheet;
|
DrawSheetPath* sheet;
|
||||||
wxString msg, activity;
|
wxString msg, activity;
|
||||||
wxBusyCursor Busy;
|
wxBusyCursor Busy;
|
||||||
|
|
||||||
NetNumber = 1;
|
NetNumber = 1;
|
||||||
s_PassNumber = 0;
|
s_PassNumber = 0;
|
||||||
|
|
||||||
activity = _( "List" );
|
activity = _( "List" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Build the sheet (not screen) list (flattened)*/
|
/* Build the sheet (not screen) list (flattened)*/
|
||||||
EDA_SheetList SheetListList( NULL );
|
EDA_SheetList SheetListList( NULL );
|
||||||
i=0;
|
i = 0;
|
||||||
/* first pass : count objects used in connectivty calculation */
|
/* first pass : count objects used in connectivty calculation */
|
||||||
g_NbrObjNet = 0;
|
g_NbrObjNet = 0;
|
||||||
g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */
|
g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */
|
||||||
|
@ -173,7 +209,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
|
|
||||||
for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() )
|
for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() )
|
||||||
{
|
{
|
||||||
g_NbrObjNet += ListeObjetConnection( sheet, NULL );
|
g_NbrObjNet += ListeObjetConnection( sheet, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( g_NbrObjNet == 0 )
|
if( g_NbrObjNet == 0 )
|
||||||
|
@ -190,24 +226,24 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
/* second pass: fill the fields of the structures used in connectivty calculation */
|
/* second pass: fill the fields of the structures used in connectivty calculation */
|
||||||
|
|
||||||
s_PassNumber++;
|
s_PassNumber++;
|
||||||
|
ObjetNetListStruct* tabObjNet = g_TabObjNet;
|
||||||
sheet = SheetListList.GetFirst();
|
sheet = SheetListList.GetFirst();
|
||||||
for( ObjetNetListStruct* tabObjNet = g_TabObjNet;
|
for( ; sheet != NULL; sheet = SheetListList.GetNext() )
|
||||||
sheet != NULL; sheet = SheetListList.GetNext() )
|
|
||||||
{
|
{
|
||||||
tabObjNet += ListeObjetConnection( sheet, tabObjNet );
|
int icnt = ListeObjetConnection( sheet, tabObjNet );
|
||||||
|
tabObjNet += icnt; // tabObjNet points the first free location in g_TabObjNet
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.Empty();
|
activity.Empty();
|
||||||
activity << wxT(" ") << _( "NbItems" ) << wxT(" ") << g_NbrObjNet;
|
activity << wxT( " " ) << _( "NbItems" ) << wxT( " " ) << g_NbrObjNet;
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Sort objects by Sheet */
|
/* Sort objects by Sheet */
|
||||||
|
|
||||||
qsort( g_TabObjNet, g_NbrObjNet, sizeof(ObjetNetListStruct), TriBySheet );
|
qsort( g_TabObjNet, g_NbrObjNet, sizeof(ObjetNetListStruct), TriBySheet );
|
||||||
|
|
||||||
activity << wxT("; ") << _( "Conn" );
|
activity << wxT( "; " ) << _( "Conn" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
sheet = &(g_TabObjNet[0].m_SheetList);
|
sheet = &(g_TabObjNet[0].m_SheetList);
|
||||||
LastNetCode = LastBusNetCode = 1;
|
LastNetCode = LastBusNetCode = 1;
|
||||||
|
@ -216,7 +252,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
{
|
{
|
||||||
if( g_TabObjNet[i].m_SheetList != *sheet )
|
if( g_TabObjNet[i].m_SheetList != *sheet )
|
||||||
{
|
{
|
||||||
sheet = &(g_TabObjNet[i].m_SheetList);
|
sheet = &(g_TabObjNet[i].m_SheetList);
|
||||||
istart = i;
|
istart = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +263,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
case NET_SHEETLABEL:
|
case NET_SHEETLABEL:
|
||||||
case NET_NOCONNECT:
|
case NET_NOCONNECT:
|
||||||
if( g_TabObjNet[i].GetNet() != 0 )
|
if( g_TabObjNet[i].GetNet() != 0 )
|
||||||
break; /* Deja connecte */
|
break; /* Deja connecte */
|
||||||
|
|
||||||
case NET_SEGMENT:
|
case NET_SEGMENT:
|
||||||
/* Controle des connexions type point a point ( Sans BUS ) */
|
/* Controle des connexions type point a point ( Sans BUS ) */
|
||||||
|
@ -271,7 +307,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
|
|
||||||
case NET_SHEETBUSLABELMEMBER:
|
case NET_SHEETBUSLABELMEMBER:
|
||||||
if( g_TabObjNet[i].m_BusNetCode != 0 )
|
if( g_TabObjNet[i].m_BusNetCode != 0 )
|
||||||
break; /* Deja connecte */
|
break; /* Deja connecte */
|
||||||
|
|
||||||
case NET_BUS:
|
case NET_BUS:
|
||||||
/* Controle des connexions type point a point mode BUS */
|
/* Controle des connexions type point a point mode BUS */
|
||||||
|
@ -297,21 +333,20 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (NETLIST_DEBUG) && defined (DEBUG)
|
||||||
#if defined(NETLIST_DEBUG) && defined(DEBUG)
|
|
||||||
std::cout << "\n\nafter sheet local\n\n";
|
std::cout << "\n\nafter sheet local\n\n";
|
||||||
dumpNetTable();
|
dumpNetTable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
activity << wxT(" ") << _( "Done" );
|
activity << wxT( " " ) << _( "Done" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Mise a jour des NetCodes des Bus Labels connectes par les Bus */
|
/* Mise a jour des NetCodes des Bus Labels connectes par les Bus */
|
||||||
ConnectBusLabels( g_TabObjNet, g_NbrObjNet );
|
ConnectBusLabels( g_TabObjNet, g_NbrObjNet );
|
||||||
|
|
||||||
activity << wxT("; ") << _( "Labels" );
|
activity << wxT( "; " ) << _( "Labels" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Connections des groupes d'objets par labels identiques */
|
/* Connections des groupes d'objets par labels identiques */
|
||||||
for( i = 0; i<g_NbrObjNet; i++ )
|
for( i = 0; i<g_NbrObjNet; i++ )
|
||||||
|
@ -341,22 +376,22 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NETLIST_DEBUG) && defined(DEBUG)
|
#if defined (NETLIST_DEBUG) && defined (DEBUG)
|
||||||
std::cout << "\n\nafter sheet global\n\n";
|
std::cout << "\n\nafter sheet global\n\n";
|
||||||
dumpNetTable();
|
dumpNetTable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
activity << wxT(" ") << _( "Done" );
|
activity << wxT( " " ) << _( "Done" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Connexion des hierarchies */
|
/* Connexion des hierarchies */
|
||||||
activity << wxT("; ") << _( "Hierar." );
|
activity << wxT( "; " ) << _( "Hierar." );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
for( i = 0; i<g_NbrObjNet; i++ )
|
for( i = 0; i<g_NbrObjNet; i++ )
|
||||||
{
|
{
|
||||||
if( g_TabObjNet[i].m_Type == NET_SHEETLABEL
|
if( g_TabObjNet[i].m_Type == NET_SHEETLABEL
|
||||||
|| g_TabObjNet[i].m_Type == NET_SHEETBUSLABELMEMBER )
|
|| g_TabObjNet[i].m_Type == NET_SHEETBUSLABELMEMBER )
|
||||||
SheetLabelConnect( g_TabObjNet + i );
|
SheetLabelConnect( g_TabObjNet + i );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,17 +399,17 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
qsort( g_TabObjNet, g_NbrObjNet, sizeof(ObjetNetListStruct), TriNetCode );
|
qsort( g_TabObjNet, g_NbrObjNet, sizeof(ObjetNetListStruct), TriNetCode );
|
||||||
|
|
||||||
|
|
||||||
#if defined(NETLIST_DEBUG) && defined(DEBUG)
|
#if defined (NETLIST_DEBUG) && defined (DEBUG)
|
||||||
std::cout << "after qsort()\n";
|
std::cout << "after qsort()\n";
|
||||||
dumpNetTable();
|
dumpNetTable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
activity << wxT(" ") << _( "Done" );
|
activity << wxT( " " ) << _( "Done" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Compression des numeros de NetCode a des valeurs consecutives */
|
/* Compression des numeros de NetCode a des valeurs consecutives */
|
||||||
activity << wxT("; ") << _( "Sorting Nets" );
|
activity << wxT( "; " ) << _( "Sorting Nets" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
LastNetCode = NetCode = 0;
|
LastNetCode = NetCode = 0;
|
||||||
for( i = 0; i < g_NbrObjNet; i++ )
|
for( i = 0; i < g_NbrObjNet; i++ )
|
||||||
{
|
{
|
||||||
|
@ -386,8 +421,8 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
|
||||||
g_TabObjNet[i].SetNet( NetCode );
|
g_TabObjNet[i].SetNet( NetCode );
|
||||||
}
|
}
|
||||||
|
|
||||||
activity << wxT(" ") << _( "Done" );
|
activity << wxT( " " ) << _( "Done" );
|
||||||
SetStatusText( activity );
|
SetStatusText( activity );
|
||||||
|
|
||||||
/* Affectation du m_FlagOfConnection en fonction de connection ou non */
|
/* Affectation du m_FlagOfConnection en fonction de connection ou non */
|
||||||
SetUnconnectedFlag( g_TabObjNet, g_NbrObjNet );
|
SetUnconnectedFlag( g_TabObjNet, g_NbrObjNet );
|
||||||
|
@ -445,23 +480,18 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
* @param ObjNet: if NULL, objects count else list to fill
|
* @param ObjNet: if NULL, objects count else list to fill
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int ii, NbrItem = 0;
|
int ii, NbrItem = 0;
|
||||||
EDA_BaseStruct* DrawList;
|
EDA_BaseStruct* DrawList;
|
||||||
SCH_COMPONENT* DrawLibItem;
|
SCH_COMPONENT* DrawLibItem;
|
||||||
int TransMat[2][2], PartX, PartY, x2, y2;
|
int TransMat[2][2], PartX, PartY, x2, y2;
|
||||||
EDA_LibComponentStruct* Entry;
|
EDA_LibComponentStruct* Entry;
|
||||||
LibEDA_BaseStruct* DEntry;
|
LibEDA_BaseStruct* DEntry;
|
||||||
Hierarchical_PIN_Sheet_Struct* SheetLabel;
|
Hierarchical_PIN_Sheet_Struct* SheetLabel;
|
||||||
DrawSheetPath list;
|
DrawSheetPath list;
|
||||||
|
|
||||||
DrawList = sheetlist->LastScreen()->EEDrawList;
|
DrawList = sheetlist->LastScreen()->EEDrawList;
|
||||||
for( ; DrawList; DrawList = DrawList->Pnext )
|
for( ; DrawList; DrawList = DrawList->Pnext )
|
||||||
{
|
{
|
||||||
if( ObjNet ){
|
|
||||||
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
|
||||||
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
|
||||||
//used for DrawSheetLabels
|
|
||||||
}
|
|
||||||
switch( DrawList->Type() )
|
switch( DrawList->Type() )
|
||||||
{
|
{
|
||||||
case DRAW_SEGMENT_STRUCT_TYPE:
|
case DRAW_SEGMENT_STRUCT_TYPE:
|
||||||
|
@ -469,13 +499,14 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
#define STRUCT ( (EDA_DrawLineStruct*) DrawList )
|
#define STRUCT ( (EDA_DrawLineStruct*) DrawList )
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
if( (STRUCT->GetLayer() != LAYER_BUS)
|
if( (STRUCT->GetLayer() != LAYER_BUS) && (STRUCT->GetLayer() != LAYER_WIRE) )
|
||||||
&& (STRUCT->GetLayer() != LAYER_WIRE) )
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ObjNet[NbrItem].m_Comp = STRUCT;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Start = STRUCT->m_Start;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_End = STRUCT->m_End;
|
ObjNet[NbrItem].m_Comp = STRUCT;
|
||||||
|
ObjNet[NbrItem].m_Start = STRUCT->m_Start;
|
||||||
|
ObjNet[NbrItem].m_End = STRUCT->m_End;
|
||||||
|
|
||||||
if( STRUCT->GetLayer() == LAYER_BUS )
|
if( STRUCT->GetLayer() == LAYER_BUS )
|
||||||
{
|
{
|
||||||
|
@ -494,10 +525,12 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
#define STRUCT ( (DrawJunctionStruct*) DrawList )
|
#define STRUCT ( (DrawJunctionStruct*) DrawList )
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = STRUCT;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Type = NET_JONCTION;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
|
ObjNet[NbrItem].m_Comp = STRUCT;
|
||||||
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
ObjNet[NbrItem].m_Type = NET_JONCTION;
|
||||||
|
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
|
||||||
|
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
||||||
}
|
}
|
||||||
NbrItem++;
|
NbrItem++;
|
||||||
break;
|
break;
|
||||||
|
@ -507,10 +540,12 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
#define STRUCT ( (DrawNoConnectStruct*) DrawList )
|
#define STRUCT ( (DrawNoConnectStruct*) DrawList )
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = STRUCT;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Type = NET_NOCONNECT;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
|
ObjNet[NbrItem].m_Comp = STRUCT;
|
||||||
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
ObjNet[NbrItem].m_Type = NET_NOCONNECT;
|
||||||
|
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
|
||||||
|
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
||||||
}
|
}
|
||||||
NbrItem++;
|
NbrItem++;
|
||||||
break;
|
break;
|
||||||
|
@ -521,8 +556,10 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
ii = IsBusLabel( STRUCT->m_Text );
|
ii = IsBusLabel( STRUCT->m_Text );
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = STRUCT;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Type = NET_LABEL;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
|
ObjNet[NbrItem].m_Comp = STRUCT;
|
||||||
|
ObjNet[NbrItem].m_Type = NET_LABEL;
|
||||||
|
|
||||||
if( STRUCT->m_Layer == LAYER_GLOBLABEL )
|
if( STRUCT->m_Layer == LAYER_GLOBLABEL )
|
||||||
ObjNet[NbrItem].m_Type = NET_GLOBLABEL;
|
ObjNet[NbrItem].m_Type = NET_GLOBLABEL;
|
||||||
|
@ -547,11 +584,13 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
ii = IsBusLabel( STRUCT->m_Text );
|
ii = IsBusLabel( STRUCT->m_Text );
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = STRUCT;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Type = NET_LABEL;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
|
ObjNet[NbrItem].m_Comp = STRUCT;
|
||||||
|
ObjNet[NbrItem].m_Type = NET_LABEL;
|
||||||
|
|
||||||
if( STRUCT->m_Layer == LAYER_GLOBLABEL ) //this is not the simplest way of doing it
|
if( STRUCT->m_Layer == LAYER_GLOBLABEL ) //this is not the simplest way of doing it
|
||||||
ObjNet[NbrItem].m_Type = NET_GLOBLABEL;// (look at the case statement above).
|
ObjNet[NbrItem].m_Type = NET_GLOBLABEL; // (look at the case statement above).
|
||||||
if( STRUCT->m_Layer == LAYER_HIERLABEL )
|
if( STRUCT->m_Layer == LAYER_HIERLABEL )
|
||||||
ObjNet[NbrItem].m_Type = NET_HIERLABEL;
|
ObjNet[NbrItem].m_Type = NET_HIERLABEL;
|
||||||
|
|
||||||
|
@ -590,7 +629,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
if( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE )
|
if( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( DEntry->m_Unit && (DEntry->m_Unit != DrawLibItem->GetUnitSelection( sheetlist ) ) )
|
if( DEntry->m_Unit && ( DEntry->m_Unit != DrawLibItem->GetUnitSelection( sheetlist ) ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( DEntry->m_Convert
|
if( DEntry->m_Convert
|
||||||
|
@ -605,16 +644,17 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
|
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = DEntry;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
ObjNet[NbrItem].m_Comp = DEntry;
|
||||||
ObjNet[NbrItem].m_Type = NET_PIN;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Link = DrawLibItem;
|
ObjNet[NbrItem].m_Type = NET_PIN;
|
||||||
|
ObjNet[NbrItem].m_Link = DrawLibItem;
|
||||||
ObjNet[NbrItem].m_ElectricalType = Pin->m_PinType;
|
ObjNet[NbrItem].m_ElectricalType = Pin->m_PinType;
|
||||||
ObjNet[NbrItem].m_PinNum = Pin->m_PinNum;
|
ObjNet[NbrItem].m_PinNum = Pin->m_PinNum;
|
||||||
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
|
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
|
||||||
ObjNet[NbrItem].m_Start.x = x2;
|
ObjNet[NbrItem].m_Start.x = x2;
|
||||||
ObjNet[NbrItem].m_Start.y = y2;
|
ObjNet[NbrItem].m_Start.y = y2;
|
||||||
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
||||||
}
|
}
|
||||||
NbrItem++;
|
NbrItem++;
|
||||||
|
|
||||||
|
@ -624,13 +664,14 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
/* Il y a un PIN_LABEL Associe */
|
/* Il y a un PIN_LABEL Associe */
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = NULL;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
ObjNet[NbrItem].m_Comp = NULL;
|
||||||
ObjNet[NbrItem].m_Type = NET_PINLABEL;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
|
ObjNet[NbrItem].m_Type = NET_PINLABEL;
|
||||||
ObjNet[NbrItem].m_Start.x = x2;
|
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
|
||||||
ObjNet[NbrItem].m_Start.y = y2;
|
ObjNet[NbrItem].m_Start.x = x2;
|
||||||
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
ObjNet[NbrItem].m_Start.y = y2;
|
||||||
|
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
||||||
}
|
}
|
||||||
NbrItem++;
|
NbrItem++;
|
||||||
}
|
}
|
||||||
|
@ -649,7 +690,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
#undef STRUCT
|
#undef STRUCT
|
||||||
#define STRUCT ( (DrawSheetStruct*) DrawList )
|
#define STRUCT ( (DrawSheetStruct*) DrawList )
|
||||||
list = *sheetlist;
|
list = *sheetlist;
|
||||||
list.Push(STRUCT);
|
list.Push( STRUCT );
|
||||||
SheetLabel = STRUCT->m_Label;
|
SheetLabel = STRUCT->m_Label;
|
||||||
for( ; SheetLabel != NULL;
|
for( ; SheetLabel != NULL;
|
||||||
SheetLabel = (Hierarchical_PIN_Sheet_Struct*) SheetLabel->Pnext )
|
SheetLabel = (Hierarchical_PIN_Sheet_Struct*) SheetLabel->Pnext )
|
||||||
|
@ -657,15 +698,16 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
|
||||||
ii = IsBusLabel( SheetLabel->m_Text );
|
ii = IsBusLabel( SheetLabel->m_Text );
|
||||||
if( ObjNet )
|
if( ObjNet )
|
||||||
{
|
{
|
||||||
ObjNet[NbrItem].m_Comp = SheetLabel;
|
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
|
||||||
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
ObjNet[NbrItem].m_Comp = SheetLabel;
|
||||||
ObjNet[NbrItem].m_Link = DrawList;
|
ObjNet[NbrItem].m_SheetList = *sheetlist;
|
||||||
ObjNet[NbrItem].m_Type = NET_SHEETLABEL;
|
ObjNet[NbrItem].m_Link = DrawList;
|
||||||
|
ObjNet[NbrItem].m_Type = NET_SHEETLABEL;
|
||||||
ObjNet[NbrItem].m_ElectricalType = SheetLabel->m_Shape;
|
ObjNet[NbrItem].m_ElectricalType = SheetLabel->m_Shape;
|
||||||
ObjNet[NbrItem].m_Label = &SheetLabel->m_Text;
|
ObjNet[NbrItem].m_Label = &SheetLabel->m_Text;
|
||||||
ObjNet[NbrItem].m_SheetListInclude = list;
|
ObjNet[NbrItem].m_SheetListInclude = list;
|
||||||
ObjNet[NbrItem].m_Start = SheetLabel->m_Pos;
|
ObjNet[NbrItem].m_Start = SheetLabel->m_Pos;
|
||||||
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
|
||||||
|
|
||||||
/* Si c'est un Bus, eclatement en Label */
|
/* Si c'est un Bus, eclatement en Label */
|
||||||
if( ii )
|
if( ii )
|
||||||
|
@ -743,6 +785,8 @@ static void ConnectBusLabels( ObjetNetListStruct* Label, int NbItems )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
int IsBusLabel( const wxString& LabelDrawList )
|
int IsBusLabel( const wxString& LabelDrawList )
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
|
@ -840,7 +884,7 @@ static int ConvertBusToMembers( ObjetNetListStruct* BusLabel )
|
||||||
BusLabel->m_Type = NET_BUSLABELMEMBER;
|
BusLabel->m_Type = NET_BUSLABELMEMBER;
|
||||||
|
|
||||||
/* Convertion du BusLabel en la racine du Label + le numero du fil */
|
/* Convertion du BusLabel en la racine du Label + le numero du fil */
|
||||||
BufLine = BusLabel->m_Label->Left( RootBusNameLength );
|
BufLine = BusLabel->m_Label->Left( RootBusNameLength );
|
||||||
|
|
||||||
BusMember = FirstNumWireBus;
|
BusMember = FirstNumWireBus;
|
||||||
BufLine << BusMember;
|
BufLine << BusMember;
|
||||||
|
@ -883,8 +927,8 @@ static void PropageNetCode( int OldNetCode, int NewNetCode, int IsBus )
|
||||||
|
|
||||||
if( OldNetCode == NewNetCode )
|
if( OldNetCode == NewNetCode )
|
||||||
return;
|
return;
|
||||||
#if defined(NETLIST_DEBUG) && defined(DEBUG)
|
#if defined (NETLIST_DEBUG) && defined (DEBUG)
|
||||||
printf("replacing net %d with %d\n", OldNetCode,NewNetCode);
|
printf( "replacing net %d with %d\n", OldNetCode, NewNetCode );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( IsBus == 0 ) /* Propagation du NetCode */
|
if( IsBus == 0 ) /* Propagation du NetCode */
|
||||||
|
@ -941,8 +985,7 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||||
netCode = Ref->GetNet();
|
netCode = Ref->GetNet();
|
||||||
for( i = start; i < g_NbrObjNet; i++ )
|
for( i = start; i < g_NbrObjNet; i++ )
|
||||||
{
|
{
|
||||||
|
if( netTable[i].m_SheetList != Ref->m_SheetList ) //used to be > (why?)
|
||||||
if( netTable[i].m_SheetList != Ref->m_SheetList ) //used to be > (why?)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch( netTable[i].m_Type )
|
switch( netTable[i].m_Type )
|
||||||
|
@ -957,9 +1000,9 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||||
case NET_JONCTION:
|
case NET_JONCTION:
|
||||||
case NET_NOCONNECT:
|
case NET_NOCONNECT:
|
||||||
if( Ref->m_Start == netTable[i].m_Start
|
if( Ref->m_Start == netTable[i].m_Start
|
||||||
|| Ref->m_Start == netTable[i].m_End
|
|| Ref->m_Start == netTable[i].m_End
|
||||||
|| Ref->m_End == netTable[i].m_Start
|
|| Ref->m_End == netTable[i].m_Start
|
||||||
|| Ref->m_End == netTable[i].m_End )
|
|| Ref->m_End == netTable[i].m_End )
|
||||||
{
|
{
|
||||||
if( netTable[i].GetNet() == 0 )
|
if( netTable[i].GetNet() == 0 )
|
||||||
netTable[i].SetNet( netCode );
|
netTable[i].SetNet( netCode );
|
||||||
|
@ -977,7 +1020,6 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else /* Objets type BUS et BUSLABELS ( et JONCTIONS )*/
|
else /* Objets type BUS et BUSLABELS ( et JONCTIONS )*/
|
||||||
{
|
{
|
||||||
netCode = Ref->m_BusNetCode;
|
netCode = Ref->m_BusNetCode;
|
||||||
|
@ -1005,9 +1047,9 @@ static void PointToPointConnect( ObjetNetListStruct* Ref, int IsBus, int start )
|
||||||
case NET_GLOBBUSLABELMEMBER:
|
case NET_GLOBBUSLABELMEMBER:
|
||||||
case NET_JONCTION:
|
case NET_JONCTION:
|
||||||
if( Ref->m_Start == netTable[i].m_Start
|
if( Ref->m_Start == netTable[i].m_Start
|
||||||
|| Ref->m_Start == netTable[i].m_End
|
|| Ref->m_Start == netTable[i].m_End
|
||||||
|| Ref->m_End == netTable[i].m_Start
|
|| Ref->m_End == netTable[i].m_Start
|
||||||
|| Ref->m_End == netTable[i].m_End )
|
|| Ref->m_End == netTable[i].m_End )
|
||||||
{
|
{
|
||||||
if( netTable[i].m_BusNetCode == 0 )
|
if( netTable[i].m_BusNetCode == 0 )
|
||||||
netTable[i].m_BusNetCode = netCode;
|
netTable[i].m_BusNetCode = netCode;
|
||||||
|
@ -1091,36 +1133,38 @@ static void LabelConnect( ObjetNetListStruct* LabelRef )
|
||||||
|
|
||||||
ObjetNetListStruct* netTable = g_TabObjNet;
|
ObjetNetListStruct* netTable = g_TabObjNet;
|
||||||
|
|
||||||
for( int i=0; i<g_NbrObjNet; i++ )
|
for( int i = 0; i<g_NbrObjNet; i++ )
|
||||||
{
|
{
|
||||||
if( netTable[i].GetNet() == LabelRef->GetNet() )
|
if( netTable[i].GetNet() == LabelRef->GetNet() )
|
||||||
continue;
|
continue;
|
||||||
if( netTable[i].m_SheetList != LabelRef->m_SheetList )
|
if( netTable[i].m_SheetList != LabelRef->m_SheetList )
|
||||||
{
|
{
|
||||||
if( (netTable[i].m_Type != NET_PINLABEL
|
if( (netTable[i].m_Type != NET_PINLABEL
|
||||||
&& netTable[i].m_Type != NET_GLOBLABEL
|
&& netTable[i].m_Type != NET_GLOBLABEL
|
||||||
&& netTable[i].m_Type != NET_GLOBBUSLABELMEMBER) )
|
&& netTable[i].m_Type != NET_GLOBBUSLABELMEMBER) )
|
||||||
continue;
|
continue;
|
||||||
if( (netTable[i].m_Type == NET_GLOBLABEL
|
if( (netTable[i].m_Type == NET_GLOBLABEL
|
||||||
|| netTable[i].m_Type == NET_GLOBBUSLABELMEMBER)
|
|| netTable[i].m_Type == NET_GLOBBUSLABELMEMBER)
|
||||||
&& netTable[i].m_Type != LabelRef->m_Type)
|
&& netTable[i].m_Type != LabelRef->m_Type )
|
||||||
//global labels only connect other global labels.
|
//global labels only connect other global labels.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//regular labels are sheet-local;
|
//regular labels are sheet-local;
|
||||||
//NET_HIERLABEL are used to connect sheets.
|
//NET_HIERLABEL are used to connect sheets.
|
||||||
//NET_LABEL is sheet-local (***)
|
//NET_LABEL is sheet-local (***)
|
||||||
//NET_GLOBLABEL is global.
|
//NET_GLOBLABEL is global.
|
||||||
if( netTable[i].m_Type == NET_LABEL
|
if( netTable[i].m_Type == NET_LABEL
|
||||||
|| netTable[i].m_Type == NET_GLOBLABEL
|
|| netTable[i].m_Type == NET_GLOBLABEL
|
||||||
|| netTable[i].m_Type == NET_HIERLABEL
|
|| netTable[i].m_Type == NET_HIERLABEL
|
||||||
|| netTable[i].m_Type == NET_BUSLABELMEMBER
|
|| netTable[i].m_Type == NET_BUSLABELMEMBER
|
||||||
|| netTable[i].m_Type == NET_GLOBBUSLABELMEMBER
|
|| netTable[i].m_Type == NET_GLOBBUSLABELMEMBER
|
||||||
|| netTable[i].m_Type == NET_HIERBUSLABELMEMBER
|
|| netTable[i].m_Type == NET_HIERBUSLABELMEMBER
|
||||||
|| netTable[i].m_Type == NET_PINLABEL )
|
|| netTable[i].m_Type == NET_PINLABEL )
|
||||||
{
|
{
|
||||||
if( netTable[i].m_Label->CmpNoCase( *LabelRef->m_Label ) != 0 )
|
if( netTable[i].m_Label->CmpNoCase( *LabelRef->m_Label ) != 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Propagation du Netcode a tous les Objets de meme NetCode
|
// Propagation du Netcode a tous les Objets de meme NetCode
|
||||||
if( netTable[i].GetNet() )
|
if( netTable[i].GetNet() )
|
||||||
PropageNetCode( netTable[i].GetNet(), LabelRef->GetNet(), 0 );
|
PropageNetCode( netTable[i].GetNet(), LabelRef->GetNet(), 0 );
|
||||||
|
@ -1130,6 +1174,7 @@ static void LabelConnect( ObjetNetListStruct* LabelRef )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
static int TriNetCode( const void* o1, const void* o2 )
|
static int TriNetCode( const void* o1, const void* o2 )
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
@ -1144,6 +1189,7 @@ static int TriNetCode( const void* o1, const void* o2 )
|
||||||
return Objet1->GetNet() - Objet2->GetNet();
|
return Objet1->GetNet() - Objet2->GetNet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static int TriBySheet( const void* o1, const void* o2 )
|
static int TriBySheet( const void* o1, const void* o2 )
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1154,9 +1200,11 @@ static int TriBySheet( const void* o1, const void* o2 )
|
||||||
{
|
{
|
||||||
ObjetNetListStruct* Objet1 = (ObjetNetListStruct*) o1;
|
ObjetNetListStruct* Objet1 = (ObjetNetListStruct*) o1;
|
||||||
ObjetNetListStruct* Objet2 = (ObjetNetListStruct*) o2;
|
ObjetNetListStruct* Objet2 = (ObjetNetListStruct*) o2;
|
||||||
return Objet1->m_SheetList.Cmp(Objet2->m_SheetList);
|
|
||||||
|
return Objet1->m_SheetList.Cmp( Objet2->m_SheetList );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -1171,7 +1219,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||||
IsConnectType StateFlag;
|
IsConnectType StateFlag;
|
||||||
|
|
||||||
|
|
||||||
NetStart = NetEnd = ListObj;
|
NetStart = NetEnd = ListObj;
|
||||||
NetItemRef = NetStart;
|
NetItemRef = NetStart;
|
||||||
Nb = 0;
|
Nb = 0;
|
||||||
StateFlag = UNCONNECT;
|
StateFlag = UNCONNECT;
|
||||||
|
@ -1187,7 +1235,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||||
NetItemTst = NetItemRef + 1;
|
NetItemTst = NetItemRef + 1;
|
||||||
|
|
||||||
if( (NetItemTst >= Lim)
|
if( (NetItemTst >= Lim)
|
||||||
|| (NetItemRef->GetNet() != NetItemTst->GetNet()) )
|
|| ( NetItemRef->GetNet() != NetItemTst->GetNet() ) )
|
||||||
{
|
{
|
||||||
/* Net analyse: mise a jour de m_FlagOfConnection */
|
/* Net analyse: mise a jour de m_FlagOfConnection */
|
||||||
NetEnd = NetItemTst;
|
NetEnd = NetItemTst;
|
||||||
|
@ -1209,7 +1257,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
|
||||||
for( ; ; NetItemTst++ )
|
for( ; ; NetItemTst++ )
|
||||||
{
|
{
|
||||||
if( (NetItemTst >= Lim)
|
if( (NetItemTst >= Lim)
|
||||||
|| (NetItemRef->GetNet() != NetItemTst->GetNet()) )
|
|| ( NetItemRef->GetNet() != NetItemTst->GetNet() ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch( NetItemTst->m_Type )
|
switch( NetItemTst->m_Type )
|
||||||
|
|
|
@ -219,7 +219,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
|
||||||
pos.y = PartY + TransMat[1][0] * Arc->m_Pos.x +
|
pos.y = PartY + TransMat[1][0] * Arc->m_Pos.x +
|
||||||
TransMat[1][1] * Arc->m_Pos.y;
|
TransMat[1][1] * Arc->m_Pos.y;
|
||||||
MapAngles( &t1, &t2, TransMat );
|
MapAngles( &t1, &t2, TransMat );
|
||||||
PlotArc( pos, t1, t2, Arc->m_Rayon, Arc->m_Fill, Arc->m_Width );
|
PlotArc( pos, t1, t2, Arc->m_Rayon, Arc->m_Fill == FILLED_SHAPE ? true : false, Arc->m_Width );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
|
||||||
TransMat[0][1] * Circle->m_Pos.y;
|
TransMat[0][1] * Circle->m_Pos.y;
|
||||||
pos.y = PartY + TransMat[1][0] * Circle->m_Pos.x +
|
pos.y = PartY + TransMat[1][0] * Circle->m_Pos.x +
|
||||||
TransMat[1][1] * Circle->m_Pos.y;
|
TransMat[1][1] * Circle->m_Pos.y;
|
||||||
PlotCercle( pos, Circle->m_Rayon * 2, Circle->m_Fill, Circle->m_Width );
|
PlotCercle( pos, Circle->m_Rayon * 2, Circle->m_Fill == FILLED_SHAPE ? true : false, Circle->m_Width );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
|
||||||
y2 = PartY + TransMat[1][0] * Square->m_End.x
|
y2 = PartY + TransMat[1][0] * Square->m_End.x
|
||||||
+ TransMat[1][1] * Square->m_End.y;
|
+ TransMat[1][1] * Square->m_End.y;
|
||||||
|
|
||||||
PlotRect( wxPoint(x1, y1), wxPoint(x2, y2), Square->m_Fill, Square->m_Width );
|
PlotRect( wxPoint(x1, y1), wxPoint(x2, y2), Square->m_Fill == FILLED_SHAPE ? true : false, Square->m_Width );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
|
||||||
TransMat[1][1] * polyline->PolyList[ii * 2 + 1];
|
TransMat[1][1] * polyline->PolyList[ii * 2 + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
PlotPoly( ii, Poly, polyline->m_Fill, polyline->m_Width );
|
PlotPoly( ii, Poly, polyline->m_Fill == FILLED_SHAPE ? true : false, polyline->m_Width );
|
||||||
MyFree( Poly );
|
MyFree( Poly );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Binary file not shown.
1635
internat/fr/kicad.po
1635
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -494,7 +494,7 @@ void TEXTE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
|
||||||
Affiche_1_Parametre( frame, 1, _( "Module" ), Line, DARKCYAN );
|
Affiche_1_Parametre( frame, 1, _( "Module" ), Line, DARKCYAN );
|
||||||
|
|
||||||
Line = m_Text;
|
Line = m_Text;
|
||||||
Affiche_1_Parametre( frame, 10, _( "Text" ), Line, YELLOW );
|
Affiche_1_Parametre( frame, 10, _( "Text" ), Line, BROWN );
|
||||||
|
|
||||||
ii = m_Type;
|
ii = m_Type;
|
||||||
if( ii > 2 )
|
if( ii > 2 )
|
||||||
|
@ -510,18 +510,16 @@ void TEXTE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
|
||||||
|
|
||||||
ii = m_Layer;
|
ii = m_Layer;
|
||||||
if( ii < NB_LAYERS )
|
if( ii < NB_LAYERS )
|
||||||
Affiche_1_Parametre( frame, 28, _( "Layer" ), board->GetLayerName( ii ), DARKGREEN );
|
msg = board->GetLayerName( ii );
|
||||||
else
|
else
|
||||||
{
|
|
||||||
msg.Printf( wxT( "%d" ), ii );
|
msg.Printf( wxT( "%d" ), ii );
|
||||||
Affiche_1_Parametre( frame, 28, _( "Layer" ), msg, DARKGREEN );
|
Affiche_1_Parametre( frame, 31, _( "Layer" ), msg, DARKGREEN );
|
||||||
}
|
|
||||||
|
|
||||||
msg = wxT( " Yes" );
|
msg = wxT( " Yes" );
|
||||||
if( m_Miroir & 1 )
|
if( m_Miroir & 1 )
|
||||||
msg = wxT( " No" );
|
msg = wxT( " No" );
|
||||||
|
|
||||||
Affiche_1_Parametre( frame, 36, _( "Mirror" ), msg, DARKGREEN );
|
Affiche_1_Parametre( frame, 37, _( "Mirror" ), msg, DARKGREEN );
|
||||||
|
|
||||||
msg.Printf( wxT( "%.1f" ), (float) m_Orient / 10 );
|
msg.Printf( wxT( "%.1f" ), (float) m_Orient / 10 );
|
||||||
Affiche_1_Parametre( frame, 43, _( "Orient" ), msg, DARKGREEN );
|
Affiche_1_Parametre( frame, 43, _( "Orient" ), msg, DARKGREEN );
|
||||||
|
|
|
@ -237,8 +237,10 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING,
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING,
|
||||||
_( "End Drawing" ), apply_xpm );
|
_( "End Drawing" ), apply_xpm );
|
||||||
}
|
}
|
||||||
aPopMenu->Append( ID_POPUP_PCB_EDIT_DRAWING, _( "Edit Drawing" ) );
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_EDIT_DRAWING,
|
||||||
aPopMenu->Append( ID_POPUP_PCB_DELETE_DRAWING, _( "Delete Drawing" ) );
|
_( "Edit Drawing" ), edit_xpm );
|
||||||
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_DELETE_DRAWING,
|
||||||
|
_( "Delete Drawing" ), delete_xpm );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPEZONE: // Item used to fill a zone
|
case TYPEZONE: // Item used to fill a zone
|
||||||
|
|
Loading…
Reference in New Issue