diff --git a/API_Nesting.cpp b/API_Nesting.cpp index a40dbc0..b8321d1 100644 --- a/API_Nesting.cpp +++ b/API_Nesting.cpp @@ -353,6 +353,26 @@ __stdcall EgtGetPartClusterCenterGlob( int nId[], int nCount, double ptCen[3]) return TRUE ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtAutomaticPackParts( int nId[], int nCount, BOOL bMinimizeOnXvsY, BOOL bReducedCut, int nMaxTime) +{ + // verifico + if ( nId == nullptr || nCount <= 0) + return FALSE ; + // riempio il vettore + INTVECTOR vIds ; + vIds.resize( nCount) ; + for ( int i = 0 ; i < nCount ; ++ i) + vIds[i] = nId[i] ; + // eseguo + bool bOk = ExeAutomaticPackParts( vIds, ( bMinimizeOnXvsY != FALSE), ( bReducedCut != FALSE), nMaxTime) ; + // aggiorno il vettore + for ( int i = 0 ; i < nCount ; ++ i) + nId[i] = vIds[i] ; + return ( bOk ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtVerifyMachining( int nMchId, int* pnResult) diff --git a/EgtInterface.rc b/EgtInterface.rc index b87bffb..059c1bf 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