Commit b8ea76fe authored by charras's avatar charras
Browse files

Solved netlist problems for multiple parts per package components in complex hierarchies.

B.O.M. generation still have a minor problem wih this.
parent 88055164
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -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-May-15 UPDATE   Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
    Solved netlist problems for multiple parts per package components
    in complex hierarchies.
    B.O.M. generation still have a minor problem wih this.



2008-May-5 UPDATE Dick Hollenbeck <dick@softplc.com>
2008-May-5 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
+common.c
+common.c
+1 −4
Original line number Original line Diff line number Diff line
@@ -4,7 +4,6 @@
****************************************************************/
****************************************************************/


#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"


#include "common.h"
#include "common.h"
#include "program.h"
#include "program.h"
@@ -15,8 +14,6 @@


#include "dialog_backanno.cpp"
#include "dialog_backanno.cpp"


#include "protos.h"

/**************************************************************/
/**************************************************************/
SCH_COMPONENT * WinEDA_SchematicFrame::FindComponentByRef(
SCH_COMPONENT * WinEDA_SchematicFrame::FindComponentByRef(
     const wxString& reference )
     const wxString& reference )
+25 −21
Original line number Original line Diff line number Diff line
@@ -293,9 +293,7 @@ SCH_COMPONENT::SCH_COMPONENT( const wxPoint& aPos ) :


    m_Pos = aPos;
    m_Pos = aPos;


    //m_FlagControlMulti = 0;
    m_Convert = 0;  /* De Morgan Handling  */
    m_UsedOnSheets.Clear();
    m_Convert = 0;  /* Gestion des mutiples representations (conversion De Morgan) */


    /* The rotation/mirror transformation matrix. pos normal*/
    /* The rotation/mirror transformation matrix. pos normal*/
    m_Transform[0][0] = 1;
    m_Transform[0][0] = 1;
@@ -469,6 +467,9 @@ void SCH_COMPONENT::ClearAnnotation( DrawSheetPath* aSheet )
    defRef.Append( wxT( "?" ) );
    defRef.Append( wxT( "?" ) );


    wxString multi = wxT( "1" );
    wxString multi = wxT( "1" );
    
    if ( KeepMulti )        // We cannot remove all annotations: part selection must be kept
    {
        wxString NewHref;
        wxString NewHref;
        wxString path;
        wxString path;
        if( aSheet )
        if( aSheet )
@@ -486,15 +487,20 @@ void SCH_COMPONENT::ClearAnnotation( DrawSheetPath* aSheet )
                m_PathsAndReferences[ii] = NewHref;
                m_PathsAndReferences[ii] = NewHref;
            }
            }
        }
        }
    }
    else
    {
        m_PathsAndReferences.Empty();   // Empty strings, but does not free memory because a new annotation will reuse it
        m_Multi = 1;
    }



    // These 2 changes do not work in complex hierarchy.
    // These 2 changes do not work in complex hierarchy.
    // When a clear annotation is made, the calling function must call a
    // When a clear annotation is made, the calling function must call a
    // UpdateAllScreenReferences for the active sheet.
    // UpdateAllScreenReferences for the active sheet.
    // But this call does not made here.
    // But this call cannot made here.
    m_Field[REFERENCE].m_Text = defRef; //for drawing.
    m_Field[REFERENCE].m_Text = defRef; //for drawing.


    if( !KeepMulti )
        m_Multi = 1;
}
}




@@ -510,8 +516,6 @@ SCH_COMPONENT* SCH_COMPONENT::GenCopy()
    new_item->m_ChipName     = m_ChipName;
    new_item->m_ChipName     = m_ChipName;
    new_item->m_PrefixString = m_PrefixString;
    new_item->m_PrefixString = m_PrefixString;


    //new_item->m_FlagControlMulti = m_FlagControlMulti;
    new_item->m_UsedOnSheets = m_UsedOnSheets;
    new_item->m_Convert = m_Convert;
    new_item->m_Convert = m_Convert;
    new_item->m_Transform[0][0] = m_Transform[0][0];
    new_item->m_Transform[0][0] = m_Transform[0][0];
    new_item->m_Transform[0][1] = m_Transform[0][1];
    new_item->m_Transform[0][1] = m_Transform[0][1];
+0 −2
Original line number Original line Diff line number Diff line
@@ -100,8 +100,6 @@ public:
                                         * determined, upon file load, by the first non-digits in the reference fields. */
                                         * determined, upon file load, by the first non-digits in the reference fields. */
    PartTextStruct    m_Field[NUMBER_OF_FIELDS];
    PartTextStruct    m_Field[NUMBER_OF_FIELDS];


    //int   m_FlagControlMulti;
    ArrayOfSheetLists m_UsedOnSheets;               // Used as flags when calculating netlist
    int               m_Convert;                    /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */
    int               m_Convert;                    /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */
    int               m_Transform[2][2];            /* The rotation/mirror transformation matrix. */
    int               m_Transform[2][2];            /* The rotation/mirror transformation matrix. */


+1 −1
Original line number Original line Diff line number Diff line
@@ -402,7 +402,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
            #undef STRUCT
            #undef STRUCT
            #define STRUCT ( (SCH_COMPONENT*) DrawItem )
            #define STRUCT ( (SCH_COMPONENT*) DrawItem )
            EDA_LibComponentStruct* Entry;
            EDA_LibComponentStruct* Entry;
            Entry = FindLibPart( STRUCT->m_ChipName, wxEmptyString, FIND_ROOT );
            Entry = FindLibPart( STRUCT->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
            if( Entry == NULL )
            if( Entry == NULL )
                break;
                break;


Loading