KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_eagle.cpp File Reference
#include <sch_io/eagle/sch_io_eagle.h>
#include <locale_io.h>
#include <string_utf8_map.h>
#include <algorithm>
#include <memory>
#include <wx/filename.h>
#include <wx/string.h>
#include <wx/tokenzr.h>
#include <wx/wfstream.h>
#include <wx/txtstrm.h>
#include <wx/xml/xml.h>
#include <io/eagle/eagle_parser.h>
#include <string_utils.h>
#include <lib_id.h>
#include <project.h>
#include <project_sch.h>
#include <sch_bus_entry.h>
#include <sch_symbol.h>
#include <project/net_settings.h>
#include <sch_edit_frame.h>
#include <sch_junction.h>
#include <sch_io/kicad_legacy/sch_io_kicad_legacy.h>
#include <sch_marker.h>
#include <sch_screen.h>
#include <sch_pin.h>
#include <sch_shape.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_label.h>
#include <schematic.h>
#include <symbol_lib_table.h>
#include <wildcards_and_files_ext.h>
#include <progress_reporter.h>

Go to the source code of this file.

Functions

static int countChildren (wxXmlNode *aCurrentNode, const wxString &aName)
 Provide an easy access to the children of an XML node via their names.
 
static BOX2I getSheetBbox (SCH_SHEET *aSheet)
 Extract the net name part from a pin name (e.g. return 'GND' for pin named 'GND@2')
 
static wxString extractNetName (const wxString &aPinName)
 
static SYMBOL_ORIENTATION_T kiCadComponentRotation (float eagleDegrees)
 
static void eagleToKicadAlignment (EDA_TEXT *aText, int aEagleAlignment, int aRelDegress, bool aMirror, bool aSpin, int aAbsDegress)
 

Variables

static const std::map< wxString, ELECTRICAL_PINTYPEpinDirectionsMap
 Map of EAGLE pin type values to KiCad pin type values.
 

Function Documentation

◆ countChildren()

static int countChildren ( wxXmlNode *  aCurrentNode,
const wxString &  aName 
)
static

Provide an easy access to the children of an XML node via their names.

Parameters
aCurrentNodeis a pointer to a wxXmlNode, whose children will be mapped.
aNamethe name of the specific child names to be counted.
Returns
number of children with the give node name. Compute a bounding box for all items in a schematic sheet

Definition at line 91 of file sch_io_eagle.cpp.

Referenced by SCH_IO_EAGLE::loadLibrary(), SCH_IO_EAGLE::loadSchematic(), and SCH_IO_EAGLE::loadSegments().

◆ eagleToKicadAlignment()

◆ extractNetName()

static wxString extractNetName ( const wxString &  aPinName)
inlinestatic

Definition at line 125 of file sch_io_eagle.cpp.

Referenced by SCH_IO_EAGLE::addImplicitConnections().

◆ getSheetBbox()

static BOX2I getSheetBbox ( SCH_SHEET aSheet)
static

Extract the net name part from a pin name (e.g. return 'GND' for pin named 'GND@2')

Definition at line 113 of file sch_io_eagle.cpp.

References SCH_SHEET::GetScreen(), SCH_SCREEN::Items(), and BOX2< Vec >::Merge().

Referenced by SCH_IO_EAGLE::loadSchematic(), and SCH_IO_EAGLE::loadSheet().

◆ kiCadComponentRotation()

static SYMBOL_ORIENTATION_T kiCadComponentRotation ( float  eagleDegrees)
static

Definition at line 235 of file sch_io_eagle.cpp.

References SYM_ORIENT_0, SYM_ORIENT_180, SYM_ORIENT_270, and SYM_ORIENT_90.

Referenced by SCH_IO_EAGLE::loadInstance().

Variable Documentation

◆ pinDirectionsMap

const std::map<wxString, ELECTRICAL_PINTYPE> pinDirectionsMap
static
Initial value:
= {
{ wxT( "pas" ), ELECTRICAL_PINTYPE::PT_PASSIVE },
{ wxT( "out" ), ELECTRICAL_PINTYPE::PT_OUTPUT },
{ wxT( "in" ), ELECTRICAL_PINTYPE::PT_INPUT },
{ wxT( "nc" ), ELECTRICAL_PINTYPE::PT_NC },
{ wxT( "io" ), ELECTRICAL_PINTYPE::PT_BIDI },
}
@ PT_INPUT
usual pin input: must be connected
@ PT_NC
not connected (must be left open)
@ PT_OUTPUT
usual output
@ PT_TRISTATE
tris state bus pin
@ PT_BIDI
input or output (like port for a microprocessor)
@ PT_OPENCOLLECTOR
pin type open collector
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin

Map of EAGLE pin type values to KiCad pin type values.

Definition at line 71 of file sch_io_eagle.cpp.

Referenced by SCH_IO_EAGLE::loadSymbol().