EgtExecutor 2.5j1 :

- aggiunta funzione Exe e Lua SubtractProjectedFacesOnStmFace
- aggiunta di un parametro opzionale per Exe e Lua GetSilhouette.
This commit is contained in:
Riccardo Elitropi
2023-10-04 12:19:48 +02:00
parent 2b65121551
commit 206f3bdf61
5 changed files with 112 additions and 5 deletions
+35
View File
@@ -388,6 +388,40 @@ LuaSurfTmCut( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaSubtractProjectedFacesOnStmFace( lua_State* L)
{
// 3 o 4 o 5 o 6 parametri : nSurfId, nFaceInd, nDestGrpId [, vSurfsId] [, vSurfFacesInd] [, bOCFlag]
int nSurfId ;
LuaCheckParam( L, 1, nSurfId) ;
int nFaceInd ;
LuaCheckParam( L, 2, nFaceInd) ;
int nDestGrpId ;
LuaCheckParam( L, 3, nDestGrpId) ;
INTVECTOR vSurfsId ;
LuaGetParam( L, 4, vSurfsId) ;
INTVECTOR vSurfFacesInd ;
LuaGetParam( L, 5, vSurfFacesInd) ;
bool bOCFlag = true ;
LuaGetParam( L, 6, bOCFlag) ;
LuaClearStack( L) ;
// sottraggo alla faccia scelta la proiezione delle altre
int nNewId = GDB_ID_NULL;
bool bExistProjection = false ;
int nNewFaceNbr = -1 ;
bool bOk = ExeSubtractProjectedFacesOnStmFace( nSurfId, nFaceInd, nDestGrpId, vSurfsId, vSurfFacesInd,
bOCFlag, nNewId, bExistProjection, nNewFaceNbr) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, bExistProjection) ;
LuaSetParam( L, nNewFaceNbr) ;
if ( nNewId != GDB_ID_NULL)
LuaSetParam( L, nNewId) ;
else
LuaSetParam( L) ;
return 4 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallGdbModifySurf( LuaMgr& luaMgr)
@@ -413,5 +447,6 @@ LuaInstallGdbModifySurf( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmResetTwoColors", LuaSurfTmResetTwoColors) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSplit", LuaSurfTmSplit) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmCut", LuaSurfTmCut) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSubtractProjectedFacesOnStmFace", LuaSubtractProjectedFacesOnStmFace) ;
return bOk ;
}