KiCad PCB EDA Suite
EPOLYGON Struct Reference

Eagle polygon, without vertices which are parsed as needed. More...

Public Types

enum  { SOLID, HATCH, CUTOUT }
 

Public Member Functions

 EPOLYGON (CPTREE &aPolygon)
 

Public Attributes

double width
 
int layer
 
opt_double spacing
 
int pour
 
opt_double isolate
 
opt_bool orphans
 
opt_bool thermals
 
opt_int rank
 

Static Public Attributes

static const int max_priority = 6
 

Detailed Description

Eagle polygon, without vertices which are parsed as needed.

Definition at line 832 of file eagle_plugin.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator
SOLID 
HATCH 
CUTOUT 

Definition at line 845 of file eagle_plugin.cpp.

845  { // for pour
846  SOLID,
847  HATCH,
848  CUTOUT,
849  };

Constructor & Destructor Documentation

EPOLYGON::EPOLYGON ( CPTREE aPolygon)

Definition at line 859 of file eagle_plugin.cpp.

References CUTOUT, HATCH, parseOptionalBool(), and SOLID.

860 {
861  CPTREE& attribs = aPolygon.get_child( "<xmlattr>" );
862 
863  /*
864  <!ATTLIST polygon
865  width %Dimension; #REQUIRED
866  layer %Layer; #REQUIRED
867  spacing %Dimension; #IMPLIED
868  pour %PolygonPour; "solid"
869  isolate %Dimension; #IMPLIED -- only in <signal> or <package> context --
870  orphans %Bool; "no" -- only in <signal> context --
871  thermals %Bool; "yes" -- only in <signal> context --
872  rank %Int; "0" -- 1..6 in <signal> context, 0 or 7 in <package> context --
873  >
874  */
875 
876  width = attribs.get<double>( "width" );
877  layer = attribs.get<int>( "layer" );
878  spacing = attribs.get_optional<double>( "spacing" );
879  isolate = attribs.get_optional<double>( "isolate" );
880  // default pour to solid fill
882  opt_string s = attribs.get_optional<string>( "pour" );
883 
884  if( s )
885  {
886  // (solid | hatch | cutout)
887  if( !s->compare( "hatch" ) )
888  pour = EPOLYGON::HATCH;
889  else if( !s->compare( "cutout" ) )
890  pour = EPOLYGON::CUTOUT;
891  }
892 
893  orphans = parseOptionalBool( attribs, "orphans" );
894  thermals = parseOptionalBool( attribs, "thermals" );
895  rank = attribs.get_optional<int>( "rank" );
896 }
opt_double isolate
opt_int rank
const PTREE CPTREE
Definition: eagle_plugin.h:63
opt_bool thermals
opt_double spacing
static opt_bool parseOptionalBool(CPTREE &attribs, const char *aName)
Function parseOptionalBool returns an opt_bool and sets it true or false according to the presence an...
double width
opt_bool orphans

Member Data Documentation

opt_double EPOLYGON::isolate

Definition at line 851 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

int EPOLYGON::layer

Definition at line 835 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals(), and EAGLE_PLUGIN::packagePolygon().

const int EPOLYGON::max_priority = 6
static

Definition at line 843 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

opt_bool EPOLYGON::orphans

Definition at line 852 of file eagle_plugin.cpp.

int EPOLYGON::pour

Definition at line 850 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

opt_int EPOLYGON::rank

Definition at line 854 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

opt_double EPOLYGON::spacing

Definition at line 836 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

opt_bool EPOLYGON::thermals

Definition at line 853 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().

double EPOLYGON::width

Definition at line 834 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadSignals().


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