diff --git a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
index 97ab4070..913121a1 100644
--- a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
+++ b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
@@ -549,7 +549,7 @@ Public MustInherit Class PartVM
Public Sub CalcGlobalUpdate()
m_PartM.nCALC_GlobalState = nCALC_State
For Each Feature In FeatureVMList
- If Feature.bDO Then Continue For
+ If Not Feature.bDO Then Continue For
If Feature.nState > m_PartM.nCALC_GlobalState Then
m_PartM.nCALC_GlobalState = Feature.nState
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
diff --git a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
index 3e0a7708..c55f0194 100644
--- a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
+++ b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
@@ -201,6 +201,10 @@
+
+ NestingRunningWndV.xaml
+
+ ProjectTypeWndV.xaml
@@ -378,6 +382,10 @@
MSBuild:CompileDesigner
+
+ Designer
+ MSBuild:Compile
+ MSBuild:CompileDesigner
diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb
index 0ae8e6e1..57776327 100644
--- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb
@@ -350,7 +350,7 @@ Public Class MyMachGroupVM
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
If Index = 0 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
- Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
+ Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw()
diff --git a/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml
new file mode 100644
index 00000000..24457672
--- /dev/null
+++ b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml.vb b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml.vb
new file mode 100644
index 00000000..74f0adb4
--- /dev/null
+++ b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndV.xaml.vb
@@ -0,0 +1,22 @@
+Public Class NestingRunningWndV
+
+ Private WithEvents m_NestingRunningWndVM As NestingRunningWndVM
+
+ Sub New(Owner As Window, NestingRunningWndVM As NestingRunningWndVM)
+ MyBase.New(Owner)
+ ' This call is required by the designer.
+ InitializeComponent()
+ Me.DataContext = NestingRunningWndVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_NestingRunningWndVM = NestingRunningWndVM
+ End Sub
+
+ Private Sub CloseWindow(bDialogResult As Boolean) Handles m_NestingRunningWndVM.m_CloseWindow
+ Me.DialogResult = bDialogResult
+ End Sub
+
+ Private Sub Me_ContentRendered() Handles Me.ContentRendered
+ m_NestingRunningWndVM.DoNesting()
+ End Sub
+
+End Class
diff --git a/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndVM.vb b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndVM.vb
new file mode 100644
index 00000000..230c3cb6
--- /dev/null
+++ b/EgtBEAMWALL.ViewerOptimizer/NestingRunningWnd/NestingRunningWndVM.vb
@@ -0,0 +1,191 @@
+Imports System.Windows.Threading
+Imports EgtBEAMWALL.Core
+Imports EgtWPFLib5
+
+Public Class NestingRunningWndVM
+ Inherits VMBase
+
+#Region "FIELDS & PROPERTIES"
+
+ Friend Event m_CloseWindow(bDialogResult As Boolean)
+
+ Private m_Waiting_Timer As New DispatcherTimer
+ Private m_TotIntervals As Integer = 0
+ Private m_Step As Double = 1
+ Private m_Progress_Value As Double = 0
+ Private m_SectionList As List(Of SParam)
+
+ Public Property Progress_Value As Double
+ Get
+ Return m_Progress_Value
+ End Get
+ Set(value As Double)
+ m_Progress_Value = value
+ End Set
+ End Property
+
+#Region "Messages"
+
+ Public ReadOnly Property NestingRunning_Msg As String
+ Get
+ Return "Nesting running..."
+ End Get
+ End Property
+
+#End Region ' Messages
+
+ ' Definizione comandi
+ Private m_cmdCancel As ICommand
+
+#End Region ' FIELDS & PROPERTIES
+
+ Sub New(SectionList As List(Of SParam), TimeToWait As Double)
+ m_SectionList = SectionList
+ m_TotIntervals = Math.Ceiling(TimeToWait)
+ m_Step = 100 / m_TotIntervals
+ ' avvio contatore
+ m_Waiting_Timer.Interval = TimeSpan.FromMilliseconds(1000)
+ AddHandler m_Waiting_Timer.Tick, AddressOf WaitingTimer_Tick
+ m_Waiting_Timer.Start()
+ End Sub
+
+ Private Sub WaitingTimer_Tick()
+ m_Progress_Value += m_Step
+ NotifyPropertyChanged(NameOf(Progress_Value))
+ End Sub
+
+ Friend Sub DoNesting()
+ Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
+ Dim dSectionTime As Double = GetMainPrivateProfileDouble(S_NEST, K_SECTIONTIME, 1)
+ Dim dPartTime As Double = GetMainPrivateProfileDouble(S_NEST, K_PARTTIME, 1)
+ ' recupero parametri di calcolo
+ Dim dRawL As Double = 0
+ Dim dRawW As Double = 0
+ Dim WhType = GetMainPrivateProfileInt(S_GENERAL, K_WAREHOUSE, 1)
+ Dim sWarehouseIniPath As String = ""
+ Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
+ Dim dStartOffset As Double = 0
+ Dim dKerf As Double = 0
+ Select Case WhType
+ Case WarehouseType.BASIC
+ Dim nQuantity As Integer = WarehouseHelper.GetQuantity(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
+ If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
+ ' leggo lunghezza barra
+ WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, 0, dRawL)
+ ' leggo start offset e quantity
+ dStartOffset = WarehouseHelper.GetStartOffset()
+ ' riporto la stessa lunghezza in tutte le sezioni
+ For Each Section In m_SectionList
+ Section.dL = dRawL
+ Section.nQuantity = nQuantity
+ Next
+ ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
+ If Not WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL) Then
+ ' riabilito interfaccia
+ Map.refProjectVM.SetCalcRunning(False)
+ CloseNesting()
+ Return
+ End If
+ ' leggo kerf e quantity
+ dKerf = WarehouseHelper.GetKerf()
+ ' riporto le stesse dimensioni in tutte le sezioni
+ For Each Section In m_SectionList
+ Section.dL = dRawL
+ Section.dW = dRawW
+ Section.nQuantity = nQuantity
+ Next
+ End If
+ Case WarehouseType.MEDIUM
+ Dim sCurrL As String
+ Dim nIndex As Integer = 1
+ ' aggiungo le sezioni con diverse lunghezze in base al warehouse
+ If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
+ ' leggo start offset
+ dStartOffset = WarehouseHelper.GetStartOffset()
+ ' leggo lunghezza barra e quantity
+ WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, m_SectionList)
+ ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
+ dKerf = WarehouseHelper.GetKerf()
+ If Not WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, m_SectionList) Then
+ ' riabilito interfaccia
+ Map.refProjectVM.SetCalcRunning(False)
+ CloseNesting()
+ Return
+ End If
+ End If
+ End Select
+ ' attivo loading progress
+ Map.refMyStatusBarVM.StartLoading("Nesting started", True)
+ Dim DimensionsList As New List(Of List(Of SParam))
+ ' le raggruppo per sezione
+ For Each Section In m_SectionList
+ Dim Dimension As List(Of SParam) = DimensionsList.FirstOrDefault(Function(x) x(0).SectXMat = Section.SectXMat)
+ If Not IsNothing(Dimension) Then
+ Dimension.Add(Section)
+ Else
+ DimensionsList.Add(New List(Of SParam)({Section}))
+ End If
+ Next
+ ' per ogni gruppo di sezioni
+ For Each Dimension In DimensionsList
+ 'Dim SectionPartList As New List(Of BTLPartM)(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Where(Function(x) x.Section = Section.SectXMat).ToList())
+ Dim SectionPartList As List(Of BTLPartM) = (From x In Map.refProjectVM.BTLStructureVM.BTLPartVMList
+ Where x.Section = Dimension(0).SectXMat AndAlso x.bDO
+ Select x.BTLPartM).ToList()
+ Dim nNestTime As Integer = Math.Max(5, dSectionTime) + (dPartTime * SectionPartList.Count)
+ ' passo a lua lista id pezzi da nestare
+ If Not ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionPartList, Dimension, dStartOffset, dOffset, dKerf, nNestTime) Then
+ Exit For
+ End If
+ Next
+ ' update liste grezzi e pezzi della grafica
+ Map.refProjectVM.MachGroupPanelVM.RefreshMachGroupList()
+ ' disattivo loading progress
+ Map.refMyStatusBarVM.EndLoading("Nesting completed")
+ ' seleziono ultimo gruppo
+ Map.refProjectVM.MachGroupPanelVM.SelLastMachGroup()
+ ' riabilito interfaccia
+ Map.refProjectVM.SetCalcRunning(False)
+ ' fermo timer e chiudo finestra
+ CloseNesting()
+ End Sub
+
+ Private Function CloseNesting()
+ ' fermo timer e chiudo finestra
+ m_Waiting_Timer.Stop()
+ RaiseEvent m_CloseWindow(True)
+ End Function
+
+#Region "COMMANDS"
+
+#Region "Cancel"
+
+ '''
+ ''' Returns a command that do Open.
+ '''
+ Public ReadOnly Property Cancel_Command As ICommand
+ Get
+ If m_cmdCancel Is Nothing Then
+ m_cmdCancel = New Command(AddressOf Cancel)
+ End If
+ Return m_cmdCancel
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Open. This method is invoked by the OpenCommand.
+ '''
+ Friend Sub Cancel()
+ ' chiedo conferma
+ If MessageBox.Show("Are you sure you want to stop the nesting?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then Return
+ ' fermo il nesting
+ Map.refMyStatusBarVM.StopProgress()
+ '' fermo timer e chiudo finestra
+ 'CloseNesting()
+ End Sub
+
+#End Region ' Cancel
+
+#End Region ' COMMANDS
+
+End Class
diff --git a/EgtBEAMWALL.ViewerOptimizer/OptimizePanel/OptimizePanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/OptimizePanel/OptimizePanelVM.vb
index b325d226..e3c53f80 100644
--- a/EgtBEAMWALL.ViewerOptimizer/OptimizePanel/OptimizePanelVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/OptimizePanel/OptimizePanelVM.vb
@@ -61,7 +61,6 @@ Public Class OptimizePanelVM
End Get
End Property
-
#Region "Messages"
Public ReadOnly Property Optimize_Msg As String
@@ -130,102 +129,115 @@ Public Class OptimizePanelVM
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
Dim dSectionTime As Double = GetMainPrivateProfileDouble(S_NEST, K_SECTIONTIME, 1)
Dim dPartTime As Double = GetMainPrivateProfileDouble(S_NEST, K_PARTTIME, 1)
+ Dim dTotSectionTime As Double = 0
+ Dim dTotPartTime As Double = 0
Dim SectionList As New List(Of SParam)
' disabilito interfaccia
Map.refProjectVM.SetCalcRunning(True)
' se ho selezionato nest per materiale e c'è una sezione selezionata diversa da sezione nulla
If m_SelPartType.Id = PartType.MATERIAL AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelSection) AndAlso Map.refProjectVM.BTLStructureVM.SelSection.dH <> -1 Then
SectionList.Add(New SParam(Map.refProjectVM.BTLStructureVM.SelSection, 0, 0))
+ dTotSectionTime = dSectionTime
+ dTotPartTime = dPartTime * Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) If(x.bDO AndAlso x.Section = SectionList(0).SectXMat, 1, 0))
Else
' altrimenti prendo tutte le sezioni
- For Each Section In Map.refProjectVM.BTLStructureVM.SectionList
- If Section.dH = -1 Then Continue For
- SectionList.Add(New SParam(Section, 0, 0))
+ For Each CurrSection In Map.refProjectVM.BTLStructureVM.SectionList
+ If CurrSection.dH = -1 Then Continue For
+ SectionList.Add(New SParam(CurrSection, 0, 0))
+ dTotSectionTime += dSectionTime
Next
+ dTotPartTime = dPartTime * Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) If(x.bDO AndAlso SectionList.Any(Function(y) y.SectXMat = x.Section), 1, 0))
End If
- Dim dRawL As Double = 0
- Dim dRawW As Double = 0
- Dim WhType = GetMainPrivateProfileInt(S_GENERAL, K_WAREHOUSE, 1)
- Dim sWarehouseIniPath As String = ""
- Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
- Dim dStartOffset As Double = 0
- Dim dKerf As Double = 0
- Select Case WhType
- Case WarehouseType.BASIC
- Dim nQuantity As Integer = WarehouseHelper.GetQuantity(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
- If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
- ' leggo lunghezza barra
- WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, 0, dRawL)
- ' leggo start offset e quantity
- dStartOffset = WarehouseHelper.GetStartOffset()
- ' riporto la stessa lunghezza in tutte le sezioni
- For Each Section In SectionList
- Section.dL = dRawL
- Section.nQuantity = nQuantity
- Next
- ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
- If Not WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL) Then
- ' riabilito interfaccia
- Map.refProjectVM.SetCalcRunning(False)
- Return
- End If
- ' leggo kerf e quantity
- dKerf = WarehouseHelper.GetKerf()
- ' riporto le stesse dimensioni in tutte le sezioni
- For Each Section In SectionList
- Section.dL = dRawL
- Section.dW = dRawW
- Section.nQuantity = nQuantity
- Next
- End If
- Case WarehouseType.MEDIUM
- Dim sCurrL As String
- Dim nIndex As Integer = 1
- ' aggiungo le sezioni con diverse lunghezze in base al warehouse
- If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
- ' leggo start offset
- dStartOffset = WarehouseHelper.GetStartOffset()
- ' leggo lunghezza barra e quantity
- WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, SectionList)
- ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
- dKerf = WarehouseHelper.GetKerf()
- If Not WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, SectionList) Then
- ' riabilito interfaccia
- Map.refProjectVM.SetCalcRunning(False)
- Return
- End If
- End If
- End Select
- ' attivo loading progress
- Map.refMyStatusBarVM.StartLoading("Nesting started", True)
- Dim DimensionsList As New List(Of List(Of SParam))
- ' le raggruppo per sezione
- For Each Section In SectionList
- Dim Dimension As List(Of SParam) = DimensionsList.FirstOrDefault(Function(x) x(0).SectXMat = Section.SectXMat)
- If Not IsNothing(Dimension) Then
- Dimension.Add(Section)
- Else
- DimensionsList.Add(New List(Of SParam)({Section}))
- End If
- Next
- ' per ogni gruppo di sezioni
- For Each Dimension In DimensionsList
- 'Dim SectionPartList As New List(Of BTLPartM)(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Where(Function(x) x.Section = Section.SectXMat).ToList())
- Dim SectionPartList As List(Of BTLPartM) = (From x In Map.refProjectVM.BTLStructureVM.BTLPartVMList
- Where x.Section = Dimension(0).SectXMat AndAlso x.bDO
- Select x.BTLPartM).ToList()
- Dim nNestTime As Integer = Math.Max(5, dSectionTime) + (dPartTime * SectionPartList.Count)
- ' passo a lua lista id pezzi da nestare
- ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionPartList, Dimension, dStartOffset, dOffset, dKerf, nNestTime)
- Next
- ' update liste grezzi e pezzi della grafica
- Map.refProjectVM.MachGroupPanelVM.RefreshMachGroupList()
- ' disattivo loading progress
- Map.refMyStatusBarVM.EndLoading("Nesting completed")
- ' seleziono ultimo gruppo
- Map.refProjectVM.MachGroupPanelVM.SelLastMachGroup()
- ' riabilito interfaccia
- Map.refProjectVM.SetCalcRunning(False)
+ ' apro finestra di attesa nesting
+ Dim NestingRunninWndVM As New NestingRunningWndVM(SectionList, dTotSectionTime + dTotPartTime)
+ Dim NestingRunningWnd As New NestingRunningWndV(Application.Current.MainWindow, NestingRunninWndVM)
+ NestingRunningWnd.ShowDialog()
+ '' recupero parametri di calcolo
+ 'Dim dRawL As Double = 0
+ 'Dim dRawW As Double = 0
+ 'Dim WhType = GetMainPrivateProfileInt(S_GENERAL, K_WAREHOUSE, 1)
+ 'Dim sWarehouseIniPath As String = ""
+ 'Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
+ 'Dim dStartOffset As Double = 0
+ 'Dim dKerf As Double = 0
+ 'Select Case WhType
+ ' Case WarehouseType.BASIC
+ ' Dim nQuantity As Integer = WarehouseHelper.GetQuantity(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
+ ' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
+ ' ' leggo lunghezza barra
+ ' WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, 0, dRawL)
+ ' ' leggo start offset e quantity
+ ' dStartOffset = WarehouseHelper.GetStartOffset()
+ ' ' riporto la stessa lunghezza in tutte le sezioni
+ ' For Each Section In SectionList
+ ' Section.dL = dRawL
+ ' Section.nQuantity = nQuantity
+ ' Next
+ ' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
+ ' If Not WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL) Then
+ ' ' riabilito interfaccia
+ ' Map.refProjectVM.SetCalcRunning(False)
+ ' Return
+ ' End If
+ ' ' leggo kerf e quantity
+ ' dKerf = WarehouseHelper.GetKerf()
+ ' ' riporto le stesse dimensioni in tutte le sezioni
+ ' For Each Section In SectionList
+ ' Section.dL = dRawL
+ ' Section.dW = dRawW
+ ' Section.nQuantity = nQuantity
+ ' Next
+ ' End If
+ ' Case WarehouseType.MEDIUM
+ ' Dim sCurrL As String
+ ' Dim nIndex As Integer = 1
+ ' ' aggiungo le sezioni con diverse lunghezze in base al warehouse
+ ' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
+ ' ' leggo start offset
+ ' dStartOffset = WarehouseHelper.GetStartOffset()
+ ' ' leggo lunghezza barra e quantity
+ ' WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, SectionList)
+ ' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
+ ' dKerf = WarehouseHelper.GetKerf()
+ ' If Not WarehouseHelper.GetDimensionsAndQuantityForList(Map.refProjectVM.BTLStructureVM.nPROJTYPE, SectionList) Then
+ ' ' riabilito interfaccia
+ ' Map.refProjectVM.SetCalcRunning(False)
+ ' Return
+ ' End If
+ ' End If
+ 'End Select
+ '' attivo loading progress
+ 'Map.refMyStatusBarVM.StartLoading("Nesting started", True)
+ 'Dim DimensionsList As New List(Of List(Of SParam))
+ '' le raggruppo per sezione
+ 'For Each Section In SectionList
+ ' Dim Dimension As List(Of SParam) = DimensionsList.FirstOrDefault(Function(x) x(0).SectXMat = Section.SectXMat)
+ ' If Not IsNothing(Dimension) Then
+ ' Dimension.Add(Section)
+ ' Else
+ ' DimensionsList.Add(New List(Of SParam)({Section}))
+ ' End If
+ 'Next
+ '' per ogni gruppo di sezioni
+ 'For Each Dimension In DimensionsList
+ ' 'Dim SectionPartList As New List(Of BTLPartM)(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Where(Function(x) x.Section = Section.SectXMat).ToList())
+ ' Dim SectionPartList As List(Of BTLPartM) = (From x In Map.refProjectVM.BTLStructureVM.BTLPartVMList
+ ' Where x.Section = Dimension(0).SectXMat AndAlso x.bDO
+ ' Select x.BTLPartM).ToList()
+ ' Dim nNestTime As Integer = Math.Max(5, dSectionTime) + (dPartTime * SectionPartList.Count)
+ ' ' passo a lua lista id pezzi da nestare
+ ' ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionPartList, Dimension, dStartOffset, dOffset, dKerf, nNestTime)
+ 'Next
+ '' update liste grezzi e pezzi della grafica
+ 'Map.refProjectVM.MachGroupPanelVM.RefreshMachGroupList()
+ '' disattivo loading progress
+ 'Map.refMyStatusBarVM.EndLoading("Nesting completed")
+ '' seleziono ultimo gruppo
+ 'Map.refProjectVM.MachGroupPanelVM.SelLastMachGroup()
+ '' riabilito interfaccia
+ 'Map.refProjectVM.SetCalcRunning(False)
+ '' chiudo finestra di attesa nesting
+ 'NestingRunninWndVM.Cancel()
End Sub
#End Region ' Optimize
diff --git a/EgtBEAMWALL.ViewerOptimizer/StatusBar/MyStatusBarVM.vb b/EgtBEAMWALL.ViewerOptimizer/StatusBar/MyStatusBarVM.vb
index 5bf0b586..ba2970ba 100644
--- a/EgtBEAMWALL.ViewerOptimizer/StatusBar/MyStatusBarVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/StatusBar/MyStatusBarVM.vb
@@ -100,7 +100,7 @@ Public Class MyStatusBarVM
'''
''' Execute the Exec. This method is invoked by the ExecCommand.
'''
- Public Sub StopProgress(ByVal param As Object)
+ Public Sub StopProgress()
m_bStopProgress = True
End Sub
diff --git a/EgtBEAMWALL.ViewerOptimizer/WarehouseWnd/WarehouseHelper.vb b/EgtBEAMWALL.ViewerOptimizer/WarehouseWnd/WarehouseHelper.vb
index 85fc4980..d4e72c32 100644
--- a/EgtBEAMWALL.ViewerOptimizer/WarehouseWnd/WarehouseHelper.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/WarehouseWnd/WarehouseHelper.vb
@@ -144,10 +144,6 @@ Module WarehouseHelper
End Select
nIndex += 1
End While
- 'If CheckList.Count <> SectionList.Count Then Return False
- 'For i = 0 To CheckList.Count - 1
- ' If Not CheckList.Contains(i) Then Return False
- 'Next
SectionList = NewSectionList
Return True
End Function