From 2c74d46d79368688d28d072c321dbd8ed2736929 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sat, 5 Apr 2025 19:27:38 +0300 Subject: [PATCH] Altium PCB: fix padstack shapes import on F.Cu. --- pcbnew/padstack.cpp | 2 ++ pcbnew/pcb_io/altium/altium_pcb.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/padstack.cpp b/pcbnew/padstack.cpp index 0d2935e309..6c7eb2da51 100644 --- a/pcbnew/padstack.cpp +++ b/pcbnew/padstack.cpp @@ -989,6 +989,8 @@ PCB_LAYER_ID PADSTACK::EffectiveLayerFor( PCB_LAYER_ID aLayer ) const // We're asked for an inner copper layer not present in the board. There is no right // answer here, so fall back on the front shape + wxFAIL_MSG( "Asked for inner padstack layer not present on the board" ); + return ALL_LAYERS; } diff --git a/pcbnew/pcb_io/altium/altium_pcb.cpp b/pcbnew/pcb_io/altium/altium_pcb.cpp index a7a224719b..2d2df83f54 100644 --- a/pcbnew/pcb_io/altium/altium_pcb.cpp +++ b/pcbnew/pcb_io/altium/altium_pcb.cpp @@ -3499,7 +3499,11 @@ void ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper( FOOTPRINT* aFootprint, con { size_t i = 0; - for( PCB_LAYER_ID layer : LAYER_RANGE( In2_Cu, In30_Cu, MAX_CU_LAYERS ) ) + LSET intLayers = aFootprint->BoardLayerSet(); + intLayers &= LSET::InternalCuMask(); + intLayers.set( In1_Cu, false ); // Already handled above + + for( PCB_LAYER_ID layer : intLayers ) { setCopperGeometry( layer, aElem.sizeAndShape->inner_shape[i], VECTOR2I( aElem.sizeAndShape->inner_size[i].x,