61 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
75 addEdge( { 0, 0 }, { side, 0 } );
76 addEdge( { side, 0 }, { side, side } );
77 addEdge( { side, side }, { 0, side } );
78 addEdge( { 0, side }, { 0, 0 } );
84 textbox->SetText( wxT(
"MCU" ) );
86 textbox->SetTextThickness(
pcbIUScale.mmToIU( 0.254 ) );
87 textbox->SetBold(
true );
88 textbox->SetMirrored(
true );
89 textbox->SetBorderEnabled(
false );
90 textbox->SetIsKnockout(
true );
91 board->Add( textbox );
93 const fs::path outDir =
94 fs::temp_directory_path() / (
"kicad_qa_odb_knockout_25074_" +
KIID().
AsString().ToStdString() );
99 std::map<std::string, UTF8> props;
100 props[
"units"] =
"mm";
101 props[
"sigfig"] =
"6";
103 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( outDir.string(), board.get(), &props ) );
105 const fs::path features = outDir /
"steps" /
"pcb" /
"layers" /
"b.silkscreen" /
"features";
107 BOOST_REQUIRE_MESSAGE( fs::exists( features ),
"ODB++ export produced no back silkscreen features file" );
110 "Knockout text box produced no surface features on the back silkscreen" );
112 fs::remove_all( outDir );
void SaveBoard(const wxString &aFileName, BOARD *aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be u...
BOOST_AUTO_TEST_CASE(OdbKnockoutTextboxExport)
static int countSurfaceRecords(const fs::path &aFeaturesFile)