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