KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FABMASTER Class Reference

#include <import_fabmaster.h>

Classes

struct  CLASS
 
struct  COMPONENT
 
struct  FABMASTER_LAYER
 A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT !LAYER_ELECTRICAL_CONDUCTIVITY!LAYER_MATERIAL!LAYER_SHIELD_LAYER!LAYER_THERMAL_CONDUCTIVITY!LAYER_THICKNESS! More...
 
struct  FABMASTER_PAD_SHAPE
 A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1! GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7! GRAPHIC_DATA_8!GRAPHIC_DATA_9!PAD_STACK_NAME!REFDES!PIN_NUMBER! More...
 
struct  FM_PAD
 
struct  FM_VIA
 
struct  GEOM_GRAPHIC
 
struct  GRAPHIC_ARC
 
struct  GRAPHIC_CROSS
 
struct  GRAPHIC_DATA
 
struct  GRAPHIC_ITEM
 
struct  GRAPHIC_LINE
 
struct  GRAPHIC_OBLONG
 
struct  GRAPHIC_POLYGON
 
struct  GRAPHIC_RECTANGLE
 
struct  GRAPHIC_TEXT
 
struct  NETNAME
 
struct  PIN
 
struct  SYMBOL
 
struct  TRACE
 

Public Types

using single_row = std::vector< std::string >
 

Public Member Functions

 FABMASTER ()
 
bool Read (const std::string &aFile)
 
bool Process ()
 
bool LoadBoard (BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter)
 

Private Types

enum  section_type : int {
  UNKNOWN_EXTRACT , EXTRACT_PADSTACKS , EXTRACT_PAD_SHAPES , EXTRACT_FULL_LAYERS ,
  EXTRACT_VIAS , FABMASTER_EXTRACT_PINS , EXTRACT_PINS , EXTRACT_TRACES ,
  EXTRACT_GRAPHICS , EXTRACT_BASIC_LAYERS , EXTRACT_NETS , EXTRACT_REFDES
}
 
enum  COMPCLASS { COMPCLASS_NONE , COMPCLASS_IO , COMPCLASS_IC , COMPCLASS_DISCRETE }
 
enum  SYMTYPE {
  SYMTYPE_NONE , SYMTYPE_PACKAGE , SYMTYPE_MECH , SYMTYPE_FORMAT ,
  SYMTYPE_DRAFTING
}
 
enum  GRAPHIC_SHAPE {
  GR_SHAPE_LINE , GR_SHAPE_TEXT , GR_SHAPE_RECTANGLE , GR_SHAPE_ARC ,
  GR_SHAPE_CIRCLE , GR_SHAPE_OBLONG , GR_SHAPE_CROSS , GR_SHAPE_POLYGON
}
 
enum  GRAPHIC_TYPE {
  GR_TYPE_NONE , GR_TYPE_CONNECT , GR_TYPE_NOTCONNECT , GR_TYPE_SHAPE ,
  GR_TYPE_POLYGON , GR_TYPE_VOID
}
 
using graphic_element = std::set< std::unique_ptr< GRAPHIC_ITEM >, GRAPHIC_ITEM::SEQ_CMP >
 

Private Member Functions

section_type detectType (size_t aOffset)
 
void checkpoint ()
 
int execute_recordbuffer (int filetype)
 
int getColFromName (size_t aRow, const std::string &aStr)
 
SYMTYPE parseSymType (const std::string &aSymType)
 
COMPCLASS parseCompClass (const std::string &aCompClass)
 
double processScaleFactor (size_t aRow)
 Processes data from text vectors into internal database for further ordering.
 
size_t processPadStacks (size_t aRow)
 A!PADNAME!RECNUMBER!LAYER!FIXFLAG!VIAFLAG!PADSHAPE1!PADWIDTH!PADHGHT! PADXOFF!PADYOFF!PADFLASH!PADSHAPENAME!TRELSHAPE1!TRELWIDTH!TRELHGHT! TRELXOFF!TRELYOFF!TRELFLASH!TRELSHAPENAME!APADSHAPE1!APADWIDTH!APADHGHT! APADXOFF!APADYOFF!APADFLASH!APADSHAPENAME!
 
