90 pad->SetNumber( wxT(
"1" ) );
110 wxFileName odbRoot( tempDir.
PathStr(), wxEmptyString );
111 odbRoot.AppendDir( wxT(
"odb_out" ) );
112 BOOST_REQUIRE( odbRoot.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) );
115 std::map<std::string, UTF8> props;
116 props[
"units"] =
"mm";
117 props[
"sigfig"] =
"6";
118 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( odbRoot.GetFullPath(), board, &props ) );
121 wxFileName netlistFile( odbRoot.GetFullPath(), wxEmptyString );
122 netlistFile.AppendDir( wxT(
"steps" ) );
123 netlistFile.AppendDir( wxT(
"pcb" ) );
124 netlistFile.AppendDir( wxT(
"netlists" ) );
125 netlistFile.AppendDir( wxT(
"cadnet" ) );
126 netlistFile.SetFullName( wxT(
"netlist" ) );
129 wxString netlistContent = ReadFile( netlistFile );
132 wxFileName compFile( odbRoot.GetFullPath(), wxEmptyString );
133 compFile.AppendDir( wxT(
"steps" ) );
134 compFile.AppendDir( wxT(
"pcb" ) );
135 compFile.AppendDir( wxT(
"layers" ) );
136 compFile.AppendDir( wxT(
"comp_+_top" ) );
137 compFile.SetFullName( wxT(
"components" ) );
140 wxString compContent = ReadFile( compFile );
148 BOOST_CHECK_MESSAGE( compContent.Contains( wxT(
"100" ) ),
149 "Component file should contain the pad X coordinate" );
155 BOOST_CHECK_MESSAGE( !netlistContent.Contains( wxT(
"50.0" ) ),
156 "Netlist should not contain aux-origin-shifted X coordinate 50.0" );
157 BOOST_CHECK_MESSAGE( netlistContent.Contains( wxT(
"100.0" ) ),
158 "Netlist should contain the raw pad X coordinate 100.0" );
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
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...