PNS: don't mark holes only if there's also a solid violation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8874
This commit is contained in:
parent
3beeb52c43
commit
e91218b876
|
@ -462,10 +462,13 @@ void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR&
|
||||||
[&]( ITEM* currentItem, ITEM* itemToMark )
|
[&]( ITEM* currentItem, ITEM* itemToMark )
|
||||||
{
|
{
|
||||||
std::unique_ptr<ITEM> tmp( itemToMark->Clone() );
|
std::unique_ptr<ITEM> tmp( itemToMark->Clone() );
|
||||||
|
|
||||||
int clearance;
|
int clearance;
|
||||||
bool removeOriginal = true;
|
bool removeOriginal = true;
|
||||||
|
bool holeOnly = ( ( itemToMark->Marker() & MK_HOLE )
|
||||||
|
&& !( itemToMark->Marker() & MK_VIOLATION ) );
|
||||||
|
|
||||||
if( itemToMark->Marker() & MK_HOLE )
|
if( holeOnly )
|
||||||
clearance = aNode->GetHoleClearance( currentItem, itemToMark );
|
clearance = aNode->GetHoleClearance( currentItem, itemToMark );
|
||||||
else
|
else
|
||||||
clearance = aNode->GetClearance( currentItem, itemToMark );
|
clearance = aNode->GetClearance( currentItem, itemToMark );
|
||||||
|
@ -475,8 +478,7 @@ void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR&
|
||||||
|
|
||||||
if( itemToMark->Kind() == ITEM::SOLID_T )
|
if( itemToMark->Kind() == ITEM::SOLID_T )
|
||||||
{
|
{
|
||||||
if( ( itemToMark->Marker() & PNS::MK_HOLE )
|
if( holeOnly || !m_iface->IsFlashedOnLayer( itemToMark, itemToMark->Layer() ) )
|
||||||
|| !m_iface->IsFlashedOnLayer( itemToMark, itemToMark->Layer() ) )
|
|
||||||
{
|
{
|
||||||
SOLID* solid = static_cast<SOLID*>( tmp.get() );
|
SOLID* solid = static_cast<SOLID*>( tmp.get() );
|
||||||
solid->SetShape( solid->Hole()->Clone() );
|
solid->SetShape( solid->Hole()->Clone() );
|
||||||
|
|
Loading…
Reference in New Issue