EgtExecutor :

- aggiunta a Exe e Lua funzione CreateVolZmapByRegionExtrusion.
This commit is contained in:
Dario Sassi
2016-10-31 19:23:34 +00:00
parent 24b91503ff
commit 20f3f5755f
2 changed files with 64 additions and 1 deletions
+25
View File
@@ -50,11 +50,36 @@ LuaCreateVolZmapBox( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCreateVolZmapByRegionExtrusion( lua_State* L)
{
// 4 parametri : ParentId, SfrId dDimZ, dPrec
int nParentId ;
LuaCheckParam( L, 1, nParentId)
int nSfrId ;
LuaCheckParam( L, 2, nSfrId)
double dDimZ ;
LuaCheckParam( L, 3, dDimZ)
double dPrec ;
LuaCheckParam( L, 4, dPrec)
LuaClearStack( L) ;
// creo VZM per estrusione di flat region
int nId = ExeCreateVolZmapByRegionExtrusion( nParentId, nSfrId, dDimZ, dPrec) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallGdbCreateVol( LuaMgr& luaMgr)
{
bool bOk = ( &luaMgr != nullptr) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapBox", LuaCreateVolZmapBox) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapByRegionExtrusion", LuaCreateVolZmapByRegionExtrusion) ;
return bOk ;
}