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_DATA
 
struct  GRAPHIC_ITEM
 
struct  GRAPHIC_LINE
 
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
}
 
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_LINEprocessLine (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_TEXTprocessText (const GRAPHIC_DATA &aData, double aScale)
 
GRAPHIC_RECTANGLEprocessRectangle (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)
 

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 49 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 278 of file import_fabmaster.h.

◆ single_row

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

Definition at line 53 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 139 of file import_fabmaster.h.

◆ GRAPHIC_SHAPE

Enumerator
GR_SHAPE_LINE 
GR_SHAPE_TEXT 
GR_SHAPE_RECTANGLE 
GR_SHAPE_ARC 
GR_SHAPE_CIRCLE 

! Not actually in Fabmaster but we use for 360° arcs

Definition at line 188 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 197 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 77 of file import_fabmaster.h.

◆ SYMTYPE

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

Definition at line 147 of file import_fabmaster.h.

Constructor & Destructor Documentation

◆ FABMASTER()

FABMASTER::FABMASTER ( )
inline

Definition at line 54 of file import_fabmaster.h.

Member Function Documentation

◆ assignLayers()

bool FABMASTER::assignLayers ( )
private

Back copper has a special id number, so assign that to the last copper layer in the stackup

Definition at line 709 of file import_fabmaster.cpp.

References B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, FABMASTER::FABMASTER_LAYER::conductive, FABMASTER::FABMASTER_LAYER::disable, Dwgs_User, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, FABMASTER::FABMASTER_LAYER::layerid, layers, FABMASTER::FABMASTER_LAYER::name, and UNSELECTED_LAYER.

Referenced by Process().

◆ checkpoint()

◆ 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 some do not

Definition at line 184 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 296 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 318 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 1969 of file import_fabmaster.cpp.

References _, BOARD::Add(), FOOTPRINT::Add(), SHAPE_POLY_SET::AddHole(), 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(), FlipLayer(), FlipLayerMask(), SHAPE_POLY_SET::Fracture(), SHAPE_ARC::GetArcMid(), PCB_SHAPE::GetCenter(), BOARD::GetDesignSettings(), BOARD::GetFileName(), BOARD_ITEM::GetLayer(), 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, FABMASTER::GRAPHIC_TEXT::height, SHAPE_POLY_SET::Hole(), IsPcbLayer(), FABMASTER::GRAPHIC_TEXT::ital, m_filename, SHAPE_POLY_SET::Mirror(), SHAPE_POLY_SET::Move(), NETINFO_LIST::NetsByName(), SHAPE_POLY_SET::NewOutline(), FABMASTER::GRAPHIC_TEXT::orient, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG, 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(), EDA_SHAPE::SetArcGeometry(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), FOOTPRINT::SetFPID(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), BOARD_ITEM::SetLayer(), PCB_SHAPE::SetLayer(), FOOTPRINT::SetOrientationDegrees(), FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextHeight(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetTextWidth(), FOOTPRINT::SetValue(), EDA_TEXT::SetVisible(), EDA_SHAPE::SetWidth(), PAD::SMDMask(), FABMASTER::GRAPHIC_ITEM::start_x, FABMASTER::GRAPHIC_ITEM::start_y, FABMASTER::GRAPHIC_TEXT::text, FABMASTER::GRAPHIC_TEXT::thickness, PAD::UnplatedHoleMask(), FOOTPRINT::Value(), SHAPE_POLY_SET::VertexCount(), and FABMASTER::GRAPHIC_ITEM::width.

Referenced by LoadBoard().

◆ loadGraphics()

bool FABMASTER::loadGraphics ( BOARD aBoard)
private

Zero-width segments/arcs are polygon outlines

Definition at line 2946 of file import_fabmaster.cpp.

References BOARD::Add(), B_SilkS, board_graphics, FABMASTER::GRAPHIC_ARC::center_x, FABMASTER::GRAPHIC_ARC::center_y, checkpoint(), Cmts_User, SHAPE_POLY_SET::COutline(), 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_SilkS, SHAPE_POLY_SET::Fracture(), SHAPE_ARC::GetArcMid(), getLayer(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), GR_SHAPE_ARC, GR_SHAPE_CIRCLE, GR_SHAPE_LINE, GR_SHAPE_RECTANGLE, GR_SHAPE_TEXT, FABMASTER::GRAPHIC_TEXT::height, IsPcbLayer(), FABMASTER::GRAPHIC_TEXT::ital, loadShapePolySet(), FABMASTER::GRAPHIC_TEXT::orient, SHAPE_POLY_SET::OutlineCount(), SHAPE_POLY_SET::PM_FAST, SHAPE_LINE_CHAIN::PointCount(), FABMASTER::GRAPHIC_ARC::result, EDA_SHAPE::SetArcGeometry(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), BOARD_ITEM::SetLayer(), PCB_SHAPE::SetLayer(), EDA_SHAPE::SetPolyShape(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextHeight(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetTextWidth(), EDA_SHAPE::SetWidth(), FABMASTER::GRAPHIC_ITEM::start_x, FABMASTER::GRAPHIC_ITEM::start_y, FABMASTER::GRAPHIC_TEXT::text, FABMASTER::GRAPHIC_TEXT::thickness, and FABMASTER::GRAPHIC_ITEM::width.

Referenced by LoadBoard().

◆ loadLayers()

bool FABMASTER::loadLayers ( BOARD aBoard)
private

The basic layers that get enabled for normal boards

Definition at line 2431 of file import_fabmaster.cpp.

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

Referenced by LoadBoard().

◆ loadNets()

bool FABMASTER::loadNets ( BOARD aBoard)
private

Definition at line 2508 of file import_fabmaster.cpp.

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

Referenced by LoadBoard().

◆ loadOutline()

◆ 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 1860 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 3076 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 1530 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()

◆ processCustomPads()

size_t FABMASTER::processCustomPads ( size_t  aRow)
private

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!

emplace may fail here, in which case, it returns the correct position to use for the existing map

Definition at line 874 of file import_fabmaster.cpp.

References _, getColFromName(), FABMASTER::GRAPHIC_DATA::graphic_data1, FABMASTER::GRAPHIC_DATA::graphic_data2, FABMASTER::GRAPHIC_DATA::graphic_data3, FABMASTER::GRAPHIC_DATA::graphic_data4, FABMASTER::GRAPHIC_DATA::graphic_data5, FABMASTER::GRAPHIC_DATA::graphic_data6, FABMASTER::GRAPHIC_DATA::graphic_data7, FABMASTER::GRAPHIC_DATA::graphic_data8, FABMASTER::GRAPHIC_DATA::graphic_data9, FABMASTER::GRAPHIC_DATA::graphic_dataname, FABMASTER::GRAPHIC_DATA::graphic_datanum, name, pad_shapes, processGraphic(), processScaleFactor(), and rows.

Referenced by Process().

◆ 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 1546 of file import_fabmaster.cpp.

References _, components, getColFromName(), KiROUND(), parseCompClass(), parseSymType(), processScaleFactor(), readDouble(), 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 1146 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(), processLine(), processRectangle(), 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 799 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

◆ processPadStackLayers()

size_t FABMASTER::processPadStackLayers ( size_t  aRow)
private

If the layer ids have not yet been assigned

Definition at line 329 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

This is to account for broken fabmaster outputs where circle drill hits don't actually get the drill hit value.

All remaining technical layers are not handled

Definition at line 407 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 1631 of file import_fabmaster.cpp.

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

Referenced by Process().

◆ 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 257 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

◆ 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 1322 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 101 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 79 of file import_fabmaster.cpp.

Referenced by processArc(), processFootprints(), processLine(), processPadStacks(), processPins(), processRectangle(), processText(), and processVias().

◆ readInt()

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

Definition at line 90 of file import_fabmaster.cpp.

Referenced by processPadStackLayers().

Member Data Documentation

◆ board_graphics

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

Definition at line 399 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 400 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 476 of file import_fabmaster.h.

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

◆ has_comps

bool FABMASTER::has_comps
private

Definition at line 96 of file import_fabmaster.h.

◆ has_graphic

bool FABMASTER::has_graphic
private

Definition at line 97 of file import_fabmaster.h.

◆ has_nets

bool FABMASTER::has_nets
private

Definition at line 98 of file import_fabmaster.h.

◆ has_pads

bool FABMASTER::has_pads
private

Definition at line 95 of file import_fabmaster.h.

◆ has_pins

bool FABMASTER::has_pins
private

Definition at line 99 of file import_fabmaster.h.

◆ layer_map

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

Definition at line 505 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 587 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ m_filename

wxFileName FABMASTER::m_filename
private

Definition at line 75 of file import_fabmaster.h.

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

◆ m_lastProgressCount

unsigned FABMASTER::m_lastProgressCount
private

Definition at line 588 of file import_fabmaster.h.

Referenced by checkpoint().

◆ m_progressReporter

PROGRESS_REPORTER* FABMASTER::m_progressReporter
private

optional; may be nullptr

Definition at line 586 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ m_totalCount

unsigned FABMASTER::m_totalCount
private

for progress reporting

Definition at line 589 of file import_fabmaster.h.

Referenced by checkpoint(), and LoadBoard().

◆ netnames

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

Definition at line 179 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 331 of file import_fabmaster.h.

Referenced by loadFootprints(), and processCustomPads().

◆ pads

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

Definition at line 137 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 178 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 503 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 441 of file import_fabmaster.h.

◆ refdes

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

Definition at line 443 of file import_fabmaster.h.

Referenced by loadFootprints(), and processTraces().

◆ rows

◆ symbols

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

Definition at line 374 of file import_fabmaster.h.

◆ traces

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

Definition at line 437 of file import_fabmaster.h.

Referenced by LoadBoard(), and processTraces().

◆ vias

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

Definition at line 414 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 439 of file import_fabmaster.h.

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


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