- Correzione aggiornamento messaggio errore dopo CALC

- Aggiunta opzione abilitadisabilita area pnte lunghe in nesting
This commit is contained in:
Emmanuele Sassi
2021-12-02 11:43:54 +01:00
parent a26e25b253
commit 28ca22ee35
5 changed files with 28 additions and 4 deletions
@@ -1546,6 +1546,9 @@ Public Class BTLPartVM
nState = CalcStates.ERROR_
End Select
NotifyPropertyChanged(NameOf(Calc_BorderBrush))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(sCALC_MSG))
End Sub
Friend Sub ResetCalcPart()
@@ -1567,6 +1570,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(sCALC_MSG))
End Sub
Friend Sub ResetCalcTotalPart()
@@ -1611,6 +1615,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
NotifyPropertyChanged(NameOf(sCALC_MSG))
m_Calc_PartEnd = True
End Sub
@@ -36,6 +36,8 @@ Public Class NestingRunningWndVM
End Get
End Property
Private m_bLDIntersOther As Boolean
Private m_CurrProgress_Value As Double = 0
Public Property CurrProgress_Value As Double
Get
@@ -99,8 +101,9 @@ Public Class NestingRunningWndVM
#End Region ' FIELDS & PROPERTIES
Sub New(OperationType As OperationTypes, SelPartType As Integer)
Sub New(OperationType As OperationTypes, SelPartType As Integer, Optional bLDIntersOther As Boolean = False)
m_OperationType = OperationType
m_bLDIntersOther = bLDIntersOther
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)
@@ -248,7 +251,7 @@ Public Class NestingRunningWndVM
Dim SectionProgress As SectionProgress = m_SectionProgressList(m_SectionIndex)
' passo a lua lista id pezzi da nestare
If SectionProgress.SectionPartList.Count > 0 AndAlso SectionProgress.SParamList.Count > 0 AndAlso
Not ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionProgress.SectionPartList, SectionProgress.SParamList, dStartOffset, dOffset, dKerf, SectionProgress.dCalcNestTime) Then
Not ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionProgress.SectionPartList, SectionProgress.SParamList, dStartOffset, dOffset, dKerf, m_bLDIntersOther, SectionProgress.dCalcNestTime) Then
Exit For
End If
Next
@@ -18,6 +18,10 @@
Width="85"
Margin="2.5,0,5,0"
Visibility="Collapsed"/>
<CheckBox Content="LongDrill"
IsChecked="{Binding bLDIntersOther}"
VerticalAlignment="Center"
Visibility="{Binding MachiningPage_Visibility}"/>
<Button Content="{Binding Optimize_Msg}"
Width="70"
@@ -58,6 +58,16 @@ Public Class OptimizePanelVM
End Set
End Property
Private m_bLDIntersOther As Boolean
Public Property bLDIntersOther As Boolean
Get
Return m_bLDIntersOther
End Get
Set(value As Boolean)
m_bLDIntersOther = value
End Set
End Property
Private m_Optimize_IsEnabled As Boolean = True
Public ReadOnly Property Optimize_IsEnabled As Boolean
Get
@@ -112,6 +122,7 @@ Public Class OptimizePanelVM
Map.SetRefOptimizePanelVM(Me)
m_SelPartType = PartTypeList(0)
m_SelOriginType = OriginTypeList(0)
m_bLDIntersOther = False
NotifyPropertyChanged(NameOf(SelPartType))
End Sub
@@ -225,7 +236,7 @@ Public Class OptimizePanelVM
If IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.BTLStructureVM.BTLPartVMList) OrElse Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count = 0 Then Return
' apro finestra di attesa nesting
m_bNestingRunning = True
Dim NestingRunningWndVM As New NestingRunningWndVM(NestingRunningWndVM.OperationTypes.NESTING, m_SelPartType.Id)
Dim NestingRunningWndVM As New NestingRunningWndVM(NestingRunningWndVM.OperationTypes.NESTING, m_SelPartType.Id, m_bLDIntersOther)
Dim NestingRunningWnd As New NestingRunningWndV(Application.Current.MainWindow, NestingRunningWndVM)
NestingRunningWnd.ShowDialog()
m_bNestingRunning = False
@@ -70,7 +70,7 @@ Module LuaExec
Return bOk
End Function
Friend Function ExecNesting(sFile As String, sMachine As String, PartList As List(Of BTLPartM), SectionList As List(Of SParam), dStartOffset As Double, dOffset As Double, dKerf As Double, nNestTime As Integer) As Boolean
Friend Function ExecNesting(sFile As String, sMachine As String, PartList As List(Of BTLPartM), SectionList As List(Of SParam), dStartOffset As Double, dOffset As Double, dKerf As Double, bLDIntersOther As Boolean, nNestTime As Integer) As Boolean
If PartList.Count = 0 Then
EgtOutLog("Exit nesting: no parts received!")
Return True
@@ -100,6 +100,7 @@ Module LuaExec
EgtLuaSetGlobNumVar("NEST.STARTOFFSET", dStartOffset)
EgtLuaSetGlobNumVar("NEST.OFFSET", dOffset)
EgtLuaSetGlobNumVar("NEST.KERF", dKerf)
EgtLuaSetGlobBoolVar("NEST.DRILL_MACH_AREA", bLDIntersOther)
Dim nNestCorner As Integer
Select Case CurrentMachine.NestingCorner
Case MCH_CR.TL