KiCad PCB EDA Suite
Loading...
Searching...
No Matches
easypc_classes_geometry.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 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
27
28#ifndef EASYPC_CLASSES_GEOMETRY_H
29#define EASYPC_CLASSES_GEOMETRY_H
30
31#include <cstdint>
32#include <vector>
33
34#include <wx/string.h>
35
37
38
39namespace EASYPC
40{
41
42enum AREA_TYPE : int32_t
43{
47};
48
49
61
62
69
70
76{
77 LOAD_TASK Load( ARCHIVE& aAr ) final;
78
80 virtual LOAD_TASK LoadTail( ARCHIVE& aAr );
81
82 int32_t X = 0;
83 int32_t Y = 0;
84 int32_t ArcAngle = 0;
85 bool Anticlockwise = true;
86 bool HasNextRef = false;
87 SOURCE_SEGMENT* Next = nullptr;
88};
89
90
93{
94 LOAD_TASK LoadTail( ARCHIVE& aAr ) override;
95
97 int ItemFormat( const ARCHIVE& aAr ) const override;
98
99 OBJECT* Shape = nullptr;
100};
101
102
105{
106 LOAD_TASK Load( ARCHIVE& aAr ) override;
107 LOAD_TASK LoadShape( ARCHIVE& aAr, int aFormat );
108
110 bool IsClosed() const;
111
112 int Format = 0;
113 std::vector<OBJECT*> Segments;
114 bool Closed = false;
115 bool HasClosed = false;
116};
117
118
120{
121 LOAD_TASK Load( ARCHIVE& aAr ) override;
122 int ItemFormat( const ARCHIVE& aAr ) const override;
123
124 OBJECT* Parent = nullptr;
125};
126
127
130{
131 LOAD_TASK Load( ARCHIVE& aAr ) override;
132
133 std::vector<OBJECT*> Cutouts;
134};
135
136
138{
139 LOAD_TASK Load( ARCHIVE& aAr ) override;
140
141 OBJECT* Style = nullptr;
142 bool Filled = false;
143 OBJECT* Shape = nullptr;
144};
145
146
148{
149 LOAD_TASK Load( ARCHIVE& aAr ) override;
150
151 OBJECT* Layer = nullptr;
152};
153
154
156{
157 LOAD_TASK Load( ARCHIVE& aAr ) override;
158
160 OBJECT* Net = nullptr;
161 OBJECT* Copper = nullptr;
162 int32_t Flags = 5;
163 int32_t Height = 0;
164 wxString Name;
165};
166
167
170{
171 LOAD_TASK Load( ARCHIVE& aAr ) override;
172
173 OBJECT* Terminals = nullptr;
174 int32_t Type = 0;
175 int32_t PinNumber = 0;
176};
177
178
180{
181 LOAD_TASK Load( ARCHIVE& aAr ) override;
182
185
186 OBJECT* TextStyle = nullptr;
187 bool Mirrored = false;
189 int32_t Rotation = 0;
190 OBJECT* Layer = nullptr;
192};
193
194
196{
197 LOAD_TASK Load( ARCHIVE& aAr ) override;
198
199 wxString Text;
200};
201
202
204{
205 LOAD_TASK Load( ARCHIVE& aAr ) override;
206
207 uint64_t Types = 0;
208 bool Displayed = true;
209 wxString Attribute;
210};
211
212
214{
215 LOAD_TASK Load( ARCHIVE& aAr ) override;
216
217 OBJECT* Text = nullptr;
218};
219
220
223{
224 LOAD_TASK Load( ARCHIVE& aAr ) override;
225
226 wxString Name;
227 int32_t Flags = 1;
228 std::vector<OBJECT*> Members;
229};
230
231
234{
235 LOAD_TASK Load( ARCHIVE& aAr ) override;
236
238 OBJECT* TextStyle = nullptr;
239 OBJECT* Layer = nullptr;
240 int32_t Rotation = 0;
241 bool Mirrored = false;
242};
243
244} // namespace EASYPC
245
246#endif // EASYPC_CLASSES_GEOMETRY_H
One archive load stream; it owns every object it creates.
A loader coroutine. Awaiting one queues it on its archive's frame stack instead of nesting the call.
The design document and the design parameter tables the importers use.
AREA_FLAG
Area flags; track and via bits restrict routing areas, the pour keepout applies to every area.
@ AREA_TRACKS_MASK
0 unrestricted, 1 keep in, 2 keep out
Root of every deserialized object.
A point read as two int32 values.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
OBJECT * Copper
design list of the stored pour
int ItemFormat(const ARCHIVE &aAr) const override
The owning shape's parent's format, 0 without one.
LOAD_TASK LoadTail(ARCHIVE &aAr) override
The fields a subclass reads after the next vertex.
int ItemFormat(const ARCHIVE &aAr) const override
The version this object gates on; the base is the archive's current read format.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
The base of nearly every class.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
Every drawn shape, pour and dimension part.
int32_t Type
0 shape, 1 poured, 2 teardrop, 5 to 7 dimension parts
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
Also the start of a dimension.
std::vector< OBJECT * > Members
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
int32_t Flags
bit 0 tight, bit 1 local
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
Also placement and symbol name origins.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
bool HasNextRef
the stream carried a next vertex (shape format below 3)
virtual LOAD_TASK LoadTail(ARCHIVE &aAr)
The fields a subclass reads after the next vertex.
int32_t ArcAngle
swept angle, 0 for a straight span
SOURCE_SEGMENT * Next
null on an open shape's terminator
LOAD_TASK Load(ARCHIVE &aAr) final
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
bool IsClosed() const
The last vertex links back to the first (formats 1 and 2) or the closed byte is set (format 3)
LOAD_TASK LoadShape(ARCHIVE &aAr, int aFormat)
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
std::vector< OBJECT * > Segments
the vertex list as read
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK LoadRemainder(ARCHIVE &aAr)
The text position fields that follow the item fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.