KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EAGLE_PLUGIN 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 <eagle_plugin.h>

Inheritance diagram for EAGLE_PLUGIN:
PLUGIN LAYER_REMAPPABLE_PLUGIN

Public Types

typedef int BIU
 

Public Member Functions

const wxString PluginName () const override
 Return a brief hard coded name for this PLUGIN. More...
 
PLUGIN_FILE_DESC GetBoardFileDesc () const override
 Returns board file description for the PLUGIN. More...
 
PLUGIN_FILE_DESC GetFootprintLibDesc () const override
 Returns footprint library description for the PLUGIN. More...
 
PLUGIN_FILE_DESC GetFootprintFileDesc () const override
 Returns footprint file description for the PLUGIN. More...
 
bool CanReadBoard (const wxString &aFileName) const override
 Checks if this PLUGIN can read the specified board file. More...
 
bool CanReadFootprintLib (const wxString &aFileName) const override
 Checks if this PLUGIN can read footprint library from specified file or directory. More...
 
bool CanReadFootprint (const wxString &aFileName) const override
 Checks if this PLUGIN can read a footprint from specified file or directory. More...
 
BOARDLoadBoard (const wxString &aFileName, BOARD *aAppendToMe, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr) override
 Load information from some input file format that this PLUGIN implementation knows about into either a new BOARD or an existing one. More...
 
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints () override
 Return a container with the cached library footprints generated in the last call to Load. More...
 
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. More...
 
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 PLUGIN knows about. More...
 
long long GetLibraryTimestamp (const wxString &aLibraryPath) const override
 Generate a timestamp representing all the files in the library (including the library directory). More...
 
bool IsFootprintLibWritable (const wxString &aLibraryPath) override
 Return true if the library at aLibraryPath is writable. More...
 
void FootprintLibOptions (STRING_UTF8_MAP *aProperties) const override
 Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions. More...
 
 EAGLE_PLUGIN ()
 
 ~EAGLE_PLUGIN ()
 
std::map< wxString, PCB_LAYER_IDDefaultLayerMappingCallback (const std::vector< INPUT_LAYER_DESC > &aInputLayerDescriptionVector)
 Return the automapped layers. More...
 
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. More...
 
