EgtExecutor :

- piccole migliorie stilistiche.
This commit is contained in:
Dario Sassi
2019-08-06 09:31:57 +00:00
parent dc0396f6af
commit 93c77cb786
2 changed files with 54 additions and 54 deletions
+24 -24
View File
@@ -379,29 +379,6 @@ LuaVolZmapAvoidBox( lua_State* L)
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapAvoidSphere( lua_State* L)
{
// 4 o 5 parametri : nId, ptCen, dRad, dSafeDist [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
Point3d ptCen ;
LuaCheckParam( L, 2, ptCen)
double dRad ;
LuaCheckParam( L, 3, dRad)
double dSafeDist ;
LuaCheckParam( L, 4, dSafeDist)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 5, nRefType) ;
LuaClearStack( L) ;
// verifico non interferenza
bool bOk = ExeVolZmapAvoidSphere( nId, ptCen, dRad, dSafeDist, nRefType) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapAvoidCylinder( lua_State* L)
@@ -427,6 +404,29 @@ LuaVolZmapAvoidCylinder( lua_State* L)
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapAvoidSphere( lua_State* L)
{
// 4 o 5 parametri : nId, ptCen, dRad, dSafeDist [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
Point3d ptCen ;
LuaCheckParam( L, 2, ptCen)
double dRad ;
LuaCheckParam( L, 3, dRad)
double dSafeDist ;
LuaCheckParam( L, 4, dSafeDist)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 5, nRefType) ;
LuaClearStack( L) ;
// verifico non interferenza
bool bOk = ExeVolZmapAvoidSphere( nId, ptCen, dRad, dSafeDist, nRefType) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaCutVolZmapPlane( lua_State* L)
@@ -467,8 +467,8 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapMillingStep", LuaVolZmapMillingStep) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetDepth", LuaVolZmapGetDepth) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidBox", LuaVolZmapAvoidBox) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidSphere", LuaVolZmapAvoidSphere) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidCylinder", LuaVolZmapAvoidCylinder) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidSphere", LuaVolZmapAvoidSphere) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCutVolZmapPlane", LuaCutVolZmapPlane) ;
return bOk ;
}