KiCad PCB EDA Suite
APER_MACRO_FREEPOLY_LIST Class Reference

#include <gbr_plotter_apertures.h>

Public Member Functions

 APER_MACRO_FREEPOLY_LIST ()
 
void ClearList ()
 
int AmCount () const
 
void Append (const std::vector< wxPoint > &aPolygon)
 append a new APER_MACRO_FREEPOLY containing the polygon aPolygon to the current list More...
 
int FindAm (const std::vector< wxPoint > &aPolygon) const
 
void Format (FILE *aOutput, double aIu2GbrMacroUnit)
 print the aperture macro list to aOutput More...
 

Public Attributes

std::vector< APER_MACRO_FREEPOLYm_AMList
 

Detailed Description

Definition at line 190 of file gbr_plotter_apertures.h.

Constructor & Destructor Documentation

◆ APER_MACRO_FREEPOLY_LIST()

APER_MACRO_FREEPOLY_LIST::APER_MACRO_FREEPOLY_LIST ( )
inline

Definition at line 193 of file gbr_plotter_apertures.h.

193 {}

Member Function Documentation

◆ AmCount()

int APER_MACRO_FREEPOLY_LIST::AmCount ( ) const
inline

Definition at line 197 of file gbr_plotter_apertures.h.

197 { return (int)m_AMList.size(); }
std::vector< APER_MACRO_FREEPOLY > m_AMList

References m_AMList.

Referenced by Append(), GERBER_PLOTTER::EndPlot(), FindAm(), and Format().

◆ Append()

void APER_MACRO_FREEPOLY_LIST::Append ( const std::vector< wxPoint > &  aPolygon)

append a new APER_MACRO_FREEPOLY containing the polygon aPolygon to the current list

Definition at line 1829 of file GERBER_plotter.cpp.

1830 {
1831  m_AMList.emplace_back( aPolygon, AmCount() );
1832 }
std::vector< APER_MACRO_FREEPOLY > m_AMList

References AmCount(), and m_AMList.

Referenced by GERBER_PLOTTER::GetOrCreateAperture().

◆ ClearList()

void APER_MACRO_FREEPOLY_LIST::ClearList ( )
inline

Definition at line 195 of file gbr_plotter_apertures.h.

195 { m_AMList.clear(); }
std::vector< APER_MACRO_FREEPOLY > m_AMList

References m_AMList.

Referenced by GERBER_PLOTTER::StartPlot().

◆ FindAm()

int APER_MACRO_FREEPOLY_LIST::FindAm ( const std::vector< wxPoint > &  aPolygon) const
Returns
the index in m_AMList of the APER_MACRO_FREEPOLY having the same polygon as aPolygon, or -1
Parameters
aCandidateis the polygon candidate to compare

Definition at line 1835 of file GERBER_plotter.cpp.

1836 {
1837  for( int idx = 0; idx < AmCount(); idx++ )
1838  {
1839  if( m_AMList[idx].IsSamePoly( aPolygon ) )
1840  return idx;
1841  }
1842 
1843  return -1;
1844 }
std::vector< APER_MACRO_FREEPOLY > m_AMList

References AmCount(), and m_AMList.

Referenced by GERBER_PLOTTER::GetOrCreateAperture(), and GERBER_PLOTTER::writeApertureList().

◆ Format()

void APER_MACRO_FREEPOLY_LIST::Format ( FILE *  aOutput,
double  aIu2GbrMacroUnit 
)

print the aperture macro list to aOutput

Parameters
aOutputis the FILE to write
aIu2GbrMacroUnitis the scaling factor from coordinates value to the Gerber file macros units (always mm or inches)

Definition at line 1822 of file GERBER_plotter.cpp.

1823 {
1824  for( int idx = 0; idx < AmCount(); idx++ )
1825  m_AMList[idx].Format( aOutput, aIu2GbrMacroUnit );
1826 }
std::vector< APER_MACRO_FREEPOLY > m_AMList
void Format(FILE *aOutput, double aIu2GbrMacroUnit)
print the aperture macro list to aOutput

References AmCount(), and m_AMList.

Referenced by GERBER_PLOTTER::EndPlot().

Member Data Documentation

◆ m_AMList

std::vector<APER_MACRO_FREEPOLY> APER_MACRO_FREEPOLY_LIST::m_AMList

Definition at line 219 of file gbr_plotter_apertures.h.

Referenced by AmCount(), Append(), ClearList(), FindAm(), and Format().


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