2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
5 #include "junction.hpp"
6 #include "util/uuid_ptr.hpp"
17 enum class Type { INVALID, PLANE, KEEPOUT };
18 virtual Type get_type()
const = 0;
19 virtual UUID get_uuid()
const = 0;
20 virtual ~PolygonUsage(){};
31 enum class Type { LINE, ARC };
33 Vertex(
const json &j);
34 Vertex(
const Coordi &c);
38 json serialize()
const;
41 Type type = Type::LINE;
52 Polygon(
const UUID &uu,
const json &j);
53 Polygon(
const UUID &uu);
54 UUID get_uuid()
const;
56 Vertex *append_vertex(
const Coordi &pos = Coordi());
57 std::pair<unsigned int, unsigned int> get_vertices_for_edge(
unsigned int edge);
69 bool is_valid()
const;
72 std::deque<Vertex> vertices;
74 std::string parameter_class;
77 json serialize()
const;