changed last layer constants XXX_LAYER_CU and XXXX_LAYER_CMP to XXX_LAYER_BACK and XXX_LAYER_FRONT

This commit is contained in:
charras 2009-12-21 18:51:37 +00:00
parent 703420baac
commit b24118ebbd
12 changed files with 94 additions and 94 deletions

View File

@ -90,14 +90,14 @@
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_BACK)
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_FRONT)
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_BACK)
#define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_FRONT)
#define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_BACK)
#define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_FRONT)
#define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_BACK)
#define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_FRONT)
#define ADHESIVE_LAYER_BACK (1 << ADHESIVE_N_BACK)
#define ADHESIVE_LAYER_FRONT (1 << ADHESIVE_N_FRONT)
#define SOLDERPASTE_LAYER_BACK (1 << SOLDERPASTE_N_BACK)
#define SOLDERPASTE_LAYER_FRONT (1 << SOLDERPASTE_N_FRONT)
#define SILKSCREEN_LAYER_BACK (1 << SILKSCREEN_N_BACK)
#define SILKSCREEN_LAYER_FRONT (1 << SILKSCREEN_N_FRONT)
#define SOLDERMASK_LAYER_BACK (1 << SOLDERMASK_N_BACK)
#define SOLDERMASK_LAYER_FRONT (1 << SOLDERMASK_N_FRONT)
#define DRAW_LAYER (1 << DRAW_N)
#define COMMENT_LAYER (1 << COMMENT_N)
#define ECO1_LAYER (1 << ECO1_N)

View File

@ -80,41 +80,41 @@ static int ChangeSideMaskLayer( int masque )
int newmasque;
newmasque = masque & ~(LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_CU | SILKSCREEN_LAYER_CMP |
ADHESIVE_LAYER_CU | ADHESIVE_LAYER_CMP |
SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP |
SOLDERPASTE_LAYER_CU | SOLDERPASTE_LAYER_CMP |
ADHESIVE_LAYER_CU | ADHESIVE_LAYER_CMP);
SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT |
ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT |
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT |
SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT |
ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT);
if( masque & LAYER_BACK )
newmasque |= LAYER_FRONT;
if( masque & LAYER_FRONT )
newmasque |= LAYER_BACK;
if( masque & SILKSCREEN_LAYER_CU )
newmasque |= SILKSCREEN_LAYER_CMP;
if( masque & SILKSCREEN_LAYER_CMP )
newmasque |= SILKSCREEN_LAYER_CU;
if( masque & SILKSCREEN_LAYER_BACK )
newmasque |= SILKSCREEN_LAYER_FRONT;
if( masque & SILKSCREEN_LAYER_FRONT )
newmasque |= SILKSCREEN_LAYER_BACK;
if( masque & ADHESIVE_LAYER_CU )
newmasque |= ADHESIVE_LAYER_CMP;
if( masque & ADHESIVE_LAYER_CMP )
newmasque |= ADHESIVE_LAYER_CU;
if( masque & ADHESIVE_LAYER_BACK )
newmasque |= ADHESIVE_LAYER_FRONT;
if( masque & ADHESIVE_LAYER_FRONT )
newmasque |= ADHESIVE_LAYER_BACK;
if( masque & SOLDERMASK_LAYER_CU )
newmasque |= SOLDERMASK_LAYER_CMP;
if( masque & SOLDERMASK_LAYER_CMP )
newmasque |= SOLDERMASK_LAYER_CU;
if( masque & SOLDERMASK_LAYER_BACK )
newmasque |= SOLDERMASK_LAYER_FRONT;
if( masque & SOLDERMASK_LAYER_FRONT )
newmasque |= SOLDERMASK_LAYER_BACK;
if( masque & SOLDERPASTE_LAYER_CU )
newmasque |= SOLDERPASTE_LAYER_CMP;
if( masque & SOLDERPASTE_LAYER_CMP )
newmasque |= SOLDERPASTE_LAYER_CU;
if( masque & SOLDERPASTE_LAYER_BACK )
newmasque |= SOLDERPASTE_LAYER_FRONT;
if( masque & SOLDERPASTE_LAYER_FRONT )
newmasque |= SOLDERPASTE_LAYER_BACK;
if( masque & ADHESIVE_LAYER_CU )
newmasque |= ADHESIVE_LAYER_CMP;
if( masque & ADHESIVE_LAYER_CMP )
newmasque |= ADHESIVE_LAYER_CU;
if( masque & ADHESIVE_LAYER_BACK )
newmasque |= ADHESIVE_LAYER_FRONT;
if( masque & ADHESIVE_LAYER_FRONT )
newmasque |= ADHESIVE_LAYER_BACK;
return newmasque;
}

View File

