100 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
117 addEdge( { 0, 0 }, { side, 0 } );
118 addEdge( { side, 0 }, { side, side } );
119 addEdge( { side, side }, { 0, side } );
120 addEdge( { 0, side }, { 0, 0 } );
124 dimension->SetLayer(
F_SilkS );
125 dimension->SetStart( { 0, 0 } );
126 dimension->SetEnd( { side, 0 } );
127 dimension->SetHeight(
pcbIUScale.mmToIU( 3 ) );
128 dimension->SetLineThickness(
pcbIUScale.mmToIU( 0.15 ) );
134 BOOST_REQUIRE_MESSAGE( !dimension->GetShapes().empty(),
135 "Dimension produced no geometry to export" );
137 board->Add( dimension );
139 const fs::path outDir = fs::temp_directory_path()
140 / (
"kicad_qa_odb_dimension_20249_" +
KIID().
AsString().ToStdString() );
145 std::map<std::string, UTF8> props;
146 props[
"units"] =
"mm";
147 props[
"sigfig"] =
"6";
149 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( outDir.string(), board.get(), &props ) );
151 BOOST_REQUIRE_MESSAGE( fs::exists( outDir ),
"ODB++ export produced no output tree" );
153 bool foundSilk =
false;
156 BOOST_REQUIRE_MESSAGE( foundSilk,
"ODB++ export produced no silkscreen features file" );
159 "Dimensions were dropped from the ODB++ export (no line features emitted)" );
161 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...