diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index f006900..68609fe 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -60,5 +60,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/NestPageUC.xaml.vb b/NestPageUC.xaml.vb index edc72b1..c81b763 100644 --- a/NestPageUC.xaml.vb +++ b/NestPageUC.xaml.vb @@ -386,14 +386,18 @@ Public Class NestPageUC ' Aggiungo le lavorazioni standard AddMachinings(nId, True, False) ' Eseguo nesting + Dim bFit As Boolean = False Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_nRawId, NAME_KERF) - Dim bOk As Boolean = EgtCreateOutRegion(m_nRawId, nKerfId) AndAlso - EgtPackPart(nId, m_bReducedCut, True) - 'Dim bOk As Boolean = EgtPackPart(nId, m_bReducedCut, - ' m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf, - ' m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf, True) + If EgtCreateOutRegion(m_nRawId, nKerfId) Then + If Not EgtExistsInfo(m_CurrProjPage.m_nRawId, KEY_RAWBYPOINTS) Then + bFit = EgtPackPartInRectangle(nId, m_bReducedCut, True) + End If + If Not bFit Then + bFit = EgtPackPart(nId, m_bReducedCut, True) + End If + End If ' Gestione risultato nesting - If bOk Then + If bFit Then Return True Else EraseMachinings(nId) diff --git a/RawPartPageUC.xaml.vb b/RawPartPageUC.xaml.vb index a63fd22..c35947a 100644 --- a/RawPartPageUC.xaml.vb +++ b/RawPartPageUC.xaml.vb @@ -332,6 +332,8 @@ Public Class RawPartPageUC UpdateRawPartKerf() ' Aggiorno dimensioni grezzo UpdateRawXYData() + ' Salvo il valore del kerf (sempre in mm) + EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, DoubleToString(m_RawKerf, 4)) ' Aggiorno visualizzazione EgtDraw() End Sub @@ -483,6 +485,8 @@ Public Class RawPartPageUC nKerfId = EgtCreateRectangle2P(m_CurrProjPage.m_nRawId, ptMin, ptMax, GDB_RT.GLOB) EgtSetName(nKerfId, NAME_KERF) EgtSetColor(nKerfId, m_KerfCol) + ' Salvo il valore del kerf (sempre in mm) + EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, DoubleToString(m_RawKerf, 4)) Return True End Function