Gerber plotter: remove a G01 useless command, and ensure this command exists in plot polygon.
This commit is contained in:
parent
bc8739f930
commit
7134b1c83f
|
@ -215,9 +215,6 @@ bool GERBER_PLOTTER::StartPlot()
|
||||||
// Be sure the usual dark polarity is selected:
|
// Be sure the usual dark polarity is selected:
|
||||||
fputs( "%LPD*%\n", outputFile );
|
fputs( "%LPD*%\n", outputFile );
|
||||||
|
|
||||||
// Specify linear interpol (G01):
|
|
||||||
fputs( "G01*\n", outputFile );
|
|
||||||
|
|
||||||
fputs( "G04 APERTURE LIST*\n", outputFile );
|
fputs( "G04 APERTURE LIST*\n", outputFile );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -484,7 +481,7 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
||||||
DPOINT devEnd = userToDeviceCoordinates( end );
|
DPOINT devEnd = userToDeviceCoordinates( end );
|
||||||
DPOINT devCenter = userToDeviceCoordinates( aCenter ) - userToDeviceCoordinates( start );
|
DPOINT devCenter = userToDeviceCoordinates( aCenter ) - userToDeviceCoordinates( start );
|
||||||
|
|
||||||
fprintf( outputFile, "G75*\n" ); // Multiquadrant mode
|
fprintf( outputFile, "G75*\n" ); // Multiquadrant (360 degrees) mode
|
||||||
|
|
||||||
if( aStAngle < aEndAngle )
|
if( aStAngle < aEndAngle )
|
||||||
fprintf( outputFile, "G03" );
|
fprintf( outputFile, "G03" );
|
||||||
|
@ -494,7 +491,8 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
||||||
fprintf( outputFile, "X%dY%dI%dJ%dD01*\n",
|
fprintf( outputFile, "X%dY%dI%dJ%dD01*\n",
|
||||||
KiROUND( devEnd.x ), KiROUND( devEnd.y ),
|
KiROUND( devEnd.x ), KiROUND( devEnd.y ),
|
||||||
KiROUND( devCenter.x ), KiROUND( devCenter.y ) );
|
KiROUND( devCenter.x ), KiROUND( devCenter.y ) );
|
||||||
fprintf( outputFile, "G01*\n" ); // Back to linear interp.
|
|
||||||
|
fprintf( outputFile, "G01*\n" ); // Back to linear interpol (perhaps useless here).
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -519,6 +517,7 @@ void GERBER_PLOTTER:: PlotPoly( const std::vector< wxPoint >& aCornerList,
|
||||||
fputs( "G36*\n", outputFile );
|
fputs( "G36*\n", outputFile );
|
||||||
|
|
||||||
MoveTo( aCornerList[0] );
|
MoveTo( aCornerList[0] );
|
||||||
|
fputs( "G01*\n", outputFile ); // Set linear interpolation.
|
||||||
|
|
||||||
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
|
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
|
||||||
LineTo( aCornerList[ii] );
|
LineTo( aCornerList[ii] );
|
||||||
|
|
Loading…
Reference in New Issue