Commit 6167f5fc authored by charras's avatar charras

More about copper zones filled without grid (by polygons) - work still in progress

parent 3683ab74
......@@ -9,7 +9,7 @@ email address.
================================================================================
+pcbnew:
More about copper zones filled without grid (by polygons)
Currently for eyes and tests only.
Currently for eyes and tests only (work in progress).
now working
thermal reliefs.
texts on copper zones.
......
......@@ -392,6 +392,7 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel,
{
static int* CornersBuffer = NULL;
static unsigned CornersBufferSize = 0;
bool sketch_mode = false; // true to show areas outlines only (test and debug purposes)
if( DC == NULL )
return;
......@@ -454,7 +455,12 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel,
corners_count++;
if( corner->end_contour )
{ // Draw the current filled area
GRPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer, true, 0, color, color );
if ( sketch_mode )
GRClosedPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer,
false, 0, color, color );
else
GRPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer,
true , 0, color, color );
corners_count = 0;
ii = 0;
}
......
......@@ -161,6 +161,8 @@ void PlotMirePcb( MIREPCB* PtMire, int format_plot,int masque_layer );
void Plot_1_EdgeModule(int format_plot, EDGE_MODULE * PtEdge);
void PlotFilledAreas( ZONE_CONTAINER * aZone, int aFormat);
/* PLOTGERB.CPP */
void PlotGERBERLine(wxPoint start, wxPoint end, int width);
void PlotCircle_GERBER( wxPoint centre, int rayon, int width);
......
......@@ -21,7 +21,6 @@
/* Fonctions locales */
static void Plot_Edges_Modules( BOARD* pcb, int format_plot, int masque_layer );
static void PlotTextModule( TEXTE_MODULE* pt_texte );
static void PlotFilledAreas( ZONE_CONTAINER * aZone, int aFormat);
/**********************************************************/
......@@ -299,8 +298,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
for( int ii = 0; ii < m_Pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* edge_zone = m_Pcb->GetArea(ii);
if( ( (1 << edge_zone->GetLayer()) & masque_layer ) == 0 )
continue;
if( ( (1 << edge_zone->GetLayer()) & masque_layer ) == 0 )
continue;
PlotFilledAreas(edge_zone, format_plot);
}
......
......@@ -350,6 +350,15 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 72, wxEmptyString, msg, YELLOW );
}
/* Plot filled ares */
for( int ii = 0; ii < m_Pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* edge_zone = m_Pcb->GetArea(ii);
if( ( (1 << edge_zone->GetLayer()) & masque_layer ) == 0 )
continue;
PlotFilledAreas(edge_zone, PLOT_FORMAT_GERBER);
}
}
......
......@@ -425,6 +425,15 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
/* Plot filled ares */
for( int ii = 0; ii < m_Pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* edge_zone = m_Pcb->GetArea(ii);
if( ( (1 << edge_zone->GetLayer()) & masque_layer ) == 0 )
continue;
PlotFilledAreas(edge_zone, PLOT_FORMAT_POST);
}
// Trace des trous de percage
if( modetrace == FILLED )
PrintDrillMark( m_Pcb );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment