KiCad PCB EDA Suite
|
#include <array_options.h>
Public Types | |
enum | ARRAY_TYPE_T { ARRAY_GRID , ARRAY_CIRCULAR } |
Public Member Functions | |
ARRAY_GRID_OPTIONS () | |
TRANSFORM | GetTransform (int aN, const VECTOR2I &aPos) const override |
Get the transform of the n-th point in the array. | |
int | GetArraySize () const override |
The number of points in this array. | |
wxString | GetItemNumber (int n) const override |
Get the position number (name) for the n'th array point. | |
bool | ShouldNumberItems () const |
void | SetShouldNumber (bool aShouldNumber) |
bool | ShouldReannotateFootprints () const |
void | SetSShouldReannotateFootprints (bool aShouldReannotate) |
bool | GetNumberingStartIsSpecified () const |
void | SetNumberingStartIsSpecified (bool aIsSpecified) |
Public Attributes | |
bool | m_centred |
long | m_nx |
long | m_ny |
bool | m_horizontalThenVertical |
bool | m_reverseNumberingAlternate |
VECTOR2I | m_delta |
VECTOR2I | m_offset |
long | m_stagger |
bool | m_stagger_rows |
bool | m_2dArrayNumbering |
ARRAY_AXIS | m_pri_axis |
ARRAY_AXIS | m_sec_axis |
Protected Attributes | |
ARRAY_TYPE_T | m_type |
bool | m_shouldNumber |
True if this array numbers the new items. | |
bool | m_reannotateFootprints |
True if this array will rename any footprints to be unique. | |
bool | m_numberingStartIsSpecified |
True if this array's number starts from the preset point False if the array numbering starts from some externally provided point. | |
Private Member Functions | |
VECTOR2I | gtItemPosRelativeToItem0 (int n) const |
VECTOR2I | getGridCoords (int n) const |
Definition at line 144 of file array_options.h.
|
inherited |
Enumerator | |
---|---|
ARRAY_GRID | A grid (x*y) array. |
ARRAY_CIRCULAR | A circular array. |
Definition at line 40 of file array_options.h.
|
inline |
Definition at line 146 of file array_options.h.
|
overridevirtual |
The number of points in this array.
Implements ARRAY_OPTIONS.
Definition at line 29 of file array_options.cpp.
|
private |
Definition at line 35 of file array_options.cpp.
References m_horizontalThenVertical, m_nx, m_ny, and m_reverseNumberingAlternate.
Referenced by GetItemNumber(), and gtItemPosRelativeToItem0().
|
overridevirtual |
Get the position number (name) for the n'th array point.
n | array point index, from 0 to GetArraySize() - 1 |
Implements ARRAY_OPTIONS.
Definition at line 100 of file array_options.cpp.
References getGridCoords(), ARRAY_AXIS::GetItemNumber(), m_2dArrayNumbering, m_pri_axis, m_sec_axis, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlineinherited |
Definition at line 118 of file array_options.h.
Referenced by ARRAY_PAD_NUMBER_PROVIDER::ARRAY_PAD_NUMBER_PROVIDER().
|
overridevirtual |
Get the transform of the n-th point in the array.
aN | the index of the array point (0 is the original point) |
aPos | the existing item position |
Implements ARRAY_OPTIONS.
Definition at line 81 of file array_options.cpp.
References ANGLE_0, gtItemPosRelativeToItem0(), m_centred, m_delta, m_nx, m_ny, m_offset, VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 52 of file array_options.cpp.
References std::abs(), getGridCoords(), m_delta, m_horizontalThenVertical, m_offset, m_stagger, m_stagger_rows, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GetTransform().
|
inlineinherited |
Definition at line 123 of file array_options.h.
|
inlineinherited |
Definition at line 94 of file array_options.h.
|
inlineinherited |
Definition at line 108 of file array_options.h.
|
inlineinherited |
Definition at line 89 of file array_options.h.
|
inlineinherited |
Definition at line 103 of file array_options.h.
bool ARRAY_GRID_OPTIONS::m_2dArrayNumbering |
Definition at line 167 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().
bool ARRAY_GRID_OPTIONS::m_centred |
Definition at line 160 of file array_options.h.
Referenced by GetTransform().
VECTOR2I ARRAY_GRID_OPTIONS::m_delta |
Definition at line 163 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), GetTransform(), and gtItemPosRelativeToItem0().
bool ARRAY_GRID_OPTIONS::m_horizontalThenVertical |
Definition at line 162 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), getGridCoords(), and gtItemPosRelativeToItem0().
|
protectedinherited |
True if this array's number starts from the preset point False if the array numbering starts from some externally provided point.
Definition at line 140 of file array_options.h.
long ARRAY_GRID_OPTIONS::m_nx |
Definition at line 161 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), GetArraySize(), getGridCoords(), and GetTransform().
long ARRAY_GRID_OPTIONS::m_ny |
Definition at line 161 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), GetArraySize(), getGridCoords(), and GetTransform().
VECTOR2I ARRAY_GRID_OPTIONS::m_offset |
Definition at line 164 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), GetTransform(), and gtItemPosRelativeToItem0().
ARRAY_AXIS ARRAY_GRID_OPTIONS::m_pri_axis |
Definition at line 168 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().
|
protectedinherited |
True if this array will rename any footprints to be unique.
Definition at line 136 of file array_options.h.
bool ARRAY_GRID_OPTIONS::m_reverseNumberingAlternate |
Definition at line 162 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and getGridCoords().
ARRAY_AXIS ARRAY_GRID_OPTIONS::m_sec_axis |
Definition at line 168 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().
|
protectedinherited |
True if this array numbers the new items.
Definition at line 133 of file array_options.h.
long ARRAY_GRID_OPTIONS::m_stagger |
Definition at line 165 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and gtItemPosRelativeToItem0().
bool ARRAY_GRID_OPTIONS::m_stagger_rows |
Definition at line 166 of file array_options.h.
Referenced by BOOST_AUTO_TEST_CASE(), and gtItemPosRelativeToItem0().
|
protectedinherited |
Definition at line 130 of file array_options.h.