2024-04-24 18:12:41 +08:00
|
|
|
|
#pragma once
|
2024-03-26 10:33:00 +08:00
|
|
|
|
#include "FileProcessor.h"
|
|
|
|
|
#include "H3DMetaData.h"
|
|
|
|
|
|
|
|
|
|
class H3DFileProcessor : public FileProcessor
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
H3DFileProcessor();
|
|
|
|
|
~H3DFileProcessor();
|
|
|
|
|
|
|
|
|
|
int Process(string jobfile);
|
|
|
|
|
int GetCurrentLayerIndex(void) { return GetLayerIndex(m_MetaData.GetCurrentLayer()); }
|
|
|
|
|
int GetPreviewLayerIndex(void) { return GetLayerIndex(m_MetaData.GetPreviewLayer()); }
|
2024-04-24 18:12:41 +08:00
|
|
|
|
MetaData* GetMetaData() {
|
|
|
|
|
return &m_MetaData; }
|
2024-03-26 10:33:00 +08:00
|
|
|
|
string GetJobTitle() { return m_MetaData.GetJobTitle(); }
|
|
|
|
|
string GetMaterialName() { return m_MetaData.GetMaterial(); }
|
|
|
|
|
double GetLayerThickness() { return *m_MetaData.GetLayerThickness(); }
|
|
|
|
|
unsigned int GetLayerCount() { return m_MetaData.GetLayerCount(); }
|
|
|
|
|
int GetComponentCount() { return m_MetaData.GetComponentCount(); }
|
|
|
|
|
MetaData::Layer* GetLayer(unsigned int index) { return m_MetaData.GetLayer(index); }
|
|
|
|
|
int GetLayerIndex(MetaData::Layer* layer) { return layer->index; }
|
|
|
|
|
string GetJobUid() { return m_MetaData.GetJobUid(); }
|
|
|
|
|
FileType GetFileType() { return FT_H3D; }
|
|
|
|
|
void UpdateFile();
|
|
|
|
|
private:
|
|
|
|
|
string ReadStringFromStream(ifstream* ifs);
|
|
|
|
|
struct order {
|
|
|
|
|
uint64_t id;
|
|
|
|
|
int scanOrder;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
H3DMetaData m_MetaData;
|
|
|
|
|
};
|