EgtMachKernel 1.6d2 :
- sviluppata gestione grezzi e pezzi.
This commit is contained in:
Binary file not shown.
+17
-1
@@ -20,6 +20,22 @@
|
||||
// Radice di tutta la gestione delle lavorazioni
|
||||
const std::string MACH_BASE = "MachBase" ;
|
||||
// Chiave per nome macchina in macchinata
|
||||
const std::string MACH_KEY_MACHINE = "Machine" ;
|
||||
const std::string MACH_MACHINE_KEY = "Machine" ;
|
||||
// Gruppo della macchina in una macchinata
|
||||
const std::string MACH_GEOM_GROUP = "MGeo" ;
|
||||
// Gruppo dell'attrezzaggio in una macchinata
|
||||
const std::string MACH_SETUP_GROUP = "Setup" ;
|
||||
// Gruppo dei grezzi in una macchinata
|
||||
const std::string MACH_RAW_GROUP = "Raws" ;
|
||||
// Gruppo delle operazioni in una macchinata
|
||||
const std::string MACH_OPER_GROUP = "Opers" ;
|
||||
// Nome del grezzo
|
||||
const std::string MACH_RAW_PART = "RawPart" ;
|
||||
// Nome del solido del grezzo
|
||||
const std::string MACH_RAW_SOLID = "RawSolid" ;
|
||||
// Nome del punto che rappresenta il centro del grezzo
|
||||
const std::string MACH_RAW_CENTER = "RawCenter" ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Minimo spessore del grezzo
|
||||
const double RAW_MIN_H = 1 ;
|
||||
|
||||
+840
-114
File diff suppressed because it is too large
Load Diff
@@ -13,44 +13,93 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MachConst.h"
|
||||
#include "/EgtDev/Include/EMkMachMgr.h"
|
||||
#include "/EgtDev/Include/EgtNumCollection.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
struct MachGrp {
|
||||
int MGeoGroupId ;
|
||||
int SetupGroupId ;
|
||||
int RawGroupId ;
|
||||
int OperGroupId ;
|
||||
MachGrp( void)
|
||||
: MGeoGroupId( GDB_ID_NULL), SetupGroupId( GDB_ID_NULL),
|
||||
RawGroupId( GDB_ID_NULL), OperGroupId( GDB_ID_NULL) {}
|
||||
MachGrp( int MgId, int GgId, int SgId, int RgId, int OgId)
|
||||
: MGeoGroupId( GgId), SetupGroupId( SgId),
|
||||
RawGroupId( RgId), OperGroupId( OgId) {}
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class MachMgr : public IMachMgr
|
||||
{
|
||||
|
||||
public :
|
||||
// General
|
||||
virtual bool Init( IGeomDB* pGeomDB) ;
|
||||
virtual bool Update( void) ;
|
||||
virtual bool Insert( int nInsGrp) ;
|
||||
// MachGroup
|
||||
// MachGroups
|
||||
virtual int GetMachGroupNbr( void) const ;
|
||||
virtual int GetFirstMachGroup( void) const ;
|
||||
virtual int GetNextMachGroup( int nId) const ;
|
||||
virtual bool GetMachGroupNewName( std::string& sName) const ;
|
||||
virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) ;
|
||||
virtual bool RemoveMachGroup( int nMGroup) ;
|
||||
virtual bool GetMachGroupName( int nMGroup, std::string& sName) const ;
|
||||
virtual bool GetMachGroupInd( const std::string& sName, int& nMGroup) const ;
|
||||
virtual bool SetCurrMachGroup( int nMGroup) ;
|
||||
virtual bool RemoveMachGroup( int nId) ;
|
||||
virtual std::string GetMachGroupName( int nId) const ;
|
||||
virtual int GetMachGroupId( const std::string& sName) const ;
|
||||
virtual bool SetCurrMachGroup( int nId) ;
|
||||
virtual bool ResetCurrMachGroup( void) ;
|
||||
virtual bool GetCurrMachGroup( int& nMGroup) const ;
|
||||
// RawPart & Part
|
||||
virtual int GetCurrMachGroup( void) const ;
|
||||
// RawParts & Parts
|
||||
virtual int AddRawPart( const Point3d& ptOrig, double dWidth, double dLen, double dHeight, Color cCol) ;
|
||||
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) ;
|
||||
virtual bool AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) ;
|
||||
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) ;
|
||||
virtual bool RemoveRawPart( int nRawId) ;
|
||||
virtual bool TranslateRawPart( int nRawId, const Vector3d& vtMove) ;
|
||||
virtual bool RotateRawPart( int nRawId, const Vector3d& vtAx, double dAngRotDeg) ;
|
||||
virtual bool MoveToCornerRawPart( int nRawId, const Point3d& ptCorner, int nFlag) ;
|
||||
virtual bool MoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) ;
|
||||
virtual bool RemovePartFromRawPart( int nPartId) ;
|
||||
virtual bool TranslatePartInRawPart( int nPartId, const Vector3d& vtMove) ;
|
||||
virtual bool RotatePartInRawPart( int nPartId, const Vector3d& vtAx, double dAngRotDeg) ;
|
||||
|
||||
public :
|
||||
MachMgr( void) ;
|
||||
|
||||
private :
|
||||
inline bool IsMachBase( int nId) const ;
|
||||
bool FindMachBase( int nGroup, int& nMachBase) const ;
|
||||
int FindMachBase( int nGroupId) const ;
|
||||
bool VerifyMachBase( void) const ;
|
||||
bool CreateMachBase( void) ;
|
||||
bool VerifyMachGroup( int nId, MachGrp& mgData) const ;
|
||||
int GetCurrMGeoId( void) const
|
||||
{ return ( m_pGeomDB == nullptr) ? GDB_ID_NULL :
|
||||
(( m_nCurrMGrpId == GDB_ID_NULL) ? GDB_ID_NULL : m_cCurrMGrp.MGeoGroupId) ; }
|
||||
int GetCurrSetupId( void) const
|
||||
{ return ( m_pGeomDB == nullptr) ? GDB_ID_NULL :
|
||||
(( m_nCurrMGrpId == GDB_ID_NULL) ? GDB_ID_NULL : m_cCurrMGrp.SetupGroupId) ; }
|
||||
int GetCurrRawGroupId( void) const
|
||||
{ return ( m_pGeomDB == nullptr) ? GDB_ID_NULL :
|
||||
(( m_nCurrMGrpId == GDB_ID_NULL) ? GDB_ID_NULL : m_cCurrMGrp.RawGroupId) ; }
|
||||
int GetCurrOperId( void) const
|
||||
{ return ( m_pGeomDB == nullptr) ? GDB_ID_NULL :
|
||||
(( m_nCurrMGrpId == GDB_ID_NULL) ? GDB_ID_NULL : m_cCurrMGrp.OperGroupId) ; }
|
||||
int AddRawPart( int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) ;
|
||||
int AddRawPart( int nSurfId, Color cCol) ;
|
||||
bool VerifyRawPart( int nRawId) const ;
|
||||
bool SetRawPartCenter( int nRawId) ;
|
||||
bool ResetRawPartCenter( int nRawId) ;
|
||||
bool GetRawPartCenter( int nRawId, Point3d& ptCen) ;
|
||||
bool SwapParts( bool bToRawPart) ;
|
||||
bool SwapRawPartParts( int nRawId, bool bToRawPart) ;
|
||||
bool ShowRootParts( bool bShow) ;
|
||||
|
||||
private :
|
||||
IGeomDB* m_pGeomDB ;
|
||||
int m_nMachBaseId ;
|
||||
INTVECTOR m_vMGroupId ;
|
||||
int m_nMGroupCurr ; // 1-based
|
||||
IGeomDB* m_pGeomDB ;
|
||||
int m_nMachBaseId ;
|
||||
int m_nCurrMGrpId ;
|
||||
MachGrp m_cCurrMGrp ;
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user