Horizon
rule_clearance_copper_keepout.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include "rules/rule.hpp"
4 #include "rules/rule_match.hpp"
5 #include "rules/rule_match_keepout.hpp"
6 
7 namespace horizon {
8 class RuleClearanceCopperKeepout : public Rule {
9 public:
10  RuleClearanceCopperKeepout(const UUID &uu);
11  RuleClearanceCopperKeepout(const UUID &uu, const json &j);
12  json serialize() const override;
13 
14  std::string get_brief(const class Block *block = nullptr) const override;
15  bool is_match_all() const override;
16 
17  uint64_t get_clearance(PatchType pt_copper) const;
18  void set_clearance(PatchType pt_copper, uint64_t c);
19  uint64_t get_max_clearance() const;
20 
21  RuleMatch match;
22  RuleMatchKeepout match_keepout;
23  uint64_t routing_offset = 0.05_mm;
24 
25 private:
26  std::map<PatchType, uint64_t> clearances;
27 };
28 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
libzip::uint64_t
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition: zip.hpp:108