- 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()
|
||||
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
|
||||
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' 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")>
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.6.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.1.1")>
|
||||
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||
|
||||
@@ -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
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' 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")>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user