KiCad PCB EDA Suite
Loading...
Searching...
No Matches
altium_pcb.h File Reference
#include <core/utf8.h>
#include <embedded_files.h>
#include <functional>
#include <layer_ids.h>
#include <map>
#include <memory>
#include <vector>
#include <pcb_io/common/plugin_common_layer_mapping.h>
#include <altium_parser_pcb.h>

Go to the source code of this file.

Classes

struct  ALTIUM_EMBEDDED_MODEL_DATA
 
class  ALTIUM_PCB
 

Namespaces

namespace  CFB
 

Typedefs

typedef std::function< void(const ALTIUM_PCB_COMPOUND_FILE &, const CFB::COMPOUND_FILE_ENTRY *)> PARSE_FUNCTION_POINTER_fp
 

Enumerations

enum class  ALTIUM_PCB_DIR {
  FILE_HEADER , ADVANCEDPLACEROPTIONS6 , ARCS6 , BOARD6 ,
  BOARDREGIONS , CLASSES6 , COMPONENTBODIES6 , COMPONENTS6 ,
  CONNECTIONS6 , COORDINATES6 , DESIGNRULECHECKEROPTIONS6 , DIFFERENTIALPAIRS6 ,
  DIMENSIONS6 , EMBEDDEDBOARDS6 , EMBEDDEDFONTS6 , EMBEDDEDS6 ,
  EXTENDPRIMITIVEINFORMATION , FILEVERSIONINFO , FILLS6 , FROMTOS6 ,
  MODELS , MODELSNOEMBED , NETS6 , PADS6 ,
  PADVIALIBRARY , PADVIALIBRARYCACHE , PADVIALIBRARYLINKS , PINSWAPOPTIONS6 ,
  PINPAIRSSECTION , POLYGONS6 , REGIONS6 , RULES6 ,
  SHAPEBASEDCOMPONENTBODIES6 , SHAPEBASEDREGIONS6 , SIGNALCLASSES , SMARTUNIONS ,
  TEXTS , TEXTS6 , TEXTURES , TRACKS6 ,
  UNIONNAMES , UNIQUEIDPRIMITIVEINFORMATION , VIAS6 , WIDESTRINGS6
}
 

Functions

wxString AltiumUnnamedNetName (const BOARD &aBoard, int &aCounter)
 Invent a placeholder name for an Altium net that has none.
 
void ApplyAltiumNetclassRules (const std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > &aRulesByKind, NET_SETTINGS &aNetSettings, std::vector< const ARULE6 * > *aUnresolved=nullptr)
 Copy the values of Altium rules scoped to a single netclass onto that netclass.
 

Typedef Documentation

◆ PARSE_FUNCTION_POINTER_fp

typedef std::function<void( const ALTIUM_PCB_COMPOUND_FILE&, const CFB::COMPOUND_FILE_ENTRY* )> PARSE_FUNCTION_POINTER_fp

Definition at line 149 of file altium_pcb.h.

Enumeration Type Documentation

◆ ALTIUM_PCB_DIR

enum class ALTIUM_PCB_DIR
strong
Enumerator
FILE_HEADER 
ADVANCEDPLACEROPTIONS6 
ARCS6 
BOARD6 
BOARDREGIONS 
CLASSES6 
COMPONENTBODIES6 
COMPONENTS6 
CONNECTIONS6 
COORDINATES6 
DESIGNRULECHECKEROPTIONS6 
DIFFERENTIALPAIRS6 
DIMENSIONS6 
EMBEDDEDBOARDS6 
EMBEDDEDFONTS6 
EMBEDDEDS6 
EXTENDPRIMITIVEINFORMATION 
FILEVERSIONINFO 
FILLS6 
FROMTOS6 
MODELS 
MODELSNOEMBED 
NETS6 
PADS6 
PADVIALIBRARY 
PADVIALIBRARYCACHE 
PADVIALIBRARYLINKS 
PINSWAPOPTIONS6 
PINPAIRSSECTION 
POLYGONS6 
REGIONS6 
RULES6 
SHAPEBASEDCOMPONENTBODIES6 
SHAPEBASEDREGIONS6 
SIGNALCLASSES 
SMARTUNIONS 
TEXTS 
TEXTS6 
TEXTURES 
TRACKS6 
UNIONNAMES 
UNIQUEIDPRIMITIVEINFORMATION 
VIAS6 
WIDESTRINGS6 

Definition at line 37 of file altium_pcb.h.

Function Documentation

◆ AltiumUnnamedNetName()

wxString AltiumUnnamedNetName ( const BOARD & aBoard,
int & aCounter )

Invent a placeholder name for an Altium net that has none.

NETINFO_LIST keys nets by name and the unconnected net owns the empty string, so a nameless net has to be given one or it is merged into another net. aCounter is advanced past every candidate that is already taken on aBoard.

Definition at line 99 of file altium_pcb.cpp.

References BOARD::FindNet(), and name.

Referenced by BOOST_AUTO_TEST_CASE(), and ALTIUM_PCB::ParseNets6Data().

◆ ApplyAltiumNetclassRules()

void ApplyAltiumNetclassRules ( const std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > & aRulesByKind,
NET_SETTINGS & aNetSettings,
std::vector< const ARULE6 * > * aUnresolved = nullptr )

Copy the values of Altium rules scoped to a single netclass onto that netclass.

Only rules of the form InNetClass('<name>') against All are considered, and only for the clearance, width and routing-via kinds. Each vector in aRulesByKind must be sorted by ARULE6::priority ascending; the first enabled match for a netclass wins, because Altium priority 1 is the most specific. Disabled rules are skipped.

aUnresolved, when given, collects the rules that name a netclass the board does not define. Those constraints are lost, and the pointers alias aRulesByKind.

Definition at line 136 of file altium_pcb.cpp.

References CLEARANCE, GetAltiumNetclassScopeName(), NET_SETTINGS::GetNetclasses(), ROUTING_VIAS, and WIDTH.

Referenced by BOOST_AUTO_TEST_CASE(), and ALTIUM_PCB::ParseRules6Data().