KiCad PCB EDA Suite
Loading...
Searching...
No Matches
odb_netlist.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5
* Author: SYSUEric <
[email protected]
>.
6
*
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License as published by the
9
* Free Software Foundation, either version 3 of the License, or (at your
10
* option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef _ODB_NETLIST_H_
22
#define _ODB_NETLIST_H_
23
24
#include <wx/string.h>
25
26
// Structure for holding the ODB net point record.
27
struct
ODB_NET_RECORD
28
{
29
bool
smd
;
30
bool
hole
;
31
bool
is_via
;
32
bool
testpoint
;
33
std::string
refdes
;
34
int
drill_radius
;
35
bool
mechanical
;
36
std::string
side
;
// B: Both, T: Top, D: Down
37
38
// All these in PCB units, will be output in decimils
39
int
x_location
;
40
int
y_location
;
41
// Width and height of non-drilled pads (only when radius = 0).
42
int
x_size
;
// Width
43
int
y_size
;
// Height
44
// int rotation;
45
46
std::string
epoint
;
// e: net end point, m: net mid point
47
48
int
soldermask
;
// !< e — Solder mask exposed point. soldermask = 0
49
// !< c — Solder mask covered point. = 3
50
// !< p — Solder mask covered point on top side of product model. = 1
51
// !< s — Solder mask covered point on bottom side of product model. = 2
52
};
53
54
55
class
BOARD
;
56
class
PCB_IO_ODBPP
;
57
struct
ODB_FORMAT
;
58
class
ODB_NET_LIST
59
{
60
public
:
61
ODB_NET_LIST
(
BOARD
* aBoard,
PCB_IO_ODBPP
* aPlugin ) :
m_board
( aBoard ),
m_plugin
( aPlugin ) {}
62
63
virtual
~ODB_NET_LIST
() {}
64
65
void
Write
( std::ostream& aStream,
const
ODB_FORMAT
& aFormat );
66
67
private
:
68
BOARD
*
m_board
;
69
PCB_IO_ODBPP
*
m_plugin
;
70
std::string
ComputeViaAccessSide
(
BOARD
* aBoard,
int
top_layer,
int
bottom_layer );
71
72
void
InitNetPoints
( std::map<
size_t
, std::vector<ODB_NET_RECORD>>& aRecords );
74
void
WriteNetPointRecords
( std::map<
size_t
, std::vector<ODB_NET_RECORD>>& aRecords,
75
std::ostream& aStream,
76
const
ODB_FORMAT
& aFormat );
77
};
78
79
#endif
// _ODB_NETLIST_H_
BOARD
Information pertinent to a Pcbnew printed circuit board.
Definition
board.h:410
ODB_NET_LIST::m_board
BOARD * m_board
Definition
odb_netlist.h:68
ODB_NET_LIST::ComputeViaAccessSide
std::string ComputeViaAccessSide(BOARD *aBoard, int top_layer, int bottom_layer)
Definition
odb_netlist.cpp:47
ODB_NET_LIST::WriteNetPointRecords
void WriteNetPointRecords(std::map< size_t, std::vector< ODB_NET_RECORD > > &aRecords, std::ostream &aStream, const ODB_FORMAT &aFormat)
Writes a list of records to the given output stream.
Definition
odb_netlist.cpp:134
ODB_NET_LIST::m_plugin
PCB_IO_ODBPP * m_plugin
Definition
odb_netlist.h:69
ODB_NET_LIST::ODB_NET_LIST
ODB_NET_LIST(BOARD *aBoard, PCB_IO_ODBPP *aPlugin)
Definition
odb_netlist.h:61
ODB_NET_LIST::Write
void Write(std::ostream &aStream, const ODB_FORMAT &aFormat)
Definition
odb_netlist.cpp:195
ODB_NET_LIST::~ODB_NET_LIST
virtual ~ODB_NET_LIST()
Definition
odb_netlist.h:63
ODB_NET_LIST::InitNetPoints
void InitNetPoints(std::map< size_t, std::vector< ODB_NET_RECORD > > &aRecords)
Definition
odb_netlist.cpp:67
PCB_IO_ODBPP
Definition
pcb_io_odbpp.h:56
ODB_FORMAT
Definition
odb_util.h:66
ODB_NET_RECORD
Definition
odb_netlist.h:28
ODB_NET_RECORD::testpoint
bool testpoint
Definition
odb_netlist.h:32
ODB_NET_RECORD::y_location
int y_location
Definition
odb_netlist.h:40
ODB_NET_RECORD::is_via
bool is_via
Definition
odb_netlist.h:31
ODB_NET_RECORD::soldermask
int soldermask
Definition
odb_netlist.h:48
ODB_NET_RECORD::x_size
int x_size
Definition
odb_netlist.h:42
ODB_NET_RECORD::side
std::string side
Definition
odb_netlist.h:36
ODB_NET_RECORD::y_size
int y_size
Definition
odb_netlist.h:43
ODB_NET_RECORD::epoint
std::string epoint
Definition
odb_netlist.h:46
ODB_NET_RECORD::hole
bool hole
Definition
odb_netlist.h:30
ODB_NET_RECORD::x_location
int x_location
Definition
odb_netlist.h:39
ODB_NET_RECORD::drill_radius
int drill_radius
Definition
odb_netlist.h:34
ODB_NET_RECORD::mechanical
bool mechanical
Definition
odb_netlist.h:35
ODB_NET_RECORD::smd
bool smd
Definition
odb_netlist.h:29
ODB_NET_RECORD::refdes
std::string refdes
Definition
odb_netlist.h:33
src
pcbnew
pcb_io
odbpp
odb_netlist.h
Generated on Wed Oct 7 2026 00:06:04 for KiCad PCB EDA Suite by
1.13.2