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