@ -584,35 +584,35 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
{
switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{
case ADHESIVE_LAYER_CU:
case ADHESIVE_LAYER_BACK:
layerInfo = board->GetLayerName( ADHESIVE_N_BACK );
break;
case ADHESIVE_LAYER_CMP:
case ADHESIVE_LAYER_FRONT:
layerInfo = board->GetLayerName( ADHESIVE_N_FRONT );
break;
case SOLDERPASTE_LAYER_CU:
case SOLDERPASTE_LAYER_BACK:
layerInfo = board->GetLayerName( SOLDERPASTE_N_BACK );
break;
case SOLDERPASTE_LAYER_CMP:
case SOLDERPASTE_LAYER_FRONT:
layerInfo = board->GetLayerName( SOLDERPASTE_N_FRONT );
break;
case SILKSCREEN_LAYER_CU:
case SILKSCREEN_LAYER_BACK:
layerInfo = board->GetLayerName( SILKSCREEN_N_BACK );
break;
case SILKSCREEN_LAYER_CMP:
case SILKSCREEN_LAYER_FRONT:
layerInfo = board->GetLayerName( SILKSCREEN_N_FRONT );
break;
case SOLDERMASK_LAYER_CU:
case SOLDERMASK_LAYER_BACK:
layerInfo = board->GetLayerName( SOLDERMASK_N_BACK );
break;
case SOLDERMASK_LAYER_CMP:
case SOLDERMASK_LAYER_FRONT:
layerInfo = board->GetLayerName( SOLDERMASK_N_FRONT );
break;

View File

@ -12,18 +12,18 @@ class Pcb3D_GLCanvas;
*/
// PAD_STANDARD:
#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | \
SOLDERMASK_LAYER_CMP
#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | \
SOLDERMASK_LAYER_FRONT
// PAD_CONN:
#define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_CMP | SOLDERMASK_LAYER_CMP
#define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT
// PAD_SMD:
#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_CMP
#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
//PAD_HOLE_NOT_PLATED:
#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS LAYER_BACK | SILKSCREEN_LAYER_CMP | \
SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP
#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS LAYER_BACK | SILKSCREEN_LAYER_FRONT | \
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
class D_PAD : public BOARD_CONNECTED_ITEM

View File

@ -60,35 +60,35 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
// else use DARKGRAY
switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{
case ADHESIVE_LAYER_CU:
case ADHESIVE_LAYER_BACK:
color = g_DesignSettings.m_LayerColor[ADHESIVE_N_BACK];
break;
case ADHESIVE_LAYER_CMP:
case ADHESIVE_LAYER_FRONT:
color = g_DesignSettings.m_LayerColor[ADHESIVE_N_FRONT];
break;
case SOLDERPASTE_LAYER_CU:
case SOLDERPASTE_LAYER_BACK:
color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_BACK];
break;
case SOLDERPASTE_LAYER_CMP:
case SOLDERPASTE_LAYER_FRONT:
color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_FRONT];
break;
case SILKSCREEN_LAYER_CU:
case SILKSCREEN_LAYER_BACK:
color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_BACK];
break;
case SILKSCREEN_LAYER_CMP:
case SILKSCREEN_LAYER_FRONT:
color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_FRONT];
break;
case SOLDERMASK_LAYER_CU:
case SOLDERMASK_LAYER_BACK:
color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_BACK];
break;
case SOLDERMASK_LAYER_CMP:
case SOLDERMASK_LAYER_FRONT:
color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_FRONT];
break;

View File

