59 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
64 std::map<wxString, int> localPower48VNetCodes;
66 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
70 for(
SCH_ITEM* item : subgraph->GetItems() )
76 if(
pin->IsLocalPower() )
78 wxString netName =
pin->GetDefaultNetName( subgraph->GetSheet() );
80 if( netName ==
"+48V" )
82 wxString sheetPath = subgraph->GetSheet().PathHumanReadable();
83 localPower48VNetCodes[sheetPath] = key.Netcode;
92 BOOST_REQUIRE_MESSAGE( localPower48VNetCodes.size() >= 2,
93 "Expected +48V local power pins on multiple sheets" );
97 int firstNetCode = -1;
100 for(
const auto& [sheetPath, netCode] : localPower48VNetCodes )
102 if( firstNetCode == -1 )
104 firstNetCode = netCode;
106 else if( netCode != firstNetCode )
115 BOOST_CHECK_MESSAGE( !allSame,
116 "Local power ports +48V on different sheets should NOT be connected. "
117 "Each sheet should have its own isolated +48V net." );