Browse Source

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

pull/1/head
charras 17 years ago
parent
commit
6167f5fc75
  1. 2
      change_log.txt
  2. 8
      pcbnew/class_zone.cpp
  3. 2
      pcbnew/pcbplot.h
  4. 5
      pcbnew/plot_rtn.cpp
  5. 9
      pcbnew/plotgerb.cpp
  6. 9
      pcbnew/plotps.cpp

2
change_log.txt

@ -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.

8
pcbnew/class_zone.cpp

@ -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;
}

2
pcbnew/pcbplot.h

@ -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);

5
pcbnew/plot_rtn.cpp

@ -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);
}

9
pcbnew/plotgerb.cpp

@ -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);
}
}

9
pcbnew/plotps.cpp

@ -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 );

Loading…
Cancel
Save