gerbv
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,
44  int n_attr, int reload);
45 gboolean drill_file_p(gerb_file_t *fd, gboolean *returnFoundBinary);
46 
47 /* NOTE: keep drill_g_code_t in actual G code order. */
48 typedef enum {
49  DRILL_G_UNKNOWN = -1,
50 
51  DRILL_G_ROUT = 0, /* Route mode */
52  DRILL_G_LINEARMOVE, /* Linear (straight line) mode */
53  DRILL_G_CWMOVE, /* Circular CW mode */
54  DRILL_G_CCWMOVE, /* Circular CCW mode */
55  DRILL_G_VARIABLEDWELL, /* Variable dwell */
56  DRILL_G_DRILL, /* Drill mode */
57 
58  DRILL_G_OVERRIDETOOLSPEED = 7, /* Override current tool feed or speed */
59 
60  DRILL_G_ROUTCIRCLE = 32, /* Routed circle canned cycle CW */
61  DRILL_G_ROUTCIRCLECCW, /* Routed circle canned cycle CCW */
62  DRILL_G_VISTOOL, /* Select vision tool */
63  DRILL_G_VISSINGLEPOINTOFFSET, /* Single point vision offset */
64  DRILL_G_VISMULTIPOINTTRANS, /* Multipoint vision translation */
65  DRILL_G_VISCANCEL, /* Cancel vision translation or offset */
66  DRILL_G_VISCORRHOLEDRILL, /* Vision corrected single hole drilling */
67  DRILL_G_VISAUTOCALIBRATION, /* Vision system autocalibration */
68  DRILL_G_CUTTERCOMPOFF, /* Cutter compensation off */
69  DRILL_G_CUTTERCOMPLEFT, /* Cutter compensation left */
70  DRILL_G_CUTTERCOMPRIGHT, /* Cutter compensation right */
71 
72  DRILL_G_VISSINGLEPOINTOFFSETREL = 45, /* Single point vision offset
73  relative to G35 or G36 */
74  DRILL_G_VISMULTIPOINTTRANSREL, /* Multipoint vision translation
75  relative to G35 or G36 */
76  DRILL_G_VISCANCELREL, /* Cancel vision translation or offset
77  from G45 or G46 */
78  DRILL_G_VISCORRHOLEDRILLREL, /* Vision corrected single hole drilling
79  relative to G35 or G36 */
80  DRILL_G_PACKDIP2 = 81,/* Dual in line package, same to G82 in Format2 */
81  DRILL_G_PACKDIP, /* Dual in line package */
82  DRILL_G_PACK8PINL, /* Eight pin L pack */
83  DRILL_G_CIRLE, /* Canned circle */
84  DRILL_G_SLOT, /* Canned slot */
85 
86  DRILL_G_ROUTSLOT = 87, /* Routed slot canned cycle */
87 
88  DRILL_G_ABSOLUTE = 90, /* Absolute input mode */
89  DRILL_G_INCREMENTAL, /* Incremental input mode */
90 
91  DRILL_G_ZEROSET = 93, /* Sets work zero relative to absolute zero */
92 } drill_g_code_t;
93 
94 /* NOTE: keep drill_m_code_t in actual M code order. */
95 typedef enum {
96  DRILL_M_UNKNOWN = -1,
97 
98  DRILL_M_END = 0,
99  DRILL_M_PATTERNEND,
100  DRILL_M_REPEATPATTERNOFFSET,
101 
102  DRILL_M_STOPOPTIONAL = 6,
103 
104  DRILL_M_SANDREND = 8, /* Step and repeat */
105  DRILL_M_STOPINSPECTION,
106 
107  DRILL_M_ZAXISROUTEPOSITIONDEPTHCTRL = 14,
108  DRILL_M_ZAXISROUTEPOSITION,
109  DRILL_M_RETRACTCLAMPING,
110  DRILL_M_RETRACTNOCLAMPING,
111  DRILL_M_TOOLTIPCHECK,
112 
113  DRILL_M_PATTERN = 25,
114  DRILL_M_ENDREWIND = 30,
115  DRILL_M_MESSAGELONG = 45,
116 
117  DRILL_M_MESSAGE = 47,
118  DRILL_M_HEADER,
119 
120  DRILL_M_VISANDRPATTERN = 50, /* Visual step and repeat */
121  DRILL_M_VISANDRPATTERNREWIND,
122  DRILL_M_VISANDRPATTERNOFFSETCOUNTERCTRL,
123 
124  DRILL_M_REFSCALING = 60, /* Reference scaling */
125  DRILL_M_REFSCALINGEND,
126  DRILL_M_PECKDRILLING,
127  DRILL_M_PECKDRILLINGEND,
128 
129  DRILL_M_SWAPAXIS = 70,
130  DRILL_M_METRIC,
131  DRILL_M_IMPERIAL,
132 
133  DRILL_M_MIRRORX = 80,
134  DRILL_M_MIRRORY = 90,
135  DRILL_M_HEADEREND = 95,
136 
137  DRILL_M_CANNEDTEXTX = 97,
138  DRILL_M_CANNEDTEXTY,
139  DRILL_M_USERDEFPATTERN,
140 } drill_m_code_t;
141 
142 const char *drill_g_code_name(drill_g_code_t g_code);
143 const char *drill_m_code_name(drill_m_code_t m_code);
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #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:2510
const char * drill_m_code_name(drill_m_code_t m_code)
Return drill M-code name by code number.
Definition: drill.c:2584
Header info for the file parsing support functions.
Header info for the image editing and support functions.