70 std::vector<std::pair<double, double>>
outline;
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
int srj_layer_index(const std::string &name, int layer_count)
SrjExport srj_export(const std::string &problem_text, const model::Board &routed)
Writes the tracks and vias of routed (a board made by srj_to_kicad from problem_text,...
std::string srj_layer_name(int z, int layer_count)
"top", "inner1", ..., "bottom" for a stack index, and back (-1 if the name is not a layer of the stac...
SrjBoardFiles srj_to_kicad(const SrjProblem &problem, const SrjImportOptions &opt={})
The board is the problem mirrored in y at the same coordinates (x, -y), one footprint per componentId...
constexpr double kSrjDefaultClearanceMm
tscircuit's fallbacks for what a problem leaves out: its router's default obstacle margin (defaultObs...
constexpr double kSrjDefaultViaPadMm
SrjProblem read_srj(const std::string &text)
Parses SRJ text.
SrjProblem read_srj_file(const std::string &path)
std::int64_t Coord
Engine coordinate: signed 64-bit nanometres.
std::vector< std::string > warnings
int srj_pairs
Connections the problem asks for (points - 1 per connection) and the ratsnest size the board implies ...
std::string dru
file contents; dru is empty when no custom rule is needed
int terminal_pads
terminal_pads: pads made for points that lie on no obstacle
std::vector< SrjPoint > points
std::optional< double > width
nominalTraceWidth (or the deprecated width), millimetres
int extra_traces
extra: copper on no path between two points of a connection (stubs, loops)
std::vector< std::string > warnings
std::vector< std::string > unrouted
connection names without a copper path between their points
std::string json
the problem with traces set to the routed copper
Coord outline_margin
The board outline (and plane zones) grow by this on every side; pads keep their coordinates.
bool unpointed_keepout
Obstacles of a net that no connection point lies on are keep-outs, not pads of the net: a fan-out pro...
std::optional< Coord > clearance
copper clearance to use instead of defaultObstacleMargin / the 0.15 mm fallback
std::optional< Coord > hole_to_hole
Drill edge to drill edge, instead of the problem's minViaHoleEdgeToViaHoleEdgeClearance / minPlatedHo...
One electrical net: the connections and obstacles that tscircuit's connectivity map (lib/utils/getCon...
std::vector< int > connections
ascending
std::vector< int > obstacles
ascending
std::string name
KiCad net name: the name of the net's first connection in file order.
std::vector< std::string > connected_to
with offBoardConnectsTo appended: both join the obstacle to a net
std::vector< int > layers
stack indices, ascending
int net
index into SrjProblem::nets, -1 = no net
bool circle
shape "circle": diameter = width
double rotation
ccwRotationDegrees
double height
centre and size, millimetres
A bus whose termination is a plane: every connection of the bus ends in a plane on layer.
std::vector< int > layers
stack indices, ascending; one entry for layer, several for layers
double y
millimetres as written (kept so that export repeats the terminal exactly)
std::vector< SrjPlane > planes
std::vector< int > track_layers
Extension (not tscircuit's): tracemakerTrackLayers, the layers tracks may use; the others get a rule ...
std::vector< std::string > warnings
fields that were read but cannot be honoured
std::vector< SrjConnection > connections
std::vector< SrjNet > nets
std::vector< std::pair< double, double > > outline
empty = the bounds rectangle is the board
std::vector< SrjObstacle > obstacles
std::optional< double > via_hole_to_via_hole
std::optional< double > trace_to_hole
std::optional< double > drill_to_drill
std::optional< double > pad_to_pad
std::optional< double > via_hole
as resolved by tscircuit's getViaDimensions; unset = not in the file
std::optional< double > trace_to_pad
std::optional< double > board_edge
std::optional< double > nominal_trace_width
std::optional< double > obstacle_margin
defaultObstacleMargin
std::optional< double > via_to_pad
std::optional< double > via_pad