51 Make<ODB_FONTS_ENTITY>();
52 Make<ODB_INPUT_ENTITY>();
53 Make<ODB_MATRIX_ENTITY>(
m_board,
this );
54 Make<ODB_STEP_ENTITY>(
m_board,
this );
55 Make<ODB_MISC_ENTITY>();
56 Make<ODB_SYMBOLS_ENTITY>();
57 Make<ODB_USER_ENTITY>();
58 Make<ODB_WHEELS_ENTITY>();
66 if( !entity->CreateDirectoryTree( writer ) )
68 throw std::runtime_error(
"Failed in create directory tree process" );
74 entity->GenerateFiles( writer );
76 catch(
const std::exception& e )
78 throw std::runtime_error(
"Failed in generate files process.\n"
79 + std::string( e.what() ) );
92 std::shared_ptr<ODB_TREE_WRITER> writer =
93 std::make_shared<ODB_TREE_WRITER>( aFileName,
"odb" );
94 writer->SetRootPath( writer->GetCurrentPath() );
112 entity->InitEntityData();
126 catch(
const std::exception& e )
128 wxLogError(
"Exception in ODB++ ExportODB process: %s", e.what() );
129 std::cerr << e.what() << std::endl;
137 std::vector<FOOTPRINT*> retval;
142 retval.push_back(
static_cast<FOOTPRINT*
>( fp->Clone() ) );
150 const std::map<std::string, UTF8>* aProperties )
154 if(
auto it = aProperties->find(
"units" ); it != aProperties->end() )
156 if( it->second ==
"inch" )
170 if(
auto it = aProperties->find(
"sigfig" ); it != aProperties->end() )
constexpr double PCB_IU_PER_MM
constexpr double PL_IU_PER_MM
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()
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)
virtual void SetNumPhases(int aNumPhases)=0
Set the number of phases.
virtual void Report(const wxString &aMessage)=0
Display aMessage in the progress bar dialog.
virtual void BeginPhase(int aPhase)=0
Initialize the aPhase virtual zone of the dialog progress bar.
virtual void AdvancePhase()=0
Use the next available virtual zone of the dialog progress bar.
virtual void SetCurrentProgress(double aProgress)=0
Set the progress value to aProgress (0..1).