CADSTAR PCB: Use board clearance + additional isolation as zone clearance

Copper-to-copper clearance is too onerous and results in large amount
of DRC errors for the majority of imported designs.
This commit is contained in:
Roberto Fernandez Bautista 2021-10-10 00:17:24 +01:00
parent f4ff01a5ab
commit eb7d0fdf8a
1 changed files with 3 additions and 12 deletions

View File

@ -1858,19 +1858,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates()
zone->SetMinIslandArea( minIslandArea );
// In cadstar zone clearance is in addition to the design rule "copper to copper"
// In cadstar zone clearance is in addition to the global clearance.
// TODO: need to create custom rules for individual items: zone to pad, zone to track, etc.
int clearance = getKiCadLength( csTemplate.Pouring.AdditionalIsolation );
if( Assignments.Codedefs.SpacingCodes.find( wxT( "C_C" ) )
!= Assignments.Codedefs.SpacingCodes.end() )
{
int copperToCopper = Assignments.Codedefs.SpacingCodes.at( wxT( "C_C" ) ).Spacing;
clearance += getKiCadLength( copperToCopper );
}
else
{
clearance += m_board->GetDesignSettings().m_MinClearance;
}
clearance += m_board->GetDesignSettings().m_MinClearance;
zone->SetLocalClearance( clearance );