EgtExecutor :

- aggiunto parametro opzionale dExtraBox a funzione ExeCreateVolZmapFromSurfTm ed equivalente lua EgtVolZmapFromSurfTm.
This commit is contained in:
Dario Sassi
2025-09-19 11:14:40 +02:00
parent 3d3098ed0b
commit bbe59a3d90
2 changed files with 14 additions and 9 deletions
+7 -3
View File
@@ -121,7 +121,7 @@ LuaCreateVolZmapByRegionExtrusion( lua_State* L)
static int
LuaCreateVolZmapFromSurfTm( lua_State* L)
{
// 3 o 4 parametri : ParentId, StmId, dPrec [, bTriDex]
// 3 o 4 o 5 parametri : ParentId, StmId, dPrec [, bTriDex] [, dExtraBox]
int nParentId ;
LuaCheckParam( L, 1, nParentId)
int nStmId ;
@@ -129,10 +129,14 @@ LuaCreateVolZmapFromSurfTm( lua_State* L)
double dPrec ;
LuaCheckParam( L, 3, dPrec)
bool bTriDex = true ;
LuaGetParam( L, 4, bTriDex) ;
double dExtraBox = 0 ;
if ( LuaGetParam( L, 4, bTriDex))
LuaGetParam( L, 5, dExtraBox) ;
else
LuaGetParam( L, 4, dExtraBox) ;
LuaClearStack( L) ;
// creo VZM da superficie trimesh
int nId = ExeCreateVolZmapFromSurfTm( nParentId, nStmId, dPrec, bTriDex) ;
int nId = ExeCreateVolZmapFromSurfTm( nParentId, nStmId, dPrec, bTriDex, dExtraBox) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;