KiCad PCB EDA Suite
APOLYGON6 Struct Reference

#include <altium_parser_pcb.h>

Public Member Functions

 APOLYGON6 (ALTIUM_PARSER &aReader)
 

Public Attributes

ALTIUM_LAYER layer
 
uint16_t net
 
bool locked
 
ALTIUM_POLYGON_HATCHSTYLE hatchstyle
 
int32_t gridsize
 
int32_t trackwidth
 
int32_t minprimlength
 
bool useoctagons
 
int32_t pourindex
 
std::vector< ALTIUM_VERTICEvertices
 

Detailed Description

Definition at line 441 of file altium_parser_pcb.h.

Constructor & Destructor Documentation

◆ APOLYGON6()

APOLYGON6::APOLYGON6 ( ALTIUM_PARSER aReader)
explicit

Definition at line 368 of file altium_parser_pcb.cpp.

369 {
370  std::map<wxString, wxString> properties = aReader.ReadProperties();
371 
372  if( properties.empty() )
373  THROW_IO_ERROR( "Polygons6 stream has no properties" );
374 
375  layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( properties, "LAYER", "" ) );
376  net = ALTIUM_PARSER::ReadInt( properties, "NET", ALTIUM_NET_UNCONNECTED );
377  locked = ALTIUM_PARSER::ReadBool( properties, "LOCKED", false );
378 
379  // TODO: kind
380 
381  gridsize = ALTIUM_PARSER::ReadKicadUnit( properties, "GRIDSIZE", "0mil" );
382  trackwidth = ALTIUM_PARSER::ReadKicadUnit( properties, "TRACKWIDTH", "0mil" );
383  minprimlength = ALTIUM_PARSER::ReadKicadUnit( properties, "MINPRIMLENGTH", "0mil" );
384  useoctagons = ALTIUM_PARSER::ReadBool( properties, "USEOCTAGONS", false );
385 
386  pourindex = ALTIUM_PARSER::ReadInt( properties, "POURINDEX", 0 );
387 
388  wxString hatchstyleraw = ALTIUM_PARSER::ReadString( properties, "HATCHSTYLE", "" );
389 
390  if( hatchstyleraw == "Solid" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::SOLID;
391  else if( hatchstyleraw == "45Degree" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_45;
392  else if( hatchstyleraw == "90Degree" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_90;
393  else if( hatchstyleraw == "Horizontal" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::HORIZONTAL;
394  else if( hatchstyleraw == "Vertical" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::VERTICAL;
395  else if( hatchstyleraw == "None" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::NONE;
397 
398  altium_parse_polygons( properties, vertices );
399 
400  if( aReader.HasParsingError() )
401  THROW_IO_ERROR( "Polygons6 stream was not parsed correctly" );
402 }
int32_t trackwidth
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
std::map< wxString, wxString > ReadProperties()
ALTIUM_LAYER layer
const uint16_t ALTIUM_NET_UNCONNECTED
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
int32_t ReadKicadUnit()
std::vector< ALTIUM_VERTICE > vertices
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
ALTIUM_LAYER altium_layer_from_name(const wxString &aName)
int32_t minprimlength
int32_t gridsize
void altium_parse_polygons(std::map< wxString, wxString > &aProps, std::vector< ALTIUM_VERTICE > &aVertices)
ALTIUM_POLYGON_HATCHSTYLE hatchstyle
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
bool HasParsingError()
int32_t pourindex

References altium_layer_from_name(), ALTIUM_NET_UNCONNECTED, altium_parse_polygons(), DEGREE_45, DEGREE_90, gridsize, ALTIUM_PARSER::HasParsingError(), hatchstyle, HORIZONTAL, layer, locked, minprimlength, net, NONE, pourindex, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadKicadUnit(), ALTIUM_PARSER::ReadProperties(), ALTIUM_PARSER::ReadString(), SOLID, THROW_IO_ERROR, trackwidth, UNKNOWN, useoctagons, VERTICAL, and vertices.

Member Data Documentation

◆ gridsize

int32_t APOLYGON6::gridsize

Definition at line 449 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ hatchstyle

ALTIUM_POLYGON_HATCHSTYLE APOLYGON6::hatchstyle

Definition at line 447 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ layer

ALTIUM_LAYER APOLYGON6::layer

Definition at line 443 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ locked

bool APOLYGON6::locked

Definition at line 445 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ minprimlength

int32_t APOLYGON6::minprimlength

Definition at line 451 of file altium_parser_pcb.h.

Referenced by APOLYGON6().

◆ net

uint16_t APOLYGON6::net

Definition at line 444 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ pourindex

int32_t APOLYGON6::pourindex

Definition at line 455 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ trackwidth

int32_t APOLYGON6::trackwidth

Definition at line 450 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ useoctagons

bool APOLYGON6::useoctagons

Definition at line 452 of file altium_parser_pcb.h.

Referenced by APOLYGON6().

◆ vertices

std::vector<ALTIUM_VERTICE> APOLYGON6::vertices

Definition at line 457 of file altium_parser_pcb.h.

Referenced by APOLYGON6(), and ALTIUM_PCB::ParsePolygons6Data().


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