Horizon
canvas_pads.hpp
1 #pragma once
2 #include "canvas.hpp"
3 #include "clipper/clipper.hpp"
4 #include "util/uuid.hpp"
5 
6 namespace horizon {
7 class CanvasPads : public Canvas {
8 public:
9  class PadKey {
10  public:
11  int layer;
12  UUID package;
13  UUID pad;
14  bool operator<(const PadKey &other) const
15  {
16  if (layer < other.layer)
17  return true;
18  else if (layer > other.layer)
19  return false;
20 
21  if (package < other.package)
22  return true;
23  if (package > other.package)
24  return false;
25 
26  return pad < other.pad;
27  }
28  };
29  std::map<PadKey, std::pair<Placement, ClipperLib::Paths>> pads;
30 
31  CanvasPads();
32  void push() override
33  {
34  }
35  void request_push() override;
36 
37 private:
38  void img_polygon(const class Polygon &poly, bool tr) override;
39 };
40 } // namespace horizon
horizon::CanvasPads
Definition: canvas_pads.hpp:7
horizon::Polygon
Polygon used in Padstack, Package and Board for specifying filled Regions.
Definition: polygon.hpp:27
horizon::Canvas
Definition: canvas.hpp:22
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::CanvasPads::PadKey
Definition: canvas_pads.hpp:9