Fix bug when plotting DXF board outline.

This commit is contained in:
Tomasz Wlostowski 2015-09-09 11:51:02 -04:00 committed by Wayne Stambaugh
parent 42ecf0a994
commit 2088b5296e
1 changed files with 12 additions and 8 deletions

View File

@ -565,12 +565,15 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter,
// Now we have one or more basic polygons: plot each polygon // Now we have one or more basic polygons: plot each polygon
for( int ii = 0; ii < outlines.OutlineCount(); ii++ ) for( int ii = 0; ii < outlines.OutlineCount(); ii++ )
{
for(int kk = 0; kk <= outlines.HoleCount (ii); kk++ )
{ {
cornerList.clear(); cornerList.clear();
const SHAPE_LINE_CHAIN& path = outlines.COutline( ii ); const SHAPE_LINE_CHAIN& path = (kk == 0) ? outlines.COutline( ii ) : outlines.CHole( ii, kk - 1 );
for( int jj = 0; jj < path.PointCount(); jj++ ) for( int jj = 0; jj < path.PointCount(); jj++ )
cornerList.push_back( wxPoint( path.CPoint( jj ).x , path.CPoint( jj ).x ) ); cornerList.push_back( wxPoint( path.CPoint( jj ).x , path.CPoint( jj ).y ) );
// Ensure the polygon is closed // Ensure the polygon is closed
if( cornerList[0] != cornerList[cornerList.size() - 1] ) if( cornerList[0] != cornerList[cornerList.size() - 1] )
@ -578,6 +581,7 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter,
aPlotter->PlotPoly( cornerList, NO_FILL ); aPlotter->PlotPoly( cornerList, NO_FILL );
} }
}
// Plot pad holes // Plot pad holes
if( aPlotOpt.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) if( aPlotOpt.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE )