Horizon
Loading...
Searching...
No Matches
src
export_odb
surface_data.hpp
1
#pragma once
2
#include <string>
3
#include <ostream>
4
#include <type_traits>
5
#include "attributes.hpp"
6
#include <map>
7
#include <vector>
8
#include "common/common.hpp"
9
#include "util/placement.hpp"
10
11
namespace
horizon {
12
class
Polygon;
13
}
// namespace horizon
14
15
namespace
horizon::ODB {
16
17
class
SurfaceData
{
18
public
:
19
class
SurfaceLine
{
20
public
:
21
enum class
Direction { CW, CCW };
22
enum class
Type { SEGMENT, ARC };
23
24
SurfaceLine
(
const
Coordi
&c) : end(c)
25
{
26
}
27
SurfaceLine
(
const
Coordi
&e,
const
Coordi
&c, Direction d) : end(e), type(Type::ARC), center(c), direction(d)
28
{
29
}
30
31
Coordi
end;
32
Type type = Type::SEGMENT;
33
34
35
Coordi
center;
36
Direction direction;
37
};
38
39
void
write(std::ostream &ost)
const
;
40
41
void
append_polygon(
const
Polygon
&poly,
const
Placement
&transform =
Placement
());
42
void
append_polygon_auto_orientation(
const
Polygon
&poly,
const
Placement
&transform =
Placement
());
43
44
45
// first one is contour (island) oriented clockwise
46
// remainder are holes oriented counter clockwise
47
std::vector<std::vector<SurfaceLine>> lines;
48
};
49
50
}
// namespace horizon::ODB
horizon::Coord< int64_t >
horizon::ODB::SurfaceData::SurfaceLine
Definition
surface_data.hpp:19
horizon::ODB::SurfaceData
Definition
surface_data.hpp:17
horizon::Placement
Definition
placement.hpp:8
horizon::Polygon
Polygon used in Padstack, Package and Board for specifying filled Regions.
Definition
polygon.hpp:25
Generated by
1.9.8