KiCad PCB EDA Suite
GBR_APERTURE_METADATA Class Reference

#include <gbr_metadata.h>

Public Types

enum  GBR_APERTURE_ATTRIB {
  GBR_APERTURE_ATTRIB_NONE, GBR_APERTURE_ATTRIB_ETCHEDCMP, GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_ATTRIB_CUTOUT,
  GBR_APERTURE_ATTRIB_NONCONDUCTOR, GBR_APERTURE_ATTRIB_VIAPAD, GBR_APERTURE_ATTRIB_COMPONENTPAD, GBR_APERTURE_ATTRIB_SMDPAD_SMDEF,
  GBR_APERTURE_ATTRIB_SMDPAD_CUDEF, GBR_APERTURE_ATTRIB_BGAPAD_SMDEF, GBR_APERTURE_ATTRIB_BGAPAD_CUDEF, GBR_APERTURE_ATTRIB_CONNECTORPAD,
  GBR_APERTURE_ATTRIB_WASHERPAD, GBR_APERTURE_ATTRIB_HEATSINKPAD, GBR_APERTURE_ATTRIB_VIADRILL, GBR_APERTURE_ATTRIB_COMPONENTDRILL,
  GBR_APERTURE_ATTRIB_SLOTDRILL, GBR_APERTURE_ATTRIB_END
}
 

Public Member Functions

 GBR_APERTURE_METADATA ()
 
std::string GetAttributeName ()
 
std::string FormatAttribute (bool aUseX1StructuredComment)
 

Static Public Member Functions

static std::string GetAttributeName (GBR_APERTURE_ATTRIB aAttribute)
 
static std::string FormatAttribute (GBR_APERTURE_ATTRIB aAttribute, bool aUseX1StructuredComment)
 

Public Attributes

GBR_APERTURE_ATTRIB m_ApertAttribute
 

Detailed Description

Definition at line 44 of file gbr_metadata.h.

Member Enumeration Documentation

Enumerator
GBR_APERTURE_ATTRIB_NONE 

uninitialized attribute

GBR_APERTURE_ATTRIB_ETCHEDCMP 

aperture used for etched components

GBR_APERTURE_ATTRIB_CONDUCTOR 

aperture used for connected items like tracks (not vias)

GBR_APERTURE_ATTRIB_CUTOUT 

aperture used for board cutout

GBR_APERTURE_ATTRIB_NONCONDUCTOR 

aperture used for not connected items (texts, outlines on copper)

GBR_APERTURE_ATTRIB_VIAPAD 

aperture used for vias

GBR_APERTURE_ATTRIB_COMPONENTPAD 

aperture used for through hole component on outer layer

GBR_APERTURE_ATTRIB_SMDPAD_SMDEF 

aperture used for SMD pad. Excluded BGA pads which have their own type

GBR_APERTURE_ATTRIB_SMDPAD_CUDEF 

aperture used for SMD pad with a solder mask defined by the solder mask

GBR_APERTURE_ATTRIB_BGAPAD_SMDEF 

aperture used for BGA pads with a solder mask defined by the copper shape

GBR_APERTURE_ATTRIB_BGAPAD_CUDEF 

aperture used for BGA pad with a solder mask defined by the solder mask

GBR_APERTURE_ATTRIB_CONNECTORPAD 

aperture used for edge connecto pad (outer layers)

GBR_APERTURE_ATTRIB_WASHERPAD 

aperture used for mechanical pads (NPTH)

GBR_APERTURE_ATTRIB_HEATSINKPAD 

aperture used for heat sink pad (typically for SMDs)

GBR_APERTURE_ATTRIB_VIADRILL 

aperture used for via holes in drill files

GBR_APERTURE_ATTRIB_COMPONENTDRILL 

aperture used for pad holes in drill files

GBR_APERTURE_ATTRIB_SLOTDRILL 

aperture used for oblong holes in drill files

GBR_APERTURE_ATTRIB_END 

sentinel: max value

Definition at line 47 of file gbr_metadata.h.

48  {
67  };
aperture used for etched components
Definition: gbr_metadata.h:50
aperture used for edge connecto pad (outer layers)
Definition: gbr_metadata.h:60
aperture used for heat sink pad (typically for SMDs)
Definition: gbr_metadata.h:62
aperture used for through hole component on outer layer
Definition: gbr_metadata.h:55
aperture used for via holes in drill files
Definition: gbr_metadata.h:63
aperture used for SMD pad. Excluded BGA pads which have their own type
Definition: gbr_metadata.h:56
aperture used for BGA pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:59
aperture used for pad holes in drill files
Definition: gbr_metadata.h:64
aperture used for mechanical pads (NPTH)
Definition: gbr_metadata.h:61
aperture used for BGA pads with a solder mask defined by the copper shape
Definition: gbr_metadata.h:58
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:51
aperture used for SMD pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:57
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:53
aperture used for oblong holes in drill files
Definition: gbr_metadata.h:65

