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 54 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 57 of file gbr_metadata.h.

58  {
77  };
aperture used for etched components
Definition: gbr_metadata.h:60
aperture used for edge connecto pad (outer layers)
Definition: gbr_metadata.h:70
aperture used for heat sink pad (typically for SMDs)
Definition: gbr_metadata.h:72
aperture used for through hole component on outer layer
Definition: gbr_metadata.h:65
aperture used for via holes in drill files
Definition: gbr_metadata.h:73
aperture used for SMD pad. Excluded BGA pads which have their own type
Definition: gbr_metadata.h:66
aperture used for BGA pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:69
aperture used for pad holes in drill files
Definition: gbr_metadata.h:74
aperture used for mechanical pads (NPTH)
Definition: gbr_metadata.h:71
aperture used for BGA pads with a solder mask defined by the copper shape
Definition: gbr_metadata.h:68
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:61
aperture used for SMD pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:67
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:63
aperture used for oblong holes in drill files
Definition: gbr_metadata.h:75

Constructor & Destructor Documentation

GBR_APERTURE_METADATA::GBR_APERTURE_METADATA ( )
inline

Definition at line 79 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 109 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().

111 {
112  std::string attribute_string;
113 
114  // generate a string to print a Gerber Aperture attribute
115  switch( aAttribute )
116  {
117  case GBR_APERTURE_ATTRIB_END: // Dummy value (aAttribute must be < GBR_APERTURE_ATTRIB_END)
118  case GBR_APERTURE_ATTRIB_NONE: // idle command: do nothing
119  break;
120 
121  case GBR_APERTURE_ATTRIB_ETCHEDCMP: // print info associated to an item
122  // which connects 2 different nets
123  // (Net tees, microwave component)
124  attribute_string = "TA.AperFunction,EtchedComponent";
125  break;
126 
127  case GBR_APERTURE_ATTRIB_CONDUCTOR: // print info associated to a track
128  attribute_string = "TA.AperFunction,Conductor";
129  break;
130 
131  case GBR_APERTURE_ATTRIB_CUTOUT: // print info associated to a outline
132  attribute_string = "TA.AperFunction,CutOut";
133  break;
134 
135  case GBR_APERTURE_ATTRIB_VIAPAD: // print info associated to a flashed via
136  attribute_string = "TA.AperFunction,ViaPad";
137  break;
138 
139  case GBR_APERTURE_ATTRIB_NONCONDUCTOR: // print info associated to a item on a copper layer
140  // which is not a track (for instance a text)
141  attribute_string = "TA.AperFunction,NonConductor";
142  break;
143 
144  case GBR_APERTURE_ATTRIB_COMPONENTPAD: // print info associated to a flashed
145  // through hole component on outer layer
146  attribute_string = "TA.AperFunction,ComponentPad";
147  break;
148 
149  case GBR_APERTURE_ATTRIB_SMDPAD_SMDEF: // print info associated to a flashed for SMD pad.
150  // with solder mask defined from the copper shape
151  // Excluded BGA pads which have their own type
152  attribute_string = "TA.AperFunction,SMDPad,SMDef";
153  break;
154 
155  case GBR_APERTURE_ATTRIB_SMDPAD_CUDEF: // print info associated to a flashed SMD pad with
156  // a solder mask defined by the solder mask
157  attribute_string = "TA.AperFunction,SMDPad,CuDef";
158  break;
159 
160  case GBR_APERTURE_ATTRIB_BGAPAD_SMDEF: // print info associated to flashed BGA pads with
161  // a solder mask defined by the copper shape
162  attribute_string = "TA.AperFunction,BGAPad,SMDef";
163  break;
164 
165  case GBR_APERTURE_ATTRIB_BGAPAD_CUDEF: // print info associated to a flashed BGA pad with
166  // a solder mask defined by the solder mask
167  attribute_string = "TA.AperFunction,BGAPad,CuDef";
168  break;
169 
170  case GBR_APERTURE_ATTRIB_CONNECTORPAD: // print info associated to a flashed edge connector pad (outer layers)
171  attribute_string = "TA.AperFunction,ConnectorPad";
172  break;
173 
174  case GBR_APERTURE_ATTRIB_WASHERPAD: // print info associated to flashed mechanical pads (NPTH)
175  attribute_string = "TA.AperFunction,WasherPad";
176  break;
177 
178  case GBR_APERTURE_ATTRIB_HEATSINKPAD: // print info associated to a flashed heat sink pad
179  // (typically for SMDs)
180  attribute_string = "TA.AperFunction,HeatsinkPad";
181  break;
182 
183  case GBR_APERTURE_ATTRIB_VIADRILL: // print info associated to a via hole in drill files
184  attribute_string = "TA.AperFunction,ViaDrill";
185  break;
186 
187  case GBR_APERTURE_ATTRIB_COMPONENTDRILL: // print info associated to a component
188  // round hole in drill files
189  attribute_string = "TA.AperFunction,ComponentDrill";
190  break;
191 
192  case GBR_APERTURE_ATTRIB_SLOTDRILL: // print info associated to a oblong hole in drill files
193  attribute_string = "TA.AperFunction,Slot";
194  break;
195  }
196 
197  std::string full_attribute_string;
198  wxString eol_string;
199 
200  if( !attribute_string.empty() )
201  {
202  if( aUseX1StructuredComment )
203  {
204  full_attribute_string = "G04 #@! ";
205  eol_string = "*\n";
206  }
207  else
208  {
209  full_attribute_string = "%";
210  eol_string = "*%\n";
211  }
212  }
213 
214  full_attribute_string += attribute_string + eol_string;
215 
216  return full_attribute_string;
217 }
aperture used for etched components
Definition: gbr_metadata.h:60
aperture used for edge connecto pad (outer layers)
Definition: gbr_metadata.h:70
aperture used for heat sink pad (typically for SMDs)
Definition: gbr_metadata.h:72
aperture used for through hole component on outer layer
Definition: gbr_metadata.h:65
aperture used for via holes in drill files
Definition: gbr_metadata.h:73
aperture used for SMD pad. Excluded BGA pads which have their own type
Definition: gbr_metadata.h:66
aperture used for BGA pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:69
aperture used for pad holes in drill files
Definition: gbr_metadata.h:74
aperture used for mechanical pads (NPTH)
Definition: gbr_metadata.h:71
aperture used for BGA pads with a solder mask defined by the copper shape
Definition: gbr_metadata.h:68
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:61
aperture used for SMD pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:67
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:63
aperture used for oblong holes in drill files
Definition: gbr_metadata.h:75
std::string GBR_APERTURE_METADATA::FormatAttribute ( bool  aUseX1StructuredComment)
inline

Definition at line 103 of file gbr_metadata.h.

References FormatAttribute(), and m_ApertAttribute.

104  {
105  return FormatAttribute( m_ApertAttribute, aUseX1StructuredComment );
106  }
static std::string FormatAttribute(GBR_APERTURE_ATTRIB aAttribute, bool aUseX1StructuredComment)
GBR_APERTURE_ATTRIB m_ApertAttribute
Definition: gbr_metadata.h:109
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 87 of file gbr_metadata.h.

References FormatAttribute(), and m_ApertAttribute.

Referenced by GBR_APERTURE_METADATA().

88  {
90  }
std::string GetAttributeName()
Definition: gbr_metadata.h:87
GBR_APERTURE_ATTRIB m_ApertAttribute
Definition: gbr_metadata.h:109

Member Data Documentation

GBR_APERTURE_ATTRIB GBR_APERTURE_METADATA::m_ApertAttribute

Definition at line 109 of file gbr_metadata.h.

Referenced by FormatAttribute(), and GetAttributeName().


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