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 
28 public:
29  const Keepout *keepout = nullptr;
30  const class BoardPackage *pkg = nullptr;
31  ClipperLib::Path contour;
32 };
33 
34 } // namespace horizon
horizon::uuid_ptr
Definition: uuid_ptr.hpp:8
horizon::PolygonUsage
Definition: polygon.hpp:15
horizon::Keepout
Definition: keepout.hpp:9
horizon::BoardPackage
Definition: board_package.hpp:15
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::KeepoutContour
Definition: keepout.hpp:27
horizon::ObjectProvider
Interface for classes that store objects identified by UUID (e.g. Line or Junction)
Definition: object_provider.hpp:10