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()
{
/* If small drills marks were requested prepare a clamp value to pass
to the helper function */
int smallDrill = GetDrillMarksType() == DRILL_MARKS::SMALL_DRILL_SHAPE
? pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize ) : 0;
bool onCopperLayer = ( LSET::AllCuMask() & m_layerMask ).any();
int smallDrill = 0;
/* In the filled trace mode drill marks are drawn white-on-black to scrape
the underlying pad. This works only for drivers supporting color change,
obviously... it means that:
if( GetDrillMarksType() == DRILL_MARKS::SMALL_DRILL_SHAPE )
smallDrill = pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize );
/* 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)
- In HPGL you can't see them
- In gerbers you can't see them, too. This is arguably the right thing to
do since having drill marks and high speed drill stations is a sure
recipe for broken tools and angry manufacturers. If you *really* want them
you could start a layer with negative polarity to scrape the film.
- In gerbers you can't see them, too. This is arguably the right thing to do since having
drill marks and high speed drill stations is a sure recipe for broken tools and angry
manufacturers. If you *really* want them you could start a layer with negative polarity
to knock-out the film.
- In DXF they go into the 'WHITE' layer. This could be useful.
*/
if( GetPlotMode() == FILLED )
if( GetPlotMode() == FILLED && onCopperLayer )
m_plotter->SetColor( WHITE );
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 );
}