size_t processCustomPads (size_t aRow)
 A!SUBCLASS!PAD_SHAPE_NAME!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1! GRAPHIC_DATA_2!GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7! GRAPHIC_DATA_8!GRAPHIC_DATA_9!PAD_STACK_NAME!REFDES!PIN_NUMBER!
 
size_t processGeometry (size_t aRow)
 A!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2!GRAPHIC_DATA_3! GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8!GRAPHIC_DATA_9! SUBCLASS!SYM_NAME!REFDES!
 
size_t processVias (size_t aRow)
 A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!
 
size_t processTraces (size_t aRow)
 A!CLASS!SUBCLASS!GRAPHIC_DATA_NAME!GRAPHIC_DATA_NUMBER!RECORD_TAG!GRAPHIC_DATA_1!GRAPHIC_DATA_2! GRAPHIC_DATA_3!GRAPHIC_DATA_4!GRAPHIC_DATA_5!GRAPHIC_DATA_6!GRAPHIC_DATA_7!GRAPHIC_DATA_8! GRAPHIC_DATA_9!NET_NAME!
 
size_t processFootprints (size_t aRow)
 A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!SYM_TYPE! SYM_NAME!SYM_MIRROR!SYM_ROTATE!SYM_X!SYM_Y!COMP_VALUE!COMP_TOL!COMP_VOLTAGE!
 
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! LAYER_ELECTRICAL_CONDUCTIVITY!LAYER_MATERIAL!LAYER_SHIELD_LAYER!LAYER_THERMAL_CONDUCTIVITY! LAYER_THICKNESS!
 
size_t processSimpleLayers (size_t aRow)
 
size_t processPadStackLayers (size_t aRow)
 
size_t processSymbols (size_t aRow)
 
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! TEST_POINT!
 
GRAPHIC_ITEMprocessGraphic (const GRAPHIC_DATA &aData, double aScale)
 Specialty functions for processing graphical data rows into the internal database.
 
