# HG changeset patch # User Mychaela Falconia # Date 1454285600 0 # Node ID a3d47129ebdc6913465fa7151ec46b779805752a # Parent a9a20c85140ee4221d19bcce1282ae5a63f3730d pads2gpcb: implemented mirroring and rotation of instantiated parts diff -r a9a20c85140e -r a3d47129ebdc pads2gpcb/partinst.c --- a/pads2gpcb/partinst.c Mon Feb 01 00:06:43 2016 +0000 +++ b/pads2gpcb/partinst.c Mon Feb 01 00:13:20 2016 +0000 @@ -10,6 +10,11 @@ extern struct part_decal *find_decal_by_name(); extern long convert_input_dim(); +extern void coordpair_mirror_x(); +extern void coordpair_rot_90(); +extern void coordpair_rot_180(); +extern void coordpair_rot_270(); + static struct part_instance *our_part; static void @@ -211,7 +216,24 @@ copy_footprint_body(); our_part->body->mark_x = our_part->mark_x; our_part->body->mark_y = our_part->mark_y; - /* rotation and mirroring to be implemented */ + switch (our_part->ori) { + case 0: + break; + case 90: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_90); + break; + case 180: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_180); + break; + case 270: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_270); + } + if (our_part->onbottom) + manipulate_footprint_coord_pairs(our_part->body, + coordpair_mirror_x); } process_part_section()