EgtInterface 1.6d4 :
- in selezione tutto si considerano solo i pezzi (non le parti per le lavorazioni) - aggiunte EgtIsPart e EgtIsLayer a API e LUA - migliorati controlli per riconoscimento pezzi e layer - corretto errore in VerifySameFrame per GeoTransforms - ImportDxf e Stl ora accettano anche fattore di scala API e LUA.
This commit is contained in:
+12
-10
@@ -72,14 +72,14 @@ EgtGetFileType( const string& sFilePath)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportDxf( const wchar_t* wsFilePath)
|
||||
__stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor)
|
||||
{
|
||||
return ( EgtImportDxf( wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
||||
return ( EgtImportDxf( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtImportDxf( const string& sFilePath)
|
||||
EgtImportDxf( const string& sFilePath, double dScaleFactor)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_GEOMDB( pGseCtx, false)
|
||||
@@ -91,7 +91,7 @@ EgtImportDxf( const string& sFilePath)
|
||||
PtrOwner<IImportDxf> pImpDxf( MyCreateImportDxf()) ;
|
||||
bOk = bOk && ! IsNull( pImpDxf) ;
|
||||
// eseguo l'importazione
|
||||
bOk = bOk && pImpDxf->Import( sFilePath, pGseCtx->m_pGeomDB, nPartId) ;
|
||||
bOk = bOk && pImpDxf->Import( sFilePath, pGseCtx->m_pGeomDB, nPartId, dScaleFactor) ;
|
||||
// aggiorno stato file corrente
|
||||
pGseCtx->m_sFilePath = sFilePath ;
|
||||
pGseCtx->m_bModified = true ;
|
||||
@@ -99,7 +99,8 @@ EgtImportDxf( const string& sFilePath)
|
||||
if ( IsCmdLog()) {
|
||||
string sLuaPath = sFilePath ;
|
||||
ReplaceString( sLuaPath, "\\", "\\\\") ;
|
||||
string sLua = "EgtImportDxf('" + sLuaPath + "')" +
|
||||
string sLua = "EgtImportDxf('" + sLuaPath + "'," +
|
||||
ToString( dScaleFactor) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -109,14 +110,14 @@ EgtImportDxf( const string& sFilePath)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportStl( const wchar_t* wsFilePath)
|
||||
__stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor)
|
||||
{
|
||||
return ( EgtImportStl( wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
||||
return ( EgtImportStl( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtImportStl( const string& sFilePath)
|
||||
EgtImportStl( const string& sFilePath, double dScaleFactor)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_GEOMDB( pGseCtx, false)
|
||||
@@ -129,7 +130,7 @@ EgtImportStl( const string& sFilePath)
|
||||
PtrOwner<IImportStl> pImpStl( MyCreateImportStl()) ;
|
||||
bOk = bOk && ! IsNull( pImpStl) ;
|
||||
// eseguo l'importazione
|
||||
bOk = bOk && pImpStl->Import( sFilePath, pGseCtx->m_pGeomDB, nLayerId) ;
|
||||
bOk = bOk && pImpStl->Import( sFilePath, pGseCtx->m_pGeomDB, nLayerId, dScaleFactor) ;
|
||||
// aggiorno stato file corrente
|
||||
pGseCtx->m_sFilePath = sFilePath ;
|
||||
pGseCtx->m_bModified = true ;
|
||||
@@ -137,7 +138,8 @@ EgtImportStl( const string& sFilePath)
|
||||
if ( IsCmdLog()) {
|
||||
string sLuaPath = sFilePath ;
|
||||
ReplaceString( sLuaPath, "\\", "\\\\") ;
|
||||
string sLua = "EgtImportStl('" + sLuaPath + "')" +
|
||||
string sLua = "EgtImportStl('" + sLuaPath + "'," +
|
||||
ToString( dScaleFactor) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user