Temporary fix to disable zone-zone clearance display

When selecting two objects, we display the measured clearance between
them.  This can be problematic with large zones as they have thousands
of triangles.

This is a temporary fix for 8.0.1 to disable the check until we have a
performant version

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
This commit is contained in:
Seth Hillbrand 2024-03-08 10:30:15 -08:00
parent aa68a3817a
commit 686a62cbe6
1 changed files with 11 additions and 9 deletions

View File

@ -1588,19 +1588,21 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
PCB_LAYER_ID layer = overlap.CuStack().front(); PCB_LAYER_ID layer = overlap.CuStack().front();
constraint = drcEngine->EvalRules( CLEARANCE_CONSTRAINT, a, b, layer ); constraint = drcEngine->EvalRules( CLEARANCE_CONSTRAINT, a, b, layer );
std::shared_ptr<SHAPE> a_shape( a_conn->GetEffectiveShape( layer ) );
std::shared_ptr<SHAPE> b_shape( b_conn->GetEffectiveShape( layer ) );
int actual_clearance = a_shape->GetClearance( b_shape.get() );
msgItems.emplace_back( _( "Resolved clearance" ), msgItems.emplace_back( _( "Resolved clearance" ),
m_frame->MessageTextFromValue( constraint.m_Value.Min() ) ); m_frame->MessageTextFromValue( constraint.m_Value.Min() ) );
if( actual_clearance > -1 && actual_clearance < std::numeric_limits<int>::max() ) if( a->Type() != PCB_ZONE_T || b->Type() != PCB_ZONE_T )
{ {
msgItems.emplace_back( _( "Actual clearance" ), std::shared_ptr<SHAPE> a_shape( a_conn->GetEffectiveShape( layer ) );
m_frame->MessageTextFromValue( actual_clearance ) ); std::shared_ptr<SHAPE> b_shape( b_conn->GetEffectiveShape( layer ) );
int actual_clearance = a_shape->GetClearance( b_shape.get() );
if( actual_clearance > -1 && actual_clearance < std::numeric_limits<int>::max() )
{
msgItems.emplace_back( _( "Actual clearance" ),
m_frame->MessageTextFromValue( actual_clearance ) );
}
} }
} }
} }