aa80fb63af
- in import ed export 3MF gestione della gerarchia dei gruppi - migliorie e correzioni varie.
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : Import3MF.h Data : 29.01.21 Versione : 2.3b1
|
|
// Contenuto : Dichiarazione della classe Import3MF.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 21.01.21 SP Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#define NOMINMAX
|
|
|
|
#include "pugixml.hpp"
|
|
#include "/EgtDev/Include/EExImport3MF.h"
|
|
#include "/EgtDev/Extern/libzip/Include/zip.h"
|
|
#include "/EgtDev/Extern/Lib3MF/Include/lib3mf_implicit.hpp"
|
|
#include <unordered_map>
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
class Import3MF : public IImport3MF
|
|
{
|
|
private :
|
|
typedef std::vector<std::pair<std::string, std::string>> INFOVECTOR ;
|
|
|
|
public :
|
|
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, int nFlag = 0) ;
|
|
|
|
private :
|
|
bool DoImport( const std::string& sFile) ;
|
|
bool ReadObject( const Lib3MF::PObject pObj, const Lib3MF::sTransform& Transform, int nParentId) ;
|
|
bool ReadComponent( Lib3MF_uint32 nId, const std::string& sName, const INFOVECTOR& vInfo, const Lib3MF::sTransform& Transform,
|
|
int nParentId) ;
|
|
bool ReadMesh( Lib3MF_uint32 nId, const std::string& sName, const INFOVECTOR& vInfo, const Lib3MF::sTransform& Transfrorm,
|
|
int nParentId) ;
|
|
bool FindColor( Lib3MF_uint32 pid, Lib3MF_uint32 pindex, Color& cCol) const ;
|
|
|
|
private :
|
|
double m_dScaleFactor ;
|
|
IGeomDB* m_pGDB ;
|
|
int m_nIdGroup ;
|
|
int m_nFlag ;
|
|
Lib3MF::PWrapper m_wrapper ;
|
|
Lib3MF::PModel m_model ;
|
|
} ;
|