DXF plot: fix incorrect plotting of oval holes
Due to missing DXF_PLOTTER::ThickSegment code to plot a thick segment in SKETCH mode (outline mode)
This commit is contained in:
parent
45386ccbf3
commit
17739859b3
|
@ -586,8 +586,28 @@ void DXF_PLOTTER::SetDash( int dashed )
|
||||||
void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth,
|
void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth,
|
||||||
EDA_DRAW_MODE_T aPlotMode, void* aData )
|
EDA_DRAW_MODE_T aPlotMode, void* aData )
|
||||||
{
|
{
|
||||||
MoveTo( aStart );
|
if( aPlotMode == SKETCH )
|
||||||
FinishTo( aEnd );
|
{
|
||||||
|
std::vector<wxPoint> cornerList;
|
||||||
|
SHAPE_POLY_SET outlineBuffer;
|
||||||
|
TransformOvalClearanceToPolygon( outlineBuffer,
|
||||||
|
aStart, aEnd, aWidth, 32 , 1.0 );
|
||||||
|
const SHAPE_LINE_CHAIN& path = outlineBuffer.COutline(0 );
|
||||||
|
|
||||||
|
for( int jj = 0; jj < path.PointCount(); jj++ )
|
||||||
|
cornerList.push_back( wxPoint( path.CPoint( jj ).x , path.CPoint( jj ).y ) );
|
||||||
|
|
||||||
|
// Ensure the polygon is closed
|
||||||
|
if( cornerList[0] != cornerList[cornerList.size() - 1] )
|
||||||
|
cornerList.push_back( cornerList[0] );
|
||||||
|
|
||||||
|
PlotPoly( cornerList, NO_FILL );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MoveTo( aStart );
|
||||||
|
FinishTo( aEnd );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Plot an arc in DXF format
|
/* Plot an arc in DXF format
|
||||||
|
|
Loading…
Reference in New Issue