# HG changeset patch # User Mychaela Falconia # Date 1454282377 0 # Node ID b7f49f029bc34cb22dfb631a1bc8fbb61800bdfe # Parent e14cd5433e8397093aa8e6bbfd52f0b320d87889 pads2gpcb: use Cartesian Y axis direction internally diff -r e14cd5433e83 -r b7f49f029bc3 pads2gpcb/decals.c --- a/pads2gpcb/decals.c Sun Jan 31 22:59:36 2016 +0000 +++ b/pads2gpcb/decals.c Sun Jan 31 23:19:37 2016 +0000 @@ -102,7 +102,7 @@ continue; } x[i] = convert_input_dim(input_line_fields[0]); - y[i] = -convert_input_dim(input_line_fields[1]); + y[i] = convert_input_dim(input_line_fields[1]); } if (bad) return(1); @@ -149,7 +149,7 @@ continue; } x[i] = convert_input_dim(input_line_fields[0]); - y[i] = -convert_input_dim(input_line_fields[1]); + y[i] = convert_input_dim(input_line_fields[1]); } if (bad) return(1); @@ -267,7 +267,7 @@ exit(1); } pins_array[idx].x1 = convert_input_dim(input_line_fields[0]); - pins_array[idx].y1 = -convert_input_dim(input_line_fields[1]); + pins_array[idx].y1 = convert_input_dim(input_line_fields[1]); } static void @@ -472,7 +472,7 @@ else input_units_current = fpbody.src_units; fpbody.mark_x = convert_input_dim(input_line_fields[2]); - fpbody.mark_y = -convert_input_dim(input_line_fields[3]); + fpbody.mark_y = convert_input_dim(input_line_fields[3]); num_drawing_pieces = atoi(input_line_fields[4]); fpbody.npins = atoi(input_line_fields[5]); num_padstack_defs = atoi(input_line_fields[6]); diff -r e14cd5433e83 -r b7f49f029bc3 pads2gpcb/partinst.c --- a/pads2gpcb/partinst.c Sun Jan 31 22:59:36 2016 +0000 +++ b/pads2gpcb/partinst.c Sun Jan 31 23:19:37 2016 +0000 @@ -117,7 +117,7 @@ printf("Processing part instance %s\n", our_part->name); find_type_and_decal(); our_part->mark_x = convert_input_dim(input_line_fields[2]); - our_part->mark_y = -convert_input_dim(input_line_fields[3]); + our_part->mark_y = convert_input_dim(input_line_fields[3]); our_part->ori = parse_input_angle_90s(input_line_fields[4]); if (!strcmp(input_line_fields[6], "N")) our_part->onbottom = 0; diff -r e14cd5433e83 -r b7f49f029bc3 pads2gpcb/writeelem.c --- a/pads2gpcb/writeelem.c Sun Jan 31 22:59:36 2016 +0000 +++ b/pads2gpcb/writeelem.c Sun Jan 31 23:19:37 2016 +0000 @@ -17,9 +17,9 @@ char *flagstr; mx_str = output_gpcb_dimension(body->mark_x, mx_buf); - my_str = output_gpcb_dimension(body->mark_y, my_buf); + my_str = output_gpcb_dimension(-body->mark_y, my_buf); tx_str = output_gpcb_dimension(body->refdes_x, tx_buf); - ty_str = output_gpcb_dimension(body->refdes_y, ty_buf); + ty_str = output_gpcb_dimension(-body->refdes_y, ty_buf); flagstr = onbottom ? "onsolder" : ""; fprintf(outf, @@ -45,9 +45,9 @@ char *flagstr; x1_str = output_gpcb_dimension(pad->x1, x1_buf); - y1_str = output_gpcb_dimension(pad->y1, y1_buf); + y1_str = output_gpcb_dimension(-pad->y1, y1_buf); x2_str = output_gpcb_dimension(pad->x2, x2_buf); - y2_str = output_gpcb_dimension(pad->y2, y2_buf); + y2_str = output_gpcb_dimension(-pad->y2, y2_buf); thickness_str = output_gpcb_dimension(pad->thickness, thickness_buf); clearance_str = output_gpcb_dimension(pad->clearance, clearance_buf); mask_str = output_gpcb_dimension(pad->mask, mask_buf); @@ -79,9 +79,9 @@ char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str; x1_str = output_gpcb_dimension(obj->x1, x1_buf); - y1_str = output_gpcb_dimension(obj->y1, y1_buf); + y1_str = output_gpcb_dimension(-obj->y1, y1_buf); x2_str = output_gpcb_dimension(obj->x2, x2_buf); - y2_str = output_gpcb_dimension(obj->y2, y2_buf); + y2_str = output_gpcb_dimension(-obj->y2, y2_buf); thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf); fprintf(outf, "\tElementLine[%s %s %s %s %s]\n", @@ -100,7 +100,7 @@ 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); + 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);