KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS Struct Reference

From CADSTAR help: "For specifying the directions in which routes can enter or exit the pad. More...

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

bool FreeAngle = false
 
bool North = false
 
bool NorthEast = false
 
bool East = false
 
bool SouthEast = false
 
bool South = false
 
bool SouthWest = false
 
bool West = false
 
bool NorthWest = false
 

Detailed Description

From CADSTAR help: "For specifying the directions in which routes can enter or exit the pad.

There are eight pre-defined directions to choose from, North, South, East, West, North-East, North-West, South-East and South-West, plus "Free Angle" which allows routes to exit in any direction.

If none of the direction boxes are checked, the system uses the default which is all directions (as shown above) for all pad shapes, except the long (drawn) Routes exit from the short sides of long pads - in other words in line with the long axis.

Note: These Exit Directions are applied to the PCB component. If the PCB component is rotated when it is used on a PCB Design, the Exit Directions will rotate with it."

The main thing to note is that the exit angle is not relative to the pad (even if the pad is at an angle): it is relative to the component as a whole. This is confusing, considering this property belongs to the pad...

Definition at line 509 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1103 of file cadstar_pcb_archive_parser.cpp.

1104 {
1105  wxASSERT( aNode->GetName() == wxT( "EXITS" ) );
1106 
1107  wxXmlAttribute* xmlAttribute = aNode->GetAttributes();
1108 
1109  for( ; xmlAttribute; xmlAttribute = xmlAttribute->GetNext() )
1110  {
1111  if( !IsValidAttribute( xmlAttribute ) )
1112  continue;
1113 
1114  if( xmlAttribute->GetValue() == wxT( "FREE" ) )
1115  FreeAngle = true;
1116  else if( xmlAttribute->GetValue() == wxT( "N" ) )
1117  North = true;
1118  else if( xmlAttribute->GetValue() == wxT( "S" ) )
1119  South = true;
1120  else if( xmlAttribute->GetValue() == wxT( "E" ) )
1121  East = true;
1122  else if( xmlAttribute->GetValue() == wxT( "W" ) )
1123  West = true;
1124  else if( xmlAttribute->GetValue() == wxT( "NE" ) )
1125  NorthEast = true;
1126  else if( xmlAttribute->GetValue() == wxT( "NW" ) )
1127  NorthWest = true;
1128  else if( xmlAttribute->GetValue() == wxT( "SE" ) )
1129  SouthEast = true;
1130  else if( xmlAttribute->GetValue() == wxT( "SW" ) )
1131  SouthWest = true;
1132  else
1133  THROW_UNKNOWN_PARAMETER_IO_ERROR( xmlAttribute->GetValue(), wxT( "EXITS" ) );
1134  }
1135 
1136  CheckNoChildNodes( aNode );
1137 }
static bool IsValidAttribute(wxXmlAttribute *aAttribute)
static void CheckNoChildNodes(XNODE *aNode)
#define THROW_UNKNOWN_PARAMETER_IO_ERROR(param, location)

References CADSTAR_ARCHIVE_PARSER::CheckNoChildNodes(), CADSTAR_ARCHIVE_PARSER::IsValidAttribute(), and THROW_UNKNOWN_PARAMETER_IO_ERROR.

Member Data Documentation

◆ East

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::East = false

Definition at line 514 of file cadstar_pcb_archive_parser.h.

◆ FreeAngle

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::FreeAngle = false

Definition at line 511 of file cadstar_pcb_archive_parser.h.

◆ North

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::North = false

Definition at line 512 of file cadstar_pcb_archive_parser.h.

◆ NorthEast

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::NorthEast = false

Definition at line 513 of file cadstar_pcb_archive_parser.h.

◆ NorthWest

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::NorthWest = false

Definition at line 519 of file cadstar_pcb_archive_parser.h.

◆ South

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::South = false

Definition at line 516 of file cadstar_pcb_archive_parser.h.

◆ SouthEast

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::SouthEast = false

Definition at line 515 of file cadstar_pcb_archive_parser.h.

◆ SouthWest

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::SouthWest = false

Definition at line 517 of file cadstar_pcb_archive_parser.h.

◆ West

bool CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::West = false

Definition at line 518 of file cadstar_pcb_archive_parser.h.


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