Don't knock out anti-text box

Knockout text should only prevent filling directly around the text
itself, not the larger anti-text fill around it.  This prevents minimum
width provisions from kicking in unneccesarily

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

(cherry picked from commit a12bc3a410)
This commit is contained in:
Seth Hillbrand 2024-04-05 14:28:49 -07:00
parent 0a29c0dea3
commit b241e09914
1 changed files with 5 additions and 2 deletions

View File

@ -815,8 +815,11 @@ void ZONE_FILLER::addKnockout( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer, int aGap,
{
if( text->IsKnockout() )
{
int antiGap = -m_maxError * 2; // Don't leave gaps around knockout text
text->TransformShapeToPolygon( aHoles, aLayer, antiGap, m_maxError, ERROR_OUTSIDE );
// Knockout text should only leave holes where the text is, not where the copper fill
// around it would be.
PCB_TEXT textCopy = *text;
textCopy.SetIsKnockout( false );
textCopy.TransformShapeToPolygon( aHoles, aLayer, 0, m_maxError, ERROR_OUTSIDE );
}
else
{