333673005f
- modifiche per aggiunta SetFixtureLink per collegamento tra bloccaggio ed asse tavola.
109 lines
5.8 KiB
C++
109 lines
5.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2018-2018
|
|
//----------------------------------------------------------------------------
|
|
// File : Processor.h Data : 29.05.18 Versione : 1.9e6
|
|
// Contenuto : Dichiarazione della classe Processor.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 29.05.18 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "CamData.h"
|
|
|
|
class MachMgr ;
|
|
class IGeomDB ;
|
|
class Machine ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class Processor
|
|
{
|
|
public :
|
|
Processor( void) ;
|
|
~Processor( void) ;
|
|
bool Init( MachMgr* pMchMgr) ;
|
|
bool Run( const std::string& sCncFile, const std::string& sInfo) ;
|
|
|
|
private :
|
|
bool VerifySetup( void) ;
|
|
bool ProcessDisposition( int nOpId, int nOpInd) ;
|
|
bool ProcessMachining( int nOpId, int nOpInd) ;
|
|
bool ProcessClPath( int nClPathId, int nClPathInd, int nOpId, int nOpInd) ;
|
|
bool ProcessClEnt( int nEntId, int nEntInd, int nClPathId, int nClPathInd, int nOpId, int nOpInd) ;
|
|
bool UpdateTool( const std::string& sTool) ;
|
|
bool UpdateDispTool( const std::string& sTool, const std::string& sHead, int nExit) ;
|
|
bool UpdateAxes( void) ;
|
|
bool OnStart( void) ;
|
|
bool OnEnd( void) ;
|
|
bool OnProgramStart( const std::string& sMachName, const std::string& sCncFile, const std::string& sInfo, bool bSetup) ;
|
|
bool OnProgramEnd( void) ;
|
|
bool ProcessToolData( void) ;
|
|
bool OnToolSelect( const std::string& sTool, const std::string& sHead, int nExit, const std::string& sTcPos, bool bFloating) ;
|
|
bool OnToolDeselect( const std::string& sNextTool, const std::string& sNextHead, int nNextExit, const std::string& sNextTcPos) ;
|
|
bool OnDispositionStart( int nOpId, int nOpInd, int nPhase, bool bEmpty, bool bSomeByHand) ;
|
|
bool OnDispositionEnd( void) ;
|
|
bool OnTableData( const std::string& sName, const Point3d& ptOri1) ;
|
|
bool OnTableAxisData( int nAxisInd, const std::string& sName, double dPos, bool bMoved) ;
|
|
bool OnFixtureData( int nFixId, int nFixInd, const std::string& sName,
|
|
const Point3d& ptPos, double dAngDeg, double dMov, const std::string& sTaLink) ;
|
|
bool OnRawMoveData( int nRawId, int nRawMoveInd, int nType, const Point3d& ptPos, int nFlag) ;
|
|
bool OnMachiningStart( int nOpId, int nOpInd, double dSpeed, const Point3d& ptMin, const Point3d& ptMax,
|
|
const DBLVECTOR& vAxMin, const DBLVECTOR& vAxMax) ;
|
|
bool OnMachiningEnd( void) ;
|
|
bool OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart, const Point3d& ptEnd,
|
|
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax,
|
|
const DBLVECTOR& vAxMin, const DBLVECTOR& vAxMax, double dElev) ;
|
|
bool OnPathEnd( int nAE) ;
|
|
bool OnPathStartAux( int nInd, const std::string& sAS) ;
|
|
bool OnPathEndAux( int nInd, const std::string& sAE) ;
|
|
bool OnRapid( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd, int nAxesMask,
|
|
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
|
|
int nFlag, int nFlag2, int nIndex, int nMoveNext, const DBLVECTOR& AxesNext) ;
|
|
bool OnLinear( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd,
|
|
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
|
|
double dFeed, int nFlag, int nFlag2, int nIndex, int nMoveNext, const DBLVECTOR& AxesNext) ;
|
|
bool OnArc( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd,
|
|
const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen,
|
|
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
|
|
double dFeed, int nFlag, int nFlag2, int nIndex, int nMoveNext, const DBLVECTOR& AxesNext) ;
|
|
bool ResetArcData( void) ;
|
|
|
|
protected :
|
|
virtual bool CallOnStart( void) = 0 ;
|
|
virtual bool CallOnEnd( void) = 0 ;
|
|
virtual bool CallOnProgramStart( void) = 0 ;
|
|
virtual bool CallOnProgramEnd( void) = 0 ;
|
|
virtual bool CallOnToolData( void) = 0 ;
|
|
virtual bool CallOnDispositionStart( void) = 0 ;
|
|
virtual bool CallOnDispositionEnd( void) = 0 ;
|
|
virtual bool CallOnTableData( void) = 0 ;
|
|
virtual bool CallOnTableAxisData( void) = 0 ;
|
|
virtual bool CallOnFixtureData( void) = 0 ;
|
|
virtual bool CallOnRawMoveData( void) = 0 ;
|
|
virtual bool CallOnToolSelect( void) = 0 ;
|
|
virtual bool CallOnToolDeselect( void) = 0 ;
|
|
virtual bool CallOnMachiningStart( void) = 0 ;
|
|
virtual bool CallOnMachiningEnd( void) = 0 ;
|
|
virtual bool CallOnPathStart( void) = 0 ;
|
|
virtual bool CallOnPathEnd( void) = 0 ;
|
|
virtual bool CallOnPathStartAux( void) = 0 ;
|
|
virtual bool CallOnPathEndAux( void) = 0 ;
|
|
virtual bool CallOnRapid( void) = 0 ;
|
|
virtual bool CallOnLinear( void) = 0 ;
|
|
virtual bool CallOnArc( void) = 0 ;
|
|
|
|
protected :
|
|
MachMgr* m_pMchMgr ; // puntatore al gestore di tutte le lavorazioni
|
|
IGeomDB* m_pGeomDB ; // puntatore al DB geometrico
|
|
Machine* m_pMachine ; // puntatore alla macchina
|
|
std::string m_sPrevTool ; // nome dell'utensile precedente
|
|
std::string m_sTool ; // nome dell'utensile corrente
|
|
STRVECTOR m_AxesName ; // nomi degli assi macchina attivi
|
|
STRVECTOR m_AxesToken ; // token degli assi macchina attivi
|
|
DBLVECTOR m_AxesVal ; // valori degli assi macchina all'inizio del movimento corrente
|
|
} ;
|