2009-11-09 14:00:22 +00:00
|
|
|
/**************/
|
|
|
|
/* gerbview.h */
|
|
|
|
/**************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef GERBVIEW_H
|
|
|
|
#define GERBVIEW_H
|
|
|
|
|
2008-11-08 06:44:07 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <set>
|
|
|
|
|
2010-09-28 14:42:05 +00:00
|
|
|
#include "dcode.h"
|
2010-10-01 19:11:30 +00:00
|
|
|
#include "class_gerber_draw_item.h"
|
|
|
|
#include "class_aperture_macro.h"
|
2008-11-08 06:44:07 +00:00
|
|
|
|
2010-10-10 17:57:54 +00:00
|
|
|
#define CURSEUR_ON_GRILLE 0
|
|
|
|
#define CURSEUR_OFF_GRILLE 1
|
|
|
|
|
2011-03-12 09:50:21 +00:00
|
|
|
class GERBVIEW_FRAME;
|
2010-10-06 17:28:07 +00:00
|
|
|
//class BOARD;
|
|
|
|
|
2010-10-16 14:51:22 +00:00
|
|
|
class GERBER_IMAGE;
|
2009-02-04 15:25:03 +00:00
|
|
|
|
2009-11-09 14:00:22 +00:00
|
|
|
// Type of photoplotter action:
|
|
|
|
#define GERB_ACTIVE_DRAW 1 // Activate light (lower pen)
|
|
|
|
#define GERB_STOP_DRAW 2 // Extinguish light (lift pen)
|
2007-11-02 09:58:42 +00:00
|
|
|
#define GERB_FLASH 3 // Flash
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-11-09 14:00:22 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2007-11-02 09:58:42 +00:00
|
|
|
FORMAT_HPGL,
|
|
|
|
FORMAT_GERBER,
|
|
|
|
FORMAT_POST
|
|
|
|
} PlotFormat;
|
|
|
|
|
2010-01-29 20:36:12 +00:00
|
|
|
/**
|
|
|
|
* Enum ITEM_VISIBLE
|
|
|
|
* is a set of visible PCB elements.
|
|
|
|
*/
|
2010-02-03 14:05:17 +00:00
|
|
|
enum GERBER_VISIBLE
|
2010-01-29 20:36:12 +00:00
|
|
|
{
|
2010-02-03 14:05:17 +00:00
|
|
|
DCODES_VISIBLE = 1, // visible item id cannot be 0 because this id is used as wxWidget id
|
|
|
|
GERBER_GRID_VISIBLE,
|
|
|
|
END_GERBER_VISIBLE_LIST // sentinel
|
2010-01-29 20:36:12 +00:00
|
|
|
};
|
2008-11-08 06:44:07 +00:00
|
|
|
|
2010-10-06 17:28:07 +00:00
|
|
|
/**
|
|
|
|
* size of single line of a text from a gerber file.
|
|
|
|
* warning: some files can have very long lines, so the buffer must be large.
|
|
|
|
*/
|
|
|
|
#define GERBER_BUFZ 4000
|
|
|
|
|
|
|
|
extern int g_DisplayPolygonsModeSketch;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-22 20:55:05 +00:00
|
|
|
extern const wxString GerbviewProjectFileExt;
|
|
|
|
extern const wxString GerbviewProjectFileWildcard;
|
|
|
|
|
|
|
|
extern Ki_PageDescr* g_GerberPageSizeList[];
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
// Interpolation type
|
2009-11-09 14:00:22 +00:00
|
|
|
enum Gerb_Interpolation
|
|
|
|
{
|
2007-11-02 09:58:42 +00:00
|
|
|
GERB_INTERPOL_LINEAR_1X = 0,
|
|
|
|
GERB_INTERPOL_LINEAR_10X,
|
|
|
|
GERB_INTERPOL_LINEAR_01X,
|
|
|
|
GERB_INTERPOL_LINEAR_001X,
|
|
|
|
GERB_INTERPOL_ARC_NEG,
|
2010-10-04 12:58:07 +00:00
|
|
|
GERB_INTERPOL_ARC_POS
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Command Type (GCodes)
|
2009-11-09 14:00:22 +00:00
|
|
|
enum Gerb_GCommand
|
|
|
|
{
|
|
|
|
GC_MOVE = 0,
|
|
|
|
GC_LINEAR_INTERPOL_1X = 1,
|
|
|
|
GC_CIRCLE_NEG_INTERPOL = 2,
|
|
|
|
GC_CIRCLE_POS_INTERPOL = 3,
|
|
|
|
GC_COMMENT = 4,
|
|
|
|
GC_LINEAR_INTERPOL_10X = 10,
|
|
|
|
GC_LINEAR_INTERPOL_0P1X = 11,
|
|
|
|
GC_LINEAR_INTERPOL_0P01X = 12,
|
2007-11-02 09:58:42 +00:00
|
|
|
GC_TURN_ON_POLY_FILL = 36,
|
|
|
|
GC_TURN_OFF_POLY_FILL = 37,
|
2009-11-09 14:00:22 +00:00
|
|
|
GC_SELECT_TOOL = 54,
|
|
|
|
GC_PHOTO_MODE = 55, // can start a D03 flash command: redundant with D03
|
|
|
|
GC_SPECIFY_INCHES = 70,
|
2007-11-02 09:58:42 +00:00
|
|
|
GC_SPECIFY_MILLIMETERS = 71,
|
|
|
|
GC_TURN_OFF_360_INTERPOL = 74,
|
|
|
|
GC_TURN_ON_360_INTERPOL = 75,
|
|
|
|
GC_SPECIFY_ABSOLUES_COORD = 90,
|
|
|
|
GC_SPECIFY_RELATIVEES_COORD = 91
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-11-09 14:00:22 +00:00
|
|
|
enum Gerb_Analyse_Cmd
|
|
|
|
{
|
2007-11-02 09:58:42 +00:00
|
|
|
CMD_IDLE = 0,
|
|
|
|
END_BLOCK,
|
|
|
|
ENTER_RS274X_CMD
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2008-11-07 07:55:28 +00:00
|
|
|
|
|
|
|
/**************/
|
|
|
|
/* rs274x.cpp */
|
|
|
|
/**************/
|
|
|
|
bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file );
|
2010-10-16 14:51:22 +00:00
|
|
|
extern GERBER_IMAGE* g_GERBER_List[32];
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
#include "pcbcommon.h"
|
2011-03-13 18:03:43 +00:00
|
|
|
#include "gerbview_frame.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
#endif // ifndef GERBVIEW_H
|