PNS: Don't clip tuning paths to pads on other layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8504
This commit is contained in:
parent
f6d6b7d263
commit
3eb5a484e1
|
@ -384,7 +384,7 @@ const ITEM_SET TOPOLOGY::AssembleTuningPath( ITEM* aStart, SOLID** aStartPad, SO
|
|||
};
|
||||
|
||||
auto processPad =
|
||||
[&]( PAD* aPad )
|
||||
[&]( JOINT* aJoint, PAD* aPad )
|
||||
{
|
||||
const std::shared_ptr<SHAPE_POLY_SET>& shape = aPad->GetEffectivePolygon();
|
||||
|
||||
|
@ -395,6 +395,14 @@ const ITEM_SET TOPOLOGY::AssembleTuningPath( ITEM* aStart, SOLID** aStartPad, SO
|
|||
|
||||
LINE* line = static_cast<LINE*>( initialPath[idx] );
|
||||
|
||||
if( !aPad->FlashLayer( line->Layer() ) )
|
||||
continue;
|
||||
|
||||
const std::vector<VECTOR2I>& points = line->CLine().CPoints();
|
||||
|
||||
if( points.front() != aJoint->Pos() && points.back() != aJoint->Pos() )
|
||||
continue;
|
||||
|
||||
SHAPE_LINE_CHAIN& slc = line->Line();
|
||||
|
||||
if( shape->Contains( slc.CPoint( 0 ) ) )
|
||||
|
@ -405,10 +413,10 @@ const ITEM_SET TOPOLOGY::AssembleTuningPath( ITEM* aStart, SOLID** aStartPad, SO
|
|||
};
|
||||
|
||||
if( padA )
|
||||
processPad( padA );
|
||||
processPad( joints.first, padA );
|
||||
|
||||
if( padB )
|
||||
processPad( padB );
|
||||
processPad( joints.second, padB );
|
||||
|
||||
return initialPath;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue