Commit 703420ba authored by charras's avatar charras

changed layer constants XXX_CU and XXXX_CMP to XXX_BACK and XXX_FRONT

parent bd5018dd
...@@ -147,10 +147,10 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() ...@@ -147,10 +147,10 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
GLfloat zpos_cu = 10 * g_Parm_3D_Visu.m_BoardScale; GLfloat zpos_cu = 10 * g_Parm_3D_Visu.m_BoardScale;
GLfloat zpos_cmp = g_Parm_3D_Visu.m_Epoxy_Width + zpos_cu; GLfloat zpos_cmp = g_Parm_3D_Visu.m_Epoxy_Width + zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[ADHESIVE_N_CU] = -zpos_cu * 2; g_Parm_3D_Visu.m_LayerZcoord[ADHESIVE_N_BACK] = -zpos_cu * 2;
g_Parm_3D_Visu.m_LayerZcoord[ADHESIVE_N_CMP] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[ADHESIVE_N_FRONT] = zpos_cmp + zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[SILKSCREEN_N_CU] = -zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[SILKSCREEN_N_BACK] = -zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[SILKSCREEN_N_CMP] = zpos_cmp; g_Parm_3D_Visu.m_LayerZcoord[SILKSCREEN_N_FRONT] = zpos_cmp;
g_Parm_3D_Visu.m_LayerZcoord[DRAW_N] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[DRAW_N] = zpos_cmp + zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[COMMENT_N] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[COMMENT_N] = zpos_cmp + zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[ECO1_N] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[ECO1_N] = zpos_cmp + zpos_cu;
...@@ -1270,10 +1270,10 @@ static GLfloat Get3DLayerSide( int act_layer ) ...@@ -1270,10 +1270,10 @@ static GLfloat Get3DLayerSide( int act_layer )
nZ = 1.0; nZ = 1.0;
if( ( act_layer <= LAST_COPPER_LAYER - 1 ) if( ( act_layer <= LAST_COPPER_LAYER - 1 )
|| ( act_layer == ADHESIVE_N_CU ) || ( act_layer == ADHESIVE_N_BACK )
|| ( act_layer == SOLDERPASTE_N_CU ) || ( act_layer == SOLDERPASTE_N_BACK )
|| ( act_layer == SILKSCREEN_N_CU ) || ( act_layer == SILKSCREEN_N_BACK )
|| ( act_layer == SOLDERMASK_N_CU ) ) || ( act_layer == SOLDERMASK_N_BACK ) )
nZ = -1.0; nZ = -1.0;
return nZ; return nZ;
} }
......
This diff is collapsed.
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
#define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1) #define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1)
#define FIRST_NO_COPPER_LAYER 16 #define FIRST_NO_COPPER_LAYER 16
#define ADHESIVE_N_CU 16 #define ADHESIVE_N_BACK 16
#define ADHESIVE_N_CMP 17 #define ADHESIVE_N_FRONT 17
#define SOLDERPASTE_N_CU 18 #define SOLDERPASTE_N_BACK 18
#define SOLDERPASTE_N_CMP 19 #define SOLDERPASTE_N_FRONT 19
#define SILKSCREEN_N_CU 20 #define SILKSCREEN_N_BACK 20
#define SILKSCREEN_N_CMP 21 #define SILKSCREEN_N_FRONT 21
#define SOLDERMASK_N_CU 22 #define SOLDERMASK_N_BACK 22
#define SOLDERMASK_N_CMP 23 #define SOLDERMASK_N_FRONT 23
#define DRAW_N 24 #define DRAW_N 24
#define COMMENT_N 25 #define COMMENT_N 25
#define ECO1_N 26 #define ECO1_N 26
...@@ -90,21 +90,21 @@ ...@@ -90,21 +90,21 @@
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 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_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer #define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU) #define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_BACK)
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP) #define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_FRONT)
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU) #define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_BACK)
#define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_CMP) #define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_FRONT)
#define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_CU) #define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_BACK)
#define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_CMP) #define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_FRONT)
#define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_CU) #define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_BACK)
#define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_CMP) #define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_FRONT)
#define DRAW_LAYER (1 << DRAW_N) #define DRAW_LAYER (1 << DRAW_N)
#define COMMENT_LAYER (1 << COMMENT_N) #define COMMENT_LAYER (1 << COMMENT_N)
#define ECO1_LAYER (1 << ECO1_N) #define ECO1_LAYER (1 << ECO1_N)
#define ECO2_LAYER (1 << ECO2_N) #define ECO2_LAYER (1 << ECO2_N)
#define EDGE_LAYER (1 << EDGE_N) #define EDGE_LAYER (1 << EDGE_N)
#define FIRST_NON_COPPER_LAYER ADHESIVE_N_CU #define FIRST_NON_COPPER_LAYER ADHESIVE_N_BACK
#define LAST_NON_COPPER_LAYER EDGE_N #define LAST_NON_COPPER_LAYER EDGE_N
// extra bits 0xE0000000 // extra bits 0xE0000000
......
...@@ -225,14 +225,14 @@ wxString BOARD::GetDefaultLayerName( int aLayerNumber ) ...@@ -225,14 +225,14 @@ wxString BOARD::GetDefaultLayerName( int aLayerNumber )
case LAYER_N_14: txt = _( "Inner14" ); break; case LAYER_N_14: txt = _( "Inner14" ); break;
case LAYER_N_15: txt = _( "Inner15" ); break; case LAYER_N_15: txt = _( "Inner15" ); break;
case LAYER_N_BACK: txt = _( "Back" ); break; case LAYER_N_BACK: txt = _( "Back" ); break;
case ADHESIVE_N_CU: txt = _( "Adhes_Back" ); break; case ADHESIVE_N_BACK: txt = _( "Adhes_Back" ); break;
case ADHESIVE_N_CMP: txt = _( "Adhes_Front" ); break; case ADHESIVE_N_FRONT: txt = _( "Adhes_Front" ); break;
case SOLDERPASTE_N_CU: txt = _( "SoldP_Back" ); break; case SOLDERPASTE_N_BACK: txt = _( "SoldP_Back" ); break;
case SOLDERPASTE_N_CMP: txt = _( "SoldP_Front" ); break; case SOLDERPASTE_N_FRONT: txt = _( "SoldP_Front" ); break;
case SILKSCREEN_N_CU: txt = _( "SilkS_Back" ); break; case SILKSCREEN_N_BACK: txt = _( "SilkS_Back" ); break;
case SILKSCREEN_N_CMP: txt = _( "SilkS_Front" ); break; case SILKSCREEN_N_FRONT: txt = _( "SilkS_Front" ); break;
case SOLDERMASK_N_CU: txt = _( "Mask_Back" ); break; case SOLDERMASK_N_BACK: txt = _( "Mask_Back" ); break;
case SOLDERMASK_N_CMP: txt = _( "Mask_Front" ); break; case SOLDERMASK_N_FRONT: txt = _( "Mask_Front" ); break;
case DRAW_N: txt = _( "Drawings" ); break; case DRAW_N: txt = _( "Drawings" ); break;
case COMMENT_N: txt = _( "Comments" ); break; case COMMENT_N: txt = _( "Comments" ); break;
case ECO1_N: txt = _( "Eco1" ); break; case ECO1_N: txt = _( "Eco1" ); break;
......
...@@ -489,7 +489,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File, ...@@ -489,7 +489,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
// can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed. // can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed.
// @todo: changes use of EDGE_MODULE these footprints and allows only m_Layer >= FIRST_NON_COPPER_LAYER // @todo: changes use of EDGE_MODULE these footprints and allows only m_Layer >= FIRST_NON_COPPER_LAYER
if( (m_Layer < 0) || (m_Layer > LAST_NON_COPPER_LAYER) ) if( (m_Layer < 0) || (m_Layer > LAST_NON_COPPER_LAYER) )
m_Layer = SILKSCREEN_N_CMP; m_Layer = SILKSCREEN_N_FRONT;
return error; return error;
} }
......
...@@ -31,36 +31,36 @@ int ChangeSideNumLayer( int oldlayer ) ...@@ -31,36 +31,36 @@ int ChangeSideNumLayer( int oldlayer )
newlayer = LAYER_N_BACK; newlayer = LAYER_N_BACK;
break; break;
case SILKSCREEN_N_CU: case SILKSCREEN_N_BACK:
newlayer = SILKSCREEN_N_CMP; newlayer = SILKSCREEN_N_FRONT;
break; break;
case SILKSCREEN_N_CMP: case SILKSCREEN_N_FRONT:
newlayer = SILKSCREEN_N_CU; newlayer = SILKSCREEN_N_BACK;
break; break;
case ADHESIVE_N_CU: case ADHESIVE_N_BACK:
newlayer = ADHESIVE_N_CMP; newlayer = ADHESIVE_N_FRONT;
break; break;
case ADHESIVE_N_CMP: case ADHESIVE_N_FRONT:
newlayer = ADHESIVE_N_CU; newlayer = ADHESIVE_N_BACK;
break; break;
case SOLDERMASK_N_CU: case SOLDERMASK_N_BACK:
newlayer = SOLDERMASK_N_CMP; newlayer = SOLDERMASK_N_FRONT;
break; break;
case SOLDERMASK_N_CMP: case SOLDERMASK_N_FRONT:
newlayer = SOLDERMASK_N_CU; newlayer = SOLDERMASK_N_BACK;
break; break;
case SOLDERPASTE_N_CU: case SOLDERPASTE_N_BACK:
newlayer = SOLDERPASTE_N_CMP; newlayer = SOLDERPASTE_N_FRONT;
break; break;
case SOLDERPASTE_N_CMP: case SOLDERPASTE_N_FRONT:
newlayer = SOLDERPASTE_N_CU; newlayer = SOLDERPASTE_N_BACK;
break; break;
default: default:
...@@ -199,13 +199,13 @@ void MODULE::Flip(const wxPoint& aCentre ) ...@@ -199,13 +199,13 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) ); pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == LAYER_N_BACK ) if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU ); pt_texte->SetLayer( SILKSCREEN_N_BACK );
if( GetLayer() == LAYER_N_FRONT ) if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP ); pt_texte->SetLayer( SILKSCREEN_N_FRONT );
if( (GetLayer() == SILKSCREEN_N_CU) if( (GetLayer() == SILKSCREEN_N_BACK)
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == LAYER_N_BACK) ) || (GetLayer() == ADHESIVE_N_BACK) || (GetLayer() == LAYER_N_BACK) )
pt_texte->m_Mirror = true; pt_texte->m_Mirror = true;
/* Mirror value. */ /* Mirror value. */
...@@ -220,13 +220,13 @@ void MODULE::Flip(const wxPoint& aCentre ) ...@@ -220,13 +220,13 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) ); pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == LAYER_N_BACK ) if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU ); pt_texte->SetLayer( SILKSCREEN_N_BACK );
if( GetLayer() == LAYER_N_FRONT ) if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP ); pt_texte->SetLayer( SILKSCREEN_N_FRONT );
if( (GetLayer() == SILKSCREEN_N_CU) if( (GetLayer() == SILKSCREEN_N_BACK)
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == LAYER_N_BACK) ) || (GetLayer() == ADHESIVE_N_BACK) || (GetLayer() == LAYER_N_BACK) )
pt_texte->m_Mirror = true; pt_texte->m_Mirror = true;
/* Reverse mirror footprints. */ /* Reverse mirror footprints. */
...@@ -267,13 +267,13 @@ void MODULE::Flip(const wxPoint& aCentre ) ...@@ -267,13 +267,13 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) ); pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == LAYER_N_BACK ) if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU ); pt_texte->SetLayer( SILKSCREEN_N_BACK );
if( GetLayer() == LAYER_N_FRONT ) if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP ); pt_texte->SetLayer( SILKSCREEN_N_FRONT );
if( GetLayer() == SILKSCREEN_N_CU if( GetLayer() == SILKSCREEN_N_BACK
|| GetLayer() == ADHESIVE_N_CU || GetLayer() == ADHESIVE_N_BACK
|| GetLayer() == LAYER_N_BACK ) || GetLayer() == LAYER_N_BACK )
{ {
pt_texte->m_Mirror = true; pt_texte->m_Mirror = true;
......
...@@ -585,35 +585,35 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame ) ...@@ -585,35 +585,35 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
switch( m_Masque_Layer & ~ALL_CU_LAYERS ) switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{ {
case ADHESIVE_LAYER_CU: case ADHESIVE_LAYER_CU:
layerInfo = board->GetLayerName( ADHESIVE_N_CU ); layerInfo = board->GetLayerName( ADHESIVE_N_BACK );
break; break;
case ADHESIVE_LAYER_CMP: case ADHESIVE_LAYER_CMP:
layerInfo = board->GetLayerName( ADHESIVE_N_CMP ); layerInfo = board->GetLayerName( ADHESIVE_N_FRONT );
break; break;
case SOLDERPASTE_LAYER_CU: case SOLDERPASTE_LAYER_CU:
layerInfo = board->GetLayerName( SOLDERPASTE_N_CU ); layerInfo = board->GetLayerName( SOLDERPASTE_N_BACK );
break; break;
case SOLDERPASTE_LAYER_CMP: case SOLDERPASTE_LAYER_CMP:
layerInfo = board->GetLayerName( SOLDERPASTE_N_CMP ); layerInfo = board->GetLayerName( SOLDERPASTE_N_FRONT );
break; break;
case SILKSCREEN_LAYER_CU: case SILKSCREEN_LAYER_CU:
layerInfo = board->GetLayerName( SILKSCREEN_N_CU ); layerInfo = board->GetLayerName( SILKSCREEN_N_BACK );
break; break;
case SILKSCREEN_LAYER_CMP: case SILKSCREEN_LAYER_CMP:
layerInfo = board->GetLayerName( SILKSCREEN_N_CMP ); layerInfo = board->GetLayerName( SILKSCREEN_N_FRONT );
break; break;
case SOLDERMASK_LAYER_CU: case SOLDERMASK_LAYER_CU:
layerInfo = board->GetLayerName( SOLDERMASK_N_CU ); layerInfo = board->GetLayerName( SOLDERMASK_N_BACK );
break; break;
case SOLDERMASK_LAYER_CMP: case SOLDERMASK_LAYER_CMP:
layerInfo = board->GetLayerName( SOLDERMASK_N_CMP ); layerInfo = board->GetLayerName( SOLDERMASK_N_FRONT );
break; break;
case DRAW_LAYER: case DRAW_LAYER:
......
...@@ -61,35 +61,35 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, ...@@ -61,35 +61,35 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
switch( m_Masque_Layer & ~ALL_CU_LAYERS ) switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{ {
case ADHESIVE_LAYER_CU: case ADHESIVE_LAYER_CU:
color = g_DesignSettings.m_LayerColor[ADHESIVE_N_CU]; color = g_DesignSettings.m_LayerColor[ADHESIVE_N_BACK];
break; break;
case ADHESIVE_LAYER_CMP: case ADHESIVE_LAYER_CMP:
color = g_DesignSettings.m_LayerColor[ADHESIVE_N_CMP]; color = g_DesignSettings.m_LayerColor[ADHESIVE_N_FRONT];
break; break;
case SOLDERPASTE_LAYER_CU: case SOLDERPASTE_LAYER_CU:
color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_CU]; color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_BACK];
break; break;
case SOLDERPASTE_LAYER_CMP: case SOLDERPASTE_LAYER_CMP:
color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_CMP]; color = g_DesignSettings.m_LayerColor[SOLDERPASTE_N_FRONT];
break; break;
case SILKSCREEN_LAYER_CU: case SILKSCREEN_LAYER_CU:
color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_CU]; color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_BACK];
break; break;
case SILKSCREEN_LAYER_CMP: case SILKSCREEN_LAYER_CMP:
color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_CMP]; color = g_DesignSettings.m_LayerColor[SILKSCREEN_N_FRONT];
break; break;
case SOLDERMASK_LAYER_CU: case SOLDERMASK_LAYER_CU:
color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_CU]; color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_BACK];
break; break;
case SOLDERMASK_LAYER_CMP: case SOLDERMASK_LAYER_CMP:
color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_CMP]; color = g_DesignSettings.m_LayerColor[SOLDERMASK_N_FRONT];
break; break;
case DRAW_LAYER: case DRAW_LAYER:
...@@ -180,13 +180,13 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, ...@@ -180,13 +180,13 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
// layer shows the pad size with the mask clearance // layer shows the pad size with the mask clearance
switch( screen->m_Active_Layer ) switch( screen->m_Active_Layer )
{ {
case SOLDERMASK_N_CU: case SOLDERMASK_N_BACK:
case SOLDERMASK_N_CMP: case SOLDERMASK_N_FRONT:
mask_margin.x = mask_margin.y = GetSolderMaskMargin(); mask_margin.x = mask_margin.y = GetSolderMaskMargin();
break; break;
case SOLDERPASTE_N_CU: case SOLDERPASTE_N_BACK:
case SOLDERPASTE_N_CMP: case SOLDERPASTE_N_FRONT:
mask_margin = GetSolderPasteMargin(); mask_margin = GetSolderPasteMargin();
break; break;
......
...@@ -31,7 +31,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) : ...@@ -31,7 +31,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
m_Size.x = m_Size.y = 400; m_Size.x = m_Size.y = 400;
m_Width = 120; /* Set default dimension to a reasonable value. */ m_Width = 120; /* Set default dimension to a reasonable value. */
SetLayer( SILKSCREEN_N_CMP ); SetLayer( SILKSCREEN_N_FRONT );
if( Module && ( Module->Type() == TYPE_MODULE ) ) if( Module && ( Module->Type() == TYPE_MODULE ) )
{ {
m_Pos = Module->m_Pos; m_Pos = Module->m_Pos;
...@@ -39,14 +39,14 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) : ...@@ -39,14 +39,14 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
int moduleLayer = Module->GetLayer(); int moduleLayer = Module->GetLayer();
if( moduleLayer == LAYER_N_BACK ) if( moduleLayer == LAYER_N_BACK )
SetLayer( SILKSCREEN_N_CU ); SetLayer( SILKSCREEN_N_BACK );
else if( moduleLayer == LAYER_N_FRONT ) else if( moduleLayer == LAYER_N_FRONT )
SetLayer( SILKSCREEN_N_CMP ); SetLayer( SILKSCREEN_N_FRONT );
else else
SetLayer( moduleLayer ); SetLayer( moduleLayer );
if( moduleLayer == SILKSCREEN_N_CU if( moduleLayer == SILKSCREEN_N_BACK
|| moduleLayer == ADHESIVE_N_CU || moduleLayer == ADHESIVE_N_BACK
|| moduleLayer == LAYER_N_BACK ) || moduleLayer == LAYER_N_BACK )
{ {
m_Mirror = true; m_Mirror = true;
...@@ -106,7 +106,7 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) ...@@ -106,7 +106,7 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum )
int layer; int layer;
char BufCar1[128], BufCar2[128], BufCar3[128], BufLine[256]; char BufCar1[128], BufCar2[128], BufCar3[128], BufLine[256];
layer = SILKSCREEN_N_CMP; layer = SILKSCREEN_N_FRONT;
BufCar1[0] = 0; BufCar1[0] = 0;
BufCar2[0] = 0; BufCar2[0] = 0;
BufCar3[0] = 0; BufCar3[0] = 0;
...@@ -145,9 +145,9 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) ...@@ -145,9 +145,9 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum )
if( layer > LAST_NO_COPPER_LAYER ) if( layer > LAST_NO_COPPER_LAYER )
layer = LAST_NO_COPPER_LAYER; layer = LAST_NO_COPPER_LAYER;
if( layer == LAYER_N_BACK ) if( layer == LAYER_N_BACK )
layer = SILKSCREEN_N_CU; layer = SILKSCREEN_N_BACK;
else if( layer == LAYER_N_FRONT ) else if( layer == LAYER_N_FRONT )
layer = SILKSCREEN_N_CMP; layer = SILKSCREEN_N_FRONT;
SetLayer( layer ); SetLayer( layer );
...@@ -501,12 +501,12 @@ bool TEXTE_MODULE::IsOnLayer( int aLayer ) const ...@@ -501,12 +501,12 @@ bool TEXTE_MODULE::IsOnLayer( int aLayer ) const
if( aLayer == LAYER_N_BACK ) if( aLayer == LAYER_N_BACK )
{ {
if( m_Layer==ADHESIVE_N_CU || m_Layer==SILKSCREEN_N_CU ) if( m_Layer==ADHESIVE_N_BACK || m_Layer==SILKSCREEN_N_BACK )
return true; return true;
} }
else if( aLayer == LAYER_N_FRONT ) else if( aLayer == LAYER_N_FRONT )
{ {
if( m_Layer==ADHESIVE_N_CMP || m_Layer==SILKSCREEN_N_CMP ) if( m_Layer==ADHESIVE_N_FRONT || m_Layer==SILKSCREEN_N_FRONT )
return true; return true;
} }
......
...@@ -201,10 +201,10 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( int aLayerNumber ) ...@@ -201,10 +201,10 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( int aLayerNumber )
switch( aLayerNumber ) switch( aLayerNumber )
{ {
case ADHESIVE_N_CMP: RETAUX( m_AdhesFront ); case ADHESIVE_N_FRONT: RETAUX( m_AdhesFront );
case SOLDERPASTE_N_CMP: RETAUX( m_SoldPFront ); case SOLDERPASTE_N_FRONT: RETAUX( m_SoldPFront );
case SILKSCREEN_N_CMP: RETAUX( m_SilkSFront ); case SILKSCREEN_N_FRONT: RETAUX( m_SilkSFront );
case SOLDERMASK_N_CMP: RETAUX( m_MaskFront ); case SOLDERMASK_N_FRONT: RETAUX( m_MaskFront );
case LAYER_N_FRONT: RETCOP( m_Front ); case LAYER_N_FRONT: RETCOP( m_Front );
case LAYER_N_2: RETCOP( m_Inner2 ); case LAYER_N_2: RETCOP( m_Inner2 );
case LAYER_N_3: RETCOP( m_Inner3 ); case LAYER_N_3: RETCOP( m_Inner3 );
...@@ -221,10 +221,10 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( int aLayerNumber ) ...@@ -221,10 +221,10 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( int aLayerNumber )
case LAYER_N_14: RETCOP( m_Inner14 ); case LAYER_N_14: RETCOP( m_Inner14 );
case LAYER_N_15: RETCOP( m_Inner15 ); case LAYER_N_15: RETCOP( m_Inner15 );
case LAYER_N_BACK: RETCOP( m_Back ); case LAYER_N_BACK: RETCOP( m_Back );
case SOLDERMASK_N_CU: RETAUX( m_MaskBack ); case SOLDERMASK_N_BACK: RETAUX( m_MaskBack );
case SILKSCREEN_N_CU: RETAUX( m_SilkSBack ); case SILKSCREEN_N_BACK: RETAUX( m_SilkSBack );
case SOLDERPASTE_N_CU: RETAUX( m_SoldPBack ); case SOLDERPASTE_N_BACK: RETAUX( m_SoldPBack );
case ADHESIVE_N_CU: RETAUX( m_AdhesBack ); case ADHESIVE_N_BACK: RETAUX( m_AdhesBack );
case EDGE_N: RETAUX( m_PCBEdges ); case EDGE_N: RETAUX( m_PCBEdges );
case ECO2_N: RETAUX( m_Eco2 ); case ECO2_N: RETAUX( m_Eco2 );
case ECO1_N: RETAUX( m_Eco1 ); case ECO1_N: RETAUX( m_Eco1 );
......
...@@ -158,7 +158,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge ) ...@@ -158,7 +158,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge )
void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge ) void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
{ {
MODULE* Module = GetBoard()->m_Modules; MODULE* Module = GetBoard()->m_Modules;
int new_layer = SILKSCREEN_N_CMP; int new_layer = SILKSCREEN_N_FRONT;
if( Edge != NULL ) if( Edge != NULL )
new_layer = Edge->GetLayer(); new_layer = Edge->GetLayer();
...@@ -331,9 +331,9 @@ EDGE_MODULE* WinEDA_ModuleEditFrame::Begin_Edge_Module( EDGE_MODULE* Edge, ...@@ -331,9 +331,9 @@ EDGE_MODULE* WinEDA_ModuleEditFrame::Begin_Edge_Module( EDGE_MODULE* Edge,
Edge->SetLayer( module->GetLayer() ); Edge->SetLayer( module->GetLayer() );
if( module->GetLayer() == LAYER_N_FRONT ) if( module->GetLayer() == LAYER_N_FRONT )
Edge->SetLayer( SILKSCREEN_N_CMP ); Edge->SetLayer( SILKSCREEN_N_FRONT );
if( module->GetLayer() == LAYER_N_BACK ) if( module->GetLayer() == LAYER_N_BACK )
Edge->SetLayer( SILKSCREEN_N_CU ); Edge->SetLayer( SILKSCREEN_N_BACK );
/* Initialise the starting point of the new segment or arc */ /* Initialise the starting point of the new segment or arc */
Edge->m_Start = GetScreen()->m_Curseur; Edge->m_Start = GetScreen()->m_Curseur;
......
...@@ -440,7 +440,7 @@ void CreateComponentsSection( FILE* file, BOARD* pcb ) ...@@ -440,7 +440,7 @@ void CreateComponentsSection( FILE* file, BOARD* pcb )
for( ii = 0; ii < 2; ii++ ) for( ii = 0; ii < 2; ii++ )
{ {
int orient = PtTexte->m_Orient; int orient = PtTexte->m_Orient;
wxString layer = GenCAD_Layer_Name[SILKSCREEN_N_CMP]; wxString layer = GenCAD_Layer_Name[SILKSCREEN_N_FRONT];
fprintf( file, "TEXT %d %d %d %d.%d %s %s \"%s\"", fprintf( file, "TEXT %d %d %d %d.%d %s %s \"%s\"",
PtTexte->m_Pos0.x, -PtTexte->m_Pos0.y, PtTexte->m_Pos0.x, -PtTexte->m_Pos0.y,
PtTexte->m_Size.x, PtTexte->m_Size.x,
......
...@@ -247,7 +247,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) ...@@ -247,7 +247,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
if( params[0].CmpNoCase( wxT( "ElementLine" ) ) == 0 ) // line descr if( params[0].CmpNoCase( wxT( "ElementLine" ) ) == 0 ) // line descr
{ // Format: ElementLine [X1 Y1 X2 Y2 Thickness] { // Format: ElementLine [X1 Y1 X2 Y2 Thickness]
DrawSegm = new EDGE_MODULE( this ); DrawSegm = new EDGE_MODULE( this );
DrawSegm->SetLayer( SILKSCREEN_N_CMP ); DrawSegm->SetLayer( SILKSCREEN_N_FRONT );
DrawSegm->m_Shape = S_SEGMENT; DrawSegm->m_Shape = S_SEGMENT;
m_Drawings.PushBack( DrawSegm ); m_Drawings.PushBack( DrawSegm );
...@@ -276,7 +276,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) ...@@ -276,7 +276,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
{ // format: ElementArc [X Y Width Height StartAngle DeltaAngle Thickness] { // format: ElementArc [X Y Width Height StartAngle DeltaAngle Thickness]
// pcbnew does know ellipse so we must have Width = Height // pcbnew does know ellipse so we must have Width = Height
DrawSegm = new EDGE_MODULE( this ); DrawSegm = new EDGE_MODULE( this );
DrawSegm->SetLayer( SILKSCREEN_N_CMP ); DrawSegm->SetLayer( SILKSCREEN_N_FRONT );
DrawSegm->m_Shape = S_ARC; DrawSegm->m_Shape = S_ARC;
m_Drawings.PushBack( DrawSegm ); m_Drawings.PushBack( DrawSegm );
......
...@@ -240,10 +240,10 @@ MODULE* Locate_Prefered_Module( BOARD* Pcb, int typeloc ) ...@@ -240,10 +240,10 @@ MODULE* Locate_Prefered_Module( BOARD* Pcb, int typeloc )
*/ */
layer = pt_module->GetLayer(); layer = pt_module->GetLayer();
if( layer==ADHESIVE_N_CU || layer==SILKSCREEN_N_CU ) if( layer==ADHESIVE_N_BACK || layer==SILKSCREEN_N_BACK )
layer = LAYER_N_BACK; layer = LAYER_N_BACK;
else if( layer==ADHESIVE_N_CMP || layer==SILKSCREEN_N_CMP ) else if( layer==ADHESIVE_N_FRONT || layer==SILKSCREEN_N_FRONT )
layer = LAYER_N_FRONT; layer = LAYER_N_FRONT;
/* Test of minimum size to choosing the best candidate. */ /* Test of minimum size to choosing the best candidate. */
......
...@@ -757,14 +757,14 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, ...@@ -757,14 +757,14 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
} }
break; break;
case SOLDERMASK_N_CU: case SOLDERMASK_N_BACK:
case SOLDERMASK_N_CMP: case SOLDERMASK_N_FRONT:
Plot_Standard_Layer( plotter, layer_mask, Plot_Standard_Layer( plotter, layer_mask,
g_pcb_plot_options.DrawViaOnMaskLayer, trace_mode ); g_pcb_plot_options.DrawViaOnMaskLayer, trace_mode );
break; break;
case SOLDERPASTE_N_CU: case SOLDERPASTE_N_BACK:
case SOLDERPASTE_N_CMP: case SOLDERPASTE_N_FRONT:
Plot_Standard_Layer( plotter, layer_mask, false, trace_mode ); Plot_Standard_Layer( plotter, layer_mask, false, trace_mode );
break; break;
......
...@@ -241,6 +241,7 @@ void WinEDA_SetColorsFrame::CreateControls() ...@@ -241,6 +241,7 @@ void WinEDA_SetColorsFrame::CreateControls()
{ {
case type_layer: case type_layer:
CheckBox->SetValue( g_DesignSettings.IsLayerVisible( laytool_list[lyr]->m_LayerNumber )); CheckBox->SetValue( g_DesignSettings.IsLayerVisible( laytool_list[lyr]->m_LayerNumber ));
CheckBox->Enable(g_DesignSettings.IsLayerEnabled( laytool_list[lyr]->m_LayerNumber ) );
break; break;
case type_via: case type_via:
...@@ -379,24 +380,6 @@ bool WinEDA_SetColorsFrame::ShowToolTips() ...@@ -379,24 +380,6 @@ bool WinEDA_SetColorsFrame::ShowToolTips()
} }
/**********************************************************/
wxBitmap WinEDA_SetColorsFrame::GetBitmapResource( const wxString& name )
/**********************************************************/
{
wxUnusedVar(name);
return wxNullBitmap;
}
/**********************************************************/
wxIcon WinEDA_SetColorsFrame::GetIconResource( const wxString& name )
/**********************************************************/
{
wxUnusedVar(name);
return wxNullIcon;
}
/**********************************************************************/ /**********************************************************************/
void WinEDA_SetColorsFrame::OnOkClick( wxCommandEvent& WXUNUSED (event) ) void WinEDA_SetColorsFrame::OnOkClick( wxCommandEvent& WXUNUSED (event) )
/**********************************************************************/ /**********************************************************************/
...@@ -508,6 +491,8 @@ void WinEDA_SetColorsFrame::ResetDisplayLayersCu( wxCommandEvent& event ) ...@@ -508,6 +491,8 @@ void WinEDA_SetColorsFrame::ResetDisplayLayersCu( wxCommandEvent& event )
for( int lyr = 0; lyr < 16; lyr++ ) for( int lyr = 0; lyr < 16; lyr++ )
{ {
if( ! laytool_list[lyr]->m_CheckBox->IsEnabled() )
continue;
laytool_list[lyr]->m_CheckBox->SetValue( NewState ); laytool_list[lyr]->m_CheckBox->SetValue( NewState );
} }
} }
...@@ -229,64 +229,64 @@ static ColorButton Layer_17_Butt = ...@@ -229,64 +229,64 @@ static ColorButton Layer_17_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
ADHESIVE_N_CU, // Layer ADHESIVE_N_BACK, // Layer
ADR( ADHESIVE_N_CU ) // Address of optional parameter ADR( ADHESIVE_N_BACK ) // Address of optional parameter
}; };
static ColorButton Layer_18_Butt = static ColorButton Layer_18_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
ADHESIVE_N_CMP, // Layer ADHESIVE_N_FRONT, // Layer
ADR( ADHESIVE_N_CMP ) // Address of optional parameter ADR( ADHESIVE_N_FRONT ) // Address of optional parameter
}; };
static ColorButton Layer_19_Butt = static ColorButton Layer_19_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SOLDERPASTE_N_CU, // Layer SOLDERPASTE_N_BACK, // Layer
ADR( SOLDERPASTE_N_CU ) // Address of optional parameter ADR( SOLDERPASTE_N_BACK ) // Address of optional parameter
}; };
static ColorButton Layer_20_Butt = static ColorButton Layer_20_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SOLDERPASTE_N_CMP, // Layer SOLDERPASTE_N_FRONT, // Layer
ADR( SOLDERPASTE_N_CMP ), // Address of optional parameter ADR( SOLDERPASTE_N_FRONT ), // Address of optional parameter
}; };
static ColorButton Layer_21_Butt = static ColorButton Layer_21_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SILKSCREEN_N_CU, // Layer SILKSCREEN_N_BACK, // Layer
ADR( SILKSCREEN_N_CU ) // Address of optional parameter ADR( SILKSCREEN_N_BACK ) // Address of optional parameter
}; };
static ColorButton Layer_22_Butt = static ColorButton Layer_22_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SILKSCREEN_N_CMP, // Layer SILKSCREEN_N_FRONT, // Layer
ADR( SILKSCREEN_N_CMP ) // Address of optional parameter ADR( SILKSCREEN_N_FRONT ) // Address of optional parameter
}; };
static ColorButton Layer_23_Butt = static ColorButton Layer_23_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SOLDERMASK_N_CU, // Layer SOLDERMASK_N_BACK, // Layer
ADR( SOLDERMASK_N_CU ) // Address of optional parameter ADR( SOLDERMASK_N_BACK ) // Address of optional parameter
}; };
static ColorButton Layer_24_Butt = static ColorButton Layer_24_Butt =
{ {
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString, wxEmptyString,
SOLDERMASK_N_CMP, // Layer SOLDERMASK_N_FRONT, // Layer
ADR( SOLDERMASK_N_CMP ) // Address of optional parameter ADR( SOLDERMASK_N_FRONT ) // Address of optional parameter
}; };
static ColorButton Layer_25_Butt = static ColorButton Layer_25_Butt =
......
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