Loading change_log.txt +15 −0 Original line number Diff line number Diff line Loading @@ -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 Loading pcbnew/class_track.cpp +66 −64 Original line number Diff line number Diff line Loading @@ -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; Loading pcbnew/class_track.h +21 −21 Original line number Diff line number Diff line Loading @@ -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 Loading pcbnew/drc.cpp +175 −176 Original line number Diff line number Diff line Loading @@ -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 ); Loading pcbnew/specctra.h +31 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -2121,6 +2120,10 @@ public: delete rules; } const std::string& GetPadstackId() { return padstack_id; } /** * Function Compare Loading Loading @@ -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 ) Loading Loading @@ -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() ); Loading Loading @@ -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 Loading @@ -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: Loading Loading @@ -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 Loading
change_log.txt +15 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
pcbnew/class_track.cpp +66 −64 Original line number Diff line number Diff line Loading @@ -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; Loading
pcbnew/class_track.h +21 −21 Original line number Diff line number Diff line Loading @@ -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 Loading
pcbnew/drc.cpp +175 −176 Original line number Diff line number Diff line Loading @@ -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 ); Loading
pcbnew/specctra.h +31 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -2121,6 +2120,10 @@ public: delete rules; } const std::string& GetPadstackId() { return padstack_id; } /** * Function Compare Loading Loading @@ -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 ) Loading Loading @@ -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() ); Loading Loading @@ -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 Loading @@ -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: Loading Loading @@ -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