changeset 57:d0d330ae5b99

pads2gpcb/writeelem.c: ElementArc writing implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 31 Jan 2016 02:36:02 +0000
parents dbf999b71c53
children 05fd0b432e8c
files pads2gpcb/writeelem.c
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pads2gpcb/writeelem.c	Sun Jan 31 02:25:15 2016 +0000
+++ b/pads2gpcb/writeelem.c	Sun Jan 31 02:36:02 2016 +0000
@@ -88,6 +88,28 @@
 		x1_str, y1_str, x2_str, y2_str, thickness_str);
 }
 
+static void
+emit_elementarc_obj(outf, obj)
+	FILE *outf;
+	struct element_arc *obj;
+{
+	char centrex_buf[DIM_OUT_BUFSIZE], *centrex_str;
+	char centrey_buf[DIM_OUT_BUFSIZE], *centrey_str;
+	char width_buf[DIM_OUT_BUFSIZE], *width_str;
+	char height_buf[DIM_OUT_BUFSIZE], *height_str;
+	char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str;
+
+	centrex_str = output_gpcb_dimension(obj->centre_x, centrex_buf);
+	centrey_str = output_gpcb_dimension(obj->centre_y, centrey_buf);
+	width_str = output_gpcb_dimension(obj->width, width_buf);
+	height_str = output_gpcb_dimension(obj->height, height_buf);
+	thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf);
+
+	fprintf(outf, "\tElementArc[%s %s %s %s %d %d %s]\n",
+		centrex_str, centrey_str, width_str, height_str,
+		obj->start_angle, obj->delta_angle, thickness_str);
+}
+
 write_gpcb_element(outf, body, alpha_pins, strdesc, strname, strvalue, onbottom)
 	FILE *outf;
 	struct footprint_body *body;
@@ -111,6 +133,8 @@
 	}
 	for (i = 0; i < body->num_silk_lines; i++)
 		emit_elementline_obj(outf, body->silk_lines + i);
+	for (i = 0; i < body->num_silk_arcs; i++)
+		emit_elementarc_obj(outf, body->silk_arcs + i);
 	fputs(")\n", outf);
 	return(0);
 }