Fix some issue with NPTH pads with holes same size as pad.
This commit is contained in:
parent
f590dcf513
commit
dfdedfa605
|
@ -309,6 +309,25 @@ bool isMaskAperture( BOARD_ITEM* aItem )
|
|||
}
|
||||
|
||||
|
||||
bool isNullAperture( BOARD_ITEM* aItem )
|
||||
{
|
||||
if( aItem->Type() == PCB_PAD_T )
|
||||
{
|
||||
PAD* pad = static_cast<PAD*>( aItem );
|
||||
|
||||
if( pad->GetAttribute() == PAD_ATTRIB::NPTH
|
||||
&& ( pad->GetShape() == PAD_SHAPE::CIRCLE || pad->GetShape() == PAD_SHAPE::OVAL )
|
||||
&& pad->GetSize().x <= pad->GetDrillSize().x
|
||||
&& pad->GetSize().y <= pad->GetDrillSize().y )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems( BOARD_ITEM* aItem,
|
||||
const EDA_RECT& aItemBBox,
|
||||
PCB_LAYER_ID aRefLayer,
|
||||
|
@ -336,6 +355,9 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems( BOARD_ITEM* aItem,
|
|||
if( otherNet > 0 && otherNet == itemNet )
|
||||
return false;
|
||||
|
||||
if( isNullAperture( other ) )
|
||||
return false;
|
||||
|
||||
if( aItem->GetParentFootprint() && other->GetParentFootprint() )
|
||||
{
|
||||
int attr = static_cast<FOOTPRINT*>( aItem->GetParentFootprint() )->GetAttributes();
|
||||
|
@ -583,7 +605,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testMaskBridges()
|
|||
|
||||
EDA_RECT itemBBox = item->GetBoundingBox();
|
||||
|
||||
if( item->IsOnLayer( F_Mask ) )
|
||||
if( item->IsOnLayer( F_Mask ) && !isNullAperture( item ) )
|
||||
{
|
||||
// Test for aperture-to-aperture collisions
|
||||
testItemAgainstItems( item, itemBBox, F_Mask, F_Mask );
|
||||
|
@ -597,7 +619,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testMaskBridges()
|
|||
testItemAgainstItems( item, itemBBox, F_Cu, F_Mask );
|
||||
}
|
||||
|
||||
if( item->IsOnLayer( B_Mask ) )
|
||||
if( item->IsOnLayer( B_Mask ) && !isNullAperture( item ) )
|
||||
{
|
||||
// Test for aperture-to-aperture collisions
|
||||
testItemAgainstItems( item, itemBBox, B_Mask, B_Mask );
|
||||
|
|
|
@ -1198,7 +1198,7 @@ wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|||
GetParent()->GetReference(),
|
||||
layerMaskDescribe() );
|
||||
}
|
||||
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( UNDEFINED_LAYER ) )
|
||||
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( F_Cu ) )
|
||||
{
|
||||
return wxString::Format( _( "Through hole pad %s of %s" ),
|
||||
wxT( "(" ) + _( "NPTH, Mechanical" ) + wxT( ")" ),
|
||||
|
@ -1221,7 +1221,7 @@ wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|||
GetParent()->GetReference(),
|
||||
layerMaskDescribe() );
|
||||
}
|
||||
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( UNDEFINED_LAYER ) )
|
||||
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( F_Cu ) )
|
||||
{
|
||||
return wxString::Format( _( "Through hole pad %s of %s" ),
|
||||
wxT( "(" ) + _( "NPTH, Mechanical" ) + wxT( ")" ),
|
||||
|
|
Loading…
Reference in New Issue