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
Coordi
&from,
const
Coordi
&to,
const
Coordi
¢er,
const
uint64_t width,
int
layer)
override
;
26
void
img_line(
const
Coordi
&p0,
const
Coordi
&p1,
const
uint64_t width,
int
layer,
bool
tr =
true
)
override
;
27
void
img_padstack(
const
Padstack
&ps)
override
;
28
void
img_hole(
const
Hole
&hole)
override
;
29
void
img_set_padstack(
bool
v)
override
;
30
void
img_patch_type(PatchType pt)
override
;
31
void
img_text(
const
Text
*text)
override
;
32
33
PatchType patch_type = PatchType::OTHER;
34
const
Text
*text_current =
nullptr
;
35
36
bool
padstack_mode =
false
;
37
38
ODB::Features
*get_layer_features(
int
layer)
39
{
40
auto
x = layer_features.find(layer);
41
if
(x == layer_features.end())
42
return
nullptr
;
43
else
44
return
x->second;
45
}
46
47
ODB::Job
&job;
48
const
Board
&brd;
49
50
std::map<UUID, ODB::EDAData::SubnetVia *> via_subnets;
51
52
ODB::EDAData::SubnetToeprint
*get_subnet_toeprint();
53
};
54
}
// namespace horizon
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.4