EgtExecutor 1.6g3 :

- correzione controlli in ExeCreateGeoFrame
- ExeInitGeomDB rinominata ExeInitContext
- aggiunta ExeDeleteContext
- migliorato log di ExeExit
- aggiunta possibilità di leggere e scrivere variabili LUA_Base.cpp
- aggiunta possibilità di chiamare funzioni Lua.
This commit is contained in:
Dario Sassi
2015-07-14 15:48:55 +00:00
parent d070901ce0
commit c5fdfea88c
27 changed files with 673 additions and 524 deletions
+2 -2
View File
@@ -160,8 +160,8 @@ ExeCreateGeoFrame( int nParentId, const Frame3d& frFrame, int nRefType)
Vector3d vtZL = GetVectorLocal( pGeomDB, frFrame.VersZ(), nRefType, frLoc) ; ;
// creo e setto il riferimento
PtrOwner<IGeoFrame3d> pGeoFrm( CreateGeoFrame3d()) ;
bOk = bOk & ! IsNull( pGeoFrm) ;
bOk = bOk & pGeoFrm->Set( ptOrigL, vtXL, vtYL, vtZL) ;
bOk = bOk && ! IsNull( pGeoFrm) ;
bOk = bOk && pGeoFrm->Set( ptOrigL, vtXL, vtYL, vtZL) ;
// inserisco il riferimento nel DB
int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pGeoFrm)) : GDB_ID_NULL) ;
ExeSetModified() ;
+8
View File
@@ -112,9 +112,17 @@ ExeInit( int nDebug, const string& sLogFile, const string& sLogMsg)
bool
ExeExit( void)
{
// recupero vettore dei contesti attivi
INTVECTOR vOn ;
GetAllGseContextOn( vOn) ;
// cancello tutti i contesti
ClearAllGseContexts() ;
// log dei contesti cancellati
string sTmp = "All Contexts deleted (" + ToString( vOn) + ")" ;
LOG_INFO( s_pGenLog, sTmp.c_str())
// termino l'interprete LUA
LuaExit() ;
+18 -3
View File
@@ -25,7 +25,7 @@ using namespace std ;
//-----------------------------------------------------------------------------
int
ExeInitGeomDB( void)
ExeInitContext( void)
{
// creo e recupero un contesto libero
int nGseCtx = CreateGseContext() ;
@@ -44,13 +44,28 @@ ExeInitGeomDB( void)
pGseCtx->m_pGeomDB->SetDefaultMaterial( pGseCtx->m_colDef) ;
// rendo corrente il contesto
SetCurrGseContext( nGseCtx) ;
// log avvio DB geometrico
string sLog = "GeomDB started " + ToString( nGseCtx) ;
// log avvio Context (DB geometrico)
string sLog = "Context " + ToString( nGseCtx) + " started" ;
LOG_INFO( GetLogger(), sLog.c_str())
return nGseCtx ;
}
//-----------------------------------------------------------------------------
int
ExeDeleteContext( int nGseCtx)
{
// se contesto corrente, lo resetto
if ( nGseCtx == GetIndCurrGseContext())
ResetCurrGseContext() ;
// lo cancello
bool bOk = DeleteGseContext( nGseCtx) ;
// log arresto Context (DB geometrico + eventuale Scene)
string sLog = "Context " + ToString( nGseCtx) + ( bOk ? " deleted" : " not found") ;
LOG_INFO( GetLogger(), sLog.c_str())
return bOk ;
}
//-----------------------------------------------------------------------------
bool
ExeSetCurrentContext( int nGseCtx)
+94 -2
View File
@@ -21,6 +21,98 @@
using namespace std ;
//-----------------------------------------------------------------------------
bool
ExeLuaSetGlobBoolVar( const string& sVar, bool bVal)
{
// assegno il valore della variabile
return LuaSetGlobVar( sVar, bVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaSetGlobIntVar( const string& sVar, int nVal)
{
// assegno il valore della variabile
return LuaSetGlobVar( sVar, nVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaSetGlobNumVar( const string& sVar, double dVal)
{
// assegno il valore della variabile
return LuaSetGlobVar( sVar, dVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaSetGlobStringVar( const string& sVar, const string& sVal)
{
// assegno il valore della variabile
return LuaSetGlobVar( sVar, sVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaGetGlobBoolVar( const string& sVar, bool* pbVal)
{
// verifico parametro di ritorno
if ( pbVal == nullptr)
return false ;
// recupero il valore della variabile
return LuaGetGlobVar( sVar, *pbVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaGetGlobIntVar( const string& sVar, int* pnVal)
{
// verifico parametro di ritorno
if ( pnVal == nullptr)
return false ;
// recupero il valore della variabile
return LuaGetGlobVar( sVar, *pnVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaGetGlobNumVar( const string& sVar, double* pdVal)
{
// verifico parametro di ritorno
if ( pdVal == nullptr)
return false ;
// recupero il valore della variabile
return LuaGetGlobVar( sVar, *pdVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaGetGlobStringVar( const string& sVar, string& sVal)
{
// verifico parametro di ritorno
if ( &sVal == nullptr)
return false ;
// recupero il valore della variabile
return LuaGetGlobVar( sVar, sVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaResetGlobVar( const string& sVar)
{
// eseguo il reset della variabile
return LuaResetGlobVar( sVar) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaCreateGlobTable( const string& sVar)
{
// creazione della tavola
return LuaCreateGlobTable( sVar) ;
}
//-----------------------------------------------------------------------------
bool
ExeLuaEvalNumExpr( const string& sExpr, double* pdVal)
@@ -29,7 +121,7 @@ ExeLuaEvalNumExpr( const string& sExpr, double* pdVal)
if ( pdVal == nullptr)
return false ;
// valuto l'espressione
return LuaEvalNumExpr( sExpr, *pdVal) ;
return LuaEvalExpr( sExpr, *pdVal) ;
}
//-----------------------------------------------------------------------------
@@ -40,7 +132,7 @@ ExeLuaEvalStringExpr( const string& sExpr, string& sVal)
if ( &sVal == nullptr)
return false ;
// valuto l'espressione
return LuaEvalStringExpr( sExpr, sVal) ;
return LuaEvalExpr( sExpr, sVal) ;
}
//-----------------------------------------------------------------------------
BIN
View File
Binary file not shown.
+13
View File
@@ -45,6 +45,19 @@ DeleteGseContext( int nInd)
return true ;
}
//----------------------------------------------------------------------------
bool
GetAllGseContextOn( INTVECTOR& vOn)
{
vOn.reserve( MAX_CTX) ;
vOn.clear() ;
for ( int i = 0 ; i < MAX_CTX ; ++ i) {
if ( s_GseOn[i])
vOn.push_back( i + 1) ;
}
return true ;
}
//----------------------------------------------------------------------------
bool
ClearAllGseContexts( void)
+1
View File
@@ -75,6 +75,7 @@ class GseContext
//----------------------------------------------------------------------------
int CreateGseContext( void) ;
bool DeleteGseContext( int nInd) ;
bool GetAllGseContextOn( INTVECTOR& vOn) ;
bool ClearAllGseContexts( void) ;
GseContext* GetGseContext( int nInd) ;
IGeomDB* GetGeomDB( int nInd) ;
+12 -4
View File
@@ -17,6 +17,7 @@
#include "LUA.h"
#include "LUA_Base.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EGkLuaAux.h"
#include "/EgtDev/Include/EGnLuaMgr.h"
using namespace std ;
@@ -136,6 +137,13 @@ LuaExit( void)
return true ;
}
//----------------------------------------------------------------------------
LuaMgr&
LuaGetLuaMgr( void)
{
return s_LuaMgr ;
}
//----------------------------------------------------------------------------
bool
LuaSetLuaLibsDir( const string& sDir)
@@ -152,16 +160,16 @@ LuaRequire( const string& sFile)
//----------------------------------------------------------------------------
bool
LuaEvalNumExpr( const string& sExpr, double& dVal)
LuaResetGlobVar( const string& sVar)
{
return s_LuaMgr.EvalNumExpr( sExpr, dVal) ;
return LuaResetGlobVar( s_LuaMgr.GetLuaState(), sVar) ;
}
//----------------------------------------------------------------------------
bool
LuaEvalStringExpr( const string& sExpr, string& sVal)
LuaCreateGlobTable( const string& sVar)
{
return s_LuaMgr.EvalStringExpr( sExpr, sVal) ;
return LuaCreateGlobTable( s_LuaMgr.GetLuaState(), sVar) ;
}
//----------------------------------------------------------------------------
+19 -7
View File
@@ -13,19 +13,31 @@
#pragma once
#include <string>
//----------------------------------------------------------------------------
struct lua_State ;
typedef int(*PFLUA) ( lua_State*) ;
#include "/EgtDev/Include/EGnLuaMgr.h"
//----------------------------------------------------------------------------
bool LuaInit( void) ;
bool LuaExit( void) ;
LuaMgr& LuaGetLuaMgr( void) ;
bool LuaSetLuaLibsDir( const std::string& sDir) ;
bool LuaRequire( const std::string& sFile) ;
bool LuaEvalNumExpr( const std::string& sExpr, double& dVal) ;
bool LuaEvalStringExpr( const std::string& sExpr, std::string& sVal) ;
template<typename T>
bool LuaSetGlobVar( const std::string& sVar, const T& Val)
{ return LuaSetGlobVar( LuaGetLuaMgr().GetLuaState(), sVar, Val) ; }
template<typename T>
bool LuaGetGlobVar( const std::string& sVar, T& Val)
{ return LuaGetGlobVar( LuaGetLuaMgr().GetLuaState(), sVar, Val) ; }
bool LuaResetGlobVar( const std::string& sVar) ;
bool LuaCreateGlobTable( const std::string& sVar) ;
template<typename... Args>
bool LuaCallFunction( const std::string& sFunName, int nRets, const Args&... params)
{ return LuaGetLuaMgr().CallFunction( sFunName, nRets, params...) ; }
template<typename... Args>
bool LuaGetFunctionReturns( Args&... rets)
{ return LuaGetLuaMgr().GetFunctionReturns( rets...) ; }
template<typename T>
bool LuaEvalExpr( const std::string& sExpr, T& Val)
{ return LuaGetLuaMgr().EvalExpr( sExpr, Val) ; }
bool LuaExecLine( const std::string& sLine) ;
bool LuaExecFile( const std::string& sFile) ;
const std::string& LuaGetLastError( void) ;
+6 -6
View File
@@ -34,7 +34,7 @@ LuaImportDxf( lua_State* L)
// apro il file
bool bOk = ExeImportDxf( sFilePath, dScaleFactor) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -51,7 +51,7 @@ LuaImportStl( lua_State* L)
// apro il file
bool bOk = ExeImportStl( sFilePath, dScaleFactor) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -66,7 +66,7 @@ LuaImportCnc( lua_State* L)
// apro il file
bool bOk = ExeImportCnc( sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -81,7 +81,7 @@ LuaImportCsf( lua_State* L)
// apro il file
bool bOk = ExeImportCsf( sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -98,7 +98,7 @@ LuaExportDxf( lua_State* L)
// apro il file
bool bOk = ExeExportDxf( nGroupId, sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -115,7 +115,7 @@ LuaExportStl( lua_State* L)
// apro il file
bool bOk = ExeExportStl( nGroupId, sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+14 -14
View File
@@ -41,9 +41,9 @@ LuaCreateGroup( lua_State* L)
int nId = ExeCreateGroup( nParentId, frFrame, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -63,9 +63,9 @@ LuaCreateGeoPoint( lua_State* L)
int nId = ExeCreateGeoPoint( nParentId, ptP, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -89,9 +89,9 @@ LuaCreateGeoVector( lua_State* L)
int nId = ExeCreateGeoVector( nParentId, vtV, ptB, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -111,9 +111,9 @@ LuaCreateGeoFrame( lua_State* L)
int nId = ExeCreateGeoFrame( nParentId, frFrame, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -139,9 +139,9 @@ LuaCreateText( lua_State* L)
int nId = ExeCreateText( nParentId, ptP, dAngRotDeg, sText, dH, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -175,9 +175,9 @@ LuaCreateTextEx( lua_State* L)
int nId = ExeCreateTextEx( nParentId, ptP, vtN, vtD, sText, sFont, bItalic, dH, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -220,9 +220,9 @@ LuaCreateTextAdv( lua_State* L)
sText, sFont, nW, bItalic, dH, dRat, dAddAdv, nInsPos, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
+55 -55
View File
@@ -39,9 +39,9 @@ LuaCreateCurveLine( lua_State* L)
int nId = ExeCreateCurveLine( nParentId, ptIni, ptFin, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -73,9 +73,9 @@ LuaCreateCurveLineEx( lua_State* L)
ptFin, nSepF, nIdF, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -99,9 +99,9 @@ LuaCreateCurveLinePVL( lua_State* L)
int nId = ExeCreateCurveLinePVL( nParentId, ptIni, vtDir, dLen, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -127,9 +127,9 @@ LuaCreateCurveLineMinPointCurve( lua_State* L)
int nId = ExeCreateCurveLineMinPointCurve( nParentId, ptIni, nCrvId, dNearPar, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -153,9 +153,9 @@ LuaCreateCurveCircle( lua_State* L)
int nId = ExeCreateCurveCircle( nParentId, ptCen, vtN, dRad, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -179,9 +179,9 @@ LuaCreateCurveCircleCPN( lua_State* L)
int nId = ExeCreateCurveCircleCPN( nParentId, ptCen, ptOn, vtN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -209,9 +209,9 @@ LuaCreateCurveCircleCPNEx( lua_State* L)
int nId = ExeCreateCurveCircleCPNEx( nParentId, ptCen, ptOn, nSepO, nIdO, vtN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -235,9 +235,9 @@ LuaCreateCurveCircle3P( lua_State* L)
int nId = ExeCreateCurveCircle3P( nParentId, ptP1, ptP2, ptP3, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -267,9 +267,9 @@ LuaCreateCurveArc( lua_State* L)
int nId = ExeCreateCurveArc( nParentId, ptCen, vtN, dRad, vtS, dAngCenDeg, dDeltaN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -295,9 +295,9 @@ LuaCreateCurveArcC2PN( lua_State* L)
int nId = ExeCreateCurveArcC2PN( nParentId, ptCen, ptStart, ptNearEnd, vtNorm, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -327,9 +327,9 @@ LuaCreateCurveArcC2PNEx( lua_State* L)
int nId = ExeCreateCurveArcC2PNEx( nParentId, ptCen, ptStart, nSepS, nIdS, ptNearEnd, vtNorm, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -353,9 +353,9 @@ LuaCreateCurveArc3P( lua_State* L)
int nId = ExeCreateCurveArc3P( nParentId, ptP1, ptP2, ptP3, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -381,9 +381,9 @@ LuaCreateCurveArc2PVN( lua_State* L)
int nId = ExeCreateCurveArc2PVN( nParentId, ptStart, ptEnd, vtDirS, vtNorm, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -414,9 +414,9 @@ LuaCreateCurveArc2PVNEx( lua_State* L)
vtDirS, vtNorm, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -449,9 +449,9 @@ LuaCreateCurveFillet( lua_State* L)
vtNorm, dRad, bTrim, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -484,9 +484,9 @@ LuaCreateCurveChamfer( lua_State* L)
vtNorm, dDist, bTrim, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -508,9 +508,9 @@ LuaCreateCurveBezier( lua_State* L)
int nId = ExeCreateCurveBezier( nParentId, nDegree, vPnt, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -532,9 +532,9 @@ LuaCreateCurveBezierRational( lua_State* L)
int nId = ExeCreateCurveBezierRational( nParentId, nDegree, vPntW, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -554,9 +554,9 @@ LuaCreateCurveBezierFromArc( lua_State* L)
int nId = ExeCreateCurveBezierFromArc( nParentId, nArcId, bErase) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -576,9 +576,9 @@ LuaCreateCurveCompo( lua_State* L)
int nId = ExeCreateCurveCompo( nParentId, vIds, bErase) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -605,10 +605,10 @@ LuaCreateCurveCompoByChain( lua_State* L)
int nId = ExeCreateCurveCompoByChain( nParentId, vIds, ptNear, bErase, nRefType, &nCount) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
@@ -632,9 +632,9 @@ LuaCreateCurveCompoFromPoints( lua_State* L)
int nId = ExeCreateCurveCompoFromPoints( nParentId, PL, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -658,9 +658,9 @@ LuaCreateCurveCompoFromPointBulges( lua_State* L)
int nId = ExeCreateCurveCompoFromPointBulges( nParentId, PA, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -684,9 +684,9 @@ LuaCreateRectangle3P( lua_State* L)
int nId = ExeCreateRectangle3P( nParentId, ptIni, ptCross, ptDir, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -712,9 +712,9 @@ LuaCreatePolygonFromRadius( lua_State* L)
int nId = ExeCreatePolygonFromRadius( nParentId, nNumSides, PtCen, PtCorn, vtN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -740,9 +740,9 @@ LuaCreatePolygonFromApothem( lua_State* L)
int nId = ExeCreatePolygonFromApothem( nParentId, nNumSides, PtCen, PtMid, vtN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -768,9 +768,9 @@ LuaCreatePolygonFromSide( lua_State* L)
int nId = ExeCreatePolygonFromSide( nParentId, nNumSides, ptIni, ptFin, vtN, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
+30 -30
View File
@@ -41,9 +41,9 @@ LuaCreateSurfTmBBox( lua_State* L)
int nId = ExeCreateSurfTmBBox( nParentId, b3Box, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -69,9 +69,9 @@ LuaCreateSurfTmBox( lua_State* L)
int nId = ExeCreateSurfTmBox( nParentId, ptIni, ptCross, ptDir, dHeight, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -97,9 +97,9 @@ LuaCreateSurfTmPyramid( lua_State* L)
int nId = ExeCreateSurfTmPyramid( nParentId, ptIni, ptCross, ptDir, dHeight, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -129,9 +129,9 @@ LuaCreateSurfTmCylinder( lua_State* L)
int nId = ExeCreateSurfTmCylinder( nParentId, ptOrig, vtN, dRad, dHeight, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -161,9 +161,9 @@ LuaCreateSurfTmCone( lua_State* L)
int nId = ExeCreateSurfTmCone( nParentId, ptOrig, vtN, dRad, dHeight, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -189,9 +189,9 @@ LuaCreateSurfTmSphere( lua_State* L)
int nId = ExeCreateSurfTmSphere( nParentId, ptOrig, dRad, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -212,9 +212,9 @@ LuaCreateSurfTmByFlatContour( lua_State* L)
int nId = ExeCreateSurfTmByFlatContour( nParentId, nCrvId, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -235,9 +235,9 @@ LuaCreateSurfTmByRegion( lua_State* L)
int nId = ExeCreateSurfTmByRegion( nParentId, vCrvIds, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -264,9 +264,9 @@ LuaCreateSurfTmByExtrusion( lua_State* L)
dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -292,9 +292,9 @@ LuaCreateSurfTmByRegionExtrusion( lua_State* L)
int nId = ExeCreateSurfTmByRegionExtrusion( nParentId, vCrvIds, vtExtr, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -324,9 +324,9 @@ LuaCreateSurfTmByRevolve( lua_State* L)
int nId = ExeCreateSurfTmByRevolve( nParentId, nCrvId, ptAx, vtAx, bCapEnds, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -358,9 +358,9 @@ LuaCreateSurfTmByScrewing( lua_State* L)
int nId = ExeCreateSurfTmByScrewing( nParentId, nCrvId, ptAx, vtAx, dAngRotDeg, dMove, dLinTol, nRefType) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -383,9 +383,9 @@ LuaCreateSurfTmRuled( lua_State* L)
int nId = ExeCreateSurfTmRuled( nParentId, nPtOrCrvId1, nPtOrCrvId2, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -406,9 +406,9 @@ LuaCreateSurfTmByTriangles( lua_State* L)
int nId = ExeCreateSurfTmByTriangles( nParentId, vId, bErase) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -429,9 +429,9 @@ LuaCreateSurfTmBySewing( lua_State* L)
int nId = ExeCreateSurfTmBySewing( nParentId, vId, bErase) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
+12 -12
View File
@@ -36,7 +36,7 @@ LuaChangeGroupFrame( lua_State* L)
LuaClearStack( L) ;
// modifica del riferimento
bool bOk = ExeChangeGroupFrame( nId, frNewRef, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -54,7 +54,7 @@ LuaChangeVectorBase( lua_State* L)
LuaClearStack( L) ;
// modifica del punto base
bool bOk = ExeChangeVectorBase( nId, ptBase, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -70,7 +70,7 @@ LuaModifyText( lua_State* L)
LuaClearStack( L) ;
// modifica del testo
bool bOk = ExeModifyText( nId, sNewText) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -86,7 +86,7 @@ LuaChangeTextFont( lua_State* L)
LuaClearStack( L) ;
// modifica del testo
bool bOk = ExeChangeTextFont( nId, sNewFont) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -100,7 +100,7 @@ LuaFlipText( lua_State* L)
LuaClearStack( L) ;
// flip del testo
bool bOk = ExeFlipText( nId) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -116,7 +116,7 @@ LuaMirrorText( lua_State* L)
LuaClearStack( L) ;
// flip del testo
bool bOk = ExeMirrorText( nId, bOnL) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -132,10 +132,10 @@ LuaExplodeText( lua_State* L)
int nCount ;
int nFirstId = ExeExplodeText( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetReturn( L, nFirstId) ;
LuaSetParam( L, nFirstId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
@@ -151,10 +151,10 @@ LuaSplitText( lua_State* L)
int nCount ;
int nFirstId = ExeSplitText( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetReturn( L, nFirstId) ;
LuaSetParam( L, nFirstId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
+27 -27
View File
@@ -32,7 +32,7 @@ LuaInvertCurve( lua_State* L)
// eseguo inversione curve
bool bOk = ExeInvertCurve( vId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -50,7 +50,7 @@ LuaOffsetCurve( lua_State* L)
LuaClearStack( L) ;
// offset della curva
bool bOk = ExeOffsetCurve( nId, dDist, nType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -68,7 +68,7 @@ LuaChangeClosedCurveStartPoint( lua_State* L)
LuaClearStack( L) ;
// modifico il punto iniziale
bool bOk = ExeChangeClosedCurveStartPoint( nId, ptStart, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -86,7 +86,7 @@ LuaModifyCurveStartPoint( lua_State* L)
LuaClearStack( L) ;
// modifico il punto iniziale
bool bOk = ExeModifyCurveStartPoint( nId, ptStart, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -104,7 +104,7 @@ LuaModifyCurveEndPoint( lua_State* L)
LuaClearStack( L) ;
// modifico il punto finale
bool bOk = ExeModifyCurveEndPoint( nId, ptEnd, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -123,7 +123,7 @@ LuaModifyCurveExtrusion( lua_State* L)
// modifico il vettore estrusione
bool bOk = ExeModifyCurveExtrusion( vId, vtExtr, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -140,7 +140,7 @@ LuaModifyCurveThickness( lua_State* L)
// modifico lo spessore di estrusione
bool bOk = ExeModifyCurveThickness( vId, dThick) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -156,7 +156,7 @@ LuaTrimCurveStartAtLen( lua_State* L)
LuaClearStack( L) ;
// taglio la curva all'inizio
bool bOk = ExeTrimCurveStartAtLen( nId, dLen) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -172,7 +172,7 @@ LuaTrimCurveEndAtLen( lua_State* L)
LuaClearStack( L) ;
// taglio la curva alla fine
bool bOk = ExeTrimCurveEndAtLen( nId, dLen) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -188,7 +188,7 @@ LuaTrimCurveStartAtParam( lua_State* L)
LuaClearStack( L) ;
// taglio la curva all' inizio
bool bOk = ExeTrimCurveStartAtParam( nId, dPar) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -204,7 +204,7 @@ LuaTrimCurveEndAtParam( lua_State* L)
LuaClearStack( L) ;
// taglio la curva alla fine
bool bOk = ExeTrimCurveEndAtParam( nId, dPar) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -222,7 +222,7 @@ LuaTrimCurveStartEndAtParam( lua_State* L)
LuaClearStack( L) ;
// taglio la curva alla fine
bool bOk = ExeTrimCurveStartEndAtParam( nId, dParS, dParE) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -242,7 +242,7 @@ LuaTrimExtendCurveByLen( lua_State* L)
LuaClearStack( L) ;
// taglio o allungo la curva nell'estremo più vicino al punto
bool bOk = ExeTrimExtendCurveByLen( nId, dLen, ptNear, nRefType) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -259,9 +259,9 @@ LuaSplitCurve( lua_State* L)
// divido la curva nel punto
int nFirstId = ExeSplitCurve( nId, nParts) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetReturn( L, nFirstId) ;
LuaSetParam( L, nFirstId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -280,9 +280,9 @@ LuaSplitCurveAtPoint( lua_State* L)
// divido la curva nel punto
int nNewId = ExeSplitCurveAtPoint( nId, ptOn, nRefType) ;
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -298,10 +298,10 @@ LuaSplitCurveAtSelfInters( lua_State* L)
int nCount ;
int nNewId = ExeSplitCurveAtSelfInters( nId, &nCount) ;
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
@@ -320,9 +320,9 @@ LuaApproxCurve( lua_State* L)
// approssimazione della curva con rette
int nNewId = ExeApproxCurve( nId, nApprType, dLinTol) ;
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -338,7 +338,7 @@ LuaModifyCurveArcRadius( lua_State* L)
LuaClearStack( L) ;
// modifica del raggio
bool bOk = ExeModifyCurveArcRadius( nId, dNewRad) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -354,10 +354,10 @@ LuaExplodeCurveCompo( lua_State* L)
int nCount ;
int nFirstId = ExeExplodeCurveCompo( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetReturn( L, nFirstId) ;
LuaSetParam( L, nFirstId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
@@ -373,7 +373,7 @@ LuaMergeCurvesInCurveCompo( lua_State* L)
LuaClearStack( L) ;
// esplosione della curva composita
bool bOk = ExeMergeCurvesInCurveCompo( nId, dLinTol) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+7 -7
View File
@@ -33,7 +33,7 @@ LuaInvertSurf( lua_State* L)
// eseguo inversione superfici
bool bOk = ExeInvertSurface( vId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -54,10 +54,10 @@ LuaExtractSurfTmFacetLoops( lua_State* L)
int nNewId = ExeExtractSurfTmFacetLoops( nId, nFacet, nDestGrpId, &nCount) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
@@ -73,10 +73,10 @@ LuaExplodeSurfTm( lua_State* L)
int nCount ;
int nFirstId = ExeExplodeSurfTm( nId, &nCount) ;
if ( nFirstId != GDB_ID_NULL)
LuaSetReturn( L, nFirstId) ;
LuaSetParam( L, nFirstId) ;
else
LuaSetReturn( L) ;
LuaSetReturn( L, nCount) ;
LuaSetParam( L) ;
LuaSetParam( L, nCount) ;
return 2 ;
}
+43 -43
View File
@@ -33,7 +33,7 @@ LuaSetLevel( lua_State* L)
// imposto lo stato
bool bOk = ExeSetLevel( nId, nLevel) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -48,7 +48,7 @@ LuaRevertLevel( lua_State* L)
// porto il livello al valore precedente
bool bOk = ExeRevertLevel( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -65,9 +65,9 @@ LuaGetLevel( lua_State* L)
bool bOk = ExeGetLevel( nId, &nLevel) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, nLevel) ;
LuaSetParam( L, nLevel) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -84,9 +84,9 @@ LuaGetCalcLevel( lua_State* L)
bool bOk = ExeGetCalcLevel( nId, &nLevel) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, nLevel) ;
LuaSetParam( L, nLevel) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -103,7 +103,7 @@ LuaSetMode( lua_State* L)
// imposto il modo
bool bOk = ExeSetMode( nId, nMode) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -118,7 +118,7 @@ LuaRevertMode( lua_State* L)
// porto il modo al valore precedente
bool bOk = ExeRevertMode( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -134,9 +134,9 @@ LuaGetMode( lua_State* L)
int nMode ;
if ( ExeGetMode( nId, &nMode))
// restituisco il risultato
LuaSetReturn( L, nMode) ;
LuaSetParam( L, nMode) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -152,9 +152,9 @@ LuaGetCalcMode( lua_State* L)
int nMode ;
if ( ExeGetCalcMode( nId, &nMode))
// restituisco il risultato
LuaSetReturn( L, nMode) ;
LuaSetParam( L, nMode) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -171,7 +171,7 @@ LuaSetStatus( lua_State* L)
// imposto lo stato
bool bOk = ExeSetStatus( vId, nStatus) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -186,7 +186,7 @@ LuaRevertStatus( lua_State* L)
// porto lo stato al valore precedente
bool bOk = ExeRevertStatus( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -202,9 +202,9 @@ LuaGetStatus( lua_State* L)
int nStatus ;
if ( ExeGetStatus( nId, &nStatus))
// restituisco il risultato
LuaSetReturn( L, nStatus) ;
LuaSetParam( L, nStatus) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -220,9 +220,9 @@ LuaGetCalcStatus( lua_State* L)
int nStatus ;
if ( ExeGetCalcStatus( nId, &nStatus))
// restituisco il risultato
LuaSetReturn( L, nStatus) ;
LuaSetParam( L, nStatus) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -237,7 +237,7 @@ LuaSetMark( lua_State* L)
// imposto l'evidenziazione
bool bOk = ExeSetMark( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -252,7 +252,7 @@ LuaResetMark( lua_State* L)
// cancello l'evidenziazione
bool bOk = ExeResetMark( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -268,9 +268,9 @@ LuaGetMark( lua_State* L)
BOOL nMark ;
if ( ExeGetMark( nId, &nMark))
// restituisco il risultato
LuaSetReturn( L, ( nMark != GDB_MK_OFF)) ;
LuaSetParam( L, ( nMark != GDB_MK_OFF)) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -286,9 +286,9 @@ LuaGetCalcMark( lua_State* L)
BOOL nMark ;
if ( ExeGetCalcMark( nId, &nMark))
// restituisco il risultato
LuaSetReturn( L, ( nMark != GDB_MK_OFF)) ;
LuaSetParam( L, ( nMark != GDB_MK_OFF)) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -304,10 +304,10 @@ LuaStdColor( lua_State* L)
Color cCol ;
if ( ExeStdColor( sName, cCol)) {
// restituisco il risultato
LuaSetReturn( L, cCol) ;
LuaSetParam( L, cCol) ;
}
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -326,7 +326,7 @@ LuaSetColor( lua_State* L)
// assegno il colore
bool bOk = ExeSetColor( vId, cCol, bSetAlpha) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -343,7 +343,7 @@ LuaSetAlpha( lua_State* L)
// assegno la trasparenza
bool bOk = ExeSetAlpha( vId, nAlpha) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -358,7 +358,7 @@ LuaResetColor( lua_State* L)
// tolgo il colore
bool bOk = ExeResetColor( vId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -374,10 +374,10 @@ LuaGetColor( lua_State* L)
Color cCol ;
if ( ExeGetColor( nId, cCol)) {
// restituisco il risultato
LuaSetReturn( L, cCol) ;
LuaSetParam( L, cCol) ;
}
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -393,10 +393,10 @@ LuaGetCalcColor( lua_State* L)
Color cCol ;
if ( ExeGetCalcColor( nId, cCol)) {
// restituisco il risultato
LuaSetReturn( L, cCol) ;
LuaSetParam( L, cCol) ;
}
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -413,7 +413,7 @@ LuaSetName( lua_State* L)
// assegno il nome
bool bOk = ExeSetName( nId, sName) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -430,9 +430,9 @@ LuaGetName( lua_State* L)
bool bOk = ExeGetName( nId, sName) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, sName) ;
LuaSetParam( L, sName) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -447,7 +447,7 @@ LuaExistsName( lua_State* L)
// verifico esistenza nome
bool bOk = ExeExistsName( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -462,7 +462,7 @@ LuaRemoveName( lua_State* L)
// verifico esistenza nome
bool bOk = ExeRemoveName( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -481,7 +481,7 @@ LuaSetInfo( lua_State* L)
// assegno la info
bool bOk = ExeSetInfo( nId, sKey, sInfo) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -500,9 +500,9 @@ LuaGetInfo( lua_State* L)
bool bOk = ExeGetInfo( nId, sKey, sInfo) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, sInfo) ;
LuaSetParam( L, sInfo) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -519,7 +519,7 @@ LuaExistsInfo( lua_State* L)
// verifico esistenza info
bool bOk = ExeExistsInfo( nId, sKey) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -536,7 +536,7 @@ LuaRemoveInfo( lua_State* L)
// rimuovo info
bool bOk = ExeRemoveInfo( nId, sKey) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+16 -16
View File
@@ -31,7 +31,7 @@ LuaSelectObj( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectObj( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -46,7 +46,7 @@ LuaDeselectObj( lua_State* L)
// eseguo la selezione
bool bOk = ExeDeselectObj( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -61,7 +61,7 @@ LuaSelectAll( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectAll( bOnlyIfVisible) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -74,7 +74,7 @@ LuaDeselectAll( lua_State* L)
// eseguo la selezione
bool bOk = ExeDeselectAll() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -89,7 +89,7 @@ LuaSelectGroupObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectGroupObjs( GroupId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -104,7 +104,7 @@ LuaDeselectGroupObjs( lua_State* L)
// eseguo la deselezione
bool bOk = ExeDeselectGroupObjs( GroupId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -119,7 +119,7 @@ LuaIsSelectedObj( lua_State* L)
// eseguo la selezione
bool bOk = ExeIsSelectedObj( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -132,7 +132,7 @@ LuaGetSelectedObjNbr( lua_State* L)
// eseguo la selezione
int nNbr = ExeGetSelectedObjNbr() ;
// restituisco il risultato
LuaSetReturn( L, nNbr) ;
LuaSetParam( L, nNbr) ;
return 1 ;
}
@@ -146,9 +146,9 @@ LuaGetFirstSelectedObj( lua_State* L)
int nId = ExeGetFirstSelectedObj() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -162,9 +162,9 @@ LuaGetNextSelectedObj( lua_State* L)
int nId = ExeGetNextSelectedObj() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -178,9 +178,9 @@ LuaGetLastSelectedObj( lua_State* L)
int nId = ExeGetLastSelectedObj() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -194,9 +194,9 @@ LuaGetPrevSelectedObj( lua_State* L)
int nId = ExeGetPrevSelectedObj() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
+44 -44
View File
@@ -32,7 +32,7 @@ LuaExistsObj( lua_State* L)
// verifico esistenza oggetto
bool bOk = ExeExistsObj( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -47,7 +47,7 @@ LuaGetType( lua_State* L)
// recupero tipo dell'oggetto
int nType = ExeGetType( nId) ;
// restituisco il risultato
LuaSetReturn( L, nType) ;
LuaSetParam( L, nType) ;
return 1 ;
}
@@ -62,7 +62,7 @@ LuaGetGroupObjs( lua_State* L)
// determino il numero di oggetti nel gruppo
int nObjs = ExeGetGroupObjs( nGroupId) ;
// restituisco il risultato
LuaSetReturn( L, nObjs) ;
LuaSetParam( L, nObjs) ;
return 1 ;
}
@@ -78,9 +78,9 @@ LuaGetFirstInGroup( lua_State* L)
int nId = ExeGetFirstInGroup( nGroupId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -96,9 +96,9 @@ LuaGetNext( lua_State* L)
int nNextId = ExeGetNext( nId) ;
// restituisco il risultato
if ( nNextId != GDB_ID_NULL)
LuaSetReturn( L, nNextId) ;
LuaSetParam( L, nNextId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -114,9 +114,9 @@ LuaGetLastInGroup( lua_State* L)
int nId = ExeGetLastInGroup( nGroupId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -132,9 +132,9 @@ LuaGetPrev( lua_State* L)
int nPrevId = ExeGetPrev( nId) ;
// restituisco il risultato
if ( nPrevId != GDB_ID_NULL)
LuaSetReturn( L, nPrevId) ;
LuaSetParam( L, nPrevId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -152,9 +152,9 @@ LuaGetFirstNameInGroup( lua_State* L)
int nId = ExeGetFirstNameInGroup( nGroupId, sName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -172,9 +172,9 @@ LuaGetNextName( lua_State* L)
int nNextId = ExeGetNextName( nId, sName) ;
// restituisco il risultato
if ( nNextId != GDB_ID_NULL)
LuaSetReturn( L, nNextId) ;
LuaSetParam( L, nNextId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -192,9 +192,9 @@ LuaGetLastNameInGroup( lua_State* L)
int nId = ExeGetLastNameInGroup( nGroupId, sName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -212,9 +212,9 @@ LuaGetPrevName( lua_State* L)
int nPrevId = ExeGetPrevName( nId, sName) ;
// restituisco il risultato
if ( nPrevId != GDB_ID_NULL)
LuaSetReturn( L, nPrevId) ;
LuaSetParam( L, nPrevId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -230,9 +230,9 @@ LuaGetFirstGroupInGroup( lua_State* L)
int nId = ExeGetFirstGroupInGroup( nGroupId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -248,9 +248,9 @@ LuaGetNextGroup( lua_State* L)
int nNewId = ExeGetNextGroup( nId) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -266,9 +266,9 @@ LuaGetLastGroupInGroup( lua_State* L)
int nId = ExeGetLastGroupInGroup( nGroupId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -284,9 +284,9 @@ LuaGetPrevGroup( lua_State* L)
int nNewId = ExeGetPrevGroup( nId) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -305,9 +305,9 @@ LuaGetBBox( lua_State* L)
bool bOk = ExeGetBBox( nId, nFlag, b3Box) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, b3Box) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -326,9 +326,9 @@ LuaGetBBoxGlob( lua_State* L)
bool bOk = ExeGetBBoxGlob( nId, nFlag, b3Box) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, b3Box) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -349,9 +349,9 @@ LuaGetBBoxRef( lua_State* L)
bool bOk = ExeGetBBoxRef( nId, nFlag, frRef, b3Box) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, b3Box) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -371,9 +371,9 @@ LuaCopy( lua_State* L)
int nNewId = ExeCopy( nSouId, nRefId, nSonBeforeAfter) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -393,9 +393,9 @@ LuaCopyGlob( lua_State* L)
int nNewId = ExeCopyGlob( nSouId, nRefId, nSonBeforeAfter) ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -414,7 +414,7 @@ LuaRelocate( lua_State* L)
// eseguo la rilocazione
bool bOk = ( ExeRelocate( nSouId, nRefId, nSonBeforeAfter) != FALSE) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -433,7 +433,7 @@ LuaRelocateGlob( lua_State* L)
// eseguo la rilocazione
bool bOk = ExeRelocateGlob( nSouId, nRefId, nSonBeforeAfter) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -447,9 +447,9 @@ LuaGetNewId( lua_State* L)
int nNewId = ExeGetNewId() ;
// restituisco il risultato
if ( nNewId != GDB_ID_NULL)
LuaSetReturn( L, nNewId) ;
LuaSetParam( L, nNewId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -466,7 +466,7 @@ LuaChangeId( lua_State* L)
// eseguo il cambio di identificativo
bool bOk = ExeChangeId( nId, nNewId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -481,7 +481,7 @@ LuaErase( lua_State* L)
// eseguo la cancellazione
bool bOk = ExeErase( vId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -496,7 +496,7 @@ LuaEmptyGroup( lua_State* L)
// eseguo la cancellazione
bool bOk = ExeEmptyGroup( nId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+20 -20
View File
@@ -31,7 +31,7 @@ LuaIsPart( lua_State* L)
// verifico sia un pezzo
bool bOk = ExeIsPart( nIdPart) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -46,7 +46,7 @@ LuaIsLayer( lua_State* L)
// verifico sia un layer
bool bOk = ExeIsLayer( nIdLayer) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -59,7 +59,7 @@ LuaGetCurrPart( lua_State* L)
// recupero il pezzo corrente
int nId = ExeGetCurrPart() ;
// restituisco il risultato
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
return 1 ;
}
@@ -72,7 +72,7 @@ LuaGetCurrLayer( lua_State* L)
// recupero il layer corrente
int nId = ExeGetCurrLayer() ;
// restituisco il risultato
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
return 1 ;
}
@@ -89,7 +89,7 @@ LuaSetCurrPartLayer( lua_State* L)
// imposto pezzo e layer correnti
bool bOk = ExeSetCurrPartLayer( nPartId, nLayerId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -102,7 +102,7 @@ LuaResetCurrPartLayer( lua_State* L)
// cerco primo pezzo e layer validi per essere dichiarati correnti
bool bOk = ExeResetCurrPartLayer() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -117,7 +117,7 @@ LuaGetPartNbr( lua_State* L)
// recupero numero pezzi
int nNbr = ExeGetPartNbr( bOnlyVisible) ;
// restituisco il risultato
LuaSetReturn( L, nNbr) ;
LuaSetParam( L, nNbr) ;
return 1 ;
}
@@ -133,9 +133,9 @@ LuaGetFirstPart( lua_State* L)
int nId = ExeGetFirstPart( bOnlyVisible) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -153,9 +153,9 @@ LuaGetNextPart( lua_State* L)
int nId = ExeGetNextPart( nPartId, bOnlyVisible) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -173,9 +173,9 @@ LuaGetFirstLayer( lua_State* L)
int nId = ExeGetFirstLayer( nPartId, bOnlyVisible) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -193,9 +193,9 @@ LuaGetNextLayer( lua_State* L)
int nId = ExeGetNextLayer( nLayerId, bOnlyVisible) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -210,7 +210,7 @@ LuaSelectPartObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectPartObjs( nPartId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -225,7 +225,7 @@ LuaDeselectPartObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeDeselectPartObjs( nPartId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -240,7 +240,7 @@ LuaSelectLayerObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectLayerObjs( nLayerId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -255,7 +255,7 @@ LuaDeselectLayerObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeDeselectLayerObjs( nLayerId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -272,7 +272,7 @@ LuaSelectPathObjs( lua_State* L)
// eseguo la selezione
bool bOk = ExeSelectPathObjs( nId, bHaltOnFork) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+13 -13
View File
@@ -66,7 +66,7 @@ SetContext( lua_State* L)
// imposto il contesto
bool bOk = SetCurrGseContext( nGseCtx) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -77,7 +77,7 @@ GetContext( lua_State* L)
// nessun parametro
LuaClearStack( L) ;
// restituisco l'indice del contesto
LuaSetReturn( L, GetIndCurrGseContext()) ;
LuaSetParam( L, GetIndCurrGseContext()) ;
return 1 ;
}
@@ -98,7 +98,7 @@ LuaPause( lua_State* L)
nTime = MAX_TIME ;
Sleep( nTime) ;
// restituisco il risultato
LuaSetReturn( L, true) ;
LuaSetParam( L, true) ;
return 1 ;
}
@@ -122,7 +122,7 @@ LuaStopCounter( lua_State* L)
// fermo il contatore
double dTime = s_Counter.Stop() ;
// restituisco il risultato
LuaSetReturn( L, dTime) ;
LuaSetParam( L, dTime) ;
return 1 ;
}
@@ -139,7 +139,7 @@ LuaNumToString( lua_State* L)
// costruisco la stringa
string sVal = ToString( dVal, nDec) ;
// ritorno il risultato
LuaSetReturn( L, sVal) ;
LuaSetParam( L, sVal) ;
return 1 ;
}
@@ -154,7 +154,7 @@ LuaExecTsc( lua_State* L)
// eseguo lo script TSC
bool bOk = ExeTscExecFile( sFile) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -196,7 +196,7 @@ LuaOutBox( lua_State* L)
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)) ;
LuaSetParam( L, ( nRes == IDOK)) ;
return 1 ;
}
@@ -211,7 +211,7 @@ LuaEraseFile( lua_State* L)
// svuoto il direttorio
bool bOk = EraseFile( sFile) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -226,7 +226,7 @@ LuaEmptyDirectory( lua_State* L)
// svuoto il direttorio
bool bOk = EmptyDirectory( sDir) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -246,7 +246,7 @@ LuaTextFileCompare( lua_State* L)
LuaClearStack( L) ;
// eseguo il confronto
bool bOk = TextFileCompare( sFile1, sFile2, sRemStart, sFileDiff) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -264,7 +264,7 @@ LuaBinaryFileCompare( lua_State* L)
LuaClearStack( L) ;
// eseguo il confronto
bool bOk = BinaryFileCompare( sFile1, sFile2, sFileDiff) ;
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -279,7 +279,7 @@ LuaGetVersion( lua_State* L)
if ( ! ExeGetVersionInfo( sVer, "\n"))
sVer = "VersionInfo error" ;
// restituisco il risultato
LuaSetReturn( L, sVer) ;
LuaSetParam( L, sVer) ;
return 1 ;
}
@@ -295,7 +295,7 @@ LuaIs64bit( lua_State* L)
#elif defined( _WIN32)
bool bRes = false ;
#endif
LuaSetReturn( L, bRes) ;
LuaSetParam( L, bRes) ;
return 1 ;
}
+54 -54
View File
@@ -32,12 +32,12 @@ LuaVectorRotate( lua_State* L)
LuaClearStack( L) ;
// eseguo la rotazione
if ( vtV.Rotate( vtAx, dAngRotDeg)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, vtV) ;
LuaSetParam( L, true) ;
LuaSetParam( L, vtV) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -54,12 +54,12 @@ LuaVectorToGlob( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( vtV.ToGlob( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, vtV) ;
LuaSetParam( L, true) ;
LuaSetParam( L, vtV) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -76,12 +76,12 @@ LuaVectorToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( vtV.ToLoc( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, vtV) ;
LuaSetParam( L, true) ;
LuaSetParam( L, vtV) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -100,12 +100,12 @@ LuaVectorLocToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( vtV.LocToLoc( frOri, frDest)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, vtV) ;
LuaSetParam( L, true) ;
LuaSetParam( L, vtV) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -126,12 +126,12 @@ LuaPointRotate( lua_State* L)
LuaClearStack( L) ;
// eseguo la rotazione
if ( ptP.Rotate( ptAx, vtAx, dAngRotDeg)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, ptP) ;
LuaSetParam( L, true) ;
LuaSetParam( L, ptP) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -148,12 +148,12 @@ LuaPointToGlob( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( ptP.ToGlob( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, ptP) ;
LuaSetParam( L, true) ;
LuaSetParam( L, ptP) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -170,12 +170,12 @@ LuaPointToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( ptP.ToLoc( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, ptP) ;
LuaSetParam( L, true) ;
LuaSetParam( L, ptP) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -194,12 +194,12 @@ LuaPointLocToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( ptP.LocToLoc( frOri, frDest)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, ptP) ;
LuaSetParam( L, true) ;
LuaSetParam( L, ptP) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -219,12 +219,12 @@ LuaFrameFrom3Points( lua_State* L)
// calcolo il riferimento e restituisco il risultato : bOk, Frame
Frame3d frTemp ;
if ( frTemp.Set( ptOrig, ptOnX, ptNearY)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frTemp) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frTemp) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -242,12 +242,12 @@ LuaFrameOCS( lua_State* L)
// calcolo il riferimento e restituisco il risultato : bOk, Frame
Frame3d frTemp ;
if ( frTemp.Set( ptOrig, vtDirZ)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frTemp) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frTemp) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -268,12 +268,12 @@ LuaFrameRotate( lua_State* L)
LuaClearStack( L) ;
// eseguo la rotazione
if ( frFrame.Rotate( ptAx, vtAx, dAngRotDeg)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frFrame) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -290,12 +290,12 @@ LuaFrameToGlob( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( frFrame.ToGlob( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frFrame) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -312,12 +312,12 @@ LuaFrameToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( frFrame.ToLoc( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frFrame) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -336,12 +336,12 @@ LuaFrameLocToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( frFrame.LocToLoc( frOri, frDest)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, true) ;
LuaSetParam( L, frFrame) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -362,12 +362,12 @@ LuaBBoxRotate( lua_State* L)
LuaClearStack( L) ;
// eseguo la rotazione
if ( b3Box.Rotate( ptAx, vtAx, dAngRotDeg)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, true) ;
LuaSetParam( L, b3Box) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -384,12 +384,12 @@ LuaBBoxToGlob( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( b3Box.ToGlob( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, true) ;
LuaSetParam( L, b3Box) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -406,12 +406,12 @@ LuaBBoxToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( b3Box.ToLoc( frTool)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, true) ;
LuaSetParam( L, b3Box) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
@@ -430,12 +430,12 @@ LuaBBoxLocToLoc( lua_State* L)
LuaClearStack( L) ;
// eseguo la trasformazione
if ( b3Box.LocToLoc( frOri, frDest)) {
LuaSetReturn( L, true) ;
LuaSetReturn( L, b3Box) ;
LuaSetParam( L, true) ;
LuaSetParam( L, b3Box) ;
return 2 ;
}
else {
LuaSetReturn( L, false) ;
LuaSetParam( L, false) ;
return 1 ;
}
}
+61 -61
View File
@@ -33,9 +33,9 @@ LuaStartPoint( lua_State* L)
// recupero il punto iniziale dell'entità
Point3d ptP ;
if ( ExeStartPoint( nId, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -52,9 +52,9 @@ LuaEndPoint( lua_State* L)
// recupero il punto finale dell'entità
Point3d ptP ;
if ( ExeEndPoint( nId, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -71,9 +71,9 @@ LuaMidPoint( lua_State* L)
// recupero il punto centrale dell'entità
Point3d ptP ;
if ( ExeMidPoint( nId, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -90,9 +90,9 @@ LuaCenterPoint( lua_State* L)
// recupero il punto centrale dell'entità
Point3d ptP ;
if ( ExeCenterPoint( nId, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -109,9 +109,9 @@ LuaCentroid( lua_State* L)
// recupero il centro geometrico dell'entità
Point3d ptP ;
if ( ExeCentroid( nId, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -130,9 +130,9 @@ LuaAtParamPoint( lua_State* L)
// recupero il punto in posizione parametrica U della curva
Point3d ptP ;
if ( ExeAtParamPoint( nId, dU, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -151,9 +151,9 @@ LuaNearPoint( lua_State* L)
// recupero il punto di intersezione tra le curve più vicino al punto passato
Point3d ptP ;
if ( ExeNearPoint( nId, ptNear, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -174,9 +174,9 @@ LuaIntersectionPoint( lua_State* L)
// recupero il punto di intersezione tra le curve più vicino al punto passato
Point3d ptP ;
if ( ExeIntersectionPoint( nId1, nId2, ptNear, nRefId, ptP))
LuaSetReturn( L, ptP) ;
LuaSetParam( L, ptP) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -193,9 +193,9 @@ LuaStartVector( lua_State* L)
// recupero il vettore tangente all'inizio della curva
Vector3d vtV ;
if ( ExeStartVector( nId, nRefId, vtV))
LuaSetReturn( L, vtV) ;
LuaSetParam( L, vtV) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -212,9 +212,9 @@ LuaEndVector( lua_State* L)
// recupero il vettore tangente alla fine della curva
Vector3d vtV ;
if ( ExeEndVector( nId, nRefId, vtV))
LuaSetReturn( L, vtV) ;
LuaSetParam( L, vtV) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -231,9 +231,9 @@ LuaMidVector( lua_State* L)
// recupero il vettore tangente nel punto medio della curva
Vector3d vtV ;
if ( ExeMidVector( nId, nRefId, vtV))
LuaSetReturn( L, vtV) ;
LuaSetParam( L, vtV) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -254,9 +254,9 @@ LuaAtParamVector( lua_State* L)
// recupero il punto in posizione parametrica U della curva
Vector3d vtV ;
if ( ExeAtParamVector( nId, dU, nSide, nRefId, vtV))
LuaSetReturn( L, vtV) ;
LuaSetParam( L, vtV) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -273,9 +273,9 @@ LuaFrame( lua_State* L)
// recupero il frame
Frame3d frFrame ;
if ( ExeFrame( nId, nRefId, frFrame))
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, frFrame) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -290,12 +290,12 @@ LuaCurveDomain( lua_State* L)
// recupero il dominio della curva
double dStart, dEnd ;
if ( ExeCurveDomain( nId, &dStart, &dEnd)) {
LuaSetReturn( L, dStart) ;
LuaSetReturn( L, dEnd) ;
LuaSetParam( L, dStart) ;
LuaSetParam( L, dEnd) ;
return 2 ;
}
else {
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
}
@@ -311,9 +311,9 @@ LuaCurveLength( lua_State* L)
// recupero la lunghezza della curva
double dLen ;
if ( ExeCurveLength( nId, &dLen))
LuaSetReturn( L, dLen) ;
LuaSetParam( L, dLen) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -330,9 +330,9 @@ LuaCurveExtrusion( lua_State* L)
// recupero il versore
Vector3d vtExtr ;
if ( ExeCurveExtrusion( nId, nRefId, vtExtr))
LuaSetReturn( L, vtExtr) ;
LuaSetParam( L, vtExtr) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -347,9 +347,9 @@ LuaCurveThickness( lua_State* L)
// recupero lo spessore
double dThick ;
if ( ExeCurveThickness( nId, &dThick))
LuaSetReturn( L, dThick) ;
LuaSetParam( L, dThick) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -371,7 +371,7 @@ LuaExtrusionByThickness( lua_State* L)
vtExtr *= dThick ;
else
vtExtr = V_NULL ;
LuaSetReturn( L, vtExtr) ;
LuaSetParam( L, vtExtr) ;
return 1 ;
}
@@ -386,9 +386,9 @@ LuaCurveSelfIntersNbr( lua_State* L)
// recupero il numero di auto-intersezioni
int nCount ;
if ( ExeCurveSelfIntersNbr( nId, &nCount))
LuaSetReturn( L, nCount) ;
LuaSetParam( L, nCount) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -403,9 +403,9 @@ LuaCurveArcRadius( lua_State* L)
// recupero il raggio
double dRad ;
if ( ExeCurveArcRadius( nId, &dRad))
LuaSetReturn( L, dRad) ;
LuaSetParam( L, dRad) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -422,9 +422,9 @@ LuaCurveArcNormVersor( lua_State* L)
// recupero il versore
Vector3d vtNorm ;
if ( ExeCurveArcNormVersor( nId, nRefId, vtNorm))
LuaSetReturn( L, vtNorm) ;
LuaSetParam( L, vtNorm) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -443,9 +443,9 @@ LuaCurveCompoCenter( lua_State* L)
// recupero il centro della curva semplice indicizzata
Point3d ptCen ;
if ( ExeCurveCompoCenter( nId, nCrv, nRefId, ptCen))
LuaSetReturn( L, ptCen) ;
LuaSetParam( L, ptCen) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -459,7 +459,7 @@ LuaSurfTmFacetNbr( lua_State* L)
LuaClearStack( L) ;
// recupero il numero di facce della superficie trimesh
int nNbr = ExeSurfTmFacetNbr( nId) ;
LuaSetReturn( L, nNbr) ;
LuaSetParam( L, nNbr) ;
return 1 ;
}
@@ -481,12 +481,12 @@ LuaSurfTmFacetNearestEndPoint( lua_State* L)
Point3d ptEnd ;
Vector3d vtN ;
if ( ExeSurfTmFacetNearestEndPoint( nId, nFacet, ptNear, nRefId, ptEnd, vtN)) {
LuaSetReturn( L, ptEnd) ;
LuaSetReturn( L, vtN) ;
LuaSetParam( L, ptEnd) ;
LuaSetParam( L, vtN) ;
}
else {
LuaSetReturn( L) ;
LuaSetReturn( L) ;
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
@@ -509,12 +509,12 @@ LuaSurfTmFacetNearestMidPoint( lua_State* L)
Point3d ptMid ;
Vector3d vtN ;
if ( ExeSurfTmFacetNearestMidPoint( nId, nFacet, ptNear, nRefId, ptMid, vtN)) {
LuaSetReturn( L, ptMid) ;
LuaSetReturn( L, vtN) ;
LuaSetParam( L, ptMid) ;
LuaSetParam( L, vtN) ;
}
else {
LuaSetReturn( L) ;
LuaSetReturn( L) ;
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
@@ -535,12 +535,12 @@ LuaSurfTmFacetCenter( lua_State* L)
Point3d ptCen ;
Vector3d vtN ;
if ( ExeSurfTmFacetCenter( nId, nFacet, nRefId, ptCen, vtN)) {
LuaSetReturn( L, ptCen) ;
LuaSetReturn( L, vtN) ;
LuaSetParam( L, ptCen) ;
LuaSetParam( L, vtN) ;
}
else {
LuaSetReturn( L) ;
LuaSetReturn( L) ;
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
@@ -560,9 +560,9 @@ LuaSurfTmFacetNormVersor( lua_State* L)
// recupero la normale della faccia della superficie trimesh
Vector3d vtNorm ;
if ( ExeSurfTmFacetNormVersor( nId, nFacet, nRefId, vtNorm))
LuaSetReturn( L, vtNorm) ;
LuaSetParam( L, vtNorm) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -579,9 +579,9 @@ LuaExtTextNormVersor( lua_State* L)
// recupero il versore
Vector3d vtNorm ;
if ( ExeExtTextNormVersor( nId, nRefId, vtNorm))
LuaSetReturn( L, vtNorm) ;
LuaSetParam( L, vtNorm) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
+10 -10
View File
@@ -35,7 +35,7 @@ LuaMove( lua_State* L)
// eseguo traslazione
bool bOk = ExeMove( vId, vtMove, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -58,7 +58,7 @@ LuaRotate( lua_State* L)
// eseguo rotazione
bool bOk = ExeRotate( vId, ptAx, vtAx, dAngRotDeg, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -83,7 +83,7 @@ LuaScale( lua_State* L)
// eseguo scalatura
bool bOk = ExeScale( vId, frRef, dCoeffX, dCoeffY, dCoeffZ, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -104,7 +104,7 @@ LuaMirror( lua_State* L)
// eseguo riflessione
bool bOk = ExeMirror( vId, ptOn, vtN, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -129,7 +129,7 @@ LuaShear( lua_State* L)
// eseguo stiramento
bool bOk = ExeShear( vId, ptOn, vtN, vtDir, dCoeff, nRefType) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -146,7 +146,7 @@ LuaMoveGroup( lua_State* L)
// eseguo traslazione
bool bOk = ExeMoveGroup( nId, vtMove) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -167,7 +167,7 @@ LuaRotateGroup( lua_State* L)
// eseguo rotazione
bool bOk = ExeRotateGroup( nId, ptAx, vtAx, dAngRotDeg) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -190,7 +190,7 @@ LuaScaleGroup( lua_State* L)
// eseguo scalatura
bool bOk = ExeScaleGroup( nId, frRef, dCoeffX, dCoeffY, dCoeffZ) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -209,7 +209,7 @@ LuaMirrorGroup( lua_State* L)
// eseguo scalatura
bool bOk = ExeMirrorGroup( sId, ptOn, vtN) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -232,7 +232,7 @@ LuaShearGroup( lua_State* L)
// eseguo scalatura
bool bOk = ExeShearGroup( nId, ptOn, vtN, vtDir, dCoeff) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+10 -10
View File
@@ -35,7 +35,7 @@ LuaSetDefaultMaterial( lua_State* L)
colDef.GetInt( vCol) ;
bool bOk = ( ExeSetDefaultMaterial( vCol) != FALSE) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -51,7 +51,7 @@ LuaSetGridFrame( lua_State* L)
// imposto il riferimento della Griglia (o CPlane)
bool bOk = ( ExeSetGridFrame( frFrame)) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -68,7 +68,7 @@ LuaGetGridFrame( lua_State* L)
Frame3d frFrame ;
ExeGetGridFrame( nRefId, frFrame) ;
// restituisco il risultato
LuaSetReturn( L, frFrame) ;
LuaSetParam( L, frFrame) ;
return 1 ;
}
@@ -84,9 +84,9 @@ LuaGetGridVersZ( lua_State* L)
// recupero il versore Z della griglia e lo restituisco
Vector3d vtVersZ ;
if ( ExeGetGridVersZ( nRefId, vtVersZ))
LuaSetReturn( L, vtVersZ) ;
LuaSetParam( L, vtVersZ) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -99,7 +99,7 @@ LuaNewFile( lua_State* L)
// nuovo progetto
bool bOk = ExeNewFile() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -114,7 +114,7 @@ LuaOpenFile( lua_State* L)
// apro il file
bool bOk = ExeOpenFile( sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -129,7 +129,7 @@ LuaInsertFile( lua_State* L)
// apro il file
bool bOk = ExeInsertFile( sFilePath) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -146,7 +146,7 @@ LuaSaveFile( lua_State* L)
// salvo il file
bool bOk = ExeSaveFile( sFilePath, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -165,7 +165,7 @@ LuaSaveObjToFile( lua_State* L)
// copio il gruppo nel file
bool bOk = ExeSaveObjToFile( nId, sFilePath, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+74 -74
View File
@@ -30,7 +30,7 @@ LuaGetMachGroupNbr( lua_State* L)
// recupero il numero di macchinate
int nTot = ExeGetMachGroupNbr() ;
// restituisco il risultato
LuaSetReturn( L, nTot) ;
LuaSetParam( L, nTot) ;
return 1 ;
}
@@ -44,9 +44,9 @@ LuaGetFirstMachGroup( lua_State* L)
int nId = ExeGetFirstMachGroup() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -62,9 +62,9 @@ LuaGetNextMachGroup( lua_State* L)
int nNextId = ExeGetNextMachGroup( nId) ;
// restituisco il risultato
if ( nNextId != GDB_ID_NULL)
LuaSetReturn( L, nNextId) ;
LuaSetParam( L, nNextId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -82,9 +82,9 @@ LuaAddMachGroup( lua_State* L)
int nId = ExeAddMachGroup( sName, sMachineName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -99,7 +99,7 @@ LuaRemoveMachGroup( lua_State* L)
// rimuovo la macchinata
bool bOk = ExeRemoveMachGroup( nMGroupInd) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -116,9 +116,9 @@ LuaGetMachGroupName( lua_State* L)
bool bOk = ExeGetMachGroupName( nMGroupInd, sName) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, sName) ;
LuaSetParam( L, sName) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -134,9 +134,9 @@ LuaGetMachGroupId( lua_State* L)
int nId = ExeGetMachGroupId( sGroupName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -151,7 +151,7 @@ LuaSetCurrMachGroup( lua_State* L)
// imposto il gruppo corrente
bool bOk = ExeSetCurrMachGroup( nMGroupInd) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -164,7 +164,7 @@ LuaResetCurrMachGroup( lua_State* L)
// imposto il gruppo corrente
bool bOk = ExeResetCurrMachGroup() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -178,9 +178,9 @@ LuaGetCurrMachGroup( lua_State* L)
int nId = ExeGetCurrMachGroup() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -193,7 +193,7 @@ LuaGetRawPartNbr( lua_State* L)
// recupero il numero di grezzi nella macchinata corrente
int nCount = ExeGetRawPartNbr() ;
// restituisco il risultato
LuaSetReturn( L, nCount) ;
LuaSetParam( L, nCount) ;
return 1 ;
}
@@ -207,9 +207,9 @@ LuaGetFirstRawPart( lua_State* L)
int nId = ExeGetFirstRawPart() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -225,9 +225,9 @@ LuaGetNextRawPart( lua_State* L)
int nId = ExeGetNextRawPart( nRawId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
@@ -250,9 +250,9 @@ LuaAddRawPart( lua_State* L)
int nInd = ExeAddRawPart( ptOrig, dWidth, dLength, dHeight, cCol) ;
// restituisco il risultato
if ( nInd != GDB_ID_NULL)
LuaSetReturn( L, nInd) ;
LuaSetParam( L, nInd) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -274,9 +274,9 @@ LuaAddRawPartWithPart( lua_State* L)
int nInd = ExeAddRawPartWithPart( nPartId, nCrvId, dOverMat, cCol) ;
// restituisco il risultato
if ( nInd != GDB_ID_NULL)
LuaSetReturn( L, nInd) ;
LuaSetParam( L, nInd) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -293,7 +293,7 @@ LuaModifyRawPartHeight( lua_State* L)
// modifico lo spessore del grezzo
bool bOk = ExeModifyRawPartHeight( nRawId, dHeight) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -308,7 +308,7 @@ LuaRemoveRawPart( lua_State* L)
// elimino il grezzo dalla macchinata corrente
bool bOk = ExeRemoveRawPart( nRawId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -325,7 +325,7 @@ LuaMoveRawPart( lua_State* L)
// traslo il grezzo
bool bOk = ExeMoveRawPart( nRawId, vtMove) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -344,7 +344,7 @@ LuaRotateRawPart( lua_State* L)
// ruoto il grezzo
bool bOk = ExeRotateRawPart( nRawId, vtAx, dAngRotDeg) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -363,7 +363,7 @@ LuaMoveToCornerRawPart( lua_State* L)
// sposto il grezzo nel corner
bool bOk = ExeMoveToCornerRawPart( nRawId, ptCorner, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -382,7 +382,7 @@ LuaMoveToCenterRawPart( lua_State* L)
// sposto il grezzo nel corner
bool bOk = ExeMoveToCenterRawPart( nRawId, ptCenter, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -397,7 +397,7 @@ LuaGetPartInRawPartNbr( lua_State* L)
// recupero il numero di pezzi nel grezzo
int nCount = ExeGetPartInRawPartNbr( nRawId) ;
// restituisco il risultato
LuaSetReturn( L, nCount) ;
LuaSetParam( L, nCount) ;
return 1 ;
}
@@ -413,9 +413,9 @@ LuaGetFirstPartInRawPart( lua_State* L)
int nId = ExeGetFirstPartInRawPart( nRawId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -431,9 +431,9 @@ LuaGetNextPartInRawPart( lua_State* L)
int nId = ExeGetNextPartInRawPart( nPartId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -452,7 +452,7 @@ LuaAddPartToRawPart( lua_State* L)
// inserisco il grezzo nella macchinata corrente
bool bOk = ExeAddPartToRawPart( nPartId, ptPos, nRawId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -467,7 +467,7 @@ LuaRemovePartFromRawPart( lua_State* L)
// elimino il grezzo dalla macchinata corrente
bool bOk = ExeRemovePartFromRawPart( nPartId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -484,7 +484,7 @@ LuaTranslatePartInRawPart( lua_State* L)
// traslo il pezzo nel grezzo
bool bOk = ExeTranslatePartInRawPart( nPartId, vtMove) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -503,7 +503,7 @@ LuaRotatePartInRawPart( lua_State* L)
// ruoto il pezzo nel grezzo
bool bOk = ExeRotatePartInRawPart( nPartId, vtAx, dAngRotDeg) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -518,7 +518,7 @@ LuaSetTable( lua_State* L)
// imposto la tavola corrente
bool bOk = ExeSetTable( sTable) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -538,9 +538,9 @@ LuaAddSubPiece( lua_State* L)
int nId = ExeAddSubPiece( sName, ptPos, dAngRotDeg) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -557,7 +557,7 @@ LuaSetAxisPos( lua_State* L)
// metto l'asse nella nuova posizione
bool bOk = ExeSetAxisPos( sAxis, dVal) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -574,9 +574,9 @@ LuaGetAxisPos( lua_State* L)
bool bOk = ExeGetAxisPos( sAxis, &dVal) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, dVal) ;
LuaSetParam( L, dVal) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -593,9 +593,9 @@ LuaGetAxisHomePos( lua_State* L)
bool bOk = ExeGetAxisHomePos( sAxis, &dHomeVal) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, dHomeVal) ;
LuaSetParam( L, dHomeVal) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -610,7 +610,7 @@ LuaResetAxisPos( lua_State* L)
// metto l'asse nella posizione home
bool bOk = ExeResetAxisPos( sAxis) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -629,7 +629,7 @@ LuaLoadTool( lua_State* L)
// carico l'utensile
bool bOk = ExeLoadTool( sHead, nExit, sTool) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -644,7 +644,7 @@ LuaResetHeadSet( lua_State* L)
// carico l'utensile
bool bOk = ExeResetHeadSet( sHead) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -659,7 +659,7 @@ LuaSetCalcTable( lua_State* L)
// imposto la tavola corrente per i calcoli macchina
bool bOk = ExeSetCalcTable( sTable) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -678,7 +678,7 @@ LuaSetCalcTool( lua_State* L)
// imposto la tavola corrente per il calcolo
bool bOk = ExeSetCalcTool( sTool, sHead, nExit) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -697,16 +697,16 @@ LuaGetCalcAngles( lua_State* L)
bool bOk = ExeGetCalcAngles( vtDirT, vtDirA, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetReturn( L, dAngA1) ;
LuaSetReturn( L, dAngB1) ;
LuaSetReturn( L, dAngA2) ;
LuaSetReturn( L, dAngB2) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
LuaSetParam( L, dAngA1) ;
LuaSetParam( L, dAngB1) ;
LuaSetParam( L, dAngA2) ;
LuaSetParam( L, dAngB2) ;
return 6 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -728,15 +728,15 @@ LuaGetCalcPositions( lua_State* L)
bool bOk = ExeGetCalcPositions( ptP, dAngA, dAngB, nStat, dX, dY, dZ) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetReturn( L, dX) ;
LuaSetReturn( L, dY) ;
LuaSetReturn( L, dZ) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
LuaSetParam( L, dX) ;
LuaSetParam( L, dY) ;
LuaSetParam( L, dZ) ;
return 5 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -762,12 +762,12 @@ LuaVerifyOutOfStroke( lua_State* L)
bool bOk = ExeVerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
return 2 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -786,9 +786,9 @@ LuaAddMachining( lua_State* L)
int nId = ExeAddMachining( sName, sMachining) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -826,7 +826,7 @@ LuaSetMachiningParam( lua_State* L)
}
LuaClearStack( L) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -841,7 +841,7 @@ LuaSetMachiningGeometry( lua_State* L)
// imposto la geometria alla lavorazione corrente
bool bOk = ExeSetMachiningGeometry( vSel) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -854,7 +854,7 @@ LuaApplyMachining( lua_State* L)
// imposto la geometria alla lavorazione corrente
bool bOk = ExeApplyMachining() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
+10 -10
View File
@@ -34,7 +34,7 @@ LuaSetBackground( lua_State* L)
// imposto lo sfondo
bool bOk = ExeSetBackground( colTop, colBot, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -47,7 +47,7 @@ LuaDraw( lua_State* L)
// eseguo ridisegno
bool bOk = ExeDraw() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -64,7 +64,7 @@ LuaSetShowMode( lua_State* L)
// imposto il modo di visualizzazione
bool bOk = ExeSetShowMode( nShowMode, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -81,7 +81,7 @@ LuaSetShowCurveDirection( lua_State* L)
// imposto visualizzazione direzione curve
bool bOk = ExeSetShowCurveDirection( bShowCrvDir, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -98,7 +98,7 @@ LuaSetShowTriaAdv( lua_State* L)
// imposto visualizzazione direzione curve
bool bOk = ExeSetShowTriaAdv( bAdvanced, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -115,7 +115,7 @@ LuaZoomRadius( lua_State* L)
// imposto zoom
bool bOk = ExeZoomRadius( dRadius, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -132,7 +132,7 @@ LuaZoom( lua_State* L)
// imposto zoom
bool bOk = ExeZoom( nZoomType, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -149,7 +149,7 @@ LuaSetView( lua_State* L)
// imposto direzione di vista
bool bOk = ExeSetView( nViewDir, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -168,7 +168,7 @@ LuaSetGenericView( lua_State* L)
// imposto direzione di vista
bool bOk = ExeSetGenericView( dAngVertDeg, dAngHorizDeg, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -185,7 +185,7 @@ LuaSetViewCenter( lua_State* L)
// imposto centro di vista
bool bOk = ExeSetViewCenter( ptCen, bRedraw) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}