EgtExecutor 1.6h3 :

- rettangoli sempre disegnati CCW
- aggiunta creazione di Regioni rettangolo, stadium e disco
- correzioni a ExeSplitCurveAtSel
- aggiunta ExeProjectCurveOnPlane
- aggiunte funzioni per normale a regione piana e numero di chunk
- sostituzione di Num o Nbr con Count.
This commit is contained in:
Dario Sassi
2015-08-18 07:38:26 +00:00
parent 064fb60719
commit 106af42cc1
18 changed files with 691 additions and 218 deletions
+30 -28
View File
@@ -37,26 +37,47 @@ LuaInvertSurf( lua_State* L)
return 1 ;
}
//----------------------------------------------------------------------------
//-------------------------------------------------------------------------------
static int
LuaExtractSurfFrLoop( lua_State* L)
LuaExplodeSurf( lua_State* L)
{
// 3 parametri : nId, nLoop, nDestGrpId
// 1 parametro : Id
int nId ;
LuaCheckParam( L, 1, nId)
int nLoop ;
LuaCheckParam( L, 2, nLoop)
LuaClearStack( L) ;
// esplosione della superficie trimesh
int nCount ;
int nFirstId = ExeExplodeSurface( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetParam( L, nFirstId) ;
else
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
//----------------------------------------------------------------------------
static int
LuaExtractSurfFrChunkLoops( lua_State* L)
{
// 3 parametri : nId, nChunk, nDestGrpId
int nId ;
LuaCheckParam( L, 1, nId)
int nChunk ;
LuaCheckParam( L, 2, nChunk)
int nDestGrpId ;
LuaCheckParam( L, 3, nDestGrpId)
LuaClearStack( L) ;
// eseguo inversione superfici
int nNewId = ExeExtractSurfFrLoop( nId, nLoop, nDestGrpId) ;
int nCount ;
int nNewId = ExeExtractSurfFrChunkLoops( nId, nChunk, nDestGrpId, &nCount) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetParam( L, nNewId) ;
else
LuaSetParam( L) ;
return 1 ;
LuaSetParam( L, nCount) ;
return 2 ;
}
//----------------------------------------------------------------------------
@@ -83,33 +104,14 @@ LuaExtractSurfTmFacetLoops( lua_State* L)
return 2 ;
}
//-------------------------------------------------------------------------------
static int
LuaExplodeSurfTm( lua_State* L)
{
// 1 parametro : Id
int nId ;
LuaCheckParam( L, 1, nId)
LuaClearStack( L) ;
// esplosione della superficie trimesh
int nCount ;
int nFirstId = ExeExplodeSurfTm( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetParam( L, nFirstId) ;
else
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallGdbModifySurf( LuaMgr& luaMgr)
{
bool bOk = ( &luaMgr != nullptr) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtInvertSurf", LuaInvertSurf) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExtractSurfFrLoop", LuaExtractSurfFrLoop) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeSurf", LuaExplodeSurf) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExtractSurfFrChunkLoops", LuaExtractSurfFrChunkLoops) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExtractSurfTmFacetLoops", LuaExtractSurfTmFacetLoops) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeSurfTm", LuaExplodeSurfTm) ;
return bOk ;
}