68 if( !entity->CreateDirectoryTree( writer ) )
70 throw std::runtime_error(
"Failed in create directory tree process" );
76 entity->GenerateFiles( writer );
78 catch(
const std::exception& e )
80 throw std::runtime_error(
"Failed in generate files process.\n"
81 + std::string( e.what() ) );
94 std::shared_ptr<ODB_TREE_WRITER> writer =
95 std::make_shared<ODB_TREE_WRITER>( aFileName );
96 writer->SetRootPath( writer->GetCurrentPath() );
114 entity->InitEntityData();
128 catch(
const std::exception& e )
130 wxLogError(
"Exception in ODB++ ExportODB process: %s", e.what() );
131 std::cerr << e.what() << std::endl;
139 std::vector<FOOTPRINT*> retval;
144 retval.push_back(
static_cast<FOOTPRINT*
>( fp->Clone() ) );
152 const std::map<std::string, UTF8>* aProperties )
156 if(
auto it = aProperties->find(
"units" ); it != aProperties->end() )
158 if( it->second ==
"inch" )
172 if(
auto it = aProperties->find(
"sigfig" ); it != aProperties->end() )
constexpr double PCB_IU_PER_MM
Pcbnew IU is 1 nanometer.
constexpr double PL_IU_PER_MM
Internal units in micron (should be enough).
Information pertinent to a Pcbnew printed circuit board.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
void ClearLoadedFootprints()
void Make(Args &&... args)
bool ExportODB(const wxString &aFileName)
static double m_symbolScale
std::vector< std::shared_ptr< FOOTPRINT > > m_loaded_footprints
std::vector< std::shared_ptr< ODB_ENTITY_BASE > > m_entities
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...
static std::string m_unitsStr
bool GenerateFiles(ODB_TREE_WRITER &writer)