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

#include <place/problem.hpp>

Public Attributes

bool fix_edge_connectors = true
 connectors (J*, P*, CN*, USB*) touching the outline stay put
Coord courtyard_clearance = -1
 override (-1: from the rules, else default_clearance)
Coord default_clearance = 250'000
 used when the board has no courtyard rule (KiCad's own default is 0)
bool decap_affinity = true
 tie each decoupling capacitor to the nearest supply pin of its IC
int decap_weight = kSignalWeight
 weight of those ties (D25: signal weight)
int crules_weight_pct = 100
 scale of the component-rule proximity weights (100 = as the rules say)
bool crules_two_stage = true
 Full mode with component rules: place with the decoupling ties only, then lock the tied capacitors and refine with the component-rule pulls (they compete for the space next to the IC otherwise; doc 15 §14.3).
std::vector< PadAffinity > affinities
 Extra objective-only pseudo-nets from component rules (crules::placement_affinities).
std::vector< EdgePull > edge_pulls
 Edge pulls for movable parts (crules::edge_attractions); fixed parts are skipped.
bool flip = false
 Side assignment (doc 04 §3 C/E, D48): movable surface-mount parts may move to the other side.
std::vector< std::uint8_t > flip_ok
std::vector< std::string > flip_why
std::vector< std::string > keep_side
std::vector< std::string > pads_only
 References whose courtyard is ignored: the part is as large as its pads (box + 0.25 mm), like a footprint drawn without a courtyard.
std::vector< std::string > copper_only
 References tested by copper and holes only: neither their outline nor the other parts' courtyards count against them (copper clearance, hole spacing and the board edge still do).
bool scratch = false
 The input positions of movable parts mean nothing (a board straight from the schematic: parts piled or beside the board).

Detailed Description

Definition at line 152 of file problem.hpp.

Member Data Documentation

◆ affinities

std::vector<PadAffinity> tmk::place::ExtractOptions::affinities

Extra objective-only pseudo-nets from component rules (crules::placement_affinities).

Parts already tied by decap_affinity are skipped.

Definition at line 164 of file problem.hpp.

◆ copper_only

std::vector<std::string> tmk::place::ExtractOptions::copper_only

References tested by copper and holes only: neither their outline nor the other parts' courtyards count against them (copper clearance, hole spacing and the board edge still do).

The last resort before a part is left off the board: battery holders, modules and headers that the designer placed across other courtyards.

Definition at line 181 of file problem.hpp.

◆ courtyard_clearance

Coord tmk::place::ExtractOptions::courtyard_clearance = -1

override (-1: from the rules, else default_clearance)

Definition at line 154 of file problem.hpp.

◆ crules_two_stage

bool tmk::place::ExtractOptions::crules_two_stage = true

Full mode with component rules: place with the decoupling ties only, then lock the tied capacitors and refine with the component-rule pulls (they compete for the space next to the IC otherwise; doc 15 §14.3).

Definition at line 161 of file problem.hpp.

◆ crules_weight_pct

int tmk::place::ExtractOptions::crules_weight_pct = 100

scale of the component-rule proximity weights (100 = as the rules say)

Definition at line 158 of file problem.hpp.

◆ decap_affinity

bool tmk::place::ExtractOptions::decap_affinity = true

tie each decoupling capacitor to the nearest supply pin of its IC

Definition at line 156 of file problem.hpp.

◆ decap_weight

int tmk::place::ExtractOptions::decap_weight = kSignalWeight

weight of those ties (D25: signal weight)

Definition at line 157 of file problem.hpp.

◆ default_clearance

Coord tmk::place::ExtractOptions::default_clearance = 250'000

used when the board has no courtyard rule (KiCad's own default is 0)

Definition at line 155 of file problem.hpp.

◆ edge_pulls

std::vector<EdgePull> tmk::place::ExtractOptions::edge_pulls

Edge pulls for movable parts (crules::edge_attractions); fixed parts are skipped.

Definition at line 166 of file problem.hpp.

◆ fix_edge_connectors

bool tmk::place::ExtractOptions::fix_edge_connectors = true

connectors (J*, P*, CN*, USB*) touching the outline stay put

Definition at line 153 of file problem.hpp.

◆ flip

bool tmk::place::ExtractOptions::flip = false

Side assignment (doc 04 §3 C/E, D48): movable surface-mount parts may move to the other side.

flip_ok (one entry per footprint; empty = all) says whether the writer can mirror the footprint, flip_why why not; keep_side lists references the user pins to their side.

Definition at line 170 of file problem.hpp.

◆ flip_ok

std::vector<std::uint8_t> tmk::place::ExtractOptions::flip_ok

Definition at line 171 of file problem.hpp.

◆ flip_why

std::vector<std::string> tmk::place::ExtractOptions::flip_why

Definition at line 172 of file problem.hpp.

◆ keep_side

std::vector<std::string> tmk::place::ExtractOptions::keep_side

Definition at line 173 of file problem.hpp.

◆ pads_only

std::vector<std::string> tmk::place::ExtractOptions::pads_only

References whose courtyard is ignored: the part is as large as its pads (box + 0.25 mm), like a footprint drawn without a courtyard.

Full mode's fallback for parts whose courtyard fits nowhere (designers overlap courtyards routinely: 24 of the 40 boards of set H do; doc 04 §9).

Definition at line 177 of file problem.hpp.

◆ scratch

bool tmk::place::ExtractOptions::scratch = false

The input positions of movable parts mean nothing (a board straight from the schematic: parts piled or beside the board).

A part that overhangs the edge where the input has it is then not held there.

Definition at line 184 of file problem.hpp.


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