mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Honour board's PAGE_INFO when plotting drill maps.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21393 (cherry picked from commit d7b5456dfbd022f8947c86bcfd26bfcfb917c8aa)
This commit is contained in:
parent
149cac25f4
commit
7679413f2f
@ -446,6 +446,7 @@ void DIALOG_GENDRILL::genDrillAndMapFiles( bool aGenDrill, bool aGenMap )
|
||||
excellonWriter.SetOptions( g_mirror, g_minimalHeader, g_drillFileOffset, g_merge_PTH_NPTH );
|
||||
excellonWriter.SetRouteModeForOvalHoles( g_useRouteModeForOvalHoles );
|
||||
excellonWriter.SetMapFileFormat( filefmt[choice] );
|
||||
excellonWriter.SetPageInfo( &m_board->GetPageSettings() );
|
||||
|
||||
excellonWriter.CreateDrillandMapFilesSet( outputDir.GetFullPath(), aGenDrill, aGenMap,
|
||||
&reporter );
|
||||
@ -459,6 +460,7 @@ void DIALOG_GENDRILL::genDrillAndMapFiles( bool aGenDrill, bool aGenMap )
|
||||
gerberWriter.SetFormat( m_plotOpts.GetGerberPrecision() );
|
||||
gerberWriter.SetOptions( g_drillFileOffset );
|
||||
gerberWriter.SetMapFileFormat( filefmt[choice] );
|
||||
gerberWriter.SetPageInfo( &m_board->GetPageSettings() );
|
||||
|
||||
gerberWriter.CreateDrillandMapFilesSet( outputDir.GetFullPath(), aGenDrill, aGenMap,
|
||||
&reporter );
|
||||
|
@ -134,8 +134,7 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_
|
||||
case PLOT_FORMAT::POST:
|
||||
case PLOT_FORMAT::SVG:
|
||||
{
|
||||
PAGE_INFO pageA4( wxT( "A4" ) );
|
||||
VECTOR2I pageSizeIU = pageA4.GetSizeIU( pcbIUScale.IU_PER_MILS );
|
||||
VECTOR2I pageSizeIU = page_info.GetSizeIU( pcbIUScale.IU_PER_MILS );
|
||||
|
||||
// Reserve a 10 mm margin around the page.
|
||||
int margin = pcbIUScale.mmToIU( 10 );
|
||||
@ -170,7 +169,7 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_
|
||||
else
|
||||
plotter = new PS_PLOTTER;
|
||||
|
||||
plotter->SetPageSettings( pageA4 );
|
||||
plotter->SetPageSettings( page_info );
|
||||
plotter->SetViewport( offset, pcbIUScale.IU_PER_MILS / 10, scale, false );
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user