Commit 3cd47555 authored by dickelbeck's avatar dickelbeck
Browse files

see 2007-Oct-12 change_log.txt

parent 0abcf450
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -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
+3 −1
Original line number Diff line number Diff line
@@ -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;
}
+5 −5
Original line number Diff line number Diff line
@@ -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 connecte 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 )
+8 −8
Original line number Diff line number Diff line
@@ -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;
+40 −40
Original line number Diff line number Diff line
@@ -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 )
Loading