55 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
60 std::map<wxString, int> localPower48VNetCodes;
62 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
66 for(
SCH_ITEM* item : subgraph->GetItems() )
72 if(
pin->IsLocalPower() )
74 wxString netName =
pin->GetDefaultNetName( subgraph->GetSheet() );
76 if( netName ==
"+48V" )
78 wxString sheetPath = subgraph->GetSheet().PathHumanReadable();
79 localPower48VNetCodes[sheetPath] = key.Netcode;
88 BOOST_REQUIRE_MESSAGE( localPower48VNetCodes.size() >= 2,
89 "Expected +48V local power pins on multiple sheets" );
93 int firstNetCode = -1;
96 for(
const auto& [sheetPath, netCode] : localPower48VNetCodes )
98 if( firstNetCode == -1 )
100 firstNetCode = netCode;
102 else if( netCode != firstNetCode )
112 "Local power ports +48V on different sheets should NOT be connected. "
113 "Each sheet should have its own isolated +48V net." );