gerbv  2.10.1-dev~93f1b5
drill.h
Go to the documentation of this file.
1 /*
2  * gEDA - GNU Electronic Design Automation
3  * drill.h
4  * Copyright (C) 2000-2001 Stefan Petersen (spe@stacken.kth.se)
5  *
6  * $Id$
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
21  */
22 
28 #ifndef DRILL_H
29 #define DRILL_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #include <stdio.h>
36 #include <glib.h>
37 #include "gerb_image.h"
38 #include "gerb_file.h"
39 
40 #define TOOL_MIN 1 /* T00 code is reserved for unload tool command */
41 #define TOOL_MAX 9999
42 
43 gerbv_image_t* parse_drillfile(gerb_file_t* fd, gerbv_HID_Attribute* attr_list, int n_attr, int reload);
44 gboolean drill_file_p(gerb_file_t* fd, gboolean* returnFoundBinary);
45 
46 /* NOTE: keep drill_g_code_t in actual G code order. */
47 typedef enum {
48  DRILL_G_UNKNOWN = -1,
49 
50  DRILL_G_ROUT = 0, /* Route mode */
51  DRILL_G_LINEARMOVE, /* Linear (straight line) mode */
52  DRILL_G_CWMOVE, /* Circular CW mode */
53  DRILL_G_CCWMOVE, /* Circular CCW mode */
54  DRILL_G_VARIABLEDWELL, /* Variable dwell */
55  DRILL_G_DRILL, /* Drill mode */
56 
57  DRILL_G_OVERRIDETOOLSPEED = 7, /* Override current tool feed or speed */
58 
59  DRILL_G_ROUTCIRCLE = 32, /* Routed circle canned cycle CW */
60  DRILL_G_ROUTCIRCLECCW, /* Routed circle canned cycle CCW */
61  DRILL_G_VISTOOL, /* Select vision tool */
62  DRILL_G_VISSINGLEPOINTOFFSET, /* Single point vision offset */
63  DRILL_G_VISMULTIPOINTTRANS, /* Multipoint vision translation */
64  DRILL_G_VISCANCEL, /* Cancel vision translation or offset */
65  DRILL_G_VISCORRHOLEDRILL, /* Vision corrected single hole drilling */
66  DRILL_G_VISAUTOCALIBRATION, /* Vision system autocalibration */
67  DRILL_G_CUTTERCOMPOFF, /* Cutter compensation off */
68  DRILL_G_CUTTERCOMPLEFT, /* Cutter compensation left */
69  DRILL_G_CUTTERCOMPRIGHT, /* Cutter compensation right */
70 
71  DRILL_G_VISSINGLEPOINTOFFSETREL = 45, /* Single point vision offset
72  relative to G35 or G36 */
73  DRILL_G_VISMULTIPOINTTRANSREL, /* Multipoint vision translation
74  relative to G35 or G36 */
75  DRILL_G_VISCANCELREL, /* Cancel vision translation or offset
76  from G45 or G46 */
77  DRILL_G_VISCORRHOLEDRILLREL, /* Vision corrected single hole drilling
78  relative to G35 or G36 */
79  DRILL_G_PACKDIP2 = 81, /* Dual in line package, same to G82 in Format2 */
80  DRILL_G_PACKDIP, /* Dual in line package */
81  DRILL_G_PACK8PINL, /* Eight pin L pack */
82  DRILL_G_CIRLE, /* Canned circle */
83  DRILL_G_SLOT, /* Canned slot */
84 
85  DRILL_G_ROUTSLOT = 87, /* Routed slot canned cycle */
86 
87  DRILL_G_ABSOLUTE = 90, /* Absolute input mode */
88  DRILL_G_INCREMENTAL, /* Incremental input mode */
89 
90  DRILL_G_ZEROSET = 93, /* Sets work zero relative to absolute zero */
91 } drill_g_code_t;
92 
93 /* NOTE: keep drill_m_code_t in actual M code order. */
94 typedef enum {
95  DRILL_M_UNKNOWN = -1,
96 
97  DRILL_M_END = 0,
98  DRILL_M_PATTERNEND,
99  DRILL_M_REPEATPATTERNOFFSET,
100 
101  DRILL_M_STOPOPTIONAL = 6,
102 
103  DRILL_M_SANDREND = 8, /* Step and repeat */
104  DRILL_M_STOPINSPECTION,
105 
106  DRILL_M_ZAXISROUTEPOSITIONDEPTHCTRL = 14,
107  DRILL_M_ZAXISROUTEPOSITION,
108  DRILL_M_RETRACTCLAMPING,
109  DRILL_M_RETRACTNOCLAMPING,
110  DRILL_M_TOOLTIPCHECK,
111 
112  DRILL_M_PATTERN = 25,
113  DRILL_M_ENDREWIND = 30,
114  DRILL_M_MESSAGELONG = 45,
115 
116  DRILL_M_MESSAGE = 47,
117  DRILL_M_HEADER,
118 
119  DRILL_M_VISANDRPATTERN = 50, /* Visual step and repeat */
120  DRILL_M_VISANDRPATTERNREWIND,
121  DRILL_M_VISANDRPATTERNOFFSETCOUNTERCTRL,
122 
123  DRILL_M_REFSCALING = 60, /* Reference scaling */
124  DRILL_M_REFSCALINGEND,
125  DRILL_M_PECKDRILLING,
126  DRILL_M_PECKDRILLINGEND,
127 
128  DRILL_M_SWAPAXIS = 70,
129  DRILL_M_METRIC,
130  DRILL_M_IMPERIAL,
131 
132  DRILL_M_MIRRORX = 80,
133  DRILL_M_MIRRORY = 90,
134  DRILL_M_HEADEREND = 95,
135 
136  DRILL_M_CANNEDTEXTX = 97,
137  DRILL_M_CANNEDTEXTY,
138  DRILL_M_USERDEFPATTERN,
139 } drill_m_code_t;
140 
141 const char* drill_g_code_name(drill_g_code_t g_code);
142 const char* drill_m_code_name(drill_m_code_t m_code);
143 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif /* DRILL_H */
const char * drill_g_code_name(drill_g_code_t g_code)
Return drill G-code name by code number.
Definition: drill.c:2020
const char * drill_m_code_name(drill_m_code_t m_code)
Return drill M-code name by code number.
Definition: drill.c:2062
Header info for the file parsing support functions.
Header info for the image editing and support functions.