63 SCH_SCREEN* screen = m_schematic->RootScreen();
65 path.push_back( &m_schematic->Root() );
92 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
93 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
102 bool connected =
false;
112 BOOST_CHECK_MESSAGE( !connected,
"Stacked NC pins should not be connected" );
118 BOOST_CHECK( conn1 );
119 BOOST_CHECK( conn2 );
123 BOOST_CHECK_MESSAGE( conn1->
SubgraphCode() != conn2->
SubgraphCode(),
"Stacked NC pins should be in different subgraphs" );
132 SCH_SCREEN* screen = m_schematic->RootScreen();
134 path.push_back( &m_schematic->Root() );
161 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
162 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
173 BOOST_CHECK( conn1 );
174 BOOST_CHECK( conn2 );
187 SCH_SCREEN* screen = m_schematic->RootScreen();
189 path.push_back( &m_schematic->Root() );
211 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
212 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
217 std::vector<SCH_PIN*> pins = sym1->
GetPins( &
path );
224 BOOST_CHECK( conn1 );
225 BOOST_CHECK( conn2 );
229 BOOST_CHECK_MESSAGE( conn1->
SubgraphCode() != conn2->
SubgraphCode(),
"Stacked NC pins on same symbol should not be connected" );
237 SCH_SCREEN* screen = m_schematic->RootScreen();
239 path.push_back( &m_schematic->Root() );
274 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
275 m_schematic->ConnectionGraph()->RunERC();
289 SCH_SCREEN* screen = m_schematic->RootScreen();
291 path.push_back( &m_schematic->Root() );
321 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
322 m_schematic->ConnectionGraph()->RunERC();
337 SCH_SCREEN* screen = m_schematic->RootScreen();
339 path.push_back( &m_schematic->Root() );
373 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
374 m_schematic->ConnectionGraph()->RunERC();
396 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
397 m_schematic->ConnectionGraph()->RunERC();
Container for ERC settings.
std::map< int, SEVERITY > m_ERCSeverities
int TestPinToPin()
Checks the full netlist against the pin-to-pin connectivity requirements.
int TestNoConnectPins()
In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type.
Define a library symbol object.
const LIB_ID & GetLibId() const override
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
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.
void SetNumber(const wxString &aNumber)
void SetPosition(const VECTOR2I &aPos) override
void SetType(ELECTRICAL_PINTYPE aType)
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
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 UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
An implementation of the RC_ITEM_LIST interface which uses the global SHEETLIST to fulfill the contra...
int GetCount(int aSeverity=-1) const override
@ ERCE_NOCONNECT_CONNECTED
A no connect symbol is connected to more than 1 pin.
@ ERCE_PIN_TO_PIN_WARNING
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
@ PT_NC
not connected (must be left open)
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
NC_PIN_CONNECTIVITY_FIXTURE()
std::unique_ptr< SCHEMATIC > m_schematic
SETTINGS_MANAGER m_settingsManager
BOOST_FIXTURE_TEST_CASE(StackedNCPins, NC_PIN_CONNECTIVITY_FIXTURE)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I