EgtExecutor 1.9g1 :
- aggiunta gestione import punti in Exe e LUA - corretta gestione regione sotto con lati inclinati interni di pezzi piatti (flatParts) - aggiunta funzione Exe e Lua CAvGetToolOutline per avere profilo di utensile in uso nella CollisionAvoidance.
This commit is contained in:
+47
-29
@@ -23,33 +23,16 @@ using namespace std ;
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaImportDxf( lua_State* L)
|
||||
LuaImportBtl( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : path del file da importare [, Fattore di scala]
|
||||
// 1 o 2 : FilePath [, Flag]
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 1, sFilePath)
|
||||
double dScaleFactor = 1.0 ;
|
||||
LuaGetParam( L, 2, dScaleFactor) ;
|
||||
int nFlag = EIB_FLAG_NONE ;
|
||||
LuaGetParam( L, 2, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// apro il file
|
||||
bool bOk = ExeImportDxf( sFilePath, dScaleFactor) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaImportStl( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : path del file da importare [, Fattore di scala]
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 1, sFilePath)
|
||||
double dScaleFactor = 1.0 ;
|
||||
LuaGetParam( L, 2, dScaleFactor) ;
|
||||
LuaClearStack( L) ;
|
||||
// apro il file
|
||||
bool bOk = ExeImportStl( sFilePath, dScaleFactor) ;
|
||||
bool bOk = ExeImportBtl( sFilePath, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -89,16 +72,50 @@ LuaImportCsf( lua_State* L)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaImportBtl( lua_State* L)
|
||||
LuaImportDxf( lua_State* L)
|
||||
{
|
||||
// 1 o 2 : FilePath [, Flag]
|
||||
// 1 o 2 parametri : path del file da importare [, Fattore di scala]
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 1, sFilePath)
|
||||
int nFlag = EIB_FLAG_NONE ;
|
||||
double dScaleFactor = 1.0 ;
|
||||
LuaGetParam( L, 2, dScaleFactor) ;
|
||||
LuaClearStack( L) ;
|
||||
// apro il file
|
||||
bool bOk = ExeImportDxf( sFilePath, dScaleFactor) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaImportPnt( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : FilePath [, Flag]
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 1, sFilePath)
|
||||
int nFlag = 0 ;
|
||||
LuaGetParam( L, 2, nFlag) ;
|
||||
LuaClearStack( L) ;
|
||||
// apro il file
|
||||
bool bOk = ExeImportBtl( sFilePath, nFlag) ;
|
||||
bool bOk = ExeImportPnt( sFilePath, nFlag) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaImportStl( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : path del file da importare [, Fattore di scala]
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 1, sFilePath)
|
||||
double dScaleFactor = 1.0 ;
|
||||
LuaGetParam( L, 2, dScaleFactor) ;
|
||||
LuaClearStack( L) ;
|
||||
// apro il file
|
||||
bool bOk = ExeImportStl( sFilePath, dScaleFactor) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -143,11 +160,12 @@ bool
|
||||
LuaInstallExchange( LuaMgr& luaMgr)
|
||||
{
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportDxf", LuaImportDxf) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportStl", LuaImportStl) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportBtl", LuaImportBtl) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportCnc", LuaImportCnc) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportCsf", LuaImportCsf) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportBtl", LuaImportBtl) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportDxf", LuaImportDxf) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportPnt", LuaImportPnt) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtImportStl", LuaImportStl) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtExportDxf", LuaExportDxf) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtExportStl", LuaExportStl) ;
|
||||
return bOk ;
|
||||
|
||||
Reference in New Issue
Block a user