EgtExecutor 2.4g1 :
- aggiunta funzione Exe e Lua BeamGetSideData.
This commit is contained in:
@@ -137,6 +137,17 @@ ExeBeamSetPartBox( double dLength, double dHeight, double dWidth, bool bUpdate)
|
||||
return pBeamMgr->SetPartBox( dLength, dHeight, dWidth, bUpdate) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeBeamGetSideData( int nSide, Frame3d& frRef, double& dLength, double& dWidth, double& dHeight)
|
||||
{
|
||||
IBeamMgr* pBeamMgr = GetCurrBeamMgr() ;
|
||||
VERIFY_BEAMMGR( pBeamMgr, false)
|
||||
// recupero i dati della faccia indicata del pezzo corrente
|
||||
ExeSetModified() ;
|
||||
return pBeamMgr->GetSideData( nSide, frRef, dLength, dWidth, dHeight) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeBeamAddProcess( int nGroup, int nProc, int nSide, const string& sDes, int nProcId,
|
||||
|
||||
Binary file not shown.
@@ -143,6 +143,32 @@ LuaBeamSetPartBox( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaBeamGetSideData( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nSide
|
||||
int nSide ;
|
||||
LuaCheckParam( L, 1, nSide)
|
||||
LuaClearStack( L) ;
|
||||
// imposto le dimensioni al pezzo corrente
|
||||
Frame3d frRef ;
|
||||
double dLength, dWidth, dHeight ;
|
||||
bool bOk = ExeBeamGetSideData( nSide, frRef, dLength, dWidth, dHeight) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, frRef) ;
|
||||
LuaSetParam( L, dLength) ;
|
||||
LuaSetParam( L, dWidth) ;
|
||||
LuaSetParam( L, dHeight) ;
|
||||
return 4 ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaBeamAddProcess( lua_State* L)
|
||||
@@ -358,6 +384,7 @@ LuaInstallBeamMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamSetPartName", LuaBeamSetPartName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamSetPartCount", LuaBeamSetPartCount) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamSetPartBox", LuaBeamSetPartBox) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamGetSideData", LuaBeamGetSideData) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamAddProcess", LuaBeamAddProcess) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamModifyProcess", LuaBeamModifyProcess) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtBeamEraseProcess", LuaBeamEraseProcess) ;
|
||||
|
||||
Reference in New Issue
Block a user