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

#include <model/board.hpp>

Classes

struct  CustomPrim
 Custom-pad primitives in the pad frame, each already grown by half its stroke width (KiCad draws them with a round pen and fills them): a polygon or rectangle, a polyline (line, arc) or a disc (circle; pts[0] is the centre). More...

Public Attributes

int footprint = -1
std::string number
PadType type = PadType::Smd
PadShape shape = PadShape::Rect
Point pos
 absolute centre
double angle = 0
 absolute orientation, degrees
Coord size_x = 0
Coord size_y = 0
Coord drill_x = 0
Coord drill_y = 0
 0 = no hole
bool drill_oval = false
Point drill_offset
 copper shape offset from the hole (pad position), in the pad's own frame
LayerMask copper = 0
 copper layers the pad has copper on
std::vector< std::string > layers
 all layer names as written (incl. mask/paste, wildcards expanded)
double roundrect_ratio = 0
double chamfer_ratio = 0
std::uint8_t chamfer_corners = 0
 bit 0 TL, 1 TR, 2 BL, 3 BR
Coord trapezoid_dx = 0
Coord trapezoid_dy = 0
 rect_delta
std::vector< CustomPrim > custom_prims
Coord clearance = -1
 local override, -1 = none
Coord mask_margin = INT64_MIN
 local solder-mask expansion (unset = INT64_MIN)
ZoneConnect zone_connect = ZoneConnect::Inherited
 (zone_connect n)
Coord thermal_gap = -1
Coord thermal_bridge_width = -1
 local overrides, -1 = none
double thermal_bridge_angle = -1
 degrees; -1 = KiCad's default (45 for round pads, 90 otherwise)
std::string pinfunction
 Schematic pin name and electrical type (KiCad 6+ boards; empty in older files).
std::string pintype
NetId net = 0
sexpr::NodeId node = sexpr::kNoNode

Detailed Description

Definition at line 47 of file board.hpp.

Member Data Documentation

◆ angle

double tmk::model::Pad::angle = 0

absolute orientation, degrees

Definition at line 53 of file board.hpp.

◆ chamfer_corners

std::uint8_t tmk::model::Pad::chamfer_corners = 0

bit 0 TL, 1 TR, 2 BL, 3 BR

Definition at line 62 of file board.hpp.

◆ chamfer_ratio

double tmk::model::Pad::chamfer_ratio = 0

Definition at line 61 of file board.hpp.

◆ clearance

Coord tmk::model::Pad::clearance = -1

local override, -1 = none

Definition at line 72 of file board.hpp.

◆ copper

LayerMask tmk::model::Pad::copper = 0

copper layers the pad has copper on

Definition at line 58 of file board.hpp.

◆ custom_prims

std::vector<CustomPrim> tmk::model::Pad::custom_prims

Definition at line 71 of file board.hpp.

◆ drill_offset

Point tmk::model::Pad::drill_offset

copper shape offset from the hole (pad position), in the pad's own frame

Definition at line 57 of file board.hpp.

◆ drill_oval

bool tmk::model::Pad::drill_oval = false

Definition at line 56 of file board.hpp.

◆ drill_x

Coord tmk::model::Pad::drill_x = 0

Definition at line 55 of file board.hpp.

◆ drill_y

Coord tmk::model::Pad::drill_y = 0

0 = no hole

Definition at line 55 of file board.hpp.

◆ footprint

int tmk::model::Pad::footprint = -1

Definition at line 48 of file board.hpp.

◆ layers

std::vector<std::string> tmk::model::Pad::layers

all layer names as written (incl. mask/paste, wildcards expanded)

Definition at line 59 of file board.hpp.

◆ mask_margin

Coord tmk::model::Pad::mask_margin = INT64_MIN

local solder-mask expansion (unset = INT64_MIN)

Definition at line 73 of file board.hpp.

◆ net

NetId tmk::model::Pad::net = 0

Definition at line 80 of file board.hpp.

◆ node

sexpr::NodeId tmk::model::Pad::node = sexpr::kNoNode

Definition at line 81 of file board.hpp.

◆ number

std::string tmk::model::Pad::number

Definition at line 49 of file board.hpp.

◆ pinfunction

std::string tmk::model::Pad::pinfunction

Schematic pin name and electrical type (KiCad 6+ boards; empty in older files).

Read-only, used to recognise component roles (doc 15 ยง3.1).

Definition at line 79 of file board.hpp.

◆ pintype

std::string tmk::model::Pad::pintype

Definition at line 79 of file board.hpp.

◆ pos

Point tmk::model::Pad::pos

absolute centre

Definition at line 52 of file board.hpp.

◆ roundrect_ratio

double tmk::model::Pad::roundrect_ratio = 0

Definition at line 60 of file board.hpp.

◆ shape

PadShape tmk::model::Pad::shape = PadShape::Rect

Definition at line 51 of file board.hpp.

◆ size_x

Coord tmk::model::Pad::size_x = 0

Definition at line 54 of file board.hpp.

◆ size_y

Coord tmk::model::Pad::size_y = 0

Definition at line 54 of file board.hpp.

◆ thermal_bridge_angle

double tmk::model::Pad::thermal_bridge_angle = -1

degrees; -1 = KiCad's default (45 for round pads, 90 otherwise)

Definition at line 76 of file board.hpp.

◆ thermal_bridge_width

Coord tmk::model::Pad::thermal_bridge_width = -1

local overrides, -1 = none

Definition at line 75 of file board.hpp.

◆ thermal_gap

Coord tmk::model::Pad::thermal_gap = -1

Definition at line 75 of file board.hpp.

◆ trapezoid_dx

Coord tmk::model::Pad::trapezoid_dx = 0

Definition at line 63 of file board.hpp.

◆ trapezoid_dy

Coord tmk::model::Pad::trapezoid_dy = 0

rect_delta

Definition at line 63 of file board.hpp.

◆ type

PadType tmk::model::Pad::type = PadType::Smd

Definition at line 50 of file board.hpp.

◆ zone_connect

ZoneConnect tmk::model::Pad::zone_connect = ZoneConnect::Inherited

(zone_connect n)

Definition at line 74 of file board.hpp.


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