EgtExecutor 1.9i4 :

- funzioni di intersezione raccolte in modulo apposito
- aggiunta funzione Exe e Lua BoxLineInters.
This commit is contained in:
Dario Sassi
2018-10-01 07:28:17 +00:00
parent b393ffe181
commit 984292fed9
16 changed files with 927 additions and 721 deletions
-35
View File
@@ -319,39 +319,6 @@ LuaVolZmapGetDepth( lua_State* L)
return 2 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapIntersPlane( lua_State* L)
{
// 4 o 5 parametri : nId, ptP, vtN, nDestGrpId [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
Point3d ptP ;
LuaCheckParam( L, 2, ptP)
Vector3d vtN ;
LuaCheckParam( L, 3, vtN)
int nDestGrpId ;
LuaCheckParam( L, 4, nDestGrpId)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 5, nRefType) ;
LuaClearStack( L) ;
// eseguo calcolo intersezione
Plane3d plPlane ;
plPlane.Set( ptP, vtN) ;
int nCount ;
int nFirstId = ExeVolZmapIntersPlane( nId, plPlane, nDestGrpId, nRefType, &nCount) ;
// restituisco il risultato
if ( nFirstId != GDB_ID_NULL) {
LuaSetParam( L, nFirstId) ;
LuaSetParam( L, nCount) ;
}
else {
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
//----------------------------------------------------------------------------
static int
LuaVolZmapAvoidBox( lua_State* L)
@@ -410,9 +377,7 @@ LuaInstallGdbModifyVol( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapSetChiselTool", LuaVolZmapSetChiselTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapMillingStep", LuaVolZmapMillingStep) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapGetDepth", LuaVolZmapGetDepth) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapIntersPlane", LuaVolZmapIntersPlane) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidBox", LuaVolZmapAvoidBox) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapAvoidSphere", LuaVolZmapAvoidSphere) ;
return bOk ;
}