diff --git a/EXE_BeamMgr.cpp b/EXE_BeamMgr.cpp index 6ef518f..2faa8a0 100644 --- a/EXE_BeamMgr.cpp +++ b/EXE_BeamMgr.cpp @@ -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, diff --git a/EgtExecutor.rc b/EgtExecutor.rc index b3451d7..e0ebc65 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_BeamMgr.cpp b/LUA_BeamMgr.cpp index cc11cac..7ff6df6 100644 --- a/LUA_BeamMgr.cpp +++ b/LUA_BeamMgr.cpp @@ -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) ;