EgtExecutor :

- aggiunto flag bExact a VolZmapGetDepth di Exe e Lua.
This commit is contained in:
Dario Sassi
2017-10-23 06:48:15 +00:00
parent eacbbc1c1f
commit 3a08fc7421
2 changed files with 10 additions and 5 deletions
+7 -3
View File
@@ -232,7 +232,7 @@ LuaVolZmapMillingStep( lua_State* L)
static int
LuaVolZmapGetDepth( lua_State* L)
{
// 3 o 4 parametri : nId, ptP, vtDir [, nRefType]
// 3 o 4 o 5 parametri : nId, ptP, vtDir [, nRefType] [, bExact]
int nId ;
LuaCheckParam( L, 1, nId)
Point3d ptP ;
@@ -240,11 +240,15 @@ LuaVolZmapGetDepth( lua_State* L)
Vector3d vtDir ;
LuaCheckParam( L, 3, vtDir)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 4, nRefType) ;
bool bExact = false ;
if ( LuaGetParam( L, 4, nRefType))
LuaGetParam( L, 5, bExact) ;
else
LuaGetParam( L, 4, bExact) ;
LuaClearStack( L) ;
// eseguo calcolo profondità dal punto lungo la direzione
double dLen1, dLen2 ;
bool bOk = ExeVolZmapGetDepth( nId, ptP, vtDir, nRefType, dLen1, dLen2) ;
bool bOk = ExeVolZmapGetDepth( nId, ptP, vtDir, nRefType, bExact, dLen1, dLen2) ;
// restituisco il risultato
if ( bOk) {
LuaSetParam( L, dLen1) ;