Horizon
src
common
hole.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "common.hpp"
4
#include "nlohmann/json_fwd.hpp"
5
#include "polygon.hpp"
6
#include <vector>
7
#include <map>
8
#include <fstream>
9
#include "util/placement.hpp"
10
11
12
namespace
horizon {
13
using
json
=
nlohmann::json
;
14
18
class
Hole {
19
public
:
20
Hole(
const
UUID &uu,
const
json
&j);
21
Hole(
const
UUID &uu);
22
23
UUID uuid;
24
Placement placement;
25
uint64_t
diameter = 0.5_mm;
26
uint64_t
length = 0.5_mm;
27
std::string parameter_class;
28
33
bool
plated
=
false
;
34
35
enum class
Shape { ROUND, SLOT };
36
Shape shape = Shape::ROUND;
37
38
Polygon to_polygon()
const
;
39
40
41
UUID get_uuid()
const
;
42
43
// not stored
44
json
serialize()
const
;
45
};
46
}
// namespace horizon
horizon::Hole::plated
bool plated
true if this hole is PTH, false if NPTH.
Definition:
hole.hpp:33
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
libzip::uint64_t
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition:
zip.hpp:108
Generated by
1.8.20