mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 09:01:42 +00:00
Add ERC check for off-grid bus entry
This commit is contained in:
parent
1a456ebcce
commit
d847e2bd92
@ -38,6 +38,7 @@
|
||||
#include <project_sch.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <sch_bus_entry.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <sch_marker.h>
|
||||
#include <sch_reference_list.h>
|
||||
@ -1664,6 +1665,22 @@ int ERC_TESTER::TestOffGridEndpoints()
|
||||
markers.emplace_back( new SCH_MARKER( ercItem, line->GetEndPoint() ) );
|
||||
}
|
||||
}
|
||||
if( item->Type() == SCH_BUS_WIRE_ENTRY_T )
|
||||
{
|
||||
SCH_BUS_WIRE_ENTRY* entry = static_cast<SCH_BUS_WIRE_ENTRY*>( item );
|
||||
|
||||
for( const VECTOR2I& point : entry->GetConnectionPoints() )
|
||||
{
|
||||
if( ( point.x % gridSize ) != 0
|
||||
|| ( point.y % gridSize ) != 0 )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_ENDPOINT_OFF_GRID );
|
||||
ercItem->SetItems( entry );
|
||||
|
||||
markers.emplace_back( new SCH_MARKER( ercItem, point ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( item->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
Loading…
Reference in New Issue
Block a user