KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ARRAY_GRID_OPTIONS Struct Reference

#include <array_options.h>

Inheritance diagram for ARRAY_GRID_OPTIONS:
ARRAY_OPTIONS

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 ShouldArrangeSelection () const
 
void SetShouldArrangeSelection (bool aShouldArrange)
 
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_arrangeSelection
 True if this array should arrange the selected items instead of creating an array of copies of the selection.
 
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
 

Detailed Description

Definition at line 164 of file array_options.h.

Member Enumeration Documentation

◆ ARRAY_TYPE_T

Enumerator
ARRAY_GRID 

A grid (x*y) array.

ARRAY_CIRCULAR 

A circular array.

Definition at line 41 of file array_options.h.

Constructor & Destructor Documentation

◆ ARRAY_GRID_OPTIONS()

ARRAY_GRID_OPTIONS::ARRAY_GRID_OPTIONS ( )
inline

Definition at line 166 of file array_options.h.

Member Function Documentation

◆ GetArraySize()

int ARRAY_GRID_OPTIONS::GetArraySize ( ) const
overridevirtual

The number of points in this array.

Implements ARRAY_OPTIONS.

Definition at line 29 of file array_options.cpp.

References m_nx, and m_ny.

◆ getGridCoords()

VECTOR2I ARRAY_GRID_OPTIONS::getGridCoords ( int  n) const
private

◆ GetItemNumber()

wxString ARRAY_GRID_OPTIONS::GetItemNumber ( int  n) const
overridevirtual

Get the position number (name) for the n'th array point.

Parameters
narray point index, from 0 to GetArraySize() - 1.
Returns
the point's name.

Implements ARRAY_OPTIONS.

Definition at line 99 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.

◆ GetNumberingStartIsSpecified()

bool ARRAY_OPTIONS::GetNumberingStartIsSpecified ( ) const
inlineinherited
Returns
is the numbering is enabled and should start at a point specified in these options or is it implicit according to the calling code?

Definition at line 134 of file array_options.h.

Referenced by ARRAY_PAD_NUMBER_PROVIDER::ARRAY_PAD_NUMBER_PROVIDER().

◆ GetTransform()

ARRAY_OPTIONS::TRANSFORM ARRAY_GRID_OPTIONS::GetTransform ( int  aN,
const VECTOR2I aPos 
) const
overridevirtual

Get the transform of the n-th point in the array.

Parameters
aNthe index of the array point (0 is the original point).
aPosthe existing item position.
Returns
a transform (an offset and a rotation)/

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.

◆ gtItemPosRelativeToItem0()

VECTOR2I ARRAY_GRID_OPTIONS::gtItemPosRelativeToItem0 ( int  n) const
private

◆ SetNumberingStartIsSpecified()

void ARRAY_OPTIONS::SetNumberingStartIsSpecified ( bool  aIsSpecified)
inlineinherited

Definition at line 139 of file array_options.h.

◆ SetShouldArrangeSelection()

void ARRAY_OPTIONS::SetShouldArrangeSelection ( bool  aShouldArrange)
inlineinherited

Definition at line 110 of file array_options.h.

◆ SetShouldNumber()

void ARRAY_OPTIONS::SetShouldNumber ( bool  aShouldNumber)
inlineinherited

Definition at line 97 of file array_options.h.

◆ SetSShouldReannotateFootprints()

void ARRAY_OPTIONS::SetSShouldReannotateFootprints ( bool  aShouldReannotate)
inlineinherited

Definition at line 124 of file array_options.h.

◆ ShouldArrangeSelection()

bool ARRAY_OPTIONS::ShouldArrangeSelection ( ) const
inlineinherited
Returns
true if arranging selection, false if creating an array of copies

Definition at line 105 of file array_options.h.

◆ ShouldNumberItems()

bool ARRAY_OPTIONS::ShouldNumberItems ( ) const
inlineinherited
Returns
are the items in this array numbered, or are all the items numbered the same?

Definition at line 92 of file array_options.h.

◆ ShouldReannotateFootprints()

bool ARRAY_OPTIONS::ShouldReannotateFootprints ( ) const
inlineinherited
Returns
are the footprints in this array reannotated to be unique (true), or do they keep the original annotation (false)?

Definition at line 119 of file array_options.h.

Member Data Documentation

◆ m_2dArrayNumbering

bool ARRAY_GRID_OPTIONS::m_2dArrayNumbering

Definition at line 187 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().

◆ m_arrangeSelection

bool ARRAY_OPTIONS::m_arrangeSelection
protectedinherited

True if this array should arrange the selected items instead of creating an array of copies of the selection.

Definition at line 153 of file array_options.h.

◆ m_centred

bool ARRAY_GRID_OPTIONS::m_centred

Definition at line 180 of file array_options.h.

Referenced by GetTransform().

◆ m_delta

VECTOR2I ARRAY_GRID_OPTIONS::m_delta

Definition at line 183 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), GetTransform(), and gtItemPosRelativeToItem0().

◆ m_horizontalThenVertical

bool ARRAY_GRID_OPTIONS::m_horizontalThenVertical

Definition at line 182 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), getGridCoords(), and gtItemPosRelativeToItem0().

◆ m_numberingStartIsSpecified

bool ARRAY_OPTIONS::m_numberingStartIsSpecified
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 160 of file array_options.h.

◆ m_nx

long ARRAY_GRID_OPTIONS::m_nx

Definition at line 181 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), GetArraySize(), getGridCoords(), and GetTransform().

◆ m_ny

long ARRAY_GRID_OPTIONS::m_ny

Definition at line 181 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), GetArraySize(), getGridCoords(), and GetTransform().

◆ m_offset

VECTOR2I ARRAY_GRID_OPTIONS::m_offset

Definition at line 184 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), GetTransform(), and gtItemPosRelativeToItem0().

◆ m_pri_axis

ARRAY_AXIS ARRAY_GRID_OPTIONS::m_pri_axis

Definition at line 188 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().

◆ m_reannotateFootprints

bool ARRAY_OPTIONS::m_reannotateFootprints
protectedinherited

True if this array will rename any footprints to be unique.

Definition at line 156 of file array_options.h.

◆ m_reverseNumberingAlternate

bool ARRAY_GRID_OPTIONS::m_reverseNumberingAlternate

Definition at line 182 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and getGridCoords().

◆ m_sec_axis

ARRAY_AXIS ARRAY_GRID_OPTIONS::m_sec_axis

Definition at line 188 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetItemNumber().

◆ m_shouldNumber

bool ARRAY_OPTIONS::m_shouldNumber
protectedinherited

True if this array numbers the new items.

Definition at line 149 of file array_options.h.

◆ m_stagger

long ARRAY_GRID_OPTIONS::m_stagger

Definition at line 185 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and gtItemPosRelativeToItem0().

◆ m_stagger_rows

bool ARRAY_GRID_OPTIONS::m_stagger_rows

Definition at line 186 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and gtItemPosRelativeToItem0().

◆ m_type

ARRAY_TYPE_T ARRAY_OPTIONS::m_type
protectedinherited

Definition at line 146 of file array_options.h.


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