EgtExecutor 1.6w2 :
- aggiunte funzioni Exe e Lua per Zmap - corretta fnzione disegno sfera.
This commit is contained in:
@@ -68,6 +68,56 @@ LuaVolZmapMillingStep( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaVolZmapGetDepth( lua_State* L)
|
||||
{
|
||||
// 3 o 4 parametri : nId, ptP, vtDir [, nRefType]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
Point3d ptP ;
|
||||
LuaCheckParam( L, 2, ptP)
|
||||
Vector3d vtDir ;
|
||||
LuaCheckParam( L, 3, vtDir)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 4, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// eseguo calcolo profondità dal punto lungo la direzione
|
||||
double dLen1, dLen2 ;
|
||||
bool bOk = ExeVolZmapGetDepth( nId, ptP, vtDir, nRefType, dLen1, dLen2) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, dLen1) ;
|
||||
LuaSetParam( L, dLen2) ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
LuaSetParam( L) ;
|
||||
}
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaVolZmapAvoidBox( lua_State* L)
|
||||
{
|
||||
// 3 o 4 parametri : nId, frBox, vtDiag [, nRefType]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
Frame3d frBox ;
|
||||
LuaCheckParam( L, 2, frBox)
|
||||
Vector3d vtDiag ;
|
||||
LuaCheckParam( L, 3, vtDiag)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 4, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// eseguo calcolo profondità dal punto lungo la direzione
|
||||
bool bOk = ExeVolZmapAvoidBox( nId, frBox, vtDiag, nRefType) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
LuaInstallGdbModifyVol( LuaMgr& luaMgr)
|
||||
@@ -75,5 +125,8 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr)
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetStdTool", LuaVolZmapSetStdTool) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapMillingStep", LuaVolZmapMillingStep) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetDepth", LuaVolZmapGetDepth) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidBox", LuaVolZmapAvoidBox) ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
Reference in New Issue
Block a user