2 #include "common/common.hpp"
3 #include "common/hole.hpp"
4 #include "common/layer_provider.hpp"
5 #include "common/lut.hpp"
6 #include "common/polygon.hpp"
7 #include "common/shape.hpp"
8 #include "nlohmann/json_fwd.hpp"
9 #include "parameter/program.hpp"
10 #include "parameter/program_polygon.hpp"
11 #include "util/uuid.hpp"
16 #include "util/file_version.hpp"
27 std::map<UUID, Polygon> &get_polygons()
override;
30 ParameterProgram::CommandHandler get_command(
const std::string &cmd)
override;
40 enum class Type { TOP, BOTTOM, THROUGH, VIA, HOLE, MECHANICAL };
45 static Padstack new_from_file(
const std::string &filename);
47 json serialize()
const;
54 std::string well_known_name;
55 Type type = Type::TOP;
56 std::map<UUID, Polygon> polygons;
57 std::map<UUID, Hole> holes;
58 std::map<UUID, Shape> shapes;
60 ParameterSet parameter_set;
61 std::set<ParameterID> parameters_required;
66 std::pair<bool, std::string> apply_parameter_set(
const ParameterSet &ps);
68 UUID get_uuid()
const;
69 std::pair<Coordi, Coordi> get_bbox(
bool copper_only =
false)
const;
70 void expand_inner(
unsigned int n_inner);
71 const std::map<int, Layer> &get_layers()
const override;