diff --git a/CadCuts/NestPageUC.xaml.vb b/CadCuts/NestPageUC.xaml.vb index 2e85fd7..69093be 100644 --- a/CadCuts/NestPageUC.xaml.vb +++ b/CadCuts/NestPageUC.xaml.vb @@ -3205,8 +3205,9 @@ Public Class NestPageUC ' Se elemento non collegato, esco con insuccesso Dim nJoint As Integer = 1 If EgtGetInfo( nSideId, INFO_JOINENTITY, nJoint) AndAlso nJoint = 0 Then Return GDB_ID.NULL - ' Cerco su elementi successivi collegati + ' Cerco su elementi successivi collegati (se ultimo devo prendere il primo) Dim nNextId = EgtGetNext( nSideId) + If nNextId = GDB_ID.NULL Then nNextId = EgtGetFirstInGroup( EgtGetParent( nSideId)) While nNextId <> GDB_ID.NULL Dim nNextJoint As Integer = 1 If EgtGetInfo( nNextId, INFO_JOINENTITY, nNextJoint) AndAlso nNextJoint = 0 Then Exit While @@ -3214,8 +3215,9 @@ Public Class NestPageUC If nPvId <> GDB_ID.NULL Then Return nPvId nNextId = EgtGetNext( nNextId) End While - ' Cerco su elementi precedenti collegati + ' Cerco su elementi precedenti collegati (se primo devo prendere l'ultimo) Dim nPrevId = EgtGetPrev( nSideId) + If nPrevId = GDB_ID.NULL Then nPrevId = EgtGetLastInGroup( EgtGetParent( nSideId)) While nPrevId <> GDB_ID.NULL Dim nPrevJoint As Integer = 1 If EgtGetInfo( nPrevId, INFO_JOINENTITY, nPrevJoint) AndAlso nPrevJoint = 0 Then Exit While diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 519febd..10051da 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + +