Files
EgtExchange/ImportBtl.h
DarioS 3f99541786 EgtExchange 2.4b3 :
- in import BTL aggiunta gestione RawParts (grezzi per nesting) e Composites (per pareti a layer).
2022-02-27 16:23:30 +01:00

66 lines
2.9 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2015-2020
//----------------------------------------------------------------------------
// File : ImportBtl.h Data : 30.08.20 Versione : 2.2i1
// Contenuto : Dichiarazione della classe ImportBtl.
//
//
//
// Modifiche : 22.08.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "BtlGeom.h"
#include "/EgtDev/Include/EExImportBtl.h"
#include "/EgtDEv/Include/EGnScanner.h"
//----------------------------------------------------------------------------
class ImportBtl : public IImportBtl
{
public :
bool Import( const std::string& sFile, IGeomDB* pGDB, int nFlag = 0) override ;
public :
ImportBtl( void) ;
private :
enum ObjType { PART = 1, RAWPART = 2, COMPOSITE = 3} ;
private :
bool ReadHeader( void) ;
bool ReadGeneral( bool& bEnd) ;
bool ReadObject( ObjType nType, bool& bEnd) ;
bool ReadTransformation( const std::string& sVal, Frame3d& frRef) ;
bool ReadOutline( void) ;
bool ReadAperture( void) ;
bool ReadColor( const std::string& sVal, Color& colRes) ;
bool ReadGrainDirection( const std::string& sVal, Vector3d& vtDir, bool& bAlign) ;
bool ReadReferenceSide( const std::string& sVal, int& nSide, bool& bAlign) ;
bool ReadProcess( bool bObjRef, bool& bProcEnd) ;
bool SkipCurrSection( void) ;
bool SkipCurrProcess( void) ;
bool GetProcessParams( const std::string& sText, const std::string& sProcType,
const INTVECTOR& vnDPar, int nSPar,
DBLVECTOR& vdPar, std::string& sPar) ;
bool GetInfo( const std::string& sText, const std::string& sPar, std::string& sVal) ;
bool GetInfo( const std::string& sText, const std::string& sPar, int& nVal) ;
bool GetParam( const std::string& sPar, double& dVal) ;
bool GetParam( const std::string& sText, const std::string& sPar, int& nVal) ;
bool GetParam( const std::string& sText, const std::string& sPar, double& dVal) ;
bool GetParam( const std::string& sText, const std::string& sPar, std::string& sVal) ;
bool GetParamP( const std::string& sText, int nInd, int& nVal) ;
bool GetParamP( const std::string& sText, int nInd, double& dVal) ;
bool GetParamP( const std::string& sText, int nInd, std::string& sVal) ;
private :
Scanner m_theScanner ;
std::string m_sVersion ; // versione BTL
int m_nBuild ; // build BTL
int m_nEdition ; // 0=standard, 1=prefabbricazione
double m_dScale ; // fattore di scalatura dei parametri
BtlGeom m_BtlGeom ; // gestore geometria pezzi Btl
} ;