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

#include <array_options.h>

Inheritance diagram for ARRAY_CIRCULAR_OPTIONS:
ARRAY_OPTIONS

Public Types

enum  ARRAY_TYPE_T { ARRAY_GRID , ARRAY_CIRCULAR }
 

Public Member Functions

 ARRAY_CIRCULAR_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

long m_nPts
 number of point in the array
 
EDA_ANGLE m_angle
 angle between points, or 0 for each point separated by this value (decideg)
 
VECTOR2I m_centre
 
bool m_rotateItems
 
ARRAY_AXIS m_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.
 

Detailed Description

Definition at line 180 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 40 of file array_options.h.

Constructor & Destructor Documentation

◆ ARRAY_CIRCULAR_OPTIONS()

ARRAY_CIRCULAR_OPTIONS::ARRAY_CIRCULAR_OPTIONS ( )
inline

Definition at line 182 of file array_options.h.

Member Function Documentation

◆ GetArraySize()

int ARRAY_CIRCULAR_OPTIONS::GetArraySize ( ) const
overridevirtual

The number of points in this array.

Implements ARRAY_OPTIONS.

Definition at line 120 of file array_options.cpp.

References m_nPts.

◆ GetItemNumber()

wxString ARRAY_CIRCULAR_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 148 of file array_options.cpp.

References ARRAY_AXIS::GetItemNumber(), and m_axis.

◆ 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 118 of file array_options.h.

Referenced by ARRAY_PAD_NUMBER_PROVIDER::ARRAY_PAD_NUMBER_PROVIDER().

◆ GetTransform()

ARRAY_OPTIONS::TRANSFORM ARRAY_CIRCULAR_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 126 of file array_options.cpp.

References ANGLE_0, EDA_ANGLE::AsDegrees(), DEGREES_T, EDA_ANGLE::IsZero(), m_angle, m_centre, m_nPts, m_rotateItems, and RotatePoint().

◆ SetNumberingStartIsSpecified()

void ARRAY_OPTIONS::SetNumberingStartIsSpecified ( bool  aIsSpecified)
inlineinherited

Definition at line 123 of file array_options.h.

◆ SetShouldNumber()

void ARRAY_OPTIONS::SetShouldNumber ( bool  aShouldNumber)
inlineinherited

Definition at line 94 of file array_options.h.

◆ SetSShouldReannotateFootprints()

void ARRAY_OPTIONS::SetSShouldReannotateFootprints ( bool  aShouldReannotate)
inlineinherited

Definition at line 108 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 89 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 103 of file array_options.h.

Member Data Documentation

◆ m_angle

EDA_ANGLE ARRAY_CIRCULAR_OPTIONS::m_angle

angle between points, or 0 for each point separated by this value (decideg)

Definition at line 193 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetTransform().

◆ m_axis

ARRAY_AXIS ARRAY_CIRCULAR_OPTIONS::m_axis

Definition at line 196 of file array_options.h.

Referenced by GetItemNumber().

◆ m_centre

VECTOR2I ARRAY_CIRCULAR_OPTIONS::m_centre

Definition at line 194 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetTransform().

◆ m_nPts

long ARRAY_CIRCULAR_OPTIONS::m_nPts

number of point in the array

Definition at line 191 of file array_options.h.

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

◆ 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 140 of file array_options.h.

◆ m_reannotateFootprints

bool ARRAY_OPTIONS::m_reannotateFootprints
protectedinherited

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

Definition at line 136 of file array_options.h.

◆ m_rotateItems

bool ARRAY_CIRCULAR_OPTIONS::m_rotateItems

Definition at line 195 of file array_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and GetTransform().

◆ m_shouldNumber

bool ARRAY_OPTIONS::m_shouldNumber
protectedinherited

True if this array numbers the new items.

Definition at line 133 of file array_options.h.

◆ m_type

ARRAY_TYPE_T ARRAY_OPTIONS::m_type
protectedinherited

Definition at line 130 of file array_options.h.


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