Commit 3683ab74 authored by charras's avatar charras
Browse files

More about copper zones filled without grid (by polygons)

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

2008-oct-07 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
    More about copper zones filled without grid (by polygons)
    Currently for eyes and tests only.
    now working
        thermal reliefs.
        texts on copper zones.
    To select this feature choose No Grid in zone grid filling.
    Work in progress:
    currently : not implemented:
        Removing insulated copper islands.
        trapezoidal pads


2008-Oct-6 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+376 B (157 KiB)

File changed.

No diff preview for this file type.

+3451 −3380

File changed.

Preview size limit exceeded, changes collapsed.

+22 −1
Original line number Diff line number Diff line
@@ -136,6 +136,11 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const
    if( ret < 2 )
        return false;

    ret = fprintf( aFile, "ZOptions %d\n", m_GridFillValue);
    if( ret < 1 )
        return false;


    // Save the corner list
    for( item_pos = 0; item_pos < corners_count; item_pos++ )
    {
@@ -246,7 +251,17 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum )
                }
            }
        }
        if( strnicmp( Line, "ZClearance", 10 ) == 0 )    // aux info found
        if( strnicmp( Line, "ZOptions", 8 ) == 0 )    // Options info found
        {
            int gridsize = 50;
            text = Line + 8;
            ret = sscanf( text, "%d", &gridsize );
            if( ret < 1 )
                return false;
            else
                m_GridFillValue = gridsize;
        }
        if( strnicmp( Line, "ZClearance", 10 ) == 0 )    // Clearence and pad options info found
        {
            int  clearance = 200;
            char padoption;
@@ -738,6 +753,12 @@ void ZONE_CONTAINER::Display_Infos( WinEDA_DrawFrame* frame )
    msg.Printf( wxT( "%d" ), m_Poly->corner.size() );
    Affiche_1_Parametre( frame, text_pos, _( "Corners" ), msg, BLUE );

    text_pos += 8;
    if ( m_GridFillValue )
        msg.Printf( wxT( "%d" ), m_GridFillValue );
    else msg = _("No Grid");
    Affiche_1_Parametre( frame, text_pos, _( "Fill Grid" ), msg, BROWN );

    text_pos += 8;
    msg.Printf( wxT( "%d" ), m_Poly->m_HatchLines.size() );
    Affiche_1_Parametre( frame, text_pos, _( "Hatch lines" ), msg, BLUE );
+12 −3
Original line number Diff line number Diff line
@@ -258,6 +258,8 @@ void WinEDA_ZoneFrame::OnInitDialog( wxInitDialogEvent& event )

    SetFont( *g_DialogFont );
    
    SetFocus();     // Required under wxGTK if we want to demiss the dialog with the ESC key

    wxString title = _( "Zone clearance value:" ) + ReturnUnitSymbol( g_UnitMetric );
    m_ClearanceValueTitle->SetLabel( title );

@@ -277,15 +279,22 @@ void WinEDA_ZoneFrame::OnInitDialog( wxInitDialogEvent& event )
    static const int GridList[4] = { 25, 50, 100, 250 };
    int selection = 0;

    int grid_routing = g_GridRoutingSize;

    if( m_Zone_Container )
        grid_routing = m_Zone_Container->m_GridFillValue;

    for( unsigned ii = 0; ii < 4; ii++ )
    {
        wxString msg = ReturnStringFromValue( g_UnitMetric,
                                              GridList[ii],
                                              m_Parent->m_InternalUnits );
        m_GridCtrl->SetString( ii, msg );
        if( g_GridRoutingSize == GridList[ii] )
        if( grid_routing == GridList[ii] )
            selection = ii;
    }
    if( grid_routing == 0 )    // No Grid: fill with polygons
         selection = 4;
 
    m_GridCtrl->SetSelection( selection );

@@ -536,9 +545,9 @@ bool WinEDA_ZoneFrame::AcceptOptions(bool aPromptForErrors)
        g_GridRoutingSize = 250;
        break;
    case 4:
        g_GridRoutingSize = 0;
        wxMessageBox( wxT(
"You are using No grid for filling zones\nThis is currently in development and for tests only.\n Do not use for production"));
        g_GridRoutingSize = 0;
        break;
    }

Loading