EgtExecutor 1.8j2 :

- aggiunta fiunzione Exe e Lua CreateSurfTmByVolZmap
- aggiunte funzioni Exe e Lua CopyVolZmapPart e RemoveVolZmapPart
- aggiunte funzioni Exe e Lua SurfArea, SurfVolume, VolZmapVolume e VolZmapPartVolume.
This commit is contained in:
Dario Sassi
2017-10-06 07:54:48 +00:00
parent 4821310eb7
commit ac5772a654
7 changed files with 324 additions and 0 deletions
+41
View File
@@ -39,6 +39,45 @@ LuaExplodeVolume( lua_State* L)
return 2 ;
}
//----------------------------------------------------------------------------
static int
LuaCopyVolZmapPart( lua_State* L)
{
// 3 parametri : Id, nPart(0-based), nDestGrpId
int nId ;
LuaCheckParam( L, 1, nId)
int nPart ;
LuaCheckParam( L, 2, nPart)
int nDestGrpId ;
LuaCheckParam( L, 3, nDestGrpId)
LuaClearStack( L) ;
// copio la parte indicata nel gruppo specificato
int nNewId = ExeCopyVolZmapPart( nId, nPart, nDestGrpId) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetParam( L, nNewId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaRemoveVolZmapPart( lua_State* L)
{
// 2 parametri : Id, nPart(0-based)
int nId ;
LuaCheckParam( L, 1, nId)
int nPart ;
LuaCheckParam( L, 2, nPart)
LuaClearStack( L) ;
// rimuovo la parte indicata
bool bOk = ExeRemoveVolZmapPart( nId, nPart) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapSetStdTool( lua_State* L)
@@ -245,6 +284,8 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr)
{
bool bOk = ( &luaMgr != nullptr) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeVolume", LuaExplodeVolume) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCopyVolZmapPart", LuaCopyVolZmapPart) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveVolZmapPart", LuaRemoveVolZmapPart) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetStdTool", LuaVolZmapSetStdTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetAdvTool", LuaVolZmapSetAdvTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetMortiserTool", LuaVolZmapSetMortiserTool) ;