EgtExecutor 1.6e4 :
- aggiornamenti per cambio nomi include di base - corretto errore in registrazione comando EgtArcC2PNEx - corretto errore in ExeExplodeSurfTm (crash con entità non superfici) - aggiunte funzioni Exe e Lua di movimento assi e carico/scarico teste di macchina - aggiunta Exe e Lua ZoomRadius - possibilità di lua EgtOutBox non modale (solo per usi interni).
This commit is contained in:
+9
-9
@@ -118,11 +118,11 @@ const char*
|
||||
RawPartCornerPosToString( int nFlag)
|
||||
{
|
||||
switch ( nFlag) {
|
||||
case RPCR_TL : return "MCH_CR.TL" ;
|
||||
case RPCR_TR : return "MCH_CR.TR" ;
|
||||
case MCH_CR_TL : return "MCH_CR.TL" ;
|
||||
case MCH_CR_TR : return "MCH_CR.TR" ;
|
||||
default :
|
||||
case RPCR_BL : return "MCH_CR.BL" ;
|
||||
case RPCR_BR : return "MCH_CR.BR" ;
|
||||
case MCH_CR_BL : return "MCH_CR.BL" ;
|
||||
case MCH_CR_BR : return "MCH_CR.BR" ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,11 +131,11 @@ const char*
|
||||
RawPartCenterPosToString( int nFlag)
|
||||
{
|
||||
switch ( nFlag) {
|
||||
case RPCE_TC : return "MCH_CE.TC" ;
|
||||
case MCH_CE_TC : return "MCH_CE.TC" ;
|
||||
default :
|
||||
case RPCE_ML : return "MCH_CE.ML" ;
|
||||
case RPCE_MR : return "MCH_CE.MR" ;
|
||||
case RPCE_BC : return "MCH_CE.BC" ;
|
||||
case RPCE_MC : return "MCH_CE.MC" ;
|
||||
case MCH_CE_ML : return "MCH_CE.ML" ;
|
||||
case MCH_CE_MR : return "MCH_CE.MR" ;
|
||||
case MCH_CE_BC : return "MCH_CE.BC" ;
|
||||
case MCH_CE_MC : return "MCH_CE.MC" ;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
#include "/EgtDev/Include/EExExportStl.h"
|
||||
#include "/EgtDev/Include/EExExportDxf.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
+4
-4
@@ -19,11 +19,11 @@
|
||||
#include "GeoTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
#include "/EgtDev/Include/EgkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EgkGeoVector3d.h"
|
||||
#include "/EgtDev/Include/EgkExtText.h"
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkGeoVector3d.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -893,7 +893,7 @@ ExeCreateCurveArcC2PNEx( int nParentId, const Point3d& ptCen,
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtArcC2PNEx(" + ToString( nParentId) + ",{" +
|
||||
ToString( ptCen) + "},{" +
|
||||
ToString( ptStart) + "},{" +
|
||||
ToString( ptStart) + "}," +
|
||||
SepToString( nSepS) + "," +
|
||||
ToString( nIdS) + ",{" +
|
||||
ToString( ptNearEnd) + "},{" +
|
||||
|
||||
+4
-4
@@ -20,11 +20,11 @@
|
||||
#include "GeoTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
#include "/EgtDev/Include/EgkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EgkGeoVector3d.h"
|
||||
#include "/EgtDev/Include/EgkExtText.h"
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkGeoVector3d.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -118,7 +118,7 @@ ExeExplodeSurfTm( int nId, int* pnCount)
|
||||
// copio tutte le facce
|
||||
int nFirstId = GDB_ID_NULL ;
|
||||
int nCount = 0 ;
|
||||
int nFacet = pStm->GetFacetNum() ;
|
||||
int nFacet = ( bOk ? pStm->GetFacetNum() : 0) ;
|
||||
for ( int i = 0 ; i < nFacet ; ++ i) {
|
||||
ISurfTriMesh* pFac = pStm->CloneFacet( i) ;
|
||||
if ( pFac == nullptr)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "AuxTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "EXE_Macro.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include "AuxTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
+1
-1
@@ -24,9 +24,9 @@
|
||||
#include "/EgtDev/Include/ENkDllMain.h"
|
||||
#include "/EgtDev/Include/EGkDllMain.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EGnPcInfo.h"
|
||||
#include "/EgtDev/Include/EgtLogger.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include <fstream>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include "AuxTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#include "LUA_Base.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
|
||||
+71
-3
@@ -15,11 +15,12 @@
|
||||
#include "stdafx.h"
|
||||
#include "EXE.h"
|
||||
#include "EXE_Macro.h"
|
||||
#include "Lua_Base.h"
|
||||
#include "AuxTools.h"
|
||||
#include "DllMachKernel.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -33,11 +34,12 @@ ExeInitMachMgr( const string& sMachinesDir)
|
||||
// inizializzazione gestore lavorazioni
|
||||
PtrOwner<IMachMgr> pMachMgr( MyCreateMachMgr()) ;
|
||||
VERIFY_NULL( Get( pMachMgr), "Error in CreateMachMgr", false)
|
||||
bool bOk = pMachMgr->Init( GetIndCurrGseContext(), pGseCtx->m_pGeomDB, sMachinesDir) ;
|
||||
bool bOk = pMachMgr->Init( sMachinesDir, pGseCtx->m_pGeomDB,
|
||||
GetIndCurrGseContext(), LuaGetLuaLibsDir(), LuaGetLastRequire()) ;
|
||||
// assegno il gestore al contesto
|
||||
pGseCtx->m_pMachMgr = ( bOk ? Release( pMachMgr) : nullptr) ;
|
||||
// log avvio Machining Manager
|
||||
string sLog = "MachMgr " ;
|
||||
string sLog = "MachMgr" ;
|
||||
sLog += ( bOk ? " started" : " error") ;
|
||||
sLog += " (" + sMachinesDir + ")" ;
|
||||
LOG_INFO( GetLogger(), sLog.c_str())
|
||||
@@ -509,3 +511,69 @@ ExeRotatePartInRawPart( int nPartId, const Vector3d& vtAx, double dAngRotDeg)
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetAxisPos( const string& sAxis, double dVal)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// metto l'asse nella nuova posizione
|
||||
return pGseCtx->m_pMachMgr->SetAxisPos( sAxis, dVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetAxisPos( const string& sAxis, double* pdVal)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// verifico il parametro di ritorno
|
||||
if ( pdVal == nullptr)
|
||||
return false ;
|
||||
// metto l'asse nella nuova posizione
|
||||
return pGseCtx->m_pMachMgr->GetAxisPos( sAxis, *pdVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetAxisHomePos( const string& sAxis, double* pdHomeVal)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// verifico il parametro di ritorno
|
||||
if ( pdHomeVal == nullptr)
|
||||
return false ;
|
||||
// metto l'asse nella nuova posizione
|
||||
return pGseCtx->m_pMachMgr->GetAxisHomePos( sAxis, *pdHomeVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeResetAxisPos( const string& sAxis)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// metto l'asse nella posizione home
|
||||
return pGseCtx->m_pMachMgr->ResetAxisPos( sAxis) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLoadTool( const string& sHead, int nExit, const string& sTool)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// carico l'utensile sulla macchina della macchinata corrente in posizione indicata
|
||||
return pGseCtx->m_pMachMgr->LoadTool( sHead, nExit, sTool) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeResetHeadSet( const string& sHead)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// carico l'utensile sulla macchina della macchinata corrente in posizione indicata
|
||||
return pGseCtx->m_pMachMgr->ResetHeadSet( sHead) ;
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDEv/Include/EGnScan.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtLogger.h"
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
+14
-1
@@ -17,7 +17,7 @@
|
||||
#include "EXE_Macro.h"
|
||||
#include "DllGraphics.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -403,6 +403,19 @@ ExeGetShowTriaAdv( void)
|
||||
return pGseCtx->m_pScene->GetShowTriaAdvanced() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeZoomRadius( double dRadius, bool bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, false)
|
||||
// eseguo lo zoom
|
||||
pGseCtx->m_pScene->ZoomRadius( dRadius) ;
|
||||
if ( bRedraw)
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeZoom( int nZoom, bool bRedraw)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include "/EgtDev/Include/EExExcExecutor.h"
|
||||
#include "/EgtDev/Include/EGrSceExecutor.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -184,3 +184,17 @@ LuaGetLastError( void)
|
||||
{
|
||||
return s_LuaMgr.GetLastError() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const string&
|
||||
LuaGetLuaLibsDir( void)
|
||||
{
|
||||
return s_LuaMgr.GetLuaLibsDir() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const string&
|
||||
LuaGetLastRequire( void)
|
||||
{
|
||||
return s_LuaMgr.GetLastRequire() ;
|
||||
}
|
||||
|
||||
@@ -29,3 +29,5 @@ bool LuaEvalStringExpr( const std::string& sExpr, std::string& sVal) ;
|
||||
bool LuaExecLine( const std::string& sLine) ;
|
||||
bool LuaExecFile( const std::string& sFile) ;
|
||||
const std::string& LuaGetLastError( void) ;
|
||||
const std::string& LuaGetLuaLibsDir( void) ;
|
||||
const std::string& LuaGetLastRequire( void) ;
|
||||
|
||||
+7
-4
@@ -18,10 +18,10 @@
|
||||
#include "/EgtDev/Include/ExeExecutor.h"
|
||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EGnFileUtils.h"
|
||||
#include "/EgtDev/Include/EGnFileCompare.h"
|
||||
#include "/EgtDev/Include/EgtPerfCounter.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -176,7 +176,7 @@ LuaOutLog( lua_State* L)
|
||||
static int
|
||||
LuaOutBox( lua_State* L)
|
||||
{
|
||||
// 3 parametri : stringa, titolo, icona
|
||||
// 3 o 4 parametri : stringa, titolo, icona [bModal]
|
||||
string sOut ;
|
||||
LuaCheckParam( L, 1, sOut)
|
||||
string sTitle ;
|
||||
@@ -189,9 +189,12 @@ LuaOutBox( lua_State* L)
|
||||
nIcon = MB_ICONERROR ;
|
||||
else if ( sIcon == "WARNING")
|
||||
nIcon = MB_ICONWARNING ;
|
||||
bool bModal = true ;
|
||||
LuaGetParam( L, 4, bModal) ;
|
||||
LuaClearStack( L) ;
|
||||
// accodo il messaggio nel file di log
|
||||
int nRes = MessageBox( nullptr, stringtoW( sOut), stringtoW( sTitle), MB_OKCANCEL | nIcon | MB_TASKMODAL) ;
|
||||
// emetto la finestra di dialogo
|
||||
int nRes = MessageBox( nullptr, stringtoW( sOut), stringtoW( sTitle),
|
||||
MB_OKCANCEL | nIcon | ( bModal ? MB_TASKMODAL : MB_SYSTEMMODAL)) ;
|
||||
// risultato (Ok->true, Cancel->false)
|
||||
LuaSetReturn( L, ( nRes == IDOK)) ;
|
||||
return 1 ;
|
||||
|
||||
+114
-1
@@ -80,7 +80,10 @@ LuaAddMachGroup( lua_State* L)
|
||||
// aggiungo la macchinata
|
||||
int nId = ExeAddMachGroup( sName, sMachineName) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, nId) ;
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetReturn( L, nId) ;
|
||||
else
|
||||
LuaSetReturn( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
@@ -503,6 +506,110 @@ LuaRotatePartInRawPart( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaSetAxisPos( lua_State* L)
|
||||
{
|
||||
// 2 parametri : sAxis, dVal
|
||||
string sAxis ;
|
||||
LuaCheckParam( L, 1, sAxis)
|
||||
double dVal ;
|
||||
LuaCheckParam( L, 2, dVal)
|
||||
LuaClearStack( L) ;
|
||||
// metto l'asse nella nuova posizione
|
||||
bool bOk = ExeSetAxisPos( sAxis, dVal) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetAxisPos( lua_State* L)
|
||||
{
|
||||
// 1 parametro : sAxis
|
||||
string sAxis ;
|
||||
LuaCheckParam( L, 1, sAxis)
|
||||
LuaClearStack( L) ;
|
||||
// recupero la posizione dell'asse
|
||||
double dVal ;
|
||||
bool bOk = ExeGetAxisPos( sAxis, &dVal) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetReturn( L, dVal) ;
|
||||
else
|
||||
LuaSetReturn( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetAxisHomePos( lua_State* L)
|
||||
{
|
||||
// 1 parametro : sAxis
|
||||
string sAxis ;
|
||||
LuaCheckParam( L, 1, sAxis)
|
||||
LuaClearStack( L) ;
|
||||
// recupero la posizione dell'asse
|
||||
double dHomeVal ;
|
||||
bool bOk = ExeGetAxisHomePos( sAxis, &dHomeVal) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetReturn( L, dHomeVal) ;
|
||||
else
|
||||
LuaSetReturn( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaResetAxisPos( lua_State* L)
|
||||
{
|
||||
// 1 parametro : sAxis
|
||||
string sAxis ;
|
||||
LuaCheckParam( L, 1, sAxis)
|
||||
LuaClearStack( L) ;
|
||||
// metto l'asse nella posizione home
|
||||
bool bOk = ExeResetAxisPos( sAxis) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaLoadTool( lua_State* L)
|
||||
{
|
||||
// 3 parametri : sHead, nExit, sTool
|
||||
string sHead ;
|
||||
LuaCheckParam( L, 1, sHead)
|
||||
int nExit ;
|
||||
LuaCheckParam( L, 2, nExit)
|
||||
string sTool ;
|
||||
LuaCheckParam( L, 3, sTool)
|
||||
LuaClearStack( L) ;
|
||||
// carico l'utensile
|
||||
bool bOk = ExeLoadTool( sHead, nExit, sTool) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaResetHeadSet( lua_State* L)
|
||||
{
|
||||
// 1 parametro : sHead
|
||||
string sHead ;
|
||||
LuaCheckParam( L, 1, sHead)
|
||||
LuaClearStack( L) ;
|
||||
// carico l'utensile
|
||||
bool bOk = ExeResetHeadSet( sHead) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
@@ -536,6 +643,12 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemovePartFromRawPart", LuaRemovePartFromRawPart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtMovePartInRawPart", LuaTranslatePartInRawPart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRotatePartInRawPart", LuaRotatePartInRawPart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetAxisPos", LuaSetAxisPos) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisPos", LuaGetAxisPos) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisHomePos", LuaGetAxisHomePos) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtResetAxisPos", LuaResetAxisPos) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtLoadTool", LuaLoadTool) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtResetHeadSet", LuaResetHeadSet) ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,23 @@ LuaSetShowTriaAdv( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaZoomRadius( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : dRadius [, flag ridisegna]
|
||||
double dRadius ;
|
||||
LuaCheckParam( L, 1, dRadius)
|
||||
bool bRedraw = true ;
|
||||
LuaGetParam( L, 2, bRedraw) ;
|
||||
LuaClearStack( L) ;
|
||||
// imposto zoom
|
||||
bool bOk = ExeZoomRadius( dRadius, bRedraw) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaZoom( lua_State* L)
|
||||
@@ -182,6 +199,7 @@ LuaInstallScene( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetShowMode", LuaSetShowMode) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetShowCurveDirection", LuaSetShowCurveDirection) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetShowTriaAdv", LuaSetShowTriaAdv) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtZoomRadius", LuaZoomRadius) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtZoom", LuaZoom) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetView", LuaSetView) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetGenericView", LuaSetGenericView) ;
|
||||
|
||||
Reference in New Issue
Block a user