EgtExecutor 1.9a1 :
- aggiunta gestione Flag Utensile per VirtualMilling in Exe e Lua.
This commit is contained in:
+16
-12
@@ -161,13 +161,13 @@ ExeRemoveVolZmapPart( int nId, int nPart)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetStdTool( int nId, const string& sToolName, double dLen, double dDiam, double dCornR)
|
||||
ExeVolZmapSetStdTool( int nId, const string& sToolName, double dLen, double dDiam, double dCornR, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr && pVZM->SetStdTool( sToolName, dLen, 0.5 * dDiam, dCornR)) ;
|
||||
bool bOk = ( pVZM != nullptr && pVZM->SetStdTool( sToolName, dLen, 0.5 * dDiam, dCornR, nFlag)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -175,7 +175,8 @@ ExeVolZmapSetStdTool( int nId, const string& sToolName, double dLen, double dDia
|
||||
sToolName + "," +
|
||||
ToString( dLen) + "," +
|
||||
ToString( dDiam) + "," +
|
||||
ToString( dCornR) + ")" +
|
||||
ToString( dCornR) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -186,14 +187,14 @@ ExeVolZmapSetStdTool( int nId, const string& sToolName, double dLen, double dDia
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetAdvTool( int nId, const string& sToolName,
|
||||
double dLen, double dDiam, double dTipLen, double dTipDiam, double dCornR)
|
||||
double dLen, double dDiam, double dTipLen, double dTipDiam, double dCornR, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr &&
|
||||
pVZM->SetAdvTool( sToolName, dLen, dDiam / 2, dTipLen, dTipDiam / 2, dCornR)) ;
|
||||
pVZM->SetAdvTool( sToolName, dLen, dDiam / 2, dTipLen, dTipDiam / 2, dCornR, nFlag)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -203,7 +204,8 @@ ExeVolZmapSetAdvTool( int nId, const string& sToolName,
|
||||
ToString( dDiam) + "," +
|
||||
ToString( dTipLen) + "," +
|
||||
ToString( dTipDiam) + "," +
|
||||
ToString( dCornR) + ")" +
|
||||
ToString( dCornR) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -214,14 +216,14 @@ ExeVolZmapSetAdvTool( int nId, const string& sToolName,
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetMortiserTool( int nId, const string& sToolName,
|
||||
double dLen, double dWidth, double dThick, double dCornR)
|
||||
double dLen, double dWidth, double dThick, double dCornR, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr &&
|
||||
pVZM->SetMortiserTool( sToolName, dLen, dWidth, dThick, dCornR)) ;
|
||||
pVZM->SetMortiserTool( sToolName, dLen, dWidth, dThick, dCornR, nFlag)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -230,7 +232,8 @@ ExeVolZmapSetMortiserTool( int nId, const string& sToolName,
|
||||
ToString( dLen) + "," +
|
||||
ToString( dWidth) + "," +
|
||||
ToString( dThick) + "," +
|
||||
ToString( dCornR) + ")" +
|
||||
ToString( dCornR) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -241,14 +244,14 @@ ExeVolZmapSetMortiserTool( int nId, const string& sToolName,
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetChiselTool( int nId, const string& sToolName,
|
||||
double dLen, double dWidth, double dThick)
|
||||
double dLen, double dWidth, double dThick, int nFlag)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr &&
|
||||
pVZM->SetChiselTool( sToolName, dLen, dWidth, dThick)) ;
|
||||
pVZM->SetChiselTool( sToolName, dLen, dWidth, dThick, nFlag)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -256,7 +259,8 @@ ExeVolZmapSetChiselTool( int nId, const string& sToolName,
|
||||
sToolName + "," +
|
||||
ToString( dLen) + "," +
|
||||
ToString( dWidth) + "," +
|
||||
ToString( dThick) + ")" +
|
||||
ToString( dThick) + "," +
|
||||
ToString( nFlag) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
|
||||
Binary file not shown.
+16
-8
@@ -82,7 +82,7 @@ LuaRemoveVolZmapPart( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetStdTool( lua_State* L)
|
||||
{
|
||||
// 5 parametri : Id, sToolName, dLen, dDiam, dCornR
|
||||
// 5 o 6 parametri : Id, sToolName, dLen, dDiam, dCornR, nFlag
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
string sToolName ;
|
||||
@@ -93,9 +93,11 @@ LuaVolZmapSetStdTool( lua_State* L)
|
||||
LuaCheckParam( L, 4, dDiam)
|
||||
double dCornR ;
|
||||
LuaCheckParam( L, 5, dCornR)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 6, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto utensile standard a Zmap indicato
|
||||
bool bOk = ExeVolZmapSetStdTool( nId, sToolName, dLen, dDiam, dCornR) ;
|
||||
bool bOk = ExeVolZmapSetStdTool( nId, sToolName, dLen, dDiam, dCornR, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -105,7 +107,7 @@ LuaVolZmapSetStdTool( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetAdvTool( lua_State* L)
|
||||
{
|
||||
// 7 parametri : Id, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR
|
||||
// 7 o 8 parametri : Id, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, nFlag
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
string sToolName ;
|
||||
@@ -120,9 +122,11 @@ LuaVolZmapSetAdvTool( lua_State* L)
|
||||
LuaCheckParam( L, 6, dTipDiam)
|
||||
double dCornR ;
|
||||
LuaCheckParam( L, 7, dCornR)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 8, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto utensile standard a Zmap indicato
|
||||
bool bOk = ExeVolZmapSetAdvTool( nId, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR) ;
|
||||
bool bOk = ExeVolZmapSetAdvTool( nId, sToolName, dLen, dDiam, dTipLen, dTipDiam, dCornR, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -132,7 +136,7 @@ LuaVolZmapSetAdvTool( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetMortiserTool( lua_State* L)
|
||||
{
|
||||
// 6 parametri : Id, sToolName, dLen, dWidth, dThick, dCornR
|
||||
// 6 o 7 parametri : Id, sToolName, dLen, dWidth, dThick, dCornR, nFlag
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
string sToolName ;
|
||||
@@ -145,9 +149,11 @@ LuaVolZmapSetMortiserTool( lua_State* L)
|
||||
LuaCheckParam( L, 5, dThick)
|
||||
double dCornR ;
|
||||
LuaCheckParam( L, 6, dCornR)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 7, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto mortasatrice a Zmap indicato
|
||||
bool bOk = ExeVolZmapSetMortiserTool( nId, sToolName, dLen, dWidth, dThick, dCornR) ;
|
||||
bool bOk = ExeVolZmapSetMortiserTool( nId, sToolName, dLen, dWidth, dThick, dCornR, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -157,7 +163,7 @@ LuaVolZmapSetMortiserTool( lua_State* L)
|
||||
static int
|
||||
LuaVolZmapSetChiselTool( lua_State* L)
|
||||
{
|
||||
// 5 parametri : Id, sToolName, dLen, dWidth, dThick
|
||||
// 5 o 6 parametri : Id, sToolName, dLen, dWidth, dThick, nFlag
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
string sToolName ;
|
||||
@@ -168,9 +174,11 @@ LuaVolZmapSetChiselTool( lua_State* L)
|
||||
LuaCheckParam( L, 4, dWidth)
|
||||
double dThick ;
|
||||
LuaCheckParam( L, 5, dThick)
|
||||
int nFlag = 1 ;
|
||||
LuaGetParam( L, 6, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto scalpello a Zmap indicato
|
||||
bool bOk = ExeVolZmapSetChiselTool( nId, sToolName, dLen, dWidth, dThick) ;
|
||||
bool bOk = ExeVolZmapSetChiselTool( nId, sToolName, dLen, dWidth, dThick, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
|
||||
Reference in New Issue
Block a user