ec6eb3e645
- modifica a Trimming - sistemazioni estetiche varie.
100 lines
4.2 KiB
C++
100 lines
4.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2017-2020
|
|
//----------------------------------------------------------------------------
|
|
// File : Tool.h Data : 20.07.20 Versione : 2.2g2
|
|
// Contenuto : Dichiarazione della classe Tool.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 22.01.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "CurveComposite.h"
|
|
|
|
//----------------------------------------------------------------------------
|
|
class Tool
|
|
{
|
|
public :
|
|
Tool( bool bApproxWithLines = false) ;
|
|
~Tool( void) ;
|
|
|
|
public :
|
|
bool Clear( bool bApproxWithLines = false) ;
|
|
bool SetTolerances( double dLinTol, double dAngTolDeg = 45) ;
|
|
bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nToolNum) ;
|
|
bool SetAdvTool( const std::string& sToolName,
|
|
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nToolNum) ;
|
|
bool SetSawTool( const std::string& sToolName, double dH, double dR,
|
|
double dThick, double dStemR, double dCornR, int nToolNum) ;
|
|
bool SetGenTool( const std::string& sToolName, const ICurveComposite* pToolOutline, int nToolNum) ;
|
|
bool SetMortiserTool( const std::string& sToolName, double dH, double dW, double dTh, double dRc, int nToolNum) ;
|
|
bool SetChiselTool( const std::string& sToolName, double dH, double dW, double dTh, int nToolNum) ;
|
|
bool SetAdditiveTool( const std::string& sToolName, double dH, double dR, double dRc, int nToolNum) ;
|
|
bool SetToolNum( int nToolNum)
|
|
{ m_nCurrentNum = nToolNum ; return true ; }
|
|
int GetType( void) const
|
|
{ return m_nType ; }
|
|
int GetToolNum( void) const
|
|
{ return m_nCurrentNum ; }
|
|
double GetHeigth( void) const
|
|
{ return m_dHeight ; }
|
|
double GetTipHeigth( void) const
|
|
{ return m_dTipHeight ; }
|
|
double GetRadius( void) const
|
|
{ return m_dRadius ; }
|
|
double GetTipRadius( void) const
|
|
{ return m_dTipRadius ; }
|
|
double GetCornRadius( void) const
|
|
{ return m_dRCorner ; }
|
|
double GetRefRadius( void) const
|
|
{ return m_dRefRadius ; }
|
|
double GetMrtChsWidth( void) const
|
|
{ return m_dMrtChsWidth ; }
|
|
double GetMrtChsThickness( void) const
|
|
{ return m_dMrtChsThickness ; }
|
|
const CurveComposite& GetOutline( void) const
|
|
{ return ( m_Outline) ; }
|
|
const CurveComposite& GetApproxOutline( void) const
|
|
{ return ( m_ArcLineApprox.GetCurveCount() == 0 ? m_Outline : m_ArcLineApprox) ; }
|
|
const VCT3DVECTOR& GetArcNormalVec( void) const
|
|
{ return m_vArcNormals ; }
|
|
|
|
public :
|
|
enum ToolType { UNDEF = 0, // Utensile indefinito
|
|
GEN = 1, // Generico da profilo
|
|
CYLMILL = 2, // Cilindrico
|
|
BALLMILL = 3, // Sferico
|
|
BULLNOSEMILL = 4, // Naso di toro
|
|
CONEMILL = 5, // Con parte terminale conica
|
|
MORTISER = 6, // Mortasatrice
|
|
CHISEL = 7, // Scalpello
|
|
ADDITIVE = 8} ; // Additivo
|
|
|
|
private :
|
|
bool ModifyForCutterHeight( void) ;
|
|
|
|
private :
|
|
bool m_bApproxWithLines ;
|
|
double m_dLinTol ;
|
|
double m_dAngTolDeg ;
|
|
std::string m_sName ;
|
|
int m_nType ;
|
|
int m_nCurrentNum ;
|
|
CurveComposite m_Outline ;
|
|
CurveComposite m_ArcLineApprox ;
|
|
VCT3DVECTOR m_vArcNormals ;
|
|
double m_dHeight ;
|
|
double m_dTipHeight ;
|
|
double m_dRadius ;
|
|
double m_dRCorner ;
|
|
double m_dTipRadius ;
|
|
double m_dRefRadius ;
|
|
double m_dCutterHeight ;
|
|
double m_dMrtChsWidth ;
|
|
double m_dMrtChsThickness ;
|
|
} ;
|