KiCad PCB EDA Suite
EWIRE Struct Reference

Eagle wire. More...

#include <eagle_parser.h>

Public Types

enum  { CONTINUOUS, LONGDASH, SHORTDASH, DASHDOT }
 
enum  { FLAT, ROUND }
 

Public Member Functions

 EWIRE (wxXmlNode *aWire)
 

Public Attributes

ECOORD x1
 
ECOORD y1
 
ECOORD x2
 
ECOORD y2
 
ECOORD width
 
LAYER_NUM layer
 
opt_int style
 
opt_double curve
 range is -359.9..359.9 More...
 
opt_int cap
 

Detailed Description

Eagle wire.

Definition at line 491 of file eagle_parser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAT 
ROUND 

Definition at line 511 of file eagle_parser.h.

511  {
512  FLAT,
513  ROUND,
514  };

◆ anonymous enum

anonymous enum
Enumerator
CONTINUOUS 
LONGDASH 
SHORTDASH 
DASHDOT 

Definition at line 501 of file eagle_parser.h.

Constructor & Destructor Documentation

◆ EWIRE()

EWIRE::EWIRE ( wxXmlNode *  aWire)

Definition at line 324 of file eagle_parser.cpp.

325 {
326  /*
327  <!ELEMENT wire EMPTY>
328  <!ATTLIST wire
329  x1 %Coord; #REQUIRED
330  y1 %Coord; #REQUIRED
331  x2 %Coord; #REQUIRED
332  y2 %Coord; #REQUIRED
333  width %Dimension; #REQUIRED
334  layer %Layer; #REQUIRED
335  extent %Extent; #IMPLIED -- only applicable for airwires --
336  style %WireStyle; "continuous"
337  curve %WireCurve; "0"
338  cap %WireCap; "round" -- only applicable if 'curve' is not zero --
339  >
340  */
341 
342  x1 = parseRequiredAttribute<ECOORD>( aWire, wxT( "x1" ) );
343  y1 = parseRequiredAttribute<ECOORD>( aWire, wxT( "y1" ) );
344  x2 = parseRequiredAttribute<ECOORD>( aWire, wxT( "x2" ) );
345  y2 = parseRequiredAttribute<ECOORD>( aWire, wxT( "y2" ) );
346  width = parseRequiredAttribute<ECOORD>( aWire, wxT( "width" ) );
347  layer = parseRequiredAttribute<int>( aWire, wxT( "layer" ) );
348  curve = parseOptionalAttribute<double>( aWire, wxT( "curve" ) );
349 
350  opt_wxString s = parseOptionalAttribute<wxString>( aWire, wxT( "style" ) );
351 
352  if( s == wxT( "continuous" ) )
354  else if( s == wxT( "longdash" ) )
356  else if( s == wxT( "shortdash" ) )
358  else if( s == wxT( "dashdot" ) )
360 
361  s = parseOptionalAttribute<wxString>( aWire, wxT( "cap" ) );
362 
363  if( s == wxT( "round" ) )
364  cap = EWIRE::ROUND;
365  else if( s == wxT( "flat" ) )
366  cap = EWIRE::FLAT;
367 }
opt_double curve
range is -359.9..359.9
Definition: eagle_parser.h:508
opt_int cap
Definition: eagle_parser.h:515
ECOORD width
Definition: eagle_parser.h:497
ECOORD y1
Definition: eagle_parser.h:494
opt_int style
Definition: eagle_parser.h:507
LAYER_NUM layer
Definition: eagle_parser.h:498
ECOORD y2
Definition: eagle_parser.h:496
ECOORD x1
Definition: eagle_parser.h:493
ECOORD x2
Definition: eagle_parser.h:495

References cap, CONTINUOUS, curve, DASHDOT, FLAT, layer, LONGDASH, ROUND, SHORTDASH, style, width, x1, x2, y1, and y2.

Member Data Documentation

◆ cap

opt_int EWIRE::cap

Definition at line 515 of file eagle_parser.h.

Referenced by EWIRE().

◆ curve

◆ layer

◆ style

opt_int EWIRE::style

Definition at line 507 of file eagle_parser.h.

Referenced by EWIRE().

◆ width

◆ x1

◆ x2

◆ y1

◆ y2


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