view pads2gpcb/struct.h @ 65:2b71943a311b

pads2gpcb: PART section parsing implemented, compiles
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 31 Jan 2016 21:32:08 +0000
parents 455a0051f9d2
children a7f0e9bb3fb7
line wrap: on
line source

struct pad_shape_info {
	int	defined;
	int	valid;
	int	rounded;
	int	elongated;
	long	short_dim;
	long	long_dim;
	int	angle;
};

struct footprint_pad {
	long	x1;
	long	y1;
	long	x2;
	long	y2;
	long	thickness;
	long	clearance;
	long	mask;
	struct	pad_shape_info shape;
};

struct element_line {
	long	x1;
	long	y1;
	long	x2;
	long	y2;
	long	thickness;
};

struct element_arc {
	long	centre_x;
	long	centre_y;
	long	width;
	long	height;
	int	start_angle;
	int	delta_angle;
	long	thickness;
};

struct footprint_body {
	int	src_units;
	int	npins;
	struct	footprint_pad *pins;
	struct	pad_shape_info default_pad;
	long	mark_x;
	long	mark_y;
	long	refdes_x;
	long	refdes_y;
	int	refdes_dir;
	int	refdes_scale;
	struct	element_line *silk_lines;
	struct	element_arc *silk_arcs;
	int	num_silk_lines;
	int	num_silk_arcs;
};

struct part_decal {
	char	*name;
	struct	footprint_body *body;
	struct	part_decal *next;
};

#define	MAX_DECALS_PER_PART_TYPE	16

struct part_type {
	char	*name;
	int	ndecals;
	struct	part_decal *decals[MAX_DECALS_PER_PART_TYPE];
	int	num_alpha_pins;
	char	**alpha_pins;
	struct	part_type *next;
};

struct part_instance {
	char	*name;
	char	*newname;
	struct	part_type *type;
	struct	part_decal *decal;
	long	mark_x;
	long	mark_y;
	int	ori;
	int	onbottom;
	struct	footprint_body *body;
	struct	part_instance *next;
};