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 03c834f..8290537 100644 Binary files a/EgtNesting.rc and b/EgtNesting.rc differ