changes in file organisation and classes to prepare zone redesign
This commit is contained in:
parent
aaa0acf707
commit
bffa0689f0
|
@ -4,6 +4,13 @@ Started 2007-June-11
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
2007-Dec-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
|
================================================================================
|
||||||
|
+pcbnew:
|
||||||
|
changes in file organisation and classes to prepare zone redesign. No real new code.
|
||||||
|
class zone functions and definitions moved in class_zone.h and .cpp
|
||||||
|
|
||||||
|
|
||||||
2007-Dec-07 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
2007-Dec-07 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
================================================================================
|
================================================================================
|
||||||
+pcbnew
|
+pcbnew
|
||||||
|
|
|
@ -18,6 +18,7 @@ OBJECTS= \
|
||||||
onrightclick.o\
|
onrightclick.o\
|
||||||
class_board.o\
|
class_board.o\
|
||||||
class_track.o \
|
class_track.o \
|
||||||
|
class_drc_item.o \
|
||||||
drawframe.o\
|
drawframe.o\
|
||||||
drawpanel.o\
|
drawpanel.o\
|
||||||
set_color.o \
|
set_color.o \
|
||||||
|
@ -68,6 +69,9 @@ files.o: files.cpp $(COMMON)
|
||||||
class_marker.o: ../pcbnew/class_marker.cpp ../pcbnew/class_marker.h $(COMMON)
|
class_marker.o: ../pcbnew/class_marker.cpp ../pcbnew/class_marker.h $(COMMON)
|
||||||
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
||||||
|
|
||||||
|
class_drc_item.o: ../pcbnew/class_drc_item.cpp $(COMMON)
|
||||||
|
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
||||||
|
|
||||||
sel_layer.o: ../pcbnew/sel_layer.cpp $(COMMON)
|
sel_layer.o: ../pcbnew/sel_layer.cpp $(COMMON)
|
||||||
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ enum KICAD_T {
|
||||||
TYPESCREEN,
|
TYPESCREEN,
|
||||||
TYPEBLOCK,
|
TYPEBLOCK,
|
||||||
TYPEEDGEZONE,
|
TYPEEDGEZONE,
|
||||||
|
TYPEZONE_POLYEDGE,
|
||||||
|
TYPEZONE_CONTAINER,
|
||||||
|
|
||||||
// Draw Items in schematic
|
// Draw Items in schematic
|
||||||
DRAW_POLYLINE_STRUCT_TYPE,
|
DRAW_POLYLINE_STRUCT_TYPE,
|
||||||
|
|
|
@ -47,132 +47,132 @@ extern const SH_CODE *graphic_fonte_shape[256];
|
||||||
|
|
||||||
#ifdef EDA_DRAWBASE
|
#ifdef EDA_DRAWBASE
|
||||||
|
|
||||||
#define U (SH_CODE)'U'
|
#define Up (SH_CODE)'U'
|
||||||
#define X (SH_CODE)'X'
|
#define X (SH_CODE)'X'
|
||||||
#define D (SH_CODE)'D'
|
#define Dn (SH_CODE)'D'
|
||||||
|
|
||||||
const SH_CODE noshape[] = {X}; //code non inscriptible
|
const SH_CODE noshape[] = {X}; //code non inscriptible
|
||||||
const SH_CODE char_shape_space[] = {U,X}; /* space */
|
const SH_CODE char_shape_space[] = {Up,X}; /* space */
|
||||||
const SH_CODE char_shape_ipoint[] = {U,0,4,D,1,4,U,4,4,D,9,4,U,X}; /*!*/
|
const SH_CODE char_shape_ipoint[] = {Up,0,4,Dn,1,4,Up,4,4,Dn,9,4,Up,X}; /*!*/
|
||||||
const SH_CODE char_shape_openacc[] = {U,8,3,D,9,4,U,8,5,D,9,6,U,X}; /*{*/
|
const SH_CODE char_shape_openacc[] = {Up,8,3,Dn,9,4,Up,8,5,Dn,9,6,Up,X}; /*{*/
|
||||||
const SH_CODE char_shape_dieze[] = {U,3,1,D,3,7,U,5,2,D,5,8,U,1,3,D,7,4,U,1,5,D,7,6,U,X}; /*#*/
|
const SH_CODE char_shape_dieze[] = {Up,3,1,Dn,3,7,Up,5,2,Dn,5,8,Up,1,3,Dn,7,4,Up,1,5,Dn,7,6,Up,X}; /*#*/
|
||||||
const SH_CODE char_shape_dollar[] = {U,0,4,D,9,4,U,0,5,D,9,5,U,0,2,D,0,7,1,8,3,8,4,7,4,2,5,1,7,1,8,2,8,7,U,X}; /*$*/
|
const SH_CODE char_shape_dollar[] = {Up,0,4,Dn,9,4,Up,0,5,Dn,9,5,Up,0,2,Dn,0,7,1,8,3,8,4,7,4,2,5,1,7,1,8,2,8,7,Up,X}; /*$*/
|
||||||
const SH_CODE char_shape_percent[] = {U,0,1,D,9,8,U,9,1,D,7,1,7,3,9,3,9,1,U,0,6,D,0,8,2,8,2,6,0,6,U,X}; /*%*/
|
const SH_CODE char_shape_percent[] = {Up,0,1,Dn,9,8,Up,9,1,Dn,7,1,7,3,9,3,9,1,Up,0,6,Dn,0,8,2,8,2,6,0,6,Up,X}; /*%*/
|
||||||
const SH_CODE char_shape_and[] = {U,0,7,D,7,2,8,2,9,4,8,6,7,6,2,1,1,1,0,3,0,4,1,6,2,7,U,X}; /*&*/
|
const SH_CODE char_shape_and[] = {Up,0,7,Dn,7,2,8,2,9,4,8,6,7,6,2,1,1,1,0,3,0,4,1,6,2,7,Up,X}; /*&*/
|
||||||
const SH_CODE char_shape_el[] = {U,9,4,D,7,3,U,X}; /*'*/
|
const SH_CODE char_shape_el[] = {Up,9,4,Dn,7,3,Up,X}; /*'*/
|
||||||
const SH_CODE char_shape_openpar[] = {U,0,4,D,2,3,7,3,9,4,U,X}; /*(*/
|
const SH_CODE char_shape_openpar[] = {Up,0,4,Dn,2,3,7,3,9,4,Up,X}; /*(*/
|
||||||
const SH_CODE char_shape_closepar[] = {U,0,4,D,2,5,7,5,9,4,U,X}; /*)*/
|
const SH_CODE char_shape_closepar[] = {Up,0,4,Dn,2,5,7,5,9,4,Up,X}; /*)*/
|
||||||
const SH_CODE char_shape_star[] = {U,1,4,D,7,4,U,4,1,D,4,7,U,2,2,D,6,6,U,6,2,D,2,6,U,X}; /***/
|
const SH_CODE char_shape_star[] = {Up,1,4,Dn,7,4,Up,4,1,Dn,4,7,Up,2,2,Dn,6,6,Up,6,2,Dn,2,6,Up,X}; /***/
|
||||||
const SH_CODE char_shape_plus[] = {U,4,1,D,4,7,U,1,4,D,7,4,U,X}; /*+*/
|
const SH_CODE char_shape_plus[] = {Up,4,1,Dn,4,7,Up,1,4,Dn,7,4,Up,X}; /*+*/
|
||||||
const SH_CODE char_shape_comma[] = {U,1,4,D,0,4,-3,3,U,X}; /*,*/
|
const SH_CODE char_shape_comma[] = {Up,1,4,Dn,0,4,-3,3,Up,X}; /*,*/
|
||||||
const SH_CODE char_shape_minus[] = {U,4,2,D,4,7,U,X}; /*-*/
|
const SH_CODE char_shape_minus[] = {Up,4,2,Dn,4,7,Up,X}; /*-*/
|
||||||
const SH_CODE char_shape_point[] = {U,0,4,D,1,4,U,X}; /*.*/
|
const SH_CODE char_shape_point[] = {Up,0,4,Dn,1,4,Up,X}; /*.*/
|
||||||
const SH_CODE char_shape_slash[] = {U,0,2,D,9,6,U,X}; /* / */
|
const SH_CODE char_shape_slash[] = {Up,0,2,Dn,9,6,Up,X}; /* / */
|
||||||
|
|
||||||
const SH_CODE char_shape_0[] = {U,0,1,D,9,8,U,1,1,D,8,1,9,2,9,7,8,8,1,8,0,7,0,2,1,1,U,X}; /*0*/
|
const SH_CODE char_shape_0[] = {Up,0,1,Dn,9,8,Up,1,1,Dn,8,1,9,2,9,7,8,8,1,8,0,7,0,2,1,1,Up,X}; /*0*/
|
||||||
const SH_CODE char_shape_1[] = {U,0,3,D,0,7,U,0,5,D,9,5,U,8,5,D,6,3,U,X}; /*1*/
|
const SH_CODE char_shape_1[] = {Up,0,3,Dn,0,7,Up,0,5,Dn,9,5,Up,8,5,Dn,6,3,Up,X}; /*1*/
|
||||||
const SH_CODE char_shape_2[] = {U,0,8,D,0,1,3,1,4,2,4,7,5,8,8,8,9,7,9,2,8,1,U,X}; /*2*/
|
const SH_CODE char_shape_2[] = {Up,0,8,Dn,0,1,3,1,4,2,4,7,5,8,8,8,9,7,9,2,8,1,Up,X}; /*2*/
|
||||||
const SH_CODE char_shape_3[] = {U,9,1,D,9,8,8,8,5,4,5,7,4,8,1,8,0,7,0,2,1,1,U,X}; /*3*/
|
const SH_CODE char_shape_3[] = {Up,9,1,Dn,9,8,8,8,5,4,5,7,4,8,1,8,0,7,0,2,1,1,Up,X}; /*3*/
|
||||||
const SH_CODE char_shape_4[] = {U,0,6,D,9,6,2,1,2,8,U,X}; /*4*/
|
const SH_CODE char_shape_4[] = {Up,0,6,Dn,9,6,2,1,2,8,Up,X}; /*4*/
|
||||||
const SH_CODE char_shape_5[] = {U,2,1,D,1,1,0,2,0,7,1,8,4,8,6,6,6,1,9,1,9,8,U,X}; /*5*/
|
const SH_CODE char_shape_5[] = {Up,2,1,Dn,1,1,0,2,0,7,1,8,4,8,6,6,6,1,9,1,9,8,Up,X}; /*5*/
|
||||||
const SH_CODE char_shape_6[] = {U,8,8,D,9,7,9,2,8,1,1,1,0,2,0,7,1,8,4,8,5,7,5,2,4,1,U,X}; /*6*/
|
const SH_CODE char_shape_6[] = {Up,8,8,Dn,9,7,9,2,8,1,1,1,0,2,0,7,1,8,4,8,5,7,5,2,4,1,Up,X}; /*6*/
|
||||||
const SH_CODE char_shape_7[] = {U,9,1,D,9,8,0,1,U,X}; /*7*/
|
const SH_CODE char_shape_7[] = {Up,9,1,Dn,9,8,0,1,Up,X}; /*7*/
|
||||||
const SH_CODE char_shape_8[] = {U,0,2,D,1,1,4,1,5,2,5,7,6,8,8,8,9,7,9,2,8,1,6,1,5,2,U,5,7,D,4,8,1,8,0,7,0,2,U,X}; /*8*/
|
const SH_CODE char_shape_8[] = {Up,0,2,Dn,1,1,4,1,5,2,5,7,6,8,8,8,9,7,9,2,8,1,6,1,5,2,Up,5,7,Dn,4,8,1,8,0,7,0,2,Up,X}; /*8*/
|
||||||
const SH_CODE char_shape_9[] = {U,0,2,D,0,7,1,8,8,8,9,7,9,2,8,1,5,1,4,2,4,7,5,8,U,X}; /*9*/
|
const SH_CODE char_shape_9[] = {Up,0,2,Dn,0,7,1,8,8,8,9,7,9,2,8,1,5,1,4,2,4,7,5,8,Up,X}; /*9*/
|
||||||
|
|
||||||
const SH_CODE char_shape_dbpoint[] = {U,6,4,D,5,4,U,3,4,D,2,4,U,X}; /*:*/
|
const SH_CODE char_shape_dbpoint[] = {Up,6,4,Dn,5,4,Up,3,4,Dn,2,4,Up,X}; /*:*/
|
||||||
const SH_CODE char_shape_vpoint[] = {U,5,4,D,4,4,U,2,4,D,1,4,-2,3,U,X}; /*;*/
|
const SH_CODE char_shape_vpoint[] = {Up,5,4,Dn,4,4,Up,2,4,Dn,1,4,-2,3,Up,X}; /*;*/
|
||||||
const SH_CODE char_shape_less[] = {U,0,7,D,4,2,9,7,U,X}; /*<*/
|
const SH_CODE char_shape_less[] = {Up,0,7,Dn,4,2,9,7,Up,X}; /*<*/
|
||||||
const SH_CODE char_shape_egal[] = {U,2,2,D,2,7,U,5,2,D,5,7,U,X}; /*=*/
|
const SH_CODE char_shape_egal[] = {Up,2,2,Dn,2,7,Up,5,2,Dn,5,7,Up,X}; /*=*/
|
||||||
const SH_CODE char_shape_more[] = {U,0,2,D,4,7,9,2,U,X}; /*>*/
|
const SH_CODE char_shape_more[] = {Up,0,2,Dn,4,7,9,2,Up,X}; /*>*/
|
||||||
const SH_CODE char_shape_intpoint[] = {U,0,4,D,1,4,U,3,4,D,4,4,5,6,6,7,8,7,9,6,9,2,8,1,U,X}; /*?*/
|
const SH_CODE char_shape_intpoint[] = {Up,0,4,Dn,1,4,Up,3,4,Dn,4,4,5,6,6,7,8,7,9,6,9,2,8,1,Up,X}; /*?*/
|
||||||
const SH_CODE char_shape_arond[] = {U,0,8,D,0,3,2,1,6,1,8,3,8,6,6,8,3,8,3,5,4,4,5,5,5,8,U,X}; /*@*/
|
const SH_CODE char_shape_arond[] = {Up,0,8,Dn,0,3,2,1,6,1,8,3,8,6,6,8,3,8,3,5,4,4,5,5,5,8,Up,X}; /*@*/
|
||||||
|
|
||||||
const SH_CODE char_shape_A[] = {U,0,1,D,7,1,9,3,9,6,7,8,0,8,U,5,1,D,5,8,U,X}; /*A*/
|
const SH_CODE char_shape_A[] = {Up,0,1,Dn,7,1,9,3,9,6,7,8,0,8,Up,5,1,Dn,5,8,Up,X}; /*A*/
|
||||||
const SH_CODE char_shape_B[] = {U,0,1,D,9,1,9,7,8,8,6,8,5,7,5,1,U,5,7,D,3,8,1,8,0,7,0,1,U,X}; /*B*/
|
const SH_CODE char_shape_B[] = {Up,0,1,Dn,9,1,9,7,8,8,6,8,5,7,5,1,Up,5,7,Dn,3,8,1,8,0,7,0,1,Up,X}; /*B*/
|
||||||
const SH_CODE char_shape_C[] = {U,1,8,D,0,7,0,2,1,1,8,1,9,2,9,7,8,8,U,X}; /*C*/
|
const SH_CODE char_shape_C[] = {Up,1,8,Dn,0,7,0,2,1,1,8,1,9,2,9,7,8,8,Up,X}; /*C*/
|
||||||
const SH_CODE char_shape_D[] = {U,0,2,D,9,2,U,9,1,D,9,7,8,8,1,8,0,7,0,1,U,X}; /*D*/
|
const SH_CODE char_shape_D[] = {Up,0,2,Dn,9,2,Up,9,1,Dn,9,7,8,8,1,8,0,7,0,1,Up,X}; /*D*/
|
||||||
const SH_CODE char_shape_E[] = {U,0,8,D,0,1,9,1,9,8,U,5,1,D,5,5,U,X}; /*E*/
|
const SH_CODE char_shape_E[] = {Up,0,8,Dn,0,1,9,1,9,8,Up,5,1,Dn,5,5,Up,X}; /*E*/
|
||||||
const SH_CODE char_shape_F[] = {U,0,1,D,9,1,9,8,U,5,1,D,5,5,U,X}; /*F*/
|
const SH_CODE char_shape_F[] = {Up,0,1,Dn,9,1,9,8,Up,5,1,Dn,5,5,Up,X}; /*F*/
|
||||||
const SH_CODE char_shape_G[] = {U,8,7,D,9,7,9,2,8,1,1,1,0,2,0,7,1,8,4,8,4,5,U,X}; /*G*/
|
const SH_CODE char_shape_G[] = {Up,8,7,Dn,9,7,9,2,8,1,1,1,0,2,0,7,1,8,4,8,4,5,Up,X}; /*G*/
|
||||||
const SH_CODE char_shape_H[] = {U,0,1,D,9,1,U,0,8,D,9,8,U,4,1,D,4,8,U,X}; /*H*/
|
const SH_CODE char_shape_H[] = {Up,0,1,Dn,9,1,Up,0,8,Dn,9,8,Up,4,1,Dn,4,8,Up,X}; /*H*/
|
||||||
const SH_CODE char_shape_I[] = {U,0,2,D,0,6,U,0,4,D,9,4,U,9,2,D,9,6,U,X}; /*I*/
|
const SH_CODE char_shape_I[] = {Up,0,2,Dn,0,6,Up,0,4,Dn,9,4,Up,9,2,Dn,9,6,Up,X}; /*I*/
|
||||||
const SH_CODE char_shape_J[] = {U,2,1,D,0,2,0,4,1,5,9,5,U,9,3,D,9,7,U,X}; /*J*/
|
const SH_CODE char_shape_J[] = {Up,2,1,Dn,0,2,0,4,1,5,9,5,Up,9,3,Dn,9,7,Up,X}; /*J*/
|
||||||
const SH_CODE char_shape_K[] = {U,0,1,D,9,1,U,9,7,D,5,1,0,8,U,X}; /*K*/
|
const SH_CODE char_shape_K[] = {Up,0,1,Dn,9,1,Up,9,7,Dn,5,1,0,8,Up,X}; /*K*/
|
||||||
const SH_CODE char_shape_L[] = {U,9,1,D,0,1,0,9,U,X}; /*L*/
|
const SH_CODE char_shape_L[] = {Up,9,1,Dn,0,1,0,9,Up,X}; /*L*/
|
||||||
const SH_CODE char_shape_M[] = {U,0,1,D,9,1,5,5,9,9,0,9,U,X}; /*M*/
|
const SH_CODE char_shape_M[] = {Up,0,1,Dn,9,1,5,5,9,9,0,9,Up,X}; /*M*/
|
||||||
const SH_CODE char_shape_N[] = {U,0,1,D,9,1,0,8,9,8,U,X}; /*N*/
|
const SH_CODE char_shape_N[] = {Up,0,1,Dn,9,1,0,8,9,8,Up,X}; /*N*/
|
||||||
const SH_CODE char_shape_O[] = {U,0,2,D,1,1,8,1,9,2,9,7,8,8,1,8,0,7,0,2,U,X}; /*O*/
|
const SH_CODE char_shape_O[] = {Up,0,2,Dn,1,1,8,1,9,2,9,7,8,8,1,8,0,7,0,2,Up,X}; /*O*/
|
||||||
const SH_CODE char_shape_P[] = {U,0,1,D,9,1,9,7,8,8,5,8,4,7,4,1,U,X}; /*P*/
|
const SH_CODE char_shape_P[] = {Up,0,1,Dn,9,1,9,7,8,8,5,8,4,7,4,1,Up,X}; /*P*/
|
||||||
const SH_CODE char_shape_Q[] = {U,1,1,D,8,1,9,2,9,7,8,8,1,8,0,7,0,2,1,1,U,4,6,D,0,8,U,X}; /*Q*/
|
const SH_CODE char_shape_Q[] = {Up,1,1,Dn,8,1,9,2,9,7,8,8,1,8,0,7,0,2,1,1,Up,4,6,Dn,0,8,Up,X}; /*Q*/
|
||||||
const SH_CODE char_shape_R[] = {U,0,1,D,9,1,9,7,8,8,5,8,4,7,4,1,U,4,4,D,0,8,U,X}; /*R*/
|
const SH_CODE char_shape_R[] = {Up,0,1,Dn,9,1,9,7,8,8,5,8,4,7,4,1,Up,4,4,Dn,0,8,Up,X}; /*R*/
|
||||||
const SH_CODE char_shape_S[] = {U,1,1,D,0,2,0,7,1,8,4,8,5,7,5,2,6,1,8,1,9,2,9,7,8,8,U,X}; /*S*/
|
const SH_CODE char_shape_S[] = {Up,1,1,Dn,0,2,0,7,1,8,4,8,5,7,5,2,6,1,8,1,9,2,9,7,8,8,Up,X}; /*S*/
|
||||||
const SH_CODE char_shape_T[] = {U,9,1,D,9,9,U,9,5,D,0,5,U,X}; /*T*/
|
const SH_CODE char_shape_T[] = {Up,9,1,Dn,9,9,Up,9,5,Dn,0,5,Up,X}; /*T*/
|
||||||
const SH_CODE char_shape_U[] = {U,9,1,D,1,1,0,2,0,7,1,8,9,8,U,X}; /*U,*/
|
const SH_CODE char_shape_U[] = {Up,9,1,Dn,1,1,0,2,0,7,1,8,9,8,Up,X}; /*Up,*/
|
||||||
const SH_CODE char_shape_V[] = {U,9,1,D,0,5,9,9,U,X}; /*V*/
|
const SH_CODE char_shape_V[] = {Up,9,1,Dn,0,5,9,9,Up,X}; /*V*/
|
||||||
const SH_CODE char_shape_W[] = {U,9,1,D,0,3,3,5,0,7,9,9,U,X}; /*W*/
|
const SH_CODE char_shape_W[] = {Up,9,1,Dn,0,3,3,5,0,7,9,9,Up,X}; /*W*/
|
||||||
const SH_CODE char_shape_X[] = {U,0,1,D,9,8,U,9,1,D,0,8,U,X}; /*X*/
|
const SH_CODE char_shape_X[] = {Up,0,1,Dn,9,8,Up,9,1,Dn,0,8,Up,X}; /*X*/
|
||||||
const SH_CODE char_shape_Y[] = {U,9,1,D,4,5,9,9,U,4,5,D,0,5,U,X}; /*Y*/
|
const SH_CODE char_shape_Y[] = {Up,9,1,Dn,4,5,9,9,Up,4,5,Dn,0,5,Up,X}; /*Y*/
|
||||||
const SH_CODE char_shape_Z[] = {U,9,1,D,9,8,0,1,0,8,U,X}; /*Z*/
|
const SH_CODE char_shape_Z[] = {Up,9,1,Dn,9,8,0,1,0,8,Up,X}; /*Z*/
|
||||||
|
|
||||||
const SH_CODE char_shape_opencr[] = {U,0,5,D,0,3,9,3,9,5,U,X}; /*[*/
|
const SH_CODE char_shape_opencr[] = {Up,0,5,Dn,0,3,9,3,9,5,Up,X}; /*[*/
|
||||||
const SH_CODE char_shape_backslash[] = {U,9,1,D,0,7,U,X}; /*\*/
|
const SH_CODE char_shape_backslash[] = {Up,9,1,Dn,0,7,Up,X}; /*\*/
|
||||||
const SH_CODE char_shape_closecr[] = {U,0,3,D,0,5,9,5,9,3,U,X}; /*]*/
|
const SH_CODE char_shape_closecr[] = {Up,0,3,Dn,0,5,9,5,9,3,Up,X}; /*]*/
|
||||||
const SH_CODE char_shape_xor[] = {U,7,1,D,9,5,7,8,U,X}; /*^*/
|
const SH_CODE char_shape_xor[] = {Up,7,1,Dn,9,5,7,8,Up,X}; /*^*/
|
||||||
const SH_CODE char_shape_underscore[] = {U,0,1,D,0,8,U,X}; /*_*/
|
const SH_CODE char_shape_underscore[] = {Up,0,1,Dn,0,8,Up,X}; /*_*/
|
||||||
const SH_CODE char_shape_altel[] = {U,9,4,D,7,5,U,X}; /*`*/
|
const SH_CODE char_shape_altel[] = {Up,9,4,Dn,7,5,Up,X}; /*`*/
|
||||||
|
|
||||||
const SH_CODE char_shape_a[] = {U,6,1,D,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,U,X}; /*a*/
|
const SH_CODE char_shape_a[] = {Up,6,1,Dn,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,Up,X}; /*a*/
|
||||||
const SH_CODE char_shape_b[] = {U,9,1,D,0,1,0,8,4,8,5,7,5,1,U,X}; /*b*/
|
const SH_CODE char_shape_b[] = {Up,9,1,Dn,0,1,0,8,4,8,5,7,5,1,Up,X}; /*b*/
|
||||||
const SH_CODE char_shape_c[] = {U,1,8,D,0,7,0,2,1,1,5,1,6,2,6,7,5,8,U,X}; /*c*/
|
const SH_CODE char_shape_c[] = {Up,1,8,Dn,0,7,0,2,1,1,5,1,6,2,6,7,5,8,Up,X}; /*c*/
|
||||||
const SH_CODE char_shape_d[] = {U,9,8,D,0,8,0,2,1,1,5,1,6,2,6,8,U,X}; /*d*/
|
const SH_CODE char_shape_d[] = {Up,9,8,Dn,0,8,0,2,1,1,5,1,6,2,6,8,Up,X}; /*d*/
|
||||||
const SH_CODE char_shape_e[] = {U,3,1,D,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,X}; /*e*/
|
const SH_CODE char_shape_e[] = {Up,3,1,Dn,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,X}; /*e*/
|
||||||
const SH_CODE char_shape_f[] = {U,0,2,D,8,2,9,3,9,7,8,8,U,5,1,D,5,4,U,X}; /*f*/
|
const SH_CODE char_shape_f[] = {Up,0,2,Dn,8,2,9,3,9,7,8,8,Up,5,1,Dn,5,4,Up,X}; /*f*/
|
||||||
const SH_CODE char_shape_g[] = {U,-2,1,D,-3,2,-3,7,-2,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,X}; /*g*/
|
const SH_CODE char_shape_g[] = {Up,-2,1,Dn,-3,2,-3,7,-2,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,X}; /*g*/
|
||||||
const SH_CODE char_shape_h[] = {U,0,1,D,9,1,U,5,1,D,6,2,6,7,5,8,0,8,U,X}; /*h*/
|
const SH_CODE char_shape_h[] = {Up,0,1,Dn,9,1,Up,5,1,Dn,6,2,6,7,5,8,0,8,Up,X}; /*h*/
|
||||||
const SH_CODE char_shape_i[] = {U,9,4,D,8,4,U,5,4,D,1,4,0,5,0,6,U,X}; /*i*/
|
const SH_CODE char_shape_i[] = {Up,9,4,Dn,8,4,Up,5,4,Dn,1,4,0,5,0,6,Up,X}; /*i*/
|
||||||
const SH_CODE char_shape_j[] = {U,9,4,D,8,4,U,5,4,D,-2,4,-3,3,-2,2,U,X}; /*j*/
|
const SH_CODE char_shape_j[] = {Up,9,4,Dn,8,4,Up,5,4,Dn,-2,4,-3,3,-2,2,Up,X}; /*j*/
|
||||||
const SH_CODE char_shape_k[] = {U,0,2,D,9,2,U,3,2,D,3,3,6,8,U,3,3,D,0,8,U,X}; /*k*/
|
const SH_CODE char_shape_k[] = {Up,0,2,Dn,9,2,Up,3,2,Dn,3,3,6,8,Up,3,3,Dn,0,8,Up,X}; /*k*/
|
||||||
const SH_CODE char_shape_l[] = {U,9,3,D,9,4,0,4,U,0,3,D,0,5,U,X}; /*l*/
|
const SH_CODE char_shape_l[] = {Up,9,3,Dn,9,4,0,4,Up,0,3,Dn,0,5,Up,X}; /*l*/
|
||||||
const SH_CODE char_shape_m[] = {U,0,1,D,6,1,U,5,1,D,6,2,6,4,5,5,0,5,U,5,5,D,6,6,6,8,5,9,0,9,U,X}; /*m*/
|
const SH_CODE char_shape_m[] = {Up,0,1,Dn,6,1,Up,5,1,Dn,6,2,6,4,5,5,0,5,Up,5,5,Dn,6,6,6,8,5,9,0,9,Up,X}; /*m*/
|
||||||
const SH_CODE char_shape_n[] = {U,0,1,D,6,1,U,5,1,D,6,2,6,6,5,7,0,7,U,X}; /*n*/
|
const SH_CODE char_shape_n[] = {Up,0,1,Dn,6,1,Up,5,1,Dn,6,2,6,6,5,7,0,7,Up,X}; /*n*/
|
||||||
const SH_CODE char_shape_o[] = {U,0,2,D,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,U,X}; /*o*/
|
const SH_CODE char_shape_o[] = {Up,0,2,Dn,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,Up,X}; /*o*/
|
||||||
const SH_CODE char_shape_p[] = {U,-3,1,D,6,1,U,5,1,D,6,2,6,7,5,8,1,8,0,7,0,2,1,1,U,X}; /*p*/
|
const SH_CODE char_shape_p[] = {Up,-3,1,Dn,6,1,Up,5,1,Dn,6,2,6,7,5,8,1,8,0,7,0,2,1,1,Up,X}; /*p*/
|
||||||
const SH_CODE char_shape_q[] = {U,-3,8,D,6,8,U,5,8,D,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,X}; /*q*/
|
const SH_CODE char_shape_q[] = {Up,-3,8,Dn,6,8,Up,5,8,Dn,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,X}; /*q*/
|
||||||
const SH_CODE char_shape_r[] = {U,0,1,D,6,1,U,4,1,D,6,3,6,6,4,8,U,X}; /*r*/
|
const SH_CODE char_shape_r[] = {Up,0,1,Dn,6,1,Up,4,1,Dn,6,3,6,6,4,8,Up,X}; /*r*/
|
||||||
const SH_CODE char_shape_s[] = {U,1,1,D,0,2,0,7,1,8,2,8,3,7,3,2,4,1,5,1,6,2,6,7,5,8,U,X}; /*s*/
|
const SH_CODE char_shape_s[] = {Up,1,1,Dn,0,2,0,7,1,8,2,8,3,7,3,2,4,1,5,1,6,2,6,7,5,8,Up,X}; /*s*/
|
||||||
const SH_CODE char_shape_t[] = {U,1,7,D,0,6,0,3,1,2,9,2,U,6,2,D,6,5,U,X}; /*t*/
|
const SH_CODE char_shape_t[] = {Up,1,7,Dn,0,6,0,3,1,2,9,2,Up,6,2,Dn,6,5,Up,X}; /*t*/
|
||||||
const SH_CODE char_shape_u[] = {U,6,1,D,2,1,0,3,0,6,2,8,6,8,U,X}; /*u*/
|
const SH_CODE char_shape_u[] = {Up,6,1,Dn,2,1,0,3,0,6,2,8,6,8,Up,X}; /*u*/
|
||||||
const SH_CODE char_shape_v[] = {U,6,1,D,3,1,0,4,3,7,6,7,U,X}; /*v*/
|
const SH_CODE char_shape_v[] = {Up,6,1,Dn,3,1,0,4,3,7,6,7,Up,X}; /*v*/
|
||||||
const SH_CODE char_shape_w[] = {U,6,1,D,2,1,0,3,2,5,0,7,2,9,6,9,U,X}; /*w*/
|
const SH_CODE char_shape_w[] = {Up,6,1,Dn,2,1,0,3,2,5,0,7,2,9,6,9,Up,X}; /*w*/
|
||||||
const SH_CODE char_shape_x[] = {U,0,1,D,6,8,U,6,1,D,0,8,U,X}; /*x*/
|
const SH_CODE char_shape_x[] = {Up,0,1,Dn,6,8,Up,6,1,Dn,0,8,Up,X}; /*x*/
|
||||||
const SH_CODE char_shape_y[] = {U,6,1,D,2,1,0,3,0,6,2,8,U,6,8,D,-2,8,-3,7,-3,2,-2,1,U,X}; /*y*/
|
const SH_CODE char_shape_y[] = {Up,6,1,Dn,2,1,0,3,0,6,2,8,Up,6,8,Dn,-2,8,-3,7,-3,2,-2,1,Up,X}; /*y*/
|
||||||
const SH_CODE char_shape_z[] = {U,6,1,D,6,8,0,1,0,8,U,X}; /*z*/
|
const SH_CODE char_shape_z[] = {Up,6,1,Dn,6,8,0,1,0,8,Up,X}; /*z*/
|
||||||
|
|
||||||
const SH_CODE char_shape_opbrack[] = {U,9,5,D,8,4,6,4,5,3,4,3,3,4,1,4,0,5,U,X}; /*{*/
|
const SH_CODE char_shape_opbrack[] = {Up,9,5,Dn,8,4,6,4,5,3,4,3,3,4,1,4,0,5,Up,X}; /*{*/
|
||||||
const SH_CODE char_shape_or[] = {U,9,4,D,0,4,U,X}; /*|*/
|
const SH_CODE char_shape_or[] = {Up,9,4,Dn,0,4,Up,X}; /*|*/
|
||||||
const SH_CODE char_shape_closebr[] = {U,9,3,D,8,4,6,4,5,5,4,5,3,4,1,4,0,3,U,X}; /*}*/
|
const SH_CODE char_shape_closebr[] = {Up,9,3,Dn,8,4,6,4,5,5,4,5,3,4,1,4,0,3,Up,X}; /*}*/
|
||||||
const SH_CODE char_shape_tilda[] = {U,8,1,D,9,2,9,3,7,5,7,6,8,7,U,X}; /*~*/
|
const SH_CODE char_shape_tilda[] = {Up,8,1,Dn,9,2,9,3,7,5,7,6,8,7,Up,X}; /*~*/
|
||||||
const SH_CODE char_shape_del[] = {X}; /*<del>*/
|
const SH_CODE char_shape_del[] = {X}; /*<del>*/
|
||||||
|
|
||||||
/* codes utiles >= 128 */
|
/* codes utiles >= 128 */
|
||||||
const SH_CODE char_shape_C_Cedille[] = {U,1,8,D,0,7,0,2,1,1,8,1,9,2,9,7,8,8,U,X}; /* C cedille*/
|
const SH_CODE char_shape_C_Cedille[] = {Up,1,8,Dn,0,7,0,2,1,1,8,1,9,2,9,7,8,8,Up,X}; /* C cedille*/
|
||||||
const SH_CODE char_shape_c_cedille[] = {U,1,8,D,0,7,0,2,1,1,5,1,6,2,6,7,5,8,U,0,4,D,-3,2,U,X}; /* ç */
|
const SH_CODE char_shape_c_cedille[] = {Up,1,8,Dn,0,7,0,2,1,1,5,1,6,2,6,7,5,8,Up,0,4,Dn,-3,2,Up,X}; /* ç */
|
||||||
const SH_CODE char_shape_a_grave[] = {U,6,1,D,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,U,7,4,D,9,2,U,X};
|
const SH_CODE char_shape_a_grave[] = {Up,6,1,Dn,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,Up,7,4,Dn,9,2,Up,X};
|
||||||
const SH_CODE char_shape_a_aigu[] = {U,6,1,D,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,U,7,2,D,9,4,U,X};
|
const SH_CODE char_shape_a_aigu[] = {Up,6,1,Dn,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,Up,7,2,Dn,9,4,Up,X};
|
||||||
const SH_CODE char_shape_a_circ[] = {U,6,1,D,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,U,7,1,D,9,4,7,7,U,X};
|
const SH_CODE char_shape_a_circ[] = {Up,6,1,Dn,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,Up,7,1,Dn,9,4,7,7,Up,X};
|
||||||
const SH_CODE char_shape_a_trema[] = {U,6,1,D,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,U,9,2,D,9,3,U,9,5,D,9,6,U,X};
|
const SH_CODE char_shape_a_trema[] = {Up,6,1,Dn,6,7,5,8,0,8,0,2,1,1,2,1,3,2,3,8,Up,9,2,Dn,9,3,Up,9,5,Dn,9,6,Up,X};
|
||||||
const SH_CODE char_shape_e_grave[] = {U,3,1,D,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,7,4,D,9,2,U,X};
|
const SH_CODE char_shape_e_grave[] = {Up,3,1,Dn,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,7,4,Dn,9,2,Up,X};
|
||||||
const SH_CODE char_shape_e_aigu[] = {U,3,1,D,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,7,3,D,9,5,U,X};
|
const SH_CODE char_shape_e_aigu[] = {Up,3,1,Dn,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,7,3,Dn,9,5,Up,X};
|
||||||
const SH_CODE char_shape_e_circ[] = {U,3,1,D,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,7,1,D,9,4,7,7,U,X};
|
const SH_CODE char_shape_e_circ[] = {Up,3,1,Dn,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,7,1,Dn,9,4,7,7,Up,X};
|
||||||
const SH_CODE char_shape_e_trema[] = {U,3,1,D,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,U,9,2,D,9,3,U,9,5,D,9,6,U,X};
|
const SH_CODE char_shape_e_trema[] = {Up,3,1,Dn,3,8,5,8,6,7,6,2,5,1,1,1,0,2,0,7,1,8,Up,9,2,Dn,9,3,Up,9,5,Dn,9,6,Up,X};
|
||||||
const SH_CODE char_shape_i_trema[] = {U,5,4,D,1,4,0,5,0,6,U,9,2,D,9,3,U,9,5,D,9,6,U,X};
|
const SH_CODE char_shape_i_trema[] = {Up,5,4,Dn,1,4,0,5,0,6,Up,9,2,Dn,9,3,Up,9,5,Dn,9,6,Up,X};
|
||||||
const SH_CODE char_shape_i_circ[] = {U,5,4,D,1,4,0,5,0,6,U,7,1,D,9,4,7,7,U,X};
|
const SH_CODE char_shape_i_circ[] = {Up,5,4,Dn,1,4,0,5,0,6,Up,7,1,Dn,9,4,7,7,Up,X};
|
||||||
const SH_CODE char_shape_u_grave[] = {U,6,1,D,2,1,0,3,0,6,2,8,6,8,U,7,4,D,9,2,U,X};
|
const SH_CODE char_shape_u_grave[] = {Up,6,1,Dn,2,1,0,3,0,6,2,8,6,8,Up,7,4,Dn,9,2,Up,X};
|
||||||
const SH_CODE char_shape_o_trema[] = {U,0,2,D,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,U,9,2,D,9,3,U,9,5,D,9,6,U,X};
|
const SH_CODE char_shape_o_trema[] = {Up,0,2,Dn,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,Up,9,2,Dn,9,3,Up,9,5,Dn,9,6,Up,X};
|
||||||
const SH_CODE char_shape_o_circ[] = {U,0,2,D,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,U,7,2,D,9,4,7,7,U,X};
|
const SH_CODE char_shape_o_circ[] = {Up,0,2,Dn,1,1,5,1,6,2,6,7,5,8,1,8,0,7,0,2,Up,7,2,Dn,9,4,7,7,Up,X};
|
||||||
const SH_CODE char_shape_u_circ[] = {U,6,1,D,2,1,0,3,0,6,2,8,6,8,U,7,1,D,9,4,7,7,U,X};
|
const SH_CODE char_shape_u_circ[] = {Up,6,1,Dn,2,1,0,3,0,6,2,8,6,8,Up,7,1,Dn,9,4,7,7,Up,X};
|
||||||
const SH_CODE char_shape_u_trema[] = {U,6,1,D,2,1,0,3,0,6,2,8,6,8,U,9,2,D,9,3,U,9,5,D,9,6,U,X};
|
const SH_CODE char_shape_u_trema[] = {Up,6,1,Dn,2,1,0,3,0,6,2,8,6,8,Up,9,2,Dn,9,3,Up,9,5,Dn,9,6,Up,X};
|
||||||
|
|
||||||
const SH_CODE *graphic_fonte_shape[256] =
|
const SH_CODE *graphic_fonte_shape[256] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,6 +140,9 @@ struct CHEVELU;
|
||||||
class Ki_PageDescr;
|
class Ki_PageDescr;
|
||||||
class DrawBlockStruct;
|
class DrawBlockStruct;
|
||||||
|
|
||||||
|
/* Class to handle a board */
|
||||||
|
#include "class_board.h"
|
||||||
|
|
||||||
// Class for handle current printed board design settings
|
// Class for handle current printed board design settings
|
||||||
#define HIST0RY_NUMBER 8
|
#define HIST0RY_NUMBER 8
|
||||||
class EDA_BoardDesignSettings
|
class EDA_BoardDesignSettings
|
||||||
|
@ -195,204 +198,7 @@ enum DisplayViaMode {
|
||||||
OPT_VIA_HOLE_END
|
OPT_VIA_HOLE_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Handle info to display a board */
|
||||||
class BOARD : public BOARD_ITEM
|
|
||||||
{
|
|
||||||
friend class WinEDA_PcbFrame;
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
std::vector<MARKER*> m_markers; ///< MARKERs for clearance problems, owned by pointer
|
|
||||||
// std::vector<MARKER*> m_markersUnconnected; ///< MARKERs for unconnected problems, owned by pointer
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation
|
|
||||||
EDA_Rect m_BoundaryBox; // Limites d'encadrement du PCB
|
|
||||||
int m_Unused;
|
|
||||||
int m_Status_Pcb; // Mot d'etat: Bit 1 = Chevelu calcule
|
|
||||||
EDA_BoardDesignSettings* m_BoardSettings; // Link to current design settings
|
|
||||||
int m_NbNets; // Nombre de nets (equipotentielles)
|
|
||||||
int m_NbNodes; // nombre de pads connectes
|
|
||||||
int m_NbLinks; // nombre de chevelus
|
|
||||||
int m_NbLoclinks; // nombre de chevelus dans Local ratsnest
|
|
||||||
// minimal de pistes a tracer
|
|
||||||
int m_NbNoconnect; // nombre de chevelus actifs
|
|
||||||
int m_NbSegmTrack; // nombre d'elements de type segments de piste
|
|
||||||
int m_NbSegmZone; // nombre d'elements de type segments de zone
|
|
||||||
|
|
||||||
BOARD_ITEM* m_Drawings; // linked list of lines & texts
|
|
||||||
MODULE* m_Modules; // linked list of MODULEs
|
|
||||||
EQUIPOT* m_Equipots; // linked list of nets
|
|
||||||
TRACK* m_Track; // linked list of TRACKs and SEGVIAs
|
|
||||||
SEGZONE* m_Zone; // linked list of SEGZONEs
|
|
||||||
D_PAD** m_Pads; // pointeur liste d'acces aux pads
|
|
||||||
int m_NbPads; // nombre total de pads
|
|
||||||
CHEVELU* m_Ratsnest; // pointeur liste des chevelus
|
|
||||||
CHEVELU* m_LocalRatsnest; // pointeur liste des chevelus d'un module
|
|
||||||
|
|
||||||
EDGE_ZONE* m_CurrentLimitZone; /* pointeur sur la liste des segments
|
|
||||||
* de delimitation de la zone en cours de trace */
|
|
||||||
|
|
||||||
BOARD( EDA_BaseStruct* StructFather, WinEDA_BasePcbFrame* frame );
|
|
||||||
~BOARD();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function GetPosition
|
|
||||||
* is here to satisfy BOARD_ITEM's requirements, but this implementation
|
|
||||||
* is a dummy.
|
|
||||||
* @return const wxPoint& of (0,0)
|
|
||||||
*/
|
|
||||||
wxPoint& GetPosition();
|
|
||||||
|
|
||||||
/* supprime du chainage la structure Struct */
|
|
||||||
void UnLink();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Add
|
|
||||||
* adds the given item to this BOARD and takes ownership of its memory.
|
|
||||||
* @param aBoardItem The item to add to this board.
|
|
||||||
* @param aControl An int which can vary how the item is added.
|
|
||||||
*/
|
|
||||||
void Add( BOARD_ITEM* aBoardItem, int aControl = 0 );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Delete
|
|
||||||
* deletes the given single item from this BOARD and deletes its memory. If you
|
|
||||||
* need the object after deletion, first copy it.
|
|
||||||
* @param aBoardItem The item to remove from this board and delete
|
|
||||||
*/
|
|
||||||
void Delete( BOARD_ITEM* aBoardItem );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function DeleteMARKERs
|
|
||||||
* deletes ALL MARKERS from the board.
|
|
||||||
*/
|
|
||||||
void DeleteMARKERs();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function DeleteMARKER
|
|
||||||
* deletes one MARKER from the board.
|
|
||||||
* @param aIndex The index of the marker to delete.
|
|
||||||
*/
|
|
||||||
void DeleteMARKER( int aIndex );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function GetMARKER
|
|
||||||
* returns the MARKER at a given index.
|
|
||||||
* @param index The array type index into a collection of MARKERS.
|
|
||||||
* @return MARKER* - a pointer to the MARKER or NULL if index out of range.
|
|
||||||
*/
|
|
||||||
MARKER* GetMARKER( int index ) const
|
|
||||||
{
|
|
||||||
if( (unsigned) index < m_markers.size() )
|
|
||||||
return m_markers[index];
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function GetMARKERCount
|
|
||||||
* @return int - The number of MARKERS.
|
|
||||||
*/
|
|
||||||
int GetMARKERCount() const
|
|
||||||
{
|
|
||||||
return (int) m_markers.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Routines de calcul des nombres de segments pistes et zones */
|
|
||||||
int GetNumSegmTrack();
|
|
||||||
int GetNumSegmZone();
|
|
||||||
int GetNumNoconnect(); // retourne le nombre de connexions manquantes
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function GetNumRatsnests
|
|
||||||
* @return int - The number of rats
|
|
||||||
*/
|
|
||||||
int GetNumRatsnests()
|
|
||||||
{
|
|
||||||
return m_NbLinks;
|
|
||||||
}
|
|
||||||
|
|
||||||
int GetNumNodes(); // retourne le nombre de pads a netcode > 0
|
|
||||||
|
|
||||||
// Calcul du rectangle d'encadrement:
|
|
||||||
bool ComputeBoundaryBox();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Display_Infos
|
|
||||||
* has knowledge about the frame and how and where to put status information
|
|
||||||
* about this object into the frame's message panel.
|
|
||||||
* Is virtual from EDA_BaseStruct.
|
|
||||||
* @param frame A WinEDA_DrawFrame in which to print status information.
|
|
||||||
*/
|
|
||||||
void Display_Infos( WinEDA_DrawFrame* frame );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Visit
|
|
||||||
* may be re-implemented for each derived class in order to handle
|
|
||||||
* all the types given by its member data. Implementations should call
|
|
||||||
* inspector->Inspect() on types in scanTypes[], and may use IterateForward()
|
|
||||||
* to do so on lists of such data.
|
|
||||||
* @param inspector An INSPECTOR instance to use in the inspection.
|
|
||||||
* @param testData Arbitrary data used by the inspector.
|
|
||||||
* @param scanTypes Which KICAD_T types are of interest and the order
|
|
||||||
* is significant too, terminated by EOT.
|
|
||||||
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
|
|
||||||
* else SCAN_CONTINUE, and determined by the inspector.
|
|
||||||
*/
|
|
||||||
SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
|
|
||||||
const KICAD_T scanTypes[] );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function FindNet
|
|
||||||
* searches for a net with the given netcode.
|
|
||||||
* @param aNetcode A netcode to search for.
|
|
||||||
* @return EQUIPOT* - the net or NULL if not found.
|
|
||||||
*/
|
|
||||||
EQUIPOT* FindNet( int aNetcode ) const;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Save
|
|
||||||
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
||||||
* @param aFile The FILE to write to.
|
|
||||||
* @return bool - true if success writing else false.
|
|
||||||
*/
|
|
||||||
bool Save( FILE* aFile ) const;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function GetClass
|
|
||||||
* returns the class name.
|
|
||||||
* @return wxString
|
|
||||||
*/
|
|
||||||
wxString GetClass() const
|
|
||||||
{
|
|
||||||
return wxT( "BOARD" );
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
|
||||||
/**
|
|
||||||
* Function Show
|
|
||||||
* is used to output the object tree, currently for debugging only.
|
|
||||||
* @param nestLevel An aid to prettier tree indenting, and is the level
|
|
||||||
* of nesting of this object within the overall tree.
|
|
||||||
* @param os The ostream& to output to.
|
|
||||||
*/
|
|
||||||
void Show( int nestLevel, std::ostream& os );
|
|
||||||
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Description d'un ecran */
|
|
||||||
class PCB_SCREEN : public BASE_SCREEN
|
class PCB_SCREEN : public BASE_SCREEN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -512,32 +318,7 @@ public:
|
||||||
#include "class_mire.h"
|
#include "class_mire.h"
|
||||||
#include "class_track.h"
|
#include "class_track.h"
|
||||||
#include "class_marker.h"
|
#include "class_marker.h"
|
||||||
|
#include "class_zone.h"
|
||||||
/*******************/
|
|
||||||
/* class EDGE_ZONE */
|
|
||||||
/*******************/
|
|
||||||
|
|
||||||
class EDGE_ZONE : public DRAWSEGMENT
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
EDGE_ZONE( BOARD_ITEM* StructFather );
|
|
||||||
EDGE_ZONE( const EDGE_ZONE& edgezone );
|
|
||||||
~EDGE_ZONE();
|
|
||||||
|
|
||||||
EDGE_ZONE* Next() { return (EDGE_ZONE*) Pnext; }
|
|
||||||
|
|
||||||
EDGE_ZONE* Back() { return (EDGE_ZONE*) Pback; }
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function Save
|
|
||||||
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
||||||
* @param aFile The FILE to write to.
|
|
||||||
* @return bool - true if success writing else false.
|
|
||||||
*/
|
|
||||||
bool Save( FILE* aFile ) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DISPLAY_OPTIONS
|
class DISPLAY_OPTIONS
|
||||||
|
|
|
@ -6,65 +6,7 @@
|
||||||
|
|
||||||
#include "pcbnew.h"
|
#include "pcbnew.h"
|
||||||
|
|
||||||
#include "bitmaps.h"
|
//#include "bitmaps.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString DRC_ITEM::GetErrorText() const
|
|
||||||
{
|
|
||||||
switch( m_ErrorCode )
|
|
||||||
{
|
|
||||||
// case DRCE_: not assigned yet
|
|
||||||
|
|
||||||
case DRCE_UNCONNECTED_PADS:
|
|
||||||
return wxString( _("Unconnected pads") );
|
|
||||||
case DRCE_TRACK_NEAR_THROUGH_HOLE:
|
|
||||||
return wxString( _("Track near thru-hole") );
|
|
||||||
case DRCE_TRACK_NEAR_PAD:
|
|
||||||
return wxString( _("Track near pad") );
|
|
||||||
case DRCE_TRACK_NEAR_VIA:
|
|
||||||
return wxString( _("Track near via") );
|
|
||||||
case DRCE_VIA_NEAR_VIA:
|
|
||||||
return wxString( _("Via near via") );
|
|
||||||
case DRCE_VIA_NEAR_TRACK:
|
|
||||||
return wxString( _("Via near track") );
|
|
||||||
case DRCE_TRACK_ENDS1:
|
|
||||||
case DRCE_TRACK_ENDS2:
|
|
||||||
case DRCE_TRACK_ENDS3:
|
|
||||||
case DRCE_TRACK_ENDS4:
|
|
||||||
case DRCE_ENDS_PROBLEM1:
|
|
||||||
case DRCE_ENDS_PROBLEM2:
|
|
||||||
case DRCE_ENDS_PROBLEM3:
|
|
||||||
case DRCE_ENDS_PROBLEM4:
|
|
||||||
case DRCE_ENDS_PROBLEM5:
|
|
||||||
return wxString( _("Two track ends") );
|
|
||||||
case DRCE_TRACK_UNKNOWN1:
|
|
||||||
return wxString( _("This looks bad") ); ///< @todo check source code and change this comment
|
|
||||||
case DRCE_TRACKS_CROSSING:
|
|
||||||
return wxString( _("Tracks crossing") );
|
|
||||||
case DRCE_PAD_NEAR_PAD1:
|
|
||||||
return wxString( _("Pad near pad") );
|
|
||||||
case DRCE_VIA_HOLE_BIGGER:
|
|
||||||
return wxString( _("Via hole > diameter"));
|
|
||||||
|
|
||||||
default:
|
|
||||||
return wxString( wxT("PROGRAM BUG, PLEASE LEAVE THE ROOM.") );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
|
|
||||||
{
|
|
||||||
wxString temp;
|
|
||||||
wxString ret;
|
|
||||||
|
|
||||||
ret << wxT("@(") << valeur_param( aPos.x, temp );
|
|
||||||
ret << wxT(",") << valeur_param( aPos.y, temp );
|
|
||||||
ret << wxT(")");
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************/
|
/*****************/
|
||||||
|
@ -229,7 +171,7 @@ void BOARD::DeleteMARKERs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Routines de calcul des nombres de segments pistes et zones */
|
/* Calculate the track segment count */
|
||||||
int BOARD::GetNumSegmTrack()
|
int BOARD::GetNumSegmTrack()
|
||||||
{
|
{
|
||||||
TRACK* CurTrack = m_Track;
|
TRACK* CurTrack = m_Track;
|
||||||
|
@ -243,6 +185,7 @@ int BOARD::GetNumSegmTrack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Calculate the zone segment count */
|
||||||
int BOARD::GetNumSegmZone()
|
int BOARD::GetNumSegmZone()
|
||||||
{
|
{
|
||||||
TRACK* CurTrack = m_Zone;
|
TRACK* CurTrack = m_Zone;
|
||||||
|
@ -256,14 +199,14 @@ int BOARD::GetNumSegmZone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// retourne le nombre de connexions manquantes
|
// return the unconnection count
|
||||||
int BOARD::GetNumNoconnect()
|
int BOARD::GetNumNoconnect()
|
||||||
{
|
{
|
||||||
return m_NbNoconnect;
|
return m_NbNoconnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// retourne le nombre de pads a netcode > 0
|
// return the active pad count ( pads with a netcode > 0 )
|
||||||
int BOARD::GetNumNodes()
|
int BOARD::GetNumNodes()
|
||||||
{
|
{
|
||||||
return m_NbNodes;
|
return m_NbNodes;
|
||||||
|
@ -274,14 +217,12 @@ int BOARD::GetNumNodes()
|
||||||
bool BOARD::ComputeBoundaryBox()
|
bool BOARD::ComputeBoundaryBox()
|
||||||
/***********************************/
|
/***********************************/
|
||||||
|
|
||||||
/* Determine le rectangle d'encadrement du pcb
|
/** Function ComputeBoundaryBox()
|
||||||
* Ce rectangle englobe les contours pcb, pads , vias et piste
|
* Calculate the bounding box of the board
|
||||||
* Sortie:
|
* This box contains pcb edges, pads , vias and tracks
|
||||||
* m_PcbBox
|
* Update m_PcbBox member
|
||||||
*
|
*
|
||||||
* retourne:
|
* @return 0 for an empty board (no items), else 1
|
||||||
* 0 si aucun element utile
|
|
||||||
* 1 sinon
|
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int rayon, cx, cy, d, xmin, ymin, xmax, ymax;
|
int rayon, cx, cy, d, xmin, ymin, xmax, ymax;
|
||||||
|
@ -293,7 +234,7 @@ bool BOARD::ComputeBoundaryBox()
|
||||||
xmin = ymin = 0x7FFFFFFFl;
|
xmin = ymin = 0x7FFFFFFFl;
|
||||||
xmax = ymax = -0x7FFFFFFFl;
|
xmax = ymax = -0x7FFFFFFFl;
|
||||||
|
|
||||||
/* Analyse des Contours PCB */
|
/* Analyse PCB edges*/
|
||||||
PtStruct = m_Drawings;
|
PtStruct = m_Drawings;
|
||||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
|
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
|
||||||
{
|
{
|
||||||
|
@ -328,7 +269,7 @@ bool BOARD::ComputeBoundaryBox()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Analyse des Modules */
|
/* Analyse footprints */
|
||||||
MODULE* module = m_Modules;
|
MODULE* module = m_Modules;
|
||||||
for( ; module != NULL; module = (MODULE*) module->Pnext )
|
for( ; module != NULL; module = (MODULE*) module->Pnext )
|
||||||
{
|
{
|
||||||
|
@ -351,7 +292,7 @@ bool BOARD::ComputeBoundaryBox()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Analyse des segments de piste et zone*/
|
/* Analyse track and zones */
|
||||||
for( Track = m_Track; Track != NULL; Track = (TRACK*) Track->Pnext )
|
for( Track = m_Track; Track != NULL; Track = (TRACK*) Track->Pnext )
|
||||||
{
|
{
|
||||||
d = (Track->m_Width / 2) + 1;
|
d = (Track->m_Width / 2) + 1;
|
||||||
|
@ -848,47 +789,4 @@ void BOARD::Show( int nestLevel, std::ostream& os )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* wrote this before discovering ReturnPcbLayerName()
|
|
||||||
const char* BOARD::ShowLayer( int aLayer )
|
|
||||||
{
|
|
||||||
const char* rs;
|
|
||||||
|
|
||||||
switch( aLayer )
|
|
||||||
{
|
|
||||||
case LAYER_COPPER_LAYER_N: rs = "cu"; break;
|
|
||||||
case LAYER_N_2: rs = "layer2"; break;
|
|
||||||
case LAYER_N_3: rs = "layer3"; break;
|
|
||||||
case LAYER_N_4: rs = "layer4"; break;
|
|
||||||
case LAYER_N_5: rs = "layer5"; break;
|
|
||||||
case LAYER_N_6: rs = "layer6"; break;
|
|
||||||
case LAYER_N_7: rs = "layer7"; break;
|
|
||||||
case LAYER_N_8: rs = "layer8"; break;
|
|
||||||
case LAYER_N_9: rs = "layer9"; break;
|
|
||||||
case LAYER_N_10: rs = "layer10"; break;
|
|
||||||
case LAYER_N_11: rs = "layer11"; break;
|
|
||||||
case LAYER_N_12: rs = "layer12"; break;
|
|
||||||
case LAYER_N_13: rs = "layer13"; break;
|
|
||||||
case LAYER_N_14: rs = "layer14"; break;
|
|
||||||
case LAYER_N_15: rs = "layer15"; break;
|
|
||||||
case LAYER_CMP_N: rs = "cmp"; break;
|
|
||||||
case ADHESIVE_N_CU: rs = "cu/adhesive"; break;
|
|
||||||
case ADHESIVE_N_CMP: rs = "cmp/adhesive"; break;
|
|
||||||
case SOLDERPASTE_N_CU: rs = "cu/sldrpaste"; break;
|
|
||||||
case SOLDERPASTE_N_CMP: rs = "cmp/sldrpaste"; break;
|
|
||||||
case SILKSCREEN_N_CU: rs = "cu/silkscreen"; break;
|
|
||||||
case SILKSCREEN_N_CMP: rs = "cmp/silkscreen"; break;
|
|
||||||
case SOLDERMASK_N_CU: rs = "cu/sldrmask"; break;
|
|
||||||
case SOLDERMASK_N_CMP: rs = "cmp/sldrmask"; break;
|
|
||||||
case DRAW_N: rs = "drawing"; break;
|
|
||||||
case COMMENT_N: rs = "comment"; break;
|
|
||||||
case ECO1_N: rs = "eco_1"; break;
|
|
||||||
case ECO2_N: rs = "eco_2"; break;
|
|
||||||
case EDGE_N: rs = "edge"; break;
|
|
||||||
default: rs = "???"; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rs;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,211 @@
|
||||||
|
/**************************************************************/
|
||||||
|
/* class_board.h - Class BOARD to handle a board */
|
||||||
|
/**************************************************************/
|
||||||
|
|
||||||
|
#ifndef CLASS_BOARD_H
|
||||||
|
#define CLASS_BOARD_H
|
||||||
|
|
||||||
|
class ZONE_CONTAINER;
|
||||||
|
class EDA_BoardDesignSettings;
|
||||||
|
|
||||||
|
/***********************************************/
|
||||||
|
/* class BOARD : handle datas to build a board */
|
||||||
|
/***********************************************/
|
||||||
|
|
||||||
|
|
||||||
|
class BOARD : public BOARD_ITEM
|
||||||
|
{
|
||||||
|
friend class WinEDA_PcbFrame;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::vector<MARKER*> m_markers; ///< MARKERs for clearance problems, owned by pointer
|
||||||
|
// std::vector<MARKER*> m_markersUnconnected; ///< MARKERs for unconnected problems, owned by pointer
|
||||||
|
std::vector<ZONE_CONTAINER*> m_ZoneDescriptorList; ///< edge zone descriptors, owned by pointer
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation
|
||||||
|
EDA_Rect m_BoundaryBox; // Board size and position
|
||||||
|
int m_Unused;
|
||||||
|
int m_Status_Pcb; // Flags used in ratsnet calculation and update
|
||||||
|
EDA_BoardDesignSettings* m_BoardSettings; // Link to current design settings
|
||||||
|
int m_NbNets; // Nets (equipotentielles) count
|
||||||
|
int m_NbNodes; // Active pads (pads attached to a net ) count
|
||||||
|
int m_NbLinks; // Ratsnet count
|
||||||
|
int m_NbLoclinks; // Rastests to shew while creating a track
|
||||||
|
int m_NbNoconnect; // Active ratsnet count (rastnest not alraedy connected by tracks
|
||||||
|
int m_NbSegmTrack; // Track items count
|
||||||
|
int m_NbSegmZone; // Zone items count
|
||||||
|
|
||||||
|
BOARD_ITEM* m_Drawings; // linked list of lines & texts
|
||||||
|
MODULE* m_Modules; // linked list of MODULEs
|
||||||
|
EQUIPOT* m_Equipots; // linked list of nets
|
||||||
|
TRACK* m_Track; // linked list of TRACKs and SEGVIAs
|
||||||
|
SEGZONE* m_Zone; // linked list of SEGZONEs
|
||||||
|
D_PAD** m_Pads; // Entry for a sorted pad list (used in ratsnest calculations)
|
||||||
|
int m_NbPads; // Pad count
|
||||||
|
CHEVELU* m_Ratsnest; // Rastnest list
|
||||||
|
CHEVELU* m_LocalRatsnest; // Rastnest list used while moving a footprint
|
||||||
|
|
||||||
|
EDGE_ZONE* m_CurrentLimitZone; /* pointeur sur la liste des segments
|
||||||
|
* de delimitation de la zone en cours de trace */
|
||||||
|
|
||||||
|
BOARD( EDA_BaseStruct* StructFather, WinEDA_BasePcbFrame* frame );
|
||||||
|
~BOARD();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetPosition
|
||||||
|
* is here to satisfy BOARD_ITEM's requirements, but this implementation
|
||||||
|
* is a dummy.
|
||||||
|
* @return const wxPoint& of (0,0)
|
||||||
|
*/
|
||||||
|
wxPoint& GetPosition();
|
||||||
|
|
||||||
|
/* supprime du chainage la structure Struct */
|
||||||
|
void UnLink();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Add
|
||||||
|
* adds the given item to this BOARD and takes ownership of its memory.
|
||||||
|
* @param aBoardItem The item to add to this board.
|
||||||
|
* @param aControl An int which can vary how the item is added.
|
||||||
|
*/
|
||||||
|
void Add( BOARD_ITEM* aBoardItem, int aControl = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Delete
|
||||||
|
* deletes the given single item from this BOARD and deletes its memory. If you
|
||||||
|
* need the object after deletion, first copy it.
|
||||||
|
* @param aBoardItem The item to remove from this board and delete
|
||||||
|
*/
|
||||||
|
void Delete( BOARD_ITEM* aBoardItem );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function DeleteMARKERs
|
||||||
|
* deletes ALL MARKERS from the board.
|
||||||
|
*/
|
||||||
|
void DeleteMARKERs();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function DeleteMARKER
|
||||||
|
* deletes one MARKER from the board.
|
||||||
|
* @param aIndex The index of the marker to delete.
|
||||||
|
*/
|
||||||
|
void DeleteMARKER( int aIndex );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetMARKER
|
||||||
|
* returns the MARKER at a given index.
|
||||||
|
* @param index The array type index into a collection of MARKERS.
|
||||||
|
* @return MARKER* - a pointer to the MARKER or NULL if index out of range.
|
||||||
|
*/
|
||||||
|
MARKER* GetMARKER( int index ) const
|
||||||
|
{
|
||||||
|
if( (unsigned) index < m_markers.size() )
|
||||||
|
return m_markers[index];
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetMARKERCount
|
||||||
|
* @return int - The number of MARKERS.
|
||||||
|
*/
|
||||||
|
int GetMARKERCount() const
|
||||||
|
{
|
||||||
|
return (int) m_markers.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Routines de calcul des nombres de segments pistes et zones */
|
||||||
|
int GetNumSegmTrack();
|
||||||
|
int GetNumSegmZone();
|
||||||
|
int GetNumNoconnect(); // retourne le nombre de connexions manquantes
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetNumRatsnests
|
||||||
|
* @return int - The number of rats
|
||||||
|
*/
|
||||||
|
int GetNumRatsnests()
|
||||||
|
{
|
||||||
|
return m_NbLinks;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetNumNodes(); // retourne le nombre de pads a netcode > 0
|
||||||
|
|
||||||
|
// Calcul du rectangle d'encadrement:
|
||||||
|
bool ComputeBoundaryBox();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Display_Infos
|
||||||
|
* has knowledge about the frame and how and where to put status information
|
||||||
|
* about this object into the frame's message panel.
|
||||||
|
* Is virtual from EDA_BaseStruct.
|
||||||
|
* @param frame A WinEDA_DrawFrame in which to print status information.
|
||||||
|
*/
|
||||||
|
void Display_Infos( WinEDA_DrawFrame* frame );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Visit
|
||||||
|
* may be re-implemented for each derived class in order to handle
|
||||||
|
* all the types given by its member data. Implementations should call
|
||||||
|
* inspector->Inspect() on types in scanTypes[], and may use IterateForward()
|
||||||
|
* to do so on lists of such data.
|
||||||
|
* @param inspector An INSPECTOR instance to use in the inspection.
|
||||||
|
* @param testData Arbitrary data used by the inspector.
|
||||||
|
* @param scanTypes Which KICAD_T types are of interest and the order
|
||||||
|
* is significant too, terminated by EOT.
|
||||||
|
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
|
||||||
|
* else SCAN_CONTINUE, and determined by the inspector.
|
||||||
|
*/
|
||||||
|
SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
|
||||||
|
const KICAD_T scanTypes[] );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function FindNet
|
||||||
|
* searches for a net with the given netcode.
|
||||||
|
* @param aNetcode A netcode to search for.
|
||||||
|
* @return EQUIPOT* - the net or NULL if not found.
|
||||||
|
*/
|
||||||
|
EQUIPOT* FindNet( int aNetcode ) const;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Save
|
||||||
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
||||||
|
* @param aFile The FILE to write to.
|
||||||
|
* @return bool - true if success writing else false.
|
||||||
|
*/
|
||||||
|
bool Save( FILE* aFile ) const;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetClass
|
||||||
|
* returns the class name.
|
||||||
|
* @return wxString
|
||||||
|
*/
|
||||||
|
wxString GetClass() const
|
||||||
|
{
|
||||||
|
return wxT( "BOARD" );
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(DEBUG)
|
||||||
|
/**
|
||||||
|
* Function Show
|
||||||
|
* is used to output the object tree, currently for debugging only.
|
||||||
|
* @param nestLevel An aid to prettier tree indenting, and is the level
|
||||||
|
* of nesting of this object within the overall tree.
|
||||||
|
* @param os The ostream& to output to.
|
||||||
|
*/
|
||||||
|
void Show( int nestLevel, std::ostream& os );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // #ifndef CLASS_BOARD_H
|
|
@ -0,0 +1,63 @@
|
||||||
|
/*************************************************/
|
||||||
|
/* class_drc_item.cpp - DRC_ITEM class functions */
|
||||||
|
/*************************************************/
|
||||||
|
#include "fctsys.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "pcbnew.h"
|
||||||
|
|
||||||
|
wxString DRC_ITEM::GetErrorText() const
|
||||||
|
{
|
||||||
|
switch( m_ErrorCode )
|
||||||
|
{
|
||||||
|
// case DRCE_: not assigned yet
|
||||||
|
|
||||||
|
case DRCE_UNCONNECTED_PADS:
|
||||||
|
return wxString( _("Unconnected pads") );
|
||||||
|
case DRCE_TRACK_NEAR_THROUGH_HOLE:
|
||||||
|
return wxString( _("Track near thru-hole") );
|
||||||
|
case DRCE_TRACK_NEAR_PAD:
|
||||||
|
return wxString( _("Track near pad") );
|
||||||
|
case DRCE_TRACK_NEAR_VIA:
|
||||||
|
return wxString( _("Track near via") );
|
||||||
|
case DRCE_VIA_NEAR_VIA:
|
||||||
|
return wxString( _("Via near via") );
|
||||||
|
case DRCE_VIA_NEAR_TRACK:
|
||||||
|
return wxString( _("Via near track") );
|
||||||
|
case DRCE_TRACK_ENDS1:
|
||||||
|
case DRCE_TRACK_ENDS2:
|
||||||
|
case DRCE_TRACK_ENDS3:
|
||||||
|
case DRCE_TRACK_ENDS4:
|
||||||
|
case DRCE_ENDS_PROBLEM1:
|
||||||
|
case DRCE_ENDS_PROBLEM2:
|
||||||
|
case DRCE_ENDS_PROBLEM3:
|
||||||
|
case DRCE_ENDS_PROBLEM4:
|
||||||
|
case DRCE_ENDS_PROBLEM5:
|
||||||
|
return wxString( _("Two track ends") );
|
||||||
|
case DRCE_TRACK_UNKNOWN1:
|
||||||
|
return wxString( _("This looks bad") ); ///< @todo check source code and change this comment
|
||||||
|
case DRCE_TRACKS_CROSSING:
|
||||||
|
return wxString( _("Tracks crossing") );
|
||||||
|
case DRCE_PAD_NEAR_PAD1:
|
||||||
|
return wxString( _("Pad near pad") );
|
||||||
|
case DRCE_VIA_HOLE_BIGGER:
|
||||||
|
return wxString( _("Via hole > diameter"));
|
||||||
|
|
||||||
|
default:
|
||||||
|
return wxString( wxT("PROGRAM BUG, PLEASE LEAVE THE ROOM.") );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
|
||||||
|
{
|
||||||
|
wxString temp;
|
||||||
|
wxString ret;
|
||||||
|
|
||||||
|
ret << wxT("@(") << valeur_param( aPos.x, temp );
|
||||||
|
ret << wxT(",") << valeur_param( aPos.y, temp );
|
||||||
|
ret << wxT(")");
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
/**********************************/
|
||||||
|
/* classes to handle copper zones */
|
||||||
|
/**********************************/
|
||||||
|
|
||||||
|
#include "fctsys.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
#include "gr_basic.h"
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "pcbnew.h"
|
||||||
|
|
||||||
|
/************************/
|
||||||
|
/* class ZONE_CONTAINER */
|
||||||
|
/************************/
|
||||||
|
|
||||||
|
ZONE_CONTAINER::ZONE_CONTAINER (BOARD * parent):
|
||||||
|
BOARD_ITEM (parent, TYPEZONE_CONTAINER)
|
||||||
|
{
|
||||||
|
m_NetCode = -1; // Net number for fast comparisons
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ZONE_CONTAINER::~ZONE_CONTAINER()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZONE_CONTAINER::Save( FILE* aFile ) const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************/
|
||||||
|
/* Class EDGE_ZONE */
|
||||||
|
/**********************/
|
||||||
|
|
||||||
|
/* Constructor */
|
||||||
|
EDGE_ZONE::EDGE_ZONE( BOARD_ITEM* parent ) :
|
||||||
|
DRAWSEGMENT( parent, TYPEEDGEZONE )
|
||||||
|
{
|
||||||
|
m_Width = 2; // a minimum for visibility, while dragging
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Destructor */
|
||||||
|
EDGE_ZONE:: ~EDGE_ZONE()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool EDGE_ZONE::Save( FILE* aFile ) const
|
||||||
|
{
|
||||||
|
if( GetState( DELETED ) )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
int ret = fprintf( aFile, "ZE %d %d %d %d %d %lX %X\n",
|
||||||
|
m_Start.x, m_Start.y,
|
||||||
|
m_End.x, m_End.y,
|
||||||
|
m_Angle,
|
||||||
|
m_TimeStamp,
|
||||||
|
ReturnStatus()
|
||||||
|
);
|
||||||
|
|
||||||
|
return (ret > 14 );
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
/**********************************/
|
||||||
|
/* classes to handle copper zones */
|
||||||
|
/**********************************/
|
||||||
|
|
||||||
|
#ifndef CLASS_ZONE_H
|
||||||
|
#define CLASS_ZONE_H
|
||||||
|
|
||||||
|
/************************/
|
||||||
|
/* class ZONE_CONTAINER */
|
||||||
|
/************************/
|
||||||
|
/* handle a list of polygons delimiting a copper zone
|
||||||
|
* a zone is described by a main polygon, a time stamp, a layer and a net name.
|
||||||
|
* others polygons inside this main polygon are holes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ZONE_CONTAINER : public BOARD_ITEM // Not sure BOARD_ITEM is better than EDA_BaseStruct
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxString m_Netname; /* Net Name */
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_NetCode; // Net number for fast comparisons
|
||||||
|
|
||||||
|
public:
|
||||||
|
ZONE_CONTAINER(BOARD * parent);
|
||||||
|
~ZONE_CONTAINER();
|
||||||
|
|
||||||
|
bool Save( FILE* aFile ) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*******************/
|
||||||
|
/* class EDGE_ZONE */
|
||||||
|
/*******************/
|
||||||
|
|
||||||
|
class EDGE_ZONE : public DRAWSEGMENT
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EDGE_ZONE( BOARD_ITEM* StructFather );
|
||||||
|
EDGE_ZONE( const EDGE_ZONE& edgezone );
|
||||||
|
~EDGE_ZONE();
|
||||||
|
|
||||||
|
EDGE_ZONE* Next() { return (EDGE_ZONE*) Pnext; }
|
||||||
|
|
||||||
|
EDGE_ZONE* Back() { return (EDGE_ZONE*) Pback; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function Save
|
||||||
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
||||||
|
* @param aFile The FILE to write to.
|
||||||
|
* @return bool - true if success writing else false.
|
||||||
|
*/
|
||||||
|
bool Save( FILE* aFile ) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // #ifndef CLASS_ZONE_H
|
|
@ -30,41 +30,6 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************/
|
|
||||||
/* Classe EDGE_ZONE */
|
|
||||||
/**********************/
|
|
||||||
|
|
||||||
/* Classe EDGE_ZONE: constructeur */
|
|
||||||
EDGE_ZONE::EDGE_ZONE( BOARD_ITEM* parent ) :
|
|
||||||
DRAWSEGMENT( parent, TYPEEDGEZONE )
|
|
||||||
{
|
|
||||||
m_Width = 2; // a minimum for visibility, while dragging
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Effacement memoire de la structure */
|
|
||||||
EDGE_ZONE:: ~EDGE_ZONE()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool EDGE_ZONE::Save( FILE* aFile ) const
|
|
||||||
{
|
|
||||||
if( GetState( DELETED ) )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
int ret = fprintf( aFile, "ZE %d %d %d %d %d %lX %X\n",
|
|
||||||
m_Start.x, m_Start.y,
|
|
||||||
m_End.x, m_End.y,
|
|
||||||
m_Angle,
|
|
||||||
m_TimeStamp,
|
|
||||||
ReturnStatus()
|
|
||||||
);
|
|
||||||
|
|
||||||
return (ret > 14 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
/* Classe DRAWSEGMENT */
|
/* Classe DRAWSEGMENT */
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
|
@ -34,7 +34,9 @@ OBJECTS= $(TARGET).o classpcb.o\
|
||||||
class_text_mod.o\
|
class_text_mod.o\
|
||||||
class_pcb_text.o\
|
class_pcb_text.o\
|
||||||
class_board_item.o\
|
class_board_item.o\
|
||||||
|
class_drc_item.o\
|
||||||
class_board.o\
|
class_board.o\
|
||||||
|
class_zone.o\
|
||||||
drawframe.o\
|
drawframe.o\
|
||||||
drawpanel.o\
|
drawpanel.o\
|
||||||
track.o \
|
track.o \
|
||||||
|
|
Loading…
Reference in New Issue