EgtExecutor :

- rimozione codici di test.
- modifiche parametri LuaCreateSurfTmSwept.
This commit is contained in:
Riccardo Elitropi
2024-03-15 13:18:48 +01:00
parent 82633bf725
commit 88fa7ef54c
2 changed files with 36 additions and 49 deletions
+7 -3
View File
@@ -660,7 +660,7 @@ LuaCreateSurfTmRectSwept( lua_State* L)
static int
LuaCreateSurfTmSwept( lua_State* L)
{
// 4 o 5 parametri : ParentId, SectId, GuideId, bCapEnds [, dTol]
// 4, 5 o 6 parametri : ParentId, SectId, GuideId, bCapEnds [, dTol] [, vtStatic]
int nParentId ;
LuaCheckParam( L, 1, nParentId)
int nSectId ;
@@ -670,10 +670,14 @@ LuaCreateSurfTmSwept( lua_State* L)
bool bCapEnds ;
LuaCheckParam( L, 4, bCapEnds)
double dLinTol = LIN_TOL_SRF ;
LuaGetParam( L, 5, dLinTol) ;
Vector3d vtStatic = V_INVALID ;
if ( LuaGetParam( L, 5, dLinTol)) {
LuaGetParam( L, 6, vtStatic) ;
}
LuaClearStack( L) ;
// creo STM swept
int nId = ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, bCapEnds, dLinTol) ;
int nId = ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, bCapEnds, dLinTol,
vtStatic.IsValid() ? &vtStatic : nullptr) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;