TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::passes Namespace Reference

Classes

struct  PourPlan
struct  StitchOptions
struct  StitchReturn
struct  StitchResult
struct  StyleOptions
struct  ConnectionStyle
 One connection: copper of one net from one end to the next. More...
struct  StyleReport
struct  WidenOptions
struct  WidenNet
struct  WidenResult

Functions

std::vector< PourPlan > plan_pours (const model::Board &b, const model::DesignRules &rules, const std::vector< std::string > &specs, std::vector< std::string > *notes=nullptr)
 Resolves route --pour entries against the board:
StitchResult stitch_vias (const model::Board &board, const model::DesignRules &rules, const StitchOptions &opt)
 board holds the routed copper (the run's new tracks and vias appended).
StyleReport measure_style (const model::Board &b, const std::vector< model::Track > &tracks, const std::vector< model::ArcTrack > &arcs, const std::vector< model::Via > &vias, const StyleOptions &opt={})
 Measures tracks, arcs and vias (any subset of a board's copper, e.g.
nlohmann::json style_json (const model::Board &b, const StyleReport &r, bool per_connection=false)
 The style object of the route summary and of tracemaker style --json.
WidenResult widen_tracks (const model::Board &board, const model::DesignRules &rules, std::vector< model::Track > &tracks, const std::vector< model::Via > &vias, const WidenOptions &opt)
 board is the board as the router saw it (without the new copper); tracks and vias are the run's new copper.

Function Documentation

◆ measure_style()

StyleReport tmk::passes::measure_style ( const model::Board & b,
const std::vector< model::Track > & tracks,
const std::vector< model::ArcTrack > & arcs,
const std::vector< model::Via > & vias,
const StyleOptions & opt = {} )

Measures tracks, arcs and vias (any subset of a board's copper, e.g.

only what a run added). b supplies the pads that end connections. The result does not depend on the order of the three lists.

◆ plan_pours()

std::vector< PourPlan > tmk::passes::plan_pours ( const model::Board & b,
const model::DesignRules & rules,
const std::vector< std::string > & specs,
std::vector< std::string > * notes = nullptr )

Resolves route --pour entries against the board:

  • "auto": only when the board has no copper zone (rule areas and teardrops aside); its ground net (a ground name such as GND, GNDD or VSS, with pads; the one with the most pads) on the first inner layer, else on the back layer. A board without such a net gets no pour (a note says why).
  • "NET\@LAYER": that net on that copper layer (KiCad or file layer name). Settings are KiCad's defaults for a new zone (minimum width 0.25 mm, islands removed) except: pads connect solid, not through thermal reliefs (spokes the routed copper cuts off are KiCad starved_thermal errors), and the clearance is the net class clearance but at least 0.3 mm, so the fill keeps out of fine-pitch gaps it could not use. Throws std::invalid_argument on a bad entry, an unknown net or a layer that is not copper.

◆ stitch_vias()

StitchResult tmk::passes::stitch_vias ( const model::Board & board,
const model::DesignRules & rules,
const StitchOptions & opt )

board holds the routed copper (the run's new tracks and vias appended).

Zone fills on it may be stale: the pass refills them in the engine (drc/refill.hpp) and places against that.

◆ style_json()

nlohmann::json tmk::passes::style_json ( const model::Board & b,
const StyleReport & r,
bool per_connection = false )

The style object of the route summary and of tracemaker style --json.

per_connection adds one row per connection.

◆ widen_tracks()

WidenResult tmk::passes::widen_tracks ( const model::Board & board,
const model::DesignRules & rules,
std::vector< model::Track > & tracks,
const std::vector< model::Via > & vias,
const WidenOptions & opt )

board is the board as the router saw it (without the new copper); tracks and vias are the run's new copper.

On return the widths in tracks are the widened ones; order and end points are unchanged.