KiCad PCB EDA Suite
Loading...
Searching...
No Matches
backannotate.cpp File Reference
#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 <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)
 
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 the final PCB pin map.
 
static SPIN_STYLE orientLabel (SCH_PIN *aPin)
 
void addConnections (SCH_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath, std::set< SCH_ITEM * > &connectedItems)
 

Function Documentation

◆ addConnections()

void addConnections ( SCH_ITEM * aItem,
const SCH_SHEET_PATH & aSheetPath,
std::set< SCH_ITEM * > & connectedItems )

◆ netsInUnitOrder()

static std::vector< wxString > netsInUnitOrder ( const std::vector< wxString > & aPins,
const std::map< wxString, wxString > & aNetByPin )
static

Definition at line 55 of file backannotate.cpp.

References kv.

Referenced by BACK_ANNOTATE::applyChangelist(), and PlanBackannotateUnitSwaps().

◆ orientLabel()

◆ PlanBackannotateUnitSwaps()

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 the final PCB pin 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 78 of file backannotate.cpp.

References BACKANNOTATE_UNIT_SWAP_PLAN::m_identity, BACKANNOTATE_UNIT_SWAP_PLAN::m_mappingOk, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_schNetsByPin, BACKANNOTATE_UNIT_SWAP_PLAN::m_steps, BACKANNOTATE_UNIT_SWAP_PLAN::m_swappedCandidateIndices, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_unitPinNumbers, and netsInUnitOrder().

Referenced by BACK_ANNOTATE::applyChangelist(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().