FreeCalypso > hg > ueda-linux
comparison pads2gpcb/writeelem.c @ 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 | b7f49f029bc3 |
comparison
equal
deleted
inserted
replaced
56:dbf999b71c53 | 57:d0d330ae5b99 |
---|---|
86 | 86 |
87 fprintf(outf, "\tElementLine[%s %s %s %s %s]\n", | 87 fprintf(outf, "\tElementLine[%s %s %s %s %s]\n", |
88 x1_str, y1_str, x2_str, y2_str, thickness_str); | 88 x1_str, y1_str, x2_str, y2_str, thickness_str); |
89 } | 89 } |
90 | 90 |
91 static void | |
92 emit_elementarc_obj(outf, obj) | |
93 FILE *outf; | |
94 struct element_arc *obj; | |
95 { | |
96 char centrex_buf[DIM_OUT_BUFSIZE], *centrex_str; | |
97 char centrey_buf[DIM_OUT_BUFSIZE], *centrey_str; | |
98 char width_buf[DIM_OUT_BUFSIZE], *width_str; | |
99 char height_buf[DIM_OUT_BUFSIZE], *height_str; | |
100 char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str; | |
101 | |
102 centrex_str = output_gpcb_dimension(obj->centre_x, centrex_buf); | |
103 centrey_str = output_gpcb_dimension(obj->centre_y, centrey_buf); | |
104 width_str = output_gpcb_dimension(obj->width, width_buf); | |
105 height_str = output_gpcb_dimension(obj->height, height_buf); | |
106 thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf); | |
107 | |
108 fprintf(outf, "\tElementArc[%s %s %s %s %d %d %s]\n", | |
109 centrex_str, centrey_str, width_str, height_str, | |
110 obj->start_angle, obj->delta_angle, thickness_str); | |
111 } | |
112 | |
91 write_gpcb_element(outf, body, alpha_pins, strdesc, strname, strvalue, onbottom) | 113 write_gpcb_element(outf, body, alpha_pins, strdesc, strname, strvalue, onbottom) |
92 FILE *outf; | 114 FILE *outf; |
93 struct footprint_body *body; | 115 struct footprint_body *body; |
94 char **alpha_pins; | 116 char **alpha_pins; |
95 char *strdesc, *strname, *strvalue; | 117 char *strdesc, *strname, *strvalue; |
109 } | 131 } |
110 emit_pad_line(outf, body->pins + i, "", pinnum_str, onbottom); | 132 emit_pad_line(outf, body->pins + i, "", pinnum_str, onbottom); |
111 } | 133 } |
112 for (i = 0; i < body->num_silk_lines; i++) | 134 for (i = 0; i < body->num_silk_lines; i++) |
113 emit_elementline_obj(outf, body->silk_lines + i); | 135 emit_elementline_obj(outf, body->silk_lines + i); |
136 for (i = 0; i < body->num_silk_arcs; i++) | |
137 emit_elementarc_obj(outf, body->silk_arcs + i); | |
114 fputs(")\n", outf); | 138 fputs(")\n", outf); |
115 return(0); | 139 return(0); |
116 } | 140 } |