From fdb492165eb3353332be5897c0d9ba03dec43814 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 4 Dec 2019 19:47:33 +0000 Subject: [PATCH] EgtInterface 2.1l2 : - aggiunta interfaccia per EgtAutomaticPackParts. --- API_Nesting.cpp | 20 ++++++++++++++++++++ EgtInterface.rc | Bin 11726 -> 11726 bytes 2 files changed, 20 insertions(+) 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 b87bffbfdf1d29e32d631a2925c18c9e9e9feed6..059c1bf95e88b43554ef8caf42f6a2a78a6284d5 100644 GIT binary patch delta 137 zcmX>XeJ*;#4>ndK1|0^Y%@4(HGEKh5nZumJU^Mw7r|x7gC5z2{Qc{eYk8tZS!xf!m qn!Hc20;XuQmy#Fb<_*F~3S60Cl28-eSWq?dOkSr5w*_cG3pW5uCM*pA delta 137 zcmX>XeJ*;#4>ndq1|0^o%@4(HGEKh5nZumTU^e+9r|x7gC5z2{Qc{eYk8tZS!xf!m qn!Hc20;XuQmy#Fb<_*F~3S60Cl28-eSWq?dOkSr5w*_cG3pW5!Tr4F3