|
KiCad PCB EDA Suite
|
#include <filesystem>#include <fstream>#include <memory>#include <qa_utils/wx_utils/unit_test_utils.h>#include <boost/test/unit_test.hpp>#include <base_units.h>#include <board.h>#include <kiid.h>#include <pcb_dimension.h>#include <pcb_shape.h>#include <pcbnew/pcb_io/odbpp/pcb_io_odbpp.h>#include <settings/settings_manager.h>#include <core/utf8.h>Go to the source code of this file.
Functions | |
| static int | countOdbLineRecords (const fs::path &aFeaturesFile) |
| Count line ("L ") feature records in a single ODB++ "features" file. | |
| static fs::path | findSilkFeaturesFile (const fs::path &aRoot) |
| Locate the silkscreen layer "features" file in an ODB++ export tree. | |
| BOOST_AUTO_TEST_CASE (OdbDimensionExport) | |
| BOOST_AUTO_TEST_CASE | ( | OdbDimensionExport | ) |
Definition at line 89 of file test_odb_dimension_export.cpp.
References KIID::AsString(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), countOdbLineRecords(), Edge_Cuts, F_SilkS, findSilkFeaturesFile(), PCB_DIM_ALIGNED_T, pcbIUScale, PCB_IO_ODBPP::SaveBoard(), SEGMENT, EDA_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), EDA_SHAPE::SetStart(), and EDA_SHAPE::SetWidth().
|
static |
Count line ("L ") feature records in a single ODB++ "features" file.
A dimension's extension lines, crossbar and arrowheads are emitted as line records, so a non-zero count in the silkscreen layer proves the dimension reached the feature stream (regression guard for GitLab #20249, where the PCB_DIM_*_T cases were stubbed out of the ODB++ feature generator).
Definition at line 50 of file test_odb_dimension_export.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
Locate the silkscreen layer "features" file in an ODB++ export tree.
The layer directory name is derived from the board layer name, so it is matched by substring ("silk") rather than a hard-coded path to stay robust against ODB++ naming changes.
Definition at line 72 of file test_odb_dimension_export.cpp.
Referenced by BOOST_AUTO_TEST_CASE().