virtual void SaveBoard (const wxString &aFileName, BOARD *aBoard, const STRING_UTF8_MAP *aProperties=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
 Write aBoard to a storage file in a format that this PLUGIN implementation knows about or it can be used to write a portion of aBoard to a special kind of export file. More...
 
virtual void PrefetchLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 If possible, prefetches the specified library (e.g. More...
 
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. More...
 
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. More...
 
virtual bool FootprintExists (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
 Check for the existence of a footprint. More...
 
virtual void FootprintSave (const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aFootprint to an existing library located at aLibraryPath. More...
 
virtual void FootprintDelete (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete aFootprintName from the library at aLibraryPath. More...
 
virtual void FootprintLibCreate (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Create a new empty footprint library at aLibraryPath empty. More...
 
virtual bool FootprintLibDelete (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete an existing footprint 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. More...
 
virtual void RegisterLayerMappingCallback (LAYER_MAPPING_HANDLER aLayerMappingHandler)
 Register a different handler to be called when mapping of input layers to KiCad layers occurs. More...
 

Protected Attributes

LAYER_MAPPING_HANDLER m_layer_mapping_handler
 Callback to get layer mapping. More...
 

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. More...
 
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. More...
 
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 More...
 
void mapEagleLayersToKicad (bool aIsLibraryCache=false)
 Generate mapping between Eagle and KiCad layers. More...
 
PCB_LAYER_ID kicad_layer (int aLayer) const
 Convert an Eagle layer to a KiCad layer. More...
 
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. More...
 
const wxString & eagle_layer_name (int aLayer) const
 Get Eagle layer name by its number. More...
 
int eagle_layer_id (const wxString &aLayerName) const
 Get Eagle layer number by its name. More...
 
void setKeepoutSettingsToZone (ZONE *aZone, int aLayer) const
 
void cacheLib (const wxString &aLibraryPath)
 This PLUGIN only caches one footprint library, this determines which one. More...
 
int getMinimumCopperLayerCount () const
 Determines the minimum copper layer stackup count that includes all mapped layers. More...
 
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. More...
 
void loadLibraries (wxXmlNode *aLibs)
 
void loadElements (wxXmlNode *aElements)
 
ZONEloadPolygon (wxXmlNode *aPolyNode)
 Load a copper or keepout polygon and adds it to the board. More...
 
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 More...
 
FOOTPRINTmakeFootprint (wxXmlNode *aPackage, const wxString &aPkgName)
 Create a FOOTPRINT from an Eagle package. More...
 
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. More...
 
void transferPad (const EPAD_COMMON &aEaglePad, PAD *aPad) const
 Deletes the footprint templates list. More...
 
void deleteTemplates ()
 

Static Private Member Functions

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

Private Attributes

int m_cu_map [17]
 map eagle to KiCad, cu layers only. More...
 
std::map< int, ELAYERm_eagleLayers
 Eagle layer data stored by layer number. More...
 
std::map< wxString, int > m_eagleLayersIds
 Eagle layer ids stored by layer name. More...
 
std::map< wxString, PCB_LAYER_IDm_layer_map
 Map of Eagle layers to KiCad layers. More...
 
std::map< wxString, std::shared_ptr< NETCLASS > > m_classMap
 
wxString m_customRules
 
ERULESm_rules
 Eagle design rules. More...
 
XPATHm_xpath
 keeps track of what we are working on within XML document during a Load(). More...
 
int m_hole_count
 generates unique footprint names from eagle "hole"s. More...
 
NET_MAP m_pads_to_nets
 net list More...
 
std::map< wxString, FOOTPRINT * > m_templates
 is part of a FOOTPRINT factory that operates using copy construction. More...
 
const STRING_UTF8_MAPm_props
 passed via Save() or Load(), no ownership, may be NULL. More...
 
BOARDm_board
 which BOARD is being worked on, no ownership here More...
 
PROGRESS_REPORTERm_progressReporter
 optional; may be nullptr More...
 
unsigned m_doneCount
 
unsigned m_lastProgressCount
 
unsigned m_totalCount
 for progress reporting More...
 
int m_min_trace
 smallest trace we find on Load(), in BIU. More...
 
int m_min_hole
 smallest diameter hole we find on Load(), in BIU. More...
 
int m_min_via
 smallest via we find on Load(), in BIU. More...
 
int m_min_annulus
 smallest via annulus we find on Load(), in BIU. More...
 
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 129 of file eagle_plugin.h.

Member Typedef Documentation

◆ BIU

typedef int EAGLE_PLUGIN::BIU

Definition at line 175 of file eagle_plugin.h.

◆ EITER

typedef ELAYERS::const_iterator EAGLE_PLUGIN::EITER
private

Definition at line 331 of file eagle_plugin.h.

◆ ELAYERS

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

Definition at line 330 of file eagle_plugin.h.

Constructor & Destructor Documentation

◆ EAGLE_PLUGIN()

EAGLE_PLUGIN::EAGLE_PLUGIN ( )

◆ ~EAGLE_PLUGIN()

EAGLE_PLUGIN::~EAGLE_PLUGIN ( )

Definition at line 240 of file eagle_plugin.cpp.

References deleteTemplates(), m_rules, and m_xpath.

Member Function Documentation

◆ cacheLib()

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

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

Definition at line 3098 of file eagle_plugin.cpp.

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

◆ CanReadBoard()

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

Checks if this PLUGIN can read the specified board file.

If not overriden, extension check is used.

Reimplemented from PLUGIN.

Definition at line 248 of file eagle_plugin.cpp.

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

◆ CanReadFootprint()

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

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

If not overriden, extension check is used.

Reimplemented from PLUGIN.

Definition at line 266 of file eagle_plugin.cpp.

References CanReadFootprintLib().

◆ CanReadFootprintLib()

bool EAGLE_PLUGIN::CanReadFootprintLib ( const wxString &  aFileName) const
overridevirtual

Checks if this PLUGIN can read footprint library from specified file or directory.

If not overriden, extension check is used.

Reimplemented from PLUGIN.

Definition at line 257 of file eagle_plugin.cpp.

References PLUGIN::CanReadFootprintLib(), and checkHeader().

Referenced by CanReadFootprint().

◆ centerBoard()

void EAGLE_PLUGIN::centerBoard ( )
private

move the BOARD into the center of the page

Definition at line 3059 of file eagle_plugin.cpp.

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

Referenced by LoadBoard().

◆ checkHeader()

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

Definition at line 272 of file eagle_plugin.cpp.

References text.

Referenced by CanReadBoard(), and CanReadFootprintLib().

◆ checkpoint()

◆ clear_cu_map()

void EAGLE_PLUGIN::clear_cu_map ( )
private

Definition at line 475 of file eagle_plugin.cpp.

References arrayDim(), and m_cu_map.

Referenced by EAGLE_PLUGIN().

◆ defaultKicadLayer()

std::tuple< PCB_LAYER_ID, LSET, bool > EAGLE_PLUGIN::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 2909 of file eagle_plugin.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 > EAGLE_PLUGIN::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 EAGLE_PLUGIN.

Parameters
aInputLayerDescriptionVector
Returns
Auto-mapped layers

Definition at line 2857 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN().

◆ deleteTemplates()

void EAGLE_PLUGIN::deleteTemplates ( )
private

Definition at line 2521 of file eagle_plugin.cpp.

References name.

Referenced by ~EAGLE_PLUGIN().

◆ eagle_layer_id()

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

Get Eagle layer number by its name.

Definition at line 3051 of file eagle_plugin.cpp.

References unknown.

◆ eagle_layer_name()

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

Get Eagle layer name by its number.

Definition at line 3043 of file eagle_plugin.cpp.

References unknown.

◆ FootprintDelete()

void PLUGIN::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 GPCB_PLUGIN, and PCB_PLUGIN.

Definition at line 234 of file plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by FP_LIB_TABLE::FootprintDelete().

◆ FootprintEnumerate()

void EAGLE_PLUGIN::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 PLUGIN.

Definition at line 3182 of file eagle_plugin.cpp.

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

◆ FootprintExists()

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

Check for the existence of a footprint.

Reimplemented in CADSTAR_PCB_ARCHIVE_PLUGIN, and PCB_PLUGIN.

Definition at line 210 of file plugin.cpp.

References PLUGIN::FootprintLoad().

Referenced by FP_LIB_TABLE::FootprintExists().

◆ FootprintLibCreate()

void PLUGIN::FootprintLibCreate ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Create a new empty footprint 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 footprints.
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 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 library, or creating it.

Reimplemented in PCB_PLUGIN.

Definition at line 242 of file plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PCB_BASE_EDIT_FRAME::createNewLibrary(), and FP_LIB_TABLE::FootprintLibCreate().

◆ FootprintLibDelete()

bool PLUGIN::FootprintLibDelete ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete an existing footprint 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 footprints.
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 GPCB_PLUGIN, PCB_PLUGIN, and LEGACY_PLUGIN.

Definition at line 249 of file plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PCB_BASE_EDIT_FRAME::createNewLibrary(), and FP_LIB_TABLE::FootprintLibDelete().

◆ FootprintLibOptions()

void EAGLE_PLUGIN::FootprintLibOptions ( STRING_UTF8_MAP aListToAppendTo) const
overridevirtual

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 PLUGIN.

Definition at line 3227 of file eagle_plugin.cpp.

References PLUGIN::FootprintLibOptions().

◆ FootprintLoad()

FOOTPRINT * EAGLE_PLUGIN::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 PLUGIN 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 PLUGIN.

Definition at line 3209 of file eagle_plugin.cpp.

References copy.

◆ FootprintSave()

void PLUGIN::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_PLUGIN.

Definition at line 226 of file plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PANEL_FP_LIB_TABLE::convertLibrary(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), FP_LIB_TABLE::FootprintSave(), PCB_EDIT_FRAME::OpenProjectFiles(), and FOOTPRINT_EDIT_FRAME::SaveLibraryAs().

◆ GetBoardFileDesc()

PLUGIN_FILE_DESC EAGLE_PLUGIN::GetBoardFileDesc ( ) const
inlineoverridevirtual

Returns board file description for the PLUGIN.

Reimplemented from PLUGIN.

Definition at line 134 of file eagle_plugin.h.

References _HKI.

◆ GetEnumeratedFootprint()

const FOOTPRINT * PLUGIN::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 GPCB_PLUGIN, and PCB_PLUGIN.

Definition at line 201 of file plugin.cpp.

References PLUGIN::FootprintLoad().

Referenced by PANEL_FP_LIB_TABLE::convertLibrary(), FP_LIB_TABLE::GetEnumeratedFootprint(), and FOOTPRINT_EDIT_FRAME::SaveLibraryAs().

◆ GetFootprintFileDesc()

PLUGIN_FILE_DESC EAGLE_PLUGIN::GetFootprintFileDesc ( ) const
inlineoverridevirtual

Returns footprint file description for the PLUGIN.

Reimplemented from PLUGIN.

Definition at line 144 of file eagle_plugin.h.

References GetFootprintLibDesc().

◆ GetFootprintLibDesc()

PLUGIN_FILE_DESC EAGLE_PLUGIN::GetFootprintLibDesc ( ) const
inlineoverridevirtual

Returns footprint library description for the PLUGIN.

Reimplemented from PLUGIN.

Definition at line 139 of file eagle_plugin.h.

References _HKI.

Referenced by GetFootprintFileDesc().

◆ GetImportedCachedLibraryFootprints()

std::vector< FOOTPRINT * > EAGLE_PLUGIN::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 PLUGIN.

Definition at line 445 of file eagle_plugin.cpp.

References m_templates, and name.

◆ GetLibraryTimestamp()

long long EAGLE_PLUGIN::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 PLUGIN.

Definition at line 163 of file eagle_plugin.h.

References getModificationTime().

◆ getMinimumCopperLayerCount()

int EAGLE_PLUGIN::getMinimumCopperLayerCount ( ) const
private

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

Definition at line 3232 of file eagle_plugin.cpp.

References B_Cu, F_Cu, and IsCopperLayer().

Referenced by LoadBoard().

◆ getModificationTime()

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

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

Definition at line 3083 of file eagle_plugin.cpp.

Referenced by GetLibraryTimestamp().

◆ ImportFootprint()

FOOTPRINT * PLUGIN::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 GPCB_PLUGIN, and PCB_PLUGIN.

Definition at line 179 of file plugin.cpp.

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

Referenced by FOOTPRINT_EDIT_FRAME::ImportFootprint().

◆ init()

void EAGLE_PLUGIN::init ( const STRING_UTF8_MAP aProperties)
private

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

Definition at line 456 of file eagle_plugin.cpp.

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

Referenced by EAGLE_PLUGIN(), and LoadBoard().

◆ IsFootprintLibWritable()

bool EAGLE_PLUGIN::IsFootprintLibWritable ( 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 PLUGIN.

Definition at line 168 of file eagle_plugin.h.

◆ kicad_fontsize()

VECTOR2I EAGLE_PLUGIN::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 314 of file eagle_plugin.cpp.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ kicad_layer()

PCB_LAYER_ID EAGLE_PLUGIN::kicad_layer ( int  aLayer) const
private

Convert an Eagle layer to a KiCad layer.

Definition at line 2902 of file eagle_plugin.cpp.

References UNDEFINED_LAYER.

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

◆ kicad_x()

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

Definition at line 205 of file eagle_plugin.h.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ kicad_y()

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

Convert an Eagle distance to a KiCad distance.

Definition at line 204 of file eagle_plugin.h.

References ECOORD::ToPcbUnits().

Referenced by loadPlain().

◆ loadAllSections()

void EAGLE_PLUGIN::loadAllSections ( wxXmlNode *  aDocument)
private

◆ LoadBoard()

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

Load information from some input file format that this PLUGIN 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.
aProgressReporteran optional progress reporter
aLineCounta line count (necessary if a progress reporter is supplied)
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 PLUGIN.

Definition at line 322 of file eagle_plugin.cpp.

References _, centerBoard(), XPATH::Contents(), BOARD::GetDesignSettings(), getMinimumCopperLayerCount(), NETCLASS::GetTrackWidth(), NETCLASS::GetViaDiameter(), NETCLASS::GetViaDrill(), init(), PROGRESS_REPORTER::KeepRefreshing(), KiROUND(), loadAllSections(), 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 EAGLE_PLUGIN::loadClasses ( wxXmlNode *  aClasses)
private

◆ loadDesignRules()

void EAGLE_PLUGIN::loadDesignRules ( wxXmlNode *  aDesignRules)
private

Definition at line 570 of file eagle_plugin.cpp.

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

Referenced by loadAllSections().

◆ loadElements()

◆ loadLayerDefs()

◆ loadLibraries()

void EAGLE_PLUGIN::loadLibraries ( wxXmlNode *  aLibs)
private

Definition at line 1149 of file eagle_plugin.cpp.

References library.

Referenced by loadAllSections().

◆ loadLibrary()

void EAGLE_PLUGIN::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 1091 of file eagle_plugin.cpp.

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

◆ loadPlain()

void EAGLE_PLUGIN::loadPlain ( wxXmlNode *  aPlain)
private

Definition at line 652 of file eagle_plugin.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(), ZONE::GetDefaultHatchPitch(), BOARD::GetDesignSettings(), GetLineLength(), BOARD_DESIGN_SETTINGS::GetLineThickness(), ZONE::GetPosition(), BOARD_DESIGN_SETTINGS::GetTextSize(), 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(), 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 * EAGLE_PLUGIN::makeFootprint ( wxXmlNode *  aPackage,
const wxString &  aPkgName 
)
private

Create a FOOTPRINT from an Eagle package.

Definition at line 1760 of file eagle_plugin.cpp.

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

◆ mapEagleLayersToKicad()

void EAGLE_PLUGIN::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 2872 of file eagle_plugin.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 EAGLE_PLUGIN::orientFootprintAndText ( FOOTPRINT aFootprint,
const EELEMENT e,
const EATTR aNameAttr,
const EATTR aValueAttr 
)
private

◆ orientFPText()

◆ packageCircle()

◆ packageHole()

void EAGLE_PLUGIN::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 2376 of file eagle_plugin.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 EAGLE_PLUGIN::packageSMD ( FOOTPRINT aFootprint,
wxXmlNode *  aTree 
) const
private

◆ packageText()

◆ packageWire()

◆ PluginName()

const wxString EAGLE_PLUGIN::PluginName ( ) const
inlineoverridevirtual

Return a brief hard coded name for this PLUGIN.

Implements PLUGIN.

Definition at line 132 of file eagle_plugin.h.

◆ PrefetchLib()

void PLUGIN::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 174 of file plugin.cpp.

Referenced by FP_LIB_TABLE::PrefetchLib().

◆ 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 CADSTAR_PCB_ARCHIVE_PLUGIN.

Definition at line 73 of file plugin_common_layer_mapping.h.

References LAYER_REMAPPABLE_PLUGIN::m_layer_mapping_handler.

Referenced by CADSTAR_PCB_ARCHIVE_PLUGIN::CADSTAR_PCB_ARCHIVE_PLUGIN(), EAGLE_PLUGIN(), PCB_EDIT_FRAME::OpenProjectFiles(), and CADSTAR_PCB_ARCHIVE_PLUGIN::RegisterLayerMappingCallback().

◆ SaveBoard()

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

Write aBoard to a storage file in a format that this PLUGIN 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.
aProgressReporteran optional progress reporter
Exceptions
IO_ERRORif there is a problem saving or exporting.

Reimplemented in CLIPBOARD_IO, IPC2581_PLUGIN, and PCB_PLUGIN.

Definition at line 158 of file plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PCB_EDIT_FRAME::GenIPC2581File(), IO_MGR::Save(), PCB_EDIT_FRAME::SavePcbCopy(), and PCB_EDIT_FRAME::SavePcbFile().

◆ setKeepoutSettingsToZone()

◆ SetQueryUserCallback()

virtual void PLUGIN::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 315 of file io_mgr.h.

Referenced by PCB_CONTROL::AppendBoard(), and PCB_EDIT_FRAME::OpenProjectFiles().

◆ transferPad()

Member Data Documentation

◆ m_board

BOARD* EAGLE_PLUGIN::m_board
private

which BOARD is being worked on, no ownership here

Definition at line 358 of file eagle_plugin.h.

Referenced by init(), LoadBoard(), loadLayerDefs(), and loadPlain().

◆ m_classMap

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

Definition at line 339 of file eagle_plugin.h.

◆ m_cu_map

int EAGLE_PLUGIN::m_cu_map[17]
private

map eagle to KiCad, cu layers only.

Definition at line 333 of file eagle_plugin.h.

Referenced by clear_cu_map(), and loadLayerDefs().

◆ m_customRules

wxString EAGLE_PLUGIN::m_customRules
private

Definition at line 341 of file eagle_plugin.h.

Referenced by LoadBoard().

◆ m_doneCount

unsigned EAGLE_PLUGIN::m_doneCount
private

Definition at line 361 of file eagle_plugin.h.

Referenced by checkpoint(), and loadAllSections().

◆ m_eagleLayers

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

Eagle layer data stored by layer number.

Definition at line 334 of file eagle_plugin.h.

Referenced by loadLayerDefs().

◆ m_eagleLayersIds

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

Eagle layer ids stored by layer name.

Definition at line 335 of file eagle_plugin.h.

Referenced by loadLayerDefs().

◆ m_hole_count

int EAGLE_PLUGIN::m_hole_count
private

generates unique footprint names from eagle "hole"s.

Definition at line 347 of file eagle_plugin.h.

Referenced by init(), and loadPlain().

◆ m_lastProgressCount

unsigned EAGLE_PLUGIN::m_lastProgressCount
private

Definition at line 362 of file eagle_plugin.h.

Referenced by checkpoint().

◆ m_layer_map

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

Map of Eagle layers to KiCad layers.

Eagle class number to KiCad netclass

Definition at line 336 of file eagle_plugin.h.

◆ m_layer_mapping_handler

LAYER_MAPPING_HANDLER LAYER_REMAPPABLE_PLUGIN::m_layer_mapping_handler
protectedinherited

◆ m_lib_path

wxString EAGLE_PLUGIN::m_lib_path
private

Definition at line 370 of file eagle_plugin.h.

◆ m_min_annulus

int EAGLE_PLUGIN::m_min_annulus
private

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

Definition at line 368 of file eagle_plugin.h.

Referenced by init(), and LoadBoard().

◆ m_min_hole

int EAGLE_PLUGIN::m_min_hole
private

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

Definition at line 366 of file eagle_plugin.h.

Referenced by init(), and LoadBoard().

◆ m_min_trace

int EAGLE_PLUGIN::m_min_trace
private

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

Definition at line 365 of file eagle_plugin.h.

Referenced by init(), and LoadBoard().

◆ m_min_via

int EAGLE_PLUGIN::m_min_via
private

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

Definition at line 367 of file eagle_plugin.h.

Referenced by init(), and LoadBoard().

◆ m_mod_time

wxDateTime EAGLE_PLUGIN::m_mod_time
private

Definition at line 371 of file eagle_plugin.h.

◆ m_pads_to_nets

NET_MAP EAGLE_PLUGIN::m_pads_to_nets
private

net list

Definition at line 349 of file eagle_plugin.h.

Referenced by init().

◆ m_progressReporter

PROGRESS_REPORTER* EAGLE_PLUGIN::m_progressReporter
private

optional; may be nullptr

Definition at line 360 of file eagle_plugin.h.

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

◆ m_props

const STRING_UTF8_MAP* EAGLE_PLUGIN::m_props
private

passed via Save() or Load(), no ownership, may be NULL.

Definition at line 357 of file eagle_plugin.h.

Referenced by init().

◆ m_rules

ERULES* EAGLE_PLUGIN::m_rules
private

Eagle design rules.

Definition at line 343 of file eagle_plugin.h.

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

◆ m_templates

std::map<wxString, FOOTPRINT*> EAGLE_PLUGIN::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 351 of file eagle_plugin.h.

Referenced by GetImportedCachedLibraryFootprints().

◆ m_totalCount

unsigned EAGLE_PLUGIN::m_totalCount
private

for progress reporting

Definition at line 363 of file eagle_plugin.h.

Referenced by checkpoint(), and loadAllSections().

◆ m_xpath

XPATH* EAGLE_PLUGIN::m_xpath
private

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

Definition at line 344 of file eagle_plugin.h.

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


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