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 <hash_eda.h>
32 #include <pad_shapes.h>
33 
34 #include <deque>
35 #include <functional>
36 #include <iostream>
37 #include <map>
38 #include <memory>
39 #include <set>
40 #include <unordered_map>
41 #include <string>
42 #include <vector>
43 
44 #include <wx/filename.h>
45 
46 enum PCB_LAYER_ID : int;
47 class BOARD;
48 class PROGRESS_REPORTER;
49 
50 class FABMASTER
51 {
52 public:
53 
54  using single_row = std::vector<std::string>;
56  has_pads( false ),
57  has_comps( false ),
58  has_graphic( false ),
59  has_nets( false ),
60  has_pins( false ),
61  m_progressReporter( nullptr ),
62  m_doneCount( 0 ),
64  m_totalCount( 0 )
65 
66  {}
67 
68  bool Read( const std::string& aFile );
69 
70  bool Process();
71 
72  bool LoadBoard( BOARD* aBoard, PROGRESS_REPORTER* aProgressReporter );
73 
74 private:
75 
76  wxFileName m_filename;
77 
78  enum section_type : int
79  {
92  };
93 
94  std::deque<single_row> rows;
95 
96  bool has_pads;
97  bool has_comps;
99  bool has_nets;
100  bool has_pins;
101 
102 
103  struct FM_PAD
104  {
105  std::string name;
106  bool fixed;
107  bool via;
109  std::string custom_name;
110  bool top;
111  bool bottom;
112  bool paste;
113  bool mask;
114  bool drill;
115  bool plated;
119  int width;
120  int height;
125  int x_offset;
126  int y_offset;
128 
129  struct HASH
130  {
131  std::size_t operator()( const FM_PAD& aPad ) const
132  {
133  return std::hash<std::string>{}( aPad.name );
134  }
135  };
136  };
137 
138  std::unordered_map<std::string, FM_PAD> pads;
139 
141  {
146  };
147 
148  enum SYMTYPE
149  {
155  };
156 
157  // A!NET_NAME!REFDES!PIN_NUMBER!PIN_NAME!PIN_GROUND!PIN_POWER!
158  struct NETNAME
159  {
160  std::string name;
161  std::string refdes;
162  std::string pin_num;
163  std::string pin_name;
164  bool pin_gnd;
165  bool pin_pwr;
166 
167  struct LESS
168  {
169  bool operator()(const NETNAME& lhs, const NETNAME& rhs) const
170  {
171  if( lhs.refdes == rhs.refdes )
172  return lhs.pin_num < rhs.pin_num;
173 
174  return lhs.refdes < rhs.refdes;
175  }
176  };
177  };
178 
179  std::map<std::pair<std::string, std::string>, NETNAME> pin_nets;
180  std::set<std::string> netnames;
181 
182  struct CLASS
183  {
184  std::string name;
185  std::string subclass;
186  };
187 
188 
190  {
196  };
197 
199  {
206  };
207 
209  {
210  int start_x;
211  int start_y;
212  int width;
213  std::string layer;
214  std::string symbol;
215  std::string refdes;
216  int seq;
217  int subseq;
220 
221 
222  struct SEQ_CMP
223  {
224  bool operator()(const std::unique_ptr<GRAPHIC_ITEM>& lhs,
225  const std::unique_ptr<GRAPHIC_ITEM>& rhs) const
226  {
227  if( lhs->refdes != rhs->refdes )
228  return lhs->refdes < rhs->refdes;
229 
230  if( lhs->layer != rhs->layer )
231  return lhs->layer < rhs->layer;
232 
233  return lhs->seq < rhs->seq;
234  }
235  };
236  };
237 
238  struct GRAPHIC_LINE : public GRAPHIC_ITEM
239  {
240  int end_x;
241  int end_y;
242  };
244 
245  struct GRAPHIC_ARC : public GRAPHIC_ITEM
246  {
247  int end_x;
248  int end_y;
249  int center_x;
250  int center_y;
251  int radius;
252  bool clockwise;
254 
256  };
257 
259  {
260  int end_x;
261  int end_y;
262  bool fill;
263  };
264 
265  struct GRAPHIC_TEXT : public GRAPHIC_ITEM
266  {
267  double rotation;
268  bool mirror;
270  // GRAPHIC_DATA_6 is
271  // SIZE FONT HEIGHT WIDTH ITAL LINESPACE THICKNESS
272  int height;
273  int thickness;
274  bool ital;
275 
276  std::string text;
277  };
278 
279  using graphic_element = std::set<std::unique_ptr<GRAPHIC_ITEM>, GRAPHIC_ITEM::SEQ_CMP>;
280 
284  {
285  int id;
286  std::string name;
287  bool positive;
288  std::string use;
289  bool conductive;
290  double er;
291  double conductivity;
292  std::string material;
293  bool shield;
294  double thermal_cond;
295  double thickness;
296  int layerid;
297  bool disable;
298 
299  struct BY_ID
300  {
301  bool operator()(const FABMASTER_LAYER* lhs, const FABMASTER_LAYER* rhs) const
302  {
303  return lhs->id < rhs->id;
304  }
305  };
306  };
307 
308  std::map<std::string, FABMASTER_LAYER> layers;
309 
316  {
317  std::string name;
318  std::string padstack;
319  std::string refdes;
320  std::string pinnum;
321  std::map<int, graphic_element> elements;
322 
323  struct HASH
324  {
325  std::size_t operator()( const std::unique_ptr<FABMASTER_PAD_SHAPE>& aPad ) const
326  {
327  return std::hash<std::string>{}( aPad->name );
328  }
329  };
330  };
331 
332  std::unordered_map<std::string, FABMASTER_PAD_SHAPE> pad_shapes;
333 
334  // * A!SYM_TYPE!SYM_NAME!REFDES!SYM_X!SYM_Y!SYM_ROTATE!SYM_MIRROR!NET_NAME!CLASS!SUBCLASS!RECORD_TAG!
335  // * GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!
336  // * GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!GRAPHIC_DATA_10!COMP_DEVICE_TYPE!
337  // * COMP_PACKAGE!COMP_PART_NUMBER!COMP_VALUE!CLIP_DRAWING!
338  struct SYMBOL
339  {
340  int sym_id;
341  int seq_id;
342  int subseq_id;
343  std::string name;
344  std::string refdes;
345  int x;
346  int y;
347  std::map<int, graphic_element> elements;
348 
349  struct HASH
350  {
351  std::size_t operator()( const FABMASTER::SYMBOL& aSym ) const
352  {
353  return std::hash<std::string>{}( aSym.name );
354  }
355  };
356  };
357 
358  // Temporary data structure to pass graphic data from file for processing
360  {
361  std::string graphic_dataname;
362  std::string graphic_datanum;
363  std::string graphic_data1;
364  std::string graphic_data2;
365  std::string graphic_data3;
366  std::string graphic_data4;
367  std::string graphic_data5;
368  std::string graphic_data6;
369  std::string graphic_data7;
370  std::string graphic_data8;
371  std::string graphic_data9;
372  std::string graphic_data10;
373  };
374 
375  std::unordered_map<std::string, SYMBOL> symbols;
376 
377 
378  // * A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!
379  // * GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9!
380  // * SUBCLASS!SYM_NAME!REFDES!
381 
383  {
384  std::string subclass;
385  std::string name;
386  std::string refdes;
387  int id;
388 
389  std::unique_ptr<graphic_element> elements;
390 
391  struct BY_ID
392  {
393  bool operator()(const GEOM_GRAPHIC& lhs, const GEOM_GRAPHIC& rhs) const
394  {
395  return lhs.id < rhs.id;
396  }
397  };
398  };
399 
400  std::vector<GEOM_GRAPHIC> board_graphics;
401  std::map<std::string, std::map<int, GEOM_GRAPHIC>> comp_graphics;
402 
403 
404  // A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
405  struct FM_VIA
406  {
407  int x;
408  int y;
409  std::string padstack;
410  std::string net;
411  bool test_point;
412  bool mirror;
413  };
414 
415  std::vector<std::unique_ptr<FM_VIA>> vias;
416 
417  // A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!
418  // GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!
419  // GRAPHIC_DATA_8!GRAPHIC_DATA_9!NET_NAME!
420  struct TRACE
421  {
422  std::string lclass;
423  std::string layer;
424  std::string netname;
425  int id;
426 
428 
429  struct BY_ID
430  {
431  bool operator()(const std::unique_ptr<TRACE>& lhs, const std::unique_ptr<TRACE>& rhs) const
432  {
433  return lhs->id < rhs->id;
434  }
435  };
436  };
437 
438  std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> traces;
439 
440  std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> zones;
441 
442  std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> polygons;
443 
444  std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> refdes;
445 
446 
447  // A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!SYM_TYPE!
448  // SYM_NAME!SYM_MIRROR!SYM_ROTATE!SYM_X!SYM_Y!COMP_VALUE!COMP_TOL!COMP_VOLTAGE!
449  struct COMPONENT
450  {
451  std::string refdes;
453  std::string pn;
454  std::string height;
455  std::string dev_label;
456  std::string insert_code;
458  std::string name;
459  bool mirror;
460  double rotate;
461  int x;
462  int y;
463  std::string value;
464  std::string tol;
465  std::string voltage;
466 
467  struct HASH
468  {
469  std::size_t operator()( const FABMASTER::COMPONENT& aCmp ) const
470  {
471  return std::hash<std::string>{}( aCmp.refdes );
472  }
473  };
474 
475  };
476 
477  std::map<std::string, std::vector<std::unique_ptr<COMPONENT>>> components;
478 
479 
480  // A!SYM_NAME!SYM_MIRROR!PIN_NAME!PIN_NUMBER!PIN_X!PIN_Y!PAD_STACK_NAME!REFDES!PIN_ROTATION!TEST_POINT!
481 
482  struct PIN
483  {
484  std::string name;
485  bool mirror;
486  std::string pin_name;
487  std::string pin_number;
488  int pin_x;
489  int pin_y;
490  std::string padstack;
491  std::string refdes;
492  double rotation;
493 
494  struct BY_NUM
495  {
496  bool operator()(const std::unique_ptr<PIN>& lhs,
497  const std::unique_ptr<PIN>& rhs) const
498  {
499  return lhs->pin_number < rhs->pin_number;
500  }
501  };
502  };
503 
504  std::map<std::string, std::set<std::unique_ptr<PIN>, PIN::BY_NUM>> pins;
505 
506  std::map<std::string, PCB_LAYER_ID> layer_map;
507 
508  section_type detectType( size_t aOffset );
509 
510  void checkpoint();
511 
512  int execute_recordbuffer( int filetype );
513  int getColFromName( size_t aRow, const std::string& aStr );
514  SYMTYPE parseSymType( const std::string& aSymType );
515  COMPCLASS parseCompClass( const std::string& aCompClass );
516 
523  double processScaleFactor( size_t aRow );
524  size_t processPadStacks( size_t aRow );
525  size_t processCustomPads( size_t aRow );
526  size_t processGeometry( size_t aRow );
527  size_t processVias( size_t aRow );
528  size_t processTraces( size_t aRow );
529  size_t processFootprints( size_t aRow );
530  size_t processNets( size_t aRow );
531  size_t processLayers( size_t aRow );
532  size_t processSimpleLayers( size_t aRow );
533  size_t processPadStackLayers( size_t aRow );
534  size_t processSymbols( size_t aRow );
535  size_t processPins( size_t aRow );
536 
544  GRAPHIC_ITEM* processGraphic( const GRAPHIC_DATA& aData, double aScale );
545  GRAPHIC_ARC* processArc( const GRAPHIC_DATA& aData, double aScale );
546  GRAPHIC_LINE* processLine( const GRAPHIC_DATA& aData, double aScale );
547  GRAPHIC_TEXT* processText( const GRAPHIC_DATA& aData, double aScale );
548  GRAPHIC_RECTANGLE* processRectangle( const GRAPHIC_DATA& aData, double aScale );
549 
550  PCB_LAYER_ID getLayer( const std::string& aLayerName );
551  bool assignLayers();
552 
558  double readDouble( const std::string& aStr ) const;
559  int readInt( const std::string& aStr ) const;
560 
567  bool orderZones( BOARD* aBoard );
568 
574  bool loadZones( BOARD* aBoard );
575  bool loadOutline( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
576  bool loadNets( BOARD* aBoard );
577  bool loadLayers( BOARD* aBoard );
578  bool loadGraphics( BOARD* aBoard );
579  bool loadVias( BOARD* aBoard );
580  bool loadEtch( BOARD* aBoard, const std::unique_ptr<TRACE>& aLine);
581  bool loadZone( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
582  bool loadPolygon( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRACE>& aLine);
583  bool loadFootprints( BOARD* aBoard );
584 
586 
588  unsigned m_doneCount;
590  unsigned m_totalCount;
591 };
592 
593 
594 
595 
596 #endif /* PCBNEW_IMPORTERS_IMPORT_FABMASTER_H_ */
int execute_recordbuffer(int filetype)
SHAPE_ARC result
! KiCad-style arc representation
std::string height
! COMP_HEIGHT
size_t processSimpleLayers(size_t aRow)
std::string name
! SYM_NAME
bool Read(const std::string &aFile)
std::string padstack
! PAD_STACK_NAME
std::vector< std::string > single_row
bool operator()(const std::unique_ptr< PIN > &lhs, const std::unique_ptr< PIN > &rhs) const
EDA_TEXT_HJUSTIFY_T
Definition: eda_text.h:82
std::map< std::string, std::map< int, GEOM_GRAPHIC > > comp_graphics
std::size_t operator()(const FM_PAD &aPad) const
std::size_t operator()(const FABMASTER::SYMBOL &aSym) const
std::unordered_map< std::string, SYMBOL > symbols
std::string name
! LAYER_SUBCLASS
std::map< std::string, std::vector< std::unique_ptr< COMPONENT > > > components
A progress reporter interface for use in multi-threaded environments.
std::string refdes
! REFDES
bool operator()(const GEOM_GRAPHIC &lhs, const GEOM_GRAPHIC &rhs) const
std::string layer
! SUBCLASS
SYMTYPE type
! SYM_TYPE
bool ital
! GRAPHIC_DATA_6[4] != 0.0
int pin_y
! PIN_Y - Absolute board units
std::map< std::string, PCB_LAYER_ID > layer_map
bool loadGraphics(BOARD *aBoard)
PROGRESS_REPORTER * m_progressReporter
optional; may be nullptr
GRAPHIC_LINE * processLine(const GRAPHIC_DATA &aData, double aScale)
double readDouble(const std::string &aStr) const
Reads the double/integer value from a std string independent of the user locale.
PCB_LAYER_ID getLayer(const std::string &aLayerName)
int thickness
! GRAPHIC_DATA_6[6]
std::unique_ptr< graphic_element > elements
bool LoadBoard(BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter)
int end_x
! GRAPHIC_DATA_3
int pin_x
! PIN_X - Absolute board units
bool operator()(const NETNAME &lhs, const NETNAME &rhs) const
std::string subclass
! SUBCLASS
std::string material
! LAYER_MATERIAL
int start_y
! GRAPHIC_DATA_2
bool loadEtch(BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
bool loadZone(BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
std::string symbol
! SYMBOL
std::map< std::string, FABMASTER_LAYER > layers
std::size_t operator()(const FABMASTER::COMPONENT &aCmp) const
std::string tol
! COMP_TOL
bool shield
! LAYER_SHIELD_LAYER
std::string refdes
! REFDES
std::vector< std::unique_ptr< FM_VIA > > vias
graphic_element segment
! GRAPHIC_DATA (can be either LINE or ARC)
int center_x
! GRAPHIC_DATA_5
bool loadNets(BOARD *aBoard)
A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT !...
bool mirror
! SYM_MIRROR
std::string refdes
! REFDES
std::string insert_code
! COMP_INSERTION_CODE
std::string name
! SYM_NAME
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > traces
int subseq
! RECORD_TAG[1]
double rotation
! PIN_ROTATION
size_t processFootprints(size_t aRow)
A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!...
std::string name
! SYM_NAME
bool test_point
! TEST_POINT
int end_y
! GRAPHIC_DATA_4 ! width is GRAPHIC_DATA_5
int readInt(const std::string &aStr) const
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape() DO NOT REORDER, legacy_plugin is dependent on ...
Definition: pad_shapes.h:33
section_type detectType(size_t aOffset)
std::vector< GEOM_GRAPHIC > board_graphics
GRAPHIC_ITEM * processGraphic(const GRAPHIC_DATA &aData, double aScale)
Specialty functions for processing graphical data rows into the internal database.
std::size_t operator()(const std::unique_ptr< FABMASTER_PAD_SHAPE > &aPad) const
bool loadFootprints(BOARD *aBoard)
int seq
! RECORD_TAG[0]
std::map< int, graphic_element > elements
double er
! LAYER_DIELECTRIC_CONSTANT
bool loadVias(BOARD *aBoard)
int height
! GRAPHIC_DATA_6[2]
bool operator()(const FABMASTER_LAYER *lhs, const FABMASTER_LAYER *rhs) const
std::map< std::pair< std::string, std::string >, NETNAME > pin_nets
size_t processGeometry(size_t aRow)
A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3!...
bool operator()(const std::unique_ptr< TRACE > &lhs, const std::unique_ptr< TRACE > &rhs) const
Represent a set of closed polygons.
int sym_id
! RECORD_TAG[0]
double rotation
! GRAPHIC_DATA_3
std::set< std::unique_ptr< GRAPHIC_ITEM >, GRAPHIC_ITEM::SEQ_CMP > graphic_element
size_t processVias(size_t aRow)
A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
std::string refdes
! REFDES
std::string use
! LAYER_USE
size_t processPadStacks(size_t aRow)
A!PADNAME!RECNUMBER!LAYER!FIXFLAG!VIAFLAG!PADSHAPE1!PADWIDTH!PADHGHT! PADXOFF!PADYOFF!...
int center_y
! GRAPHIC_DATA_6
GRAPHIC_RECTANGLE * processRectangle(const GRAPHIC_DATA &aData, double aScale)
std::string name
! PAD_SHAPE_NAME
std::string refdes
!< NET_NAME
std::string pin_num
!< REFDES
GRAPHIC_TYPE type
! Type of graphic item
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > zones
SHAPE_POLY_SET loadShapePolySet(const graphic_element &aLine)
size_t processSymbols(size_t aRow)
std::string layer
! SUBCLASS
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > polygons
int getColFromName(size_t aRow, const std::string &aStr)
std::string net
! NET_NAME
int radius
! GRAPHIC_DATA_7 ! width is GRAPHIC_DATA_8
std::string voltage
! COMP_VOLTAGE
std::string text
! GRAPHIC_DATA_7
bool mirror
! VIA_MIRROR (VIA_MIRROR is an optional component)
std::string lclass
! CLASS
std::map< std::string, std::set< std::unique_ptr< PIN >, PIN::BY_NUM > > pins
std::string refdes
! REFDES
std::set< std::string > netnames
int id
! RECORD_TAG[0]
unsigned m_doneCount
COMPCLASS cclass
! COMP_CLASS
unsigned m_totalCount
for progress reporting
std::string pinnum
! PIN_NUMBER
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!...
std::unordered_map< std::string, FM_PAD > pads
double rotate
! SYM_ROTATE (degrees)
size_t processCustomPads(size_t aRow)
A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!...
GRAPHIC_ARC * processArc(const GRAPHIC_DATA &aData, double aScale)
std::unordered_map< std::string, FABMASTER_PAD_SHAPE > pad_shapes
std::string value
! COMP_VALUE
std::string padstack
! PAD_STACK_NAME
int layerid
! pcbnew layer (assigned)
wxFileName m_filename
std::string netname
! NET_NAME
bool mirror
! SYM_MIRROR
int start_x
! GRAPHIC_DATA_1
bool conductive
! LAYER_CONDUCTOR
EDA_TEXT_HJUSTIFY_T orient
! GRAPHIC_DATA_5
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
int end_y
! GRAPHIC_DATA_4
std::string pn
! COMP_PART_NUMBER
unsigned m_lastProgressCount
bool disable
! if true, prevent the layer elements from being used
std::string pin_number
! PIN_NUMBER
size_t processNets(size_t aRow)
A!NET_NAME!REFDES!PIN_NUMBER!PIN_NAME!PIN_GROUND!PIN_POWER!
size_t processLayers(size_t aRow)
A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT!...
std::map< int, graphic_element > elements
std::string subclass
!< CLASS
bool operator()(const std::unique_ptr< GRAPHIC_ITEM > &lhs, const std::unique_ptr< GRAPHIC_ITEM > &rhs) const
COMPCLASS parseCompClass(const std::string &aCompClass)
bool loadPolygon(BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
std::string dev_label
! COMP_DEVICE_LABEL
bool orderZones(BOARD *aBoard)
Sets zone priorities based on zone BB size.
int width
! Various sections depending on type
size_t processTraces(size_t aRow)
A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!...
std::string pin_name
!< PIN_NUMBER
std::string custom_name
std::string name
! SYM_NAME
bool pin_gnd
!< PIN_NAME
int end_x
! GRAPHIC_DATA_3
SYMTYPE parseSymType(const std::string &aSymType)
bool mirror
! GRAPHIC_DATA_4
GRAPHIC_SHAPE shape
! Shape of the graphic_item
bool clockwise
! GRAPHIC_DATA_9
bool loadZones(BOARD *aBoard)
Loads sections of the database into the board.
bool positive
! LAYER_ARTWORK (either POSITIVE or NEGATIVE)
std::string padstack
! PAD_STACK
! Not actually in Fabmaster but we use for 360° arcs
int subseq_id
! RECORD_TAG[2] (RECORD_TAG is of the form "x y z")
bool loadLayers(BOARD *aBoard)
double thermal_cond
! LAYER_THERMAL_CONDUCTIVITY
int seq_id
! RECORD_TAG[1] (RECORD_TAG is of the form "x y z")
double thickness
! LAYER_THICKNESS
std::set< std::unique_ptr< TRACE >, TRACE::BY_ID > refdes
int id
! RECORD_TAG[0]
std::string pin_name
! PIN_NAME
bool loadOutline(BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
double processScaleFactor(size_t aRow)
Processes data from text vectors into internal database for further ordering.
double conductivity
! LAYER_ELECTRICAL_CONDUCTIVITY
size_t processPadStackLayers(size_t aRow)
bool pin_pwr
!< PIN_GND
A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!...
GRAPHIC_TEXT * processText(const GRAPHIC_DATA &aData, double aScale)
std::deque< single_row > rows