EgtExecutor :

- prime sistemazioni per offset superfici trimesh tramite Zmap
- eliminate funzioni exe/lua CreateVolZmapFromSurfTmOffset e CreateVolZmapFromSurfTmThickeningOffset.
This commit is contained in:
Dario Sassi
2025-07-07 14:59:59 +02:00
parent 92a6b54666
commit c36ce0a26f
7 changed files with 276 additions and 472 deletions
-87
View File
@@ -141,89 +141,6 @@ LuaCreateVolZmapFromSurfTm( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCreateVolZmapFromSurfTmOffset( lua_State* L)
{
// 5 parametri : ParentId, StmIds, dOffs, dPrec, nType
int nParentId ;
LuaCheckParam( L, 1, nParentId)
INTVECTOR vStmId ;
LuaCheckParam( L, 2, vStmId)
double dOffs ;
LuaCheckParam( L, 3, dOffs)
double dPrec ;
LuaCheckParam( L, 4, dPrec)
int nType = ISurfTriMesh::OFF_FILLET ;
LuaGetParam( L, 5, nType) ;
LuaClearStack( L) ;
// creo VZM da offset di superficie trimesh
int nId = ExeCreateVolZmapFromSurfTmOffset( nParentId, vStmId, dOffs, dPrec, nType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCreateVolZmapFromSurfTmThickeningOffset( lua_State* L)
{
// 5 parametri : ParentId, StmIds, dOffs, dPrec, nType
int nParentId ;
LuaCheckParam( L, 1, nParentId)
INTVECTOR vStmId ;
LuaCheckParam( L, 2, vStmId)
double dOffs ;
LuaCheckParam( L, 3, dOffs)
double dPrec ;
LuaCheckParam( L, 4, dPrec)
int nType = ISurfTriMesh::OFF_FILLET ;
LuaGetParam( L, 5, nType) ;
LuaClearStack( L) ;
// creo VZM da offset di superficie trimesh
int nId = ExeCreateVolZmapFromSurfTmThickeningOffset( nParentId, vStmId, dOffs, dPrec, nType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( 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)
@@ -233,9 +150,5 @@ 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( "EgtVolZmapFromSurfTmOffset", LuaCreateVolZmapFromSurfTmOffset) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapFromSurfTmThickeningOffset", LuaCreateVolZmapFromSurfTmThickeningOffset) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtUpdateVolZmapByAddingSurfTm", LuaUpdateVolZmapByAddingSurfTm ) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtUniformZmap", LuaUniformVolZmap) ;
return bOk ;
}