EgtExecutor 1.6v6 :
- modificata in Exe e Lua ImportCnc per aggiunta del parametro nFlag - corretta ExeAdjustFlatPartLayer per non trasformare in composite cerchi completi.
This commit is contained in:
+2
-2
@@ -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<IImportCnc> 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() ;
|
||||
|
||||
@@ -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) ;
|
||||
|
||||
Binary file not shown.
+5
-2
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user