KiCad PCB EDA Suite
Loading...
Searching...
No Matches
autotrax_model.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 * Format interpretation derived from pcb-rnd src_plugins/io_autotrax:
5 * Copyright (C) 2016, 2017, 2018, 2020 Tibor 'Igor2' Palinkas
6 * Copyright (C) 2016, 2017 Erich S. Heinzle
7 * Used under GPL v2-or-later.
8 *
9 * Copyright (C) 2026 KiCad Developers, see AUTHORS.txt for contributors.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
25#ifndef AUTOTRAX_MODEL_H_
26#define AUTOTRAX_MODEL_H_
27
28#include <vector>
29
30#include <wx/string.h>
31
32namespace AUTOTRAX
33{
34
56
57
59struct TRACK
60{
61 double x1 = 0;
62 double y1 = 0;
63 double x2 = 0;
64 double y2 = 0;
65 double width = 0;
66 int layer = 0;
67};
68
69
72struct ARC
73{
74 double centerX = 0;
75 double centerY = 0;
76 double radius = 0;
77 int segments = 15;
78 double width = 0;
79 int layer = 0;
80};
81
82
84struct VIA
85{
86 double x = 0;
87 double y = 0;
88 double diameter = 0;
89 double drill = 0;
90};
91
92
94struct PAD
95{
96 double x = 0;
97 double y = 0;
98 double xSize = 0;
99 double ySize = 0;
100 int shape = 0;
101 double drill = 0;
102 int planeFlags = 0;
103 int layer = 0;
104 wxString name;
105};
106
107
109struct FILL
110{
111 double x1 = 0;
112 double y1 = 0;
113 double x2 = 0;
114 double y2 = 0;
115 int layer = 0;
116};
117
118
120struct TEXT
121{
122 double x = 0;
123 double y = 0;
124 double height = 0;
125 int direction = 0;
126 double width = 0;
127 int layer = 0;
128 wxString text;
129};
130
131
134{
135 wxString refdes;
136 wxString name;
137 wxString value;
138 double x = 0;
139 double y = 0;
140
141 std::vector<TRACK> tracks;
142 std::vector<ARC> arcs;
143 std::vector<VIA> vias;
144 std::vector<PAD> pads;
145 std::vector<FILL> fills;
146 std::vector<TEXT> texts;
147};
148
149
152{
153 wxString netName;
154 wxString node;
155};
156
157
163{
164 int version = 4;
165
166 std::vector<TRACK> tracks;
167 std::vector<ARC> arcs;
168 std::vector<VIA> vias;
169 std::vector<PAD> pads;
170 std::vector<FILL> fills;
171 std::vector<TEXT> texts;
172 std::vector<COMPONENT> components;
173 std::vector<NET_NODE> netNodes;
174};
175
176} // namespace AUTOTRAX
177
178#endif // AUTOTRAX_MODEL_H_
LAYER
Autotrax/Easytrax layer numbers as stored in the file.
@ LAYER_BOTTOM_COPPER
Free or component arc (FA / CA).
int segments
quadrant bitmask; 15 = full circle
Everything parsed out of an Autotrax/Easytrax file, before any KiCad object is created.
std::vector< COMPONENT > components
std::vector< VIA > vias
std::vector< NET_NODE > netNodes
std::vector< PAD > pads
std::vector< TRACK > tracks
int version
4 = Autotrax, 5 = Easytrax
std::vector< TEXT > texts
std::vector< ARC > arcs
std::vector< FILL > fills
A placed component (COMP .. ENDCOMP) holding its own primitives.
std::vector< ARC > arcs
std::vector< TRACK > tracks
std::vector< VIA > vias
std::vector< PAD > pads
std::vector< FILL > fills
std::vector< TEXT > texts
Free or component rectangular fill (FF / CF), Autotrax's only pour.
One refdes -> net membership row collected from the NETDEF section.
wxString node
"refdes-pad" connection token
Free or component pad/pin (FP / CP).
int shape
1 round, 2 rect, 3 octagon, 4 round-rect
Free or component string (FS / CS).
int direction
0..3, multiplied by 90 degrees
Free or component track segment (FT / CT). All coordinates are in mils.
Free or component via (FV / CV).