Constructor & Destructor Documentation

GBR_APERTURE_METADATA::GBR_APERTURE_METADATA ( )
inline

Definition at line 69 of file gbr_metadata.h.

References GetAttributeName().

Member Function Documentation

std::string GBR_APERTURE_METADATA::FormatAttribute ( GBR_APERTURE_ATTRIB  aAttribute,
bool  aUseX1StructuredComment 
)
static
Returns
the full command string corresponding to the aperture attribute like "%TA.AperFunction,<function>*%"
Parameters
aUseX1StructuredComment= false in X2 mode, and true in X1 mode to add the net attribut inside a compatible X1 structured comment starting by "G04 #@! " like "G04 #@! TA.AperFunction,<function>*"

Definition at line 35 of file gbr_metadata.cpp.

References GBR_APERTURE_ATTRIB_BGAPAD_CUDEF, GBR_APERTURE_ATTRIB_BGAPAD_SMDEF, GBR_APERTURE_ATTRIB_COMPONENTDRILL, GBR_APERTURE_ATTRIB_COMPONENTPAD, GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_ATTRIB_CONNECTORPAD, GBR_APERTURE_ATTRIB_CUTOUT, GBR_APERTURE_ATTRIB_END, GBR_APERTURE_ATTRIB_ETCHEDCMP, GBR_APERTURE_ATTRIB_HEATSINKPAD, GBR_APERTURE_ATTRIB_NONCONDUCTOR, GBR_APERTURE_ATTRIB_NONE, GBR_APERTURE_ATTRIB_SLOTDRILL, GBR_APERTURE_ATTRIB_SMDPAD_CUDEF, GBR_APERTURE_ATTRIB_SMDPAD_SMDEF, GBR_APERTURE_ATTRIB_VIADRILL, GBR_APERTURE_ATTRIB_VIAPAD, and GBR_APERTURE_ATTRIB_WASHERPAD.

Referenced by FormatAttribute(), GetAttributeName(), and GERBER_PLOTTER::writeApertureList().

