|
KiCad PCB EDA Suite
|
Go to the source code of this file.
Classes | |
| struct | PCB_GRID_AFFECTS |
| class | PCB_GRID_ITEM |
Enumerations | |
| enum class | PCB_GRID_TYPE { CARTESIAN = 0 , POLAR = 1 } |
| enum class | PCB_GRID_ROLE { CURSOR , ROUTING , PLACEMENT } |
Functions | |
| PCB_GRID_ITEM * | FindActiveGridAt (const BOARD &aBoard, const VECTOR2I &aPos, PCB_GRID_ROLE aRole) |
| Pick the grid item active for aRole at aPos. | |
| EDA_ANGLE | GridFrameAngleAt (const BOARD &aBoard, const VECTOR2I &aPos, PCB_GRID_ROLE aRole) |
| World frame angle of the grid active for aRole at aPos; ANGLE_0 when no grid applies. | |
| EDA_ANGLE | GridFrameRotationDelta (const EDA_ANGLE &aFrom, const EDA_ANGLE &aTo, const EDA_ANGLE &aRotationStep) |
Minimal rotation that re-aligns an item from frame angle aFrom to aTo, reduced modulo min( aRotationStep, 90° ) so step-aligned footprints stay step-aligned. | |
|
strong |
| Enumerator | |
|---|---|
| CURSOR | |
| ROUTING | |
| PLACEMENT | |
Definition at line 58 of file pcb_grid_item.h.
|
strong |
| Enumerator | |
|---|---|
| CARTESIAN | |
| POLAR | |
Definition at line 35 of file pcb_grid_item.h.
| PCB_GRID_ITEM * FindActiveGridAt | ( | const BOARD & | aBoard, |
| const VECTOR2I & | aPos, | ||
| PCB_GRID_ROLE | aRole ) |
Pick the grid item active for aRole at aPos.
Priority-descending; smaller coverage area wins ties.
Definition at line 425 of file pcb_grid_item.cpp.
References CURSOR, BOARD::Drawings(), grid, PCB_GRID_ITEM_T, PLACEMENT, ROUTING, and GRID_GEOMETRY::TakesPrecedenceOver().
Referenced by PCB_GRID_HELPER::Align(), and GridFrameAngleAt().
| EDA_ANGLE GridFrameAngleAt | ( | const BOARD & | aBoard, |
| const VECTOR2I & | aPos, | ||
| PCB_GRID_ROLE | aRole ) |
World frame angle of the grid active for aRole at aPos; ANGLE_0 when no grid applies.
Definition at line 469 of file pcb_grid_item.cpp.
References ANGLE_0, FindActiveGridAt(), and grid.
Referenced by EDIT_TOOL::doMoveSelection(), and BOARD_EDITOR_CONTROL::PlaceFootprint().
| EDA_ANGLE GridFrameRotationDelta | ( | const EDA_ANGLE & | aFrom, |
| const EDA_ANGLE & | aTo, | ||
| const EDA_ANGLE & | aRotationStep ) |
Minimal rotation that re-aligns an item from frame angle aFrom to aTo, reduced modulo min( aRotationStep, 90° ) so step-aligned footprints stay step-aligned.
Definition at line 478 of file pcb_grid_item.cpp.
References ANGLE_0, ANGLE_90, and EDA_ANGLE::Snapped().
Referenced by EDIT_TOOL::doMoveSelection(), and BOARD_EDITOR_CONTROL::PlaceFootprint().