EgtExecutor :

- aggiunta funzione per la creazione della surf bezier ruled guided.
This commit is contained in:
Daniele Bariletti
2025-11-12 09:40:48 +01:00
parent d41edd344a
commit ee55f97b3a
2 changed files with 114 additions and 1 deletions
+32 -1
View File
@@ -1349,7 +1349,7 @@ LuaCreateSurfBzRuled( lua_State* L)
double dLinTol = LIN_TOL_SRF ;
LuaGetParam( L, nPar, dLinTol) ;
LuaClearStack( L) ;
// creo STM riempiendo un contorno piano
// creo una surf bezier come rigata tra le due curve passate
int nId = ExeCreateSurfBzRuled( nParentId, nCrvId1, nCrvId2, nRuledType, bCapEnds, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
@@ -1359,6 +1359,36 @@ LuaCreateSurfBzRuled( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCreateSurfBzRuledGuided( lua_State* L)
{
// 4 o 5 o 6 parametri : ParentId, CrvId1, CrvId2 nLayGuides [, bCapEnds] [, dTol]
int nParentId ;
LuaCheckParam( L, 1, nParentId)
int nCrvId1 ;
LuaCheckParam( L, 2, nCrvId1)
int nCrvId2 ;
LuaCheckParam( L, 3, nCrvId2)
int nLayGuides ;
LuaCheckParam( L, 4, nLayGuides)
bool bCapEnds = false ;
int nPar = 5 ;
if ( LuaGetParam( L, nPar, bCapEnds))
++ nPar ;
double dLinTol = LIN_TOL_SRF ;
LuaGetParam( L, nPar, dLinTol) ;
LuaClearStack( L) ;
// creo una surf bezier come rigata tra le due curve passate, usando le isocurve nel layer nLayIso
int nId = ExeCreateSurfBzRuledGuided( nParentId, nCrvId1, nCrvId2, nLayGuides, bCapEnds, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCreateSurfBzSkinned( lua_State* L)
@@ -1472,6 +1502,7 @@ LuaInstallGdbCreateSurf( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzByRevolve", LuaCreateSurfBzByRevolve) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzByPointCurve", LuaCreateSurfBzByPointCurve) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzRuled", LuaCreateSurfBzRuled) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzRuledGuided", LuaCreateSurfBzRuledGuided) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzSkinned", LuaCreateSurfBzSkinned) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzSwept", LuaCreateSurfBzSwept) ;
return bOk ;