37 {
38  std::string attribute_string;
39 
40  // generate a string to print a Gerber Aperture attribute
41  switch( aAttribute )
42  {
43  case GBR_APERTURE_ATTRIB_END: // Dummy value (aAttribute must be < GBR_APERTURE_ATTRIB_END)
44  case GBR_APERTURE_ATTRIB_NONE: // idle command: do nothing
45  break;
46 
47  case GBR_APERTURE_ATTRIB_ETCHEDCMP: // print info associated to an item
48  // which connects 2 different nets
49  // (Net tees, microwave component)
50  attribute_string = "TA.AperFunction,EtchedComponent";
51  break;
52 
53  case GBR_APERTURE_ATTRIB_CONDUCTOR: // print info associated to a track
54  attribute_string = "TA.AperFunction,Conductor";
55  break;
56 
57  case GBR_APERTURE_ATTRIB_CUTOUT: // print info associated to a outline
58  attribute_string = "TA.AperFunction,CutOut";
59  break;
60 
61  case GBR_APERTURE_ATTRIB_VIAPAD: // print info associated to a flashed via
62  attribute_string = "TA.AperFunction,ViaPad";
63  break;
64 
65  case GBR_APERTURE_ATTRIB_NONCONDUCTOR: // print info associated to a item on a copper layer
66  // which is not a track (for instance a text)
67  attribute_string = "TA.AperFunction,NonConductor";
68  break;
69 
70  case GBR_APERTURE_ATTRIB_COMPONENTPAD: // print info associated to a flashed
71  // through hole component on outer layer
72  attribute_string = "TA.AperFunction,ComponentPad";
73  break;
74 
75  case GBR_APERTURE_ATTRIB_SMDPAD_SMDEF: // print info associated to a flashed for SMD pad.
76  // with solder mask defined from the copper shape
77  // Excluded BGA pads which have their own type
78  attribute_string = "TA.AperFunction,SMDPad,SMDef";
79  break;
80 
81  case GBR_APERTURE_ATTRIB_SMDPAD_CUDEF: // print info associated to a flashed SMD pad with
82  // a solder mask defined by the solder mask
83  attribute_string = "TA.AperFunction,SMDPad,CuDef";
84  break;
85 
86  case GBR_APERTURE_ATTRIB_BGAPAD_SMDEF: // print info associated to flashed BGA pads with
87  // a solder mask defined by the copper shape
88  attribute_string = "TA.AperFunction,BGAPad,SMDef";
89  break;
90 
91  case GBR_APERTURE_ATTRIB_BGAPAD_CUDEF: // print info associated to a flashed BGA pad with
92  // a solder mask defined by the solder mask
93  attribute_string = "TA.AperFunction,BGAPad,CuDef";
94  break;
95 
96  case GBR_APERTURE_ATTRIB_CONNECTORPAD: // print info associated to a flashed edge connector pad (outer layers)
97  attribute_string = "TA.AperFunction,ConnectorPad";
98  break;
99 
100  case GBR_APERTURE_ATTRIB_WASHERPAD: // print info associated to flashed mechanical pads (NPTH)
101  attribute_string = "TA.AperFunction,WasherPad";
102  break;
103 
104  case GBR_APERTURE_ATTRIB_HEATSINKPAD: // print info associated to a flashed heat sink pad
105  // (typically for SMDs)
106  attribute_string = "TA.AperFunction,HeatsinkPad";
107  break;
108 
109  case GBR_APERTURE_ATTRIB_VIADRILL: // print info associated to a via hole in drill files
110  attribute_string = "TA.AperFunction,ViaDrill";
111  break;
112 
113  case GBR_APERTURE_ATTRIB_COMPONENTDRILL: // print info associated to a component
114  // round hole in drill files
115  attribute_string = "TA.AperFunction,ComponentDrill";
116  break;
117 
118  case GBR_APERTURE_ATTRIB_SLOTDRILL: // print info associated to a oblong hole in drill files
119  attribute_string = "TA.AperFunction,Slot";
120  break;
121  }
122 
123  std::string full_attribute_string;
124  wxString eol_string;
125 
126  if( !attribute_string.empty() )
127  {
128  if( aUseX1StructuredComment )
129  {
130  full_attribute_string = "G04 #@! ";
131  eol_string = "*\n";
132  }
133  else
134  {
135  full_attribute_string = "%";
136  eol_string = "*%\n";
137  }
138  }
139 
140  full_attribute_string += attribute_string + eol_string;
141 
142  return full_attribute_string;
143 }
aperture used for etched components
Definition: gbr_metadata.h:50
aperture used for edge connecto pad (outer layers)
Definition: gbr_metadata.h:60
aperture used for heat sink pad (typically for SMDs)
Definition: gbr_metadata.h:62
aperture used for through hole component on outer layer
Definition: gbr_metadata.h:55
aperture used for via holes in drill files
Definition: gbr_metadata.h:63
aperture used for SMD pad. Excluded BGA pads which have their own type
Definition: gbr_metadata.h:56
aperture used for BGA pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:59
aperture used for pad holes in drill files
Definition: gbr_metadata.h:64
aperture used for mechanical pads (NPTH)
Definition: gbr_metadata.h:61
aperture used for BGA pads with a solder mask defined by the copper shape
Definition: gbr_metadata.h:58
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:51
aperture used for SMD pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:57
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:53
aperture used for oblong holes in drill files
Definition: gbr_metadata.h:65
std::string GBR_APERTURE_METADATA::FormatAttribute ( bool  aUseX1StructuredComment)
inline

Definition at line 93 of file gbr_metadata.h.

References FormatAttribute(), and m_ApertAttribute.

94  {
95  return FormatAttribute( m_ApertAttribute, aUseX1StructuredComment );
96  }
static std::string FormatAttribute(GBR_APERTURE_ATTRIB aAttribute, bool aUseX1StructuredComment)
GBR_APERTURE_ATTRIB m_ApertAttribute
Definition: gbr_metadata.h:99
static std::string GBR_APERTURE_METADATA::GetAttributeName ( GBR_APERTURE_ATTRIB  aAttribute)
static
Returns
the string corresponding to the aperture attribute
std::string GBR_APERTURE_METADATA::GetAttributeName ( )
inline

Definition at line 77 of file gbr_metadata.h.

References FormatAttribute(), and m_ApertAttribute.

Referenced by GBR_APERTURE_METADATA().

78  {
80  }
std::string GetAttributeName()
Definition: gbr_metadata.h:77
GBR_APERTURE_ATTRIB m_ApertAttribute
Definition: gbr_metadata.h:99

Member Data Documentation

GBR_APERTURE_ATTRIB GBR_APERTURE_METADATA::m_ApertAttribute

Definition at line 99 of file gbr_metadata.h.

Referenced by FormatAttribute(), and GetAttributeName().


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