EgtExecutor :
- aggiunte funzioni Exe e Lua GetSurfTmPlaneInters.
This commit is contained in:
+34
-1
@@ -293,6 +293,38 @@ LuaCopySurfTmFacet( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetSurfTmPlaneInters( lua_State* L)
|
||||
{
|
||||
// 4 o 5 parametri : Id, ptOn, vtN, nDestGrpId [, nRefType]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
Point3d ptOn ;
|
||||
LuaCheckParam( L, 2, ptOn)
|
||||
Vector3d vtN ;
|
||||
LuaCheckParam( L, 3, vtN)
|
||||
int nDestGrpId ;
|
||||
LuaGetParam( L, 4, nDestGrpId) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 5, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// eseguo l'intersezione
|
||||
int nPntCount = 0 ;
|
||||
int nCrvCount = 0 ;
|
||||
int nSrfCount = 0 ;
|
||||
int nNewId = ExeGetSurfTmPlaneInters( nId, ptOn, vtN, nDestGrpId, nRefType, &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
|
||||
LuaCutSurfTm( lua_State* L)
|
||||
@@ -309,7 +341,7 @@ LuaCutSurfTm( lua_State* L)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 5, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero i contorni della faccetta della superficie
|
||||
// taglio la superficie
|
||||
bool bOk = ExeCutSurfTm( nId, ptOn, vtN, bSaveOnEq, nRefType) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
@@ -334,6 +366,7 @@ LuaInstallGdbModifySurf( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetSurfTmSilhouette", LuaGetSurfTmSilhouette) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtExtractSurfTmFacetLoops", LuaExtractSurfTmFacetLoops) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCopySurfTmFacet", LuaCopySurfTmFacet) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetSurfTmPlaneInters", LuaGetSurfTmPlaneInters) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfTm", LuaCutSurfTm) ;
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user