7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

router: fix regression in handling NPTH holes

(note to self - was causing intermittent/occasional ignoring of NPTHs depending on the layer of the head track)
This commit is contained in:
Tomasz Wlostowski 2025-01-03 22:54:20 +01:00
parent 3ab59dfa67
commit b75245749f
2 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,8 @@ bool ITEM::collideSimple( const ITEM* aHead, const NODE* aNode, int aLayer,
//const SHAPE* shapeH = aHead->Shape();
const HOLE* holeH = aHead->Hole();
const HOLE* holeI = Hole();
int lineWidthH = 0;
bool collisionsFound = false;
@ -153,6 +155,10 @@ bool ITEM::collideSimple( const ITEM* aHead, const NODE* aNode, int aLayer,
if( Net() != holeH->Net() && collideSimple( holeH, aNode, aLayer, aCtx ) )
collisionsFound = true;
}
if( holeI && shouldWeConsiderHoleCollisions( holeI, aHead ) )
{
collisionsFound |= holeI->collideSimple( aHead, aNode, aLayer, aCtx );
}
// Sadly collision routines ignore SHAPE_POLY_LINE widths so we have to pass them in as part
// of the clearance value.

View File

@ -1209,7 +1209,7 @@ std::vector<std::unique_ptr<PNS::SOLID>> PNS_KICAD_IFACE_BASE::syncPad( PAD* aPa
if( aPad->GetDrillSize().x > 0 )
{
solid->SetHole( new PNS::HOLE( aPad->GetEffectiveHoleShape()->Clone() ) );
solid->Hole()->SetLayer( GetPNSLayerFromBoardLayer( aLayer ) );
solid->Hole()->SetLayers( PNS_LAYER_RANGE( 0, aPad->BoardCopperLayerCount() - 1 ) );
}
// We generate a single SOLID for a pad, so we have to treat it as ALWAYS_FLASHED and