From 17c5d0964722ab5b602d07934a0d04ca28e88f21 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 2 Dec 2019 18:36:13 +0000 Subject: [PATCH] =?UTF-8?q?EgtNesting=202.1l1=20:=20-=20aggiunto=20control?= =?UTF-8?q?lo=20flip,=20rotazione=20e=20priorit=C3=A0=20a=20pezzi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoNester.cpp | 4 +++- AutoNester.h | 2 +- EgtNesting.rc | Bin 11646 -> 11646 bytes 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AutoNester.cpp b/AutoNester.cpp index 0488ab9..dc03626 100644 --- a/AutoNester.cpp +++ b/AutoNester.cpp @@ -103,7 +103,7 @@ AutoNester::AddSheet( int nSheetId, const PolyArc& Outline, int nPriority, int n //---------------------------------------------------------------------------- bool -AutoNester::AddPart( int nPartId, const PolyArc& Outline, int nCount) +AutoNester::AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bCanRotate, int nPriority, int nCount) { if ( m_pOrder == nullptr) return false ; @@ -124,6 +124,8 @@ AutoNester::AddPart( int nPartId, const PolyArc& Outline, int nCount) if ( pPart == nullptr) return false ; CNS_SetPartUserString( pPart, ToString( nPartId).c_str()) ; + CNS_SetPartAuthorizations( pPart, ( bCanFlip ? 1 : 0), ( bCanRotate ? 1 : 0), 0) ; + CNS_SetPartPriority( pPart, nPriority) ; return true ; } diff --git a/AutoNester.h b/AutoNester.h index 3baf8a1..55d7162 100644 --- a/AutoNester.h +++ b/AutoNester.h @@ -25,7 +25,7 @@ class AutoNester : public IAutoNester ~AutoNester( void) override ; bool Start( void) override ; bool AddSheet( int nSheetId, const PolyArc& Outline, int nPriority, int nCount) override ; - bool AddPart( int nPartId, const PolyArc& Outline, int nCount) override ; + bool AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bCanRotate, int nPriority, int nCount) override ; bool SetInterpartGap( double dGap) override ; bool Compute( int nMaxTime) override ; bool CancelComputation( void) override ; diff --git a/EgtNesting.rc b/EgtNesting.rc index 03c834fe38e8cf07449067ac254f00b049fc897a..8290537a269ed50539b0e6884683ff11156c10a0 100644 GIT binary patch delta 121 zcmewt^)G6}4>ndK1|0^&&41Z6nVEAK3@1a_ Sndq1|0^o&41Z6nVGX0%qCCd(%l@!RmTDs-_JC8hF~6C&P)hN4n>a_ S