gerbv
2.10.1-dev~93f1b5
|
Go to the source code of this file.
Functions | |
static void | parse_G_code (gerb_file_t *fd, gerb_state_t *state, gerbv_image_t *image, long int *line_num_p) |
static void | parse_D_code (gerb_file_t *fd, gerb_state_t *state, gerbv_image_t *image, long int *line_num_p) |
gboolean | gerber_parse_file_segment (gint levelOfRecursion, gerbv_image_t *image, gerb_state_t *state, gerbv_net_t *curr_net, gerbv_stats_t *stats, gerb_file_t *fd, gchar *directoryPath) |
gerbv_image_t * | parse_gerb (gerb_file_t *fd, gchar *directoryPath) |
gboolean | gerber_is_rs274x_p (gerb_file_t *fd, gboolean *returnFoundBinary) |
gboolean | gerber_is_rs274d_p (gerb_file_t *fd) |
const char * | gerber_d_code_name (int d_code) |
const char * | gerber_g_code_name (int g_code) |
const char * | gerber_m_code_name (int m_code) |
RS274X parsing functions.
Definition in file gerber.c.
gboolean gerber_is_rs274d_p | ( | gerb_file_t * | fd | ) |
gboolean gerber_is_rs274x_p | ( | gerb_file_t * | fd, |
gboolean * | returnFoundBinary | ||
) |
gboolean gerber_parse_file_segment | ( | gint | levelOfRecursion, |
gerbv_image_t * | image, | ||
gerb_state_t * | state, | ||
gerbv_net_t * | curr_net, | ||
gerbv_stats_t * | stats, | ||
gerb_file_t * | fd, | ||
gchar * | directoryPath | ||
) |
This function reads the Gerber file char by char, looking for various Gerber codes (e.g. G, D, etc). Once it reads a code, it then dispatches control to one or another bits of code which parse the individual code. It also updates the state struct, which holds info about the current state of the hypothetical photoplotter (i.e. updates whether the aperture is on or off, updates any other parameters, like units, offsets, apertures, etc.)
Definition at line 130 of file gerber.c.
Referenced by parse_gerb().
|
static |
This function reads the numeric value of a D code and updates the state. It also updates the D stats counters
Definition at line 1071 of file gerber.c.
References gerbv_image_t::gerbv_stats.
|
static |
This function reads a G number and updates the current state. It also updates the G stats counters
Definition at line 926 of file gerber.c.
References gerbv_image_t::format, and gerbv_image_t::gerbv_stats.
gerbv_image_t* parse_gerb | ( | gerb_file_t * | fd, |
gchar * | directoryPath | ||
) |
This is a wrapper which gets called from top level. It does some initialization and pre-processing, and then calls gerber_parse_file_segment which processes the actual file. Then it does final modifications to the image created.
Definition at line 692 of file gerber.c.
References gerber_parse_file_segment(), gerbv_create_image(), GERBV_LAYERTYPE_RS274X, gerbv_image_t::gerbv_stats, gerbv_stats_new(), gerbv_net::layer, gerbv_image_t::layers, gerbv_image_t::layertype, gerbv_image_t::netlist, gerbv_net::state, and gerbv_image_t::states.