From bbe34f603fe8c475a300799d33d2d66c7fcca3f4 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 29 Oct 2016 15:50:57 +0000 Subject: [PATCH] EgtInterface 1.6v8 : - aggiunte in interfaccia EgtVerifyRawPartCurrPhase, EgtVerifyFixture e EgtGetPlaneSnapPoint. --- API_General.cpp | 2 +- API_GeoSnap.cpp | 4 ++-- API_GeomDB.cpp | 2 +- API_MachMgr.cpp | 16 +++++++++++++++- API_Scene.cpp | 14 ++++++++++++++ EgtInterface.rc | Bin 11726 -> 11726 bytes 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/API_General.cpp b/API_General.cpp index 0e47b97..ceedf09 100644 --- a/API_General.cpp +++ b/API_General.cpp @@ -72,7 +72,7 @@ BOOL __stdcall EgtGetDefaultFont( wchar_t*& wsDefaultFont) { if ( &wsDefaultFont == nullptr) - return false ; + return FALSE ; // recupero il nome del font di default string sDefaultFont ; ExeGetDefaultFont( sDefaultFont) ; diff --git a/API_GeoSnap.cpp b/API_GeoSnap.cpp index 9762b08..0e00edc 100644 --- a/API_GeoSnap.cpp +++ b/API_GeoSnap.cpp @@ -231,7 +231,7 @@ __stdcall EgtCurveIsFlat( int nId, double vtN[3], double* pdDist) return FALSE ; VEC_FROM_3D( vtN, Plane.vtN) *pdDist = Plane.dDist ; - return true ; + return TRUE ; } //---------------------------------------------------------------------------- @@ -252,7 +252,7 @@ __stdcall EgtCurveArea( int nId, double vtN[3], double* pdDist, double* pdArea) return FALSE ; VEC_FROM_3D( vtN, Plane.vtN) *pdDist = Plane.dDist ; - return true ; + return TRUE ; } //---------------------------------------------------------------------------- diff --git a/API_GeomDB.cpp b/API_GeomDB.cpp index 0824914..5ebd6c6 100644 --- a/API_GeomDB.cpp +++ b/API_GeomDB.cpp @@ -104,7 +104,7 @@ BOOL __stdcall EgtGetCurrFilePath( wchar_t*& wsFilePath) { if ( &wsFilePath == nullptr) - return false ; + return FALSE ; string sFilePath ; if ( ! ExeGetCurrFilePath( sFilePath)) return FALSE ; diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index 35bdbf9..18516c2 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -253,6 +253,13 @@ __stdcall EgtVerifyRawPartPhase( int nRawId, int nPhase) return ( ExeVerifyRawPartPhase( nRawId, nPhase) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtVerifyRawPartCurrPhase( int nRawId) +{ + return ( ExeVerifyRawPartCurrPhase( nRawId) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtRemoveRawPartFromCurrPhase( int nRawId) @@ -414,6 +421,13 @@ __stdcall EgtRemoveFixture( int nFxtId) return ( ExeRemoveFixture( nFxtId) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtVerifyFixture( int nFxtId) +{ + return ( ExeVerifyFixture( nFxtId) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- int __stdcall EgtGetFirstFixture( void) @@ -1391,7 +1405,7 @@ __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) { string sInfo ; if ( ! ExeGetOutstrokeInfo( sInfo)) - return false ; + return FALSE ; wsInfo = _wcsdup( stringtoW( sInfo)) ; return (( wsInfo == nullptr) ? FALSE : TRUE) ; } diff --git a/API_Scene.cpp b/API_Scene.cpp index 37b4253..138ed13 100644 --- a/API_Scene.cpp +++ b/API_Scene.cpp @@ -241,6 +241,20 @@ __stdcall EgtGetLastSnapDir( double vtV[3]) return TRUE ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetPlaneSnapPoint( int nWinX, int nWinY, const double vtN[3], double dDist, double ptP[3]) +{ + if ( ptP == nullptr) + return FALSE ; + Plane3d Plane ; Plane.vtN = vtN ; Plane.dDist = dDist ; + Point3d ptTmp ; + if ( ! ExeGetPlaneSnapPoint( nWinX, nWinY, Plane, ptTmp)) + return FALSE ; + VEC_FROM_3D( ptP, ptTmp) + return TRUE ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtSetShowMode( int nShowMode, BOOL bRedraw) diff --git a/EgtInterface.rc b/EgtInterface.rc index eceddfcedf08852081537b3207c6217acd53872d..bda444d4cebe02251c949a10f5826162b981b6d6 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 97 zcmX>XeJ*;#A2vp_%@4(HGEKh5nK!veL}IgpR0iYbBisheV2P7VllKW$fh7WjCa{3T d+?k;YXF&L1H9V8oDMAbg5K3U&JVn`x3jjlaBclKS