We can only knockout a pad if we're plotting the pad shape.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17166
This commit is contained in:
Jeff Young 2024-05-20 11:57:56 +01:00
parent 826b72c499
commit 0ff59bc60e
1 changed files with 13 additions and 13 deletions

View File

@ -1044,23 +1044,23 @@ void BRDITEMS_PLOTTER::plotOneDrillMark( PAD_DRILL_SHAPE aDrillShape, const VECT
void BRDITEMS_PLOTTER::PlotDrillMarks() void BRDITEMS_PLOTTER::PlotDrillMarks()
{ {
/* If small drills marks were requested prepare a clamp value to pass bool onCopperLayer = ( LSET::AllCuMask() & m_layerMask ).any();
to the helper function */ int smallDrill = 0;
int smallDrill = GetDrillMarksType() == DRILL_MARKS::SMALL_DRILL_SHAPE
? pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize ) : 0;
/* In the filled trace mode drill marks are drawn white-on-black to scrape if( GetDrillMarksType() == DRILL_MARKS::SMALL_DRILL_SHAPE )
the underlying pad. This works only for drivers supporting color change, smallDrill = pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize );
obviously... it means that:
/* In the filled trace mode drill marks are drawn white-on-black to knock-out the underlying
pad. This works only for drivers supporting color change, obviously... it means that:
- PS, SVG and PDF output is correct (i.e. you have a 'donut' pad) - PS, SVG and PDF output is correct (i.e. you have a 'donut' pad)
- In HPGL you can't see them - In HPGL you can't see them
- In gerbers you can't see them, too. This is arguably the right thing to - In gerbers you can't see them, too. This is arguably the right thing to do since having
do since having drill marks and high speed drill stations is a sure drill marks and high speed drill stations is a sure recipe for broken tools and angry
recipe for broken tools and angry manufacturers. If you *really* want them manufacturers. If you *really* want them you could start a layer with negative polarity
you could start a layer with negative polarity to scrape the film. to knock-out the film.
- In DXF they go into the 'WHITE' layer. This could be useful. - In DXF they go into the 'WHITE' layer. This could be useful.
*/ */
if( GetPlotMode() == FILLED ) if( GetPlotMode() == FILLED && onCopperLayer )
m_plotter->SetColor( WHITE ); m_plotter->SetColor( WHITE );
for( PCB_TRACK* track : m_board->Tracks() ) for( PCB_TRACK* track : m_board->Tracks() )
@ -1091,6 +1091,6 @@ void BRDITEMS_PLOTTER::PlotDrillMarks()
} }
} }
if( GetPlotMode() == FILLED ) if( GetPlotMode() == FILLED && onCopperLayer )
m_plotter->SetColor( BLACK ); m_plotter->SetColor( BLACK );
} }