Index: src_plugins/io_hyp/parser.c =================================================================== --- src_plugins/io_hyp/parser.c (revision 10451) +++ src_plugins/io_hyp/parser.c (revision 10452) @@ -2058,6 +2058,12 @@ } } + /* put element "on solder side" if needed */ + if ((element != NULL) && (layer_name != NULL) + && (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != hyp_is_bottom_layer(layer_name))) + PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, element); + + /* create pad */ if (element != NULL) { /* create pad number */ if ((number == NULL) || (strcmp(number, "") == 0)) { Index: src_plugins/io_hyp/write.c =================================================================== --- src_plugins/io_hyp/write.c (revision 10451) +++ src_plugins/io_hyp/write.c (revision 10452) @@ -314,13 +314,21 @@ static void write_padstack_pv(hyp_wr_t * wr, const pcb_pin_t * pin) { int new_item; + int pin_shape; const char *name = pcb_pshash_pin(&wr->psh, pin, &new_item); if (!new_item) return; + if (PCB_FLAG_TEST(PCB_FLAG_OCTAGON, pin)) + pin_shape = 2; + else if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pin)) + pin_shape = 1; + else + pin_shape = 0; + pcb_fprintf(wr->f, "{PADSTACK=%s, %me\n", name, pin->DrillingHole); #warning TODO: pin shapes and thermal - pcb_fprintf(wr->f, " (MDEF, 0, %me, %me, 0, M)\n", pin->Thickness, pin->Thickness); + pcb_fprintf(wr->f, " (MDEF, %d, %me, %me, 0, M)\n", pin_shape, pin->Thickness, pin->Thickness); fprintf(wr->f, "}\n"); } @@ -327,14 +335,22 @@ static void write_padstack_pad(hyp_wr_t * wr, const pcb_pad_t * pad) { int new_item; + int pad_shape; const char *name = pcb_pshash_pad(&wr->psh, pad, &new_item), *side; if (!new_item) return; + if (PCB_FLAG_TEST(PCB_FLAG_OCTAGON, pad)) + pad_shape = 2; + else if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, pad)) + pad_shape = 1; + else + pad_shape = 0; + side = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? wr->ln_bottom : wr->ln_top; fprintf(wr->f, "{PADSTACK=%s\n", name); - pcb_fprintf(wr->f, " (%[4], 1, %me, %me, 0, M)\n", side, PCB_ABS(pad->Point1.X - pad->Point2.X) + pad->Thickness, + pcb_fprintf(wr->f, " (%[4], %d, %me, %me, 0, M)\n", side, pad_shape, PCB_ABS(pad->Point1.X - pad->Point2.X) + pad->Thickness, PCB_ABS(pad->Point1.Y - pad->Point2.Y) + pad->Thickness); fprintf(wr->f, "}\n"); } Index: src_plugins/lib_padstack_hash/padstack_hash.c =================================================================== --- src_plugins/lib_padstack_hash/padstack_hash.c (revision 10451) +++ src_plugins/lib_padstack_hash/padstack_hash.c (revision 10452) @@ -52,12 +52,17 @@ static int pcb_pshash_padeq(const pcb_pshash_item_t *key1, const pcb_pshash_item_t *key2) { - return pcb_pad_eq_padstack(key1->ptr.pad, key2->ptr.pad); + return (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, key1->ptr.pad) == PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, key2->ptr.pad)) && + (PCB_FLAG_TEST(PCB_FLAG_SQUARE, key1->ptr.pad) == PCB_FLAG_TEST(PCB_FLAG_SQUARE, key2->ptr.pad)) && + (PCB_FLAG_TEST(PCB_FLAG_OCTAGON, key1->ptr.pad) == PCB_FLAG_TEST(PCB_FLAG_OCTAGON, key2->ptr.pad)) && + pcb_pad_eq_padstack(key1->ptr.pad, key2->ptr.pad); } static int pcb_pshash_pineq(const pcb_pshash_item_t *key1, const pcb_pshash_item_t *key2) { - return pcb_pin_eq_padstack(key1->ptr.pin, key2->ptr.pin); + return (PCB_FLAG_TEST(PCB_FLAG_SQUARE, key1->ptr.pin) == PCB_FLAG_TEST(PCB_FLAG_SQUARE, key2->ptr.pin)) && + (PCB_FLAG_TEST(PCB_FLAG_OCTAGON, key1->ptr.pin) == PCB_FLAG_TEST(PCB_FLAG_OCTAGON, key2->ptr.pin)) && + pcb_pin_eq_padstack(key1->ptr.pin, key2->ptr.pin); }