EgtExecutor 2.5a2 :
- aggiunto parametro nFilter a tutte le funzioni di esportazione.
This commit is contained in:
+6
-4
@@ -463,7 +463,7 @@ ExeAdvancedImport( const string& sFilePath, double dToler)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeExportDxf( int nId, const string& sFilePath, int nFlag)
|
||||
ExeExportDxf( int nId, const string& sFilePath, int nFlag, int nFilter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -473,7 +473,7 @@ ExeExportDxf( int nId, const string& sFilePath, int nFlag)
|
||||
PtrOwner<IExportDxf> pExpDxf( MyCreateExportDxf()) ;
|
||||
bOk = bOk && ! IsNull( pExpDxf) ;
|
||||
// eseguo l'esportazione
|
||||
pExpDxf->SetOptions( EEXFLT_DEFAULT, nFlag) ;
|
||||
pExpDxf->SetOptions( nFilter, nFlag) ;
|
||||
bOk = bOk && pExpDxf->Export( pGeomDB, nId, sFilePath) ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -489,7 +489,7 @@ ExeExportDxf( int nId, const string& sFilePath, int nFlag)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeExportStl( int nId, const string& sFilePath)
|
||||
ExeExportStl( int nId, const string& sFilePath, int nFilter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -499,6 +499,7 @@ ExeExportStl( int nId, const string& sFilePath)
|
||||
PtrOwner<IExportStl> pExpStl( MyCreateExportStl()) ;
|
||||
bOk = bOk && ! IsNull( pExpStl) ;
|
||||
// eseguo l'esportazione
|
||||
pExpStl->SetOptions( nFilter) ;
|
||||
bOk = bOk && pExpStl->Export( pGeomDB, nId, sFilePath) ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
@@ -513,7 +514,7 @@ ExeExportStl( int nId, const string& sFilePath)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeExport3MF( int nId, const string& sFilePath)
|
||||
ExeExport3MF( int nId, const string& sFilePath, int nFilter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -523,6 +524,7 @@ ExeExport3MF( int nId, const string& sFilePath)
|
||||
PtrOwner<IExport3MF> pExp3MF( MyCreateExport3MF()) ;
|
||||
bOk = bOk && ! IsNull( pExp3MF) ;
|
||||
// eseguo l'esportazione
|
||||
pExp3MF->SetOptions( nFilter) ;
|
||||
bOk = bOk && pExp3MF->Export( pGeomDB, nId, sFilePath) ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
|
||||
Binary file not shown.
+10
-4
@@ -190,16 +190,18 @@ LuaAdvancedImport( lua_State* L)
|
||||
static int
|
||||
LuaExportDxf( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : GroupId e path del file da esportare [, Flag]
|
||||
// 2, 3 o 4 parametri : GroupId e path del file da esportare [, Flag] [, Filter]
|
||||
int nGroupId ;
|
||||
LuaCheckParam( L, 1, nGroupId)
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 2, sFilePath)
|
||||
int nFlag = EEXFLAG_DEFAULT ;
|
||||
LuaGetParam( L, 3, nFlag) ;
|
||||
int nFilter = EEXFLT_DEFAULT ;
|
||||
LuaGetParam( L, 4, nFilter) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il file
|
||||
bool bOk = ExeExportDxf( nGroupId, sFilePath, nFlag) ;
|
||||
bool bOk = ExeExportDxf( nGroupId, sFilePath, nFlag, nFilter) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -209,11 +211,13 @@ LuaExportDxf( lua_State* L)
|
||||
static int
|
||||
LuaExportStl( lua_State* L)
|
||||
{
|
||||
// 2 parametri : GroupId e path del file da esportare
|
||||
// 2 parametri : GroupId e path del file da esportare [, Filter]
|
||||
int nGroupId ;
|
||||
LuaCheckParam( L, 1, nGroupId)
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 2, sFilePath)
|
||||
int nFilter = EEXFLT_DEFAULT ;
|
||||
LuaGetParam( L, 3, nFilter) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il file
|
||||
bool bOk = ExeExportStl( nGroupId, sFilePath) ;
|
||||
@@ -226,11 +230,13 @@ LuaExportStl( lua_State* L)
|
||||
static int
|
||||
LuaExport3MF( lua_State* L)
|
||||
{
|
||||
// 2 parametri : GroupId e path del file da esportare
|
||||
// 2 o 3 parametri : GroupId e path del file da esportare [, Filter]
|
||||
int nGroupId ;
|
||||
LuaCheckParam( L, 1, nGroupId)
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 2, sFilePath)
|
||||
int nFilter = EEXFLT_DEFAULT ;
|
||||
LuaGetParam( L, 3, nFilter) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il file
|
||||
bool bOk = ExeExport3MF( nGroupId, sFilePath) ;
|
||||
|
||||
Reference in New Issue
Block a user