FreeCalypso > hg > ueda-linux
comparison pads2gpcb/writeelem.c @ 56:dbf999b71c53
pads2gpcb/writeelem.c: ElementLine writing implemented
| author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
|---|---|
| date | Sun, 31 Jan 2016 02:25:15 +0000 |
| parents | c81aba92cb5e |
| children | d0d330ae5b99 |
comparison
equal
deleted
inserted
replaced
| 55:e93375570f91 | 56:dbf999b71c53 |
|---|---|
| 65 x1_str, y1_str, x2_str, y2_str, | 65 x1_str, y1_str, x2_str, y2_str, |
| 66 thickness_str, clearance_str, mask_str, | 66 thickness_str, clearance_str, mask_str, |
| 67 pinname, pinnumber, flagstr); | 67 pinname, pinnumber, flagstr); |
| 68 } | 68 } |
| 69 | 69 |
| 70 static void | |
| 71 emit_elementline_obj(outf, obj) | |
| 72 FILE *outf; | |
| 73 struct element_line *obj; | |
| 74 { | |
| 75 char x1_buf[DIM_OUT_BUFSIZE], *x1_str; | |
| 76 char y1_buf[DIM_OUT_BUFSIZE], *y1_str; | |
| 77 char x2_buf[DIM_OUT_BUFSIZE], *x2_str; | |
| 78 char y2_buf[DIM_OUT_BUFSIZE], *y2_str; | |
| 79 char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str; | |
| 80 | |
| 81 x1_str = output_gpcb_dimension(obj->x1, x1_buf); | |
| 82 y1_str = output_gpcb_dimension(obj->y1, y1_buf); | |
| 83 x2_str = output_gpcb_dimension(obj->x2, x2_buf); | |
| 84 y2_str = output_gpcb_dimension(obj->y2, y2_buf); | |
| 85 thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf); | |
| 86 | |
| 87 fprintf(outf, "\tElementLine[%s %s %s %s %s]\n", | |
| 88 x1_str, y1_str, x2_str, y2_str, thickness_str); | |
| 89 } | |
| 90 | |
| 70 write_gpcb_element(outf, body, alpha_pins, strdesc, strname, strvalue, onbottom) | 91 write_gpcb_element(outf, body, alpha_pins, strdesc, strname, strvalue, onbottom) |
| 71 FILE *outf; | 92 FILE *outf; |
| 72 struct footprint_body *body; | 93 struct footprint_body *body; |
| 73 char **alpha_pins; | 94 char **alpha_pins; |
| 74 char *strdesc, *strname, *strvalue; | 95 char *strdesc, *strname, *strvalue; |
| 86 sprintf(pinnum_buf, "%d", i + 1); | 107 sprintf(pinnum_buf, "%d", i + 1); |
| 87 pinnum_str = pinnum_buf; | 108 pinnum_str = pinnum_buf; |
| 88 } | 109 } |
| 89 emit_pad_line(outf, body->pins + i, "", pinnum_str, onbottom); | 110 emit_pad_line(outf, body->pins + i, "", pinnum_str, onbottom); |
| 90 } | 111 } |
| 112 for (i = 0; i < body->num_silk_lines; i++) | |
| 113 emit_elementline_obj(outf, body->silk_lines + i); | |
| 91 fputs(")\n", outf); | 114 fputs(")\n", outf); |
| 92 return(0); | 115 return(0); |
| 93 } | 116 } |
