TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
project_reader.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
#pragma once
3
// Reads design rules from a KiCad project: <name>.kicad_pro (JSON) and <name>.kicad_dru (s-expressions).
4
#include <string>
5
6
#include "
model/rules.hpp
"
7
8
namespace
tmk::io
{
9
10
// `board_path` is the .kicad_pcb; the project and rule files are looked up next to it with the same stem.
11
// Missing files give KiCad's defaults and a warning, never an exception.
12
model::DesignRules
read_design_rules
(
const
std::string& board_path);
13
14
// Parses a KiCad length with an optional unit suffix ("0.2mm", "8mil", "0.01in", "150um", "0.2") to nm.
15
std::optional<Coord>
parse_length
(std::string_view s);
16
17
}
// namespace tmk::io
tmk::io
Definition
board_editor.hpp:12
tmk::io::parse_length
std::optional< Coord > parse_length(std::string_view s)
Parses a KiCad length with an optional unit suffix ("0.2mm", "8mil", "0.01in", "150um",...
tmk::io::read_design_rules
model::DesignRules read_design_rules(const std::string &board_path)
board_path is the .kicad_pcb; the project and rule files are looked up next to it with the same stem.
rules.hpp
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
tmk::model::DesignRules
Definition
rules.hpp:62
io
kicad
project_reader.hpp
Generated by
1.15.0