EgtExecutor :

- aggiunta funzione Exe e Lua VolZmapGetEdges.
This commit is contained in:
Dario Sassi
2019-09-12 18:38:36 +00:00
parent f5f45b0794
commit 011ab93d78
3 changed files with 75 additions and 2 deletions
+25
View File
@@ -355,6 +355,30 @@ LuaVolZmapGetDepth( lua_State* L)
}
return 2 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapGetEdges( lua_State* L)
{
// 2 parametri : nId, nDestGrpId
int nId ;
LuaCheckParam( L, 1, nId)
int nDestGrpId ;
LuaCheckParam( L, 2, nDestGrpId)
LuaClearStack( L) ;
// eseguo calcolo profondità dal punto lungo la direzione
int nCount ;
int nFirstId = ExeVolZmapGetEdges( nId, nDestGrpId, &nCount) ;
// restituisco il risultato
if ( nFirstId != GDB_ID_NULL) {
LuaSetParam( L, nFirstId) ;
LuaSetParam( L, nCount) ;
}
else {
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
//----------------------------------------------------------------------------
static int
@@ -466,6 +490,7 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetToolOutline", LuaVolZmapGetToolOutline) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapMillingStep", LuaVolZmapMillingStep) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetDepth", LuaVolZmapGetDepth) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetEdges", LuaVolZmapGetEdges) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidBox", LuaVolZmapAvoidBox) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidCylinder", LuaVolZmapAvoidCylinder) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidSphere", LuaVolZmapAvoidSphere) ;