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 32e4973..57ae7bd 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