KiCad PCB EDA Suite
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 (C) 2019-2021 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 <pad_shapes.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;
48
50{
51public:
52
53 using single_row = std::vector<std::string>;
55 has_pads( false ),
56 has_comps( false ),
57 has_graphic( false ),
58 has_nets( false ),
59 has_pins( false ),
60 m_progressReporter( nullptr ),
61 m_doneCount( 0 ),
63 m_totalCount( 0 )
64
65 {}
66
67 bool Read( const std::string& aFile );
68
69 bool Process();
70
71 bool LoadBoard( BOARD* aBoard, PROGRESS_REPORTER* aProgressReporter );
72
73private:
74
75 wxFileName m_filename;
76
77 enum section_type : int
78 {
91 };
92
93 std::deque<single_row> rows;
94
100
101
102 struct FM_PAD
103 {
104 std::string name;
105 bool fixed;
106 bool via;
108 std::string custom_name;
109 bool top;
110 bool bottom;
111 bool paste;
112 bool mask;
113 bool drill;
114 bool plated;
118 int width;
127
128 struct HASH
129 {
130 std::size_t operator()( const FM_PAD& aPad ) const
131 {
132 return std::hash<std::string>{}( aPad.name );
133 }
134 };
135 };
136
137 std::unordered_map<std::string, FM_PAD> pads;
138
140 {
145 };
146
148 {
154 };
155
156 // A!NET_NAME!REFDES!PIN_NUMBER!PIN_NAME!PIN_GROUND!PIN_POWER!
157 struct NETNAME
158 {
159 std::string name;
160 std::string refdes;
161 std::string pin_num;
162 std::string pin_name;
163 bool pin_gnd;
164 bool pin_pwr;
165
166 struct LESS
167 {
168 bool operator()(const NETNAME& lhs, const NETNAME& rhs) const
169 {
170 if( lhs.refdes == rhs.refdes )
171 return lhs.pin_num < rhs.pin_num;
172
173 return lhs.refdes < rhs.refdes;
174 }
175 };
176 };
177
178 std::map<std::pair<std::string, std::string>, NETNAME> pin_nets;
179 std::set<std::string> netnames;
180
181 struct CLASS
182 {
183 std::string name;
184 std::string subclass;
185 };
186
187
189 {
195 };
196
198 {
205 };
206
208 {
211 int width;
212 std::string layer;
213 std::string symbol;
214 std::string refdes;
215 int seq;
216 int subseq;
219
220
221 struct SEQ_CMP
222 {
223 bool operator()(const std::unique_ptr<GRAPHIC_ITEM>& lhs,
224 const std::unique_ptr<GRAPHIC_ITEM>& rhs) const
225 {
226 if( lhs->refdes != rhs->refdes )
227 return lhs->refdes < rhs->refdes;
228
229 if( lhs->layer != rhs->layer )
230 return lhs->layer < rhs->layer;
231
232 return lhs->seq < rhs->seq;
233 }
234 };
235 };
236
238 {
239 int end_x;
240 int end_y;
242 };
243
244 struct GRAPHIC_ARC : public GRAPHIC_ITEM
245 {
246 int end_x;
247 int end_y;
250 int radius;
253
255 };
256
258 {
259 int end_x;
260 int end_y;
261 bool fill;
262 };
263
265 {
266 double rotation;
267 bool mirror;
269 // GRAPHIC_DATA_6 is
270 // SIZE FONT HEIGHT WIDTH ITAL LINESPACE THICKNESS
271 int height;
273 bool ital;
274
275 std::string text;
276 };
277
278 using graphic_element = std::set<std::unique_ptr<GRAPHIC_ITEM>, GRAPHIC_ITEM::SEQ_CMP>;
279
283 {
284 int id;
285 std::string name;
286 bool positive;
287 std::string use;
289 double er;
291 std::string material;
292 bool shield;
294 double thickness;
296 bool disable;
297
298 struct BY_ID
299 {
300 bool operator()(const FABMASTER_LAYER* lhs, const FABMASTER_LAYER* rhs) const
301 {
302 return lhs->id < rhs->id;
303 }
304 };
305 };
306
307 std::map<std::string, FABMASTER_LAYER> layers;
308
315 {
316 std::string name;
317 std::string padstack;
318 std::string refdes;
319 std::string pinnum;
320 std::map<int, graphic_element> elements;
321
322 struct HASH
323 {
324 std::size_t operator()( const std::unique_ptr<FABMASTER_PAD_SHAPE>& aPad ) const
325 {
326 return std::hash<std::string>{}( aPad->name );
327 }
328 };
329 };
330
331 std::unordered_map<std::string, FABMASTER_PAD_SHAPE> pad_shapes;
332
333 // * A!SYM_TYPE!SYM_NAME!REFDES!SYM_X!SYM_Y!SYM_ROTATE!SYM_MIRROR!NET_NAME!CLASS!SUBCLASS!RECORD_TAG!
334 // * GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!
335 // * GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!GRAPHIC_DATA_10!COMP_DEVICE_TYPE!
336 // * COMP_PACKAGE!COMP_PART_NUMBER!COMP_VALUE!CLIP_DRAWING!
337 struct SYMBOL
338 {
339 int sym_id;
340 int seq_id;
342 std::string name;
343 std::string refdes;
344 int x;
345 int y;
346 std::map<int, graphic_element> elements;
347
348 struct HASH
349 {
350 std::size_t operator()( const FABMASTER::SYMBOL& aSym ) const
351 {
352 return std::hash<std::string>{}( aSym.name );
353 }
354 };
355 };
356
357 // Temporary data structure to pass graphic data from file for processing
359 {
360 std::string graphic_dataname;
361 std::string graphic_datanum;
362 std::string graphic_data1;
363 std::string graphic_data2;
364 std::string graphic_data3;
365 std::string graphic_data4;
366 std::string graphic_data5;
367 std::string graphic_data6;
368 std::string graphic_data7;
369 std::string graphic_data8;
370 std::string graphic_data9;
371 std::string graphic_data10;
372 };
373
374 std::unordered_map<std::string, SYMBOL> symbols;
375
376
377 // * A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!
378 // * GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!
379 // * SUBCLASS!SYM_NAME!REFDES!
380
382 {
383 std::string subclass;
384 std::string name;
385 std::string refdes;
386 int id;
387
388 std::unique_ptr<graphic_element> elements;
389
390 struct BY_ID
391 {
392 bool operator()(const GEOM_GRAPHIC& lhs, const GEOM_GRAPHIC& rhs) const
393 {
394 return lhs.id < rhs.id;
395 }
396 };
397 };
398
399 std::vector<GEOM_GRAPHIC> board_graphics;
400 std::map<std::string, std::map<int, GEOM_GRAPHIC>> comp_graphics;
401
402
403 // A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
404 struct FM_VIA
405 {
406 int x;
407 int y;
408 std::string padstack;
409 std::string net;
411 bool mirror;
412 };
413
414 std::vector<std::unique_ptr<FM_VIA>> vias;
415
416 // A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!
417 // GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!
418 // GRAPHIC_DATA_8!GRAPHIC_DATA_9!NET_NAME!
419 struct TRACE
420 {
421 std::string lclass;
422 std::string layer;
423 std::string netname;
424 int id;
425
427
428 struct BY_ID
429 {
430 bool operator()(const std::unique_ptr<TRACE>& lhs, const std::unique_ptr<TRACE>& rhs) const
431 {
432 return lhs->id < rhs->id;
433 }
434 };
435 };
436
437 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> traces;
438
439 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> zones;
440
441 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> polygons;
442
443 std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> refdes;
444
445
446 // A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!SYM_TYPE!
447 // SYM_NAME!SYM_MIRROR!SYM_ROTATE!SYM_X!SYM_Y!COMP_VALUE!COMP_TOL!COMP_VOLTAGE!
449 {
450 std::string refdes;
452 std::string pn;
453 std::string height;
454 std::string dev_label;
455 std::string insert_code;
457 std::string name;
458 bool mirror;
459 double rotate;
460 int x;
461 int y;
462 std::string value;
463 std::string tol;
464 std::string voltage;
465
466 struct HASH
467 {
468 std::size_t operator()( const FABMASTER::COMPONENT& aCmp ) const
469 {
470 return std::hash<std::string>{}( aCmp.refdes );
471 }
472 };
473
474 };
475
476 std::map<std::string, std::vector<std::unique_ptr<COMPONENT>>> components;
477
478
479 // A!SYM_NAME!SYM_MIRROR!PIN_NAME!PIN_NUMBER!PIN_X!PIN_Y!PAD_STACK_NAME!REFDES!PIN_ROTATION!TEST_POINT!
480
481 struct PIN
482 {
483 std::string name;
484 bool mirror;
485 std::string pin_name;
486 std::string pin_number;
487 int pin_x;
488 int pin_y;
489 std::string padstack;
490 std::string refdes;
491 double rotation;
492
493 struct BY_NUM
494 {
495 bool operator()(const std::unique_ptr<PIN>& lhs,
496 const std::unique_ptr<PIN>& rhs) const
497 {
498 return lhs->pin_number < rhs->pin_number;
499 }
500 };
501 };
502
503 std::map<std::string, std::set<std::unique_ptr<PIN>, PIN::BY_NUM>> pins;
504
505 std::map<std::string, PCB_LAYER_ID> layer_map;
506
507 section_type detectType( size_t aOffset );
508
509 void checkpoint();
510
511 int execute_recordbuffer( int filetype );
512 int getColFromName( size_t aRow, const std::string& aStr );
513 SYMTYPE parseSymType( const std::string& aSymType );
514 COMPCLASS parseCompClass( const std::string& aCompClass );
515
522 double processScaleFactor( size_t aRow );
523 size_t processPadStacks( size_t aRow );
524 size_t processCustomPads( size_t aRow );
525 size_t processGeometry( size_t aRow );
526 size_t processVias( size_t aRow );
527 size_t processTraces( size_t aRow );
528 size_t processFootprints( size_t aRow );
529 size_t processNets( size_t aRow );
530 size_t processLayers( size_t aRow );
531 size_t processSimpleLayers( size_t aRow );
532 size_t processPadStackLayers( size_t aRow );
533 size_t processSymbols( size_t aRow );
534 size_t processPins( size_t aRow );
535
543 GRAPHIC_ITEM* processGraphic( const GRAPHIC_DATA& aData, double aScale );
544 GRAPHIC_ARC* processArc( const GRAPHIC_DATA& aData, double aScale );
545 GRAPHIC_LINE* processLine( const GRAPHIC_DATA& aData, double aScale );
546 GRAPHIC_TEXT* processText( const GRAPHIC_DATA& aData, double aScale );
547 GRAPHIC_RECTANGLE* processRectangle( const GRAPHIC_DATA& aData, double aScale );
548
549 PCB_LAYER_ID getLayer( const std::string& aLayerName );
550 bool assignLayers();
551
557 double readDouble( const std::string& aStr ) const;
558 int readInt( const std::string& aStr ) const;
559
566 bool orderZones( BOARD* aBoard );
567
573 bool loadZones( BOARD* aBoard );
574 bool loadOutline( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
575 bool loadNets( BOARD* aBoard );
576 bool loadLayers( BOARD* aBoard );
577 bool loadGraphics( BOARD* aBoard );
578 bool loadVias( BOARD* aBoard );
579 bool loadEtch( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
580 bool loadZone( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
581 bool loadPolygon( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
582 bool loadFootprints( BOARD* aBoard );
583
585
587 unsigned m_doneCount;
589 unsigned m_totalCount;
590};
591
592
593
594
595#endif /* PCBNEW_IMPORTERS_IMPORT_FABMASTER_H_ */
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
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
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
bool Read(const std::string &aFile)
bool loadNets(BOARD *aBoard)
std::map< std::string, std::map< int, GEOM_GRAPHIC > > comp_graphics
unsigned m_lastProgressCount
SYMTYPE parseSymType(const std::string &aSymType)
GRAPHIC_TEXT * processText(const GRAPHIC_DATA &aData, double aScale)
bool loadLayers(BOARD *aBoard)
PCB_LAYER_ID getLayer(const std::string &aLayerName)
int execute_recordbuffer(int filetype)
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
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)
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
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! PADXOFF!PADYOFF!...
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_CIRCLE
! Not actually in Fabmaster but we use for 360° arcs
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!
@ FABMASTER_EXTRACT_PINS
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:59
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition: pad_shapes.h:35
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::string custom_name
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
int id
! RECORD_TAG[0]
std::unique_ptr< graphic_element > elements
int end_x
! GRAPHIC_DATA_3
SHAPE_ARC result
! KiCad-style arc representation
int radius
! GRAPHIC_DATA_7 ! width is GRAPHIC_DATA_8
int center_x
! GRAPHIC_DATA_5
bool clockwise
! GRAPHIC_DATA_9
int center_y
! GRAPHIC_DATA_6
int end_y
! GRAPHIC_DATA_4
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 seq
! RECORD_TAG[0]
int start_y
! GRAPHIC_DATA_2
int start_x
! GRAPHIC_DATA_1
GRAPHIC_TYPE type
! Type of graphic item
std::string refdes
! REFDES
int end_x
! GRAPHIC_DATA_3
int end_y
! GRAPHIC_DATA_4 ! width is GRAPHIC_DATA_5
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