Commit 92266a19 authored by charras's avatar charras
Browse files

Pcbnew: Added: in DRC tests: tests for vias min size and tracks min width.

Eeschema: code cleaning
parent eebc4ff2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.

2009-june-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
    Added: in DRC tests: tests for vias min size and tracks min width.

2009-june-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
@@ -22,7 +26,7 @@ email address.
        used for items that have a line thickness = 0,
        and NOT the minimum thickness.
    reasons:
        - Obviously, differents parameters to draw and plot and bad.
        - Obviously, differents parameters to draw and plot are bad.
            (what you plot is NOT what you see)
        - small texts are not readable with an minimum thickness value
            that could be good for others items.
+4 −2
Original line number Diff line number Diff line
@@ -121,7 +121,8 @@ static const char* GetHersheyShapeDescription( int AsciiCode )
    }
#endif

    AsciiCode &= 0x7F;
    if ( AsciiCode > 0x7F )
        AsciiCode = '?';
    if( AsciiCode < 32 )
        AsciiCode = 32;                 /* Clamp control chars */
    AsciiCode -= 32;
@@ -244,6 +245,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
    int     overbars;                       // Number of ~ seen
    int     overbar_italic_comp;            // Italic compensation for overbar


    #define        BUF_SIZE 100
    wxPoint coord[BUF_SIZE + 1];                // Buffer coordinate used to draw polylines (one char shape)
    bool    sketch_mode    = false;
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
            DrawFrame->GetBoard()->m_Modules.PushBack( mod );

        DrawFrame->Zoom_Automatique( FALSE );
        DrawFrame->UpdateStatusBar();    /* Display new cursor coordinates and zoom value */
        if( DrawFrame->m_Draw3DFrame )
            DrawFrame->m_Draw3DFrame->NewDisplay();
    }
+4 −3
Original line number Diff line number Diff line
@@ -22,8 +22,9 @@



LibDrawText::LibDrawText() :
    LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ), EDA_TextStruct()
LibDrawText::LibDrawText(EDA_LibComponentStruct * aParent) :
    LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE, aParent ),
    EDA_TextStruct()
{
    m_Size     = wxSize( 50, 50 );
    m_typeName = _( "Text" );
@@ -169,7 +170,7 @@ bool LibDrawText::HitTest( wxPoint aPosRef, int aThreshold, const int aTransMat[

LibDrawText* LibDrawText::GenCopy()
{
    LibDrawText* newitem = new LibDrawText();
    LibDrawText* newitem = new LibDrawText(NULL);

    newitem->m_Pos = m_Pos;
    newitem->m_Orient    = m_Orient;
+11 −8
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@ LibCmpEntry::LibCmpEntry( LibrEntryType CmpType, const wxChar* CmpName ) :
{
    Type = CmpType;
    m_Name.m_FieldId = VALUE;
    m_Name.SetParent( this );
    if( CmpName )
        m_Name.m_Text = CmpName;
}
@@ -220,6 +221,7 @@ EDA_LibComponentStruct:: EDA_LibComponentStruct( const wxChar* CmpName ) :
    m_DrawPinNum = 1;
    m_DrawPinName = 1;
    m_Prefix.m_FieldId = REFERENCE;
    m_Prefix.SetParent( this );
}


@@ -478,32 +480,32 @@ bool EDA_LibComponentStruct::LoadDrawEntries( FILE* f, char* line,
        switch( line[0] )
        {
        case 'A':    /* Arc */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawArc();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawArc(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

        case 'C':    /* Circle */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawCircle();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawCircle(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

        case 'T':    /* Text */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawText();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawText(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

        case 'S':    /* Square */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawSquare();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawSquare(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

        case 'X':    /* Pin Description */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawPin();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawPin(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

        case 'P':    /* Polyline */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawPolyline();
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawPolyline(this);
            entryLoaded = newEntry->Load( line, errorMsg );
            break;

@@ -568,7 +570,7 @@ bool EDA_LibComponentStruct::LoadAliases( char* line, wxString& errorMsg )

bool EDA_LibComponentStruct::LoadField( char* line, wxString& errorMsg )
{
    LibDrawField* field = new LibDrawField();
    LibDrawField* field = new LibDrawField(this);

    if ( !field->Load( line, errorMsg ) )
    {
@@ -704,7 +706,7 @@ void EDA_LibComponentStruct::SetFields( const std::vector <LibDrawField> aFields
            create = TRUE;
        if( create )
        {
            LibDrawField*Field = new LibDrawField( ii );
            LibDrawField*Field = new LibDrawField( this, ii );
            aFields[ii].Copy( Field );
            CurrentLibEntry->m_Fields.PushBack( Field );
        }
@@ -719,6 +721,7 @@ void EDA_LibComponentStruct::SetFields( const std::vector <LibDrawField> aFields
    for( LibDrawField* Field = CurrentLibEntry->m_Fields; Field;
         Field = Field->Next() )
    {
        Field->SetParent( this );
        if( Field->m_FieldId >= FIELD1 )
        {
            if( Field->m_Text.IsEmpty() )
Loading