92 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
109 addEdge( { 0, 0 }, { side, 0 } );
110 addEdge( { side, 0 }, { side, side } );
111 addEdge( { side, side }, { 0, side } );
112 addEdge( { 0, side }, { 0, 0 } );
116 dimension->SetLayer(
F_SilkS );
117 dimension->SetStart( { 0, 0 } );
118 dimension->SetEnd( { side, 0 } );
119 dimension->SetHeight(
pcbIUScale.mmToIU( 3 ) );
120 dimension->SetLineThickness(
pcbIUScale.mmToIU( 0.15 ) );
126 BOOST_REQUIRE_MESSAGE( !dimension->GetShapes().empty(),
127 "Dimension produced no geometry to export" );
129 board->Add( dimension );
131 const fs::path outDir = fs::temp_directory_path()
132 / (
"kicad_qa_odb_dimension_20249_" +
KIID().
AsString().ToStdString() );
137 std::map<std::string, UTF8> props;
138 props[
"units"] =
"mm";
139 props[
"sigfig"] =
"6";
141 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( outDir.string(), board.get(), &props ) );
143 BOOST_REQUIRE_MESSAGE( fs::exists( outDir ),
"ODB++ export produced no output tree" );
147 BOOST_REQUIRE_MESSAGE( !silkFeatures.empty(),
148 "ODB++ export produced no silkscreen features file" );
153 "Dimensions were dropped from the ODB++ export (no line features emitted)" );
155 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...