pcad2kicadpcb: import solder mask for Mounting Holes

Fixes: lp:1730173
* https://bugs.launchpad.net/kicad/+bug/1730173
This commit is contained in:
Eldar Khayrullin 2017-11-05 13:13:09 +03:00 committed by jean-pierre charras
parent bf013f5b63
commit 9df4ae65ea
1 changed files with 9 additions and 0 deletions

View File

@ -205,6 +205,15 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
pad->SetDrillSize( wxSize( m_hole, m_hole ) );
pad->SetSize( wxSize( m_hole, m_hole ) );
// Mounting Hole: Solder Mask Margin from Top Layer Width size.
// Used the default zone clearance (simplify)
if( m_shapes.GetCount() && m_shapes[0]->m_shape == wxT( "MtHole" ) )
{
int sm_margin = ( m_shapes[0]->m_width - m_hole ) / 2;
pad->SetLocalSolderMaskMargin( sm_margin );
pad->SetLocalClearance( sm_margin + Millimeter2iu( 0.254 ) );
}
pad->SetLayerSet( LSET::AllCuMask() | LSET( 2, B_Mask, F_Mask ) );
}
else