KiCad PCB EDA Suite
EPAD Struct Reference

Eagle thru hol pad. More...

#include <eagle_parser.h>

Public Types

enum  {
  SQUARE, ROUND, OCTAGON, LONG,
  OFFSET
}
 

Public Member Functions

 EPAD (wxXmlNode *aPad)
 

Public Attributes

string name
 
double x
 
double y
 
double drill
 
opt_double diameter
 
opt_int shape
 
opt_erot rot
 
opt_bool stop
 
opt_bool thermals
 
opt_bool first
 

Detailed Description

Eagle thru hol pad.

Definition at line 547 of file eagle_parser.h.

Member Enumeration Documentation

anonymous enum
Enumerator
SQUARE 
ROUND 
OCTAGON 
LONG 
OFFSET 

Definition at line 556 of file eagle_parser.h.

556  {
557  SQUARE,
558  ROUND,
559  OCTAGON,
560  LONG,
561  OFFSET,
562  };

Constructor & Destructor Documentation

EPAD::EPAD ( wxXmlNode *  aPad)

Definition at line 387 of file eagle_parser.cpp.

References diameter, drill, first, LONG, name, OCTAGON, OFFSET, rot, ROUND, shape, SQUARE, stop, thermals, x, and y.

388 {
389  /*
390  <!ELEMENT pad EMPTY>
391  <!ATTLIST pad
392  name %String; #REQUIRED
393  x %Coord; #REQUIRED
394  y %Coord; #REQUIRED
395  drill %Dimension; #REQUIRED
396  diameter %Dimension; "0"
397  shape %PadShape; "round"
398  rot %Rotation; "R0"
399  stop %Bool; "yes"
400  thermals %Bool; "yes"
401  first %Bool; "no"
402  >
403  */
404 
405  // #REQUIRED says DTD, throw exception if not found
406  name = parseRequiredAttribute<string>( aPad, "name" );
407  x = parseRequiredAttribute<double>( aPad, "x" );
408  y = parseRequiredAttribute<double>( aPad, "y" );
409  drill = parseRequiredAttribute<double>( aPad, "drill" );
410 
411  // Optional attributes
412  diameter = parseOptionalAttribute<double>( aPad, "diameter" );
413 
414  opt_string s = parseOptionalAttribute<string>( aPad, "shape" );
415 
416  // (square | round | octagon | long | offset)
417  if( s == "square" )
419  else if( s == "round" )
420  shape = EPAD::ROUND;
421  else if( s == "octagon" )
423  else if( s == "long" )
424  shape = EPAD::LONG;
425  else if( s == "offset" )
427 
428  rot = parseOptionalAttribute<EROT>( aPad, "rot" );
429  stop = parseOptionalAttribute<bool>( aPad, "stop" );
430  thermals = parseOptionalAttribute<bool>( aPad, "thermals" );
431  first = parseOptionalAttribute<bool>( aPad, "first" );
432 }
opt_double diameter
Definition: eagle_parser.h:553
opt_bool stop
Definition: eagle_parser.h:565
opt_bool thermals
Definition: eagle_parser.h:566
double x
Definition: eagle_parser.h:550
opt_erot rot
Definition: eagle_parser.h:564
string name
Definition: eagle_parser.h:549
double drill
Definition: eagle_parser.h:552
opt_bool first
Definition: eagle_parser.h:567
opt_int shape
Definition: eagle_parser.h:563
double y
Definition: eagle_parser.h:551

Member Data Documentation

opt_double EPAD::diameter

Definition at line 553 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

double EPAD::drill

Definition at line 552 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

opt_bool EPAD::first

Definition at line 567 of file eagle_parser.h.

Referenced by EPAD().

string EPAD::name

Definition at line 549 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

opt_erot EPAD::rot

Definition at line 564 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

opt_int EPAD::shape

Definition at line 563 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

opt_bool EPAD::stop

Definition at line 565 of file eagle_parser.h.

Referenced by EPAD().

opt_bool EPAD::thermals

Definition at line 566 of file eagle_parser.h.

Referenced by EPAD().

double EPAD::x

Definition at line 550 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().

double EPAD::y

Definition at line 551 of file eagle_parser.h.

Referenced by EPAD(), and EAGLE_PLUGIN::packagePad().


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