From 3cbb3fb604bfbdc14a4e41693d48f4a21a799501 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 17 May 2019 18:18:20 +0000 Subject: [PATCH] EgtExecutor : - a ExeInitMachMgr aggiunto parametro sToolMakersDir - aggiunta funzione ExeTdbCurrToolDraw. --- EXE_GdbCreateSurf.cpp | 10 +++++----- EXE_GeoTransform.cpp | 12 ++++++------ EXE_MachMgr.cpp | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/EXE_GdbCreateSurf.cpp b/EXE_GdbCreateSurf.cpp index 962e87b..1325f0c 100644 --- a/EXE_GdbCreateSurf.cpp +++ b/EXE_GdbCreateSurf.cpp @@ -264,7 +264,7 @@ ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquared) //------------------------------------------------------------------------------- static int -MyCreateSurfFlatRegion( int nParentId, INTVECTOR& vCrvIds, int* pnCount) +MyCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) @@ -323,7 +323,7 @@ MyCreateSurfFlatRegion( int nParentId, INTVECTOR& vCrvIds, int* pnCount) //------------------------------------------------------------------------------- int -ExeCreateSurfFlatRegion( int nParentId, INTVECTOR& vCrvIds, int* pnCount) +ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) { // eseguo int nCount = 0 ; @@ -895,7 +895,7 @@ ExeCreateSurfTmByFlatContour( int nParentId, int nCrvId, double dLinTol) //------------------------------------------------------------------------------- int -ExeCreateSurfTmByRegion( int nParentId, INTVECTOR& vCrvIds, double dLinTol) +ExeCreateSurfTmByRegion( int nParentId, const INTVECTOR& vCrvIds, double dLinTol) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) @@ -941,7 +941,7 @@ ExeCreateSurfTmByRegion( int nParentId, INTVECTOR& vCrvIds, double dLinTol) //------------------------------------------------------------------------------- int -ExeCreateSurfTmByExtrusion( int nParentId, INTVECTOR& vCrvIds, const Vector3d& vtExtr, +ExeCreateSurfTmByExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr, double dLinTol, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; @@ -996,7 +996,7 @@ ExeCreateSurfTmByExtrusion( int nParentId, INTVECTOR& vCrvIds, const Vector3d& v //------------------------------------------------------------------------------- int -ExeCreateSurfTmByRegionExtrusion( int nParentId, INTVECTOR& vCrvIds, const Vector3d& vtExtr, +ExeCreateSurfTmByRegionExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr, double dLinTol, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; diff --git a/EXE_GeoTransform.cpp b/EXE_GeoTransform.cpp index 6fa7dbf..d144441 100644 --- a/EXE_GeoTransform.cpp +++ b/EXE_GeoTransform.cpp @@ -25,7 +25,7 @@ using namespace std ; //------------------------------------------------------------------------------- bool -ExeTransform( INTVECTOR& vIds, const Frame3d& frRef, int nRefType) +ExeTransform( const INTVECTOR& vIds, const Frame3d& frRef, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -84,7 +84,7 @@ ExeTransform( INTVECTOR& vIds, const Frame3d& frRef, int nRefType) //------------------------------------------------------------------------------- bool -ExeMove( INTVECTOR& vIds, const Vector3d& vtMove, int nRefType) +ExeMove( const INTVECTOR& vIds, const Vector3d& vtMove, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -138,7 +138,7 @@ ExeMove( INTVECTOR& vIds, const Vector3d& vtMove, int nRefType) //------------------------------------------------------------------------------- bool -ExeRotate( INTVECTOR& vIds, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, int nRefType) +ExeRotate( const INTVECTOR& vIds, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -197,7 +197,7 @@ ExeRotate( INTVECTOR& vIds, const Point3d& ptAx, const Vector3d& vtAx, double dA //------------------------------------------------------------------------------- bool -ExeScale( INTVECTOR& vIds, const Frame3d& frRef, +ExeScale( const INTVECTOR& vIds, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; @@ -258,7 +258,7 @@ ExeScale( INTVECTOR& vIds, const Frame3d& frRef, //------------------------------------------------------------------------------- bool -ExeMirror( INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, int nRefType) +ExeMirror( const INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) @@ -316,7 +316,7 @@ ExeMirror( INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, int nRefTyp //------------------------------------------------------------------------------- bool -ExeShear( INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, +ExeShear( const INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtDir, double dCoeff, int nRefType) { IGeomDB* pGeomDB = GetCurrGeomDB() ; diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index adffdb7..20aded7 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -31,14 +31,14 @@ using namespace std ; //----------------------------------------------------------------------------- bool -ExeInitMachMgr( const string& sMachinesDir) +ExeInitMachMgr( const string& sMachinesDir, const string& sToolMakersDir) { GseContext* pGseCtx = GetCurrGseContext() ; VERIFY_CTX_GEOMDB( pGseCtx, false) // inizializzazione gestore lavorazioni PtrOwner pMachMgr( MyCreateMachMgr()) ; VERIFY_NULL( Get( pMachMgr), "Error in CreateMachMgr", false) - bool bOk = pMachMgr->Init( sMachinesDir, pGseCtx->m_pGeomDB, + bool bOk = pMachMgr->Init( sMachinesDir, sToolMakersDir, pGseCtx->m_pGeomDB, GetIndCurrGseContext(), LuaGetLuaLibsDir(), LuaGetLastRequire()) ; // assegno il gestore al contesto pGseCtx->m_pMachMgr = ( bOk ? Release( pMachMgr) : nullptr) ; @@ -1288,6 +1288,17 @@ ExeTdbGetCurrToolMaxDepth( double& dMaxDepth) return pMachMgr->TdbGetCurrToolMaxDepth( dMaxDepth) ; } +//----------------------------------------------------------------------------- +int +ExeTdbCurrToolDraw( int nGenCtx, int nToolCtx) +{ + ExeSetCurrentContext( nGenCtx) ; + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, 999) + // recupero il massimo affondamento dell'utensile + return pMachMgr->TdbCurrToolDraw( nGenCtx, nToolCtx) ; +} + //----------------------------------------------------------------------------- bool ExeTdbReload( void)