Horizon
keepout.hpp
1 #pragma once
2 #include "block/net.hpp"
3 #include "common/polygon.hpp"
4 #include "clipper/clipper.hpp"
5 
6 namespace horizon {
7 using json = nlohmann::json;
8 
9 class Keepout : public PolygonUsage {
10 public:
11  Keepout(const UUID &uu, const json &j, class ObjectProvider &prv);
12  Keepout(const UUID &uu);
13  UUID uuid;
14  uuid_ptr<Polygon> polygon;
15  std::string keepout_class;
16 
17  std::set<PatchType> patch_types_cu;
18  bool exposed_cu_only = false;
19  bool all_cu_layers = false;
20 
21  Type get_type() const override;
22  UUID get_uuid() const override;
23 
24  json serialize() const;
25 };
26 
27 class KeepoutContour {
28 public:
29  const Keepout *keepout = nullptr;
30  const class BoardPackage *pkg = nullptr;
31  ClipperLib::Path contour;
32 };
33 
34 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61