52 lib.
JumperPinGroups().push_back( { wxString(
"3" ), wxString(
"4" ) } );
57 pin->SetNumber( num );
60 pin->SetPosition( pos );
75 std::vector<SCH_PIN*> pins = symbol.
GetPins( &sheetPath );
84 if(
pin->GetNumber() ==
"1" )
86 else if(
pin->GetNumber() ==
"2" )
93 else if(
pin->GetNumber() ==
"3" )
95 else if(
pin->GetNumber() ==
"4" )
100 std::map<VECTOR2I, std::vector<SCH_ITEM*>> connection_map;
110 BOOST_CHECK( std::find( dupAConn.begin(), dupAConn.end(), dupB ) != dupAConn.end() );
112 BOOST_CHECK( std::find( dupBConn.begin(), dupBConn.end(), dupA ) != dupBConn.end() );
116 BOOST_CHECK( std::find( jumpCConn.begin(), jumpCConn.end(), jumpD ) != jumpCConn.end() );
118 BOOST_CHECK( std::find( jumpDConn.begin(), jumpDConn.end(), jumpC ) != jumpDConn.end() );
121 std::set<SCH_PIN*> mapPins;
122 for(
const auto& [pos, items] : connection_map )
124 mapPins.insert(
static_cast<SCH_PIN*
>( item ) );
129 for(
SCH_PIN*
pin : { powerPin, dupA, dupB, jumpC, jumpD } )
141 std::map<VECTOR2I, std::vector<SCH_ITEM*>> cmap;
191 BOOST_CHECK( cmap.count( ptsBB[0] ) );
192 BOOST_CHECK( cmap.count( ptsBB[1] ) );
206 BOOST_CHECK( cmap.count( ptsBW[0] ) );
207 BOOST_CHECK( cmap.count( ptsBW[1] ) );
221 symbol.
SetRef( &sheetPath,
"U1" );
230 BOOST_CHECK( cmap.count(
pin->GetPosition() ) );
void updateGenericItemConnectivity(const SCH_SHEET_PATH &aSheet, SCH_ITEM *aItem, std::map< VECTOR2I, std::vector< SCH_ITEM * > > &aConnectionMap)
Update the connectivity of items that are not pins or symbols.
void updateSymbolConnectivity(const SCH_SHEET_PATH &aSheet, SCH_SYMBOL *aSymbol, std::map< VECTOR2I, std::vector< SCH_ITEM * > > &aConnectionMap)
Update the connectivity of a symbol and its pins.
std::vector< std::pair< SCH_SHEET_PATH, SCH_PIN * > > m_global_power_pins
CONNECTION_GRAPH(SCHEMATIC *aSchematic=nullptr)
std::vector< SCH_ITEM * > m_items
All connectable items in the schematic.
Define a library symbol object.
const LIB_ID & GetLibId() const override
void SetDuplicatePinNumbersAreJumpers(bool aEnabled)
std::vector< std::set< wxString > > & JumperPinGroups()
Each jumper pin group is a set of pin numbers that should be treated as internally connected.
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Class for a bus to bus entry.
SCH_ITEM * m_connected_bus_items[2]
Pointer to the bus items (usually bus wires) connected to this bus-bus entry (either or both may be n...
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
Class for a wire to bus entry.
SCH_ITEM * m_connected_bus_item
Pointer to the bus item (usually a bus wire) connected to this bus-wire entry, if it is connected to ...
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
CONNECTION_TYPE Type() const
wxString Name(bool aIgnoreSheet=false) const
Base class for any item which can be embedded within the SCHEMATIC container class,...
const SCH_ITEM_VEC & ConnectedItems(const SCH_SHEET_PATH &aPath)
Retrieve the set of items connected to this item on the given sheet.
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
Segment description base class to describe items which have 2 end points (track, wire,...
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
void SetEndPoint(const VECTOR2I &aPosition)
void SetNumber(const wxString &aNumber)
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aPos) override
void SetType(ELECTRICAL_PINTYPE aType)
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
void SetValueFieldText(const wxString &aValue)
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
@ PT_INPUT
usual pin input: must be connected
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
@ BUS
This item represents a bus vector.
@ NET
This item represents a net.
std::vector< SCH_ITEM * > SCH_ITEM_VEC
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")
void boost_test_update_generic_connectivity()
void boost_test_update_symbol_connectivity()
BOOST_AUTO_TEST_CASE(SymbolConnectivityLinksPins)
VECTOR2< int32_t > VECTOR2I