EgtExecutor 1.9h3 :

- aggiunte funzioni Exe e Lua GetSurfTmSurfTmInters
- rinominate funzioni Exe e Lua CutSurfTm in CutSurfTmPlane.
This commit is contained in:
Dario Sassi
2018-08-30 07:28:06 +00:00
parent 54ccef35d1
commit cadbc1e67b
3 changed files with 227 additions and 16 deletions
+33 -4
View File
@@ -327,7 +327,35 @@ LuaGetSurfTmPlaneInters( lua_State* L)
//----------------------------------------------------------------------------
static int
LuaCutSurfTm( lua_State* L)
LuaGetSurfTmSurfTmInters( lua_State* L)
{
// 3 parametri : Id1, nId2, nDestGrpId
int nId1 ;
LuaCheckParam( L, 1, nId1)
int nId2 ;
LuaCheckParam( L, 2, nId2)
int nDestGrpId ;
LuaCheckParam( L, 3, nDestGrpId) ;
LuaClearStack( L) ;
// eseguo l'intersezione
int nPntCount = 0 ;
int nCrvCount = 0 ;
int nSrfCount = 0 ;
int nNewId = ExeGetSurfTmSurfTmInters( nId1, nId2, nDestGrpId, &nPntCount, &nCrvCount, &nSrfCount) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetParam( L, nNewId) ;
else
LuaSetParam( L) ;
LuaSetParam( L, nPntCount) ;
LuaSetParam( L, nCrvCount) ;
LuaSetParam( L, nSrfCount) ;
return 4 ;
}
//----------------------------------------------------------------------------
static int
LuaCutSurfTmPlane( lua_State* L)
{
// 4 o 5 parametri : Id, ptOn, vtN, bSaveOnEq [, nRefType]
int nId ;
@@ -341,8 +369,8 @@ LuaCutSurfTm( lua_State* L)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 5, nRefType) ;
LuaClearStack( L) ;
// taglio la superficie
bool bOk = ExeCutSurfTm( nId, ptOn, vtN, bSaveOnEq, nRefType) ;
// taglio la superficie con ilpiano
bool bOk = ExeCutSurfTmPlane( nId, ptOn, vtN, bSaveOnEq, nRefType) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
@@ -367,6 +395,7 @@ LuaInstallGdbModifySurf( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtExtractSurfTmFacetLoops", LuaExtractSurfTmFacetLoops) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCopySurfTmFacet", LuaCopySurfTmFacet) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetSurfTmPlaneInters", LuaGetSurfTmPlaneInters) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfTm", LuaCutSurfTm) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetSurfTmSurfTmInters", LuaGetSurfTmSurfTmInters) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfTmPlane", LuaCutSurfTmPlane) ;
return bOk ;
}