|
KiCad PCB EDA Suite
|
Classes | |
| struct | RELATED_FILES |
| Result of detecting related PADS project files. More... | |
Enumerations | |
| enum class | PADS_FILE_TYPE { UNKNOWN , PCB_ASCII , SCHEMATIC_ASCII } |
| Types of PADS files that can be detected. More... | |
Functions | |
| KIID | GenerateDeterministicUuid (const std::string &aIdentifier) |
| Generate a deterministic KIID from a PADS component identifier. | |
| PADS_FILE_TYPE | DetectPadsFileType (const wxString &aFilePath) |
| Detect the type of a PADS file by examining its header. | |
| RELATED_FILES | FindRelatedPadsFiles (const wxString &aFilePath) |
| Find related PADS project files from a given source file. | |
| int | ParseInt (const std::string &aStr, int aDefault=0, const std::string &aContext={}) |
| Parse integer from string with error context. | |
| double | ParseDouble (const std::string &aStr, double aDefault=0.0, const std::string &aContext={}) |
| Parse double from string with error context. | |
| wxString | ConvertInvertedNetName (const std::string &aNetName) |
| Convert a PADS net name to KiCad format, handling inverted signal notation. | |
| LINE_STYLE | PadsLineStyleToKiCad (int aPadsStyle) |
| Convert a PADS line style integer to a KiCad LINE_STYLE enum value. | |
|
strong |
Types of PADS files that can be detected.
| Enumerator | |
|---|---|
| UNKNOWN | |
| PCB_ASCII | PADS PowerPCB ASCII (.asc) |
| SCHEMATIC_ASCII | PADS Logic ASCII (.asc or .txt) |
Definition at line 61 of file pads_common.h.
| wxString PADS_COMMON::ConvertInvertedNetName | ( | const std::string & | aNetName | ) |
Convert a PADS net name to KiCad format, handling inverted signal notation.
PADS uses a "/" prefix to indicate inverted signals (e.g. "/RESET"). KiCad uses overbar notation "~{name}" for the same purpose. Non-inverted names pass through unchanged.
This function is shared between the PCB and schematic importers to ensure both sides produce identical net names.
| aNetName | Raw PADS net name. |
Definition at line 282 of file pads_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PADS_SCH::PADS_SCH_SCHEMATIC_BUILDER::convertNetName(), PCB_IO_PADS::ensureNet(), PCB_IO_PADS_BINARY::ensureNet(), PCB_IO_PADS::generateDrcRules(), PCB_IO_PADS::loadBoardSetup(), PCB_IO_PADS::loadClusterGroups(), PCB_IO_PADS::loadCopperShapes(), PCB_IO_PADS::loadFootprints(), PCB_IO_PADS::loadTestPoints(), PCB_IO_PADS::loadTracksAndVias(), PCB_IO_PADS_BINARY::loadTracksAndVias(), PCB_IO_PADS::loadZones(), and PCB_IO_PADS_BINARY::loadZones().
| PADS_FILE_TYPE PADS_COMMON::DetectPadsFileType | ( | const wxString & | aFilePath | ) |
Detect the type of a PADS file by examining its header.
| aFilePath | Path to the file to examine. |
Definition at line 98 of file pads_common.cpp.
References PCB_ASCII, SCHEMATIC_ASCII, and UNKNOWN.
Referenced by BOOST_AUTO_TEST_CASE(), FindRelatedPadsFiles(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
| RELATED_FILES PADS_COMMON::FindRelatedPadsFiles | ( | const wxString & | aFilePath | ) |
Find related PADS project files from a given source file.
When importing a PADS PCB file, looks for matching schematic files. When importing a PADS schematic file, looks for matching PCB files. Matches are found by:
| aFilePath | Path to the source file being imported. |
Definition at line 133 of file pads_common.cpp.
References DetectPadsFileType(), PCB_ASCII, result, SCHEMATIC_ASCII, and UNKNOWN.
Referenced by BOOST_AUTO_TEST_CASE(), and IMPORT_PROJ_HELPER::ImportPadsFiles().
| KIID PADS_COMMON::GenerateDeterministicUuid | ( | const std::string & | aIdentifier | ) |
Generate a deterministic KIID from a PADS component identifier.
This function creates a reproducible UUID based on the input string, enabling cross-probe linking between schematic symbols and PCB footprints when both are imported from the same PADS project.
The UUID is generated using a hash of the input string formatted into a valid UUID structure. The same input will always produce the same UUID.
| aIdentifier | String identifying the component (typically refdes or combination of part type and refdes). |
Definition at line 36 of file pads_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_IO_PADS::loadFootprints(), PCB_IO_PADS_BINARY::loadFootprints(), and SCH_IO_PADS::LoadSchematicFile().
| LINE_STYLE PADS_COMMON::PadsLineStyleToKiCad | ( | int | aPadsStyle | ) |
Convert a PADS line style integer to a KiCad LINE_STYLE enum value.
PADS stores line style as an unsigned int that should be interpreted as a signed int8_t for mapping.
Definition at line 294 of file pads_common.cpp.
References DASH, DASHDOT, DASHDOTDOT, DOT, and SOLID.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PADS_SCH::PADS_SCH_SYMBOL_BUILDER::createShape(), PADS_SCH::PADS_SCH_SYMBOL_BUILDER::createShapes(), and SCH_IO_PADS::LoadSchematicFile().
| double PADS_COMMON::ParseDouble | ( | const std::string & | aStr, |
| double | aDefault = 0.0, | ||
| const std::string & | aContext = {} ) |
Parse double from string with error context.
Returns aDefault on failure and logs a trace warning.
Definition at line 263 of file pads_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PADS_SCH::PADS_SCH_PARSER::parseGraphicPrimitive(), PADS_IO::PARSER::parseSectionPARTDECAL(), and PADS_IO::PARSER::parseSectionTEXT().
| int PADS_COMMON::ParseInt | ( | const std::string & | aStr, |
| int | aDefault = 0, | ||
| const std::string & | aContext = {} ) |
Parse integer from string with error context.
Returns aDefault on failure and logs a trace warning.
Definition at line 244 of file pads_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PADS_IO::expandShortcutPattern(), PADS_IO::PARSER::parseSectionCLUSTER(), PADS_IO::PARSER::parseSectionNETS(), PADS_SCH::PADS_SCH_PARSER::parseSectionOFFPAGEREFS(), PADS_IO::PARSER::parseSectionPARTS(), PADS_IO::PARSER::parseSectionPARTTYPE(), PADS_IO::PARSER::parseSectionTEXT(), PADS_SCH::PADS_SCH_PARSER::parseSectionTIEDOTS(), and PADS_SCH::PADS_SCH_PARSER::parseSymbolDef().