6bb977b1e3
- aggiornamenti.
88 lines
4.2 KiB
C++
88 lines
4.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : EMkMachMgr.h Data : 23.03.15 Versione : 1.6c6
|
|
// Contenuto : Dichiarazione della interfaccia IMachMgr.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 23.03.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkGeomDB.h"
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EMK_EXPORT
|
|
#if defined( I_AM_EMK) // da definirsi solo nella DLL
|
|
#define EMK_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EMK_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
class __declspec( novtable) IMachMgr
|
|
{
|
|
public :
|
|
// Basic
|
|
virtual ~IMachMgr( void) {}
|
|
virtual bool Init( IGeomDB* pGeomDB) = 0 ;
|
|
virtual bool Update( void) = 0 ;
|
|
virtual bool Insert( int nInsGrp) = 0 ;
|
|
// MachGroups
|
|
virtual int GetMachGroupNbr( void) const = 0 ;
|
|
virtual int GetFirstMachGroup( void) const = 0 ;
|
|
virtual int GetNextMachGroup( int nId) const = 0 ;
|
|
virtual bool GetMachGroupNewName( std::string& sName) const = 0 ;
|
|
virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 0 ;
|
|
virtual bool RemoveMachGroup( int nId) = 0 ;
|
|
virtual std::string GetMachGroupName( int nId) const = 0 ;
|
|
virtual int GetMachGroupId( const std::string& sName) const = 0 ;
|
|
virtual bool SetCurrMachGroup( int nId) = 0 ;
|
|
virtual bool ResetCurrMachGroup( void) = 0 ;
|
|
virtual int GetCurrMachGroup( void) const = 0 ;
|
|
// RawParts
|
|
virtual int GetRawPartNbr( void) const = 0 ;
|
|
virtual int GetFirstRawPart( void) const = 0 ;
|
|
virtual int GetNextRawPart( int nId) const = 0 ;
|
|
virtual int AddRawPart( const Point3d& ptOrig, double dWidth, double dLen, double dHeight, Color cCol) = 0 ;
|
|
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ;
|
|
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ;
|
|
virtual bool RemoveRawPart( int nRawId) = 0 ;
|
|
virtual bool TranslateRawPart( int nRawId, const Vector3d& vtMove) = 0 ;
|
|
virtual bool RotateRawPart( int nRawId, const Vector3d& vtAx, double dAngRotDeg) = 0 ;
|
|
virtual bool MoveToCornerRawPart( int nRawId, const Point3d& ptCorner, int nFlag) = 0 ;
|
|
virtual bool MoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) = 0 ;
|
|
// Parts
|
|
virtual int GetPartInRawPartNbr( int nRawId) const = 0 ;
|
|
virtual int GetFirstPartInRawPart( int nRawId) const = 0 ;
|
|
virtual int GetNextPartInRawPart( int nId) const = 0 ;
|
|
virtual bool AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) = 0 ;
|
|
virtual bool RemovePartFromRawPart( int nPartId) = 0 ;
|
|
virtual bool TranslatePartInRawPart( int nPartId, const Vector3d& vtMove) = 0 ;
|
|
virtual bool RotatePartInRawPart( int nPartId, const Vector3d& vtAx, double dAngRotDeg) = 0 ;
|
|
} ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
extern "C" {
|
|
EMK_EXPORT IMachMgr* CreateMachMgr(void) ;
|
|
}
|
|
|
|
//------------------------ Costanti per flag MoveToCorner ---------------------
|
|
// indica la posizione del corner rispetto al grezzo
|
|
enum RawPartCornerPos { RPCR_TL = 1, // top left
|
|
RPCR_TR = 2, // top right
|
|
RPCR_BL = 3, // bottom left
|
|
RPCR_BR = 4} ; // bottom right
|
|
|
|
//------------------------ Costanti per flag MoveToCenter ---------------------
|
|
// indica la posizione del centro rispetto al grezzo
|
|
enum RawPartCenterPos { RPCE_TC = 1, // top center
|
|
RPCE_ML = 2, // middle left
|
|
RPCE_MR = 3, // middle right
|
|
RPCE_BC = 4, // bottom center
|
|
RPCE_MC = 5} ; // middle center under
|