From 89e55e16655fa9695b6c5a868ee40ee937af9037 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 7 Jan 2016 15:02:58 +0000 Subject: [PATCH] EgtInterface 1.6l6 : - aggiornamento interfacce. --- API_Nesting.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++---- EgtInterface.rc | Bin 11726 -> 11726 bytes 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/API_Nesting.cpp b/API_Nesting.cpp index 1484dd2..332e28b 100644 --- a/API_Nesting.cpp +++ b/API_Nesting.cpp @@ -96,7 +96,45 @@ __stdcall EgtMoveBoxCluster( int nId[], int nCount, double vtMove[3], //----------------------------------------------------------------------------- BOOL -__stdcall EgtMovePartCluster( int nId[], int nCount, double vtMove[3], +__stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut, + double dXmin, double dYmin, double dXmax, double dYmax) +{ + // verifico + if ( nId == nullptr || nCount <= 0) + return false ; + // riempio il vettore + INTVECTOR vIds ; + vIds.reserve( nCount) ; + for ( int i = 0 ; i < nCount ; ++ i) + vIds.push_back( nId[i]) ; + // eseguo + bool bOk = ExeVerifyPartCluster( vIds, ( bReducedCut != FALSE), dXmin, dYmin,dXmax, dYmax) ; + + return ( bOk ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtPackPartCluster( int nId[], int nCount, BOOL bReducedCut, + double dXmin, double dYmin, double dXmax, double dYmax, BOOL bBottomUp) +{ + // verifico + if ( nId == nullptr || nCount <= 0) + return false ; + // riempio il vettore + INTVECTOR vIds ; + vIds.reserve( nCount) ; + for ( int i = 0 ; i < nCount ; ++ i) + vIds.push_back( nId[i]) ; + // eseguo + bool bOk = ExePackPartCluster( vIds, ( bReducedCut != FALSE), dXmin, dYmin,dXmax, dYmax, ( bBottomUp != FALSE)) ; + + return ( bOk ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3], double dXmin, double dYmin, double dXmax, double dYmax) { // verifico @@ -109,7 +147,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, double vtMove[3], vIds.push_back( nId[i]) ; // eseguo Vector3d vtM = vtMove ; - bool bOk = ExeMovePartCluster( vIds, vtM, dXmin, dYmin, dXmax, dYmax) ; + bool bOk = ExeMovePartCluster( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax) ; VEC_FROM_3D( vtMove, vtM) return ( bOk ? TRUE : FALSE) ; @@ -117,7 +155,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, double vtMove[3], //----------------------------------------------------------------------------- BOOL -__stdcall EgtRotatePartCluster( int nId[], int nCount, const double ptCen[3], double* pdRotAngDeg, +__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg, double dXmin, double dYmin, double dXmax, double dYmax) { // verifico @@ -129,7 +167,7 @@ __stdcall EgtRotatePartCluster( int nId[], int nCount, const double ptCen[3], do for ( int i = 0 ; i < nCount ; ++ i) vIds.push_back( nId[i]) ; // eseguo - bool bOk = ExeRotatePartCluster( vIds, ptCen, *pdRotAngDeg, dXmin, dYmin, dXmax, dYmax) ; + bool bOk = ExeRotatePartCluster( vIds, ( bReducedCut != FALSE), ptCen, *pdRotAngDeg, dXmin, dYmin, dXmax, dYmax) ; return ( bOk ? TRUE : FALSE) ; } diff --git a/EgtInterface.rc b/EgtInterface.rc index 32e4973b22812f350a356f38a10a799e357db78d..57ae7bda86183777cd58457f768986a17329cdab 100644 GIT binary patch delta 97 zcmX>XeJ*;#A2vp_%@4(HGEKh5nK!veL}IgpR0iYbBisheV2P7VllKW$fh7WjCa{3T d+?k;YXF&L1H9V8oDMAbg5K3U&JVn`x3jjlaBclKS delta 113 zcmX>XeJ*;#A2vqQ%@4(HGEKh5na5~4`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSp{!zld#