Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 22951) +++ trunk/src/layer_grp.c (revision 22952) @@ -1271,3 +1271,13 @@ TODO("layer: do the same that cam does; test with propedit"); return -1; } + +pcb_bool pcb_has_explicit_outline(pcb_board_t *pcb) +{ + int i; + pcb_layergrp_t *g; + for(i = 0, g = pcb->LayerGroups.grp; i < pcb->LayerGroups.len; i++,g++) + if (PCB_LAYER_IS_OUTLINE(g->ltype, g->purpi) && !pcb_layergrp_is_pure_empty(pcb, i)) + return 1; + return 0; +} Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 22951) +++ trunk/src/layer_grp.h (revision 22952) @@ -277,4 +277,7 @@ pcb_layergrp_id_t pcb_layergrp_str2id(pcb_board_t *pcb, const char *str); +/* Return true if the board has an outline layer with at least one object on it */ +pcb_bool pcb_has_explicit_outline(pcb_board_t *pcb); + #endif