Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4941) +++ trunk/doc-rnd/hacking/renames (revision 4942) @@ -529,3 +529,7 @@ RemoveLine -> pcb_line_destroy pcb_pad_new -> pcb_pad_alloc pcb_pad_new_in_element -> pcb_element_pad_new +pcb_via_new -> pcb_via_alloc +pcb_pin_new -> pcb_pin_alloc +pcb_via_new_on_board -> pcb_via_new +pcb_pin_new_in_element -> pcb_element_pin_new Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4941) +++ trunk/src/action_helper.c (revision 4942) @@ -599,7 +599,7 @@ pcb_message(PCB_MSG_DEFAULT, _("You must turn via visibility on before\n" "you can place vias\n")); break; } - if ((via = pcb_via_new_on_board(PCB->Data, Note.X, Note.Y, + if ((via = pcb_via_new(PCB->Data, Note.X, Note.Y, conf_core.design.via_thickness, 2 * conf_core.design.clearance, 0, conf_core.design.via_drilling_hole, NULL, pcb_no_flags())) != NULL) { AddObjectToCreateUndoList(PCB_TYPE_VIA, via, via, via); @@ -821,7 +821,7 @@ conf_core.design.via_thickness / 2) == PCB_TYPE_NONE && (via = - pcb_via_new_on_board(PCB->Data, + pcb_via_new(PCB->Data, Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, conf_core.design.via_thickness, Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4941) +++ trunk/src/obj_elem.c (revision 4942) @@ -201,7 +201,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_HOLE, pin)) pcb_flag_add(f, PCB_FLAG_HOLE); - pcb_via_new_on_board(Buffer->Data, pin->X, pin->Y, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole, pin->Number, f); + pcb_via_new(Buffer->Data, pin->X, pin->Y, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole, pin->Number, f); } END_LOOP; group = GetLayerGroupNumberByNumber(SWAP_IDENT ? solder_silk_layer : component_silk_layer); @@ -276,12 +276,12 @@ if (via->Mask < via->Thickness) via->Mask = via->Thickness + 2 * MASKFRAME; if (via->Name) - pcb_pin_new_in_element(Element, via->X, via->Y, via->Thickness, + pcb_element_pin_new(Element, via->X, via->Y, via->Thickness, via->Clearance, via->Mask, via->DrillingHole, NULL, via->Name, pcb_flag_mask(via->Flags, PCB_FLAG_VIA | PCB_FLAG_FOUND | PCB_FLAG_SELECTED | PCB_FLAG_WARN)); else { sprintf(num, "%d", pin_n++); - pcb_pin_new_in_element(Element, via->X, via->Y, via->Thickness, + pcb_element_pin_new(Element, via->X, via->Y, via->Thickness, via->Clearance, via->Mask, via->DrillingHole, NULL, num, pcb_flag_mask(via->Flags, PCB_FLAG_VIA | PCB_FLAG_FOUND | PCB_FLAG_SELECTED | PCB_FLAG_WARN)); } @@ -534,7 +534,7 @@ END_LOOP; PIN_LOOP(Src); { - pcb_pin_new_in_element(Dest, pin->X + dx, pin->Y + dy, pin->Thickness, + pcb_element_pin_new(Dest, pin->X + dx, pin->Y + dy, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole, pin->Name, pin->Number, pcb_flag_mask(pin->Flags, PCB_FLAG_FOUND)); } END_LOOP; Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4941) +++ trunk/src/obj_line.c (revision 4942) @@ -469,7 +469,7 @@ pcb_pin_t *via; if ((via = - pcb_via_new_on_board(PCB->Data, i->X, i->Y, + pcb_via_new(PCB->Data, i->X, i->Y, conf_core.design.via_thickness, 2 * conf_core.design.clearance, PCB_FLAG_NO, conf_core.design.via_drilling_hole, NULL, pcb_no_flags())) != NULL) { AddObjectToCreateUndoList(PCB_TYPE_VIA, via, via, via); DrawVia(via); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 4941) +++ trunk/src/obj_pinvia.c (revision 4942) @@ -47,7 +47,7 @@ /*** allocation ***/ /* get next slot for a via, allocates memory if necessary */ -pcb_pin_t *pcb_via_new(pcb_data_t * data) +pcb_pin_t *pcb_via_alloc(pcb_data_t * data) { pcb_pin_t *new_obj; @@ -64,7 +64,7 @@ } /* get next slot for a pin, allocates memory if necessary */ -pcb_pin_t *pcb_pin_new(pcb_element_t * element) +pcb_pin_t *pcb_pin_alloc(pcb_element_t * element) { pcb_pin_t *new_obj; @@ -85,7 +85,7 @@ /*** utility ***/ /* creates a new via */ -pcb_pin_t *pcb_via_new_on_board(pcb_data_t *Data, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags) +pcb_pin_t *pcb_via_new(pcb_data_t *Data, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags) { pcb_pin_t *Via; @@ -101,7 +101,7 @@ END_LOOP; } - Via = pcb_via_new(Data); + Via = pcb_via_alloc(Data); if (!Via) return (Via); @@ -138,9 +138,9 @@ } /* creates a new pin in an element */ -pcb_pin_t *pcb_pin_new_in_element(pcb_element_t *Element, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, char *Name, char *Number, pcb_flag_t Flags) +pcb_pin_t *pcb_element_pin_new(pcb_element_t *Element, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, char *Name, char *Number, pcb_flag_t Flags) { - pcb_pin_t *pin = pcb_pin_new(Element); + pcb_pin_t *pin = pcb_pin_alloc(Element); /* copy values */ pin->X = X; @@ -235,7 +235,7 @@ /* copies a via to paste buffer */ void *AddViaToBuffer(pcb_opctx_t *ctx, pcb_pin_t *Via) { - return (pcb_via_new_on_board(ctx->buffer.dst, Via->X, Via->Y, Via->Thickness, Via->Clearance, Via->Mask, Via->DrillingHole, Via->Name, pcb_flag_mask(Via->Flags, PCB_FLAG_FOUND | ctx->buffer.extraflg))); + return (pcb_via_new(ctx->buffer.dst, Via->X, Via->Y, Via->Thickness, Via->Clearance, Via->Mask, Via->DrillingHole, Via->Name, pcb_flag_mask(Via->Flags, PCB_FLAG_FOUND | ctx->buffer.extraflg))); } /* moves a via to paste buffer without allocating memory for the name */ @@ -704,7 +704,7 @@ { pcb_pin_t *via; - via = pcb_via_new_on_board(PCB->Data, Via->X + ctx->copy.DeltaX, Via->Y + ctx->copy.DeltaY, + via = pcb_via_new(PCB->Data, Via->X + ctx->copy.DeltaX, Via->Y + ctx->copy.DeltaY, Via->Thickness, Via->Clearance, Via->Mask, Via->DrillingHole, Via->Name, pcb_flag_mask(Via->Flags, PCB_FLAG_FOUND)); if (!via) return (via); Index: trunk/src/obj_pinvia.h =================================================================== --- trunk/src/obj_pinvia.h (revision 4941) +++ trunk/src/obj_pinvia.h (revision 4942) @@ -42,15 +42,16 @@ }; -pcb_pin_t *pcb_via_new(pcb_data_t * data); +pcb_pin_t *pcb_via_alloc(pcb_data_t * data); void pcb_via_free(pcb_pin_t * data); -pcb_pin_t *pcb_pin_new(pcb_element_t * element); +pcb_pin_t *pcb_pin_alloc(pcb_element_t * element); void pcb_pin_free(pcb_pin_t * data); -pcb_pin_t *pcb_via_new_on_board(pcb_data_t *Data, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags); -pcb_pin_t *pcb_pin_new_in_element(pcb_element_t *Element, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, char *Name, char *Number, pcb_flag_t Flags); +pcb_pin_t *pcb_via_new(pcb_data_t *Data, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags); +pcb_pin_t *pcb_element_pin_new(pcb_element_t *Element, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, char *Name, char *Number, pcb_flag_t Flags); void pcb_add_via(pcb_data_t *Data, pcb_pin_t *Via); void pcb_pin_bbox(pcb_pin_t *Pin); + pcb_bool ChangeHole(pcb_pin_t *Via); /* This is the extents of a Pin or Via, depending on whether it's a Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4941) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4942) @@ -2858,7 +2858,7 @@ pcb_pin_t *live_via = NULL; if (conf_core.editor.live_routing) { - live_via = pcb_via_new_on_board(PCB->Data, X, Y, radius * 2, + live_via = pcb_via_new(PCB->Data, X, Y, radius * 2, 2 * AutoRouteParameters.style->Clearance, 0, AutoRouteParameters.style->Hole, NULL, pcb_flag_make(0)); if (live_via != NULL) DrawVia(live_via); @@ -4489,7 +4489,7 @@ assert(b.X1 + radius == b.X2 - radius); assert(b.Y1 + radius == b.Y2 - radius); pp->parent.via = - pcb_via_new_on_board(PCB->Data, b.X1 + radius, + pcb_via_new(PCB->Data, b.X1 + radius, b.Y1 + radius, pp->style->Diameter, 2 * pp->style->Clearance, 0, pp->style->Hole, NULL, pcb_flag_make(PCB_FLAG_AUTO)); assert(pp->parent.via); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4941) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4942) @@ -87,7 +87,7 @@ { void *pin; - pin = pcb_via_new_on_board(PCB->Data, x, y, thickness, clearance, mask, hole, name, get_flags(flags)); + pin = pcb_via_new(PCB->Data, x, y, thickness, clearance, mask, hole, name, get_flags(flags)); if (pin != NULL) { AddObjectToCreateUndoList (PCB_TYPE_VIA, pin, pin, pin); Index: trunk/src_plugins/hid_gtk/ghid-propedit.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4941) +++ trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4942) @@ -331,7 +331,7 @@ #warning TODO: preview_pcb is never freed - pcb_via_new_on_board(preview_pcb.Data, + pcb_via_new(preview_pcb.Data, PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(50), PCB_MIL_TO_COORD(10), 0, PCB_MIL_TO_COORD(20), "", pcb_no_flags()); Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 4941) +++ trunk/src_plugins/import_dsn/dsn.c (revision 4942) @@ -152,7 +152,7 @@ } ret = sscanf(str, " (via via_%ld_%ld %ld %ld", &viadiam, &viadrill, &dim1, &dim2); if (ret == 4) { - pcb_via_new_on_board(PCB->Data, dim1, PCB->MaxHeight - dim2, viadiam, lineclear, 0, viadrill, 0, pcb_flag_make(PCB_FLAG_AUTO)); + pcb_via_new(PCB->Data, dim1, PCB->MaxHeight - dim2, viadiam, lineclear, 0, viadrill, 0, pcb_flag_make(PCB_FLAG_AUTO)); } } fclose(fp); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 4941) +++ trunk/src_plugins/io_kicad/read.c (revision 4942) @@ -705,7 +705,7 @@ } required = BV(0) | BV(1); if ((tally & required) == required) { /* need start, end, layer, thickness at a minimum */ - pcb_via_new_on_board( st->PCB->Data, X, Y, Thickness, Clearance, Mask, Drill, name, Flags); + pcb_via_new( st->PCB->Data, X, Y, Thickness, Clearance, Mask, Drill, name, Flags); return 0; } return -1; @@ -1467,7 +1467,7 @@ printf("\tcreating new pin %s in element\n", pinName); required = BV(0) | BV(1) | BV(3) | BV(5); if ((featureTally & required) == required) { - pcb_pin_new_in_element(newModule, X + moduleX, Y + moduleY, padXsize, Clearance, + pcb_element_pin_new(newModule, X + moduleX, Y + moduleY, padXsize, Clearance, Clearance, drill, pinName, pinName, Flags); /* using clearance value for arg 5 = mask too */ } else { return -1; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4941) +++ trunk/src_plugins/io_lihata/read.c (revision 4942) @@ -585,9 +585,9 @@ pcb_pin_t *via; if (dt != NULL) - via = pcb_via_new(dt); + via = pcb_via_alloc(dt); else if (el != NULL) - via = pcb_pin_new(el); + via = pcb_pin_alloc(el); else return -1; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4941) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4942) @@ -2135,7 +2135,7 @@ case 66: #line 750 "parse_y.y" /* yacc.c:1646 */ { - pcb_via_new_on_board(yyData, NU ((yyvsp[-8].measure)), NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), + pcb_via_new(yyData, NU ((yyvsp[-8].measure)), NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-2].string)); } @@ -2145,7 +2145,7 @@ case 67: #line 760 "parse_y.y" /* yacc.c:1646 */ { - pcb_via_new_on_board(yyData, OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].string), + pcb_via_new(yyData, OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } @@ -2155,7 +2155,7 @@ case 68: #line 771 "parse_y.y" /* yacc.c:1646 */ { - pcb_via_new_on_board(yyData, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), + pcb_via_new(yyData, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-5].measure)) + OU((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } @@ -2165,7 +2165,7 @@ case 69: #line 781 "parse_y.y" /* yacc.c:1646 */ { - pcb_via_new_on_board(yyData, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), 2*GROUNDPLANEFRAME, + pcb_via_new(yyData, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), 2*GROUNDPLANEFRAME, OU((yyvsp[-4].measure)) + 2*MASKFRAME, OU ((yyvsp[-3].measure)), (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } @@ -2182,7 +2182,7 @@ OU((yyvsp[-3].measure)) > MIN_PINORVIACOPPER) hole = OU((yyvsp[-3].measure)) - MIN_PINORVIACOPPER; - pcb_via_new_on_board(yyData, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), 2*GROUNDPLANEFRAME, + pcb_via_new(yyData, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), 2*GROUNDPLANEFRAME, OU((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } @@ -2637,7 +2637,7 @@ case 153: #line 1556 "parse_y.y" /* yacc.c:1646 */ { - pcb_pin_new_in_element(yyElement, NU ((yyvsp[-9].measure)) + yyElement->MarkX, + pcb_element_pin_new(yyElement, NU ((yyvsp[-9].measure)) + yyElement->MarkX, NU ((yyvsp[-8].measure)) + yyElement->MarkY, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-3].string)); @@ -2649,7 +2649,7 @@ case 154: #line 1568 "parse_y.y" /* yacc.c:1646 */ { - pcb_pin_new_in_element(yyElement, OU ((yyvsp[-9].measure)) + yyElement->MarkX, + pcb_element_pin_new(yyElement, OU ((yyvsp[-9].measure)) + yyElement->MarkX, OU ((yyvsp[-8].measure)) + yyElement->MarkY, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].string), (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-3].string)); @@ -2661,7 +2661,7 @@ case 155: #line 1580 "parse_y.y" /* yacc.c:1646 */ { - pcb_pin_new_in_element(yyElement, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), 2*GROUNDPLANEFRAME, OU ((yyvsp[-5].measure)) + 2*MASKFRAME, OU ((yyvsp[-4].measure)), (yyvsp[-3].string), (yyvsp[-2].string), pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); @@ -2675,7 +2675,7 @@ char p_number[8]; sprintf(p_number, "%d", pin_num++); - pcb_pin_new_in_element(yyElement, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), 2*GROUNDPLANEFRAME, OU ((yyvsp[-4].measure)) + 2*MASKFRAME, OU ((yyvsp[-3].measure)), (yyvsp[-2].string), p_number, pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); @@ -2695,7 +2695,7 @@ hole = OU ((yyvsp[-3].measure)) - MIN_PINORVIACOPPER; sprintf(p_number, "%d", pin_num++); - pcb_pin_new_in_element(yyElement, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), 2*GROUNDPLANEFRAME, OU ((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), p_number, pcb_flag_old((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4941) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4942) @@ -748,7 +748,7 @@ /* x, y, thickness, clearance, mask, drilling-hole, name, flags */ : T_VIA '[' measure measure measure measure measure measure STRING flags ']' { - pcb_via_new_on_board(yyData, NU ($3), NU ($4), NU ($5), NU ($6), NU ($7), + pcb_via_new(yyData, NU ($3), NU ($4), NU ($5), NU ($6), NU ($7), NU ($8), $9, $10); free ($9); } @@ -758,7 +758,7 @@ /* x, y, thickness, clearance, mask, drilling-hole, name, flags */ : T_VIA '(' measure measure measure measure measure measure STRING INTEGER ')' { - pcb_via_new_on_board(yyData, OU ($3), OU ($4), OU ($5), OU ($6), OU ($7), OU ($8), $9, + pcb_via_new(yyData, OU ($3), OU ($4), OU ($5), OU ($6), OU ($7), OU ($8), $9, pcb_flag_old($10)); free ($9); } @@ -769,7 +769,7 @@ /* x, y, thickness, clearance, drilling-hole, name, flags */ : T_VIA '(' measure measure measure measure measure STRING INTEGER ')' { - pcb_via_new_on_board(yyData, OU ($3), OU ($4), OU ($5), OU ($6), + pcb_via_new(yyData, OU ($3), OU ($4), OU ($5), OU ($6), OU ($5) + OU($6), OU ($7), $8, pcb_flag_old($9)); free ($8); } @@ -779,7 +779,7 @@ /* x, y, thickness, drilling-hole, name, flags */ : T_VIA '(' measure measure measure measure STRING INTEGER ')' { - pcb_via_new_on_board(yyData, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, + pcb_via_new(yyData, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, OU($5) + 2*MASKFRAME, OU ($6), $7, pcb_flag_old($8)); free ($7); } @@ -796,7 +796,7 @@ OU($5) > MIN_PINORVIACOPPER) hole = OU($5) - MIN_PINORVIACOPPER; - pcb_via_new_on_board(yyData, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, + pcb_via_new(yyData, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, OU($5) + 2*MASKFRAME, hole, $6, pcb_flag_old($7)); free ($6); } @@ -1554,7 +1554,7 @@ number, flags */ : T_PIN '[' measure measure measure measure measure measure STRING STRING flags ']' { - pcb_pin_new_in_element(yyElement, NU ($3) + yyElement->MarkX, + pcb_element_pin_new(yyElement, NU ($3) + yyElement->MarkX, NU ($4) + yyElement->MarkY, NU ($5), NU ($6), NU ($7), NU ($8), $9, $10, $11); free ($9); @@ -1566,7 +1566,7 @@ number, flags */ : T_PIN '(' measure measure measure measure measure measure STRING STRING INTEGER ')' { - pcb_pin_new_in_element(yyElement, OU ($3) + yyElement->MarkX, + pcb_element_pin_new(yyElement, OU ($3) + yyElement->MarkX, OU ($4) + yyElement->MarkY, OU ($5), OU ($6), OU ($7), OU ($8), $9, $10, pcb_flag_old($11)); free ($9); @@ -1578,7 +1578,7 @@ /* x, y, thickness, drilling hole, name, number, flags */ : T_PIN '(' measure measure measure measure STRING STRING INTEGER ')' { - pcb_pin_new_in_element(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, OU ($5) + 2*MASKFRAME, OU ($6), $7, $8, pcb_flag_old($9)); free ($7); free ($8); @@ -1592,7 +1592,7 @@ char p_number[8]; sprintf(p_number, "%d", pin_num++); - pcb_pin_new_in_element(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, OU ($5) + 2*MASKFRAME, OU ($6), $7, p_number, pcb_flag_old($8)); free ($7); @@ -1614,7 +1614,7 @@ hole = OU ($5) - MIN_PINORVIACOPPER; sprintf(p_number, "%d", pin_num++); - pcb_pin_new_in_element(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, + pcb_element_pin_new(yyElement, OU ($3), OU ($4), OU ($5), 2*GROUNDPLANEFRAME, OU ($5) + 2*MASKFRAME, hole, $6, p_number, pcb_flag_old($7)); free ($6); } Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4941) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4942) @@ -8198,7 +8198,7 @@ return 1; } - if ((via = pcb_via_new_on_board(PCB->Data, viax, viay, + if ((via = pcb_via_new(PCB->Data, viax, viay, Settings.ViaThickness, 2 * Settings.Clearance, 0, Settings.ViaDrillingHole, NULL, pcb_no_flags())) != NULL) { AddObjectToCreateUndoList(PCB_TYPE_VIA, via, via, via);