KiCad PCB EDA Suite
EDIMENSION Struct Reference

Eagle dimension element. More...

Public Member Functions

 EDIMENSION (CPTREE &aDimension)
 

Public Attributes

double x1
 
double y1
 
double x2
 
double y2
 
double x3
 
double y3
 
int layer
 
opt_string dimensionType
 

Detailed Description

Eagle dimension element.

Definition at line 538 of file eagle_plugin.cpp.

Constructor & Destructor Documentation

EDIMENSION::EDIMENSION ( CPTREE aDimension)

Definition at line 553 of file eagle_plugin.cpp.

554 {
555  CPTREE& attribs = aDimension.get_child( "<xmlattr>" );
556 
557  /*
558  <!ELEMENT dimension EMPTY>
559  <!ATTLIST dimension
560  x1 %Coord; #REQUIRED
561  y1 %Coord; #REQUIRED
562  x2 %Coord; #REQUIRED
563  y2 %Coord; #REQUIRED
564  x3 %Coord; #REQUIRED
565  y3 %Coord; #REQUIRED
566  layer %Layer; #REQUIRED
567  dtype %DimensionType; "parallel"
568  >
569  */
570 
571  x1 = attribs.get<double>( "x1" );
572  y1 = attribs.get<double>( "y1" );
573  x2 = attribs.get<double>( "x2" );
574  y2 = attribs.get<double>( "y2" );
575  x3 = attribs.get<double>( "x3" );
576  y3 = attribs.get<double>( "y3" );
577  layer = attribs.get<int>( "layer" );
578 
579  opt_string dimType = attribs.get_optional<string>( "dtype" );
580 
581  if(!dimType)
582  {
583  // default type is parallel
584  }
585 }
const PTREE CPTREE
Definition: eagle_plugin.h:63

Member Data Documentation

opt_string EDIMENSION::dimensionType

Definition at line 548 of file eagle_plugin.cpp.

int EDIMENSION::layer

Definition at line 546 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::x1

Definition at line 540 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::x2

Definition at line 542 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::x3

Definition at line 544 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::y1

Definition at line 541 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::y2

Definition at line 543 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().

double EDIMENSION::y3

Definition at line 545 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadPlain().


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