Commit cab7e67b authored by jean-pierre charras's avatar jean-pierre charras

fix Bug #1345193: Drill Map coordinates alway 0 when using Gerber format (due...

fix Bug #1345193:  Drill Map coordinates alway 0 when using Gerber format (due to a missing plotter initialization).
parent a57f7ae8
......@@ -43,6 +43,9 @@ void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
plotScale = 1; // Plot scale is *always* 1.0
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
// origin at the origin
......
......@@ -78,6 +78,7 @@ bool EXCELLON_WRITER::GenDrillMapFile( const wxString& aFullFileName,
offset = GetOffset();
plotter = new GERBER_PLOTTER();
plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
plotter->SetGerberCoordinatesFormat( 5 ); // format x.5 unit = mm
break;
case PLOT_FORMAT_HPGL: // Scale for HPGL format.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment