5f820d9f8d
- corretta intersezione tra linee finite (segmenti) quando praticamente sovrapposte - a Zmap aggiunte funzioni per Cut e per Compact - in Zmap migliorate funzione GetTriangles e IsThereMat.
91 lines
3.7 KiB
C++
91 lines
3.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2017-2017
|
|
//----------------------------------------------------------------------------
|
|
// File : Tool.h Data : 28.11.17 Versione : 1.8l1
|
|
// 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( void) ;
|
|
bool SetTolerances( double dLinTol, double dAngTolDeg = 45) ;
|
|
bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, int nToolNum) ;
|
|
bool SetAdvTool( const std::string& sToolName,
|
|
double dH, double dR, double dTipH, double dTipR, double dCornR, 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 SetToolNum( int nToolNum)
|
|
{ m_nCurrentNum = nToolNum ; return true ; }
|
|
int GetType() const
|
|
{ return m_nType ; }
|
|
int GetCurrentToolNum() const
|
|
{ return m_nCurrentNum ; }
|
|
double GetHeigth() const
|
|
{ return m_dHeight ; }
|
|
double GetTipHeigth() const
|
|
{ return m_dTipHeight ; }
|
|
double GetRadius() const
|
|
{ return m_dRadius ; }
|
|
double GetTipRadius() const
|
|
{ return m_dTipRadius ; }
|
|
double GetCornRadius() const
|
|
{ return m_dRCorner ; }
|
|
double GetRefRadius() const
|
|
{ return m_dRefRadius ; }
|
|
double GetMrtChsWidth() const
|
|
{ return m_dMrtChsWidth ; }
|
|
double GetMrtChsThickness() 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) ; }
|
|
|
|
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
|
|
|
|
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 ;
|
|
double m_dHeight ;
|
|
double m_dTipHeight ;
|
|
double m_dRadius ;
|
|
double m_dRCorner ;
|
|
double m_dTipRadius ;
|
|
double m_dRefRadius ;
|
|
double m_dMrtChsWidth ;
|
|
double m_dMrtChsThickness ;
|
|
} ;
|