59 SCH_SCREEN* screen = m_schematic->RootScreen();
61 path.push_back( &m_schematic->Root() );
88 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
89 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
98 bool connected =
false;
108 BOOST_CHECK_MESSAGE( !connected,
"Stacked NC pins should not be connected" );
114 BOOST_CHECK( conn1 );
115 BOOST_CHECK( conn2 );
119 BOOST_CHECK_MESSAGE( conn1->
SubgraphCode() != conn2->
SubgraphCode(),
"Stacked NC pins should be in different subgraphs" );
128 SCH_SCREEN* screen = m_schematic->RootScreen();
130 path.push_back( &m_schematic->Root() );
157 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
158 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
169 BOOST_CHECK( conn1 );
170 BOOST_CHECK( conn2 );
183 SCH_SCREEN* screen = m_schematic->RootScreen();
185 path.push_back( &m_schematic->Root() );
207 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
208 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
213 std::vector<SCH_PIN*> pins = sym1->
GetPins( &
path );
220 BOOST_CHECK( conn1 );
221 BOOST_CHECK( conn2 );
225 BOOST_CHECK_MESSAGE( conn1->
SubgraphCode() != conn2->
SubgraphCode(),
"Stacked NC pins on same symbol should not be connected" );
233 SCH_SCREEN* screen = m_schematic->RootScreen();
235 path.push_back( &m_schematic->Root() );
270 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
271 m_schematic->ConnectionGraph()->RunERC();
285 SCH_SCREEN* screen = m_schematic->RootScreen();
287 path.push_back( &m_schematic->Root() );
317 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
318 m_schematic->ConnectionGraph()->RunERC();
333 SCH_SCREEN* screen = m_schematic->RootScreen();
335 path.push_back( &m_schematic->Root() );
369 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
370 m_schematic->ConnectionGraph()->RunERC();
392 m_schematic->ConnectionGraph()->Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
393 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