From af798840a5d33a2d5b4a8ff6ed97cc30c7140acf Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Mon, 13 Nov 2023 17:12:52 +0100 Subject: [PATCH] EgtExecutor : - correzione nella gestione dei layer nell'Import3dm. --- EXE_Exchange.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/EXE_Exchange.cpp b/EXE_Exchange.cpp index 378d920..e70dc93 100644 --- a/EXE_Exchange.cpp +++ b/EXE_Exchange.cpp @@ -311,10 +311,10 @@ ExeImportStl( const string& sFilePath, double dScaleFactor) // aggiungo un gruppo pezzo e un gruppo layer int nPartId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ; int nLayerId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ; - // preparo l'importatore + // preparo l'importatore PtrOwner pImpStl( MyCreateImportStl()) ; bOk = bOk && ! IsNull( pImpStl) ; - // eseguo l'importazione + // eseguo l'importazione bOk = bOk && pImpStl->Import( sFilePath, pGseCtx->m_pGeomDB, nLayerId, dScaleFactor) ; // aggiorno stato file corrente if ( pGseCtx->m_sFilePath.empty()) @@ -339,13 +339,13 @@ ExeImport3MF( const string& sFilePath) VERIFY_CTX_GEOMDB( pGseCtx, false) bool bOk = true ; // importo il file 3MF - // aggiungo un gruppo pezzo e un gruppo layer + // aggiungo un gruppo pezzo e un gruppo layer int nPartId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ; int nLayerId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ; - // preparo l'importatore + // preparo l'importatore PtrOwner pImp3MF( MyCreateImport3MF()) ; bOk = bOk && ! IsNull( pImp3MF) ; - // eseguo l'importazione + // eseguo l'importazione bOk = bOk && pImp3MF->Import( sFilePath, pGseCtx->m_pGeomDB, nLayerId) ; // aggiorno stato file corrente if ( pGseCtx->m_sFilePath.empty()) @@ -369,13 +369,12 @@ ExeImport3dm( const string& sFilePath) VERIFY_CTX_GEOMDB( pGseCtx, false) bool bOk = true ; // importo il file 3dm - // aggiungo un gruppo pezzo e un gruppo layer + // aggiungo un gruppo pezzo e un gruppo layer int nPartId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ; - int nLayerId = pGseCtx->m_pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ; - // preparo l'importatore + // preparo l'importatore PtrOwner pImp3dm( MyCreateImport3dm()) ; bOk = bOk && ! IsNull( pImp3dm) ; - // eseguo l'importazione + // eseguo l'importazione const DimensionStyle& DimSt = pGseCtx->m_dsCurr ; double dExtLine = DimSt.dExtLineLen ; double dArrLen = DimSt.dArrowLen ; @@ -384,7 +383,7 @@ ExeImport3dm( const string& sFilePath) int nDecDig = DimSt.nDecDigit ; string sFont = DimSt.sFont ; double dTextHeight = DimSt.dTextHeight ; - bOk = bOk && pImp3dm->Import( sFilePath, pGseCtx->m_pGeomDB, nLayerId, + bOk = bOk && pImp3dm->Import( sFilePath, pGseCtx->m_pGeomDB, nPartId, dTextHeight, dExtLine, dArrLen, dTextDist, bLenIsMM, nDecDig, sFont) ; // aggiorno stato file corrente if ( pGseCtx->m_sFilePath.empty())