diff --git a/EXE_GdbObjAttribs.cpp b/EXE_GdbObjAttribs.cpp index 26de603..79311ba 100644 --- a/EXE_GdbObjAttribs.cpp +++ b/EXE_GdbObjAttribs.cpp @@ -534,6 +534,18 @@ ExeSetInfo( int nId, const string& sKey, const Point3d& ptP) return bOk ; } +//----------------------------------------------------------------------------- +bool +ExeSetInfo( int nId, const string& sKey, const BBox3d& b3Box) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // assegno la info + bool bOk = pGeomDB->SetInfo( nId, sKey, b3Box) ; + ExeSetModified() ; + return bOk ; +} + //----------------------------------------------------------------------------- bool ExeSetInfo( int nId, const string& sKey, const Frame3d& frFrame) @@ -606,6 +618,16 @@ ExeGetInfo( int nId, const string& sKey, Point3d& ptP) return pGeomDB->GetInfo( nId, sKey, ptP) ; } +//----------------------------------------------------------------------------- +bool +ExeGetInfo( int nId, const string& sKey, BBox3d& b3Box) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // recupero la info + return pGeomDB->GetInfo( nId, sKey, b3Box) ; +} + //----------------------------------------------------------------------------- bool ExeGetInfo( int nId, const string& sKey, Frame3d& frFrame) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 85927ea..e484600 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_GdbObjAttribs.cpp b/LUA_GdbObjAttribs.cpp index 1bce370..c0eed00 100644 --- a/LUA_GdbObjAttribs.cpp +++ b/LUA_GdbObjAttribs.cpp @@ -471,7 +471,7 @@ LuaRemoveName( lua_State* L) static int LuaSetInfo( lua_State* L) { - // 3 parametri : Id, Key, bVal|nVal|dVal|sVal|vtVal|ptVal + // 3 parametri : Id, Key, bVal|nVal|dVal|sVal|vtVal|ptVal|b3Val|frVal int nId ; LuaCheckParam( L, 1, nId) string sKey ; @@ -496,8 +496,18 @@ LuaSetInfo( lua_State* L) bOk = ExeSetInfo( nId, sKey, sVal) ; } else if ( lua_istable( L, 3)) { + Frame3d frVal ; + BBox3d b3Val ; Vector3d vtVal ; // va bene anche per Point3d - if ( LuaGetParam( L, 3, vtVal)) { + if ( LuaGetParam( L, 3, frVal)) { + LuaClearStack( L) ; + bOk = ExeSetInfo( nId, sKey, frVal) ; + } + else if ( LuaGetParam( L, 3, b3Val)) { + LuaClearStack( L) ; + bOk = ExeSetInfo( nId, sKey, b3Val) ; + } + else if ( LuaGetParam( L, 3, vtVal)) { LuaClearStack( L) ; bOk = ExeSetInfo( nId, sKey, vtVal) ; } @@ -555,6 +565,20 @@ LuaGetInfo( lua_State* L) else LuaSetParam( L) ; } + else if ( sType == "x" || sType == "X") { + BBox3d b3Val ; + if ( ExeGetInfo( nId, sKey, b3Val)) + LuaSetParam( L, b3Val) ; + else + LuaSetParam( L) ; + } + else if ( sType == "f" || sType == "F") { + Frame3d frVal ; + if ( ExeGetInfo( nId, sKey, frVal)) + LuaSetParam( L, frVal) ; + else + LuaSetParam( L) ; + } else { // "s" "S" string sInfo ; if ( ExeGetInfo( nId, sKey, sInfo))