Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 34451) +++ trunk/src/obj_pstk.c (revision 34452) @@ -2,7 +2,7 @@ * COPYRIGHT * * pcb-rnd, interactive printed circuit board design - * Copyright (C) 2017,2018 Tibor 'Igor2' Palinkas + * Copyright (C) 2017,2018,2021 Tibor 'Igor2' Palinkas * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1605,3 +1605,14 @@ return RND_MAX(bb.X2 - bb.X1, bb.Y2 - bb.Y1); } + +rnd_coord_t pcb_pstk_pen_hole_dia(pcb_board_t *pcb) +{ + pcb_pstk_proto_t *proto = pcb_pstk_get_proto_(pcb->Data, conf_core.design.via_proto); + + if (proto == NULL) + return 0; + + return proto->hdia; +} + Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 34451) +++ trunk/src/obj_pstk.h (revision 34452) @@ -2,7 +2,7 @@ * COPYRIGHT * * pcb-rnd, interactive printed circuit board design - * Copyright (C) 2017 Tibor 'Igor2' Palinkas + * Copyright (C) 2017,2021 Tibor 'Igor2' Palinkas * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -275,6 +275,11 @@ /* estimate "via diameter": really return bounding box larger side; slow! */ rnd_coord_t pcb_pstk_pen_dia(pcb_board_t *pcb); +/* return the drilling hole diameter of pen's via pstk prototype; warning: + this will ignore "slot" */ +rnd_coord_t pcb_pstk_pen_hole_dia(pcb_board_t *pcb); + + /*** layer info ***/ typedef struct pcb_proto_layer_s { const char *name;