Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 32258) +++ trunk/src/board.c (revision 32259) @@ -411,17 +411,6 @@ return chg; } -TODO("Move this to layer_grp.[ch]") -const char *pcb_layergrp_thickness_attr(pcb_layergrp_t *grp, const char *namespace) -{ - const char *s = NULL; - if (namespace != NULL) - s = pcb_attribute_get_namespace(&grp->Attributes, namespace, "thickness"); - if (s == NULL) - s = pcb_attribute_get(&grp->Attributes, "thickness"); - return s; -} - rnd_coord_t pcb_stack_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags, rnd_layergrp_id_t from, rnd_bool include_from, rnd_layergrp_id_t to, rnd_bool include_to, pcb_layer_type_t accept) { rnd_layergrp_id_t gid; Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 32258) +++ trunk/src/layer_grp.c (revision 32259) @@ -1584,3 +1584,13 @@ return 1; return 0; } + +const char *pcb_layergrp_thickness_attr(pcb_layergrp_t *grp, const char *namespace) +{ + const char *s = NULL; + if (namespace != NULL) + s = pcb_attribute_get_namespace(&grp->Attributes, namespace, "thickness"); + if (s == NULL) + s = pcb_attribute_get(&grp->Attributes, "thickness"); + return s; +} Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 32258) +++ trunk/src/layer_grp.h (revision 32259) @@ -300,4 +300,9 @@ /* Return true if the board has an outline layer with at least one object on it */ rnd_bool pcb_has_explicit_outline(pcb_board_t *pcb); +/* Return the thickness attribute of a layer group, optionally considering + the namespace based override attribute, when present; returns NULL if + attribute is not found. */ +const char *pcb_layergrp_thickness_attr(pcb_layergrp_t *grp, const char *namespace); + #endif