EgtExchange 1.5e3 :

- aggiunto fattore di scalatura a ImportStl
- uso di PointGrid3d in import STL invece di ordinamento lessicografico.
This commit is contained in:
Dario Sassi
2014-05-18 09:30:03 +00:00
parent e5f28f8de1
commit fca2574f79
4 changed files with 65 additions and 83 deletions
+7 -3
View File
@@ -82,8 +82,8 @@ ExcExecutor::SetGeomDB( IGeomDB* pGdb)
bool
ExcExecutor::ExecuteImportStl( 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] ;
@@ -92,6 +92,10 @@ ExcExecutor::ExecuteImportStl( 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
IImportStl* pImpStl = CreateImportStl() ;
@@ -100,7 +104,7 @@ ExcExecutor::ExecuteImportStl( const string& sCmd2, const STRVECTOR& vsParams)
return false ;
}
// eseguo l'importazione
bool bOk = pImpStl->Import( sFile, m_pGDB, nId) ;
bool bOk = pImpStl->Import( sFile, m_pGDB, nId, dScaleFactor) ;
// cancello l'importatore
delete pImpStl ;