Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 19152) +++ trunk/src/layer.h (revision 19153) @@ -97,10 +97,18 @@ #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))) -#define PCB_LAYER_IS_UROUTE(lyt, purpi) ((((lyt) & PCB_LYT_BOUNDARY) && ((((purpi) == F_uroute)))) || ((lyt) & PCB_LYT_OUTLINE)) -#define PCB_LAYER_IS_PROUTE(lyt, purpi) ((((lyt) & PCB_LYT_BOUNDARY) && (((purpi) == F_proute)))) -#define PCB_LAYER_IS_ROUTE(lyt, purpi) ((((lyt) & PCB_LYT_BOUNDARY) && (((purpi) == F_proute) || ((purpi) == F_uroute))) || ((lyt) & PCB_LYT_OUTLINE)) +/* Route must be on a mech or boundary layer */ +#define PCB_LAYER_IS_UROUTE(lyt, purpi) ((((lyt) & (PCB_LYT_BOUNDARY | PCB_LYT_MECH)) && ((((purpi) == F_uroute)))) || ((lyt) & PCB_LYT_OUTLINE)) +#define PCB_LAYER_IS_PROUTE(lyt, purpi) ((((lyt) & (PCB_LYT_BOUNDARY | PCB_LYT_MECH)) && (((purpi) == F_proute)))) +#define PCB_LAYER_IS_ROUTE(lyt, purpi) ((((lyt) & (PCB_LYT_BOUNDARY | PCB_LYT_MECH)) && (((purpi) == F_proute) || ((purpi) == F_uroute))) || ((lyt) & PCB_LYT_OUTLINE)) + +/* Outline is a route in a boundary group; outline in this sense + means the "perimeter of the board", but could include largish internal + cutout - the user needs to be explicit about this. Mech layers are NOT + included, that's the difference compared to routed layers */ +#define PCB_LAYER_IS_OUTLINE(lyt, purpi) ((((lyt) & PCB_LYT_BOUNDARY) && (((purpi) == F_proute) || ((purpi) == F_uroute))) || ((lyt) & PCB_LYT_OUTLINE)) + #include "globalconst.h" #include "global_typedefs.h" #include "attrib.h" Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 19152) +++ trunk/src_plugins/io_pcb/file.c (revision 19153) @@ -540,7 +540,7 @@ int purpi = pcb_layer_purpose_(layer, NULL); /* The old PCB format encodes some properties in layer names - have to alter the real layer name before save to get the same effect */ - if (PCB_LAYER_IS_UROUTE(lflg, purpi)) { + if (PCB_LAYER_IS_OUTLINE(lflg, purpi)) { if (pcb_strcasecmp(name, "outline") == 0) return name; return "Outline";