drc: silk to silk clerance test should not report errors for hidden text

This commit is contained in:
Tomasz Wlostowski 2020-10-01 18:49:17 +02:00
parent aee16efe32
commit 8eb9d34aad
1 changed files with 18 additions and 2 deletions

View File

@ -132,6 +132,22 @@ bool DRC_TEST_PROVIDER_SILK_TO_SILK::Run()
MODULE *parentModRef = nullptr;
MODULE *parentModTest = nullptr;
if( typeRef == PCB_MODULE_TEXT_T )
{
auto textRef = static_cast<TEXTE_MODULE*>( aRefItem->parent );
if( !textRef->IsVisible( ) )
return true;
}
if( typeTest == PCB_MODULE_TEXT_T )
{
auto textTest = static_cast<TEXTE_MODULE*>( aTestItem->parent );
if( !textTest->IsVisible( ) )
return true;
}
if( typeRef == PCB_MODULE_EDGE_T || typeRef == PCB_MODULE_TEXT_T )
{
parentModRef = static_cast<MODULE*> ( aRefItem->parent->GetParent() );
@ -160,7 +176,7 @@ bool DRC_TEST_PROVIDER_SILK_TO_SILK::Run()
if( ! aRefItem->shape->Collide( aTestItem->shape, minClearance, &actual, &pos ) )
return true;
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_SILK_CLEARANCE );
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_SILK_CLEARANCE );
wxString msg;
msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ),
@ -205,4 +221,4 @@ std::set<DRC_CONSTRAINT_TYPE_T> DRC_TEST_PROVIDER_SILK_TO_SILK::GetConstraintTyp
namespace detail
{
static DRC_REGISTER_TEST_PROVIDER<DRC_TEST_PROVIDER_SILK_TO_SILK> dummy;
}
}