Files
EgtExchange/ImportCnc.h
T
Dario Sassi 370a9d2af5 EgtExhange 1.6e2 :
- aggiornamenti per cambio nome di alcuni include di base.
2015-05-11 20:52:33 +00:00

81 lines
2.9 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : ImportCnc.h Data : 15.09.14 Versione : 1.5i3
// Contenuto : Dichiarazione della classe ImportCnc.
//
//
//
// Modifiche : 15.09.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EExImportCnc.h"
#include "/EgtDev/Include/EgtStringBase.h"
class ICurveArc ;
//----------------------------------------------------------------------------
class ImportCnc : public IImportCnc
{
public :
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup) ;
private :
bool ProcessLine( const std::string& sLine) ;
bool Tokenize( const std::string& sString, const std::string& sHeaders, STRVECTOR& vsTokens) ;
bool ParseRemark( const std::string& sLine) ;
bool ParseG( const std::string& sToken) ;
bool ParseX( const std::string& sToken) ;
bool ParseY( const std::string& sToken) ;
bool ParseZ( const std::string& sToken) ;
bool ParseI( const std::string& sToken) ;
bool ParseJ( const std::string& sToken) ;
bool ParseK( const std::string& sToken) ;
bool ParseR( const std::string& sToken) ;
bool ParseC( const std::string& sToken) ;
bool ParseT( const std::string& sToken) ;
bool ParseM( const std::string& sToken) ;
bool ExecSetIPL( void) ;
bool ExecMovement( void) ;
bool AddPoint( void) ;
bool AddLine( int nLineType) ;
bool AddArc( bool bCCW) ;
int VerifyArcCenter( const Vector3d& vtN) ;
bool SetCircC2PN( const Point3d& ptCen, const Point3d& ptStart, const Point3d& ptNearEnd, const Vector3d& vtN,
ICurveArc* pCrvArc) ;
int GetToolGroup( int nTool) ;
private :
enum InterpPl { XY = 1, YZ = 2, ZX = 3} ;
enum Command { NO_CMD = 0, MOVE = 1, IPL = 2, OFFS = 3} ;
enum MoveType { RAPID = 0, LINE = 1, ARC_CW = 2, ARC_CCW = 3} ;
enum LineType { L_RAPID = 0, L_LINE = 1, L_ERROR = 2} ;
enum ArcType { NONE = 0, RADIUS = 1, CENTER = 2} ;
enum ArcCtType { A_ARC = 0, A_CIRC =1, A_ERROR = 2} ;
enum CharOn { X_ON = 1, Y_ON = 2, Z_ON = 4 } ;
private :
IGeomDB* m_pGDB ;
int m_nIdGroup ;
Frame3d m_frGroup ;
bool m_bToMove ;
int m_nTool ;
int m_nNextTool ;
int m_nCommand ;
int m_nCharsOn ;
int m_nMoveType ;
bool m_bAbsCoord ;
int m_nInterpPl ;
int m_nArcType ;
Point3d m_ptLast ;
Point3d m_ptNext ;
Point3d m_ptCen ;
Vector3d m_vtOffs ;
double m_dRadius ;
Color m_colCurr ;
} ;