Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 17094) +++ trunk/src/buffer.c (revision 17095) @@ -431,7 +431,7 @@ PCB_PADSTACK_LOOP(Buffer->Data); { - pcb_pstk_mirror(padstack, 0, 1, 0); + pcb_pstk_mirror(padstack, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0); } PCB_END_LOOP; PCB_LINE_ALL_LOOP(Buffer->Data); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 17094) +++ trunk/src/obj_pstk.c (revision 17095) @@ -861,7 +861,7 @@ /* if mirror center is not 0, also move, to emulate that the mirror took place around that point */ - if (y_offs != 0) { + if (((y_offs != 0) || (ps->y != 0)) && (y_offs != PCB_PSTK_DONT_MIRROR_COORDS)) { pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_erase(ps); if (ps->parent.data->padstack_tree != NULL) Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 17094) +++ trunk/src/obj_pstk.h (revision 17095) @@ -187,10 +187,12 @@ void pcb_pstk_proto_del_shape(pcb_pstk_proto_t *proto, pcb_layer_type_t lyt, pcb_layer_combining_t comb); void pcb_pstk_proto_del_shape_idx(pcb_pstk_proto_t *proto, int idx); +#define PCB_PSTK_DONT_MIRROR_COORDS PCB_MAX_COORD /* Mirror a padstack (useful for sending to the other side - set swap_side to 1 in that case) Disabling xmirror is useful if side needs to be swapped but coordinates are already mirrored so they represent the other-side geometry (e.g. when - importing from old pcb formats) */ + importing from old pcb formats). If y_offs is PCB_PSTK_DONT_MIRROR_COORDS, + do not change the y coord */ void pcb_pstk_mirror(pcb_pstk_t *ps, pcb_coord_t y_offs, int swap_side, int disable_xmirror); /* Rotate in place (op wrapper) */ Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 17094) +++ trunk/src_plugins/io_lihata/read.c (revision 17095) @@ -1076,7 +1076,7 @@ pcb_attribute_put(&ps->Attributes, "name", Name); if (subc_on_bottom) - pcb_pstk_mirror(ps, 0, 1, 0); + pcb_pstk_mirror(ps, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0); return err; } @@ -1114,7 +1114,7 @@ pcb_attribute_put(&p->Attributes, "name", Name); if (subc_on_bottom) - pcb_pstk_mirror(p, 0, 1, 0); + pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0); parse_id(&p->ID, obj, 4); pcb_attrib_compat_set_intconn(&p->Attributes, intconn); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 17094) +++ trunk/src_plugins/io_pcb/file.c (revision 17095) @@ -1021,7 +1021,7 @@ pcb_attribute_put(&p->Attributes, "name", Name); if (yysubc_bottom) - pcb_pstk_mirror(p, 0, 1, 0); + pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0); return p; } @@ -1038,7 +1038,7 @@ if (yysubc_bottom) { pcb_data_t *old_hack = pcb_pstk_data_hack; pcb_pstk_data_hack = subc->parent.data; - pcb_pstk_mirror(p, 0, 1, 1); + pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 1); pcb_pstk_data_hack = old_hack; }