EgtExecutor 2.4k2 :

- aggiunta funzione Exe e Lua ApproxSurface.
This commit is contained in:
DarioS
2022-11-04 19:21:17 +01:00
parent a200549542
commit 00c0e216b7
5 changed files with 88 additions and 27 deletions
+19
View File
@@ -14,6 +14,7 @@
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "LUA.h"
#include "EXE_Const.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EXeConst.h"
#include "/EgtDev/Include/EGkCurve.h"
@@ -57,6 +58,23 @@ LuaExplodeSurf( lua_State* L)
return 2 ;
}
//-------------------------------------------------------------------------------
static int
LuaApproxSurf( lua_State* L)
{
// 1 o 2 parametri : Id [, dLinTol]
int nId ;
LuaCheckParam( L, 1, nId)
double dLinTol = LIN_TOL_SRF ;
LuaGetParam( L, 2, dLinTol) ;
LuaClearStack( L) ;
// approssimazione della superficie
bool bOk = ExeApproxSurface( nId, dLinTol) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaSurfFrAdd( lua_State* L)
@@ -353,6 +371,7 @@ LuaInstallGdbModifySurf( LuaMgr& luaMgr)
bool bOk = ( &luaMgr != nullptr) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtInvertSurf", LuaInvertSurf) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeSurf", LuaExplodeSurf) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtApproxSurf", LuaApproxSurf) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrAdd", LuaSurfFrAdd) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrSubtract", LuaSurfFrSubtract) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrIntersect", LuaSurfFrIntersect) ;