@ -31,7 +31,7 @@ static int s_PrintPenMinWidth = 1;
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU;
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{

View File

@ -169,8 +169,8 @@ wxSize DIALOG_LAYERS_SETUP::s_LastSize;
// Layer bit masks for each defined "Preset Layer Grouping"
static const int presets[] =
{
#define FRONT_AUX (SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CMP | ADHESIVE_LAYER_CMP | SOLDERPASTE_LAYER_CMP)
#define BACK_AUX (SILKSCREEN_LAYER_CU | SOLDERMASK_LAYER_CU | ADHESIVE_LAYER_CU | SOLDERPASTE_LAYER_CU)
#define FRONT_AUX (SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT)
#define BACK_AUX (SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK)
0, // shift the array index up by one, matches with "Custom".

View File

@ -384,17 +384,17 @@ void DIALOG_PAD_PROPERTIES::SetPadLayersList( long layer_mask )
m_PadLayerCu->SetValue( ( layer_mask & LAYER_BACK ) );
m_PadLayerCmp->SetValue( ( layer_mask & LAYER_FRONT ) );
m_PadLayerAdhCmp->SetValue( ( layer_mask & ADHESIVE_LAYER_CMP ) );
m_PadLayerAdhCu->SetValue( ( layer_mask & ADHESIVE_LAYER_CU ) );
m_PadLayerAdhCmp->SetValue( ( layer_mask & ADHESIVE_LAYER_FRONT ) );
m_PadLayerAdhCu->SetValue( ( layer_mask & ADHESIVE_LAYER_BACK ) );
m_PadLayerPateCmp->SetValue( ( layer_mask & SOLDERPASTE_LAYER_CMP ) );
m_PadLayerPateCu->SetValue( ( layer_mask & SOLDERPASTE_LAYER_CU ) );
m_PadLayerPateCmp->SetValue( ( layer_mask & SOLDERPASTE_LAYER_FRONT ) );
m_PadLayerPateCu->SetValue( ( layer_mask & SOLDERPASTE_LAYER_BACK ) );
m_PadLayerSilkCmp->SetValue( ( layer_mask & SILKSCREEN_LAYER_CMP ) );
m_PadLayerSilkCu->SetValue( ( layer_mask & SILKSCREEN_LAYER_CU ) );
m_PadLayerSilkCmp->SetValue( ( layer_mask & SILKSCREEN_LAYER_FRONT ) );
m_PadLayerSilkCu->SetValue( ( layer_mask & SILKSCREEN_LAYER_BACK ) );
m_PadLayerMaskCmp->SetValue( ( layer_mask & SOLDERMASK_LAYER_CMP ) );
m_PadLayerMaskCu->SetValue( ( layer_mask & SOLDERMASK_LAYER_CU ) );
m_PadLayerMaskCmp->SetValue( ( layer_mask & SOLDERMASK_LAYER_FRONT ) );
m_PadLayerMaskCu->SetValue( ( layer_mask & SOLDERMASK_LAYER_BACK ) );
m_PadLayerECO1->SetValue( ( layer_mask & ECO1_LAYER ) );
m_PadLayerECO2->SetValue( ( layer_mask & ECO2_LAYER ) );
@ -494,21 +494,21 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
if( ( PadLayerMask & (LAYER_BACK | LAYER_FRONT) ) == (LAYER_BACK | LAYER_FRONT) )
PadLayerMask |= ALL_CU_LAYERS;
if( m_PadLayerAdhCmp->GetValue() )
PadLayerMask |= ADHESIVE_LAYER_CMP;
PadLayerMask |= ADHESIVE_LAYER_FRONT;
if( m_PadLayerAdhCu->GetValue() )
PadLayerMask |= ADHESIVE_LAYER_CU;
PadLayerMask |= ADHESIVE_LAYER_BACK;
if( m_PadLayerPateCmp->GetValue() )
PadLayerMask |= SOLDERPASTE_LAYER_CMP;
PadLayerMask |= SOLDERPASTE_LAYER_FRONT;
if( m_PadLayerPateCu->GetValue() )
PadLayerMask |= SOLDERPASTE_LAYER_CU;
PadLayerMask |= SOLDERPASTE_LAYER_BACK;
if( m_PadLayerSilkCmp->GetValue() )
PadLayerMask |= SILKSCREEN_LAYER_CMP;
PadLayerMask |= SILKSCREEN_LAYER_FRONT;
if( m_PadLayerSilkCu->GetValue() )
PadLayerMask |= SILKSCREEN_LAYER_CU;
PadLayerMask |= SILKSCREEN_LAYER_BACK;
if( m_PadLayerMaskCmp->GetValue() )
PadLayerMask |= SOLDERMASK_LAYER_CMP;
PadLayerMask |= SOLDERMASK_LAYER_FRONT;
if( m_PadLayerMaskCu->GetValue() )
PadLayerMask |= SOLDERMASK_LAYER_CU;
PadLayerMask |= SOLDERMASK_LAYER_BACK;
if( m_PadLayerECO1->GetValue() )
PadLayerMask |= ECO1_LAYER;
if( m_PadLayerECO2->GetValue() )

View File

@ -317,12 +317,12 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
{ // format: Pad [x1 y1 x2 y2 thickness clearance mask "name" "pad_number" flags]
Pad = new D_PAD( this );
Pad->m_PadShape = PAD_RECT;
Pad->m_Masque_Layer = LAYER_FRONT | SOLDERMASK_LAYER_CMP | SOLDERPASTE_LAYER_CMP;
Pad->m_Masque_Layer = LAYER_FRONT | SOLDERMASK_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT;
// Set shape from flags
iflgidx = params.GetCount() - 2;
if( TestFlags( params[iflgidx], 0x0080, wxT( "onsolder" ) ) )
Pad->m_Masque_Layer = LAYER_BACK | SOLDERMASK_LAYER_CU | SOLDERPASTE_LAYER_CU;
Pad->m_Masque_Layer = LAYER_BACK | SOLDERMASK_LAYER_BACK | SOLDERPASTE_LAYER_BACK;
for( unsigned ii = 0; ii < 5; ii++ )
{
@ -367,9 +367,9 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
Pad = new D_PAD( this );
Pad->m_PadShape = PAD_ROUND;
Pad->m_Masque_Layer = ALL_CU_LAYERS |
SILKSCREEN_LAYER_CMP |
SOLDERMASK_LAYER_CMP |
SOLDERMASK_LAYER_CU;
SILKSCREEN_LAYER_FRONT |
SOLDERMASK_LAYER_FRONT |
SOLDERMASK_LAYER_BACK;
iflgidx = params.GetCount() - 2;
if( TestFlags( params[iflgidx], 0x0100, wxT( "square" ) ) )

View File

@ -44,7 +44,7 @@ PCB_Plot_Options::PCB_Plot_Options()
}
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU;
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
static bool s_PlotOriginIsAuxAxis = FALSE;

View File

@ -99,9 +99,9 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
/* Copper pads go on copper silk, component
* pads go on component silk */
&& ( ( (pt_pad->m_Masque_Layer & LAYER_BACK) == 0 )
|| ( (masque_layer & SILKSCREEN_LAYER_CU) == 0 ) )
|| ( (masque_layer & SILKSCREEN_LAYER_BACK) == 0 ) )
&& ( ( (pt_pad->m_Masque_Layer & LAYER_FRONT) == 0 )
|| ( (masque_layer & SILKSCREEN_LAYER_CMP) == 0 ) ) )
|| ( (masque_layer & SILKSCREEN_LAYER_FRONT) == 0 ) ) )
{
if( !g_pcb_plot_options.Plot_Pads_All_Layers )
continue;
@ -854,16 +854,16 @@ void WinEDA_BasePcbFrame::Plot_Standard_Layer( PLOTTER* aPlotter,
pos = shape_pos;
wxSize margin;
switch( aLayerMask &
( SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP |
SOLDERPASTE_LAYER_CU | SOLDERPASTE_LAYER_CMP ) )
( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT |
SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) )
{
case SOLDERMASK_LAYER_CMP:
case SOLDERMASK_LAYER_CU:
case SOLDERMASK_LAYER_FRONT:
case SOLDERMASK_LAYER_BACK:
margin.x = margin.y = pad->GetSolderMaskMargin();
break;
case SOLDERPASTE_LAYER_CMP:
case SOLDERPASTE_LAYER_CU:
case SOLDERPASTE_LAYER_FRONT:
case SOLDERPASTE_LAYER_BACK:
margin = pad->GetSolderPasteMargin();
break;
@ -918,13 +918,13 @@ void WinEDA_BasePcbFrame::Plot_Standard_Layer( PLOTTER* aPlotter,
SEGVIA* Via = (SEGVIA*) track;
// vias are not plotted if not on selected layer, but if layer
// is SOLDERMASK_LAYER_CU or SOLDERMASK_LAYER_CMP,vias are drawn,
// is SOLDERMASK_LAYER_BACK or SOLDERMASK_LAYER_FRONT,vias are drawn,
// if they are on an external copper layer
int via_mask_layer = Via->ReturnMaskLayer();
if( via_mask_layer & LAYER_BACK )
via_mask_layer |= SOLDERMASK_LAYER_CU;
via_mask_layer |= SOLDERMASK_LAYER_BACK;
if( via_mask_layer & LAYER_FRONT )
via_mask_layer |= SOLDERMASK_LAYER_CMP;
via_mask_layer |= SOLDERMASK_LAYER_FRONT;
if( ( via_mask_layer & aLayerMask ) == 0 )
continue;
@ -932,7 +932,7 @@ void WinEDA_BasePcbFrame::Plot_Standard_Layer( PLOTTER* aPlotter,
// If the current layer is a solder mask, use the global mask
// clearance for vias
if( ( aLayerMask & ( SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP ) ) )
if( ( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) )
via_margin = g_DesignSettings.m_SolderMaskMargin;
pos = Via->m_Start;
size.x = size.y = Via->m_Width + 2 * via_margin;

View File

@ -216,9 +216,9 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
PtStruct = Module->m_Drawings;
mlayer = g_TabOneLayerMask[Module->GetLayer()];
if( Module->GetLayer() == LAYER_N_BACK )
mlayer = SILKSCREEN_LAYER_CU;
mlayer = SILKSCREEN_LAYER_BACK;
else if( Module->GetLayer() == LAYER_N_FRONT )
mlayer = SILKSCREEN_LAYER_CMP;
mlayer = SILKSCREEN_LAYER_FRONT;
if( mlayer & masklayer )
{