|
KiCad PCB EDA Suite
|
#include <backannotate.h>#include <boost/property_tree/ptree.hpp>#include <confirm.h>#include <common.h>#include <dsnlexer.h>#include <ptree.h>#include <reporter.h>#include <sch_edit_frame.h>#include <sch_sheet_path.h>#include <sch_label.h>#include <lib_symbol.h>#include <schematic.h>#include <advanced_config.h>#include <connectivity/conn_facade.h>#include <sch_commit.h>#include <string_utils.h>#include <kiface_base.h>#include <wildcards_and_files_ext.h>#include <connection_graph.h>#include <limits>#include <set>#include <tool/tool_manager.h>#include <tools/sch_line_wire_bus_tool.h>#include <tools/sch_selection.h>#include <tools/sch_tool_utils.h>#include <wx/log.h>#include <fmt.h>#include <fmt/ranges.h>#include <fmt/xchar.h>Go to the source code of this file.
Functions | |
| static std::vector< wxString > | netsInUnitOrder (const std::vector< wxString > &aPins, const std::map< wxString, wxString > &aNetByPin) |
| bool | CollectBackannotatePcbNets (const SCH_SYMBOL &aSymbol, const SCH_SHEET_PATH &aSheetPath, const wxString &aVariantName, const std::map< wxString, wxString > &aPcbNetsByPad, std::map< wxString, wxString > &aPcbNetsByLogicalPin) |
| Append this unit's PCB nets to a map keyed by logical pin number, resolving pin-to-pad mappings. | |
| BACKANNOTATE_UNIT_SWAP_PLAN | PlanBackannotateUnitSwaps (const std::vector< BACKANNOTATE_UNIT_SWAP_CANDIDATE > &aCandidates, const std::map< wxString, wxString > &aPcbPinMap) |
| Compute a pure unit-swap plan from schematic-side unit definitions and PCB nets keyed by logical pin number. | |
| static SPIN_STYLE | orientLabel (SCH_PIN *aPin) |
| void | addConnections (SCH_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath, std::set< SCH_ITEM * > &connectedItems) |
| void addConnections | ( | SCH_ITEM * | aItem, |
| const SCH_SHEET_PATH & | aSheetPath, | ||
| std::set< SCH_ITEM * > & | connectedItems ) |
Definition at line 1186 of file backannotate.cpp.
References addConnections(), SCH_ITEM::ConnectedItems(), SCH_CONNECTIVITY::FACADE::Connection(), SCHEMATIC::Connectivity(), ADVANCED_CFG::GetCfg(), EDA_ITEM::m_Uuid, SCH_SHEET_PATH::PathRef(), and SCH_ITEM::Schematic().
Referenced by addConnections(), and BACK_ANNOTATE::processNetNameChange().
| bool CollectBackannotatePcbNets | ( | const SCH_SYMBOL & | aSymbol, |
| const SCH_SHEET_PATH & | aSheetPath, | ||
| const wxString & | aVariantName, | ||
| const std::map< wxString, wxString > & | aPcbNetsByPad, | ||
| std::map< wxString, wxString > & | aPcbNetsByLogicalPin ) |
Append this unit's PCB nets to a map keyed by logical pin number, resolving pin-to-pad mappings.
Return false if a pin's pads disagree or units assign different nets to a shared logical pin. The output may be partially populated on failure and must not be used for swap planning.
Definition at line 77 of file backannotate.cpp.
References ExpandStackedPinNotation(), SCH_SYMBOL::GetPins(), pad, and pin.
Referenced by BACK_ANNOTATE::applyChangelist(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and MAPPED_UNIT_SWAP_FIXTURE::Plan().
|
static |
Definition at line 53 of file backannotate.cpp.
References kv.
Referenced by BACK_ANNOTATE::applyChangelist(), and PlanBackannotateUnitSwaps().
|
static |
Definition at line 1117 of file backannotate.cpp.
References SPIN_STYLE::BOTTOM, flag, SCH_PIN::GetLibPin(), SCH_PIN::GetOrientation(), SCH_SYMBOL::GetOrientation(), SCH_ITEM::GetParentSymbol(), SPIN_STYLE::LEFT, SPIN_STYLE::MirrorX(), SPIN_STYLE::MirrorY(), PIN_DOWN, PIN_LEFT, PIN_RIGHT, PIN_UP, SPIN_STYLE::RIGHT, SPIN_STYLE::RotateCCW(), SYM_MIRROR_X, SYM_MIRROR_Y, SYM_ORIENT_0, SYM_ORIENT_180, SYM_ORIENT_270, SYM_ORIENT_90, and SPIN_STYLE::UP.
Referenced by BACK_ANNOTATE::processNetNameChange().
| BACKANNOTATE_UNIT_SWAP_PLAN PlanBackannotateUnitSwaps | ( | const std::vector< BACKANNOTATE_UNIT_SWAP_CANDIDATE > & | aCandidates, |
| const std::map< wxString, wxString > & | aPcbPinMap ) |
Compute a pure unit-swap plan from schematic-side unit definitions and PCB nets keyed by logical pin number.
The caller must resolve pin-to-pad mappings before constructing the PCB net map. This is shared by backannotation and unit tests so swap inference can be exercised without constructing a full schematic editor test harness.
Definition at line 129 of file backannotate.cpp.
References BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_schNetsByPin, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_unitPinNumbers, netsInUnitOrder(), and plan().
Referenced by BACK_ANNOTATE::applyChangelist(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and MAPPED_UNIT_SWAP_FIXTURE::Plan().