KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_pcbnew_color_settings.cpp
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-2024 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 <regex>
22
23#include <pgm_base.h>
24#include <board.h>
25#include <layer_ids.h>
26#include <layer_range.h>
29#include <math/vector2wx.h>
30#include <widgets/wx_panel.h>
31#include <pcbnew_settings.h>
35#include <pcb_painter.h>
37#include <wx/treebook.h>
38
39
40std::string g_previewBoard =
41 "(kicad_pcb (version 20230620) (generator pcbnew)\n"
42 "\n"
43 " (general\n"
44 " (thickness 1.6)\n"
45 " )\n"
46 "\n"
47 " (paper \"A4\")\n"
48 " (layers\n"
49 " (0 \"F.Cu\" signal)\n"
50 " (31 \"B.Cu\" signal)\n"
51 " (32 \"B.Adhes\" user \"B.Adhesive\")\n"
52 " (33 \"F.Adhes\" user \"F.Adhesive\")\n"
53 " (34 \"B.Paste\" user)\n"
54 " (35 \"F.Paste\" user)\n"
55 " (36 \"B.SilkS\" user \"B.Silkscreen\")\n"
56 " (37 \"F.SilkS\" user \"F.Silkscreen\")\n"
57 " (38 \"B.Mask\" user)\n"
58 " (39 \"F.Mask\" user)\n"
59 " (40 \"Dwgs.User\" user \"User.Drawings\")\n"
60 " (41 \"Cmts.User\" user \"User.Comments\")\n"
61 " (42 \"Eco1.User\" user \"User.Eco1\")\n"
62 " (43 \"Eco2.User\" user \"User.Eco2\")\n"
63 " (44 \"Edge.Cuts\" user)\n"
64 " (45 \"Margin\" user)\n"
65 " (46 \"B.CrtYd\" user \"B.Courtyard\")\n"
66 " (47 \"F.CrtYd\" user \"F.Courtyard\")\n"
67 " (48 \"B.Fab\" user)\n"
68 " (49 \"F.Fab\" user)\n"
69 " (50 \"User.1\" user)\n"
70 " (51 \"User.2\" user)\n"
71 " (52 \"User.3\" user)\n"
72 " (53 \"User.4\" user)\n"
73 " (54 \"User.5\" user)\n"
74 " (55 \"User.6\" user)\n"
75 " (56 \"User.7\" user)\n"
76 " (57 \"User.8\" user)\n"
77 " (58 \"User.9\" user)\n"
78 " )\n"
79 "\n"
80 " (setup\n"
81 " (pad_to_mask_clearance 0)\n"
82 " (pcbplotparams\n"
83 " (layerselection 0x00010fc_ffffffff)\n"
84 " (plot_on_all_layers_selection 0x0000000_00000000)\n"
85 " (disableapertmacros false)\n"
86 " (usegerberextensions false)\n"
87 " (usegerberattributes true)\n"
88 " (usegerberadvancedattributes true)\n"
89 " (creategerberjobfile true)\n"
90 " (dashed_line_dash_ratio 12.000000)\n"
91 " (dashed_line_gap_ratio 3.000000)\n"
92 " (svgprecision 6)\n"
93 " (plotframeref false)\n"
94 " (viasonmask false)\n"
95 " (mode 1)\n"
96 " (useauxorigin false)\n"
97 " (hpglpennumber 1)\n"
98 " (hpglpenspeed 20)\n"
99 " (hpglpendiameter 15.000000)\n"
100 " (pdf_front_fp_property_popups true)\n"
101 " (pdf_back_fp_property_popups true)\n"
102 " (dxfpolygonmode true)\n"
103 " (dxfimperialunits true)\n"
104 " (dxfusepcbnewfont true)\n"
105 " (psnegative false)\n"
106 " (psa4output false)\n"
107 " (plotreference true)\n"
108 " (plotvalue true)\n"
109 " (plotinvisibletext false)\n"
110 " (plotpadnumbers false)\n"
111 " (sketchpadsonfab false)\n"
112 " (subtractmaskfromsilk false)\n"
113 " (outputformat 1)\n"
114 " (mirror false)\n"
115 " (drillshape 1)\n"
116 " (scaleselection 1)\n"
117 " (outputdirectory \"\")\n"
118 " )\n"
119 " )\n"
120 "\n"
121 " (net 0 \"\")\n"
122 " (net 1 \"GND\")\n"
123 "\n"
124 " (footprint \"Wire_Pads:SolderWirePad_single_1-2mmDrill\" (layer \"F.Cu\")\n"
125 " (tstamp 196cc548-e42d-4d1f-b07f-f00a85d6308b)\n"
126 " (at 22.7 34.09)\n"
127 " (property \"Reference\" \"\" (at 0 -3.81 0) (layer \"F.SilkS\") hide (tstamp 6d50c232-866c-4b86-8aff-b6f4f27af92c)\n"
128 " (effects (font (size 1 1) (thickness 0.15)))\n"
129 " )\n"
130 " (property \"Value\" \"SolderWirePad_single_1-2mmDrill\" (at 11.4 2.81 0) (layer \"F.Fab\") (tstamp b7a15261-2581-4434-810f-55e348906d24)\n"
131 " (effects (font (size 1 1) (thickness 0.15)))\n"
132 " )\n"
133 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp a6b3c7f8-29ac-4f13-86a1-b0dd4581afbe)\n"
134 " (effects (font (size 1.27 1.27)))\n"
135 " )\n"
136 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 0adf18bc-873a-45c5-ba4c-e9c8b29d0909)\n"
137 " (effects (font (size 1.27 1.27)))\n"
138 " )\n"
139 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 60e1a8b7-e355-4adf-b996-956d4525cff6)\n"
140 " (effects (font (size 1.27 1.27)))\n"
141 " )\n"
142 " (attr through_hole)\n"
143 " (pad \"1\" thru_hole circle (at 0 0) (size 3.50012 3.50012) (drill 1.19888) (layers \"*.Cu\" \"*.Mask\")\n"
144 " (net 1 \"GND\")\n"
145 " (tstamp 907d213c-9e76-496e-8ff8-f5d804b4ebf3)\n"
146 " )\n"
147 " )\n"
148 "\n"
149 " (footprint \"Capacitors_THT:CP_Radial_D5.0mm_P2.00mm\" (layer \"F.Cu\")\n"
150 " (tstamp 380485fd-bd1d-4d52-80be-e1a4da6db230)\n"
151 " (at 21.675 27.9525)\n"
152 " (descr \"CP, Radial series, Radial, pin pitch=2.00mm, , diameter=5mm, Electrolytic Capacitor\")\n"
153 " (tags \"CP Radial series Radial pin pitch 2.00mm diameter 5mm Electrolytic Capacitor\")\n"
154 " (property \"Reference\" \"C48\" (at 0.9525 -3.33375 0) (layer \"F.SilkS\") (tstamp dfc53a4c-91a2-4c4c-b399-a47b59d95339)\n"
155 " (effects (font (size 1 1.2) (thickness 0.22)))\n"
156 " )\n"
157 " (property \"Value\" \"47uF\" (at 4.775 -0.00125 90) (layer \"F.Fab\") (tstamp 2d0cb149-f436-43e7-b1eb-c65c4629a1f1)\n"
158 " (effects (font (size 1 1) (thickness 0.15)))\n"
159 " )\n"
160 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 1d00ae27-ea08-4947-a007-a9df95b34a71)\n"
161 " (effects (font (size 1.27 1.27)))\n"
162 " )\n"
163 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp fc15f046-980f-4738-8b14-d405039da18e)\n"
164 " (effects (font (size 1.27 1.27)))\n"
165 " )\n"
166 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp e6704392-962c-47bc-b177-1ab07d70310f)\n"
167 " (effects (font (size 1.27 1.27)))\n"
168 " )\n"
169 " (attr through_hole)\n"
170 " (fp_line (start -2.2 0) (end -1 0)\n"
171 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 68db5686-fc0b-47b8-9e2e-19d88b41181f))\n"
172 " (fp_line (start -1.6 -0.65) (end -1.6 0.65)\n"
173 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 65bc7811-5705-4b18-beae-ab88ae6b9449))\n"
174 " (fp_arc (start -1.30558 -1.18) (mid 1.000156 -2.59) (end 3.305722 -1.179722)\n"
175 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 3b98e4c6-9ef9-48e5-a1aa-c32e87964514))\n"
176 " (fp_arc (start 3.30558 -1.18) (mid 3.59 -0.000156) (end 3.305722 1.179722)\n"
177 " (stroke (width 0.5) (type solid)) (layer \"F.SilkS\") (tstamp 42adcf5e-59b0-492b-a4c4-95141c0a39f5))\n"
178 " (fp_arc (start 3.305722 1.179722) (mid 1.000156 2.59) (end -1.30558 1.18)\n"
179 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp e1a2da0b-cc0a-4697-99c2-b5a0a71a0bb2))\n"
180 " (fp_line (start -1.85 -2.85) (end -1.85 2.85)\n"
181 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 74efa428-d26e-4ad0-9f18-0faeac9dc1d4))\n"
182 " (fp_line (start -1.85 2.85) (end 3.85 2.85)\n"
183 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 989e58cc-09a4-48ad-b9cc-9a273bfa6446))\n"
184 " (fp_line (start 3.85 -2.85) (end -1.85 -2.85)\n"
185 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 7622f7f7-21e8-4de5-ad60-3b06ccba2287))\n"
186 " (fp_line (start 3.85 2.85) (end 3.85 -2.85)\n"
187 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp d49a971f-1061-4efe-acba-573b8dc99906))\n"
188 " (fp_line (start -2.2 0) (end -1 0)\n"
189 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp b4f62f30-a5f3-4d20-a9ad-086b777a9ac1))\n"
190 " (fp_line (start -1.6 -0.65) (end -1.6 0.65)\n"
191 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 8b6277e9-17a1-4f65-80cc-586ab7b3f75b))\n"
192 " (fp_circle (center 1 0) (end 3.5 0)\n"
193 " (stroke (width 0.1) (type solid)) (fill none) (layer \"F.Fab\") (tstamp 2bce3e04-d9c6-4eff-84a1-edabbb01864d))\n"
194 " (pad \"1\" thru_hole rect (at 0 0) (size 1.4 1.4) (drill 0.8) (layers \"*.Cu\" \"*.Mask\")\n"
195 " (net 1 \"GND\")\n"
196 " (tstamp 7920b7f9-55c4-4584-bf5c-436e8ef95e74)\n"
197 " )\n"
198 " (pad \"2\" thru_hole circle (at 2 0) (size 1.6 1.6) (drill 0.8) (layers \"*.Cu\" \"*.Mask\")\n"
199 " (net 1 \"GND\")\n"
200 " (tstamp e4c29d51-7825-48f6-aae3-5e0ea3eb6e7a)\n"
201 " )\n"
202 " (model \"${KICAD7_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n"
203 " (offset (xyz 0 0 0))\n"
204 " (scale (xyz 1 1 1))\n"
205 " (rotate (xyz 0 0 0))\n"
206 " )\n"
207 " )\n"
208 "\n"
209 " (footprint \"Wire_Pads:SolderWirePad_single_1mmDrill\" locked (layer \"F.Cu\")\n"
210 " (tstamp 473e3291-e4a8-4615-824b-1aa98b60e481)\n"
211 " (at 44.8525 24.46)\n"
212 " (property \"Reference\" \"Hidden RefDes\" (at -0.2835 7.47025 180) (layer \"F.SilkS\") hide (tstamp 02d2fb75-3428-4538-b599-cd811796b4d9)\n"
213 " (effects (font (size 1 1) (thickness 0.15)))\n"
214 " )\n"
215 " (property \"Value\" \"Hidden Value\" (at -0.2135 9.05025 0) (layer \"F.Fab\") hide (tstamp 2b366321-55c2-4e5a-8a51-2cf0a1c7c64e)\n"
216 " (effects (font (size 1 1) (thickness 0.15)))\n"
217 " )\n"
218 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp ca97624b-7df3-4ad8-a2a6-60d0a02d3efd)\n"
219 " (effects (font (size 1.27 1.27)))\n"
220 " )\n"
221 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 62bc6f1f-e188-4e61-93bb-5273bf6d230c)\n"
222 " (effects (font (size 1.27 1.27)))\n"
223 " )\n"
224 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 5f3ff16c-b3ca-4ec3-a748-1d3730f9efd6)\n"
225 " (effects (font (size 1.27 1.27)))\n"
226 " )\n"
227 " (attr through_hole)\n"
228 " (fp_text user \"LED\" (at 0.15875 3.33375 90) (layer \"F.SilkS\") (tstamp f36fd79c-0dff-4a81-b4b4-9e222e82814f)\n"
229 " (effects (font (size 1 1.1) (thickness 0.25)))\n"
230 " )\n"
231 " (pad \"1\" thru_hole circle locked (at 0 0) (size 2.49936 2.49936) (drill 1.00076) (layers \"*.Cu\" \"*.Mask\")\n"
232 " (tstamp ec712720-3eda-4621-ad13-dc832c80aef6)\n"
233 " )\n"
234 " )\n"
235 "\n"
236 " (footprint \"Wire_Pads:SolderWirePad_single_1mmDrill\" (layer \"F.Cu\")\n"
237 " (tstamp 621d7aa9-bc19-436a-9ebe-ef9cdda47103)\n"
238 " (at 44.8525 20.9675)\n"
239 " (property \"Reference\" \"\" (at 2.2225 0 90) (layer \"F.SilkS\") hide (tstamp dc982b23-a764-4ef4-924b-4c90cf7e51bc)\n"
240 " (effects (font (size 1.3 1.5) (thickness 0.25)))\n"
241 " )\n"
242 " (property \"Value\" \"Front Panel PWR\" (at 2.4575 1.72375 90) (layer \"F.Fab\") (tstamp a89dd8b8-81fc-41a9-a224-79f778e145ca)\n"
243 " (effects (font (size 1 1) (thickness 0.15)))\n"
244 " )\n"
245 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 274a983a-eb53-4c65-82c2-2d345192516a)\n"
246 " (effects (font (size 1.27 1.27)))\n"
247 " )\n"
248 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 66d93d94-d821-4b6e-8c39-af797ff3e592)\n"
249 " (effects (font (size 1.27 1.27)))\n"
250 " )\n"
251 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 3c027815-7b5d-4456-994c-abd93403f141)\n"
252 " (effects (font (size 1.27 1.27)))\n"
253 " )\n"
254 " (attr through_hole)\n"
255 " (fp_text user \"12V\" (at 0.15875 -3.33375 90) (layer \"F.SilkS\") (tstamp 2ca6df83-f367-4aad-b4c2-1c3d5fe3b65e)\n"
256 " (effects (font (size 1 1.1) (thickness 0.25)))\n"
257 " )\n"
258 " (pad \"1\" thru_hole circle (at 0 0) (size 2.49936 2.49936) (drill 1.00076) (layers \"*.Cu\" \"*.Mask\")\n"
259 " (net 1 \"GND\")\n"
260 " (tstamp 5c04f147-7717-4bbf-88a9-07e172a78a08)\n"
261 " )\n"
262 " )\n"
263 "\n"
264 " (footprint \"Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\" (layer \"F.Cu\")\n"
265 " (tstamp 90b0a5fc-e8b0-4fa0-a8bd-198c1d756a29)\n"
266 " (at 28.9775 20.9675)\n"
267 " (descr \"Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=10.16mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf\")\n"
268 " (tags \"Resistor Axial_DIN0207 series Axial Horizontal pin pitch 10.16mm 0.25W = 1/4W length 6.3mm diameter 2.5mm\")\n"
269 " (property \"Reference\" \"R74\" (at 5.08 0 0) (layer \"F.SilkS\") (tstamp 9a6b9e83-9fea-4ae3-a69d-0de871c2078e)\n"
270 " (effects (font (size 1.4 1.6) (thickness 0.3)))\n"
271 " )\n"
272 " (property \"Value\" \"10K\" (at 12.2925 3.50375 90) (layer \"F.Fab\") (tstamp d73aa2bc-2e81-4c7a-8f14-4de04daa74aa)\n"
273 " (effects (font (size 1 1) (thickness 0.15)))\n"
274 " )\n"
275 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 8964928e-5ea8-4294-9c67-2d6d21142692)\n"
276 " (effects (font (size 1.27 1.27)))\n"
277 " )\n"
278 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 11bd1bc4-f7c3-4227-93c2-84186af404bf)\n"
279 " (effects (font (size 1.27 1.27)))\n"
280 " )\n"
281 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 55bd9566-29a3-4408-88d8-16b844b1b553)\n"
282 " (effects (font (size 1.27 1.27)))\n"
283 " )\n"
284 " (attr through_hole)\n"
285 " (fp_line (start 0.98 0) (end 1.87 0)\n"
286 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 693536e9-30cc-41d2-aeb6-69447ddc61e2))\n"
287 " (fp_line (start 1.87 -1.31) (end 1.87 1.31)\n"
288 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 4acaa78a-ffdc-4fff-b0bd-79bb54e1ac47))\n"
289 " (fp_line (start 1.87 1.31) (end 8.29 1.31)\n"
290 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp ac3c2b1d-1f56-4ac7-9c5b-e93b60924ad7))\n"
291 " (fp_line (start 8.29 -1.31) (end 1.87 -1.31)\n"
292 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 7f495b78-7217-4013-908a-2ff1dd367a10))\n"
293 " (fp_line (start 8.29 1.31) (end 8.29 -1.31)\n"
294 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp fab7de09-20cf-4131-b969-27b695177867))\n"
295 " (fp_line (start 9.18 0) (end 8.29 0)\n"
296 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 26d8d0f7-c717-4cd1-aa43-446631d365b0))\n"
297 " (fp_line (start -1.05 -1.6) (end -1.05 1.6)\n"
298 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 9dd0c083-9647-4d26-aebe-fabacbe66605))\n"
299 " (fp_line (start -1.05 1.6) (end 11.25 1.6)\n"
300 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 3cb8ef09-2a19-4905-b082-c9534db84f47))\n"
301 " (fp_line (start 11.25 -1.6) (end -1.05 -1.6)\n"
302 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp f602c95b-8818-4ea9-9f7a-b87bfa28f508))\n"
303 " (fp_line (start 11.25 1.6) (end 11.25 -1.6)\n"
304 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp e01b3280-f982-4a3e-9f01-c1aaff70d915))\n"
305 " (fp_line (start 0 0) (end 1.93 0)\n"
306 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 4d964dda-4fec-485c-8618-dd88da973f8f))\n"
307 " (fp_line (start 1.93 -1.25) (end 1.93 1.25)\n"
308 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 394e6f3e-8168-4351-b602-150b25a3e918))\n"
309 " (fp_line (start 1.93 1.25) (end 8.23 1.25)\n"
310 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp cfc9a5ff-3c40-4d48-b7b6-8825e86fc710))\n"
311 " (fp_line (start 8.23 -1.25) (end 1.93 -1.25)\n"
312 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 31a6e71b-e018-445e-80bf-4390f0da9d94))\n"
313 " (fp_line (start 8.23 1.25) (end 8.23 -1.25)\n"
314 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 079bdccf-881c-4a76-bb47-fda88c1e8539))\n"
315 " (fp_line (start 10.16 0) (end 8.23 0)\n"
316 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 9985c0f0-7ff6-46bf-a22e-2fa42e34b9b1))\n"
317 " (pad \"1\" thru_hole circle (at 0 0) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
318 " (net 1 \"GND\")\n"
319 " (tstamp def83b42-5ec2-442a-8f2b-ffd7b14105ce)\n"
320 " )\n"
321 " (pad \"2\" thru_hole circle (at 10.16 0) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
322 " (tstamp 6386fdb7-f3d1-4839-9830-ab733b3e8d94)\n"
323 " )\n"
324 " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n"
325 " (offset (xyz 0 0 0))\n"
326 " (scale (xyz 0.393701 0.393701 0.393701))\n"
327 " (rotate (xyz 0 0 0))\n"
328 " )\n"
329 " )\n"
330 "\n"
331 " (footprint \"Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\" (layer \"F.Cu\")\n"
332 " (tstamp c3f66ae9-669e-4889-915f-2cccae13db42)\n"
333 " (at 28.9775 27.9525)\n"
334 " (descr \"Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=10.16mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf\")\n"
335 " (tags \"Resistor Axial_DIN0207 series Axial Horizontal pin pitch 10.16mm 0.25W = 1/4W length 6.3mm diameter 2.5mm\")\n"
336 " (property \"Reference\" \"R75\" (at 5.08 0 0) (layer \"F.SilkS\") (tstamp ef6e671a-a5ac-4bc4-8077-708c1a429470)\n"
337 " (effects (font (size 1.4 1.6) (thickness 0.3)))\n"
338 " )\n"
339 " (property \"Value\" \"4K7\" (at 12.2925 0.06875 90) (layer \"F.Fab\") (tstamp 2c71cca7-0f57-4ce3-b3f4-64c98749588d)\n"
340 " (effects (font (size 1 1) (thickness 0.15)))\n"
341 " )\n"
342 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp ee2af228-77e9-4aea-8ccc-eabd18245aee)\n"
343 " (effects (font (size 1.27 1.27)))\n"
344 " )\n"
345 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 71692634-84a4-4f4d-a683-67f68f7bd38d)\n"
346 " (effects (font (size 1.27 1.27)))\n"
347 " )\n"
348 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 44965976-d154-424e-b008-3052b4a3aede)\n"
349 " (effects (font (size 1.27 1.27)))\n"
350 " )\n"
351 " (attr through_hole)\n"
352 " (fp_line (start 0.98 0) (end 1.87 0)\n"
353 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 65f4508e-8af5-46fe-980c-f387540cb953))\n"
354 " (fp_line (start 1.87 -1.31) (end 1.87 1.31)\n"
355 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 2376397b-6e25-4057-90ca-3ebd6d1da982))\n"
356 " (fp_line (start 1.87 1.31) (end 8.29 1.31)\n"
357 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 997a5329-dd3e-4903-b5bf-b579c496c0c2))\n"
358 " (fp_line (start 8.29 -1.31) (end 1.87 -1.31)\n"
359 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 1033538b-29a3-4da7-8f54-f17c12867391))\n"
360 " (fp_line (start 8.29 1.31) (end 8.29 -1.31)\n"
361 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 79b31583-fa09-40ce-a54d-53e2344537e2))\n"
362 " (fp_line (start 9.18 0) (end 8.29 0)\n"
363 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 5796fca2-ca98-4d4b-bec4-d31bde85a650))\n"
364 " (fp_line (start -1.05 -1.6) (end -1.05 1.6)\n"
365 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp da31697f-6c09-4894-9726-82e5965b76a9))\n"
366 " (fp_line (start -1.05 1.6) (end 11.25 1.6)\n"
367 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 504e4184-74f3-4bb3-9268-148507ff437b))\n"
368 " (fp_line (start 11.25 -1.6) (end -1.05 -1.6)\n"
369 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp c014700f-6b3e-4db2-9179-a63ca83ee80a))\n"
370 " (fp_line (start 11.25 1.6) (end 11.25 -1.6)\n"
371 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp cf155cca-0e54-4902-9419-cd47ab3b7a6e))\n"
372 " (fp_line (start 0 0) (end 1.93 0)\n"
373 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 7ff54d88-df7e-42a5-9c8b-88764220ede8))\n"
374 " (fp_line (start 1.93 -1.25) (end 1.93 1.25)\n"
375 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 495ba46e-e0f2-40df-bc2e-8273aef7c524))\n"
376 " (fp_line (start 1.93 1.25) (end 8.23 1.25)\n"
377 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp dfab8391-a4f8-43c8-8cf8-6b7e6a977081))\n"
378 " (fp_line (start 8.23 -1.25) (end 1.93 -1.25)\n"
379 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 3f4a794f-b45b-42fe-8e89-c86eb999b1ac))\n"
380 " (fp_line (start 8.23 1.25) (end 8.23 -1.25)\n"
381 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 9d755f30-54b4-43f1-acea-b1a3ac435bd1))\n"
382 " (fp_line (start 10.16 0) (end 8.23 0)\n"
383 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp b999b5b2-327e-491b-9266-35b8482540c8))\n"
384 " (pad \"1\" thru_hole circle (at 0 0) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
385 " (net 1 \"GND\")\n"
386 " (tstamp 5a702112-f16c-4b59-9902-914db0fa4360)\n"
387 " )\n"
388 " (pad \"2\" thru_hole circle (at 10.16 0) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
389 " (tstamp b2b0d740-b086-433e-90f5-ffe119efdd07)\n"
390 " )\n"
391 " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n"
392 " (offset (xyz 0 0 0))\n"
393 " (scale (xyz 0.393701 0.393701 0.393701))\n"
394 " (rotate (xyz 0 0 0))\n"
395 " )\n"
396 " )\n"
397 "\n"
398 " (footprint \"Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\" (layer \"F.Cu\")\n"
399 " (tstamp e072334e-f411-41c9-ade0-5444e440897b)\n"
400 " (at 39.1375 24.46 180)\n"
401 " (descr \"Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=10.16mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf\")\n"
402 " (tags \"Resistor Axial_DIN0207 series Axial Horizontal pin pitch 10.16mm 0.25W = 1/4W length 6.3mm diameter 2.5mm\")\n"
403 " (property \"Reference\" \"R73\" (at 5.08 0 180) (layer \"F.SilkS\") (tstamp 014cf222-f3a5-4b8e-8488-4309307a6bdc)\n"
404 " (effects (font (size 1.3 1.5) (thickness 0.25)))\n"
405 " )\n"
406 " (property \"Value\" \"10K\" (at -2.0825 3.53875 -90) (layer \"F.Fab\") (tstamp 2deddb35-a3f9-4993-a1ed-8c3208648d4e)\n"
407 " (effects (font (size 1 1) (thickness 0.15)))\n"
408 " )\n"
409 " (property \"Footprint\" \"\" (at 0 0 180 unlocked) (layer \"F.Fab\") hide (tstamp 5deb9256-369a-47c4-9483-b523df7a348d)\n"
410 " (effects (font (size 1.27 1.27)))\n"
411 " )\n"
412 " (property \"Datasheet\" \"\" (at 0 0 180 unlocked) (layer \"F.Fab\") hide (tstamp 1549b932-fa71-4a3d-b905-325ff0cc5e7b)\n"
413 " (effects (font (size 1.27 1.27)))\n"
414 " )\n"
415 " (property \"Description\" \"\" (at 0 0 180 unlocked) (layer \"F.Fab\") hide (tstamp 7e3b28e4-b9cb-43a6-a317-f239e8ff0ca9)\n"
416 " (effects (font (size 1.27 1.27)))\n"
417 " )\n"
418 " (attr through_hole)\n"
419 " (fp_line (start 9.18 0) (end 8.29 0)\n"
420 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 7007fd01-2893-48e3-8840-341e7cb4ec8d))\n"
421 " (fp_line (start 8.29 1.31) (end 8.29 -1.31)\n"
422 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 5085ec5b-cfed-4f7c-bc9b-f7148c4b7222))\n"
423 " (fp_line (start 8.29 -1.31) (end 1.87 -1.31)\n"
424 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 7a872980-3288-4161-8107-5d277e19ca53))\n"
425 " (fp_line (start 1.87 1.31) (end 8.29 1.31)\n"
426 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 485d8c5a-a3d7-4c96-a3f3-f4b630b27e17))\n"
427 " (fp_line (start 1.87 -1.31) (end 1.87 1.31)\n"
428 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 0de0f2c4-5641-4214-9afa-5e4cbfe4ee44))\n"
429 " (fp_line (start 0.98 0) (end 1.87 0)\n"
430 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp a7b6dccc-6e78-4d89-adc7-7c6cfb560515))\n"
431 " (fp_line (start 11.25 1.6) (end 11.25 -1.6)\n"
432 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 87f28b49-9648-446b-85a9-34010f350294))\n"
433 " (fp_line (start 11.25 -1.6) (end -1.05 -1.6)\n"
434 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 2db3a7de-4ff9-4f7c-8023-a96c3233363e))\n"
435 " (fp_line (start -1.05 1.6) (end 11.25 1.6)\n"
436 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 8b0e0021-dee0-4fba-85b0-dc1550b5b15c))\n"
437 " (fp_line (start -1.05 -1.6) (end -1.05 1.6)\n"
438 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 9324d473-26e5-4c7d-95c0-367ba971acd7))\n"
439 " (fp_line (start 10.16 0) (end 8.23 0)\n"
440 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 7529bced-6b8a-483c-9aee-d7c487d3a292))\n"
441 " (fp_line (start 8.23 1.25) (end 8.23 -1.25)\n"
442 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 65eee186-e6fe-44b5-a7e4-202672bff890))\n"
443 " (fp_line (start 8.23 -1.25) (end 1.93 -1.25)\n"
444 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp c0322b20-ac45-4f20-bbab-44368f60ac5d))\n"
445 " (fp_line (start 1.93 1.25) (end 8.23 1.25)\n"
446 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 1af02505-0a10-49cf-8a95-d3c06be3152d))\n"
447 " (fp_line (start 1.93 -1.25) (end 1.93 1.25)\n"
448 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 73b1c134-2d49-42d8-b1ba-e81b8df404ba))\n"
449 " (fp_line (start 0 0) (end 1.93 0)\n"
450 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 001328a4-472c-4707-a7bf-46a7a15f91f6))\n"
451 " (pad \"1\" thru_hole circle (at 0 0 180) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
452 " (tstamp 945fccb0-61fe-41e2-8f09-c8a33f294a3e)\n"
453 " )\n"
454 " (pad \"2\" thru_hole circle (at 10.16 0 180) (size 1.8 1.8) (drill 0.85) (layers \"*.Cu\" \"*.Mask\")\n"
455 " (tstamp d8e786d3-14bf-403c-80db-810abc9eda53)\n"
456 " )\n"
457 " (model \"${KICAD7_3DMODEL_DIR}/Resistors_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl\"\n"
458 " (offset (xyz 0 0 0))\n"
459 " (scale (xyz 0.393701 0.393701 0.393701))\n"
460 " (rotate (xyz 0 0 0))\n"
461 " )\n"
462 " )\n"
463 "\n"
464 " (footprint \"Capacitors_THT:CP_Radial_D5.0mm_P2.00mm\" (layer \"F.Cu\")\n"
465 " (tstamp fa4fd0e8-6269-4cb7-a049-03c4e343895c)\n"
466 " (at 21.675 20.9675)\n"
467 " (descr \"CP, Radial series, Radial, pin pitch=2.00mm, , diameter=5mm, Electrolytic Capacitor\")\n"
468 " (tags \"CP Radial series Radial pin pitch 2.00mm diameter 5mm Electrolytic Capacitor\")\n"
469 " (property \"Reference\" \"C47\" (at 0.9525 -3.33375 0) (layer \"F.SilkS\") (tstamp f13eb790-c841-466d-a0c1-07116ebc1073)\n"
470 " (effects (font (size 1 1.2) (thickness 0.22)))\n"
471 " )\n"
472 " (property \"Value\" \"47uF\" (at 4.775 -0.01625 90) (layer \"F.Fab\") (tstamp 027137f5-363d-41b8-8495-34c7a18a7117)\n"
473 " (effects (font (size 1 1) (thickness 0.15)))\n"
474 " )\n"
475 " (property \"Footprint\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 63aab932-9fb6-4e00-9306-6580e57bedf0)\n"
476 " (effects (font (size 1.27 1.27)))\n"
477 " )\n"
478 " (property \"Datasheet\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 0b3af576-09fa-4f29-a8d1-210aff851036)\n"
479 " (effects (font (size 1.27 1.27)))\n"
480 " )\n"
481 " (property \"Description\" \"\" (at 0 0 0 unlocked) (layer \"F.Fab\") hide (tstamp 054366ad-a326-49c2-a4f4-117002916f89)\n"
482 " (effects (font (size 1.27 1.27)))\n"
483 " )\n"
484 " (attr through_hole)\n"
485 " (fp_line (start -2.2 0) (end -1 0)\n"
486 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp d0ff0d50-cd0b-459a-8f2d-e84c2cb66ac5))\n"
487 " (fp_line (start -1.6 -0.65) (end -1.6 0.65)\n"
488 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 87ac9cb8-d215-4372-8cd3-4abaacc0bf33))\n"
489 " (fp_arc (start -1.30558 -1.18) (mid 1.000156 -2.59) (end 3.305722 -1.179722)\n"
490 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp 6fdf8300-e925-4956-a69a-91818d6e51c8))\n"
491 " (fp_arc (start 3.30558 -1.18) (mid 3.59 -0.000156) (end 3.305722 1.179722)\n"
492 " (stroke (width 0.5) (type solid)) (layer \"F.SilkS\") (tstamp 4404d1b4-9af5-4b29-a1e9-a89d90f6d256))\n"
493 " (fp_arc (start 3.305722 1.179722) (mid 1.000156 2.59) (end -1.30558 1.18)\n"
494 " (stroke (width 0.12) (type solid)) (layer \"F.SilkS\") (tstamp ad60c624-9f4d-4a30-a5f4-59f698eff831))\n"
495 " (fp_line (start -1.85 -2.85) (end -1.85 2.85)\n"
496 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 5ed611e7-0ad0-4da5-adb6-fcbf8512cd95))\n"
497 " (fp_line (start -1.85 2.85) (end 3.85 2.85)\n"
498 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 98571876-9364-410c-ac47-f290b1e46d98))\n"
499 " (fp_line (start 3.85 -2.85) (end -1.85 -2.85)\n"
500 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp 6b007cca-ff72-43ca-ba72-b26458c5a115))\n"
501 " (fp_line (start 3.85 2.85) (end 3.85 -2.85)\n"
502 " (stroke (width 0.05) (type solid)) (layer \"F.CrtYd\") (tstamp ba016114-5eb4-430b-ab2e-dbefa70d896a))\n"
503 " (fp_line (start -2.2 0) (end -1 0)\n"
504 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 68c156d0-784a-4c9c-b97c-a32d6c3aa3b9))\n"
505 " (fp_line (start -1.6 -0.65) (end -1.6 0.65)\n"
506 " (stroke (width 0.1) (type solid)) (layer \"F.Fab\") (tstamp 900d1364-baa6-4fae-a49a-97678ffcc675))\n"
507 " (fp_circle (center 1 0) (end 3.5 0)\n"
508 " (stroke (width 0.1) (type solid)) (fill none) (layer \"F.Fab\") (tstamp e572501a-055a-4591-8f6b-f3bf2e7ee86b))\n"
509 " (pad \"1\" thru_hole rect (at 0 0) (size 1.4 1.4) (drill 0.8) (layers \"*.Cu\" \"*.Mask\")\n"
510 " (net 1 \"GND\")\n"
511 " (tstamp 7ef87fdc-802f-4acb-9867-18732d4a7e7a)\n"
512 " )\n"
513 " (pad \"2\" thru_hole circle (at 2 0) (size 1.6 1.6) (drill 0.8) (layers \"*.Cu\" \"*.Mask\")\n"
514 " (net 1 \"GND\")\n"
515 " (tstamp 1ad1f5f9-68f6-4131-9e09-bd1d361fc282)\n"
516 " )\n"
517 " (model \"${KICAD7_3DMODEL_DIR}/Capacitors_THT.3dshapes/CP_Radial_D5.0mm_P2.00mm.wrl\"\n"
518 " (offset (xyz 0 0 0))\n"
519 " (scale (xyz 1 1 1))\n"
520 " (rotate (xyz 0 0 0))\n"
521 " )\n"
522 " )\n"
523 "\n"
524 " (gr_rect (start 15.65 13.74) (end 52.5 38.8)\n"
525 " (stroke (width 0.05) (type solid)) (fill none) (layer \"Edge.Cuts\") (tstamp a879b274-bf89-4c34-8db0-6e2a7291f014))\n"
526 " (dimension (type aligned) (layer \"Margin\") (tstamp 6db437a2-8229-43a5-8bd8-1a58ddb201b9)\n"
527 " (pts (xy 44.88 24.5) (xy 44.88 20.9))\n"
528 " (height 9.59)\n"
529 " (gr_text \"0.1417 in\" (at 53.581 22.7 90) (layer \"Margin\") (tstamp 6db437a2-8229-43a5-8bd8-1a58ddb201b9)\n"
530 " (effects (font (size 0.762 0.762) (thickness 0.127)))\n"
531 " )\n"
532 " (format (prefix \"\") (suffix \"\") (units 0) (units_format 1) (precision 4))\n"
533 " (style (thickness 0.0508) (arrow_length 1.27) (text_position_mode 0) (extension_height 0.58642) (extension_offset 0) keep_text_aligned)\n"
534 " )\n"
535 "\n"
536 " (segment (start 44.8525 24.46) (end 39.1375 24.46) (width 0.381) (layer \"F.Cu\") (net 0) (tstamp 7ca12133-777b-47ba-bbd3-cb8a544b2671))\n"
537 " (segment (start 33.105 32.74025) (end 33.105 27.9525) (width 0.381) (layer \"F.Cu\") (net 1) (tstamp 069bdf66-094e-4225-a62a-5e9ac38209e5))\n"
538 " (segment (start 33.105 27.9525) (end 28.9775 27.9525) (width 0.381) (layer \"F.Cu\") (net 1) (tstamp 6fd4daae-acd4-44ce-bc05-d098c9a39286))\n"
539 " (segment (start 34.0575 32.74025) (end 34.0575 20.9675) (width 0.381) (layer \"F.Cu\") (net 1) (tstamp 730eecf7-4831-459b-b926-557f809e0c1c))\n"
540 " (segment (start 35.01 19.22125) (end 35.01 32.74025) (width 0.381) (layer \"F.Cu\") (net 1) (tstamp c69ca14f-e0e6-485f-a878-4f0a683c3915))\n"
541 " (segment (start 34.0575 20.9675) (end 28.9775 20.9675) (width 0.381) (layer \"F.Cu\") (net 1) (tstamp e5e766f6-987a-4192-9c34-760f17795c27))\n"
542 " (via (at 35.01 19.22125) (size 0.75) (drill 0.35) (layers \"F.Cu\" \"B.Cu\") (net 1) (tstamp a3ff2347-4667-4dde-8969-ef5af9da726e))\n"
543 " (segment (start 35.01 19.22125) (end 44.8525 19.22125) (width 0.762) (layer \"B.Cu\") (net 1) (tstamp 236da8c8-0850-4652-aecc-efa2304d6271))\n"
544 " (segment (start 44.8525 19.22125) (end 44.8525 20.9675) (width 0.762) (layer \"B.Cu\") (net 1) (tstamp 351a1a87-af11-41b0-80e3-ad556442a4d5))\n"
545 " (segment (start 21.68 27.9475) (end 21.675 27.9525) (width 0.762) (layer \"B.Cu\") (net 1) (tstamp 353c08b1-5615-4291-a96c-91924dfe8626))\n"
546 " (segment (start 35.01 19.22125) (end 21.68 19.22125) (width 0.762) (layer \"B.Cu\") (net 1) (tstamp 41941280-cdfb-4779-bd2b-633d67a413a7))\n"
547 " (segment (start 21.68 19.22125) (end 21.68 27.9475) (width 0.762) (layer \"B.Cu\") (net 1) (tstamp 5b37df1f-f5c1-4c27-b720-6f0e5bc0eb66))\n"
548 " (segment (start 28.9775 20.9675) (end 23.675 20.9675) (width 0.381) (layer \"B.Cu\") (net 1) (tstamp e365420e-bf4e-4c36-a39f-b4aac3c33817))\n"
549 " (segment (start 28.9775 27.9525) (end 23.675 27.9525) (width 0.381) (layer \"B.Cu\") (net 1) (tstamp fa7580a1-979a-4da5-a6ea-fde491f0a6aa))\n"
550 "\n"
551 " (zone (net 1) (net_name \"GND\") (layer \"F.Cu\") (tstamp b32d7e64-2aaa-46f7-a99f-f3198188b35a) (hatch edge 0.508)\n"
552 " (connect_pads (clearance 0.508))\n"
553 " (min_thickness 0.254) (filled_areas_thickness no)\n"
554 " (fill yes (thermal_gap 0.508) (thermal_bridge_width 0.508))\n"
555 " (polygon\n"
556 " (pts\n"
557 " (xy 37.06 36.6)\n"
558 " (xy 19.8 36.7)\n"
559 " (xy 19.8 31.4)\n"
560 " (xy 37.06 31.4)\n"
561 " )\n"
562 " )\n"
563 " (filled_polygon\n"
564 " (layer \"F.Cu\")\n"
565 " (pts\n"
566 " (xy 36.982601 31.408667)\n"
567 " (xy 37.023803 31.436197)\n"
568 " (xy 37.051333 31.477399)\n"
569 " (xy 37.061 31.526)\n"
570 " (xy 37.061 36.474728)\n"
571 " (xy 37.051333 36.523329)\n"
572 " (xy 37.023803 36.564531)\n"
573 " (xy 36.982601 36.592061)\n"
574 " (xy 36.934736 36.601726)\n"
575 " (xy 19.926736 36.700266)\n"
576 " (xy 19.87808 36.69088)\n"
577 " (xy 19.836719 36.663589)\n"
578 " (xy 19.808951 36.622548)\n"
579 " (xy 19.799002 36.574004)\n"
580 " (xy 19.799 36.573268)\n"
581 " (xy 19.799 35.85909)\n"
582 " (xy 21.291534 35.85909)\n"
583 " (xy 21.301092 35.867696)\n"
584 " (xy 21.54849 36.037092)\n"
585 " (xy 21.816124 36.172285)\n"
586 " (xy 22.099282 36.27089)\n"
587 " (xy 22.392989 36.331179)\n"
588 " (xy 22.692107 36.352097)\n"
589 " (xy 22.991346 36.33327)\n"
590 " (xy 23.285483 36.275029)\n"
591 " (xy 23.569315 36.178405)\n"
592 " (xy 23.837882 36.045087)\n"
593 " (xy 24.086467 35.877414)\n"
594 " (xy 24.107826 35.858451)\n"
595 " (xy 22.7 34.450625)\n"
596 " (xy 21.291534 35.85909)\n"
597 " (xy 19.799 35.85909)\n"
598 " (xy 19.799 34.034731)\n"
599 " (xy 20.438564 34.034731)\n"
600 " (xy 20.451121 34.334312)\n"
601 " (xy 20.503187 34.629592)\n"
602 " (xy 20.593847 34.91539)\n"
603 " (xy 20.721516 35.186698)\n"
604 " (xy 20.883939 35.438728)\n"
605 " (xy 20.932999 35.496375)\n"
606 " (xy 22.339374 34.09)\n"
607 " (xy 22.339373 34.089999)\n"
608 " (xy 23.060625 34.089999)\n"
609 " (xy 24.467405 35.49678)\n"
610 " (xy 24.506601 35.451371)\n"
611 " (xy 24.67078 35.200481)\n"
612 " (xy 24.800337 34.930074)\n"
613 " (xy 24.892992 34.644914)\n"
614 " (xy 24.947116 34.35002)\n"
615 " (xy 24.957135 33.940065)\n"
616 " (xy 24.917481 33.642876)\n"
617 " (xy 24.838866 33.353527)\n"
618 " (xy 24.722672 33.077112)\n"
619 " (xy 24.570949 32.818507)\n"
620 " (xy 24.466196 32.684428)\n"
621 " (xy 23.060625 34.089999)\n"
622 " (xy 22.339373 34.089999)\n"
623 " (xy 20.931778 32.682403)\n"
624 " (xy 20.77745 32.897964)\n"
625 " (xy 20.636682 33.162708)\n"
626 " (xy 20.532168 33.443739)\n"
627 " (xy 20.465738 33.736132)\n"
628 " (xy 20.438564 34.034731)\n"
629 " (xy 19.799 34.034731)\n"
630 " (xy 19.799 32.323753)\n"
631 " (xy 21.294378 32.323753)\n"
632 " (xy 22.699999 33.729374)\n"
633 " (xy 24.106226 32.323147)\n"
634 " (xy 23.932032 32.192833)\n"
635 " (xy 23.670303 32.046557)\n"
636 " (xy 23.391518 31.936179)\n"
637 " (xy 23.100581 31.86364)\n"
638 " (xy 22.802613 31.830217)\n"
639 " (xy 22.502848 31.836496)\n"
640 " (xy 22.206534 31.882368)\n"
641 " (xy 21.918888 31.967027)\n"
642 " (xy 21.644986 32.088976)\n"
643 " (xy 21.389596 32.246094)\n"
644 " (xy 21.294378 32.323753)\n"
645 " (xy 19.799 32.323753)\n"
646 " (xy 19.799 31.526)\n"
647 " (xy 19.808667 31.477399)\n"
648 " (xy 19.836197 31.436197)\n"
649 " (xy 19.877399 31.408667)\n"
650 " (xy 19.926 31.399)\n"
651 " (xy 36.934 31.399)\n"
652 " )\n"
653 " )\n"
654 " )\n"
655 ")\n";
656
657std::set<int> g_excludedLayers =
658 {
670 GAL_LAYER_ID_START + 6, // where LAYER_MOD_TEXT_BK (deprecated) used to be
671 GAL_LAYER_ID_START + 7, // where LAYER_HIDDEN_TEXT (deprecated) used to be
672 GAL_LAYER_ID_START + 9, // where LAYER_PADS_SMD_FR (deprecated) used to be
673 GAL_LAYER_ID_START + 10, // where LAYER_PADS_SMD_BK (deprecated) used to be
674 GAL_LAYER_ID_START + 14, // where LAYER_NO_CONNECTS (deprecated) used to be
675 GAL_LAYER_ID_START + 20, // where LAYER_PADS_TH (deprecated) used to be
681 };
682
683
685 PANEL_COLOR_SETTINGS( aParent ),
687 m_preview( nullptr ),
688 m_page( nullptr ),
689 m_titleBlock( nullptr ),
690 m_board( aBoard )
691{
692 m_colorNamespace = "board";
693
695 PCBNEW_SETTINGS* app_settings = mgr.GetAppSettings<PCBNEW_SETTINGS>();
696 COLOR_SETTINGS* current = mgr.GetColorSettings( app_settings->m_ColorTheme );
697
698 // Saved theme doesn't exist? Reset to default
699 if( current->GetFilename() != app_settings->m_ColorTheme )
700 app_settings->m_ColorTheme = current->GetFilename();
701
702 createThemeList( app_settings->m_ColorTheme );
703
704 // Currently this only applies to eeschema
705 m_optOverrideColors->Hide();
706
707 m_currentSettings = new COLOR_SETTINGS( *current );
708
709 for( int id = GAL_LAYER_ID_START; id < GAL_LAYER_ID_BITMASK_END; id++ )
710 {
711 if( g_excludedLayers.count( id ) )
712 continue;
713
714 m_validLayers.push_back( id );
715 }
716
717 // These layers are not in GAL_LAYER_ID_START ... GAL_LAYER_ID_BITMASK_END
720 m_validLayers.push_back( LAYER_PAGE_LIMITS );
721 m_validLayers.push_back( LAYER_DRC_WARNING );
725
726 // NOTE: Main board layers are added by createSwatches()
727
729}
730
731
733{
734 delete m_page;
735 delete m_titleBlock;
736 delete m_currentSettings;
737}
738
739
741{
743 PCBNEW_SETTINGS* app_settings = mgr.GetAppSettings<PCBNEW_SETTINGS>();
744 app_settings->m_ColorTheme = m_currentSettings->GetFilename();
745
746 return true;
747}
748
749
751{
753 return true;
754}
755
756
758{
759 std::sort( m_validLayers.begin(), m_validLayers.end(),
760 []( int a, int b )
761 {
762 return LayerName( a ) < LayerName( b );
763 } );
764
765 // Don't sort aBoard layers by name
766 size_t i = 0;
767
769 m_validLayers.insert( m_validLayers.begin() + i++, layer );
770
771 for( PCB_LAYER_ID layer : LSET::AllNonCuMask().TechAndUserUIOrder() )
772 m_validLayers.insert( m_validLayers.begin() + i++, layer );
773
774 for( int layer : m_validLayers )
775 {
776 wxString name = LayerName( layer );
777
778 if( m_board && layer >= PCBNEW_LAYER_ID_START && layer < PCB_LAYER_ID_COUNT )
779 name = m_board->GetLayerName( static_cast<PCB_LAYER_ID>( layer ) );
780
781 createSwatch( layer, name );
782 }
783
785 m_preview->GetGAL()->SetAxesEnabled( false );
786
787 m_previewPanelSizer->Add( m_preview, 1, wxEXPAND, 5 );
788
790 Layout();
793}
794
795
797{
799}
800
801
803{
806 m_titleBlock->SetTitle( _( "Color Preview" ) );
807 m_titleBlock->SetDate( wxDateTime::Now().FormatDate() );
808
809 m_page->SetHeightMils( 5000 );
810 m_page->SetWidthMils( 6000 );
811
812 STRING_LINE_READER reader( g_previewBoard, wxT( "preview" ) );
814
815 try
816 {
817 pi.DoLoad( reader, m_preview->GetBoard(), nullptr, nullptr, 0 );
818 }
819 catch( const IO_ERROR& )
820 {
821 return;
822 }
823
826
827 DS_PROXY_VIEW_ITEM* drawingSheet = new DS_PROXY_VIEW_ITEM( pcbIUScale, m_page, nullptr,
828 m_titleBlock, nullptr );
829 drawingSheet->SetIsFirstPage( true );
830 drawingSheet->SetColorLayer( LAYER_DRAWINGSHEET );
832 m_preview->SetDrawingSheet( drawingSheet );
833
835}
836
837
839{
841}
842
843
845{
848}
849
850
852{
853 if( !m_preview )
854 return;
855
856 KIGFX::VIEW* view = m_preview->GetView();
857 auto settings = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( view->GetPainter()->GetSettings() );
858 settings->LoadColors( m_currentSettings );
859
860 m_preview->GetGAL()->SetClearColor( settings->GetBackgroundColor() );
861
863 auto rect = m_preview->GetScreenRect();
864 m_preview->Refresh( true, &rect );
865}
866
867
869{
870 if( m_preview )
871 {
872 KIGFX::VIEW* view = m_preview->GetView();
874 BOX2I defaultBox = m_preview->GetDefaultViewBBox();
875
876 view->SetScale( 1.0 );
877 VECTOR2D screenSize = view->ToWorld( ToVECTOR2D( m_preview->GetClientSize() ), false );
878
879 if( bBox.GetWidth() == 0 || bBox.GetHeight() == 0 )
880 bBox = defaultBox;
881
882 VECTOR2D vsize = bBox.GetSize();
883 double scale = view->GetScale() / std::max( fabs( vsize.x / screenSize.x ),
884 fabs( vsize.y / screenSize.y ) );
885
886 view->SetScale( scale / 1.1 );
887 view->SetCenter( bBox.Centre() );
889 }
890}
891
892
893void PANEL_PCBNEW_COLOR_SETTINGS::OnSize( wxSizeEvent& aEvent )
894{
896 aEvent.Skip();
897}
898
899
const char * name
Definition: DXF_plotter.cpp:57
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:108
wxString m_ColorTheme
Active color theme name.
Definition: app_settings.h:189
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: board.h:915
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:579
constexpr size_type GetWidth() const
Definition: box2.h:214
constexpr Vec Centre() const
Definition: box2.h:97
constexpr size_type GetHeight() const
Definition: box2.h:215
constexpr const SizeVec & GetSize() const
Definition: box2.h:206
Color settings are a bit different than most of the settings objects in that there can be more than o...
void SetPageBorderColorLayer(int aLayerId)
Overrides the layer used to pick the color of the page border (normally LAYER_GRID)
void SetIsFirstPage(bool aIsFirstPage)
Change if this is first page.
void SetColorLayer(int aLayerId)
Can be used to override which layer ID is used for drawing sheet item colors.
void ForceRefresh()
Force a redraw.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
static FOOTPRINT_PREVIEW_PANEL * New(KIWAY *aKiway, wxWindow *aParent, UNITS_PROVIDER *aUnitsProvider)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:77
wxString GetFilename() const
Definition: json_settings.h:80
void SetAxesEnabled(bool aAxesEnabled)
Enable drawing the axes.
void SetClearColor(const COLOR4D &aColor)
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
PCB specific render settings.
Definition: pcb_painter.h:78
void LoadColors(const COLOR_SETTINGS *aSettings) override
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:68
double GetScale() const
Definition: view.h:277
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
Definition: view.cpp:587
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
Definition: view.cpp:484
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
Definition: view.cpp:1563
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:221
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
Definition: view.cpp:613
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Definition: lset.cpp:687
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:59
static const wxChar Custom[]
"User" defined page type
Definition: page_info.h:82
void SetHeightMils(double aHeightInMils)
Definition: page_info.cpp:261
void SetWidthMils(double aWidthInMils)
Definition: page_info.cpp:247
void createThemeList(const wxString &aCurrent)
Builds the theme listbox and sets the selection to the current theme.
void createSwatch(int aLayer, const wxString &aName)
std::vector< int > m_validLayers
A list of layer IDs that are valid for the current color settings dialog.
std::string m_colorNamespace
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings.
virtual void ResetPanel() override
Reset the contents of this panel.
COLOR_SETTINGS * m_currentSettings
void OnSize(wxSizeEvent &aEvent) override
void onColorChanged() override
Event fired when the user changes any color.
void onNewThemeSelected() override
Event fired when a new theme is selected that can be overridden in children.
FOOTPRINT_PREVIEW_PANEL * m_preview
PANEL_PCBNEW_COLOR_SETTINGS(wxWindow *aParent, BOARD *aBoard)
void ResetPanel() override
Reset the contents of this panel.
void UpdateColors()
Update the color settings in the painter and GAL.
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Sets (or updates) drawing-sheet used by the draw panel.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void DisplayBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Add all items from the current board to the VIEW, so they can be displayed by GAL.
A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
BOARD * DoLoad(LINE_READER &aReader, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties, PROGRESS_REPORTER *aProgressReporter, unsigned aLineCount)
virtual SETTINGS_MANAGER & GetSettingsManager() const
Definition: pgm_base.h:142
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
Definition: richio.h:253
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:41
void SetTitle(const wxString &aTitle)
Definition: title_block.h:58
void SetDate(const wxString &aDate)
Set the date field, and defaults to the current time and date.
Definition: title_block.h:71
#define _(s)
EDA_UNITS
Definition: eda_units.h:46
wxString LayerName(int aLayer)
Returns the default display name for a given layer.
Definition: layer_id.cpp:31
@ LAYER_PAD_NETNAMES
Definition: layer_ids.h:167
@ NETNAMES_LAYER_ID_START
Definition: layer_ids.h:157
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
Definition: layer_ids.h:138
#define MAX_CU_LAYERS
Definition: layer_ids.h:140
@ GAL_LAYER_ID_START
Definition: layer_ids.h:192
@ LAYER_PAGE_LIMITS
color for drawing the page extents (visibility stored in PCBNEW_SETTINGS::m_ShowPageLimits)
Definition: layer_ids.h:253
@ LAYER_LOCKED_ITEM_SHADOW
shadow layer for locked items
Definition: layer_ids.h:240
@ LAYER_VIA_HOLEWALLS
Definition: layer_ids.h:235
@ LAYER_CONFLICTS_SHADOW
shadow layer for items flagged conficting
Definition: layer_ids.h:242
@ LAYER_FOOTPRINTS_FR
show footprints on front
Definition: layer_ids.h:209
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
Definition: layer_ids.h:218
@ LAYER_DRAW_BITMAPS
to handle and draw images bitmaps
Definition: layer_ids.h:224
@ LAYER_FP_REFERENCES
show footprints references (when texts are visible)
Definition: layer_ids.h:212
@ LAYER_DRC_EXCLUSION
layer for drc markers which have been individually excluded
Definition: layer_ids.h:237
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition: layer_ids.h:221
@ LAYER_DRC_WARNING
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:236
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
Definition: layer_ids.h:215
@ LAYER_GP_OVERLAY
general purpose overlay
Definition: layer_ids.h:219
@ GAL_LAYER_ID_BITMASK_END
This is the end of the layers used for visibility bit masks in legacy board files.
Definition: layer_ids.h:227
@ LAYER_TRACKS
Definition: layer_ids.h:213
@ LAYER_FP_TEXT
Definition: layer_ids.h:199
@ LAYER_FOOTPRINTS_BK
show footprints on back
Definition: layer_ids.h:210
@ LAYER_MARKER_SHADOWS
shadows for drc markers
Definition: layer_ids.h:238
@ LAYER_FP_VALUES
show footprints values (when texts are visible)
Definition: layer_ids.h:211
@ LAYER_VIA_MICROVIA
to draw micro vias
Definition: layer_ids.h:195
@ LAYER_VIA_THROUGH
to draw usual through hole vias
Definition: layer_ids.h:197
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:194
@ LAYER_VIA_BBLIND
to draw blind/buried vias
Definition: layer_ids.h:196
@ LAYER_PAD_HOLEWALLS
Definition: layer_ids.h:234
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ B_Cu
Definition: layer_ids.h:65
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:135
@ F_Cu
Definition: layer_ids.h:64
@ COLOR
Color has changed.
Definition: view_item.h:53
std::set< int > g_excludedLayers
std::string g_previewBoard
std::set< int > g_excludedLayers
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: pgm_base.cpp:1060
see class PGM_BASE
const int scale
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)
Definition: vector2wx.h:40