Horizon
src
export_odb
canvas_odb.hpp
1
#pragma once
2
#include "canvas/canvas.hpp"
3
#include "db.hpp"
4
5
namespace
horizon {
6
class
CanvasODB
:
public
Canvas
{
7
public
:
8
CanvasODB
(
ODB::Job
&job,
const
class
Board
&brd);
9
void
push()
override
10
{
11
}
12
void
request_push()
override
;
13
uint64_t outline_width = 0;
14
15
std::map<int, ODB::Features *> layer_features;
16
ODB::Features
*drill_features =
nullptr
;
17
ODB::EDAData
*eda_data =
nullptr
;
18
19
std::map<std::pair<UUID, UUID>,
ODB::EDAData::SubnetToeprint
*> pad_subnets;
20
std::map<UUID, ODB::EDAData::SubnetTrace *> track_subnets;
21
22
private
:
23
void
img_net(
const
Net
*net)
override
;
24
void
img_polygon(
const
Polygon
&poly,
bool
tr)
override
;
25
void
img_arc(
const
Arc
&arc)
override
;
26
bool
img_supports_arc()
const override
27
{
28
return
true
;
29
}
30
void
img_line(
const
Coordi
&p0,
const
Coordi
&p1,
const
uint64_t width,
int
layer,
bool
tr =
true
)
override
;
31
void
img_padstack(
const
Padstack
&ps)
override
;
32
void
img_hole(
const
Hole
&hole)
override
;
33
void
img_set_padstack(
bool
v)
override
;
34
void
img_patch_type(PatchType pt)
override
;
35
void
img_text(
const
Text
*text)
override
;
36
37
PatchType patch_type = PatchType::OTHER;
38
const
Text
*text_current =
nullptr
;
39
40
bool
padstack_mode =
false
;
41
42
ODB::Features
*get_layer_features(
int
layer)
43
{
44
auto
x = layer_features.find(layer);
45
if
(x == layer_features.end())
46
return
nullptr
;
47
else
48
return
x->second;
49
}
50
51
ODB::Job
&job;
52
const
Board
&brd;
53
54
std::map<UUID, ODB::EDAData::SubnetVia *> via_subnets;
55
56
ODB::EDAData::SubnetToeprint
*get_subnet_toeprint();
57
};
58
}
// namespace horizon
horizon::Arc
Graphical arc.
Definition:
arc.hpp:17
horizon::Board
Definition:
board.hpp:47
horizon::CanvasODB
Definition:
canvas_odb.hpp:6
horizon::Canvas
Definition:
canvas.hpp:24
horizon::Coord< int64_t >
horizon::Hole
A hole with diameter and position, that's it.
Definition:
hole.hpp:15
horizon::Net
Definition:
net.hpp:11
horizon::ODB::EDAData::SubnetToeprint
Definition:
eda_data.hpp:85
horizon::ODB::EDAData
Definition:
eda_data.hpp:17
horizon::ODB::Features
Definition:
features.hpp:14
horizon::ODB::Job
Definition:
db.hpp:95
horizon::Padstack
Definition:
padstack.hpp:19
horizon::Polygon
Polygon used in Padstack, Package and Board for specifying filled Regions.
Definition:
polygon.hpp:25
horizon::Text
Used wherever a user-editable text is needed.
Definition:
text.hpp:15
Generated by
1.9.1