From 9af86f89190c31125e87d655db6f462a3f17db43 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 23 Nov 2015 09:08:35 +0000 Subject: [PATCH] EgtInterface 1.6k8 : - aggiornamenti. --- API_MachMgr.cpp | 48 ++++++++++++++++++++++++++++++++++++++---------- EgtInterface.rc | Bin 11726 -> 11726 bytes 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index 404329f..ad4adf6 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -206,11 +206,11 @@ __stdcall EgtSetTable( const wchar_t* wsTable) //----------------------------------------------------------------------------- BOOL -__stdcall EgtGetTableRef1( double ptPos[3]) +__stdcall EgtGetTableRef( int nInd, double ptPos[3]) { // recupero il punto Point3d ptTemp ; - if ( ! ExeGetTableRef1( ptTemp)) + if ( ! ExeGetTableRef( nInd, ptTemp)) return FALSE ; // ritorno il punto VEC_FROM_3D( ptPos, ptTemp) @@ -219,15 +219,17 @@ __stdcall EgtGetTableRef1( double ptPos[3]) //----------------------------------------------------------------------------- BOOL -__stdcall EgtGetTableArea1( int* pnAreaId) +__stdcall EgtGetTableArea( int nInd, double ptMin[3], double ptMax[3]) { // recupero l'identificativo - int nAreaId ; - if ( ! ExeGetTableArea1( nAreaId)) + BBox3d b3Area ; + if ( ! ExeGetTableArea( nInd, b3Area)) return FALSE ; - // ritorno il dato - if ( pnAreaId != nullptr) - *pnAreaId = nAreaId ; + // ritorno i dati + if ( ptMin != nullptr) + VEC_FROM_3D( ptMin, b3Area.GetMin()) ; + if ( ptMax != nullptr) + VEC_FROM_3D( ptMax, b3Area.GetMax()) ; return TRUE ; } @@ -601,6 +603,15 @@ __stdcall EgtMdbGetMachiningDir( wchar_t*& wsMchDir) return (( wsMchDir == nullptr) ? FALSE : TRUE) ; } +//----------------------------------------------------------------------------- +// Operations +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtRemoveAllOperations( void) +{ + return ( ExeRemoveAllOperations() ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- // Simulation //----------------------------------------------------------------------------- @@ -612,9 +623,13 @@ __stdcall EgtSimStart( void) //----------------------------------------------------------------------------- BOOL -__stdcall EgtSimMove( void) +__stdcall EgtSimMove( int* pnStatus) { - return ( ExeSimMove() ? TRUE : FALSE) ; + int nStatus ; + bool bOk = ExeSimMove( nStatus) ; + if ( pnStatus != nullptr) + *pnStatus = nStatus ; + return ( bOk ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- @@ -624,6 +639,19 @@ __stdcall EgtSimHome( void) return ( ExeSimHome() ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtSimGetAxisInfoPos( int nI, wchar_t*& wsName, double* pdVal) +{ + if ( &wsName == nullptr || pdVal == nullptr) + return FALSE ; + string sName ; + if ( ! ExeSimGetAxisInfoPos( nI, sName, *pdVal)) + return FALSE ; + wsName = _wcsdup( stringtoW( sName)) ; + return (( wsName == nullptr) ? FALSE : TRUE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtSimSetStep( double dStep) diff --git a/EgtInterface.rc b/EgtInterface.rc index ee1bc610d7f5558203520e67ae89377a58277274..a8b50bb88a520b6ce7945ebc3dd66fc43348b297 100644 GIT binary patch delta 113 zcmX>XeJ*;#A2vpd%@4(HGEKh5na5}``6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSq2At@CA delta 113 zcmX>XeJ*;#A2vqw%@4(HGEKh5na5~8`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSq0S1Anu