|
TraceMaker
C++ API of the engine
|
Footprint check against datasheet land patterns (issue #5, docs/05-routing.md §43, D115). More...
#include <string>#include <vector>#include <nlohmann/json.hpp>#include "analysis/footprint_ref.hpp"#include "geom/point.hpp"#include "model/board.hpp"Go to the source code of this file.
Classes | |
| struct | tmk::analysis::FootprintIssue |
| struct | tmk::analysis::FootprintResult |
| struct | tmk::analysis::FootprintCheckOptions |
| struct | tmk::analysis::FootprintCheckReport |
Namespaces | |
| namespace | tmk |
| namespace | tmk::analysis |
Enumerations | |
| enum class | tmk::analysis::Severity { tmk::analysis::Info , tmk::analysis::Warning , tmk::analysis::Error } |
| enum class | tmk::analysis::FootprintStatus { tmk::analysis::Ok , tmk::analysis::Mismatch , tmk::analysis::Unverified , tmk::analysis::Untrusted , tmk::analysis::Skipped } |
Functions | |
| FootprintCheckReport | tmk::analysis::check_footprints (const model::Board &b, const RefLibrary &lib, const FootprintCheckOptions &opt) |
| Deterministic: board order, reference order, no hash iteration. | |
| nlohmann::json | tmk::analysis::footprint_check_json (const model::Board &b, const FootprintCheckReport &r) |
| The report as JSON (millimetres), one footprint_check viewer message (docs/13-viewer-protocol.md), and the text lines (problems first; all adds the footprints that are fine or have no reference). | |
| std::string | tmk::analysis::footprint_check_message (const FootprintCheckReport &r) |
| std::vector< std::string > | tmk::analysis::footprint_check_lines (const FootprintCheckReport &r, bool all) |
Footprint check against datasheet land patterns (issue #5, docs/05-routing.md §43, D115).
For each footprint of a board the check finds the reference (footprint_ref.hpp) made for it: by manufacturer part number, library id, value or designator. A reference from a brand that is not on the trusted list gives no verdict (the footprint is reported as untrusted: nobody vouched for that datasheet). With a trusted reference the footprint's pads are compared with the datasheet's: the pattern is first aligned to the footprint (a rotation by a multiple of 90 degrees, a mirror, and a translation: the footprint's origin and orientation are the library's choice, not a property of the land pattern), then every pad is checked for number, position, size, drill and type. Whatever differs is an error.
A mirror is not free: the pads of a footprint on the front must match the datasheet as drawn, those of a footprint on the back mirrored (that is what flipping a footprint does). A pattern that fits only the other way round is reported as mirrored: the pin numbers run the wrong way.
The check is read-only and geometric. It verifies the footprint against the record somebody made from the datasheet; it does not read the datasheet.
Definition in file footprint_check.hpp.