KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ISSUE22864_FIXTURE Struct Reference

Public Member Functions

 ISSUE22864_FIXTURE ()
 
void LoadSchematic ()
 
std::map< VECTOR2I, std::vector< SCH_LINE * > > BuildPositionToWiresMap (SCH_SCREEN *aScreen)
 Build a map of positions to connected wires for the callback.
 
bool RunAlignmentAndVerify (SCH_SCREEN *aScreen, std::vector< EDA_ITEM * > &aSelection, const VECTOR2D &aGridSize, const std::string &aTestName)
 Run alignment on selected items and verify wire connectivity.
 
bool RunAlignmentAndVerifyNoSkew (SCH_SCREEN *aScreen, const std::vector< EDA_ITEM * > &aSelection, const VECTOR2D &aGridSize, const std::string &aTestName)
 Run alignment and verify that wires are not skewed.
 

Public Attributes

SETTINGS_MANAGER m_settingsManager
 
std::unique_ptr< SCHEMATICm_schematic
 

Detailed Description

Definition at line 75 of file test_issue22864_align_sheet_pins.cpp.

Constructor & Destructor Documentation

◆ ISSUE22864_FIXTURE()

ISSUE22864_FIXTURE::ISSUE22864_FIXTURE ( )
inline

Definition at line 77 of file test_issue22864_align_sheet_pins.cpp.

Member Function Documentation

◆ BuildPositionToWiresMap()

std::map< VECTOR2I, std::vector< SCH_LINE * > > ISSUE22864_FIXTURE::BuildPositionToWiresMap ( SCH_SCREEN * aScreen)
inline

Build a map of positions to connected wires for the callback.

Definition at line 87 of file test_issue22864_align_sheet_pins.cpp.

References SCH_LINE::GetEndPoint(), SCH_ITEM::GetLayer(), SCH_LINE::GetStartPoint(), SCH_SCREEN::Items(), LAYER_WIRE, EE_RTREE::OfType(), and SCH_LINE_T.

Referenced by RunAlignmentAndVerify(), and RunAlignmentAndVerifyNoSkew().

◆ LoadSchematic()

void ISSUE22864_FIXTURE::LoadSchematic ( )
inline

◆ RunAlignmentAndVerify()

bool ISSUE22864_FIXTURE::RunAlignmentAndVerify ( SCH_SCREEN * aScreen,
std::vector< EDA_ITEM * > & aSelection,
const VECTOR2D & aGridSize,
const std::string & aTestName )
inline

◆ RunAlignmentAndVerifyNoSkew()

bool ISSUE22864_FIXTURE::RunAlignmentAndVerifyNoSkew ( SCH_SCREEN * aScreen,
const std::vector< EDA_ITEM * > & aSelection,
const VECTOR2D & aGridSize,
const std::string & aTestName )
inline

Run alignment and verify that wires are not skewed.

This is used for single-sheet tests where connectivity to unselected items may break, but wires should remain straight (not skewed).

Parameters
aScreenthe schematic screen
aSelectionthe items to align
aGridSizethe grid size
aTestNamename for debug output
Returns
true if no wires are skewed

Definition at line 253 of file test_issue22864_align_sheet_pins.cpp.

References AlignSchematicItemsToGrid(), BOOST_TEST_MESSAGE(), BuildPositionToWiresMap(), EDA_ITEM::ClearFlags(), end, ENDPOINT, SCH_LINE::GetEndPoint(), SCH_ITEM::GetLayer(), SCH_SHEET::GetPins(), SCH_LINE::GetStartPoint(), grid, GRID_CONNECTABLE, EDA_ITEM::HasFlag(), SCH_SCREEN::Items(), LAYER_WIRE, SCH_ALIGNMENT_CALLBACKS::m_doMoveItem, SCH_ALIGNMENT_CALLBACKS::m_getConnectedDragItems, MoveSchematicItem(), EE_RTREE::OfType(), pin, SCH_LINE_T, SCH_SHEET_T, SELECTED, EDA_ITEM::SetFlags(), STARTPOINT, VECTOR2< T >::x, and VECTOR2< T >::y.

Member Data Documentation

◆ m_schematic

std::unique_ptr<SCHEMATIC> ISSUE22864_FIXTURE::m_schematic

Definition at line 408 of file test_issue22864_align_sheet_pins.cpp.

Referenced by LoadSchematic().

◆ m_settingsManager

SETTINGS_MANAGER ISSUE22864_FIXTURE::m_settingsManager

Definition at line 407 of file test_issue22864_align_sheet_pins.cpp.

Referenced by LoadSchematic().


The documentation for this struct was generated from the following file: