fix Bug #1345193: Drill Map coordinates alway 0 when using Gerber format (due to a missing plotter initialization).
This commit is contained in:
parent
a57f7ae8cd
commit
cab7e67b59
|
@ -43,6 +43,9 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
|
||||||
plotScale = 1; // Plot scale is *always* 1.0
|
plotScale = 1; // Plot scale is *always* 1.0
|
||||||
|
|
||||||
m_IUsPerDecimil = aIusPerDecimil;
|
m_IUsPerDecimil = aIusPerDecimil;
|
||||||
|
// gives now a default value to iuPerDeviceUnit (because the units of the caller is now known)
|
||||||
|
// which could be modified later by calling SetGerberCoordinatesFormat()
|
||||||
|
iuPerDeviceUnit = pow( 10.0, m_gerberUnitFmt ) / ( m_IUsPerDecimil * 10000.0 );
|
||||||
|
|
||||||
// We don't handle the filmbox, and it's more useful to keep the
|
// We don't handle the filmbox, and it's more useful to keep the
|
||||||
// origin at the origin
|
// origin at the origin
|
||||||
|
|
|
@ -78,6 +78,7 @@ bool EXCELLON_WRITER::GenDrillMapFile( const wxString& aFullFileName,
|
||||||
offset = GetOffset();
|
offset = GetOffset();
|
||||||
plotter = new GERBER_PLOTTER();
|
plotter = new GERBER_PLOTTER();
|
||||||
plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
|
plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
|
||||||
|
plotter->SetGerberCoordinatesFormat( 5 ); // format x.5 unit = mm
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOT_FORMAT_HPGL: // Scale for HPGL format.
|
case PLOT_FORMAT_HPGL: // Scale for HPGL format.
|
||||||
|
|
Loading…
Reference in New Issue