KiCad PCB EDA Suite
Loading...
Searching...
No Matches
export_d356.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 (C) 2020 Jon Evans <[email protected]>
5 * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
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 along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include <wx/string.h>
22
23class BOARD;
24class wxWindow;
25
26
27/* Structure for holding the D-356 record fields.
28 * Useful because 356A (when implemented) must be sorted before outputting it */
30{
31 bool smd;
32 bool hole;
33 wxString netname;
34 wxString refdes;
35 wxString pin;
37 int drill;
39 int access; // Access 0 is 'both sides'
41 // All these in PCB units, will be output in decimils
44 int x_size;
45 int y_size;
47};
48
49
54{
55public:
61 IPC356D_WRITER( BOARD* aPcb, wxWindow* aParent = nullptr ) :
62 m_pcb( aPcb ), m_parent( aParent )
63 {}
64
65 virtual ~IPC356D_WRITER() {}
66
71 void Write( const wxString& aFilename );
72
73private:
75 wxWindow* m_parent;
76
78 void write_D356_records( std::vector<D356_RECORD> &aRecords, FILE* aFile );
79};
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
Wrapper to expose an API for writing IPC-D356 files.
Definition: export_d356.h:54
void Write(const wxString &aFilename)
Generates and writes the netlist to a given path.
wxWindow * m_parent
Definition: export_d356.h:75
void write_D356_records(std::vector< D356_RECORD > &aRecords, FILE *aFile)
Writes a list of records to the given output stream.
IPC356D_WRITER(BOARD *aPcb, wxWindow *aParent=nullptr)
Constructs an IPC-356D file writer.
Definition: export_d356.h:61
BOARD * m_pcb
Definition: export_d356.h:74
virtual ~IPC356D_WRITER()
Definition: export_d356.h:65
int x_location
Definition: export_d356.h:42
wxString refdes
Definition: export_d356.h:34
bool midpoint
Definition: export_d356.h:36
bool mechanical
Definition: export_d356.h:38
int y_location
Definition: export_d356.h:43
wxString pin
Definition: export_d356.h:35
int soldermask
Definition: export_d356.h:40
wxString netname
Definition: export_d356.h:33