TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::model::Board Struct Reference

#include <model/board.hpp>

Public Member Functions

int copper_count () const
const std::string & copper_name (int idx) const
const std::string & copper_file_name (int idx) const
int copper_index (std::string_view name) const
 -1 if not copper (canonical or file name)
NetId net_by_name (std::string_view name) const
 0 if unknown
Box edge_bbox () const
 Bounding box of everything on Edge.Cuts (graphics stroke widths excluded).

Public Attributes

bool infer_graphic_nets = false
 Board-level copper graphics (polygons on a copper layer) take the net of the one net whose pads, tracks or vias they touch (a designer's manual pour); ones touching several nets stay net-less.
std::int64_t version = 0
std::string generator
std::vector< LayerDef > layers
std::vector< int > copper
 indices into layers, in stack order
std::vector< Net > nets
 nets[0] is the unnamed net
bool named_nets = false
 true for KiCad 10 "(net "name")" syntax
std::vector< Footprint > footprints
std::vector< Pad > pads
std::vector< Graphic > graphics
std::vector< Text > texts
std::vector< Track > tracks
std::vector< ArcTrack > arcs
std::vector< Via > vias
std::vector< Zone > zones
Coord thickness = 1'600'000
Coord pad_to_mask_clearance = 0
 board solder-mask expansion for pads (setup)
bool vias_tented = false
 (setup (tenting front back)); old boards: untented
Stackup stackup
 (setup (stackup ...)); present == false when the file has none
std::vector< std::string > warnings
std::unordered_map< std::string, NetId > net_index

Detailed Description

Definition at line 186 of file board.hpp.

Member Function Documentation

◆ copper_count()

int tmk::model::Board::copper_count ( ) const
inline

Definition at line 210 of file board.hpp.

◆ copper_file_name()

const std::string & tmk::model::Board::copper_file_name ( int idx) const
inline

Definition at line 212 of file board.hpp.

◆ copper_index()

int tmk::model::Board::copper_index ( std::string_view name) const

-1 if not copper (canonical or file name)

◆ copper_name()

const std::string & tmk::model::Board::copper_name ( int idx) const
inline

Definition at line 211 of file board.hpp.

◆ edge_bbox()

Box tmk::model::Board::edge_bbox ( ) const

Bounding box of everything on Edge.Cuts (graphics stroke widths excluded).

◆ net_by_name()

NetId tmk::model::Board::net_by_name ( std::string_view name) const

0 if unknown

Member Data Documentation

◆ arcs

std::vector<ArcTrack> tmk::model::Board::arcs

Definition at line 201 of file board.hpp.

◆ copper

std::vector<int> tmk::model::Board::copper

indices into layers, in stack order

Definition at line 193 of file board.hpp.

◆ footprints

std::vector<Footprint> tmk::model::Board::footprints

Definition at line 196 of file board.hpp.

◆ generator

std::string tmk::model::Board::generator

Definition at line 191 of file board.hpp.

◆ graphics

std::vector<Graphic> tmk::model::Board::graphics

Definition at line 198 of file board.hpp.

◆ infer_graphic_nets

bool tmk::model::Board::infer_graphic_nets = false

Board-level copper graphics (polygons on a copper layer) take the net of the one net whose pads, tracks or vias they touch (a designer's manual pour); ones touching several nets stay net-less.

Off: every board copper graphic is net-less copper that no track may touch (route –soft-copper-graphics turns it on).

Definition at line 189 of file board.hpp.

◆ layers

std::vector<LayerDef> tmk::model::Board::layers

Definition at line 192 of file board.hpp.

◆ named_nets

bool tmk::model::Board::named_nets = false

true for KiCad 10 "(net "name")" syntax

Definition at line 195 of file board.hpp.

◆ net_index

std::unordered_map<std::string, NetId> tmk::model::Board::net_index

Definition at line 218 of file board.hpp.

◆ nets

std::vector<Net> tmk::model::Board::nets

nets[0] is the unnamed net

Definition at line 194 of file board.hpp.

◆ pad_to_mask_clearance

Coord tmk::model::Board::pad_to_mask_clearance = 0

board solder-mask expansion for pads (setup)

Definition at line 205 of file board.hpp.

◆ pads

std::vector<Pad> tmk::model::Board::pads

Definition at line 197 of file board.hpp.

◆ stackup

Stackup tmk::model::Board::stackup

(setup (stackup ...)); present == false when the file has none

Definition at line 207 of file board.hpp.

◆ texts

std::vector<Text> tmk::model::Board::texts

Definition at line 199 of file board.hpp.

◆ thickness

Coord tmk::model::Board::thickness = 1'600'000

Definition at line 204 of file board.hpp.

◆ tracks

std::vector<Track> tmk::model::Board::tracks

Definition at line 200 of file board.hpp.

◆ version

std::int64_t tmk::model::Board::version = 0

Definition at line 190 of file board.hpp.

◆ vias

std::vector<Via> tmk::model::Board::vias

Definition at line 202 of file board.hpp.

◆ vias_tented

bool tmk::model::Board::vias_tented = false

(setup (tenting front back)); old boards: untented

Definition at line 206 of file board.hpp.

◆ warnings

std::vector<std::string> tmk::model::Board::warnings

Definition at line 208 of file board.hpp.

◆ zones

std::vector<Zone> tmk::model::Board::zones

Definition at line 203 of file board.hpp.


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