Commit d47823c1 authored by dickelbeck's avatar dickelbeck
Browse files

specctra session work

parent 40e2fed3
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -5,6 +5,21 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.


2008-Feb-7 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
    added "const" to SEGVIA::GetDrillValue() const;
    added GetDrillValue() to DRC instead of accessing SEGVIA::m_Drill directly.
    changed specctra_export so it aborts if all reference designators are not
    unique.  Unless they are unique we cannot import the routed session.  A
    good example is the xylinx board which now fails to export.
    first rough work on SEGVIA::makeVIA() but needs much more work.  Simple
    session files with vias at least import.  Now encode drill diameter in
    padstack name for later session import.
    updated todo.txt file.


2008-Feb-7 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
+66 −64
Original line number Diff line number Diff line
@@ -125,11 +125,13 @@ TRACK* TRACK::Copy() const
 * calculate the drill value for vias (m-Drill if > 0, or default drill value for the board
 * @return real drill_value
*/
int TRACK::GetDrillValue(void)
int TRACK::GetDrillValue() const
{
	if ( Type() != TYPEVIA ) return 0;
    if ( Type() != TYPEVIA )
        return 0;

	if ( m_Drill >= 0 ) return m_Drill;
    if ( m_Drill >= 0 )
        return m_Drill;

    if ( m_Shape == VIA_MICROVIA )
        return g_DesignSettings.m_MicroViaDrill;
+21 −21
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public:
     * calculate the drill value for vias (m-Drill if > 0, or default drill value for the board
     * @return real drill_value
    */
	int GetDrillValue(void);
    int GetDrillValue() const;

    /**
     * Function ReturnMaskLayer
+175 −176
Original line number Diff line number Diff line
@@ -510,8 +510,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart )
        // This test seems necessary since the dialog box that displays the
        // desired via hole size and width does not enforce a hole size smaller
        // than the via's diameter.
        
        if( aRefSeg->GetDrillValue() > aRefSeg->m_Width )
        if( !aRefSeg->GetDrillValue() > aRefSeg->m_Width )
        {
            m_currentMarker = fillMarker( aRefSeg, NULL,
                                DRCE_VIA_HOLE_BIGGER, m_currentMarker );
+31 −3
Original line number Diff line number Diff line
@@ -2091,7 +2091,6 @@ class PADSTACK : public ELEM_HOLDER

    std::string     hash;       ///< a hash string used by Compare(), not Format()ed/exported.


    std::string     padstack_id;
    UNIT_RES*       unit;

@@ -2121,6 +2120,10 @@ public:
        delete rules;
    }

    const std::string& GetPadstackId()
    {
        return padstack_id;
    }

    /**
     * Function Compare
@@ -2341,6 +2344,22 @@ public:
        return &padstacks[ndx];
    }

    /**
     * Function FindPADSTACK
     * searches the padstack container by name.
     * @return PADSTACK* - The PADSTACK with a matching name if it exists, else NULL.
     */
    PADSTACK* FindPADSTACK( const std::string& aPadstackId )
    {
        for( unsigned i=0;  i<padstacks.size();  ++i )
        {
            PADSTACK* ps = &padstacks[i];
            if( 0 == ps->GetPadstackId().compare( aPadstackId ) )
                return ps;
        }
        return NULL;
    }

    void FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
    {
        if( unit )
@@ -2888,6 +2907,11 @@ public:
        supply = false;
    }

    const std::string& GetPadstackId()
    {
        return padstack_id;
    }

    void Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
    {
        const char* quote = out->GetQuoteChar( padstack_id.c_str() );
@@ -3711,10 +3735,11 @@ class SPECCTRA_DB : public OUTPUTFORMATTER
     * Function makeVia
     * makes a round through hole PADSTACK using the given Kicad diameter in deci-mils.
     * @param aCopperDiameter The diameter of the copper pad.
     * @param aDrillDiameter The drill diameter, used on re-import of the session file.
     * @return PADSTACK* - The padstack, which is on the heap only, user must save
     *  or delete it.
     */
    PADSTACK* makeVia( int aCopperDiameter );
    PADSTACK* makeVia( int aCopperDiameter, int aDrillDiameter );

    /**
     * Function makeVia
@@ -3734,6 +3759,9 @@ class SPECCTRA_DB : public OUTPUTFORMATTER
     */
    TRACK* makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) throw( IOError );


    SEGVIA* makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode );

    //-----</FromSESSION>----------------------------------------------------

public:
@@ -3848,7 +3876,7 @@ public:
     *
     * @param aBoard The BOARD to convert to a PCB.
     */
    void FromBOARD( BOARD* aBoard );
    void FromBOARD( BOARD* aBoard ) throw( IOError );


    /**
Loading