68 if( !entity->CreateDirectoryTree( writer ) )
69 throw std::runtime_error(
"Failed in create directory tree process" );
73 entity->GenerateFiles( writer );
75 catch(
const std::exception& e )
77 throw std::runtime_error(
"Failed in generate files process.\n" + std::string( e.what() ) );
89 std::shared_ptr<ODB_TREE_WRITER> writer =
90 std::make_shared<ODB_TREE_WRITER>( aFileName );
91 writer->SetRootPath( writer->GetCurrentPath() );
109 entity->InitEntityData();
123 catch(
const std::exception& e )
125 wxLogError(
"Exception in ODB++ ExportODB process: %s", e.what() );
126 std::cerr << e.what() << std::endl;
134 std::vector<FOOTPRINT*> retval;
139 retval.push_back(
static_cast<FOOTPRINT*
>( fp->Clone() ) );
147 const std::map<std::string, UTF8>* aProperties )
151 if(
auto it = aProperties->find(
"units" ); it != aProperties->end() )
153 if( it->second ==
"inch" )
167 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)