EgtGeomKernel 1.6r9 :

- inseriti sviluppi Zmap.
This commit is contained in:
Dario Sassi
2016-06-13 07:10:18 +00:00
parent c202b070e3
commit 3bbdfc4a74
5 changed files with 3703 additions and 60 deletions
+50 -7
View File
@@ -2589,6 +2589,9 @@ GdbExecutor::ExecuteVolZmap(const string& sCmd2, const STRVECTOR& vsParams)
else if ( sCmd2 == "SET") {
return VolZmapSetTool( vsParams) ;
}
else if ( sCmd2 == "SETSTD") {
return VolZmapSetStdTool( vsParams) ;
}
return false ;
}
@@ -2735,8 +2738,8 @@ GdbExecutor::VolZmapMilling( const STRVECTOR& vsParams)
bool
GdbExecutor::VolZmapSetTool( const STRVECTOR& vsParams)
{
// parametri : ZmapId, CrvId, nToolType, sToolName
if ( vsParams.size() != 4)
// parametri : ZmapId, CrvId, sToolName
if ( vsParams.size() != 3)
return false ;
// recupero lo Zmap
int nZmapId = GetIdParam( vsParams[0]) ;
@@ -2748,15 +2751,55 @@ GdbExecutor::VolZmapSetTool( const STRVECTOR& vsParams)
CurveComposite* pToolOutline = GetBasicCurveComposite( m_pGDB->GetGeoObj( nCrvId)) ;
if ( pToolOutline == nullptr)
return false ;
// recupero tipo utensile
int nToolType ;
if ( ! FromString( vsParams[2], nToolType))
// recupero la stringa nome dell'utensile
string sToolName ;
sToolName = vsParams[2] ;
// assegno utensile
return pZmap->SetTool( sToolName, pToolOutline) ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::VolZmapSetStdTool( const STRVECTOR& vsParams)
{
// parametri : ZmapId, sToolName, nToolType, dH, dTH, dR, dTR, dRc
if ( vsParams.size() != 8)
return false ;
// recupero lo Zmap
int nZmapId = GetIdParam( vsParams[0]) ;
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
if ( pZmap == nullptr)
return false ;
// recupero la stringa nome dell'utensile
string sToolName ;
sToolName = vsParams[3] ;
sToolName = vsParams[1] ;
// recupero il tipo di utensile
int nToolType ;
if ( ! FromString( vsParams[2], nToolType))
return false ;
if (nToolType < 0 || nToolType > 4)
return false ;
// recupero altezza utensile
double dH ;
if ( ! FromString( vsParams[3], dH))
return false ;
// recupero raggio utensile
double dTH ;
if ( ! FromString( vsParams[4], dTH))
return false ;
// recupero raggio corner
double dR ;
if ( ! FromString( vsParams[5], dR))
return false ;
double dTR ;
if ( ! FromString( vsParams[6], dTR))
return false ;
double dRc ;
if ( ! FromString( vsParams[7], dRc))
return false ;
// assegno utensile
return pZmap->SetTool( sToolName, nToolType, pToolOutline) ;
return pZmap->SetStdTool( sToolName, nToolType, dH, dTH, dR, dTR, dRc) ;
}
//----------------------------------------------------------------------------