diff --git a/EXE_Exchange.cpp b/EXE_Exchange.cpp index e1d6b38..318f00f 100644 --- a/EXE_Exchange.cpp +++ b/EXE_Exchange.cpp @@ -132,7 +132,7 @@ ExeImportStl( const string& sFilePath, double dScaleFactor) //----------------------------------------------------------------------------- bool -ExeImportCnc( const string& sFilePath) +ExeImportCnc( const string& sFilePath, int nFlag) { GseContext* pGseCtx = GetCurrGseContext() ; VERIFY_CTX_GEOMDB( pGseCtx, false) @@ -144,7 +144,7 @@ ExeImportCnc( const string& sFilePath) PtrOwner pImpCnc( MyCreateImportCnc()) ; bOk = bOk && ! IsNull( pImpCnc) ; // eseguo l'importazione - bOk = bOk && pImpCnc->Import( sFilePath, pGseCtx->m_pGeomDB, nPartId) ; + bOk = bOk && pImpCnc->Import( sFilePath, pGseCtx->m_pGeomDB, nPartId, nFlag) ; // aggiorno stato file corrente pGseCtx->m_sFilePath = sFilePath ; ExeSetModified() ; diff --git a/EXE_NstCreateFlatParts.cpp b/EXE_NstCreateFlatParts.cpp index 96faa38..5266344 100644 --- a/EXE_NstCreateFlatParts.cpp +++ b/EXE_NstCreateFlatParts.cpp @@ -631,16 +631,17 @@ ExeAdjustFlatPartLayer( int nLayerId) // Passo all'entità successiva nId = nNextId ; } - // Unisco gli archi consecutivi con la stessa concavità + // Unisco gli archi consecutivi con la stessa concavità (escluse circonferenze) INTVECTOR vAccwIds ; INTVECTOR vAcwIds ; nId = pGeomDB->GetFirstInGroup( nLayerId) ; while ( nId != GDB_ID_NULL && bOk) { const ICurveArc* pArc = GetCurveArc( pGeomDB->GetGeoObj( nId)) ; if ( pArc != nullptr) { - if ( pArc->GetAngCenter() > 0) + double dAngCen = pArc->GetAngCenter() ; + if ( dAngCen > EPS_ANG_SMALL && dAngCen < ANG_FULL - EPS_ANG_SMALL) vAccwIds.emplace_back( nId) ; - else + else if ( dAngCen < - EPS_ANG_SMALL && dAngCen > - ANG_FULL + EPS_ANG_SMALL) vAcwIds.emplace_back( nId) ; } nId = pGeomDB->GetNext( nId) ; diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 450fe8b..9b90cdd 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_Exchange.cpp b/LUA_Exchange.cpp index 05066b8..f068c2f 100644 --- a/LUA_Exchange.cpp +++ b/LUA_Exchange.cpp @@ -15,6 +15,7 @@ #include "stdafx.h" #include "LUA.h" #include "/EgtDev/Include/EXeExecutor.h" +#include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EGkLuaAux.h" #include "/EgtDev/Include/EgnStringUtils.h" @@ -58,12 +59,14 @@ LuaImportStl( lua_State* L) static int LuaImportCnc( lua_State* L) { - // 1 parametro : path del file da importare + // 1 o 2 parametri : FilePath [, Flag] string sFilePath ; LuaCheckParam( L, 1, sFilePath) + int nFlag = EIC_FLAG_NONE ; + LuaGetParam( L, 2, nFlag) ; LuaClearStack( L) ; // apro il file - bool bOk = ExeImportCnc( sFilePath) ; + bool bOk = ExeImportCnc( sFilePath, nFlag) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ;