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

Works with Eagle 6.x XML board files and footprints to implement the Pcbnew #PLUGIN API or a portion of it. More...

#include <pcb_io_eagle.h>

Inheritance diagram for PCB_IO_EAGLE:
PCB_IO LAYER_REMAPPABLE_PLUGIN IO_BASE

Public Types

typedef int BIU
 

Public Member Functions

const IO_BASE::IO_FILE_DESC GetBoardFileDesc () const override
 Returns board file description for the PCB_IO.
 
const IO_BASE::IO_FILE_DESC GetLibraryDesc () const override
 Get the descriptor for the library container that this IO plugin operates on.
 
bool CanReadBoard (const wxString &aFileName) const override
 Checks if this PCB_IO can read the specified board file.
 
bool CanReadLibrary (const wxString &aFileName) const override
 Checks if this IO object can read the specified library file/directory.
 
bool CanReadFootprint (const wxString &aFileName) const override
 Checks if this PCB_IO can read a footprint from specified file or directory.
 
BOARDLoadBoard (const wxString &aFileName, BOARD *aAppendToMe, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr) override
 Load information from some input file format that this PCB_IO implementation knows about into either a new BOARD or an existing one.
 
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints () override
 Return a container with the cached library footprints generated in the last call to Load.
 
void FootprintEnumerate (wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const STRING_UTF8_MAP *aProperties=nullptr) override
 Return a list of footprint names contained within the library at aLibraryPath.
 
FOOTPRINTFootprintLoad (const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const STRING_UTF8_MAP *aProperties=nullptr) override
 Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about.
 
long long GetLibraryTimestamp (const wxString &aLibraryPath) const override
 Generate a timestamp representing all the files in the library (including the library directory).
 
bool IsLibraryWritable (const wxString &aLibraryPath) override
 Return true if the library at aLibraryPath is writable.
 
 PCB_IO_EAGLE ()
 
 ~PCB_IO_EAGLE ()
 
std::map< wxString, PCB_LAYER_IDDefaultLayerMappingCallback (const std::vector< INPUT_LAYER_DESC > &aInputLayerDescriptionVector)
 Return the automapped layers.
 
virtual void SetQueryUserCallback (std::function< bool(wxString aTitle, int aIcon, wxString aMessage, wxString aAction)> aCallback)
 Registers a KIDIALOG callback for collecting info from the user.
 
virtual void SaveBoard (const wxString &aFileName, BOARD *aBoard, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file.
 
virtual void PrefetchLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 If possible, prefetches the specified library (e.g.
 
virtual FOOTPRINTImportFootprint (const wxString &aFootprintPath, wxString &aFootprintNameOut, const STRING_UTF8_MAP *aProperties=nullptr)
 Load a single footprint from aFootprintPath and put its name in aFootprintNameOut.
 
virtual const FOOTPRINTGetEnumeratedFootprint (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
 A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
 
virtual bool FootprintExists (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
 Check for the existence of a footprint.
 
virtual void FootprintSave (const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aFootprint to an existing library located at aLibraryPath.
 
virtual void FootprintDelete (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete aFootprintName from the library at aLibraryPath.
 
virtual void GetLibraryOptions (STRING_UTF8_MAP *aListToAppendTo) const override
 Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions.
 
const wxString & GetName () const
 Return a brief hard coded name for this IO interface.
 
virtual void SetReporter (REPORTER *aReporter)
 Set an optional reporter for warnings/errors.
 
virtual void SetProgressReporter (PROGRESS_REPORTER *aReporter)
 Set an optional progress reporter.
 
virtual const IO_FILE_DESC GetLibraryFileDesc () const
 Get the descriptor for the individual library elements that this IO plugin operates on.
 
virtual void CreateLibrary (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Create a new empty library at aLibraryPath empty.
 
virtual bool DeleteLibrary (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete an existing library and returns true, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.
 
virtual void RegisterLayerMappingCallback (LAYER_MAPPING_HANDLER aLayerMappingHandler)
 Register a different handler to be called when mapping of input layers to KiCad layers occurs.
 

Protected Attributes

BOARDm_board
 The board BOARD being worked on, no ownership here.
 
const STRING_UTF8_MAPm_props
 Properties passed via Save() or Load(), no ownership, may be NULL.
 
wxString m_name
 Name of the IO loader.
 
REPORTERm_reporter
 Reporter to log errors/warnings to, may be nullptr.
 
LAYER_MAPPING_HANDLER m_layer_mapping_handler
 Callback to get layer mapping.
 

Private Types

typedef std::vector< ELAYERELAYERS
 
typedef ELAYERS::const_iterator EITER
 

Private Member Functions

void init (const STRING_UTF8_MAP *aProperties)
 initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
 
bool checkHeader (const wxString &aFileName) const
 
void checkpoint ()
 
void clear_cu_map ()
 
int kicad_y (const ECOORD &y) const
 Convert an Eagle distance to a KiCad distance.
 
int kicad_x (const ECOORD &x) const
 
VECTOR2I kicad_fontsize (const ECOORD &d, int aTextThickness) const
 create a font size (fontz) from an eagle font size scalar and KiCad font thickness
 
void mapEagleLayersToKicad (bool aIsLibraryCache=false)
 Generate mapping between Eagle and KiCad layers.
 
PCB_LAYER_ID kicad_layer (int aLayer) const
 Convert an Eagle layer to a KiCad layer.
 
std::tuple< PCB_LAYER_ID, LSET, bool > defaultKicadLayer (int aEagleLayer, bool aIsLibraryCache=false) const
 Get the default KiCad layer corresponding to an Eagle layer of the board, a set of sensible layer mapping options and required flag.
 
const wxString & eagle_layer_name (int aLayer) const
 Get Eagle layer name by its number.
 
int eagle_layer_id (const wxString &aLayerName) const
 Get Eagle layer number by its name.
 
void setKeepoutSettingsToZone (ZONE *aZone, int aLayer) const
 
void cacheLib (const wxString &aLibraryPath)
 This PLUGIN only caches one footprint library, this determines which one.
 
int getMinimumCopperLayerCount () const
 Determines the minimum copper layer stackup count that includes all mapped layers.
 
void loadAllSections (wxXmlNode *aDocument)
 
void loadDesignRules (wxXmlNode *aDesignRules)
 
void loadLayerDefs (wxXmlNode *aLayers)
 
void loadPlain (wxXmlNode *aPlain)
 
void loadClasses (wxXmlNode *aClasses)
 
void loadSignals (wxXmlNode *aSignals)
 
void loadLibrary (wxXmlNode *aLib, const wxString *aLibName)
 Load the Eagle "library" XML element, which can occur either under a "libraries" element (if a *.brd file) or under a "drawing" element if a *.lbr file.
 
void loadLibraries (wxXmlNode *aLibs)
 
void loadElements (wxXmlNode *aElements)
 
ZONEloadPolygon (wxXmlNode *aPolyNode)
 Load a copper or keepout polygon and adds it to the board.
 
void orientFootprintAndText (FOOTPRINT *aFootprint, const EELEMENT &e, const EATTR *aNameAttr, const EATTR *aValueAttr)
 
void orientFPText (FOOTPRINT *aFootprint, const EELEMENT &e, PCB_TEXT *aFPText, const EATTR *aAttr)
 
void centerBoard ()
 move the BOARD into the center of the page
 
FOOTPRINTmakeFootprint (wxXmlNode *aPackage, const wxString &aPkgName)
 Create a FOOTPRINT from an Eagle package.
 
void packageWire (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 
void packagePad (FOOTPRINT *aFootprint, wxXmlNode *aTree)
 
void packageText (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 
void packageRectangle (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 
void packagePolygon (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 
void packageCircle (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 
void packageHole (FOOTPRINT *aFootprint, wxXmlNode *aTree, bool aCenter) const
 
void packageSMD (FOOTPRINT *aFootprint, wxXmlNode *aTree) const
 Handles common pad properties.
 
void transferPad (const EPAD_COMMON &aEaglePad, PAD *aPad) const
 Deletes the footprint templates list.
 
void deleteTemplates ()
 

Static Private Member Functions

static wxDateTime getModificationTime (const wxString &aPath)
 get a file's or dir's modification time.
 

Private Attributes

int m_cu_map [17]
 map eagle to KiCad, cu layers only.
 
std::map< int, ELAYERm_eagleLayers
 Eagle layer data stored by layer number.
 
std::map< wxString, int > m_eagleLayersIds
 Eagle layer ids stored by layer name.
 
std::map< wxString, PCB_LAYER_IDm_layer_map
 Map of Eagle layers to KiCad layers.
 
std::map< wxString, std::shared_ptr< NETCLASS > > m_classMap
 
wxString m_customRules
 
ERULESm_rules
 Eagle design rules.
 
XPATHm_xpath
 keeps track of what we are working on within XML document during a Load().
 
int m_hole_count
 generates unique footprint names from eagle "hole"s.
 
NET_MAP m_pads_to_nets
 net list
 
std::map< wxString, FOOTPRINT * > m_templates
 is part of a FOOTPRINT factory that operates using copy construction.
 
PROGRESS_REPORTERm_progressReporter
 optional; may be nullptr
 
unsigned m_doneCount
 
unsigned m_lastProgressCount
 
unsigned m_totalCount
 for progress reporting
 
int m_min_trace
 smallest trace we find on Load(), in BIU.
 
int m_min_hole
 smallest diameter hole we find on Load(), in BIU.
 
int m_min_via
 smallest via we find on Load(), in BIU.
 
int m_min_annulus
 smallest via annulus we find on Load(), in BIU.
 
wxString m_lib_path
 
wxDateTime m_mod_time
 

Detailed Description

Works with Eagle 6.x XML board files and footprints to implement the Pcbnew #PLUGIN API or a portion of it.

Definition at line 131 of file pcb_io_eagle.h.

Member Typedef Documentation

◆ BIU

typedef int PCB_IO_EAGLE::BIU

Definition at line 170 of file pcb_io_eagle.h.

◆ EITER

typedef ELAYERS::const_iterator PCB_IO_EAGLE::EITER
private

Definition at line 326 of file pcb_io_eagle.h.

◆ ELAYERS

typedef std::vector<ELAYER> PCB_IO_EAGLE::ELAYERS
private

Definition at line 325 of file pcb_io_eagle.h.

Constructor & Destructor Documentation

◆ PCB_IO_EAGLE()

PCB_IO_EAGLE::PCB_IO_EAGLE ( )

◆ ~PCB_IO_EAGLE()

PCB_IO_EAGLE::~PCB_IO_EAGLE ( )

Definition at line 241 of file pcb_io_eagle.cpp.

References deleteTemplates(), m_rules, and m_xpath.

Member Function Documentation

◆ cacheLib()

void PCB_IO_EAGLE::cacheLib ( const wxString &  aLibraryPath)
private

This PLUGIN only caches one footprint library, this determines which one.

Definition at line 3172 of file pcb_io_eagle.cpp.

References _, library, MapChildren(), and THROW_IO_ERROR.

◆ CanReadBoard()

bool PCB_IO_EAGLE::CanReadBoard ( const wxString &  aFileName) const
overridevirtual

Checks if this PCB_IO can read the specified board file.

If not overriden, extension check is used.

Reimplemented from PCB_IO.

Definition at line 249 of file pcb_io_eagle.cpp.

References PCB_IO::CanReadBoard(), and checkHeader().

◆ CanReadFootprint()

bool PCB_IO_EAGLE::CanReadFootprint ( const wxString &  aFileName) const
overridevirtual

Checks if this PCB_IO can read a footprint from specified file or directory.

If not overriden, extension check is used.

Reimplemented from PCB_IO.

Definition at line 267 of file pcb_io_eagle.cpp.

References CanReadLibrary().

◆ CanReadLibrary()

bool PCB_IO_EAGLE::CanReadLibrary ( const wxString &  aFileName) const
overridevirtual

Checks if this IO object can read the specified library file/directory.

If not overriden, extension check is used.

Note
This is not a check that the file system object is readable by the user, but a check that this IO object can parse the given library.

Reimplemented from IO_BASE.

Definition at line 258 of file pcb_io_eagle.cpp.

References IO_BASE::CanReadLibrary(), and checkHeader().

Referenced by CanReadFootprint().

◆ centerBoard()

void PCB_IO_EAGLE::centerBoard ( )
private

move the BOARD into the center of the page

Definition at line 3133 of file pcb_io_eagle.cpp.

References UTF8::c_str(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), and BOX2< Vec >::GetY().

Referenced by LoadBoard().

◆ checkHeader()

bool PCB_IO_EAGLE::checkHeader ( const wxString &  aFileName) const
private

Definition at line 273 of file pcb_io_eagle.cpp.

References text.

Referenced by CanReadBoard(), and CanReadLibrary().

◆ checkpoint()

◆ clear_cu_map()

void PCB_IO_EAGLE::clear_cu_map ( )
private

Definition at line 474 of file pcb_io_eagle.cpp.

References arrayDim(), and m_cu_map.

Referenced by PCB_IO_EAGLE().

◆ CreateLibrary()

void IO_BASE::CreateLibrary ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Create a new empty library at aLibraryPath empty.

It is an error to attempt to create an existing library or to attempt to create on a "read only" location.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several elements.
aPropertiesis an associative array that can be used to tell the library create function anything special, because it can take any number of additional named tuning arguments that the IO is known to support. The caller continues to own this object (IO may not delete it), and IOs should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem finding the library, or creating it.

Reimplemented in SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and PCB_IO_KICAD_SEXPR.

Definition at line 44 of file io_base.cpp.

References NOT_IMPLEMENTED.

◆ defaultKicadLayer()

std::tuple< PCB_LAYER_ID, LSET, bool > PCB_IO_EAGLE::defaultKicadLayer ( int  aEagleLayer,
bool  aIsLibraryCache = false 
) const
private

Get the default KiCad layer corresponding to an Eagle layer of the board, a set of sensible layer mapping options and required flag.

Note
The Eagle MILLING, TTEST, BTEST, and HOLES layers are set to UNDEFINED_LAYER for historical purposes. All other Eagle layers that do not directly map to KiCad layers will be set to UNDEFINED_LAYER when loading Eagle footprint libraries. This should be addressed in the future because in some cases this will cause data loss.
See also
EAGLE_LAYER and defaultKiCadLayer().
Parameters
aEagleLayeris the Eagle layer to map.
aIsLibraryCacheis a flag to indicate if the mapping is for board or footprint library cache objects.
Returns
a tuple containing the mapped layer.

Definition at line 2983 of file pcb_io_eagle.cpp.

References arrayDim(), B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, EAGLE_LAYER::BCREAM, EAGLE_LAYER::BDOCU, EAGLE_LAYER::BFINISH, EAGLE_LAYER::BGLUE, EAGLE_LAYER::BKEEPOUT, EAGLE_LAYER::BNAMES, EAGLE_LAYER::BPLACE, EAGLE_LAYER::BSTOP, EAGLE_LAYER::BTEST, EAGLE_LAYER::BVALUES, Cmts_User, EAGLE_LAYER::DIMENSION, EAGLE_LAYER::DOCUMENT, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, EAGLE_LAYER::HOLES, EAGLE_LAYER::MILLING, EAGLE_LAYER::REFERENCELC, EAGLE_LAYER::REFERENCELS, EAGLE_LAYER::TCREAM, EAGLE_LAYER::TDOCU, EAGLE_LAYER::TFINISH, EAGLE_LAYER::TGLUE, EAGLE_LAYER::TKEEPOUT, EAGLE_LAYER::TNAMES, EAGLE_LAYER::TPLACE, EAGLE_LAYER::TSTOP, EAGLE_LAYER::TTEST, EAGLE_LAYER::TVALUES, UNDEFINED_LAYER, EAGLE_LAYER::UNROUTED, UNSELECTED_LAYER, EAGLE_LAYER::USERLAYER1, and EAGLE_LAYER::USERLAYER2.

◆ DefaultLayerMappingCallback()

std::map< wxString, PCB_LAYER_ID > PCB_IO_EAGLE::DefaultLayerMappingCallback ( const std::vector< INPUT_LAYER_DESC > &  aInputLayerDescriptionVector)

Return the automapped layers.

The callback needs to have the context of the current board so it can correctly determine copper layer mapping. Thus, it is not static and is expected to be bind to an instance of PCB_IO_EAGLE.

Parameters
aInputLayerDescriptionVector
Returns
Auto-mapped layers

Definition at line 2931 of file pcb_io_eagle.cpp.

Referenced by PCB_IO_EAGLE().

◆ DeleteLibrary()

bool IO_BASE::DeleteLibrary ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete an existing library and returns true, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.

Parameters
aLibraryPathis a locator for the "library", usually a directory or file which will contain several elements.
aPropertiesis an associative array that can be used to tell the library delete implementation function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Returns
true if library deleted, false if library did not exist.
Exceptions
IO_ERRORif there is a problem deleting an existing library.

Reimplemented in SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.

Definition at line 50 of file io_base.cpp.

References NOT_IMPLEMENTED.

◆ deleteTemplates()

void PCB_IO_EAGLE::deleteTemplates ( )
private

Definition at line 2587 of file pcb_io_eagle.cpp.

References name.

Referenced by ~PCB_IO_EAGLE().

◆ eagle_layer_id()

int PCB_IO_EAGLE::eagle_layer_id ( const wxString &  aLayerName) const
private

Get Eagle layer number by its name.

Definition at line 3125 of file pcb_io_eagle.cpp.

References unknown.

◆ eagle_layer_name()

const wxString & PCB_IO_EAGLE::eagle_layer_name ( int  aLayer) const
private

Get Eagle layer name by its number.

Definition at line 3117 of file pcb_io_eagle.cpp.

References unknown.

◆ FootprintDelete()

void PCB_IO::FootprintDelete ( const wxString &  aLibraryPath,
const wxString &  aFootprintName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete aFootprintName from the library at aLibraryPath.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aFootprintNameis the name of a footprint to delete from the specified library.
aPropertiesis an associative array that can be used to tell the library delete function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem finding the footprint or the library, or deleting it.

Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.

Definition at line 164 of file pcb_io.cpp.

References NOT_IMPLEMENTED.

◆ FootprintEnumerate()

void PCB_IO_EAGLE::FootprintEnumerate ( wxArrayString &  aFootprintNames,
const wxString &  aLibraryPath,
bool  aBestEfforts,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Return a list of footprint names contained within the library at aLibraryPath.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aPropertiesis an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
aFootprintNamesis the array of available footprint names inside a library.
aBestEffortsif true, don't throw on errors, just return an empty list.
Exceptions
IO_ERRORif the library cannot be found, or footprint cannot be loaded.

Reimplemented from PCB_IO.

Definition at line 3257 of file pcb_io_eagle.cpp.

References name, THROW_IO_ERROR, and IO_ERROR::What().

◆ FootprintExists()

bool PCB_IO::FootprintExists ( const wxString &  aLibraryPath,
const wxString &  aFootprintName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Check for the existence of a footprint.

Reimplemented in PCB_IO_CADSTAR_ARCHIVE, and PCB_IO_KICAD_SEXPR.

Definition at line 140 of file pcb_io.cpp.

References PCB_IO::FootprintLoad().

◆ FootprintLoad()

FOOTPRINT * PCB_IO_EAGLE::FootprintLoad ( const wxString &  aLibraryPath,
const wxString &  aFootprintName,
bool  aKeepUUID = false,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aFootprintNameis the name of the footprint to load.
aPropertiesis an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
aKeepUUID= true to keep initial items UUID, false to set new UUID normally true if loaded in the footprint editor, false if loaded in the board editor. Make sense only in kicad_plugin
Returns
the FOOTPRINT object if found, caller owns it, else NULL if not found.
Exceptions
IO_ERRORif the library cannot be found or read. No exception is thrown in the case where aFootprintName cannot be found.

Reimplemented from PCB_IO.

Definition at line 3284 of file pcb_io_eagle.cpp.

References copy.

◆ FootprintSave()

void PCB_IO::FootprintSave ( const wxString &  aLibraryPath,
const FOOTPRINT aFootprint,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Write aFootprint to an existing library located at aLibraryPath.

If a footprint by the same name already exists, it is replaced.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aFootprintis what to store in the library. The caller continues to own the footprint after this call.
aPropertiesis an associative array that can be used to tell the saver how to save the footprint, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem saving.

Reimplemented in PCB_IO_KICAD_SEXPR.

Definition at line 156 of file pcb_io.cpp.

References NOT_IMPLEMENTED.

◆ GetBoardFileDesc()

const IO_BASE::IO_FILE_DESC PCB_IO_EAGLE::GetBoardFileDesc ( ) const
inlineoverridevirtual

Returns board file description for the PCB_IO.

Reimplemented from PCB_IO.

Definition at line 134 of file pcb_io_eagle.h.

References _HKI.

◆ GetEnumeratedFootprint()

const FOOTPRINT * PCB_IO::GetEnumeratedFootprint ( const wxString &  aLibraryPath,
const wxString &  aFootprintName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.

Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.

Definition at line 131 of file pcb_io.cpp.

References PCB_IO::FootprintLoad().

◆ GetImportedCachedLibraryFootprints()

std::vector< FOOTPRINT * > PCB_IO_EAGLE::GetImportedCachedLibraryFootprints ( )
overridevirtual

Return a container with the cached library footprints generated in the last call to Load.

This function is intended to be used ONLY by the non-KiCad board importers for the purpose of obtaining the footprint library of the design and creating a project-specific library.

Returns
Footprints (caller owns the objects)

Reimplemented from PCB_IO.

Definition at line 444 of file pcb_io_eagle.cpp.

References m_templates, and name.

◆ GetLibraryDesc()

const IO_BASE::IO_FILE_DESC PCB_IO_EAGLE::GetLibraryDesc ( ) const
inlineoverridevirtual

Get the descriptor for the library container that this IO plugin operates on.

Returns
File descriptor for the container of the library elements

Implements IO_BASE.

Definition at line 139 of file pcb_io_eagle.h.

References _HKI.

◆ GetLibraryFileDesc()

virtual const IO_FILE_DESC IO_BASE::GetLibraryFileDesc ( ) const
inlinevirtualinherited

Get the descriptor for the individual library elements that this IO plugin operates on.

For libraries where all the elements are in a single container (e.g. all elements in a single file), then this will return the descriptor from IO_BASE::GetLibraryDesc().

Returns
File descriptor for the library elements

Reimplemented in PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.

Definition at line 102 of file io_base.h.

References IO_BASE::GetLibraryDesc().

Referenced by PCB_IO::CanReadFootprint().

◆ GetLibraryOptions()

void PCB_IO::GetLibraryOptions ( STRING_UTF8_MAP aListToAppendTo) const
overridevirtualinherited

Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions.

Options are typically appended so that a derived #PLUGIN can call its base class function by the same name first, thus inheriting options declared there. Some base class options could pertain to all Footprint*() functions in all derived PLUGINs.

Note
Since aListToAppendTo is a #PROPERTIES object, all options will be unique and last guy wins.
Parameters
aListToAppendToholds a tuple of
option
This eventually is what shows up into the fp-lib-table "options" field, possibly combined with others.
internationalized description
The internationalized description is displayed in DIALOG_PLUGIN_OPTIONS. It may be multi-line and be quite explanatory of the option.

In the future perhaps aListToAppendTo evolves to something capable of also holding a wxValidator for the cells in said dialog: http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. This would require a 3 column list, and introducing wx GUI knowledge to PLUGIN, which has been avoided to date.

Reimplemented from IO_BASE.

Definition at line 172 of file pcb_io.cpp.

References _, and IO_BASE::GetLibraryOptions().

◆ GetLibraryTimestamp()

long long PCB_IO_EAGLE::GetLibraryTimestamp ( const wxString &  aLibraryPath) const
inlineoverridevirtual

Generate a timestamp representing all the files in the library (including the library directory).

Timestamps should not be considered ordered, they either match or they don't.

Implements PCB_IO.

Definition at line 160 of file pcb_io_eagle.h.

References getModificationTime().

◆ getMinimumCopperLayerCount()

int PCB_IO_EAGLE::getMinimumCopperLayerCount ( ) const
private

Determines the minimum copper layer stackup count that includes all mapped layers.

Definition at line 3302 of file pcb_io_eagle.cpp.

References B_Cu, F_Cu, and IsCopperLayer().

Referenced by LoadBoard().

◆ getModificationTime()

wxDateTime PCB_IO_EAGLE::getModificationTime ( const wxString &  aPath)
staticprivate

get a file's or dir's modification time.

Definition at line 3157 of file pcb_io_eagle.cpp.

Referenced by GetLibraryTimestamp().

◆ GetName()

const wxString & IO_BASE::GetName ( ) const
inlineinherited

Return a brief hard coded name for this IO interface.

Definition at line 71 of file io_base.h.

References IO_BASE::m_name.

Referenced by SCH_IO_ALTIUM::ParseLibFile().

◆ ImportFootprint()

FOOTPRINT * PCB_IO::ImportFootprint ( const wxString &  aFootprintPath,
wxString &  aFootprintNameOut,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Load a single footprint from aFootprintPath and put its name in aFootprintNameOut.

If this is a footprint library, the first footprint should be loaded. The default implementation uses FootprintEnumerate and FootprintLoad to load first footprint.

Parameters
aLibraryPathis a path of the footprint file.
aFootprintNameOutis the name output of the loaded footprint.
aPropertiesis an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Returns
the FOOTPRINT object if found, caller owns it, else NULL if not found.
Exceptions
IO_ERRORif the footprint cannot be found or read.

Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.

Definition at line 109 of file pcb_io.cpp.

References _, PCB_IO::FootprintEnumerate(), and PCB_IO::FootprintLoad().

◆ init()

void PCB_IO_EAGLE::init ( const STRING_UTF8_MAP aProperties)
private

initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.

Definition at line 455 of file pcb_io_eagle.cpp.

References XPATH::clear(), PCB_IO::m_board, m_hole_count, m_min_annulus, m_min_hole, m_min_trace, m_min_via, m_pads_to_nets, PCB_IO::m_props, m_rules, and m_xpath.

Referenced by LoadBoard(), and PCB_IO_EAGLE().

◆ IsLibraryWritable()

bool PCB_IO_EAGLE::IsLibraryWritable ( const wxString &  aLibraryPath)
inlineoverridevirtual

Return true if the library at aLibraryPath is writable.

The system libraries are typically read only because of where they are installed..

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
Exceptions
IO_ERRORif no library at aLibraryPath exists.

Reimplemented from IO_BASE.

Definition at line 165 of file pcb_io_eagle.h.

◆ kicad_fontsize()

VECTOR2I PCB_IO_EAGLE::kicad_fontsize ( const ECOORD d,
int  aTextThickness 
) const
inlineprivate

create a font size (fontz) from an eagle font size scalar and KiCad font thickness

Definition at line 315 of file pcb_io_eagle.cpp.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ kicad_layer()

PCB_LAYER_ID PCB_IO_EAGLE::kicad_layer ( int  aLayer) const
private

Convert an Eagle layer to a KiCad layer.

Definition at line 2976 of file pcb_io_eagle.cpp.

References UNDEFINED_LAYER.

Referenced by loadLayerDefs(), loadPlain(), and setKeepoutSettingsToZone().

◆ kicad_x()

int PCB_IO_EAGLE::kicad_x ( const ECOORD x) const
inlineprivate

Definition at line 200 of file pcb_io_eagle.h.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ kicad_y()

int PCB_IO_EAGLE::kicad_y ( const ECOORD y) const
inlineprivate

Convert an Eagle distance to a KiCad distance.

Definition at line 199 of file pcb_io_eagle.h.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ loadAllSections()

void PCB_IO_EAGLE::loadAllSections ( wxXmlNode *  aDocument)
private

◆ LoadBoard()

BOARD * PCB_IO_EAGLE::LoadBoard ( const wxString &  aFileName,
BOARD aAppendToMe,
const STRING_UTF8_MAP aProperties = nullptr,
PROJECT aProject = nullptr 
)
overridevirtual

Load information from some input file format that this PCB_IO implementation knows about into either a new BOARD or an existing one.

This may be used to load an entire new BOARD, or to augment an existing one if aAppendToMe is not NULL.

Parameters
aFileNameis the name of the file to use as input and may be foreign in nature or native in nature.
aAppendToMeis an existing BOARD to append to, but if NULL then this means "do not append, rather load anew".
aPropertiesis an associative array that can be used to tell the loader how to load the file, because it can take any number of additional named arguments that the plugin is known to support. These are tuning parameters for the import or load. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
aProjectis the optional PROJECT object primarily used by third party importers.
Returns
the successfully loaded board, or the same one as aAppendToMe if aAppendToMe was not NULL, and caller owns it.
Exceptions
IO_ERRORif there is a problem loading, and its contents should say what went wrong, using line number and character offsets of the input file if possible.

Reimplemented from PCB_IO.

Definition at line 323 of file pcb_io_eagle.cpp.

References _, centerBoard(), XPATH::Contents(), BOARD::GetDesignSettings(), getMinimumCopperLayerCount(), NETCLASS::GetTrackWidth(), NETCLASS::GetViaDiameter(), NETCLASS::GetViaDrill(), init(), PROGRESS_REPORTER::KeepRefreshing(), KiROUND(), loadAllSections(), PCB_IO::m_board, m_customRules, BOARD::m_LegacyDesignSettingsLoaded, BOARD::m_LegacyNetclassesLoaded, m_min_annulus, m_min_hole, m_min_trace, m_min_via, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, BOARD_DESIGN_SETTINGS::m_NetSettings, m_progressReporter, m_rules, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOARD_DESIGN_SETTINGS::m_ViasMinAnnularWidth, BOARD_DESIGN_SETTINGS::m_ViasMinSize, m_xpath, ERULES::mdWireWire, name, PROGRESS_REPORTER::Report(), BOARD::SetCopperLayerCount(), BOARD::SetFileName(), and THROW_IO_ERROR.

◆ loadClasses()

void PCB_IO_EAGLE::loadClasses ( wxXmlNode *  aClasses)
private

◆ loadDesignRules()

void PCB_IO_EAGLE::loadDesignRules ( wxXmlNode *  aDesignRules)
private

Definition at line 569 of file pcb_io_eagle.cpp.

References checkpoint(), m_rules, m_xpath, ERULES::parse(), XPATH::pop(), and XPATH::push().

Referenced by loadAllSections().

◆ loadElements()

◆ loadLayerDefs()

◆ loadLibraries()

void PCB_IO_EAGLE::loadLibraries ( wxXmlNode *  aLibs)
private

Definition at line 1207 of file pcb_io_eagle.cpp.

References library.

Referenced by loadAllSections().

◆ loadLibrary()

void PCB_IO_EAGLE::loadLibrary ( wxXmlNode *  aLib,
const wxString *  aLibName 
)
private

Load the Eagle "library" XML element, which can occur either under a "libraries" element (if a *.brd file) or under a "drawing" element if a *.lbr file.

Parameters
aLibis the portion of the loaded XML document tree that is the "library" element.
aLibNameis a pointer to the library name or NULL. If NULL this means we are loading a *.lbr not a *.brd file and the key used in m_templates is to exclude the library name.

Definition at line 1136 of file pcb_io_eagle.cpp.

References _, m_xpath, makeKey(), MapChildren(), XPATH::push(), ReplaceIllegalFileNameChars(), and THROW_IO_ERROR.

◆ loadPlain()

void PCB_IO_EAGLE::loadPlain ( wxXmlNode *  aPlain)
private

Definition at line 651 of file pcb_io_eagle.cpp.

References std::abs(), BOARD::Add(), ETEXT::align, ANGLE_0, ANGLE_360, ZONE::AppendCorner(), ARC_HIGH_DEF, ETEXT::BOTTOM_CENTER, ETEXT::BOTTOM_LEFT, ETEXT::BOTTOM_RIGHT, EAGLE_LAYER::BRESTRICT, ETEXT::CENTER, ETEXT::CENTER_LEFT, ETEXT::CENTER_RIGHT, checkpoint(), ConvertArcCenter(), EWIRE::curve, EROT::degrees, DEGREES_T, delta, DIMENSION_PRECISION, EDIMENSION::dimensionType, FULL_CIRCLE, GetArcToSegmentCount(), PCB_TEXT::GetBoundingBox(), ZONE::GetDefaultHatchPitch(), BOARD::GetDesignSettings(), GetLineLength(), BOARD_DESIGN_SETTINGS::GetLineThickness(), EDA_TEXT::GetTextPos(), BOARD_DESIGN_SETTINGS::GetTextSize(), BOX2< Vec >::GetWidth(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, interpretText(), kicad_fontsize(), kicad_layer(), kicad_x(), kicad_y(), KiROUND(), EWIRE::layer, ECIRCLE::layer, ERECT::layer, EDIMENSION::layer, ETEXT::layer, loadPolygon(), PCB_IO::m_board, m_hole_count, m_xpath, EROT::mirror, ZONE::NewHole(), packageHole(), PCB_DIM_ALIGNED_T, XPATH::pop(), XPATH::push(), ECIRCLE::radius, ETEXT::ratio, FOOTPRINT::Reference(), ERECT::rot, ETEXT::rot, ZONE::Rotate(), RotatePoint(), EDA_SHAPE::SetArcAngleAndEnd(), ZONE::SetBorderDisplayStyle(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), PCB_DIMENSION_BASE::SetEnd(), EDA_SHAPE::SetFilled(), PCB_DIM_ALIGNED::SetHeight(), EDA_TEXT::SetHorizJustify(), setKeepoutSettingsToZone(), BOARD_ITEM::SetLayer(), PCB_SHAPE::SetLayer(), ZONE::SetLayer(), PCB_DIMENSION_BASE::SetLineThickness(), EDA_TEXT::SetMirrored(), BOARD_CONNECTED_ITEM::SetNetCode(), PCB_DIMENSION_BASE::SetOverrideText(), PCB_DIMENSION_BASE::SetPrecision(), FOOTPRINT::SetReference(), EDA_SHAPE::SetShape(), PCB_DIMENSION_BASE::SetStart(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), PCB_DIMENSION_BASE::SetUnits(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), sign(), ETEXT::size, EROT::spin, ETEXT::text, EDIMENSION::textsize, ETEXT::TOP_CENTER, ETEXT::TOP_LEFT, ETEXT::TOP_RIGHT, ECOORD::ToPcbUnits(), EAGLE_LAYER::TRESTRICT, NETINFO_LIST::UNCONNECTED, UNDEFINED_LAYER, EAGLE_LAYER::VRESTRICT, EWIRE::width, ECIRCLE::width, ECIRCLE::x, ETEXT::x, VECTOR2< T >::x, EWIRE::x1, ERECT::x1, EDIMENSION::x1, EWIRE::x2, ERECT::x2, EDIMENSION::x2, EDIMENSION::x3, ECIRCLE::y, ETEXT::y, VECTOR2< T >::y, EWIRE::y1, ERECT::y1, EDIMENSION::y1, EWIRE::y2, ERECT::y2, EDIMENSION::y2, and EDIMENSION::y3.

Referenced by loadAllSections().

◆ loadPolygon()

◆ loadSignals()

◆ makeFootprint()

FOOTPRINT * PCB_IO_EAGLE::makeFootprint ( wxXmlNode *  aPackage,
const wxString &  aPkgName 
)
private

Create a FOOTPRINT from an Eagle package.

Definition at line 1826 of file pcb_io_eagle.cpp.

References convertDescription(), LIB_ID::Parse(), and UnescapeHTML().

◆ mapEagleLayersToKicad()

void PCB_IO_EAGLE::mapEagleLayersToKicad ( bool  aIsLibraryCache = false)
private

Generate mapping between Eagle and KiCad layers.

Warning
It is imperative that this gets called correctly because footprint libraries do not get remapped by the user on load. Otherwise, Pcbnew will crash when attempting to load footprint libraries that contain layers that do not exist in the EAGLE_LAYER definitions.
Parameters
aIsLibraryCacheis the flag to indicate when mapping the footprint library cache layers rather than the board layers.

Definition at line 2946 of file pcb_io_eagle.cpp.

References INPUT_LAYER_DESC::AutoMapLayer, ELAYER::name, INPUT_LAYER_DESC::Name, ELAYER::number, INPUT_LAYER_DESC::PermittedLayers, INPUT_LAYER_DESC::Required, and UNDEFINED_LAYER.

Referenced by loadAllSections().

◆ orientFootprintAndText()

void PCB_IO_EAGLE::orientFootprintAndText ( FOOTPRINT aFootprint,
const EELEMENT e,
const EATTR aNameAttr,
const EATTR aValueAttr 
)
private

◆ orientFPText()

◆ packageCircle()

◆ packageHole()

void PCB_IO_EAGLE::packageHole ( FOOTPRINT aFootprint,
wxXmlNode *  aTree,
bool  aCenter 
) const
private
Parameters
aFootprintThe KiCad footprint to which to assign the hole.
aTreeThe Eagle XML node that is of type "hole".
aCenterIf true, center the hole in the footprint and offset the footprint position.

Definition at line 2442 of file pcb_io_eagle.cpp.

References FOOTPRINT::Add(), LSET::AllCuMask(), B_Mask, EHOLE::drill, F_Mask, FOOTPRINT::GetPosition(), pad, FOOTPRINT::SetPosition(), ECOORD::ToPcbUnits(), ECOORD::value, EHOLE::x, and EHOLE::y.

Referenced by loadPlain().

◆ packagePad()

◆ packagePolygon()

◆ packageRectangle()

◆ packageSMD()

void PCB_IO_EAGLE::packageSMD ( FOOTPRINT aFootprint,
wxXmlNode *  aTree 
) const
private

◆ packageText()

◆ packageWire()

◆ PrefetchLib()

void PCB_IO::PrefetchLib ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

If possible, prefetches the specified library (e.g.

performing downloads). Does not parse. Threadsafe.

This is a no-op for libraries that cannot be prefetched. Plugins that cannot prefetch need not override this; a default no-op is provided.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aPropertiesis an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is an error prefetching the library.

Definition at line 104 of file pcb_io.cpp.

◆ RegisterLayerMappingCallback()

virtual void LAYER_REMAPPABLE_PLUGIN::RegisterLayerMappingCallback ( LAYER_MAPPING_HANDLER  aLayerMappingHandler)
inlinevirtualinherited

Register a different handler to be called when mapping of input layers to KiCad layers occurs.

The function is marked as virtual, so the plugins can implement extra logic (e.g., enable warnings or checks)

Parameters
aLayerMappingHandler

Reimplemented in PCB_IO_CADSTAR_ARCHIVE.

Definition at line 73 of file plugin_common_layer_mapping.h.

References LAYER_REMAPPABLE_PLUGIN::m_layer_mapping_handler.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles(), PCB_IO_CADSTAR_ARCHIVE::PCB_IO_CADSTAR_ARCHIVE(), PCB_IO_EAGLE(), and PCB_IO_CADSTAR_ARCHIVE::RegisterLayerMappingCallback().

◆ SaveBoard()

void PCB_IO::SaveBoard ( const wxString &  aFileName,
BOARD aBoard,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file.

Parameters
aFileNameis the name of a file to save to on disk.
aBoardis the class BOARD in memory document tree from which to extract information when writing to aFileName. The caller continues to own the BOARD, and the plugin should refrain from modifying the BOARD if possible.
aPropertiesis an associative array that can be used to tell the saver how to save the file, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it) and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem saving or exporting.

Reimplemented in CLIPBOARD_IO, PCB_IO_IPC2581, and PCB_IO_KICAD_SEXPR.

Definition at line 88 of file pcb_io.cpp.

References NOT_IMPLEMENTED.

◆ setKeepoutSettingsToZone()

◆ SetProgressReporter()

virtual void IO_BASE::SetProgressReporter ( PROGRESS_REPORTER aReporter)
inlinevirtualinherited

Set an optional progress reporter.

Reimplemented in SCH_IO_CADSTAR_ARCHIVE.

Definition at line 81 of file io_base.h.

References IO_BASE::m_progressReporter.

Referenced by PCB_CONTROL::AppendBoard().

◆ SetQueryUserCallback()

virtual void PCB_IO::SetQueryUserCallback ( std::function< bool(wxString aTitle, int aIcon, wxString aMessage, wxString aAction)>  aCallback)
inlinevirtualinherited

Registers a KIDIALOG callback for collecting info from the user.

Definition at line 98 of file pcb_io.h.

Referenced by PCB_CONTROL::AppendBoard().

◆ SetReporter()

virtual void IO_BASE::SetReporter ( REPORTER aReporter)
inlinevirtualinherited

Set an optional reporter for warnings/errors.

Reimplemented in SCH_IO_CADSTAR_ARCHIVE.

Definition at line 76 of file io_base.h.

References IO_BASE::m_reporter.

◆ transferPad()

Member Data Documentation

◆ m_board

◆ m_classMap

std::map<wxString, std::shared_ptr<NETCLASS> > PCB_IO_EAGLE::m_classMap
private

Definition at line 334 of file pcb_io_eagle.h.

◆ m_cu_map

int PCB_IO_EAGLE::m_cu_map[17]
private

map eagle to KiCad, cu layers only.

Definition at line 328 of file pcb_io_eagle.h.

Referenced by clear_cu_map(), and loadLayerDefs().

◆ m_customRules

wxString PCB_IO_EAGLE::m_customRules
private

Definition at line 336 of file pcb_io_eagle.h.

Referenced by LoadBoard().

◆ m_doneCount

unsigned PCB_IO_EAGLE::m_doneCount
private

Definition at line 353 of file pcb_io_eagle.h.

Referenced by checkpoint(), and loadAllSections().

◆ m_eagleLayers

std::map<int, ELAYER> PCB_IO_EAGLE::m_eagleLayers
private

Eagle layer data stored by layer number.

Definition at line 329 of file pcb_io_eagle.h.

Referenced by loadLayerDefs().

◆ m_eagleLayersIds

std::map<wxString, int> PCB_IO_EAGLE::m_eagleLayersIds
private

Eagle layer ids stored by layer name.

Definition at line 330 of file pcb_io_eagle.h.

Referenced by loadLayerDefs().

◆ m_hole_count

int PCB_IO_EAGLE::m_hole_count
private

generates unique footprint names from eagle "hole"s.

Definition at line 342 of file pcb_io_eagle.h.

Referenced by init(), and loadPlain().

◆ m_lastProgressCount

unsigned PCB_IO_EAGLE::m_lastProgressCount
private

Definition at line 354 of file pcb_io_eagle.h.

Referenced by checkpoint().

◆ m_layer_map

std::map<wxString, PCB_LAYER_ID> PCB_IO_EAGLE::m_layer_map
private

Map of Eagle layers to KiCad layers.

Eagle class number to KiCad netclass

Definition at line 331 of file pcb_io_eagle.h.

◆ m_layer_mapping_handler

LAYER_MAPPING_HANDLER LAYER_REMAPPABLE_PLUGIN::m_layer_mapping_handler
protectedinherited

◆ m_lib_path

wxString PCB_IO_EAGLE::m_lib_path
private

Definition at line 362 of file pcb_io_eagle.h.

◆ m_min_annulus

int PCB_IO_EAGLE::m_min_annulus
private

smallest via annulus we find on Load(), in BIU.

Definition at line 360 of file pcb_io_eagle.h.

Referenced by init(), and LoadBoard().

◆ m_min_hole

int PCB_IO_EAGLE::m_min_hole
private

smallest diameter hole we find on Load(), in BIU.

Definition at line 358 of file pcb_io_eagle.h.

Referenced by init(), and LoadBoard().

◆ m_min_trace

int PCB_IO_EAGLE::m_min_trace
private

smallest trace we find on Load(), in BIU.

Definition at line 357 of file pcb_io_eagle.h.

Referenced by init(), and LoadBoard().

◆ m_min_via

int PCB_IO_EAGLE::m_min_via
private

smallest via we find on Load(), in BIU.

Definition at line 359 of file pcb_io_eagle.h.

Referenced by init(), and LoadBoard().

◆ m_mod_time

wxDateTime PCB_IO_EAGLE::m_mod_time
private

Definition at line 363 of file pcb_io_eagle.h.

◆ m_name

wxString IO_BASE::m_name
protectedinherited

Name of the IO loader.

Definition at line 207 of file io_base.h.

Referenced by IO_BASE::GetName().

◆ m_pads_to_nets

NET_MAP PCB_IO_EAGLE::m_pads_to_nets
private

net list

Definition at line 344 of file pcb_io_eagle.h.

Referenced by init().

◆ m_progressReporter

PROGRESS_REPORTER* PCB_IO_EAGLE::m_progressReporter
private

optional; may be nullptr

Definition at line 352 of file pcb_io_eagle.h.

Referenced by checkpoint(), loadAllSections(), and LoadBoard().

◆ m_props

◆ m_reporter

REPORTER* IO_BASE::m_reporter
protectedinherited

Reporter to log errors/warnings to, may be nullptr.

Definition at line 210 of file io_base.h.

Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_EAGLE::loadInstance(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ALTIUM::ParseAltiumSch(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseBezier(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseComponent(), SCH_IO_ALTIUM::ParseDesignator(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseEllipticalArc(), SCH_IO_ALTIUM::ParseFileName(), SCH_IO_ALTIUM::ParseHarnessConnector(), SCH_IO_ALTIUM::ParseHarnessEntry(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseImage(), SCH_IO_ALTIUM::ParseImplementation(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePin(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParsePort(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_ALTIUM::ParseRecord(), SCH_IO_ALTIUM::ParseRectangle(), SCH_IO_ALTIUM::ParseRoundRectangle(), SCH_IO_ALTIUM::ParseSheetEntry(), SCH_IO_ALTIUM::ParseSheetName(), SCH_IO_ALTIUM::ParseSignalHarness(), SCH_IO_ALTIUM::ParseStorage(), SCH_IO_ALTIUM::SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_EAGLE::SCH_IO_EAGLE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_EASYEDAPRO::SCH_IO_EASYEDAPRO(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), IO_BASE::SetReporter(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().

◆ m_rules

ERULES* PCB_IO_EAGLE::m_rules
private

Eagle design rules.

Definition at line 338 of file pcb_io_eagle.h.

Referenced by init(), LoadBoard(), loadDesignRules(), and ~PCB_IO_EAGLE().

◆ m_templates

std::map<wxString, FOOTPRINT*> PCB_IO_EAGLE::m_templates
private

is part of a FOOTPRINT factory that operates using copy construction.

lookup key is either libname.packagename or simply packagename if FootprintLoad() or FootprintEnumberate()

Definition at line 346 of file pcb_io_eagle.h.

Referenced by GetImportedCachedLibraryFootprints().

◆ m_totalCount

unsigned PCB_IO_EAGLE::m_totalCount
private

for progress reporting

Definition at line 355 of file pcb_io_eagle.h.

Referenced by checkpoint(), and loadAllSections().

◆ m_xpath

XPATH* PCB_IO_EAGLE::m_xpath
private

keeps track of what we are working on within XML document during a Load().

Definition at line 339 of file pcb_io_eagle.h.

Referenced by init(), loadAllSections(), LoadBoard(), loadDesignRules(), loadLibrary(), loadPlain(), and ~PCB_IO_EAGLE().


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