Commit ef557ddb authored by charras's avatar charras

minor code cleanup

parent f4eeb4df
......@@ -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();
......
......@@ -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
......
......@@ -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
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment