|
KiCad PCB EDA Suite
|
#include <map>#include <string_utils.h>#include <lib_id.h>#include <iostream>#include <math/vector2d.h>#include <set>Go to the source code of this file.
Functions | |
| LIB_ID | AltiumToKiCadLibID (const wxString &aLibName, const wxString &aLibReference) |
| wxString | AltiumPropertyToKiCadString (const wxString &aString) |
| wxString | AltiumEscapeTextVars (const wxString &aText) |
| Escape the KiCad variables and expressions in literal Altium text, which Altium shows as typed. | |
| wxString | AltiumSchSpecialStringsToKiCadVariables (const wxString &aString, const std::map< wxString, wxString > &aOverrides, std::set< wxString > *aUnmapped=nullptr) |
| Convert the special strings in Altium schematic text to KiCad variables. | |
| wxString | AltiumPcbSpecialStringsToKiCadStrings (const wxString &aString, const std::map< wxString, wxString > &aOverrides, std::set< wxString > *aUnmapped=nullptr) |
| Convert the special strings in Altium PCB text to KiCad variables. | |
| wxString | AltiumPinNamesToKiCad (wxString &aString) |
| wxString | AltiumPinDesignatorToKiCad (const wxString &aDesignator) |
| Convert an Altium pin designator string to the equivalent KiCad pin number. | |
| VECTOR2I | AltiumGetEllipticalPos (double aMajor, double aMinor, double aAngleRadians) |
| wxString AltiumEscapeTextVars | ( | const wxString & | aText | ) |
Escape the KiCad variables and expressions in literal Altium text, which Altium shows as typed.
Definition at line 94 of file altium_parser_utils.cpp.
References result.
Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::AddTextBox(), and AltiumSchSpecialStringsToKiCadVariables().
| VECTOR2I AltiumGetEllipticalPos | ( | double | aMajor, |
| double | aMinor, | ||
| double | aAngleRadians ) |
Definition at line 323 of file altium_parser_utils.cpp.
| wxString AltiumPcbSpecialStringsToKiCadStrings | ( | const wxString & | aString, |
| const std::map< wxString, wxString > & | aOverrides, | ||
| std::set< wxString > * | aUnmapped = nullptr ) |
Convert the special strings in Altium PCB text to KiCad variables.
| [out] | aUnmapped,when | not null, collects each variable that is not an override, which KiCad cannot resolve by itself. |
Definition at line 197 of file altium_parser_utils.cpp.
Referenced by BOOST_DATA_TEST_CASE(), ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer(), and ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer().
| wxString AltiumPinDesignatorToKiCad | ( | const wxString & | aDesignator | ) |
Convert an Altium pin designator string to the equivalent KiCad pin number.
Altium represents a pin that electrically ties multiple physical pads by placing all designators in a single comma-separated string (e.g. "1,2,3" or "1, 2, 3"). KiCad represents the same construct with stacked-pin bracket notation (e.g. "[1,2,3]"). The input string is always stripped of surrounding whitespace; if it contains no comma it is returned after that trim.
Definition at line 293 of file altium_parser_utils.cpp.
References EscapeStackedPinItem().
Referenced by BOOST_DATA_TEST_CASE(), and SCH_IO_ALTIUM::ParsePin().
| wxString AltiumPinNamesToKiCad | ( | wxString & | aString | ) |
Definition at line 279 of file altium_parser_utils.cpp.
References AltiumPropertyToKiCadString().
Referenced by SCH_IO_ALTIUM::ParsePin().
| wxString AltiumPropertyToKiCadString | ( | const wxString & | aString | ) |
Definition at line 43 of file altium_parser_utils.cpp.
Referenced by AltiumPinNamesToKiCad(), ALTIUM_ASCII_PARSER::ReadProperties(), and ALTIUM_BINARY_PARSER::ReadProperties().
| wxString AltiumSchSpecialStringsToKiCadVariables | ( | const wxString & | aString, |
| const std::map< wxString, wxString > & | aOverrides, | ||
| std::set< wxString > * | aUnmapped = nullptr ) |
Convert the special strings in Altium schematic text to KiCad variables.
Literal text is escaped, since Altium shows a ${ or in it as typed.
| [out] | aUnmapped,when | not null, collects each variable that is not an override. |
Definition at line 127 of file altium_parser_utils.cpp.
References AltiumEscapeTextVars(), and result.
Referenced by BOOST_DATA_TEST_CASE(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibParameter(), and SCH_IO_ALTIUM::ParseParameter().
| LIB_ID AltiumToKiCadLibID | ( | const wxString & | aLibName, |
| const wxString & | aLibReference ) |
Definition at line 29 of file altium_parser_utils.cpp.
References CTX_LIBID, EscapeString(), LIB_ID::FixIllegalChars(), and LIB_ID::Parse().
Referenced by SCH_IO_ALTIUM::ParseComponent(), ALTIUM_PCB::ParseComponents6Data(), ALTIUM_PCB::ParseFootprint(), SCH_IO_ALTIUM::ParseImplementation(), SCH_IO_ALTIUM::ParseLibComponent(), and SCH_IO_ALTIUM::ParsePowerPort().