Horizon
board_layers.hpp
1 #pragma once
2 #include <string>
3 #include <vector>
4 
5 namespace horizon {
6 class BoardLayers {
7 public:
8  enum Layer {
9  TOP_NOTES = 200,
10  L_OUTLINE = 100,
11  TOP_COURTYARD = 60,
12  TOP_ASSEMBLY = 50,
13  TOP_PACKAGE = 40,
14  TOP_PASTE = 30,
15  TOP_SILKSCREEN = 20,
16  TOP_MASK = 10,
17  TOP_COPPER = 0,
18  IN1_COPPER = -1,
19  IN2_COPPER = -2,
20  IN3_COPPER = -3,
21  IN4_COPPER = -4,
22  BOTTOM_COPPER = -100,
23  BOTTOM_MASK = -110,
24  BOTTOM_SILKSCREEN = -120,
25  BOTTOM_PASTE = -130,
26  BOTTOM_PACKAGE = -140,
27  BOTTOM_ASSEMBLY = -150,
28  BOTTOM_COURTYARD = -160,
29  BOTTOM_NOTES = -200
30  };
31 
32  static bool is_copper(int l)
33  {
34  return l <= TOP_COPPER && l >= BOTTOM_COPPER;
35  }
36 
37  static bool is_silkscreen(int l)
38  {
39  return l == TOP_SILKSCREEN || l == BOTTOM_SILKSCREEN;
40  }
41 
42  static std::string get_layer_name(int l);
43  static const std::vector<int> &get_layers();
44 };
45 } // namespace horizon
horizon::BoardLayers
Definition: board_layers.hpp:6