EgtExecutor :
- modifiche a Exe e Lua CreateSurfTmSwept.
This commit is contained in:
+13
-8
@@ -660,24 +660,29 @@ LuaCreateSurfTmRectSwept( lua_State* L)
|
||||
static int
|
||||
LuaCreateSurfTmSwept( lua_State* L)
|
||||
{
|
||||
// 4, 5 o 6 parametri : ParentId, SectId, GuideId, bCapEnds [, dTol] [, vtStatic]
|
||||
// 4, 5, 6 o 7 parametri : ParentId, SectId, GuideId [, vtAx], bCapEnds [, dTol] [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nSectId ;
|
||||
LuaCheckParam( L, 2, nSectId)
|
||||
int nGuideId ;
|
||||
LuaCheckParam( L, 3, nGuideId)
|
||||
int nPar = 4 ;
|
||||
Vector3d vtAx = V_NULL ;
|
||||
if ( LuaGetParam( L, nPar, vtAx))
|
||||
++ nPar ;
|
||||
bool bCapEnds ;
|
||||
LuaCheckParam( L, 4, bCapEnds)
|
||||
LuaCheckParam( L, nPar, bCapEnds)
|
||||
++ nPar ;
|
||||
double dLinTol = LIN_TOL_SRF ;
|
||||
Vector3d vtStatic = V_INVALID ;
|
||||
if ( LuaGetParam( L, 5, dLinTol)) {
|
||||
LuaGetParam( L, 6, vtStatic) ;
|
||||
}
|
||||
if ( LuaGetParam( L, nPar, dLinTol))
|
||||
++ nPar ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, nPar, nRefType))
|
||||
++ nPar ;
|
||||
LuaClearStack( L) ;
|
||||
// creo STM swept
|
||||
int nId = ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, bCapEnds, dLinTol,
|
||||
vtStatic.IsValid() ? &vtStatic : nullptr) ;
|
||||
int nId = ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, vtAx, bCapEnds, dLinTol, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nId) ;
|
||||
|
||||
Reference in New Issue
Block a user