//---------------------------------------------------------------------------- // EgalTech 2015-2016 //---------------------------------------------------------------------------- // File : Machining.h Data : 29.04.16 Versione : 1.6p4 // Contenuto : Dichiarazione della classe Machining da cui derivano // tutti i gestori delle lavorazioni. // // // // Modifiche : 07.06.15 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "Operation.h" //---------------------------------------------------------------------------- class Machining : public Operation { protected : // Operation const std::string& GetToolName( void) const override ; const std::string& GetHeadName( void) const override ; int GetExitNbr( void) const override ; const std::string& GetToolTcPos( void) const override ; bool NeedPrevHome( void) const override ; public : virtual bool Prepare( const std::string& sMchName) = 0 ; virtual bool SetParam( int nType, bool bVal) = 0 ; virtual bool SetParam( int nType, int nVal) = 0 ; virtual bool SetParam( int nType, double dVal) = 0 ; virtual bool SetParam( int nType, const std::string& sVal) = 0 ; virtual bool SetGeometry( const SELVECTOR& vIds) = 0 ; virtual bool Preview( bool bRecalc) = 0 ; virtual bool Apply( bool bRecalc, bool bPostApply) = 0 ; virtual bool Update( bool bPostApply) = 0 ; virtual bool GetParam( int nType, bool& bVal) const = 0 ; virtual bool GetParam( int nType, int& nVal) const = 0 ; virtual bool GetParam( int nType, double& dVal) const = 0 ; virtual bool GetParam( int nType, std::string& sVal) const = 0 ; virtual bool UpdateToolData( bool* pbChanged = nullptr) = 0 ; virtual const ToolData& GetToolData( void) const = 0 ; virtual bool GetGeometry( SELVECTOR& vIds) const = 0 ; public : bool GetStartPoint( Point3d& ptStart) const ; bool GetEndPoint( Point3d& ptEnd) const ; bool PrepareToolPreview( void) const ; int ToolPreview( int nEntId, int nFlag) const ; bool RemoveToolPreview( void) const ; protected : Machining( void) ; bool PostApply( std::string& sErr) ; } ; //---------------------------------------------------------------------------- inline const Machining* GetMachining( const IUserObj* pUserObj) { return dynamic_cast( pUserObj) ; } inline Machining* GetMachining( IUserObj* pUserObj) { return dynamic_cast< Machining*>( pUserObj) ; }