EgtGeomKernel 1.8i1 :

- aggiunta a Zmap gestione utensili Chisel e Mortise.
This commit is contained in:
Dario Sassi
2017-09-07 09:15:55 +00:00
parent cb4512bda0
commit 6eecea859e
5 changed files with 1027 additions and 167 deletions
+51 -7
View File
@@ -44,7 +44,7 @@ VolZmap::SetStdTool( const string& sToolName, double dH, double dR, double dCorn
return false ;
// utensile cilindrico
if ( dCornR < EPS_SMALL) {
m_nToolType = CylindricalMill ;
m_nToolType = CYLMILL ;
m_dHeight = dH ;
m_dRadius = dR ;
m_dTipHeight = 0 ;
@@ -53,14 +53,14 @@ VolZmap::SetStdTool( const string& sToolName, double dH, double dR, double dCorn
}
// utensile naso di toro
else if ( dCornR < dR - EPS_SMALL) {
m_nToolType = BullNoseMill ;
m_nToolType = BULLNOSEMILL ;
m_dHeight = dH ;
m_dRadius = dR ;
m_dTipHeight = dCornR ;
m_dTipRadius = dR - dCornR ;
m_dRCorner = dCornR ;
// come profilo
m_nToolType = GenericTool ;
m_nToolType = GENTOOL ;
Point3d pt0( 0, 0, 0) ;
Point3d pt1( m_dRadius, 0, 0) ;
Point3d pt2( m_dRadius, - m_dHeight + m_dTipHeight, 0) ;
@@ -77,7 +77,7 @@ VolZmap::SetStdTool( const string& sToolName, double dH, double dR, double dCorn
}
// utensile sferico
else if ( dCornR < dR + EPS_SMALL) {
m_nToolType = BallEndMill ;
m_nToolType = BALLMILL ;
m_dHeight = dH ;
m_dRadius = dR ;
m_dTipHeight = m_dRadius ;
@@ -118,7 +118,7 @@ VolZmap::SetAdvTool( const string& sToolName, double dH, double dR,
// Se raggio corner nullo, allora utensile conico
if ( dCornR < EPS_SMALL) {
m_nToolType = ConusMill ;
m_nToolType = CONUSMILL ;
m_dRCorner = 0 ;
// assegno nome e identificativo
m_sToolName = sToolName ;
@@ -127,7 +127,7 @@ VolZmap::SetAdvTool( const string& sToolName, double dH, double dR,
}
// Altrimenti utensile generico.
m_nToolType = GenericTool ;
m_nToolType = GENTOOL ;
m_dRCorner = dCornR ;
m_ToolOutline.Clear() ;
@@ -219,7 +219,7 @@ VolZmap::SetGenTool( const string& sToolName, const ICurveComposite* pToolOutlin
{
// Assegno nome, tipo e id dell'utensile
m_sToolName = sToolName ;
m_nToolType = GenericTool ;
m_nToolType = GENTOOL ;
m_nCurrentToolNum = 0 ;
// Copio il profilo e garantisco sia di soli archi e rette (converto eventuali curve di Bezier)
@@ -291,3 +291,47 @@ VolZmap::SetGenTool( const string& sToolName, const ICurveComposite* pToolOutlin
return true ;
}
//----------------------------------------------------------------------------
bool
VolZmap::SetMortiserTool( const std::string& sToolName, double dH, double dW, double dTh, double dRc)
{
// Reset nome
m_sToolName.clear() ;
if ( dH < EPS_SMALL || dW < EPS_SMALL ||
dTh < EPS_SMALL || dRc < 0 || dW - 2 * dRc < 0)
return false ;
m_dHeight = dH ;
m_dRCorner = dRc ;
m_dMrtChsWidth = dW ;
m_dMrtChsThickness = dTh ;
m_sToolName = sToolName ;
m_nToolType = MORTISER ;
m_nCurrentToolNum = 0 ;
return true ;
}
//----------------------------------------------------------------------------
bool
VolZmap::SetChiselTool( const std::string& sToolName, double dH, double dW, double dTh) {
// Reset nome
m_sToolName.clear() ;
if ( dH < EPS_SMALL || dW < EPS_SMALL || dTh < 0)
return false ;
m_dHeight = dH ;
m_dMrtChsWidth = dW ;
m_dMrtChsThickness = dTh ;
m_sToolName = sToolName ;
m_nToolType = CHISEL ;
m_nCurrentToolNum = 0 ;
return true ;
}