KiCad PCB EDA Suite
Loading...
Searching...
No Matches
import_fabmaster.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 * Author: Seth Hillbrand <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25
26#ifndef PCBNEW_IMPORTERS_IMPORT_FABMASTER_H_
27#define PCBNEW_IMPORTERS_IMPORT_FABMASTER_H_
28
29#include <eda_text.h>
30#include <geometry/shape_arc.h>
31#include <padstack.h>
32
33#include <deque>
34#include <functional>
35#include <iostream>
36#include <map>
37#include <memory>
38#include <set>
39#include <unordered_map>
40#include <string>
41#include <vector>
42
43#include <wx/filename.h>
44
45enum PCB_LAYER_ID : int;
46class BOARD;
47class BOARD_ITEM;
48class PCB_TEXT;
50
52{
53public:
54
55 using single_row = std::vector<std::string>;
57 has_pads( false ),
58 has_comps( false ),
59 has_graphic( false ),
60 has_nets( false ),
61 has_pins( false ),
62 m_progressReporter( nullptr ),
63 m_doneCount( 0 ),
65 m_totalCount( 0 )
66
67 {}
68
69 bool Read( const std::string& aFile );
70
71 bool Process();
72
73 bool LoadBoard( BOARD* aBoard, PROGRESS_REPORTER* aProgressReporter );
74
75private:
76
77 wxFileName m_filename;
78
94
95 std::deque<single_row> rows;
96
102
103
104 struct FM_PAD
105 {
106 std::string name;
107 bool fixed;
108 bool via;
110 std::string custom_name;
111 bool top;
112 bool bottom;
113 bool paste;
114 bool mask;
115 bool drill;
116 bool plated;
120 int width;
129 std::set<std::string> copper_layers;
130
131 struct HASH
132 {
133 std::size_t operator()( const FM_PAD& aPad ) const
134 {
135 return std::hash<std::string>{}( aPad.name );
136 }
137 };
138 };
139
140 std::unordered_map<std::string, FM_PAD> pads;
141
149
158
159 // A!NET_NAME!REFDES!PIN_NUMBER!PIN_NAME!PIN_GROUND!PIN_POWER!
160 struct NETNAME
161 {
162 std::string name;
163 std::string refdes;
164 std::string pin_num;
165 std::string pin_name;
166 bool pin_gnd;
167 bool pin_pwr;
168
169 struct LESS
170 {
171 bool operator()(const NETNAME& lhs, const NETNAME& rhs) const
172 {
173 if( lhs.refdes == rhs.refdes )
174 return lhs.pin_num < rhs.pin_num;
175
176 return lhs.refdes < rhs.refdes;
177 }
178 };
179 };
180
181 std::map<std::pair<std::string, std::string>, NETNAME> pin_nets;
182 std::set<std::string> netnames;
183
184 struct CLASS
185 {
186 std::string name;
187 std::string subclass;
188 };
189
190
202
212
214 {
215 virtual ~GRAPHIC_ITEM() = default;
216
219 int width;
220 std::string layer;
221 std::string symbol;
222 std::string refdes;
223 int seq;
224 int subseq;
227
228
229 struct SEQ_CMP
230 {
231 bool operator()(const std::unique_ptr<GRAPHIC_ITEM>& lhs,
232 const std::unique_ptr<GRAPHIC_ITEM>& rhs) const
233 {
234 if( lhs->refdes != rhs->refdes )
235 return lhs->refdes < rhs->refdes;
236
237 if( lhs->layer != rhs->layer )
238 return lhs->layer < rhs->layer;
239
240 return lhs->seq < rhs->seq;
241 }
242 };
243 };
244
246 {
247 int end_x;
248 int end_y;
250 };
251
252 struct GRAPHIC_ARC : public GRAPHIC_ITEM
253 {
254 int end_x;
255 int end_y;
258 int radius;
261
263 };
264
266 {
267 int end_x;
268 int end_y;
269 bool fill;
270 };
271
273 {
274 bool oblong_x;
275 int size_x;
276 int size_y;
277 // width is GRAPHIC_DATA5 (or is it fill?)
278 };
279
281 {
282 bool oblong_x;
283 int size_x;
284 int size_y;
285 // width is GRAPHIC_DATA5
286 };
287
288 // Handles hexagons, triangles, octagons
290 {
291 std::vector<VECTOR2I> m_pts;
292 };
293
295 {
296 double rotation;
297 bool mirror;
299 // GRAPHIC_DATA_6 is
300 // SIZE FONT HEIGHT WIDTH ITAL LINESPACE THICKNESS
301 int height;
303 bool ital;
304
305 std::string text;
306 };
307
308 using graphic_element = std::set<std::unique_ptr<GRAPHIC_ITEM>, GRAPHIC_ITEM::SEQ_CMP>;
309
313 {
314 int id;
315 std::string name;
316 bool positive;
317 std::string use;
319 double er;
321 std::string material;
322 bool shield;
324 double thickness;
326 bool disable;
327
328 struct BY_ID
329 {
330 bool operator()(const FABMASTER_LAYER* lhs, const FABMASTER_LAYER* rhs) const
331 {
332 return lhs->id < rhs->id;
333 }
334 };
335 };
336
337 std::map<std::string, FABMASTER_LAYER> layers;
338
345 {
346 std::string name;
347 std::string padstack;
348 std::string refdes;
349 std::string pinnum;
350 std::map<int, graphic_element> elements;
351
352 struct HASH
353 {
354 std::size_t operator()( const std::unique_ptr<FABMASTER_PAD_SHAPE>& aPad ) const
355 {
356 return std::hash<std::string>{}( aPad->name );
357 }
358 };
359 };
360
361 std::unordered_map<std::string, FABMASTER_PAD_SHAPE> pad_shapes;
362
363 // * A!SYM_TYPE!SYM_NAME!REFDES!SYM_X!SYM_Y!SYM_ROTATE!SYM_MIRROR!NET_NAME!CLASS!SUBCLASS!RECORD_TAG!
364 // * GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!
365 // * GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!GRAPHIC_DATA_10!COMP_DEVICE_TYPE!
366 // * COMP_PACKAGE!COMP_PART_NUMBER!COMP_VALUE!CLIP_DRAWING!
367 struct SYMBOL
368 {
369 int sym_id;
370 int seq_id;
372 std::string name;
373 std::string refdes;
374 int x;
375 int y;
376 std::map<int, graphic_element> elements;
377
378 struct HASH
379 {
380 std::size_t operator()( const FABMASTER::SYMBOL& aSym ) const
381 {
382 return std::hash<std::string>{}( aSym.name );
383 }
384 };
385 };
386
387 // Temporary data structure to pass graphic data from file for processing
389 {
390 std::string graphic_dataname;
391 std::string graphic_datanum;
392 std::string graphic_data1;
393 std::string graphic_data2;
394 std::string graphic_data3;
395 std::string graphic_data4;
396 std::string graphic_data5;
397 std::string graphic_data6;
398 std::string graphic_data7;
399 std::string graphic_data8;
400 std::string graphic_data9;
401 std::string graphic_data10;
402 };
403
404 std::unordered_map<std::string, SYMBOL> symbols;
405
406
407 // * A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!
408 // * GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!
409 // * SUBCLASS!SYM_NAME!REFDES!
410
412 {
413 std::string subclass;
414 std::string name;
415 std::string refdes;
416 int id;
417
418 std::unique_ptr<graphic_element> elements;
419
420 struct BY_ID
421 {
422 bool operator()(const GEOM_GRAPHIC& lhs, const GEOM_GRAPHIC& rhs) const
423 {
424 return lhs.id < rhs.id;
425 }
426 };
427 };
428
429 std::vector<GEOM_GRAPHIC> board_graphics;
430 std::map<std::string, std::map<int, GEOM_GRAPHIC>> comp_graphics;
431
432
433 // A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
434 struct FM_VIA
435 {
436 int x;
437 int y;
438 std::string padstack;
439 std::string net;
441 bool mirror;
442 };
443
444 std::vector<std::unique_ptr<FM_VIA>> vias;
445
446 // A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!
447 // GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!
448 // GRAPHIC_DATA_8!GRAPHIC_DATA_9!NET_NAME!
449 struct TRACE
450 {
451 std::string lclass;
452 std::string layer;
453 std::string netname;
454 int id;
455
457
458 struct BY_ID
459 {
460 bool operator()(const std::unique_ptr<TRACE>& lhs, const std::unique_ptr<TRACE>& rhs) const
461 {
462 return lhs->id < rhs->id;
463 }
464 };
465 };
466
467 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> traces;
468
469 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> zones;
470
471 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> polygons;
472
473 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> refdes;
474
475
476 // A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!SYM_TYPE!
477 // SYM_NAME!SYM_MIRROR!SYM_ROTATE!SYM_X!SYM_Y!COMP_VALUE!COMP_TOL!COMP_VOLTAGE!
479 {
480 std::string refdes;
482 std::string pn;
483 std::string height;
484 std::string dev_label;
485 std::string insert_code;
487 std::string name;
488 bool mirror;
489 double rotate;
490 int x;
491 int y;
492 std::string value;
493 std::string tol;
494 std::string voltage;
495
496 struct HASH
497 {
498 std::size_t operator()( const FABMASTER::COMPONENT& aCmp ) const
499 {
500 return std::hash<std::string>{}( aCmp.refdes );
501 }
502 };
503
504 };
505
506 std::map<std::string, std::vector<std::unique_ptr<COMPONENT>>> components;
507
508
509 // A!SYM_NAME!SYM_MIRROR!PIN_NAME!PIN_NUMBER!PIN_X!PIN_Y!PAD_STACK_NAME!REFDES!PIN_ROTATION!TEST_POINT!
510
511 struct PIN
512 {
513 std::string name;
514 bool mirror;
515 std::string pin_name;
516 std::string pin_number;
517 int pin_x;
518 int pin_y;
519 std::string padstack;
520 std::string refdes;
521 double rotation;
522
523 struct BY_NUM
524 {
525 bool operator()(const std::unique_ptr<PIN>& lhs,
526 const std::unique_ptr<PIN>& rhs) const
527 {
528 return lhs->pin_number < rhs->pin_number;
529 }
530 };
531 };
532
533 std::map<std::string, std::set<std::unique_ptr<PIN>, PIN::BY_NUM>> pins;
534
535 std::map<std::string, PCB_LAYER_ID> layer_map;
536
537 section_type detectType( size_t aOffset );
538
539 void checkpoint();
540
541 int execute_recordbuffer( int filetype );
542 int getColFromName( size_t aRow, const std::string& aStr );
543 SYMTYPE parseSymType( const std::string& aSymType );
544 COMPCLASS parseCompClass( const std::string& aCompClass );
545
552 double processScaleFactor( size_t aRow );
553 size_t processPadStacks( size_t aRow );
554 size_t processCustomPads( size_t aRow );
555 size_t processGeometry( size_t aRow );
556 size_t processVias( size_t aRow );
557 size_t processTraces( size_t aRow );
558 size_t processFootprints( size_t aRow );
559 size_t processNets( size_t aRow );
560 size_t processLayers( size_t aRow );
561 size_t processSimpleLayers( size_t aRow );
562 size_t processPadStackLayers( size_t aRow );
563 size_t processSymbols( size_t aRow );
564 size_t processPins( size_t aRow );
565
573 GRAPHIC_ITEM* processGraphic( const GRAPHIC_DATA& aData, double aScale );
574
575 GRAPHIC_ARC* processArc( const GRAPHIC_DATA& aData, double aScale );
576 GRAPHIC_ARC* processCircle( const GRAPHIC_DATA& aData, double aScale );
577 GRAPHIC_LINE* processLine( const GRAPHIC_DATA& aData, double aScale );
578 GRAPHIC_TEXT* processText( const GRAPHIC_DATA& aData, double aScale );
579 GRAPHIC_RECTANGLE* processRectangle( const GRAPHIC_DATA& aData, double aScale );
580 GRAPHIC_RECTANGLE* processFigRectangle( const GRAPHIC_DATA& aData, double aScale );
581 GRAPHIC_RECTANGLE* processSquare( const GRAPHIC_DATA& aData, double aScale );
582 GRAPHIC_OBLONG* processOblong( const GRAPHIC_DATA& aData, double aScale );
583 GRAPHIC_CROSS* processCross( const GRAPHIC_DATA& aData, double aScale );
584 GRAPHIC_POLYGON* processPolygon( const GRAPHIC_DATA& aData, double aScale );
585
586 PCB_LAYER_ID getLayer( const std::string& aLayerName );
587 bool assignLayers();
588
594 double readDouble( const std::string& aStr ) const;
595 int readInt( const std::string& aStr ) const;
596
603 bool orderZones( BOARD* aBoard );
604
610 bool loadZones( BOARD* aBoard );
611 bool loadOutline( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
612 bool loadNets( BOARD* aBoard );
613 bool loadLayers( BOARD* aBoard );
614 bool loadGraphics( BOARD* aBoard );
615 bool loadVias( BOARD* aBoard );
616 bool loadEtch( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
617 bool loadZone( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
618 bool loadPolygon( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
619 bool loadFootprints( BOARD* aBoard );
620
626
628
629 static bool traceIsOpen( const FABMASTER::TRACE& aLine );
630
634 static void setupText( const FABMASTER::GRAPHIC_TEXT& aGraphicText, PCB_LAYER_ID aLayer,
635 PCB_TEXT& aText, const BOARD& aBoard, const OPT_VECTOR2I& aMirrorPoint );
636
640 static std::vector<std::unique_ptr<BOARD_ITEM>>
641 createBoardItems( BOARD& aBoard, PCB_LAYER_ID aLayer, FABMASTER::GRAPHIC_ITEM& aGraphic );
642
644 unsigned m_doneCount;
646 unsigned m_totalCount;
647};
648
649
650
651
652#endif /* PCBNEW_IMPORTERS_IMPORT_FABMASTER_H_ */
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:83
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
size_t processFootprints(size_t aRow)
A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!...
unsigned m_doneCount
size_t processPins(size_t aRow)
A!SYM_NAME!SYM_MIRROR!PIN_NAME!PIN_NUMBER!PIN_X!PIN_Y!PAD_STACK_NAME!REFDES!PIN_ROTATION!
int readInt(const std::string &aStr) const
wxFileName m_filename
GRAPHIC_OBLONG * processOblong(const GRAPHIC_DATA &aData, double aScale)
size_t processGeometry(size_t aRow)
A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!
std::map< std::string, PCB_LAYER_ID > layer_map
static std::vector< std::unique_ptr< BOARD_ITEM > > createBoardItems(BOARD &aBoard, PCB_LAYER_ID aLayer, FABMASTER::GRAPHIC_ITEM &aGraphic)
Convert one Fabmaster graphic item to one or more PCB items.
bool Read(const std::string &aFile)
bool loadNets(BOARD *aBoard)
std::map< std::string, std::map< int, GEOM_GRAPHIC > > comp_graphics
GRAPHIC_CROSS * processCross(const GRAPHIC_DATA &aData, double aScale)
unsigned m_lastProgressCount
SYMTYPE parseSymType(const std::string &aSymType)
GRAPHIC_TEXT * processText(const GRAPHIC_DATA &aData, double aScale)
bool loadLayers(BOARD *aBoard)
static void setupText(const FABMASTER::GRAPHIC_TEXT &aGraphicText, PCB_LAYER_ID aLayer, PCB_TEXT &aText, const BOARD &aBoard, const OPT_VECTOR2I &aMirrorPoint)
Set parameters for graphic text.
PCB_LAYER_ID getLayer(const std::string &aLayerName)
GRAPHIC_RECTANGLE * processSquare(const GRAPHIC_DATA &aData, double aScale)
int execute_recordbuffer(int filetype)
static bool traceIsOpen(const FABMASTER::TRACE &aLine)
bool loadZones(BOARD *aBoard)
Loads sections of the database into the board.
GRAPHIC_RECTANGLE * processRectangle(const GRAPHIC_DATA &aData, double aScale)
std::vector< std::string > single_row
size_t processSimpleLayers(size_t aRow)
PROGRESS_REPORTER * m_progressReporter
optional; may be nullptr
bool loadFootprints(BOARD *aBoard)
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > polygons
GRAPHIC_ARC * processCircle(const GRAPHIC_DATA &aData, double aScale)
std::unordered_map< std::string, FM_PAD > pads
int getColFromName(size_t aRow, const std::string &aStr)
bool loadVias(BOARD *aBoard)
size_t processLayers(size_t aRow)
A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT!
size_t processSymbols(size_t aRow)
std::map< std::string, FABMASTER_LAYER > layers
COMPCLASS parseCompClass(const std::string &aCompClass)
bool loadEtch(BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
GRAPHIC_RECTANGLE * processFigRectangle(const GRAPHIC_DATA &aData, double aScale)
std::map< std::string, std::set< std::unique_ptr< PIN >, PIN::BY_NUM > > pins
std::set< std::unique_ptr< GRAPHIC_ITEM >, GRAPHIC_ITEM::SEQ_CMP > graphic_element
std::map< std::pair< std::string, std::string >, NETNAME > pin_nets
GRAPHIC_ITEM * processGraphic(const GRAPHIC_DATA &aData, double aScale)
Specialty functions for processing graphical data rows into the internal database.
std::deque< single_row > rows
GRAPHIC_POLYGON * processPolygon(const GRAPHIC_DATA &aData, double aScale)
void createComponentsFromOrphanPins()
Creates synthetic COMPONENT entries from pins that have no matching component.
bool loadOutline(BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
size_t processPadStacks(size_t aRow)
A!PADNAME!RECNUMBER!LAYER!FIXFLAG!VIAFLAG!PADSHAPE1!PADWIDTH!PADHGHT!
std::vector< GEOM_GRAPHIC > board_graphics
section_type detectType(size_t aOffset)
double readDouble(const std::string &aStr) const
Reads the double/integer value from a std string independent of the user locale.
bool loadZone(BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
GRAPHIC_ARC * processArc(const GRAPHIC_DATA &aData, double aScale)
std::unordered_map< std::string, SYMBOL > symbols
SHAPE_POLY_SET loadShapePolySet(const graphic_element &aLine)
bool loadGraphics(BOARD *aBoard)
std::unordered_map< std::string, FABMASTER_PAD_SHAPE > pad_shapes
bool LoadBoard(BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter)
std::vector< std::unique_ptr< FM_VIA > > vias
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > traces
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > zones
std::map< std::string, std::vector< std::unique_ptr< COMPONENT > > > components
bool loadPolygon(BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > refdes
@ GR_SHAPE_OBLONG
!< Actually 360° arcs (for both arcs where start==end and real circles)
@ GR_SHAPE_CROSS
!< X/Y oblongs
size_t processPadStackLayers(size_t aRow)
std::set< std::string > netnames
size_t processTraces(size_t aRow)
A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!
size_t processNets(size_t aRow)
A!NET_NAME!REFDES!PIN_NUMBER!PIN_NAME!PIN_GROUND!PIN_POWER!
bool orderZones(BOARD *aBoard)
Sets zone priorities based on zone BB size.
double processScaleFactor(size_t aRow)
Processes data from text vectors into internal database for further ordering.
size_t processVias(size_t aRow)
A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
unsigned m_totalCount
for progress reporting
size_t processCustomPads(size_t aRow)
A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!
GRAPHIC_LINE * processLine(const GRAPHIC_DATA &aData, double aScale)
A progress reporter interface for use in multi-threaded environments.
Represent a set of closed polygons.
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition padstack.h:52
std::optional< VECTOR2I > OPT_VECTOR2I
Definition seg.h:39
std::string subclass
!< CLASS
std::size_t operator()(const FABMASTER::COMPONENT &aCmp) const
std::string dev_label
! COMP_DEVICE_LABEL
double rotate
! SYM_ROTATE (degrees)
std::string name
! SYM_NAME
SYMTYPE type
! SYM_TYPE
std::string pn
! COMP_PART_NUMBER
std::string value
! COMP_VALUE
std::string insert_code
! COMP_INSERTION_CODE
std::string voltage
! COMP_VOLTAGE
bool mirror
! SYM_MIRROR
std::string height
! COMP_HEIGHT
COMPCLASS cclass
! COMP_CLASS
std::string tol
! COMP_TOL
std::string refdes
! REFDES
bool operator()(const FABMASTER_LAYER *lhs, const FABMASTER_LAYER *rhs) const
A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT !...
bool disable
! if true, prevent the layer elements from being used
std::string name
! LAYER_SUBCLASS
double thickness
! LAYER_THICKNESS
bool shield
! LAYER_SHIELD_LAYER
std::string material
! LAYER_MATERIAL
int layerid
! pcbnew layer (assigned)
bool conductive
! LAYER_CONDUCTOR
bool positive
! LAYER_ARTWORK (either POSITIVE or NEGATIVE)
double conductivity
! LAYER_ELECTRICAL_CONDUCTIVITY
std::string use
! LAYER_USE
double thermal_cond
! LAYER_THERMAL_CONDUCTIVITY
double er
! LAYER_DIELECTRIC_CONSTANT
std::size_t operator()(const std::unique_ptr< FABMASTER_PAD_SHAPE > &aPad) const
A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!
std::map< int, graphic_element > elements
std::string name
! PAD_SHAPE_NAME
std::string padstack
! PAD_STACK_NAME
std::string pinnum
! PIN_NUMBER
std::size_t operator()(const FM_PAD &aPad) const
std::set< std::string > copper_layers
Copper layers with non-zero annular ring.
std::string padstack
! PAD_STACK_NAME
bool mirror
! VIA_MIRROR (VIA_MIRROR is an optional component)
bool test_point
! TEST_POINT
std::string net
! NET_NAME
bool operator()(const GEOM_GRAPHIC &lhs, const GEOM_GRAPHIC &rhs) const
std::string name
! SYM_NAME
std::string refdes
! REFDES
std::string subclass
! SUBCLASS
std::unique_ptr< graphic_element > elements
int end_x
! GRAPHIC_DATA_3
SHAPE_ARC result
! KiCad-style arc representation
int center_x
! GRAPHIC_DATA_5
bool clockwise
! GRAPHIC_DATA_9
int center_y
! GRAPHIC_DATA_6
int end_y
! GRAPHIC_DATA_4
int size_y
! GRAPHIC_DATA_4
int size_x
! GRAPHIC_DATA_3
bool oblong_x
! OBLONG_X (as opposed to OBLONG_Y)
bool operator()(const std::unique_ptr< GRAPHIC_ITEM > &lhs, const std::unique_ptr< GRAPHIC_ITEM > &rhs) const
std::string layer
! SUBCLASS
int subseq
! RECORD_TAG[1]
int width
! Various sections depending on type
GRAPHIC_SHAPE shape
! Shape of the graphic_item
std::string symbol
! SYMBOL
int start_y
! GRAPHIC_DATA_2
virtual ~GRAPHIC_ITEM()=default
int start_x
! GRAPHIC_DATA_1
GRAPHIC_TYPE type
! Type of graphic item
std::string refdes
! REFDES
int end_x
! GRAPHIC_DATA_3
bool oblong_x
! OBLONG_X (as opposed to OBLONG_Y)
int size_x
! GRAPHIC_DATA_3
int size_y
! GRAPHIC_DATA_4
std::vector< VECTOR2I > m_pts
double rotation
! GRAPHIC_DATA_3
std::string text
! GRAPHIC_DATA_7
int height
! GRAPHIC_DATA_6[2]
int thickness
! GRAPHIC_DATA_6[6]
GR_TEXT_H_ALIGN_T orient
! GRAPHIC_DATA_5
bool ital
! GRAPHIC_DATA_6[4] != 0.0
bool mirror
! GRAPHIC_DATA_4
bool operator()(const NETNAME &lhs, const NETNAME &rhs) const
std::string refdes
!< NET_NAME
bool pin_pwr
!< PIN_GND
std::string pin_num
!< REFDES
std::string pin_name
!< PIN_NUMBER
bool pin_gnd
!< PIN_NAME
bool operator()(const std::unique_ptr< PIN > &lhs, const std::unique_ptr< PIN > &rhs) const
int pin_x
! PIN_X - Absolute board units
int pin_y
! PIN_Y - Absolute board units
double rotation
! PIN_ROTATION
bool mirror
! SYM_MIRROR
std::string padstack
! PAD_STACK
std::string name
! SYM_NAME
std::string pin_name
! PIN_NAME
std::string refdes
! REFDES
std::string pin_number
! PIN_NUMBER
std::size_t operator()(const FABMASTER::SYMBOL &aSym) const
std::string refdes
! REFDES
std::map< int, graphic_element > elements
std::string name
! SYM_NAME
int subseq_id
! RECORD_TAG[2] (RECORD_TAG is of the form "x y z")
int seq_id
! RECORD_TAG[1] (RECORD_TAG is of the form "x y z")
int sym_id
! RECORD_TAG[0]
bool operator()(const std::unique_ptr< TRACE > &lhs, const std::unique_ptr< TRACE > &rhs) const
std::string layer
! SUBCLASS
std::string lclass
! CLASS
std::string netname
! NET_NAME
int id
! RECORD_TAG[0]
graphic_element segment
! GRAPHIC_DATA (can be either LINE or ARC)
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.