32 std::string
write()
const {
return lb_.doc.write(); }
33 void save(
const std::string& path)
const { lb_.doc.save(path); }
43 std::uint64_t uuid_counter_ = 0;
Reads .kicad_pcb files (KiCad 9 and 10 formats) into the board model, keeping the s-expression docume...
void add_via(const model::Via &v)
void flip_footprint(std::size_t index, model::Point pos, double angle)
Moves footprint index to the other side of the board the way KiCad does (FOOTPRINT::Flip,...
void save(const std::string &path) const
std::string next_uuid()
Deterministic RFC-4122-style v4 UUID string.
std::string write() const
void move_footprint(std::size_t index, model::Point pos, double angle)
Moves footprint index to pos with orientation angle (degrees).
void remove_track(std::size_t index)
void remove_via(std::size_t index)
BoardEditor(LoadedBoard &board, std::uint64_t seed=1)
seed makes generated UUIDs deterministic.
void add_track(const model::Track &t)
std::string format_angle(double deg)
Formats an angle the way KiCad writes it: shortest decimal, no trailing zeros ("90",...
std::string flip_layer_name(const model::Board &board, std::string_view name)
KiCad's FlipLayer for outer layers: the first and last copper layer of board (by their names in the f...
bool flip_supported(const LoadedBoard &board, std::size_t index, std::string *why=nullptr)
True if BoardEditor::flip_footprint mirrors every item of footprint index exactly: no copper on inner...
std::int32_t NetId
0 = no net