EgtExecutor :
- aggiunto parametro altezza tagliente a definizione utensili per Virtual Milling.
This commit is contained in:
@@ -193,7 +193,8 @@ ExeRemoveVolZmapPart( int nId, int nPart)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetStdTool( const INTVECTOR& vIds, const string& sToolName, double dLen, double dDiam, double dCornR, int nFlag)
|
||||
ExeVolZmapSetStdTool( const INTVECTOR& vIds, const string& sToolName,
|
||||
double dLen, double dDiam, double dCornR, double dCutterH, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -201,7 +202,7 @@ ExeVolZmapSetStdTool( const INTVECTOR& vIds, const string& sToolName, double dLe
|
||||
bool bOk = true ;
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++ i) {
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( vIds[i])) ;
|
||||
bOk = ( pVZM != nullptr && pVZM->SetStdTool( sToolName, dLen, 0.5 * dDiam, dCornR, nFlag)) && bOk ;
|
||||
bOk = ( pVZM != nullptr && pVZM->SetStdTool( sToolName, dLen, 0.5 * dDiam, dCornR, dCutterH, nFlag)) && bOk ;
|
||||
}
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -210,6 +211,7 @@ ExeVolZmapSetStdTool( const INTVECTOR& vIds, const string& sToolName, double dLe
|
||||
ToString( dLen) + "," +
|
||||
ToString( dDiam) + "," +
|
||||
ToString( dCornR) + "," +
|
||||
ToString( dCutterH) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
@@ -221,7 +223,7 @@ ExeVolZmapSetStdTool( const INTVECTOR& vIds, const string& sToolName, double dLe
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetAdvTool( const INTVECTOR& vIds, const string& sToolName,
|
||||
double dLen, double dDiam, double dTipLen, double dTipDiam, double dCornR, int nFlag)
|
||||
double dLen, double dDiam, double dTipLen, double dTipDiam, double dCornR, double dCutterH, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -229,7 +231,7 @@ ExeVolZmapSetAdvTool( const INTVECTOR& vIds, const string& sToolName,
|
||||
bool bOk = true ;
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++ i) {
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( vIds[i])) ;
|
||||
bOk = ( pVZM != nullptr && pVZM->SetAdvTool( sToolName, dLen, dDiam / 2, dTipLen, dTipDiam / 2, dCornR, nFlag)) && bOk ;
|
||||
bOk = ( pVZM != nullptr && pVZM->SetAdvTool( sToolName, dLen, dDiam / 2, dTipLen, dTipDiam / 2, dCornR, dCutterH, nFlag)) && bOk ;
|
||||
}
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -240,6 +242,7 @@ ExeVolZmapSetAdvTool( const INTVECTOR& vIds, const string& sToolName,
|
||||
ToString( dTipLen) + "," +
|
||||
ToString( dTipDiam) + "," +
|
||||
ToString( dCornR) + "," +
|
||||
ToString( dCutterH) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
|
||||
+10
-6
@@ -60,7 +60,7 @@ LuaRemoveVolZmapPart( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetStdTool( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : vIds, sToolName, dLen, dDiam, dCornR, nFlag
|
||||
// 6 o 7 parametri : vIds, sToolName, dLen, dDiam, dCornR, dCutterH [, nFlag]
|
||||
INTVECTOR vIds ;
|
||||
LuaCheckParam( L, 1, vIds)
|
||||
string sToolName ;
|
||||
@@ -71,11 +71,13 @@ LuaVolZmapSetStdTool( lua_State* L)
|
||||
LuaCheckParam( L, 4, dDiam)
|
||||
double dCornR ;
|
||||
LuaCheckParam( L, 5, dCornR)
|
||||
double dCutterH ;
|
||||
LuaCheckParam( L, 6, dCutterH)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 6, nFlag) ;
|
||||
LuaGetParam( L, 7, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto utensile standard a Zmap indicati
|
||||
bool bOk = ExeVolZmapSetStdTool( vIds, sToolName, dLen, dDiam, dCornR, nFlag) ;
|
||||
bool bOk = ExeVolZmapSetStdTool( vIds, sToolName, dLen, dDiam, dCornR, dCutterH, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -85,7 +87,7 @@ LuaVolZmapSetStdTool( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetAdvTool( lua_State* L)
|
||||
{
|
||||
// 7 o 8 parametri : vIds, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, nFlag
|
||||
// 8 o 9 parametri : vIds, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, dCutterH [, nFlag]
|
||||
INTVECTOR vIds ;
|
||||
LuaCheckParam( L, 1, vIds)
|
||||
string sToolName ;
|
||||
@@ -100,11 +102,13 @@ LuaVolZmapSetAdvTool( lua_State* L)
|
||||
LuaCheckParam( L, 6, dTipDiam)
|
||||
double dCornR ;
|
||||
LuaCheckParam( L, 7, dCornR)
|
||||
double dCutterH ;
|
||||
LuaCheckParam( L, 8, dCutterH)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 8, nFlag) ;
|
||||
LuaGetParam( L, 9, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto utensile avanzato a Zmap indicati
|
||||
bool bOk = ExeVolZmapSetAdvTool( vIds, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, nFlag) ;
|
||||
bool bOk = ExeVolZmapSetAdvTool( vIds, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, dCutterH, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
|
||||
Reference in New Issue
Block a user