diff --git a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb index 20a247b9..cce8ea1b 100644 --- a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb +++ b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb @@ -571,7 +571,13 @@ Public MustInherit Class PartVM Public Sub CalcGlobalUpdate() m_PartM.nCALC_GlobalState = nCALC_State For Each Feature In FeatureVMList - If Not Feature.bDO Then Continue For + If Not Feature.bDO Then + If Feature.nState = CalcStates.COLLISION AndAlso Feature.nState > m_PartM.nCALC_GlobalState Then + m_PartM.nCALC_GlobalState = Feature.nState + m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR + End If + Continue For + End If 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.Core/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb index 5ec2d0a1..2e4a551e 100644 --- a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb @@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs index 55dee0b1..4c79274a 100644 --- a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs +++ b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.6.6.1")] -[assembly: AssemblyFileVersion("2.6.6.1")] +[assembly: AssemblyVersion("2.6.10.1")] +[assembly: AssemblyFileVersion("2.6.10.1")] diff --git a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb index 4331c0c5..7c389ebd 100644 --- a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb +++ b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb @@ -248,8 +248,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And - EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5327, 2610, 1, m_nKeyLevel) And + EgtGetKeyOptions(5327, 2610, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb index aeb15e71..adbd59db 100644 --- a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb index 7ab66f7d..4ffec589 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb @@ -1,6 +1,7 @@ Imports System.Collections.ObjectModel Imports System.Collections.Specialized Imports System.ComponentModel +Imports System.Windows.Interop Imports EgtBEAMWALL.Core Imports EgtUILib Imports EgtWPFLib5 @@ -78,14 +79,14 @@ Public Class BTLFeatureVM If EgtGetInfo(nFeatureId, "AUXID", sAuxId) Then ' verifico se ha uno o due percorsi Dim sAuxIdSplit() As String = sAuxId.Split(","c) - If Not IsNothing( sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 1 Then + If Not IsNothing(sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 1 Then Dim nAuxId As Integer = GDB_ID.NULL If Integer.TryParse(sAuxIdSplit(0), nAuxId) Then EgtTransform(nFeatureId + nAuxId, frOld, GDB_RT.GLOB) EgtTransform(nFeatureId + nAuxId, frNew, GDB_RT.GLOB) End If End If - If Not IsNothing( sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 2 Then + If Not IsNothing(sAuxIdSplit) AndAlso sAuxIdSplit.Length() >= 2 Then Dim nAux2Id As Integer = GDB_ID.NULL If Integer.TryParse(sAuxIdSplit(1), nAux2Id) Then EgtTransform(nFeatureId + nAux2Id, frOld, GDB_RT.GLOB) @@ -327,7 +328,7 @@ Public Class BTLFeatureVM AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged End Sub - ' funzione che aggiorna lo stato e gli errori dopo calcolo + ' funzione che aggiorna lo stato, la rotazione e gli errori dopo calcolo Friend Sub CalcFeatureUpdate(ERR As Integer, ROT As Integer, MSG As String) EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True) EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, True) @@ -354,6 +355,32 @@ Public Class BTLFeatureVM NotifyPropertyChanged(NameOf(CALC_ERR_Foreground)) End Sub + ' funzione che resetta gli errori del calcolo + Friend Sub ResetFeatureError() + Dim ERR As Integer = 0 + Dim MSG As String = "" + EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True) + EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, True) + m_BTLFeatureM.nCALC_ERR = ERR + m_BTLFeatureM.sCALC_MSG = MSG + Select Case ERR + Case 0 + m_BTLFeatureM.nState = CalcStates.OK + Case 22 + m_BTLFeatureM.nState = CalcStates.COLLISION + Case 17, 19 + m_BTLFeatureM.nState = CalcStates.WARNING + Case < 0 + m_BTLFeatureM.nState = CalcStates.INFO + Case > 0 + m_BTLFeatureM.nState = CalcStates.ERROR_ + End Select + NotifyPropertyChanged(NameOf(Calc_Background)) + NotifyPropertyChanged(NameOf(sCALC_MSG)) + NotifyPropertyChanged(NameOf(CALC_ERR_Letter)) + NotifyPropertyChanged(NameOf(CALC_ERR_Foreground)) + End Sub + Friend Sub ResetCalcFeature() EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_ERR, ITG_PROJ_ERR)) EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_MSG, ITG_PROJ_MSG)) diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb index 878e496d..967de6fb 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb @@ -1724,8 +1724,14 @@ Public Class BTLPartVM m_BTLPartM.nFeaturesGlobalState = CalcStates.NOTCALCULATED If nState > CalcStates.NOTCALCULATED Then For Each Feature In BTLFeatureVMList - If Not Feature.bDO And Not bFeatureFirst Then Continue For - + If Not Feature.bDO And Not bFeatureFirst Then + If Feature.nState = CalcStates.COLLISION AndAlso Feature.nState > m_BTLPartM.nGlobalState Then + m_BTLPartM.nGlobalState = Feature.nState + m_BTLPartM.nCALC_GlobalERR = Feature.nCALC_ERR + Else + Continue For + End If + End If If ((Feature.nState = CalcStates.NOTCALCULATED And nState < CalcStates.WARNING) Or Not Feature.bDO) And bFeatureFirst Then m_BTLPartM.nGlobalState = Feature.nState m_BTLPartM.nCALC_GlobalERR = Feature.nCALC_ERR diff --git a/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb index 000929f7..8c71f028 100644 --- a/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb @@ -355,7 +355,7 @@ Public Class CALCPanelVM ' Resetto feature in collisione For Each Feature In BTLPart.m_BTLFeatureVMList If Feature.nState = CalcStates.COLLISION Then - Feature.CalcFeatureUpdate(0, 0, "") + Feature.ResetFeatureError() End If Next Else @@ -366,7 +366,7 @@ Public Class CALCPanelVM ' Resetto feature in collisione For Each Feature As BTLFeatureVM In Part.FeatureVMList If Feature.nState = CalcStates.COLLISION Then - Feature.CalcFeatureUpdate(0, 0, "") + Feature.ResetFeatureError() End If Next Next diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb index af40f9a0..6b94c402 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupVM.vb @@ -120,6 +120,10 @@ Public Class MyMachGroupVM EgtMovePartInRawPart(Part.nPartId, New Vector3d(dValue - MyMachGroupM.dL, 0, 0)) Next End If + ' ripristino eventuale PosZ + If MyMachGroupM.dPosZ >= 0 Then + EgtMoveRawPart(nRawPartId, New Vector3d(0, 0, MyMachGroupM.dPosZ)) + End If EgtSetInfo(Id, MGR_RPT_PANELLEN, dValue) EgtDraw() MyMachGroupM.dL = dValue @@ -191,6 +195,10 @@ Public Class MyMachGroupVM EgtMovePartInRawPart(Part.nPartId, New Vector3d(0, dValue - MyMachGroupM.dW, 0)) Next End If + ' ripristino eventuale PosZ + If MyMachGroupM.dPosZ >= 0 Then + EgtMoveRawPart(nRawPartId, New Vector3d(0, 0, MyMachGroupM.dPosZ)) + End If EgtSetInfo(Id, MGR_RPT_PANELWIDTH, dValue) EgtDraw() MyMachGroupM.dW = dValue @@ -526,7 +534,7 @@ Public Class MyMachGroupVM nRawId = EgtGetFirstRawPart() End While Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt" - Return ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) + Return ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) End Function Friend Sub MoveBeam(Beam As PartVM, MoveDirection As MoveDirections) @@ -899,14 +907,14 @@ Class CopyPart Return m_BTLPart End Get End Property - Private m_sPosX As Double - Public ReadOnly Property sPosX As Double + Private m_sPosX As String + Public ReadOnly Property sPosX As String Get Return m_sPosX End Get End Property - Private m_sPosY As Double - Public ReadOnly Property sPosY As Double + Private m_sPosY As String + Public ReadOnly Property sPosY As String Get Return m_sPosY End Get @@ -924,7 +932,7 @@ Class CopyPart End Get End Property - Sub New(BTLPart As BTLPartVM, sPosX As Double, sPosY As Double, dRot As Double, nFlip As Integer) + Sub New(BTLPart As BTLPartVM, sPosX As String, sPosY As String, dRot As Double, nFlip As Integer) m_BTLPart = BTLPart m_sPosX = sPosX m_sPosY = sPosY diff --git a/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowM.vb b/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowM.vb index ecdf9632..e56e5846 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowM.vb @@ -242,8 +242,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And - EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5327, 2610, 1, m_nKeyLevel) And + EgtGetKeyOptions(5327, 2610, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb b/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb index 983007ff..2086460f 100644 --- a/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.sln b/EgtBEAMWALL.sln index 2701002d..ae1080f8 100644 --- a/EgtBEAMWALL.sln +++ b/EgtBEAMWALL.sln @@ -21,6 +21,7 @@ Global {57291955-F9C4-4466-8D53-476D43BA3659}.Debug|x86.ActiveCfg = Debug|x86 {57291955-F9C4-4466-8D53-476D43BA3659}.Debug|x86.Build.0 = Debug|x86 {57291955-F9C4-4466-8D53-476D43BA3659}.Release|x86.ActiveCfg = Release|x86 + {57291955-F9C4-4466-8D53-476D43BA3659}.Release|x86.Build.0 = Release|x86 {57291955-F9C4-4466-8D53-476D43BA3659}.RemoteDebug|x86.ActiveCfg = RemoteDebug|x86 {57291955-F9C4-4466-8D53-476D43BA3659}.RemoteDebug|x86.Build.0 = RemoteDebug|x86 {B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x86.ActiveCfg = Debug|x86