Plot footprint edgecuts in PDF drill map file

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15247

(Cherry-picked from e5f688e865)
This commit is contained in:
Ian McInerney 2023-11-12 21:27:31 +00:00
parent 12fdeac31c
commit 60d23b14e7
1 changed files with 26 additions and 0 deletions

View File

@ -33,6 +33,7 @@
#include <math/util.h> // for KiROUND
#include <board.h>
#include <footprint.h>
#include <pcbnew.h>
#include <pcbplot.h>
@ -258,6 +259,31 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_
}
}
// Plot edge cuts in footprints
for( const FOOTPRINT* footprint : m_pcb->Footprints() )
{
for( BOARD_ITEM* item : footprint->GraphicalItems() )
{
if( item-> GetLayer() != Edge_Cuts )
continue;
switch( item->Type() )
{
case PCB_FP_SHAPE_T:
{
PCB_SHAPE dummy_shape( *static_cast<PCB_SHAPE*>( item ) );
dummy_shape.SetLayer( Dwgs_User );
dummy_shape.SetParentGroup( nullptr ); // Remove group association, not needed for plotting
itemplotter.PlotPcbShape( &dummy_shape );
}
break;
default:
break;
}
}
}
int plotX, plotY, TextWidth;
int intervalle = 0;
char line[1024];