EgtExecutor :
- aggiunte funzioni per Vmill additivo.
This commit is contained in:
@@ -54,6 +54,42 @@ LuaCreateVolZmapBox( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreateVolZmapEmpty( lua_State* L)
|
||||
{
|
||||
// 6 o 7 o 8 parametri : ParentId, PtIni, dDimX, dDimY, dDimZ, dPrec [, bTriDex] [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptIni ;
|
||||
LuaCheckParam( L, 2, ptIni)
|
||||
double dDimX ;
|
||||
LuaCheckParam( L, 3, dDimX)
|
||||
double dDimY ;
|
||||
LuaCheckParam( L, 4, dDimY)
|
||||
double dDimZ ;
|
||||
LuaCheckParam( L, 5, dDimZ)
|
||||
double dPrec ;
|
||||
LuaCheckParam( L, 6, dPrec)
|
||||
bool bTriDex = true ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( ! LuaGetParam( L, 7, bTriDex))
|
||||
LuaGetParam( L, 7, nRefType) ;
|
||||
else
|
||||
LuaGetParam( L, 8, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo VZM parallelepipedo
|
||||
int nId = ExeCreateVolZmapEmpty( nParentId, ptIni, dDimX, dDimY, dDimZ, dPrec, bTriDex, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nId) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreateVolZmapByRegionExtrusion( lua_State* L)
|
||||
@@ -110,6 +146,7 @@ LuaInstallGdbCreateVol( LuaMgr& luaMgr)
|
||||
{
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapBox", LuaCreateVolZmapBox) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapEmpty", LuaCreateVolZmapEmpty) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapByRegionExtrusion", LuaCreateVolZmapByRegionExtrusion) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapFromSurfTm", LuaCreateVolZmapFromSurfTm) ;
|
||||
return bOk ;
|
||||
|
||||
Reference in New Issue
Block a user