TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
causes.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2#pragma once
3// Why connections stay open on a routed board (M20 C5, doc 05 ยง55): each open connection is classified by what has to change for the router to
4// route it. The router is run again on copies of the board, its copper locked, with other nets' copper taken away: near the connection's ends
5// only the nets that pass through (no pad on an end's part), then all of it near the ends, then all of it away from them, then everywhere. The
6// first copy on which the connection routes names the cause; one on which it never routes is "no_path_bare". A pin that cannot leave its
7// package under the rules on the bare board (route/escape.hpp) is "pin_cannot_escape", without a run.
8#include <cstdint>
9#include <string>
10
11#include <nlohmann/json.hpp>
12
13namespace tmk::app {
14
16 std::string rules_from; // read the rules beside this board instead (a routed copy may have lost its project file)
17 long baseline_work = 10'000'000; // work of the run on the board as it is (connections it routes were left by the budget or the order)
18 long work = 2'000'000; // work of each run that routes one net on a changed copy
19 double radius_mm = 2.0; // "near an end": within this distance of an end pad's box
20 int threads = 8; // nets classified at once (the result does not depend on it)
21 std::uint64_t seed = 1;
22 bool baseline_only = false; // only the run on the board as it is (the layer test: run it on a copy with more layers)
23};
24
25// Classifies the open connections of `board` and returns the report (also printed as a table when `print`).
26nlohmann::json classify_open_connections(const std::string& board, const CausesOptions& opt, bool print);
27
28} // namespace tmk::app
nlohmann::json classify_open_connections(const std::string &board, const CausesOptions &opt, bool print)
Classifies the open connections of board and returns the report (also printed as a table when print).
int threads
nets classified at once (the result does not depend on it)
Definition causes.hpp:20
long work
work of each run that routes one net on a changed copy
Definition causes.hpp:18
long baseline_work
work of the run on the board as it is (connections it routes were left by the budget or the order)
Definition causes.hpp:17
bool baseline_only
only the run on the board as it is (the layer test: run it on a copy with more layers)
Definition causes.hpp:22
std::uint64_t seed
Definition causes.hpp:21
std::string rules_from
read the rules beside this board instead (a routed copy may have lost its project file)
Definition causes.hpp:16
double radius_mm
"near an end": within this distance of an end pad's box
Definition causes.hpp:19