GRAPHIC_ARCprocessArc (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_ARCprocessCircle (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_LINEprocessLine (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_TEXTprocessText (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_RECTANGLEprocessRectangle (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_RECTANGLEprocessFigRectangle (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_RECTANGLEprocessSquare (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_OBLONGprocessOblong (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_CROSSprocessCross (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_POLYGONprocessPolygon (const GRAPHIC_DATA &aData, double aScale)
 
PCB_LAYER_ID getLayer (const std::string &aLayerName)
 
bool assignLayers ()
 
double readDouble (const std::string &aStr) const
 Reads the double/integer value from a std string independent of the user locale.
 
int readInt (const std::string &aStr) const
 
bool orderZones (BOARD *aBoard)
 Sets zone priorities based on zone BB size.
 
bool loadZones (BOARD *aBoard)
 Loads sections of the database into the board.
 
bool loadOutline (BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
 
bool loadNets (BOARD *aBoard)
 
bool loadLayers (BOARD *aBoard)
 
bool loadGraphics (BOARD *aBoard)
 
bool loadVias (BOARD *aBoard)
 
bool loadEtch (BOARD *aBoard, const std::unique_ptr< TRACE > &aLine)
 
bool loadZone (BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
 
bool loadPolygon (BOARD *aBoard, const std::unique_ptr< FABMASTER::TRACE > &aLine)
 
bool loadFootprints (BOARD *aBoard)
 
SHAPE_POLY_SET loadShapePolySet (const graphic_element &aLine)
 

Static Private Member Functions

static bool traceIsOpen (const FABMASTER::TRACE &aLine)
 
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.
 
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.
 

Private Attributes

wxFileName m_filename
 
std::deque< single_rowrows
 
bool has_pads
 
bool has_comps
 
bool has_graphic
 
bool has_nets
 
bool has_pins
 
std::unordered_map< std::string, FM_PADpads
 
std::map< std::pair< std::string, std::string >, NETNAMEpin_nets
 
std::set< std::string > netnames
 
std::map< std::string, FABMASTER_LAYERlayers
 
std::unordered_map< std::string, FABMASTER_PAD_SHAPEpad_shapes
 
std::unordered_map< std::string, SYMBOLsymbols
 
std::vector< GEOM_GRAPHICboard_graphics
 
std::map< std::string, std::map< int, GEOM_GRAPHIC > > comp_graphics
 
std::vector< std::unique_ptr< FM_VIA > > vias
 
std::set< std::unique_ptr< TRACE >, TRACE::BY_IDtraces
 
std::set< std::unique_ptr< TRACE >, TRACE::BY_IDzones
 
std::set< std::unique_ptr< TRACE >, TRACE::BY_IDpolygons
 
std::set< std::unique_ptr< TRACE >, TRACE::BY_IDrefdes
 
std::map< std::string, std::vector< std::unique_ptr< COMPONENT > > > components
 
std::map< std::string, std::set< std::unique_ptr< PIN >, PIN::BY_NUM > > pins
 
std::map< std::string, PCB_LAYER_IDlayer_map
 
PROGRESS_REPORTERm_progressReporter
 optional; may be nullptr
 
unsigned m_doneCount
 
unsigned m_lastProgressCount
 
unsigned m_totalCount
 for progress reporting
 

Detailed Description

Definition at line 51 of file import_fabmaster.h.

Member Typedef Documentation

◆ graphic_element

using FABMASTER::graphic_element = std::set<std::unique_ptr<GRAPHIC_ITEM>, GRAPHIC_ITEM::SEQ_CMP>
private

Definition at line 305 of file import_fabmaster.h.

◆ single_row

using FABMASTER::single_row = std::vector<std::string>

Definition at line 55 of file import_fabmaster.h.

Member Enumeration Documentation

◆ COMPCLASS

enum FABMASTER::COMPCLASS
private
Enumerator
COMPCLASS_NONE 
COMPCLASS_IO 
COMPCLASS_IC 
COMPCLASS_DISCRETE 

Definition at line 141 of file import_fabmaster.h.

◆ GRAPHIC_SHAPE

Enumerator
GR_SHAPE_LINE 
GR_SHAPE_TEXT 
GR_SHAPE_RECTANGLE 
GR_SHAPE_ARC 
GR_SHAPE_CIRCLE 
GR_SHAPE_OBLONG 

!< Actually 360° arcs (for both arcs where start==end and real circles)

GR_SHAPE_CROSS 

!< X/Y oblongs

GR_SHAPE_POLYGON 

Definition at line 190 of file import_fabmaster.h.

◆ GRAPHIC_TYPE

Enumerator
GR_TYPE_NONE 
GR_TYPE_CONNECT 
GR_TYPE_NOTCONNECT 
GR_TYPE_SHAPE 
GR_TYPE_POLYGON 
GR_TYPE_VOID 

Definition at line 202 of file import_fabmaster.h.

◆ section_type

enum FABMASTER::section_type : int
private
Enumerator
UNKNOWN_EXTRACT 
EXTRACT_PADSTACKS 
EXTRACT_PAD_SHAPES 
EXTRACT_FULL_LAYERS 
EXTRACT_VIAS 
FABMASTER_EXTRACT_PINS 
EXTRACT_PINS 
EXTRACT_TRACES 
EXTRACT_GRAPHICS 
EXTRACT_BASIC_LAYERS 
EXTRACT_NETS 
EXTRACT_REFDES 

Definition at line 79 of file import_fabmaster.h.

◆ SYMTYPE

enum FABMASTER::SYMTYPE
private
Enumerator
SYMTYPE_NONE 
SYMTYPE_PACKAGE 
SYMTYPE_MECH 
SYMTYPE_FORMAT 
SYMTYPE_DRAFTING 

Definition at line 149 of file import_fabmaster.h.

Constructor & Destructor Documentation

◆ FABMASTER()

FABMASTER::FABMASTER ( )
inline

Definition at line 56 of file import_fabmaster.h.

Member Function Documentation

◆ assignLayers()

◆ checkpoint()

◆ createBoardItems()

std::vector< std::unique_ptr< BOARD_ITEM > > FABMASTER::createBoardItems ( BOARD aBoard,
PCB_LAYER_ID  aLayer,
FABMASTER::GRAPHIC_ITEM aGraphic 
)
staticprivate

◆ detectType()

FABMASTER::section_type FABMASTER::detectType ( size_t  aOffset)
private

We strip the underscores from all column names as some export variants use them and

Definition at line 201 of file import_fabmaster.cpp.

References _, alg::delete_if(), EXTRACT_BASIC_LAYERS, EXTRACT_FULL_LAYERS, EXTRACT_GRAPHICS, EXTRACT_NETS, EXTRACT_PAD_SHAPES, EXTRACT_PADSTACKS, EXTRACT_PINS, EXTRACT_REFDES, EXTRACT_TRACES, EXTRACT_VIAS, FABMASTER_EXTRACT_PINS, rows, and UNKNOWN_EXTRACT.

Referenced by Process().

◆ execute_recordbuffer()

int FABMASTER::execute_recordbuffer ( int  filetype)
private

◆ getColFromName()

int FABMASTER::getColFromName ( size_t  aRow,
const std::string &  aStr 
)
private

Some Fabmaster headers include the underscores while others do not so we strip them uniformly before comparing

Definition at line 317 of file import_fabmaster.cpp.

References _, alg::delete_if(), rows, and THROW_IO_ERROR.

Referenced by processCustomPads(), processFootprints(), processGeometry(), processLayers(), processNets(), processPadStackLayers(), processPadStacks(), processPins(), processSimpleLayers(), processTraces(), and processVias().

◆ getLayer()

PCB_LAYER_ID FABMASTER::getLayer ( const std::string &  aLayerName)
private

Definition at line 339 of file import_fabmaster.cpp.

References layers, and UNDEFINED_LAYER.

Referenced by loadEtch(), loadFootprints(), loadGraphics(), loadPolygon(), loadZone(), and loadZones().

◆ LoadBoard()

◆ loadEtch()

◆ loadFootprints()

bool FABMASTER::loadFootprints ( BOARD aBoard)
private

Always set the module to the top and flip later if needed When flipping later, we get the full coordinate transform for free

Definition at line 2342 of file import_fabmaster.cpp.

References _, BOARD::Add(), FOOTPRINT::Add(), SHAPE_POLY_SET::AddHole(), PADSTACK::ALL_LAYERS, SHAPE_LINE_CHAIN::Append(), SHAPE_POLY_SET::Append(), B_Cu, B_SilkS, FABMASTER::GRAPHIC_ARC::center_x, FABMASTER::GRAPHIC_ARC::center_y, checkpoint(), comp_graphics, components, DEGREES_T, Dwgs_User, FABMASTER::GRAPHIC_LINE::end_x, FABMASTER::GRAPHIC_ARC::end_x, FABMASTER::GRAPHIC_RECTANGLE::end_x, FABMASTER::GRAPHIC_LINE::end_y, FABMASTER::GRAPHIC_ARC::end_y, FABMASTER::GRAPHIC_RECTANGLE::end_y, F_Cu, F_Fab, F_SilkS, FOOTPRINT::Flip(), PCB_SHAPE::Flip(), Flip(), BOARD::FlipLayer(), SHAPE_POLY_SET::Fracture(), SHAPE_ARC::GetArcMid(), SHAPE_ARC::GetCenter(), PCB_SHAPE::GetCenter(), BOARD::GetDesignSettings(), BOARD::GetFileName(), PCB_SHAPE::GetLayer(), getLayer(), BOARD::GetNetInfo(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), FOOTPRINT::GetPosition(), GR_SHAPE_ARC, GR_SHAPE_CIRCLE, GR_SHAPE_LINE, GR_SHAPE_RECTANGLE, GR_SHAPE_TEXT, SHAPE_POLY_SET::Hole(), IsBackLayer(), IsPcbLayer(), FABMASTER::GRAPHIC_ITEM::layer, m_filename, PCB_SHAPE::Mirror(), SHAPE_ARC::Mirror(), SHAPE_POLY_SET::Mirror(), SHAPE_POLY_SET::Move(), NETINFO_LIST::NetsByName(), SHAPE_POLY_SET::NewOutline(), EDA_ANGLE::Normalized(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, pad_shapes, pads, LIB_ID::Parse(), pin, pin_nets, pins, SHAPE_POLY_SET::PM_FAST, SHAPE_LINE_CHAIN::PointCount(), SHAPE_POLY_SET::Polygon(), PAD::PTHMask(), refdes, FOOTPRINT::Reference(), ReplaceIllegalFileNameChars(), FABMASTER::GRAPHIC_ARC::result, SHAPE_POLY_SET::Rotate(), FABMASTER::GRAPHIC_TEXT::rotation, EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), FOOTPRINT::SetFPID(), BOARD_ITEM::SetLayer(), PCB_SHAPE::SetLayer(), FOOTPRINT::SetOrientationDegrees(), FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), EDA_TEXT::SetTextAngle(), setupText(), FOOTPRINT::SetValue(), EDA_TEXT::SetVisible(), EDA_SHAPE::SetWidth(), PAD::SMDMask(), FABMASTER::GRAPHIC_ITEM::start_x, FABMASTER::GRAPHIC_ITEM::start_y, FABMASTER::GRAPHIC_TEXT::text, traceFabmaster, PAD::UnplatedHoleMask(), FOOTPRINT::Value(), SHAPE_POLY_SET::VertexCount(), and FABMASTER::GRAPHIC_ITEM::width.

Referenced by LoadBoard().

◆ loadGraphics()

◆ loadLayers()

bool FABMASTER::loadLayers ( BOARD aBoard)
private

The basic layers that get enabled for normal boards

Definition at line 2834 of file import_fabmaster.cpp.

References LSET::AllTechMask(), checkpoint(), layers, PCBNEW_LAYER_ID_START, BASE_SET::set(), BOARD::SetEnabledLayers(), BOARD::SetLayerName(), and LSET::UserMask().

Referenced by LoadBoard().

◆ loadNets()

bool FABMASTER::loadNets ( BOARD aBoard)
private

Definition at line 2911 of file import_fabmaster.cpp.

References BOARD::Add(), checkpoint(), and netnames.

Referenced by LoadBoard().

◆ loadOutline()

bool FABMASTER::loadOutline ( BOARD aBoard,
const std::unique_ptr< TRACE > &  aLine 
)
private

Definition at line 3507 of file import_fabmaster.cpp.

References BOARD::Add(), Cmts_User, createBoardItems(), Dwgs_User, and Edge_Cuts.

Referenced by LoadBoard(), and loadZones().

◆ loadPolygon()

◆ loadShapePolySet()

◆ loadVias()

◆ loadZone()

◆ loadZones()

bool FABMASTER::loadZones ( BOARD aBoard)
private

Loads sections of the database into the board.

Parameters
aBoard
Returns
True if successful

Zones in FABMASTER come in two varieties:

  • Outlines with no net code attached
  • Filled areas with net code attached

In pcbnew, we want the outline with net code attached. To determine which outline should have which netcode, we look for overlapping areas. Each unnetted zone outline will be assigned the netcode that with the most hits on the edge of their outline.

Remove the filled areas in favor of the outlines

Zone1 will be the destination zone for the new net

We're looking for the netcode with the most overlaps to the un-netted zone

The overlap between outline1 and outline2 isn't perfect, so look for overlaps in both directions

Definition at line 2192 of file import_fabmaster.cpp.

References SHAPE_LINE_CHAIN::BBox(), checkpoint(), SHAPE_LINE_CHAIN::CPoints(), getLayer(), NETINFO_LIST::GetNetCount(), BOARD::GetNetInfo(), BOX2< Vec >::Intersects(), IsCopperLayer(), loadOutline(), loadPolygon(), loadZone(), SHAPE_LINE_CHAIN_BASE::PointOnEdge(), BOARD::Remove(), BOARD::Zones(), and zones.

Referenced by LoadBoard().

◆ orderZones()

bool FABMASTER::orderZones ( BOARD aBoard)
private

Sets zone priorities based on zone BB size.

Larger bounding boxes get smaller priorities so smaller zones can knock out areas where they overlap.

Parameters
aBoard
Returns
True if successful

Rule areas do not have priorities

Definition at line 3586 of file import_fabmaster.cpp.

References UNDEFINED_LAYER, and BOARD::Zones().

Referenced by LoadBoard().

◆ parseCompClass()

FABMASTER::COMPCLASS FABMASTER::parseCompClass ( const std::string &  aCompClass)
private

Definition at line 1849 of file import_fabmaster.cpp.

References COMPCLASS_DISCRETE, COMPCLASS_IC, COMPCLASS_IO, and COMPCLASS_NONE.

Referenced by processFootprints().

◆ parseSymType()

FABMASTER::SYMTYPE FABMASTER::parseSymType ( const std::string &  aSymType)
private

◆ Process()

◆ processArc()

◆ processCircle()

◆ processCross()

◆ processCustomPads()

size_t FABMASTER::processCustomPads ( size_t  aRow)
private

◆ processFigRectangle()

◆ processFootprints()

size_t FABMASTER::processFootprints ( size_t  aRow)
private

A!REFDES!COMP_CLASS!COMP_PART_NUMBER!COMP_HEIGHT!COMP_DEVICE_LABEL!COMP_INSERTION_CODE!SYM_TYPE! SYM_NAME!SYM_MIRROR!SYM_ROTATE!SYM_X!SYM_Y!COMP_VALUE!COMP_TOL!COMP_VOLTAGE!

Definition at line 1866 of file import_fabmaster.cpp.

References _, components, empty(), getColFromName(), KiROUND(), parseCompClass(), parseSymType(), processScaleFactor(), readDouble(), refdes, and rows.

Referenced by Process().

◆ processGeometry()

◆ processGraphic()

FABMASTER::GRAPHIC_ITEM * FABMASTER::processGraphic ( const GRAPHIC_DATA aData,
double  aScale 
)
private

Specialty functions for processing graphical data rows into the internal database.

Parameters
aDataLoaded data vector
aScalePrior loaded scale factor
Returns
Pointer to newly allocated graphical item or nullptr on failure

Definition at line 1438 of file import_fabmaster.cpp.

References GR_TYPE_CONNECT, GR_TYPE_NONE, GR_TYPE_NOTCONNECT, FABMASTER::GRAPHIC_DATA::graphic_data10, FABMASTER::GRAPHIC_DATA::graphic_dataname, processArc(), processCircle(), processCross(), processFigRectangle(), processLine(), processOblong(), processPolygon(), processRectangle(), processSquare(), processText(), and FABMASTER::GRAPHIC_ITEM::type.

Referenced by processCustomPads(), processGeometry(), and processTraces().

◆ processLayers()

size_t FABMASTER::processLayers ( size_t  aRow)
private

A!LAYER_SORT!LAYER_SUBCLASS!LAYER_ARTWORK!LAYER_USE!LAYER_CONDUCTOR!LAYER_DIELECTRIC_CONSTANT! LAYER_ELECTRICAL_CONDUCTIVITY!LAYER_MATERIAL!LAYER_SHIELD_LAYER!LAYER_THERMAL_CONDUCTIVITY! LAYER_THICKNESS!

Definition at line 856 of file import_fabmaster.cpp.

References _, getColFromName(), layers, FABMASTER::FABMASTER_LAYER::name, FABMASTER::FABMASTER_LAYER::positive, processScaleFactor(), and rows.

Referenced by Process().

◆ processLine()

◆ processNets()

size_t FABMASTER::processNets ( size_t  aRow)
private

◆ processOblong()

◆ processPadStackLayers()

size_t FABMASTER::processPadStackLayers ( size_t  aRow)
private

If the layer ids have not yet been assigned

Definition at line 350 of file import_fabmaster.cpp.

References _, FABMASTER::FABMASTER_LAYER::conductive, getColFromName(), FABMASTER::FABMASTER_LAYER::id, layers, FABMASTER::FABMASTER_LAYER::name, readInt(), and rows.

Referenced by Process().

◆ processPadStacks()

size_t FABMASTER::processPadStacks ( size_t  aRow)
private

A!PADNAME!RECNUMBER!LAYER!FIXFLAG!VIAFLAG!PADSHAPE1!PADWIDTH!PADHGHT! PADXOFF!PADYOFF!PADFLASH!PADSHAPENAME!TRELSHAPE1!TRELWIDTH!TRELHGHT! TRELXOFF!TRELYOFF!TRELFLASH!TRELSHAPENAME!APADSHAPE1!APADWIDTH!APADHGHT! APADXOFF!APADYOFF!APADFLASH!APADSHAPENAME!

Handle the drill layer

All remaining technical layers are not handled

Definition at line 428 of file import_fabmaster.cpp.

References _, B_Cu, F_Cu, getColFromName(), KiROUND(), layers, pad, pads, processScaleFactor(), readDouble(), and rows.

Referenced by Process().

◆ processPins()

size_t FABMASTER::processPins ( size_t  aRow)
private

A!SYM_NAME!SYM_MIRROR!PIN_NAME!PIN_NUMBER!PIN_X!PIN_Y!PAD_STACK_NAME!REFDES!PIN_ROTATION! TEST_POINT!

Definition at line 1962 of file import_fabmaster.cpp.

References _, getColFromName(), KiROUND(), pin, pins, processScaleFactor(), readDouble(), and rows.

Referenced by Process().

◆ processPolygon()

◆ processRectangle()

◆ processScaleFactor()

double FABMASTER::processScaleFactor ( size_t  aRow)
private

Processes data from text vectors into internal database for further ordering.

Parameters
aRowvector offset being processed
Returns
Count of the number of rows processed, return -1 on error

Definition at line 277 of file import_fabmaster.cpp.

References _, EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IU_PER_MM, pcbIUScale, and rows.

Referenced by processCustomPads(), processFootprints(), processGeometry(), processLayers(), processNets(), processPadStacks(), processPins(), processSimpleLayers(), processTraces(), and processVias().

◆ processSimpleLayers()

size_t FABMASTER::processSimpleLayers ( size_t  aRow)
private

◆ processSquare()

FABMASTER::GRAPHIC_RECTANGLE * FABMASTER::processSquare ( const GRAPHIC_DATA aData,
double  aScale 
)
private

Definition at line 1253 of file import_fabmaster.cpp.

References processFigRectangle().

Referenced by processGraphic().

◆ processSymbols()

size_t FABMASTER::processSymbols ( size_t  aRow)
private

◆ processText()

◆ processTraces()

size_t FABMASTER::processTraces ( size_t  aRow)
private

◆ processVias()

size_t FABMASTER::processVias ( size_t  aRow)
private

A!VIA_X!VIA_Y!PAD_STACK_NAME!NET_NAME!TEST_POINT!

Definition at line 1628 of file import_fabmaster.cpp.

References _, getColFromName(), KiROUND(), processScaleFactor(), readDouble(), rows, via, and vias.

Referenced by Process().

◆ Read()

bool FABMASTER::Read ( const std::string &  aFile)

Rows end with "!" and we don't want to keep the empty cell

Definition at line 118 of file import_fabmaster.cpp.

References m_filename, and rows.

Referenced by PCB_IO_FABMASTER::LoadBoard().

◆ readDouble()

double FABMASTER::readDouble ( const std::string &  aStr) const
private

Reads the double/integer value from a std string independent of the user locale.

Parameters
aStrstring to generate value from
Returns
0 if value cannot be created

Definition at line 90 of file import_fabmaster.cpp.

Referenced by processArc(), processCircle(), processCross(), processFigRectangle(), processFootprints(), processLine(), processOblong(), processPadStacks(), processPins(), processPolygon(), processRectangle(), processText(), and processVias().

◆ readInt()

int FABMASTER::readInt ( const std::string &  aStr) const
private

Definition at line 104 of file import_fabmaster.cpp.

Referenced by processPadStackLayers().

◆ setupText()

◆ traceIsOpen()

Member Data Documentation

◆ board_graphics

std::vector<GEOM_GRAPHIC> FABMASTER::board_graphics
private

Definition at line 426 of file import_fabmaster.h.

Referenced by LoadBoard(), loadGraphics(), and processGeometry().

◆ comp_graphics

std::map<std::string, std::map<int, GEOM_GRAPHIC> > FABMASTER::comp_graphics
private

Definition at line 427 of file import_fabmaster.h.

Referenced by loadFootprints(), and processGeometry().

◆ components

std::map<std::string, std::vector<std::unique_ptr<COMPONENT> > > FABMASTER::components
private

Definition at line 503 of file import_fabmaster.h.

Referenced by LoadBoard(), loadFootprints(), and processFootprints().

◆ has_comps

bool FABMASTER::has_comps
private

Definition at line 98 of file import_fabmaster.h.

◆ has_graphic

bool FABMASTER::has_graphic
private

Definition at line 99 of file import_fabmaster.h.

◆ has_nets

bool FABMASTER::has_nets
private

Definition at line 100 of file import_fabmaster.h.

◆ has_pads

bool FABMASTER::has_pads
private

Definition at line 97 of file import_fabmaster.h.

◆ has_pins

bool FABMASTER::has_pins
private

Definition at line 101 of file import_fabmaster.h.

◆ layer_map

std::map<std::string, PCB_LAYER_ID> FABMASTER::layer_map
private

Definition at line 532 of file import_fabmaster.h.

◆ layers

std::map<std::string, FABMASTER_LAYER> FABMASTER::layers
private

◆ m_doneCount

unsigned FABMASTER::m_doneCount
private

Definition at line 635 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ m_filename

wxFileName FABMASTER::m_filename
private

Definition at line 77 of file import_fabmaster.h.

Referenced by LoadBoard(), loadFootprints(), and Read().

◆ m_lastProgressCount

unsigned FABMASTER::m_lastProgressCount
private

Definition at line 636 of file import_fabmaster.h.

Referenced by checkpoint().

◆ m_progressReporter

PROGRESS_REPORTER* FABMASTER::m_progressReporter
private

optional; may be nullptr

Definition at line 634 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ m_totalCount

unsigned FABMASTER::m_totalCount
private

for progress reporting

Definition at line 637 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ netnames

std::set<std::string> FABMASTER::netnames
private

Definition at line 181 of file import_fabmaster.h.

Referenced by LoadBoard(), loadNets(), and processNets().

◆ pad_shapes

std::unordered_map<std::string, FABMASTER_PAD_SHAPE> FABMASTER::pad_shapes
private

Definition at line 358 of file import_fabmaster.h.

Referenced by loadFootprints(), and processCustomPads().

◆ pads

std::unordered_map<std::string, FM_PAD> FABMASTER::pads
private

Definition at line 139 of file import_fabmaster.h.

Referenced by loadFootprints(), loadVias(), and processPadStacks().

◆ pin_nets

std::map<std::pair<std::string, std::string>, NETNAME> FABMASTER::pin_nets
private

Definition at line 180 of file import_fabmaster.h.

Referenced by loadFootprints(), and processNets().

◆ pins

std::map<std::string, std::set<std::unique_ptr<PIN>, PIN::BY_NUM> > FABMASTER::pins
private

Definition at line 530 of file import_fabmaster.h.

Referenced by loadFootprints(), and processPins().

◆ polygons

std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> FABMASTER::polygons
private

Definition at line 468 of file import_fabmaster.h.

◆ refdes

std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> FABMASTER::refdes
private

Definition at line 470 of file import_fabmaster.h.

Referenced by loadFootprints(), processFootprints(), and processTraces().

◆ rows

◆ symbols

std::unordered_map<std::string, SYMBOL> FABMASTER::symbols
private

Definition at line 401 of file import_fabmaster.h.

◆ traces

std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> FABMASTER::traces
private

Definition at line 464 of file import_fabmaster.h.

Referenced by LoadBoard(), and processTraces().

◆ vias

std::vector<std::unique_ptr<FM_VIA> > FABMASTER::vias
private

Definition at line 441 of file import_fabmaster.h.

Referenced by LoadBoard(), loadVias(), and processVias().

◆ zones

std::set<std::unique_ptr<TRACE>, TRACE::BY_ID> FABMASTER::zones
private

Definition at line 466 of file import_fabmaster.h.

Referenced by LoadBoard(), loadZones(), and processTraces().


The documentation for this class was generated from the following files: