EgtExchange 1.5e4 :
- aggiunto fattore di scalatura a ImportDxf - introdotto utilizzo dell'oggetto StmFromTriangleSoup in import STL.
This commit is contained in:
+7
-3
@@ -115,8 +115,8 @@ ExcExecutor::ExecuteImportStl( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
bool
|
||||
ExcExecutor::ExecuteImportDxf( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
{
|
||||
// 2 parametri : nome del file e Id del gruppo
|
||||
if ( vsParams.size() != 2)
|
||||
// 2 o 3 parametri : nome del file, Id del gruppo[, ScaleFactor]
|
||||
if ( vsParams.size() != 2 && vsParams.size() != 3)
|
||||
return false ;
|
||||
// eventuale conversione di token nel nome file
|
||||
string sFile = vsParams[0] ;
|
||||
@@ -125,6 +125,10 @@ ExcExecutor::ExecuteImportDxf( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
int nId = m_pParser->GetIdParam( vsParams[1]) ;
|
||||
if ( nId == CMD_ID_ERROR)
|
||||
return false ;
|
||||
// gestisco ScaleFactor
|
||||
double dScaleFactor = 1 ;
|
||||
if ( vsParams.size() >= 3)
|
||||
FromString( vsParams[2], dScaleFactor) ;
|
||||
|
||||
// preparo l'importatore
|
||||
IImportDxf* pImpDxf = CreateImportDxf() ;
|
||||
@@ -133,7 +137,7 @@ ExcExecutor::ExecuteImportDxf( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
return false ;
|
||||
}
|
||||
// eseguo l'importazione
|
||||
bool bOk = pImpDxf->Import( sFile, m_pGDB, nId) ;
|
||||
bool bOk = pImpDxf->Import( sFile, m_pGDB, nId, dScaleFactor) ;
|
||||
// cancello l'importatore
|
||||
delete pImpDxf ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user