EgtExchange 1.5e3 :
- aggiunto fattore di scalatura a ImportStl - uso di PointGrid3d in import STL invece di ordinamento lessicografico.
This commit is contained in:
+7
-3
@@ -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 ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user