Index: trunk/src/funchash_core_list.h =================================================================== --- trunk/src/funchash_core_list.h (revision 19132) +++ trunk/src/funchash_core_list.h (revision 19133) @@ -9,8 +9,8 @@ action_entry(fab) action_entry(assy) action_entry(csect) -action_entry(plated) -action_entry(unplated) +action_entry(pdrill) +action_entry(udrill) /* Keywords for actions */ action_entry(Add) Index: trunk/src/hid_extents.c =================================================================== --- trunk/src/hid_extents.c (revision 19132) +++ trunk/src/hid_extents.c (revision 19133) @@ -33,6 +33,7 @@ #include "data.h" #include "hid_draw_helpers.h" #include "hid_extents.h" +#include "funchash_core.h" static pcb_box_t box; @@ -42,12 +43,12 @@ static int extents_set_layer_group(pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty) { + if (PCB_LAYER_IS_DRILL(flags, purpi)) + return 1; switch (flags & PCB_LYT_ANYTHING) { case PCB_LYT_COPPER: case PCB_LYT_OUTLINE: case PCB_LYT_SILK: - case PCB_LYT_PDRILL: - case PCB_LYT_UDRILL: return 1; default: return 0; Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 19132) +++ trunk/src/layer.c (revision 19133) @@ -48,8 +48,8 @@ {"topassembly", PCB_LYT_VIRTUAL + 3, PCB_LYT_VIRTUAL | PCB_LYT_TOP, "assy", F_assy }, {"bottomassembly", PCB_LYT_VIRTUAL + 4, PCB_LYT_VIRTUAL | PCB_LYT_BOTTOM, "assy", F_assy }, {"fab", PCB_LYT_VIRTUAL + 5, PCB_LYT_VIRTUAL | PCB_LYT_LOGICAL, "fab", F_fab }, - {"plated-drill", PCB_LYT_VIRTUAL + 6, PCB_LYT_VIRTUAL | PCB_LYT_PDRILL, "plated", F_plated }, - {"unplated-drill", PCB_LYT_VIRTUAL + 7, PCB_LYT_VIRTUAL | PCB_LYT_UDRILL, "unplated", F_unplated }, + {"plated-drill", PCB_LYT_VIRTUAL + 6, PCB_LYT_VIRTUAL, "pdrill", F_pdrill }, + {"unplated-drill", PCB_LYT_VIRTUAL + 7, PCB_LYT_VIRTUAL, "udrill", F_udrill }, {"csect", PCB_LYT_VIRTUAL + 8, PCB_LYT_VIRTUAL | PCB_LYT_LOGICAL, "csect", F_csect }, {"dialog", PCB_LYT_VIRTUAL + 9, PCB_LYT_VIRTUAL | PCB_LYT_DIALOG | PCB_LYT_LOGICAL | PCB_LYT_NOEXPORT, NULL, -1 }, { NULL, 0 }, @@ -86,8 +86,6 @@ { PCB_LYT_OUTLINE, 2, "outline" }, { PCB_LYT_RAT, 2, "rat" }, { PCB_LYT_INVIS, 2, "invis" }, - { PCB_LYT_PDRILL, 2, "plateddrill" }, - { PCB_LYT_UDRILL, 2, "unplateddrill" }, { PCB_LYT_SUBSTRATE,2,"substrate" }, { PCB_LYT_MISC, 2, "misc" }, { PCB_LYT_DOC, 2, "doc" }, Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 19132) +++ trunk/src/layer.h (revision 19133) @@ -51,8 +51,6 @@ PCB_LYT_OUTLINE = 0x00001000, /* outline (contour of the board) */ PCB_LYT_RAT = 0x00002000, /* (virtual) rats nest (one, not in the stackup) */ PCB_LYT_INVIS = 0x00004000, /* (virtual) layer is invisible (one, not in the stackup) */ - PCB_LYT_PDRILL = 0x00020000, /* (virtual) plated drills (affects all physical layers) */ - PCB_LYT_UDRILL = 0x00040000, /* (virtual) unplated drills (affects all physical layers) */ PCB_LYT_UI = 0x00080000, /* (virtual) user interface drawings (feature plugins use this for displaying states or debug info) */ PCB_LYT_SUBSTRATE= 0x00200000, /* substrate / insulator */ PCB_LYT_MISC = 0x00400000, /* misc (for internal use) */ @@ -95,6 +93,9 @@ #define PCB_LAYER_IS_ASSY(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && ((purpi) == F_assy)) #define PCB_LAYER_IS_FAB(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && ((purpi) == F_fab)) #define PCB_LAYER_IS_CSECT(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && ((purpi) == F_csect)) +#define PCB_LAYER_IS_PDRILL(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && ((purpi) == F_pdrill)) +#define PCB_LAYER_IS_UDRILL(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && ((purpi) == F_udrill)) +#define PCB_LAYER_IS_DRILL(lyt, purpi) (((lyt) & PCB_LYT_VIRTUAL) && (((purpi) == F_pdrill) || ((purpi) == F_udrill))) #include "globalconst.h" #include "global_typedefs.h" Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 19132) +++ trunk/src_plugins/export_dxf/dxf.c (revision 19133) @@ -44,6 +44,7 @@ #include "compat_misc.h" #include "lht_template.h" #include "safe_fs.h" +#include "funchash_core.h" #include "hid.h" #include "hid_nogui.h" @@ -361,13 +362,13 @@ return 1; } - if (flags & PCB_LYT_PDRILL) { + if (PCB_LAYER_IS_PDRILL(flags, purpi)) { dxf_ctx.layer_name = "drill_plated"; dxf_ctx.force_thin = 1; return 1; } - if (flags & PCB_LYT_UDRILL) { + if (PCB_LAYER_IS_UDRILL(flags, purpi)) { dxf_ctx.layer_name = "drill_unplated"; dxf_ctx.force_thin = 1; return 1; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 19132) +++ trunk/src_plugins/export_gcode/gcode.c (revision 19133) @@ -69,6 +69,7 @@ #include "trace.h" #include "decompose.h" #include "pcb-printf.h" +#include "funchash_core.h" #include "hid_init.h" #include "hid_attrib.h" @@ -557,7 +558,7 @@ if ((flags & PCB_LYT_ANYTHING) == PCB_LYT_SILK) return 0; - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + is_drill = PCB_LAYER_IS_DRILL(flags, purpi); is_mask = !!(flags & PCB_LYT_MASK); if (is_mask) { Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 19132) +++ trunk/src_plugins/export_gerber/gerber.c (revision 19133) @@ -414,9 +414,9 @@ suff = "stc"; else if (fmatch(flags, PCB_LYT_BOTTOM | PCB_LYT_MASK)) suff = "sts"; - else if (fmatch(flags, PCB_LYT_PDRILL)) + else if (PCB_LAYER_IS_PDRILL(flags, purpi)) suff = "drd"; - else if (fmatch(flags, PCB_LYT_UDRILL)) + else if (PCB_LAYER_IS_UDRILL(flags, purpi)) suff = "dru"; else if (fmatch(flags, PCB_LYT_TOP | PCB_LYT_PASTE)) suff = "crc"; @@ -459,9 +459,9 @@ suff = "gts"; else if (fmatch(flags, PCB_LYT_BOTTOM | PCB_LYT_MASK)) suff = "gbs"; - else if (fmatch(flags, PCB_LYT_PDRILL)) + else if (PCB_LAYER_IS_PDRILL(flags, purpi)) suff = "cnc"; - else if (fmatch(flags, PCB_LYT_UDRILL)) + else if (PCB_LAYER_IS_UDRILL(flags, purpi)) suff = "_NPTH.drl"; else if (fmatch(flags, PCB_LYT_TOP | PCB_LYT_PASTE)) suff = "gtp"; @@ -505,9 +505,9 @@ suff = "gts"; else if (fmatch(flags, PCB_LYT_BOTTOM | PCB_LYT_MASK)) suff = "gbs"; - else if (fmatch(flags, PCB_LYT_PDRILL)) + else if (PCB_LAYER_IS_PDRILL(flags, purpi)) suff = "drl"; - else if (fmatch(flags, PCB_LYT_UDRILL)) + else if (PCB_LAYER_IS_UDRILL(flags, purpi)) suff = "_NPTH.drl"; else if (fmatch(flags, PCB_LYT_TOP | PCB_LYT_PASTE)) suff = "gtp"; @@ -574,7 +574,7 @@ return; } - if ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)) + if (PCB_LAYER_IS_DRILL(flags, purpi)) sext = ".cnc"; pcb_layer_to_file_name(dest, lid, flags, purpose, purpi, fns_style); strcat(dest, sext); @@ -765,7 +765,7 @@ pending_drills = NULL; } - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + is_drill = PCB_LAYER_IS_DRILL(flags, purpi); is_mask = !!(flags & PCB_LYT_MASK); if (group < 0 || group != lastgroup) { char utcTime[64]; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 19132) +++ trunk/src_plugins/export_nelma/nelma.c (revision 19133) @@ -74,6 +74,7 @@ #include "plugins.h" #include "hid_cam.h" #include "safe_fs.h" +#include "funchash_core.h" #include "hid.h" #include "hid_nogui.h" @@ -663,7 +664,7 @@ if ((flags & PCB_LYT_ANYTHING) == PCB_LYT_SILK) return 0; - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + is_drill = PCB_LAYER_IS_DRILL(flags, purpi); is_mask = !!(flags & PCB_LYT_MASK); if (is_mask) { Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 19132) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 19133) @@ -47,6 +47,7 @@ #include "plugins.h" #include "safe_fs.h" #include "obj_pstk_inlines.h" +#include "funchash_core.h" #include "hid.h" #include "hid_nogui.h" @@ -368,12 +369,9 @@ return 0; } - if (flags & PCB_LYT_PDRILL) + if (PCB_LAYER_IS_DRILL(flags, purpi)) return 0; - if (flags & PCB_LYT_UDRILL) - return 0; - if (flags & PCB_LYT_MASK) { if (!openscad_attribute_list[HA_mask].default_val.int_value) return 0; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 19132) +++ trunk/src_plugins/export_png/png.c (revision 19133) @@ -1215,7 +1215,7 @@ return 0; photo_im = &photo_mask; } - else if ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)) { + else if (PCB_LAYER_IS_DRILL(flags, purpi)) { photo_im = &photo_drill; } else { @@ -1257,7 +1257,7 @@ return 0; } - if ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)) + if (PCB_LAYER_IS_DRILL(flags, purpi)) gdImageFilledRectangle(*photo_im, 0, 0, gdImageSX(im), gdImageSY(im), black->c); } im = *photo_im; @@ -1282,7 +1282,7 @@ return 0; } - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + is_drill = PCB_LAYER_IS_DRILL(flags, purpi); is_mask = (flags & PCB_LYT_MASK); if (photo_mode) Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 19132) +++ trunk/src_plugins/export_ps/eps.c (revision 19133) @@ -382,7 +382,7 @@ return 0; } - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + is_drill = PCB_LAYER_IS_DRILL(flags, purpi); is_mask = (flags & PCB_LYT_MASK); is_paste = !!(flags & PCB_LYT_PASTE); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 19132) +++ trunk/src_plugins/export_ps/ps.c (revision 19133) @@ -827,7 +827,7 @@ name = pcb_layer_to_file_name(tmp_ln, layer, flags, purpose, purpi, PCB_FNS_fixed); - global.is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); + global.is_drill = PCB_LAYER_IS_DRILL(flags, purpi); global.is_mask = !!(flags & PCB_LYT_MASK); global.is_assy = PCB_LAYER_IS_ASSY(flags, purpi); global.is_copper = !!(flags & PCB_LYT_COPPER); Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 19132) +++ trunk/src_plugins/export_svg/svg.c (revision 19133) @@ -50,6 +50,7 @@ #include "compat_misc.h" #include "plugins.h" #include "safe_fs.h" +#include "funchash_core.h" #include "hid.h" #include "hid_nogui.h" @@ -376,7 +377,7 @@ default:; } - if (!(flags & PCB_LYT_COPPER) && (!is_our_silk) && (!is_our_mask) && !(flags & PCB_LYT_PDRILL) && !(flags & PCB_LYT_PDRILL) && !(flags & PCB_LYT_OUTLINE)) + if (!(flags & PCB_LYT_COPPER) && (!is_our_silk) && (!is_our_mask) && !(PCB_LAYER_IS_DRILL(flags, purpi)) && !(flags & PCB_LYT_OUTLINE)) return 0; while(group_open) { @@ -411,7 +412,7 @@ } } - drawing_hole = (flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL); + drawing_hole = PCB_LAYER_IS_DRILL(flags, purpi); return 1; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 19132) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 19133) @@ -92,8 +92,6 @@ LYT_OUTLINE = PCB_LYT_OUTLINE, LYT_RAT = PCB_LYT_RAT, LYT_INVIS = PCB_LYT_INVIS, - LYT_PDRILL = PCB_LYT_PDRILL, - LYT_UDRILL = PCB_LYT_UDRILL, LYT_ANYTHING = PCB_LYT_ANYTHING, LYT_VIRTUAL = PCB_LYT_VIRTUAL, Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 19132) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 19133) @@ -128,6 +128,9 @@ /* virtual layers */ { + if (PCB_LAYER_IS_DRILL(flags, purpi)) + return 1; + switch (flags & PCB_LYT_ANYTHING) { case PCB_LYT_INVIS: return /* pinout ? 0 : */ PCB->InvisibleObjectsOn; @@ -135,9 +138,6 @@ if (PCB_LAYERFLG_ON_VISIBLE_SIDE(flags) /*|| pinout */ ) return pcb_silk_on(PCB); return 0; - case PCB_LYT_PDRILL: - case PCB_LYT_UDRILL: - return 1; case PCB_LYT_UI: return 1; case PCB_LYT_RAT: Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 19132) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 19133) @@ -204,6 +204,9 @@ /* virtual layers */ { + if (PCB_LAYER_IS_DRILL(flags, purpi)) + return 1; + switch (flags & PCB_LYT_ANYTHING) { case PCB_LYT_INVIS: return PCB->InvisibleObjectsOn; @@ -211,9 +214,6 @@ if (PCB_LAYERFLG_ON_VISIBLE_SIDE(flags)) return pcb_silk_on(PCB); return 0; - case PCB_LYT_PDRILL: - case PCB_LYT_UDRILL: - return 1; case PCB_LYT_UI: return 1; case PCB_LYT_RAT: Index: trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c =================================================================== --- trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 19132) +++ trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 19133) @@ -240,6 +240,9 @@ /* virtual layers */ { + if (PCB_LAYER_IS_DRILL(flags, purpi)) + return 1; + switch (flags & PCB_LYT_ANYTHING) { case PCB_LYT_INVIS: return /* pinout ? 0 : */ PCB->InvisibleObjectsOn; @@ -247,9 +250,6 @@ if (PCB_LAYERFLG_ON_VISIBLE_SIDE(flags) /*|| pinout */ ) return pcb_silk_on(PCB); return 0; - case PCB_LYT_PDRILL: - case PCB_LYT_UDRILL: - return 1; case PCB_LYT_UI: return 1; case PCB_LYT_RAT: Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 19132) +++ trunk/src_plugins/hid_lesstif/main.c (revision 19133) @@ -2927,6 +2927,9 @@ /* virtual layers */ { + if (PCB_LAYER_IS_DRILL(flags, purpi)) + return 1; + switch (flags & PCB_LYT_ANYTHING) { case PCB_LYT_INVIS: return pinout ? 0 : PCB->InvisibleObjectsOn; @@ -2934,9 +2937,6 @@ if (PCB_LAYERFLG_ON_VISIBLE_SIDE(flags)) return pcb_silk_on(PCB); return 0; - case PCB_LYT_UDRILL: - case PCB_LYT_PDRILL: - return 1; case PCB_LYT_UI: return 1; case PCB_LYT_RAT: