44 nlohmann::json
call(
const std::string& tool,
const nlohmann::json& args);
58 int state()
const {
return cur_; }
66 std::vector<model::Track> tracks;
67 std::vector<model::Via> vias;
70 std::string reason, why;
71 int rips = 0, fails = 0;
72 std::vector<std::string> blockers;
75 std::string net, a, b;
76 double length_mm = -1;
77 int pad_a = -1, pad_b = -1;
80 int id = 0, parent = -1;
83 std::map<std::pair<std::string, std::string>, Reason> reasons;
85 std::optional<std::vector<OpenConn>> open[2];
86 std::optional<std::map<std::string, int>> errors[2];
87 int unconnected[2] = {-1, -1};
90 std::shared_ptr<const model::Board> board;
91 route::RouteResult result;
95 nlohmann::json dispatch(
const std::string& tool,
const nlohmann::json& args);
96 nlohmann::json board_info();
97 nlohmann::json open_connections(
const nlohmann::json& args);
98 nlohmann::json route(
const nlohmann::json& args);
99 nlohmann::json rip_net(
const nlohmann::json& args);
100 nlohmann::json check(
const nlohmann::json& args);
101 nlohmann::json stuck_report(
const nlohmann::json& args);
102 nlohmann::json added_examples(State& s,
const std::map<std::string, int>& added,
bool refill);
103 nlohmann::json inspect_pad(
const nlohmann::json& args);
104 nlohmann::json inspect_net(
const nlohmann::json& args);
105 nlohmann::json history();
106 nlohmann::json undo();
107 nlohmann::json restore(
const nlohmann::json& args);
108 nlohmann::json save(
const nlohmann::json& args);
110 model::Board working(
const Copper& c)
const;
111 const std::vector<OpenConn>& open_of(State& s,
bool soft_zones);
112 const std::map<std::string, int>& errors_of(State& s,
bool refill);
113 int add_state(State s);
114 std::string digest_of(
const Copper& c)
const;
115 nlohmann::json state_json(
const State& s)
const;
119 model::DesignRules rules_;
121 std::vector<State> states_;
124 std::optional<LastRoute> last_;
126 bool soft_used_ =
false;