Files
EgtMachKernel/Machining.h
T
Riccardo Elitropi fc29cbd471 EgtMachKernel (Preview) :
- primo Test Preview Utensile.
2026-02-25 18:07:19 +01:00

85 lines
3.8 KiB
C++

//----------------------------------------------------------------------------
// 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.
// 24.02.26 RE Aggiunta Gestione Preview per Utensile e Testa
//
//
//----------------------------------------------------------------------------
#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( void) = 0 ;
virtual const ToolData& GetToolData( void) const = 0 ;
virtual bool GetGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool GetSkippedGeometry( SELVECTOR& vIds) const
{ vIds.clear() ; return false ; }
public :
bool GetStartPoint( Point3d& ptStart) const ;
bool GetEndPoint( Point3d& ptEnd) const ;
bool UpdateToolView( int nFlag) ;
bool PrepareToolPreview( void) ;
bool RemoveToolPreview( void) ;
int GetToolPreviewStepCount( void) const ;
int ToolPreview( int nEntId, int nStep) /*const*/ ;
protected :
Machining( void) ;
~Machining( void) ;
bool SpecialApply( std::string& sErr) ;
bool PostApply( std::string& sErr) ;
int GetDoubleType( const std::string& sUserNotes) ;
bool GetDoubleToolData( std::string& sDblTool, std::string& sDblHead, int& nDblExit) ;
bool CalcMirrorByDouble( int nClId, const std::string& sUserNotes) ;
bool ActivateDrillingUnit( int nHeadId, const INTVECTOR& vActExit) const ;
private :
int GetToolPreviewNext( int nEntId, int nParentId, int nStId) const ;
int GetToolPreviewPrev( int nEntId, int nParentId, int nStId) /*const*/ ;
private :
int m_nLookFlag ; // flag di Visualizzazione per Preview
int m_nPreviewHeadId ; // Id del gruppo testa di Preview
int m_nPreviewToolTip ; // Id del gruppo contenente il punto ToolTip
INTVECTOR m_vPreviewAxisIds ; // indici degli assi di Preview
} ;
//----------------------------------------------------------------------------
inline const Machining* GetMachining( const IUserObj* pUserObj)
{ return dynamic_cast<const Machining*>( pUserObj) ; }
inline Machining* GetMachining( IUserObj* pUserObj)
{ return dynamic_cast< Machining*>( pUserObj) ; }