CADSTAR PCB: Correctly load pads with holes
If the THROUGH_HOLE attribute isn't set, it just means that the pads are only present on one side of the board, but there can still be a plated / non-plated hole. Fixes https://gitlab.com/kicad/code/kicad/-/issues/9579
This commit is contained in:
parent
7b4d5b2312
commit
ad2e780a2c
|
@ -919,21 +919,14 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
||||||
switch( aCadstarPad.Side )
|
switch( aCadstarPad.Side )
|
||||||
{
|
{
|
||||||
case PAD_SIDE::MAXIMUM: //Bottom side
|
case PAD_SIDE::MAXIMUM: //Bottom side
|
||||||
pad->SetAttribute( PAD_ATTRIB::SMD );
|
|
||||||
padLayerSet |= LSET( 3, B_Cu, B_Paste, B_Mask );
|
padLayerSet |= LSET( 3, B_Cu, B_Paste, B_Mask );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_SIDE::MINIMUM: //TOP side
|
case PAD_SIDE::MINIMUM: //TOP side
|
||||||
pad->SetAttribute( PAD_ATTRIB::SMD );
|
|
||||||
padLayerSet |= LSET( 3, F_Cu, F_Paste, F_Mask );
|
padLayerSet |= LSET( 3, F_Cu, F_Paste, F_Mask );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_SIDE::THROUGH_HOLE:
|
case PAD_SIDE::THROUGH_HOLE:
|
||||||
if( csPadcode.Plated )
|
|
||||||
pad->SetAttribute( PAD_ATTRIB::PTH );
|
|
||||||
else
|
|
||||||
pad->SetAttribute( PAD_ATTRIB::NPTH );
|
|
||||||
|
|
||||||
padLayerSet = LSET::AllCuMask() | LSET( 4, F_Mask, B_Mask, F_Paste, B_Paste );
|
padLayerSet = LSET::AllCuMask() | LSET( 4, F_Mask, B_Mask, F_Paste, B_Paste );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -941,6 +934,7 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
||||||
wxFAIL_MSG( "Unknown Pad type" );
|
wxFAIL_MSG( "Unknown Pad type" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pad->SetAttribute( PAD_ATTRIB::SMD ); // assume SMD pad for now
|
||||||
pad->SetLocalSolderMaskMargin( 0 );
|
pad->SetLocalSolderMaskMargin( 0 );
|
||||||
pad->SetLocalSolderPasteMargin( 0 );
|
pad->SetLocalSolderPasteMargin( 0 );
|
||||||
pad->SetLocalSolderPasteMarginRatio( 0.0 );
|
pad->SetLocalSolderPasteMarginRatio( 0.0 );
|
||||||
|
@ -1144,6 +1138,11 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
||||||
|
|
||||||
drillOffset.x = -getKiCadLength( csPadcode.DrillXoffset );
|
drillOffset.x = -getKiCadLength( csPadcode.DrillXoffset );
|
||||||
drillOffset.y = getKiCadLength( csPadcode.DrillYoffset );
|
drillOffset.y = getKiCadLength( csPadcode.DrillYoffset );
|
||||||
|
|
||||||
|
if( csPadcode.Plated )
|
||||||
|
pad->SetAttribute( PAD_ATTRIB::PTH );
|
||||||
|
else
|
||||||
|
pad->SetAttribute( PAD_ATTRIB::NPTH );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue