Factor in all clearance types when asking for worst clearance.

This commit is contained in:
Jeff Young 2020-12-30 15:20:45 +00:00
parent 1b93663627
commit e060ee2a53
1 changed files with 11 additions and 1 deletions

View File

@ -850,12 +850,22 @@ bool BOARD_DESIGN_SETTINGS::Ignore( int aDRCErrorCode )
int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue()
{
int biggest = 0;
DRC_CONSTRAINT constraint;
if( m_DRCEngine )
{
m_DRCEngine->QueryWorstConstraint( CLEARANCE_CONSTRAINT, constraint );
biggest = std::max( biggest, constraint.Value().Min() );
return constraint.Value().HasMin() ? constraint.Value().Min() : 0;
m_DRCEngine->QueryWorstConstraint( HOLE_CLEARANCE_CONSTRAINT, constraint );
biggest = std::max( biggest, constraint.Value().Min() );
m_DRCEngine->QueryWorstConstraint( EDGE_CLEARANCE_CONSTRAINT, constraint );
biggest = std::max( biggest, constraint.Value().Min() );
}
return biggest;
}