diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index cdaa9862b1..d9b8b9f88a 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -31,9 +31,7 @@ D_PAD::D_PAD( MODULE* parent ) : BOARD_CONNECTED_ITEM( parent, TYPE_PAD ) m_PadShape = PAD_CIRCLE; // Shape: PAD_CIRCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID m_Attribut = PAD_STANDARD; // Type: NORMAL, PAD_SMD, PAD_CONN m_DrillShape = PAD_CIRCLE; // Drill shape = circle - // these layers are ok for a standard pad: - m_Masque_Layer = ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP |\ - SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP; + m_Masque_Layer = PAD_STANDARD_DEFAULT_LAYERS; // set layers mask to default for a standard pad SetSubRatsnest( 0 ); // used in ratsnest calculations ComputeRayon(); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index e2f445d289..fd0cf84baa 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -6,6 +6,21 @@ class Pcb3D_GLCanvas; #include "pad_shapes.h" +/* Default layers used for pads, accordint to the pad type. + * this is default values only, they can be changed for a given pad + */ +// PAD_STANDARD: +#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP + +// PAD_CONN: +#define PAD_CONN_DEFAULT_LAYERS CMP_LAYER | SOLDERPASTE_LAYER_CMP | SOLDERMASK_LAYER_CMP + +// PAD_SMD: +#define PAD_SMD_DEFAULT_LAYERS CMP_LAYER | SOLDERMASK_LAYER_CMP + +//PAD_HOLE_NOT_PLATED: +#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS CUIVRE_LAYER | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP + /* Definition type Structure d'un pad */ class D_PAD : public BOARD_CONNECTED_ITEM diff --git a/pcbnew/dialog_pad_properties.cpp b/pcbnew/dialog_pad_properties.cpp index fee6369c4d..aa56c2976e 100644 --- a/pcbnew/dialog_pad_properties.cpp +++ b/pcbnew/dialog_pad_properties.cpp @@ -31,16 +31,16 @@ int CodeType[NBTYPES] = static long Std_Pad_Layers[NBTYPES] = { // PAD_STANDARD: - ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP, + PAD_STANDARD_DEFAULT_LAYERS, // PAD_CONN: - CMP_LAYER | SOLDERPASTE_LAYER_CMP | SOLDERMASK_LAYER_CMP, + PAD_CONN_DEFAULT_LAYERS, // PAD_SMD: - CMP_LAYER | SOLDERMASK_LAYER_CMP, + PAD_SMD_DEFAULT_LAYERS, //PAD_HOLE_NOT_PLATED: - CUIVRE_LAYER | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP + PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS };