|
|
@ -12,8 +12,16 @@ |
|
|
|
#include "id.h"
|
|
|
|
|
|
|
|
|
|
|
|
// mostly 1.5 factor, seems to work well.
|
|
|
|
static const int PcbZoomList[] = { 5, 8, 12, 18, 27, 40, 60, 90, 140, 200, 300, 450, 700, 1000, 1500, 2250, 4500, 9000, 20480 }; |
|
|
|
/* Default pcbnew zoom values.
|
|
|
|
* Limited to 18 values to keep a decent size to menus |
|
|
|
* 15 it better but does not allow a sufficient number of values |
|
|
|
* roughtly a 1.5 progression. |
|
|
|
* The last 2 values is handy when somebody uses a library import of a module |
|
|
|
* (or foreign data) which has a bad coordinate |
|
|
|
* Also useful in Gerbview for this reason. |
|
|
|
*/ |
|
|
|
static const int PcbZoomList[] = { 10, 15, 22, 30, 45, 70, 100, 150, 220, 350, 500, 800, 1200, |
|
|
|
2000, 3500, 5000, 10000, 20000 }; |
|
|
|
|
|
|
|
#define PCB_ZOOM_LIST_CNT ( sizeof( PcbZoomList ) / sizeof( int ) )
|
|
|
|
|
|
|
@ -37,10 +45,9 @@ static GRID_TYPE PcbGridList[] = { |
|
|
|
#define PCB_GRID_LIST_CNT ( sizeof( PcbGridList ) / sizeof( GRID_TYPE ) )
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************/ |
|
|
|
/* Class SCREEN: classe de gestion d'un affichage */ |
|
|
|
/***************************************************/ |
|
|
|
/* Constructeur de SCREEN */ |
|
|
|
/*******************************************************************/ |
|
|
|
/* Class PCB_SCREEN: class to handle parametres to display a board */ |
|
|
|
/********************************************************************/ |
|
|
|
PCB_SCREEN::PCB_SCREEN() : BASE_SCREEN( TYPE_SCREEN ) |
|
|
|
{ |
|
|
|
size_t i; |
|
|
@ -51,7 +58,7 @@ PCB_SCREEN::PCB_SCREEN( ) : BASE_SCREEN( TYPE_SCREEN ) |
|
|
|
for( i = 0; i < PCB_GRID_LIST_CNT; i++ ) |
|
|
|
AddGrid( PcbGridList[i] ); |
|
|
|
|
|
|
|
SetGrid( wxSize( 500, 500 ) ); /* pas de la grille en 1/10000 "*/ |
|
|
|
SetGrid( wxSize( 500, 500 ) ); /* Set the working grid size to a reasonnable value (in 1/10000 inch) */ |
|
|
|
Init(); |
|
|
|
} |
|
|
|
|
|
|
@ -62,22 +69,25 @@ PCB_SCREEN::~PCB_SCREEN() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*************************/ |
|
|
|
void PCB_SCREEN::Init() |
|
|
|
/*************************/ |
|
|
|
{ |
|
|
|
InitDatas(); |
|
|
|
m_Active_Layer = COPPER_LAYER_N; /* ref couche active 0.. 31 */ |
|
|
|
m_Route_Layer_TOP = CMP_N; /* ref couches par defaut pour vias (Cu.. Cmp) */ |
|
|
|
m_Active_Layer = COPPER_LAYER_N; /* default active layer = bottom layer */ |
|
|
|
m_Route_Layer_TOP = CMP_N; /* default layers pair for vias (bottom to top) */ |
|
|
|
m_Route_Layer_BOTTOM = COPPER_LAYER_N; |
|
|
|
m_Zoom = 128; /* valeur */ |
|
|
|
m_Zoom = 150; /* a default value for zoom */ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int PCB_SCREEN::GetInternalUnits( void ) |
|
|
|
{ |
|
|
|
return PCB_INTERNAL_UNIT; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Return true if a microvia can be put on board
|
|
|
|
* A microvia ia a small via restricted to 2 near neighbour layers |
|
|
|
* because its is hole is made by laser which can penetrate only one layer |
|
|
|