From 4c0aa6db1a8a151300c1e9a958b44c4565393d77 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 29 Dec 2020 21:13:37 -0500 Subject: [PATCH] PNS: Disable smart pads optimization for vias There is not much point with the current algorithm and it breaks auto-posture. --- pcbnew/router/pns_optimizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 66a5823831..e882950270 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -908,6 +908,10 @@ int OPTIMIZER::smartPadsSingle( LINE* aLine, ITEM* aPad, bool aEnd, int aEndVert if( solid && solid->Offset() != VECTOR2I( 0, 0 ) ) return -1; + // don't do optimization on vias, they are always round at the moment and the optimizer + // will possibly mess up an intended via exit posture + if( aPad->Kind() == ITEM::VIA_T ) + return -1; BREAKOUT_LIST breakouts = computeBreakouts( aLine->Width(), aPad, true ); SHAPE_LINE_CHAIN line = ( aEnd ? aLine->CLine().Reverse() : aLine->CLine() );