KiCad PCB EDA Suite
APERTURE Class Reference

#include <gbr_plotter_apertures.h>

Public Types

enum  APERTURE_TYPE {
  AT_CIRCLE = 1, AT_RECT = 2, AT_PLOTTING = 3, AT_OVAL = 4,
  AT_REGULAR_POLY = 5, AT_REGULAR_POLY3, AT_REGULAR_POLY4, AT_REGULAR_POLY5,
  AT_REGULAR_POLY6, AT_REGULAR_POLY7, AT_REGULAR_POLY8, AT_REGULAR_POLY9,
  AT_REGULAR_POLY10, AT_REGULAR_POLY11, AT_REGULAR_POLY12
}
 

Public Member Functions

void SetSize (const wxSize &aSize)
 
const wxSize GetSize ()
 
void SetDiameter (int aDiameter)
 
int GetDiameter ()
 
void SetVerticeCount (int aCount)
 
int GetVerticeCount ()
 
void SetRotation (double aRotDegree)
 
double GetRotation ()
 

Public Attributes

APERTURE_TYPE m_Type
 
wxSize m_Size
 
int m_DCode
 
int m_ApertureAttribute
 

Detailed Description

Definition at line 42 of file gbr_plotter_apertures.h.

Member Enumeration Documentation

◆ APERTURE_TYPE

Enumerator
AT_CIRCLE 
AT_RECT 
AT_PLOTTING 
AT_OVAL 
AT_REGULAR_POLY 
AT_REGULAR_POLY3 
AT_REGULAR_POLY4 
AT_REGULAR_POLY5 
AT_REGULAR_POLY6 
AT_REGULAR_POLY7 
AT_REGULAR_POLY8 
AT_REGULAR_POLY9 
AT_REGULAR_POLY10 
AT_REGULAR_POLY11 
AT_REGULAR_POLY12 

Definition at line 45 of file gbr_plotter_apertures.h.

45  {
46  AT_CIRCLE = 1, // round aperture, to flash pads
47  AT_RECT = 2, // rect aperture, to flash pads
48  AT_PLOTTING = 3, // round aperture, to plot lines
49  AT_OVAL = 4, // oval aperture, to flash pads
50  AT_REGULAR_POLY = 5,// Regular polygon (n vertices, n = 3 .. 12, with rotation)
51  AT_REGULAR_POLY3, // Regular polygon 3 vertices, with rotation
52  AT_REGULAR_POLY4, // Regular polygon 4 vertices, with rotation
53  AT_REGULAR_POLY5, // Regular polygon 5 vertices, with rotation
54  AT_REGULAR_POLY6, // Regular polygon 6 vertices, with rotation
55  AT_REGULAR_POLY7, // Regular polygon 7 vertices, with rotation
56  AT_REGULAR_POLY8, // Regular polygon 8 vertices, with rotation
57  AT_REGULAR_POLY9, // Regular polygon 9 vertices, with rotation
58  AT_REGULAR_POLY10, // Regular polygon 10 vertices, with rotation
59  AT_REGULAR_POLY11, // Regular polygon 11 vertices, with rotation
60  AT_REGULAR_POLY12, // Regular polygon 12 vertices, with rotation
61  };

Member Function Documentation

◆ GetDiameter()

int APERTURE::GetDiameter ( )
inline

Definition at line 78 of file gbr_plotter_apertures.h.

79  {
80  return m_Size.x;
81  }

References m_Size.

◆ GetRotation()

double APERTURE::GetRotation ( )
inline

Definition at line 104 of file gbr_plotter_apertures.h.

105  {
106  // The rotation is stored in 1/1000 degree
107  return m_Size.y / 1000.0;
108  }

References m_Size.

◆ GetSize()

const wxSize APERTURE::GetSize ( )
inline

Definition at line 68 of file gbr_plotter_apertures.h.

69  {
70  return m_Size;
71  }

References m_Size.

◆ GetVerticeCount()

int APERTURE::GetVerticeCount ( )
inline

Definition at line 93 of file gbr_plotter_apertures.h.

94  {
95  return m_Type - AT_REGULAR_POLY3 + 3;
96  }
APERTURE_TYPE m_Type

References AT_REGULAR_POLY3, and m_Type.

◆ SetDiameter()

void APERTURE::SetDiameter ( int  aDiameter)
inline

Definition at line 73 of file gbr_plotter_apertures.h.

74  {
75  m_Size.x = aDiameter;
76  }

References m_Size.

◆ SetRotation()

void APERTURE::SetRotation ( double  aRotDegree)
inline

Definition at line 98 of file gbr_plotter_apertures.h.

99  {
100  // The rotation is stored in 1/1000 degree
101  m_Size.y = int( aRotDegree * 1000.0 );
102  }

References m_Size.

◆ SetSize()

void APERTURE::SetSize ( const wxSize &  aSize)
inline

Definition at line 63 of file gbr_plotter_apertures.h.

64  {
65  m_Size = aSize;
66  }

References m_Size.

◆ SetVerticeCount()

void APERTURE::SetVerticeCount ( int  aCount)
inline

Definition at line 83 of file gbr_plotter_apertures.h.

84  {
85  if( aCount < 3 )
86  aCount = 3;
87  else if( aCount > 12 )
88  aCount = 12;
89 
90  m_Type = (APERTURE_TYPE)(AT_REGULAR_POLY3 - 3 + aCount);
91  }
APERTURE_TYPE m_Type

References AT_REGULAR_POLY3, and m_Type.

Member Data Documentation

◆ m_ApertureAttribute

int APERTURE::m_ApertureAttribute

Definition at line 124 of file gbr_plotter_apertures.h.

Referenced by GERBER_PLOTTER::GetOrCreateAperture().

◆ m_DCode

int APERTURE::m_DCode

Definition at line 119 of file gbr_plotter_apertures.h.

Referenced by GERBER_PLOTTER::GetOrCreateAperture().

◆ m_Size

◆ m_Type


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