EgtExecutor :

- aggiunta funzione per aggiornare uno Zmap con una  Trimesh
- aggiunta funzione per uniformare uno Zmap.
This commit is contained in:
Riccardo Elitropi
2024-05-15 11:02:15 +02:00
parent 868efb69f1
commit e4f45df79a
2 changed files with 87 additions and 0 deletions
+33
View File
@@ -140,6 +140,37 @@ LuaCreateVolZmapFromSurfTm( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaUpdateVolZmapByAddingSurfTm( lua_State* L)
{
// 2 parametri : nVolZmapId, StmId,
int nVolZmapId ;
LuaCheckParam( L, 1, nVolZmapId) ;
int nStmId ;
LuaCheckParam( L, 2, nStmId) ;
LuaClearStack( L) ;
bool bOk = ExeUpdateVolZmapByAddingSurfTm( nVolZmapId, nStmId) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaUniformVolZmap( lua_State* L)
{
// 1 o 2 parametri : nVolZmapId [, dToler]
int nVolZmapId ;
LuaCheckParam( L, 1, nVolZmapId) ;
double dToler = EPS_SMALL ;
LuaGetParam( L, 2, dToler) ;
LuaClearStack( L) ;
bool bOk = ExeUniformVolZmap( nVolZmapId, dToler) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallGdbCreateVol( LuaMgr& luaMgr)
@@ -149,5 +180,7 @@ LuaInstallGdbCreateVol( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapEmpty", LuaCreateVolZmapEmpty) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapByRegionExtrusion", LuaCreateVolZmapByRegionExtrusion) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapFromSurfTm", LuaCreateVolZmapFromSurfTm) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtUpdateVolZmapByAddingSurfTm", LuaUpdateVolZmapByAddingSurfTm ) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtUniformZmap", LuaUniformVolZmap) ;
return bOk ;
}