2020-02-03 16:46:58 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2022-06-04 09:02:23 +00:00
|
|
|
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2020-02-03 16:46:58 +00:00
|
|
|
*
|
|
|
|
* 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 the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-07-29 09:47:43 +00:00
|
|
|
#include <layer_ids.h>
|
2021-06-07 22:38:35 +00:00
|
|
|
#include <wx/translation.h>
|
2020-02-03 16:46:58 +00:00
|
|
|
|
2020-09-23 23:58:46 +00:00
|
|
|
/**
|
|
|
|
* Returns the default display name for a given layer. These are not the same as the canonical
|
|
|
|
* name in LSET::Name(), which is used in board files and cannot be translated or changed.
|
2022-06-04 09:02:23 +00:00
|
|
|
* WARNING: do not translate board physical layers names (F.Cu to User.9): because canonical names
|
|
|
|
* are used in files (boards and fab files), using translated names in UI create mistakes for users.
|
|
|
|
* Board physical layers names must be seen as proper nouns.
|
2020-09-23 23:58:46 +00:00
|
|
|
*/
|
2020-04-24 01:55:20 +00:00
|
|
|
wxString LayerName( int aLayer )
|
2020-02-03 16:46:58 +00:00
|
|
|
{
|
|
|
|
switch( aLayer )
|
|
|
|
{
|
2020-08-31 00:20:45 +00:00
|
|
|
// PCB_LAYER_ID
|
2022-06-04 09:02:23 +00:00
|
|
|
case F_Cu: return wxT( "F.Cu" );
|
|
|
|
case In1_Cu: return wxT( "In1.Cu" );
|
|
|
|
case In2_Cu: return wxT( "In2.Cu" );
|
|
|
|
case In3_Cu: return wxT( "In3.Cu" );
|
|
|
|
case In4_Cu: return wxT( "In4.Cu" );
|
|
|
|
case In5_Cu: return wxT( "In5.Cu" );
|
|
|
|
case In6_Cu: return wxT( "In6.Cu" );
|
|
|
|
case In7_Cu: return wxT( "In7.Cu" );
|
|
|
|
case In8_Cu: return wxT( "In8.Cu" );
|
|
|
|
case In9_Cu: return wxT( "In9.Cu" );
|
|
|
|
case In10_Cu: return wxT( "In10.Cu" );
|
|
|
|
case In11_Cu: return wxT( "In11.Cu" );
|
|
|
|
case In12_Cu: return wxT( "In12.Cu" );
|
|
|
|
case In13_Cu: return wxT( "In13.Cu" );
|
|
|
|
case In14_Cu: return wxT( "In14.Cu" );
|
|
|
|
case In15_Cu: return wxT( "In15.Cu" );
|
|
|
|
case In16_Cu: return wxT( "In16.Cu" );
|
|
|
|
case In17_Cu: return wxT( "In17.Cu" );
|
|
|
|
case In18_Cu: return wxT( "In18.Cu" );
|
|
|
|
case In19_Cu: return wxT( "In19.Cu" );
|
|
|
|
case In20_Cu: return wxT( "In20.Cu" );
|
|
|
|
case In21_Cu: return wxT( "In21.Cu" );
|
|
|
|
case In22_Cu: return wxT( "In22.Cu" );
|
|
|
|
case In23_Cu: return wxT( "In23.Cu" );
|
|
|
|
case In24_Cu: return wxT( "In24.Cu" );
|
|
|
|
case In25_Cu: return wxT( "In25.Cu" );
|
|
|
|
case In26_Cu: return wxT( "In26.Cu" );
|
|
|
|
case In27_Cu: return wxT( "In27.Cu" );
|
|
|
|
case In28_Cu: return wxT( "In28.Cu" );
|
|
|
|
case In29_Cu: return wxT( "In29.Cu" );
|
|
|
|
case In30_Cu: return wxT( "In30.Cu" );
|
|
|
|
case B_Cu: return wxT( "B.Cu" );
|
2020-08-31 00:20:45 +00:00
|
|
|
|
|
|
|
// Technicals
|
2022-06-04 09:02:23 +00:00
|
|
|
case B_Adhes: return wxT( "B.Adhesive" );
|
|
|
|
case F_Adhes: return wxT( "F.Adhesive" );
|
|
|
|
case B_Paste: return wxT( "B.Paste" );
|
|
|
|
case F_Paste: return wxT( "F.Paste" );
|
|
|
|
case B_SilkS: return wxT( "B.Silkscreen" );
|
|
|
|
case F_SilkS: return wxT( "F.Silkscreen" );
|
|
|
|
case B_Mask: return wxT( "B.Mask" );
|
|
|
|
case F_Mask: return wxT( "F.Mask" );
|
2020-08-31 00:20:45 +00:00
|
|
|
|
|
|
|
// Users
|
2022-06-04 09:02:23 +00:00
|
|
|
case Dwgs_User: return wxT( "User.Drawings" );
|
|
|
|
case Cmts_User: return wxT( "User.Comments" );
|
|
|
|
case Eco1_User: return wxT( "User.Eco1" );
|
|
|
|
case Eco2_User: return wxT( "User.Eco2" );
|
|
|
|
case Edge_Cuts: return wxT( "Edge.Cuts" );
|
|
|
|
case Margin: return wxT( "Margin" );
|
2020-08-31 00:20:45 +00:00
|
|
|
|
|
|
|
// Footprint
|
2022-06-04 09:02:23 +00:00
|
|
|
case F_CrtYd: return wxT( "F.Courtyard" );
|
|
|
|
case B_CrtYd: return wxT( "B.Courtyard" );
|
|
|
|
case F_Fab: return wxT( "F.Fab" );
|
|
|
|
case B_Fab: return wxT( "B.Fab" );
|
2020-08-31 00:20:45 +00:00
|
|
|
|
2020-09-22 21:50:59 +00:00
|
|
|
// User definable layers.
|
2022-06-04 09:02:23 +00:00
|
|
|
case User_1: return wxT( "User.1" );
|
|
|
|
case User_2: return wxT( "User.2" );
|
|
|
|
case User_3: return wxT( "User.3" );
|
|
|
|
case User_4: return wxT( "User.4" );
|
|
|
|
case User_5: return wxT( "User.5" );
|
|
|
|
case User_6: return wxT( "User.6" );
|
|
|
|
case User_7: return wxT( "User.7" );
|
|
|
|
case User_8: return wxT( "User.8" );
|
|
|
|
case User_9: return wxT( "User.9" );
|
2020-09-22 21:50:59 +00:00
|
|
|
|
2020-08-31 00:20:45 +00:00
|
|
|
// Rescue
|
|
|
|
case Rescue: return _( "Rescue" );
|
2020-09-22 21:50:59 +00:00
|
|
|
|
2020-04-24 01:55:20 +00:00
|
|
|
// SCH_LAYER_ID
|
|
|
|
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_WIRE: return _( "Wires" );
|
|
|
|
case LAYER_BUS: return _( "Buses" );
|
|
|
|
case LAYER_BUS_JUNCTION: return _( "Bus junctions" );
|
|
|
|
case LAYER_JUNCTION: return _( "Junctions" );
|
|
|
|
case LAYER_LOCLABEL: return _( "Labels" );
|
|
|
|
case LAYER_GLOBLABEL: return _( "Global labels" );
|
|
|
|
case LAYER_HIERLABEL: return _( "Hierarchical labels" );
|
|
|
|
case LAYER_PINNUM: return _( "Pin numbers" );
|
|
|
|
case LAYER_PINNAM: return _( "Pin names" );
|
|
|
|
case LAYER_REFERENCEPART: return _( "Symbol references" );
|
|
|
|
case LAYER_VALUEPART: return _( "Symbol values" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_FIELDS: return _( "Symbol fields" );
|
2021-10-12 20:05:37 +00:00
|
|
|
case LAYER_INTERSHEET_REFS: return _( "Sheet references" );
|
|
|
|
case LAYER_NETCLASS_REFS: return _( "Net class references" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_DEVICE: return _( "Symbol body outlines" );
|
|
|
|
case LAYER_DEVICE_BACKGROUND: return _( "Symbol body fills" );
|
2021-12-02 13:17:18 +00:00
|
|
|
case LAYER_NOTES: return _( "Schematic text && graphics" );
|
2022-07-07 04:51:23 +00:00
|
|
|
case LAYER_PRIVATE_NOTES: return _( "Symbol private text && graphics" );
|
2021-07-17 19:56:18 +00:00
|
|
|
case LAYER_NOTES_BACKGROUND: return _( "Schematic text && graphics backgrounds" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_PIN: return _( "Pins" );
|
|
|
|
case LAYER_SHEET: return _( "Sheet borders" );
|
|
|
|
case LAYER_SHEET_BACKGROUND: return _( "Sheet backgrounds" );
|
|
|
|
case LAYER_SHEETNAME: return _( "Sheet names" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_SHEETFIELDS: return _( "Sheet fields" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_SHEETFILENAME: return _( "Sheet file names" );
|
2020-12-13 18:09:53 +00:00
|
|
|
case LAYER_SHEETLABEL: return _( "Sheet pins" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_NOCONNECT: return _( "No-connect symbols" );
|
|
|
|
case LAYER_ERC_WARN: return _( "ERC warnings" );
|
|
|
|
case LAYER_ERC_ERR: return _( "ERC errors" );
|
2021-11-05 21:16:26 +00:00
|
|
|
case LAYER_ERC_EXCLUSION: return _( "ERC exclusions" );
|
2021-09-29 00:26:47 +00:00
|
|
|
case LAYER_SCHEMATIC_ANCHOR: return _( "Anchors" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_SCHEMATIC_AUX_ITEMS: return _( "Helper items" );
|
|
|
|
case LAYER_SCHEMATIC_GRID: return _( "Grid" );
|
|
|
|
case LAYER_SCHEMATIC_GRID_AXES: return _( "Axes" );
|
|
|
|
case LAYER_SCHEMATIC_BACKGROUND: return _( "Background" );
|
|
|
|
case LAYER_SCHEMATIC_CURSOR: return _( "Cursor" );
|
2022-05-14 15:49:53 +00:00
|
|
|
case LAYER_HOVERED: return _( "Hovered items" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_BRIGHTENED: return _( "Highlighted items" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_HIDDEN: return _( "Hidden items" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" );
|
2021-02-22 16:37:43 +00:00
|
|
|
case LAYER_SCHEMATIC_DRAWINGSHEET: return _( "Drawing sheet" );
|
2022-03-24 14:10:47 +00:00
|
|
|
case LAYER_SCHEMATIC_PAGE_LIMITS: return _( "Page limits" );
|
2020-02-03 16:46:58 +00:00
|
|
|
|
2020-04-24 01:55:20 +00:00
|
|
|
// GAL_LAYER_ID
|
|
|
|
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_MOD_FR: return _( "Footprints front" );
|
|
|
|
case LAYER_MOD_BK: return _( "Footprints back" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_MOD_VALUES: return _( "Values" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_MOD_REFERENCES: return _( "Reference designators" );
|
2021-10-22 20:12:57 +00:00
|
|
|
case LAYER_MOD_TEXT: return _( "Footprint text" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_MOD_TEXT_INVISIBLE: return _( "Hidden text" );
|
2021-07-10 09:13:02 +00:00
|
|
|
case LAYER_PAD_FR: return _( "SMD pads front" );
|
|
|
|
case LAYER_PAD_BK: return _( "SMD pads back" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_PADS_TH: return _( "Through-hole pads" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_TRACKS: return _( "Tracks" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_VIA_THROUGH: return _( "Through vias" );
|
2022-03-15 21:57:09 +00:00
|
|
|
case LAYER_VIA_BBLIND: return _( "Blind/Buried vias" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_VIA_MICROVIA: return _( "Micro-vias" );
|
2021-01-30 14:41:31 +00:00
|
|
|
case LAYER_VIA_HOLES: return _( "Via holes" );
|
|
|
|
case LAYER_VIA_HOLEWALLS: return _( "Via hole walls" );
|
|
|
|
case LAYER_PAD_PLATEDHOLES: return _( "Plated holes" );
|
|
|
|
case LAYER_PAD_HOLEWALLS: return _( "Plated hole walls" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_NON_PLATEDHOLES: return _( "Non-plated holes" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_RATSNEST: return _( "Ratsnest" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_DRC_WARNING: return _( "DRC warnings" );
|
|
|
|
case LAYER_DRC_ERROR: return _( "DRC errors" );
|
|
|
|
case LAYER_DRC_EXCLUSION: return _( "DRC exclusions" );
|
|
|
|
case LAYER_MARKER_SHADOWS: return _( "DRC marker shadows" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_ANCHOR: return _( "Anchors" );
|
2021-02-22 16:37:43 +00:00
|
|
|
case LAYER_DRAWINGSHEET: return _( "Drawing sheet" );
|
2022-03-24 14:10:47 +00:00
|
|
|
case LAYER_PAGE_LIMITS: return _( "Page limits" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_CURSOR: return _( "Cursor" );
|
|
|
|
case LAYER_AUX_ITEMS: return _( "Helper items" );
|
|
|
|
case LAYER_GRID: return _( "Grid" );
|
2020-11-25 15:44:29 +00:00
|
|
|
case LAYER_GRID_AXES: return _( "Grid axes" );
|
2020-08-31 00:20:45 +00:00
|
|
|
case LAYER_PCB_BACKGROUND: return _( "Background" );
|
|
|
|
case LAYER_SELECT_OVERLAY: return _( "Selection highlight" );
|
2022-03-06 19:11:03 +00:00
|
|
|
case LAYER_LOCKED_ITEM_SHADOW: return _( "Locked item shadow" );
|
2022-10-19 10:32:16 +00:00
|
|
|
case LAYER_CONFLICTS_SHADOW: return _( "Courtyard collision shadow" );
|
2020-04-24 01:55:20 +00:00
|
|
|
|
2020-02-03 16:46:58 +00:00
|
|
|
default:
|
2020-09-22 21:50:59 +00:00
|
|
|
wxCHECK_MSG( false, wxEmptyString, wxString::Format( "Unknown layer ID %d", aLayer ) );
|
2020-02-03 16:46:58 +00:00
|
|
|
}
|
2020-04-24 01:55:20 +00:00
|
|
|
}
|