- gestito stato calcolo con collisioni considerate anche su feature disattivate
- nuova funzione che resetta stato di calcolo - gestito ripristino PosZ dopo modifica dimensioni grezzo - corretta gestione pos X ed Y in CopyPart
This commit is contained in:
@@ -571,7 +571,13 @@ Public MustInherit Class PartVM
|
|||||||
Public Sub CalcGlobalUpdate()
|
Public Sub CalcGlobalUpdate()
|
||||||
m_PartM.nCALC_GlobalState = nCALC_State
|
m_PartM.nCALC_GlobalState = nCALC_State
|
||||||
For Each Feature In FeatureVMList
|
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
|
If Feature.nState > m_PartM.nCALC_GlobalState Then
|
||||||
m_PartM.nCALC_GlobalState = Feature.nState
|
m_PartM.nCALC_GlobalState = Feature.nState
|
||||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.6.1")>
|
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.6.1")>
|
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.6.6.1")]
|
[assembly: AssemblyVersion("2.6.10.1")]
|
||||||
[assembly: AssemblyFileVersion("2.6.6.1")]
|
[assembly: AssemblyFileVersion("2.6.10.1")]
|
||||||
|
|||||||
@@ -248,8 +248,8 @@ Public Class MainWindowM
|
|||||||
EgtSetLockId( sLockId)
|
EgtSetLockId( sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2610, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5327, 2610, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.1.1")>
|
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.1.1")>
|
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.Collections.Specialized
|
Imports System.Collections.Specialized
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
|
Imports System.Windows.Interop
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
@@ -78,14 +79,14 @@ Public Class BTLFeatureVM
|
|||||||
If EgtGetInfo(nFeatureId, "AUXID", sAuxId) Then
|
If EgtGetInfo(nFeatureId, "AUXID", sAuxId) Then
|
||||||
' verifico se ha uno o due percorsi
|
' verifico se ha uno o due percorsi
|
||||||
Dim sAuxIdSplit() As String = sAuxId.Split(","c)
|
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
|
Dim nAuxId As Integer = GDB_ID.NULL
|
||||||
If Integer.TryParse(sAuxIdSplit(0), nAuxId) Then
|
If Integer.TryParse(sAuxIdSplit(0), nAuxId) Then
|
||||||
EgtTransform(nFeatureId + nAuxId, frOld, GDB_RT.GLOB)
|
EgtTransform(nFeatureId + nAuxId, frOld, GDB_RT.GLOB)
|
||||||
EgtTransform(nFeatureId + nAuxId, frNew, GDB_RT.GLOB)
|
EgtTransform(nFeatureId + nAuxId, frNew, GDB_RT.GLOB)
|
||||||
End If
|
End If
|
||||||
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
|
Dim nAux2Id As Integer = GDB_ID.NULL
|
||||||
If Integer.TryParse(sAuxIdSplit(1), nAux2Id) Then
|
If Integer.TryParse(sAuxIdSplit(1), nAux2Id) Then
|
||||||
EgtTransform(nFeatureId + nAux2Id, frOld, GDB_RT.GLOB)
|
EgtTransform(nFeatureId + nAux2Id, frOld, GDB_RT.GLOB)
|
||||||
@@ -327,7 +328,7 @@ Public Class BTLFeatureVM
|
|||||||
AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
|
AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
|
||||||
End Sub
|
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)
|
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_ERR, ITG_PROD_ERR), ERR, True)
|
||||||
EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, 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))
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
End Sub
|
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()
|
Friend Sub ResetCalcFeature()
|
||||||
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_ERR, ITG_PROJ_ERR))
|
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_ERR, ITG_PROJ_ERR))
|
||||||
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_MSG, ITG_PROJ_MSG))
|
EgtRemoveInfo(nFeatureId, If(IsNothing(m_BTLPartM), ITG_PROD_MSG, ITG_PROJ_MSG))
|
||||||
|
|||||||
@@ -1724,8 +1724,14 @@ Public Class BTLPartVM
|
|||||||
m_BTLPartM.nFeaturesGlobalState = CalcStates.NOTCALCULATED
|
m_BTLPartM.nFeaturesGlobalState = CalcStates.NOTCALCULATED
|
||||||
If nState > CalcStates.NOTCALCULATED Then
|
If nState > CalcStates.NOTCALCULATED Then
|
||||||
For Each Feature In BTLFeatureVMList
|
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
|
If ((Feature.nState = CalcStates.NOTCALCULATED And nState < CalcStates.WARNING) Or Not Feature.bDO) And bFeatureFirst Then
|
||||||
m_BTLPartM.nGlobalState = Feature.nState
|
m_BTLPartM.nGlobalState = Feature.nState
|
||||||
m_BTLPartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
m_BTLPartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ Public Class CALCPanelVM
|
|||||||
' Resetto feature in collisione
|
' Resetto feature in collisione
|
||||||
For Each Feature In BTLPart.m_BTLFeatureVMList
|
For Each Feature In BTLPart.m_BTLFeatureVMList
|
||||||
If Feature.nState = CalcStates.COLLISION Then
|
If Feature.nState = CalcStates.COLLISION Then
|
||||||
Feature.CalcFeatureUpdate(0, 0, "")
|
Feature.ResetFeatureError()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
@@ -366,7 +366,7 @@ Public Class CALCPanelVM
|
|||||||
' Resetto feature in collisione
|
' Resetto feature in collisione
|
||||||
For Each Feature As BTLFeatureVM In Part.FeatureVMList
|
For Each Feature As BTLFeatureVM In Part.FeatureVMList
|
||||||
If Feature.nState = CalcStates.COLLISION Then
|
If Feature.nState = CalcStates.COLLISION Then
|
||||||
Feature.CalcFeatureUpdate(0, 0, "")
|
Feature.ResetFeatureError()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -120,6 +120,10 @@ Public Class MyMachGroupVM
|
|||||||
EgtMovePartInRawPart(Part.nPartId, New Vector3d(dValue - MyMachGroupM.dL, 0, 0))
|
EgtMovePartInRawPart(Part.nPartId, New Vector3d(dValue - MyMachGroupM.dL, 0, 0))
|
||||||
Next
|
Next
|
||||||
End If
|
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)
|
EgtSetInfo(Id, MGR_RPT_PANELLEN, dValue)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
MyMachGroupM.dL = dValue
|
MyMachGroupM.dL = dValue
|
||||||
@@ -191,6 +195,10 @@ Public Class MyMachGroupVM
|
|||||||
EgtMovePartInRawPart(Part.nPartId, New Vector3d(0, dValue - MyMachGroupM.dW, 0))
|
EgtMovePartInRawPart(Part.nPartId, New Vector3d(0, dValue - MyMachGroupM.dW, 0))
|
||||||
Next
|
Next
|
||||||
End If
|
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)
|
EgtSetInfo(Id, MGR_RPT_PANELWIDTH, dValue)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
MyMachGroupM.dW = dValue
|
MyMachGroupM.dW = dValue
|
||||||
@@ -526,7 +534,7 @@ Public Class MyMachGroupVM
|
|||||||
nRawId = EgtGetFirstRawPart()
|
nRawId = EgtGetFirstRawPart()
|
||||||
End While
|
End While
|
||||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
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
|
End Function
|
||||||
|
|
||||||
Friend Sub MoveBeam(Beam As PartVM, MoveDirection As MoveDirections)
|
Friend Sub MoveBeam(Beam As PartVM, MoveDirection As MoveDirections)
|
||||||
@@ -899,14 +907,14 @@ Class CopyPart
|
|||||||
Return m_BTLPart
|
Return m_BTLPart
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private m_sPosX As Double
|
Private m_sPosX As String
|
||||||
Public ReadOnly Property sPosX As Double
|
Public ReadOnly Property sPosX As String
|
||||||
Get
|
Get
|
||||||
Return m_sPosX
|
Return m_sPosX
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private m_sPosY As Double
|
Private m_sPosY As String
|
||||||
Public ReadOnly Property sPosY As Double
|
Public ReadOnly Property sPosY As String
|
||||||
Get
|
Get
|
||||||
Return m_sPosY
|
Return m_sPosY
|
||||||
End Get
|
End Get
|
||||||
@@ -924,7 +932,7 @@ Class CopyPart
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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_BTLPart = BTLPart
|
||||||
m_sPosX = sPosX
|
m_sPosX = sPosX
|
||||||
m_sPosY = sPosY
|
m_sPosY = sPosY
|
||||||
|
|||||||
@@ -242,8 +242,8 @@ Public Class MainWindowM
|
|||||||
EgtSetLockId( sLockId)
|
EgtSetLockId( sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2610, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5327, 2610, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.6.1")>
|
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.6.1")>
|
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Global
|
|||||||
{57291955-F9C4-4466-8D53-476D43BA3659}.Debug|x86.ActiveCfg = Debug|x86
|
{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}.Debug|x86.Build.0 = Debug|x86
|
||||||
{57291955-F9C4-4466-8D53-476D43BA3659}.Release|x86.ActiveCfg = Release|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.ActiveCfg = RemoteDebug|x86
|
||||||
{57291955-F9C4-4466-8D53-476D43BA3659}.RemoteDebug|x86.Build.0 = RemoteDebug|x86
|
{57291955-F9C4-4466-8D53-476D43BA3659}.RemoteDebug|x86.Build.0 = RemoteDebug|x86
|
||||||
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x86.ActiveCfg = Debug|x86
|
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
|||||||
Reference in New Issue
Block a user