diff --git a/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb b/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb index 7c59e64c..68472ce0 100644 --- a/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb +++ b/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb @@ -1,4 +1,5 @@ Imports System.Collections.ObjectModel +Imports System.Globalization Imports System.Windows Imports EgtUILib Imports EgtWPFLib5 @@ -129,6 +130,16 @@ Public Class BTLFeatureM End Set End Property + Protected m_VARIANTList As New ObservableCollection(Of Integer)() + Public Property VARIANTList As ObservableCollection(Of Integer) + Get + Return m_VARIANTList + End Get + Set(value As ObservableCollection(Of Integer)) + m_VARIANTList = value + End Set + End Property + Protected m_sDES As String = String.Empty Public Property sDES As String Get @@ -139,6 +150,16 @@ Public Class BTLFeatureM End Set End Property + Public Overridable Property nSelVARIANT As Integer + Get + Dim nDes As Integer = 0 + Return If(Integer.TryParse(m_sDES, nDes), nDes, 0) + End Get + Set(value As Integer) + m_sDES = value.ToString() + End Set + End Property + Protected m_frFRAME As New Frame3d Public Property frFRAME As Frame3d Get @@ -242,6 +263,7 @@ Public Class BTLFeatureM #Region "CONSTRUCTOR" Protected Sub New() + CreateVariantList() End Sub Public Shared Function CreateNewBTLFeature() As BTLFeatureM @@ -256,7 +278,7 @@ Public Class BTLFeatureM EgtGetInfo(nFeatureId, BTL_FTR_GRP, NewBTLFeature.m_nSelGRP) EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.m_nPRC) EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.m_nSelSIDE) - EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPRIORITY) + EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPriority) Dim nDO As Integer = 1 If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then NewBTLFeature.m_bDO = (nDO <> 0) @@ -320,12 +342,23 @@ Public Class BTLFeatureM .m_nSelSIDE = nSIDE, .m_nPriority = 0, .m_bDO = True + .nSelVARIANT = 0 } ' crea parametri per questa feature da file ini NewBTLFeature.CreateFeatureParams(NewBTLFeature) Return NewBTLFeature End Function + Private Sub CreateVariantList() + Dim sMaxIndex As String = "" + Dim nMaxIndex As Integer = 0 + EgtUILib.GetPrivateProfileString([VARIANT], K_MAXINDEX, "", sMaxIndex, m_sBTLIniFile) + Integer.TryParse(sMaxIndex, nMaxIndex) + For Index As Integer = 0 To nMaxIndex + m_VARIANTList.Add(Index) + Next + End Sub + #End Region ' CONSTRUCTOR #Region "METHODS" @@ -361,15 +394,21 @@ Public Class BTLFeatureM Dim TempList As New List(Of BTLParamM) Dim NewBTLParam As BTLParamM = Nothing ' leggo tutti i P della feature - While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam) + While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, True, ParamIndex, Me, NewBTLParam) TempList.Add(NewBTLParam) ParamIndex += 1 End While + If TempList.Count <= 0 Then + While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, 0, True, ParamIndex, Me, NewBTLParam) + TempList.Add(NewBTLParam) + ParamIndex += 1 + End While + End If NewBTLFeature.PBTLParamMList = TempList ' leggo tutti i Q della feature ParamIndex = 1 TempList = New List(Of BTLParamM) - While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam) + While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam) TempList.Add(NewBTLParam) ParamIndex += 1 End While @@ -540,7 +579,7 @@ Public Class BTLFeatureM For Each QPar In QBTLParamMList If QPar.bCustom Then EgtSetInfo(nFeatureId, QPar.sName & "A", 1) Next - EgtSetInfo( nFeatureId, BTL_FTR_PRIORITY, nPriority) + EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority) SetFeatureId(nFeatureId) ' imposto modificato per copie MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId) @@ -593,6 +632,11 @@ Public Class BTLFeatureM Return True End Function + ' funzione che restituisce se la feature è un Variant + Public Function IsVariant() As Boolean + Return m_nPRC = 900 + End Function + #End Region ' METHODS End Class diff --git a/EgtBEAMWALL.Core/BTLViewModel/BTLFeatureVM.vb b/EgtBEAMWALL.Core/BTLViewModel/BTLFeatureVM.vb index 6c10873d..e606ea5c 100644 --- a/EgtBEAMWALL.Core/BTLViewModel/BTLFeatureVM.vb +++ b/EgtBEAMWALL.Core/BTLViewModel/BTLFeatureVM.vb @@ -60,6 +60,15 @@ Public Class BTLFeatureVM End Set End Property + Public Overridable Property nSelVARIANT As Integer + Get + Return m_BTLFeatureM.nSelVARIANT + End Get + Set(value As Integer) + m_BTLFeatureM.nSelVARIANT = value + End Set + End Property + Public ReadOnly Property sName As String Get Return m_BTLFeatureM.sName diff --git a/EgtBEAMWALL.Core/CALCPanel/CalcIntegration.vb b/EgtBEAMWALL.Core/CALCPanel/CalcIntegration.vb index fc74b5cf..a4848d13 100644 --- a/EgtBEAMWALL.Core/CALCPanel/CalcIntegration.vb +++ b/EgtBEAMWALL.Core/CALCPanel/CalcIntegration.vb @@ -577,4 +577,13 @@ Public Class ProcessResult m_nTIME = TIME End Sub + Public Sub ResetTypeFeature() + m_Type = ProcessResultTypes.PART + m_nTASKID = 0 + End Sub + Public Sub ResetTypePart() + m_Type = ProcessResultTypes.BAR + m_nCUTID = 0 + End Sub + End Class diff --git a/EgtBEAMWALL.Core/Constants/ConstBeam.vb b/EgtBEAMWALL.Core/Constants/ConstBeam.vb index 90fc28d2..6ef736c9 100644 --- a/EgtBEAMWALL.Core/Constants/ConstBeam.vb +++ b/EgtBEAMWALL.Core/Constants/ConstBeam.vb @@ -199,12 +199,14 @@ Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE" Public Const PROCESSINGS As String = "Processings" + Public Const [VARIANT] As String = "Variant" Public Const OUTLINE As String = "Outline" Public Const BTL_FTR_GRP As String = "GRP" Public Const BTL_FTR_PRC As String = "PRC" Public Const BTL_FTR_DO As String = "DO" Public Const BTL_FTR_SIDE As String = "SIDE" Public Const BTL_FTR_PRIORITY As String = "PRIORITY" + Public Const BTL_FTR_VARIANT As String = "VARIANT" Public Const BTL_FTR_NAME As String = "NAME" Public Const BTL_FTR_DES As String = "DES" Public Const BTL_FTR_PRID As String = "PRID" diff --git a/EgtBEAMWALL.Core/Constants/ConstGen.vb b/EgtBEAMWALL.Core/Constants/ConstGen.vb index 80e79e0f..315906fb 100644 --- a/EgtBEAMWALL.Core/Constants/ConstGen.vb +++ b/EgtBEAMWALL.Core/Constants/ConstGen.vb @@ -14,9 +14,9 @@ Public Module ConstGen ' File con direttorio radice dei dati - Public Const DAT_FILE_NAME As String = "DataRoot.Ini" - Public Const S_DATA As String = "Data" - Public Const K_DATAROOT As String = "DataRoot" + 'Public Const DAT_FILE_NAME As String = "DataRoot.Ini" + 'Public Const S_DATA As String = "Data" + 'Public Const K_DATAROOT As String = "DataRoot" ' File con dati di licenza Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.lic" @@ -24,6 +24,7 @@ Public Module ConstGen Public Const K_LOCKID As String = "LockId" Public Const K_KEY As String = "Key" Public Const K_NESTKEY As String = "NestKey" + Public Const K_MAXINDEX As String = "MaxIndex" ' Pagine del programma Public Enum Pages As Integer @@ -58,7 +59,7 @@ Public Module ConstGen Public Const SUPGENLOG_FILE_NAME As String = "EgtBEAMWALL.SupervisorLog#.txt" ' Sottodirettorio di configurazione - Public Const CONF_DIR As String = "Config" + 'Public Const CONF_DIR As String = "Config" ' Sottodirettorio delle risorse Public Const RES_DIR As String = "Resources" ' Sottodirettorio temporaneo @@ -80,7 +81,7 @@ Public Module ConstGen ' Sottodirettorio di default per il salvataggio con nome Public Const SAVE_DFL_NAMEDIR As String = "MyProjects" ' Sottodirettorio di default per le macchine - Public Const MACHINES_DFL_DIR As String = "Machines" + 'Public Const MACHINES_DFL_DIR As String = "Machines" ' Sottodirettorio di default per toolmakers Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers" ' Nome file Lua con le funzioni di attrezzaggio diff --git a/EgtBEAMWALL.Core/Constants/ConstIni.vb b/EgtBEAMWALL.Core/Constants/ConstIni.vb index 5317215b..5fc27695 100644 --- a/EgtBEAMWALL.Core/Constants/ConstIni.vb +++ b/EgtBEAMWALL.Core/Constants/ConstIni.vb @@ -43,6 +43,7 @@ Public Module ConstIni Public Const K_WALLBTLFLAG As String = "WallBtlFlag" Public Const K_BTLAUXDIR As String = "BtlAuxDir" Public Const K_WALLOPPOSITESIDENESTING As String = "WallOppositeSideNesting" + Public Const K_BTLAUXDIR As String = "BtlAuxDir" Public Const K_SUPERVISORMACH As String = "SupervisorMach" Public Const K_PASSWORD As String = "Password" diff --git a/EgtBEAMWALL.Core/Constants/ConstMachIni.vb b/EgtBEAMWALL.Core/Constants/ConstMachIni.vb index 680d034b..88a2c898 100644 --- a/EgtBEAMWALL.Core/Constants/ConstMachIni.vb +++ b/EgtBEAMWALL.Core/Constants/ConstMachIni.vb @@ -7,6 +7,9 @@ Public Const K_NCTYPE As String = "NCType" Public Const K_CONNECTIONSTRING As String = "ConnectionString" + Public Const K_SUPERVISOR As String = "Supervisor" + Public Const K_SAVECNCPATH As String = "SaveCncPath" + Public Const K_SAVEEXT As String = "SaveExt" Public Const S_CHANNELS As String = "Channels" diff --git a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb index 97e50609..ce4915cd 100644 --- a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb +++ b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb @@ -573,7 +573,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 6899f1de..2aac6778 100644 --- a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb @@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices - + @@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.Core/Utility/BTLIniFile.vb b/EgtBEAMWALL.Core/Utility/BTLIniFile.vb index 9397b10a..1f6c834d 100644 --- a/EgtBEAMWALL.Core/Utility/BTLIniFile.vb +++ b/EgtBEAMWALL.Core/Utility/BTLIniFile.vb @@ -109,7 +109,7 @@ Public Module BTLIniFile End Function ' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo - Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean + Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IpVariant As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean Dim sBTLParam As String = String.Empty Dim sBWQParam As String = String.Empty If m_nBTLBWType = BWType.BEAM Then @@ -117,7 +117,7 @@ Public Module BTLIniFile ElseIf m_nBTLBWType = BWType.WALL Then sBWQParam = "W" End If - If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then + If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then Dim sBTLParamParams() As String = sBTLParam.Split(","c) ' verifico numero minimo di parametri If sBTLParamParams.Count >= 6 Then diff --git a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs index 72c46d8e..c1d1b578 100644 --- a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs +++ b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Egalware s.r.l.")] [assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")] -[assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")] +[assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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.5.12.2")] -[assembly: AssemblyFileVersion("2.5.12.2")] +[assembly: AssemblyVersion("2.7.1.1")] +[assembly: AssemblyFileVersion("2.7.1.1")] diff --git a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj index a808d663..81008c2a 100644 --- a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj +++ b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj @@ -16,31 +16,6 @@ - - AnyCPU - true - full - true - true - true - bin\Debug\ - EgtBEAMWALL.Supervisor.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - false - - - AnyCPU - pdbonly - false - false - true - false - true - bin\Release\ - EgtBEAMWALL.Supervisor.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - false - On @@ -53,29 +28,6 @@ On - - true - true - true - bin\x64\Debug\ - EgtBEAMWALL.Supervisor.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - x64 - MinimumRecommendedRules.ruleset - false - - - true - bin\x64\Release\ - EgtBEAMWALL.Supervisor.xml - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - pdbonly - x64 - MinimumRecommendedRules.ruleset - false - true true @@ -102,27 +54,6 @@ app.manifest - - true - true - true - bin\RemoteDebug\ - EgtBEAMWALL.Supervisor.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - AnyCPU - - - true - true - true - bin\x64\RemoteDebug\ - EgtBEAMWALL.Supervisor.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - x64 - MinimumRecommendedRules.ruleset - true true diff --git a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb index b0ca6827..9bfb3eea 100644 --- a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb +++ b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowM.vb @@ -259,8 +259,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And - EgtGetKeyOptions(5327, 2512, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And + EgtGetKeyOptions(5327, 2701, 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 e62f11e2..70b5c9dd 100644 --- a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb @@ -30,7 +30,7 @@ Imports System.Windows #End if - + @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.Supervisor/SceneHost/MySceneHostVM.vb b/EgtBEAMWALL.Supervisor/SceneHost/MySceneHostVM.vb index 059c2139..866a4db5 100644 --- a/EgtBEAMWALL.Supervisor/SceneHost/MySceneHostVM.vb +++ b/EgtBEAMWALL.Supervisor/SceneHost/MySceneHostVM.vb @@ -58,6 +58,10 @@ Public Class MySceneHostVM Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle EgtSetMainWindowHandle(hMainWnd) EgtSetCurrentContext(MainScene.GetCtx()) + ' Imposto direttorio ausiliario per import/gestione BTL + Dim sBtlAuxDir As String = String.Empty + GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir) + EgtSetBtlAuxDir(sBtlAuxDir) ' inizializzo gestore travi e pareti EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR) ' inizializzo gestore lavorazioni diff --git a/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb b/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb index 6a818d66..ae561fa8 100644 --- a/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb @@ -364,6 +364,13 @@ Public Class PRC End Get End Property + Private m_nVARIANT As Integer = 0 + Public ReadOnly Property nVARIANT As Integer + Get + Return m_nVARIANT + End Get + End Property + ' Nome Private m_sName As String Public ReadOnly Property sName As String diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb index a8e975cf..6312f28c 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb @@ -1,9 +1,14 @@ Imports System.Collections.ObjectModel Imports System.Collections.Specialized Imports System.ComponentModel +Imports System.Globalization +Imports System.IO +Imports System.Text.RegularExpressions +Imports System.Windows.Interop Imports EgtBEAMWALL.Core Imports EgtUILib Imports EgtWPFLib5 +Imports Mysqlx.XDevAPI.Common Public Class BTLFeatureVM Inherits Core.BTLFeatureVM @@ -78,14 +83,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) @@ -114,6 +119,67 @@ Public Class BTLFeatureVM End Set End Property + Public Property VARIANTList As ObservableCollection(Of Integer) + Get + Return m_BTLFeatureM.VARIANTList + End Get + Set(value As ObservableCollection(Of Integer)) + m_BTLFeatureM.VARIANTList = value + End Set + End Property + + Public Overrides Property nSelVARIANT As Integer + Get + Return m_BTLFeatureM.nSelVARIANT + End Get + Set(value As Integer) + If value <> m_BTLFeatureM.nSelVARIANT Then + m_BTLFeatureM.nSelVARIANT = value + Dim vPar As Double() = Nothing + Dim sPar As String = Nothing + Dim vParQ As String() = Nothing + CreateFeatureVariant(value, vPar, sPar, vParQ) + If IsNothing(vPar) Then + m_BTLFeatureM.nSelVARIANT = 0 + CreateFeatureVariant(value, vPar, sPar, vParQ) + End If + m_BTLFeatureM.nSelVARIANT = value + Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, nSelSIDE, sDES, m_BTLFeatureM.nPRID, + m_BTLFeatureM.frFRAME, vPar, sPar, vParQ) + If bOK Then + EgtDuploSetModified(m_BTLPartM.nPartId) + ' seleziono feature in disegno + SelGeomFeature() + ' rendo non calcolata questa feature + ResetCalcFeature() + End If + NotifyPropertyChanged(NameOf(nSelVARIANT)) + NotifyPropertyChanged(NameOf(PBTLParamVMList)) + NotifyPropertyChanged(NameOf(QBTLParamVMList)) + EgtDraw() + End If + End Set + End Property + + Private Sub CreateFeatureVariant(value As Integer, ByRef vPar() As Double, ByRef sPar As String, ByRef vParQ() As String) + ' crea parametri per questa feature da file ini + m_BTLFeatureM.CreateFeatureParams(m_BTLFeatureM) + m_BTLFeatureM.SetDefaultValues() + CreatePBTLParamVMList() + CreateQBTLParamVMList() + ' aggiorno la feature con nuovo valore + vPar = Nothing + sPar = Nothing + vParQ = Nothing + m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ) + ' imposto path disegno da mostrare in BottomPanel + If value > 0 AndAlso File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png") Then + Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png") + Else + Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png") + End If + End Sub + Public Property sPriority As String Get Return m_BTLFeatureM.nPriority.ToString() @@ -185,7 +251,11 @@ Public Class BTLFeatureVM Public ReadOnly Property sDrawPath As String Get - Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png" + If nPRC = 900 AndAlso nSelVARIANT > 0 Then + Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png" + Else + Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png" + End If End Get End Property @@ -329,7 +399,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) @@ -356,6 +426,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/BTLParamVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb index 64d00fb4..9adf6fff 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb @@ -227,11 +227,9 @@ Public Class BTLParamVM Dim bFound As Boolean = False If Not value Then ' Cerco il parametro Q direttamente nel file ini - Dim GRPType As Integer = Me.m_BTLFeatureM.nSelGRP - Dim PRC As Integer = Me.m_BTLFeatureM.nPRC Dim ParamIndex As String = 1 Dim NewBTLParam As BTLParamM = Nothing - While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, False, ParamIndex, Nothing, NewBTLParam) + While BTLIniFile.GetBeamPrivateProfileParam(Me.m_BTLFeatureM.nSelGRP, Me.m_BTLFeatureM.nPRC, Me.m_BTLFeatureM.nSelVARIANT, False, ParamIndex, Nothing, NewBTLParam) Dim QBTLParam As BTLParamVM = New BTLParamVM(NewBTLParam) If QBTLParam.sName = Me.sName Then Me.sValue = QBTLParam.sDefault diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb index 5fc17ce8..6dbf2539 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLPartVM.vb @@ -1540,10 +1540,26 @@ Public Class BTLPartVM ' aggiorno stato abilitazione del bottone modifica free contour Map.refFeatureManagerVM.SetEditIsEnabled() Map.refFeatureManagerVM.NotifyPropertyChanged(NameOf(Map.refFeatureManagerVM.Priority_Visibility)) + ' Controlo se nPRC è 900 rendo visibile combobox Variant + If m_SelBTLFeatureVM.nPRC = 900 Then + Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible) + Dim nVariant As Integer = 0 + If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then + m_SelBTLFeatureVM.nSelVARIANT = nVariant + End If + If m_SelBTLFeatureVM.nSelVARIANT > 0 AndAlso + System.IO.File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") Then + ' imposto path disegno da mostrare in BottomPanel + Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") + Else + Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png") + End If + Else + Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed) + End If Else EgtDeselectAll() End If - 'Map.refLeftPanelVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() End If If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then @@ -1757,8 +1773,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 c4760a85..8617f55a 100644 --- a/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/CALCPanel/CALCPanelVM.vb @@ -371,7 +371,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 @@ -382,7 +382,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 @@ -403,15 +403,15 @@ Public Class CALCPanelVM ' aggiorno nuovo pezzo CurrBTLPartVM = GetBTLPartVMFromBTLPartId(Line.nCUTID) If IsNothing(CurrBTLPartVM) Then + Line.ResetTypePart() EgtOutLog("Error in CALC ProcessResult. CUTID " & Line.nCUTID & "not found in project(BTLPartVM).") - Continue For End If Else ' aggiorno nuovo pezzo CurrPartVM = GetPartVMFromPartId(Line.nCUTID) If IsNothing(CurrPartVM) Then + Line.ResetTypePart() EgtOutLog("Error in CALC ProcessResult. CUTID " & Line.nCUTID & "not found in project(PartVM).") - Continue For End If End If End If @@ -438,14 +438,14 @@ Public Class CALCPanelVM If nProgramPage = ProjectType.PROJ Then CurrBTLFeatureVM = GetBTLFeatureVMFromBTLPartId(CurrBTLPartVM, Line.nTASKID) If IsNothing(CurrBTLFeatureVM) Then + Line.ResetTypeFeature() EgtOutLog("Error in CALC ProcessResult. TASKID " & Line.nTASKID & "not found in BTLPartVM " & CurrBTLPartVM.nPartId) - Continue For End If Else CurrBTLFeatureVM = GetFeatureVMFromPartId(CurrPartVM, Line.nTASKID) If IsNothing(CurrBTLFeatureVM) Then + Line.ResetTypeFeature() EgtOutLog("Error in CALC ProcessResult. TASKID " & Line.nTASKID & "not found in PartVM " & CurrPartVM.nPartId) - Continue For End If End If Else diff --git a/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb b/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb index 7c17752b..1caa33e4 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb @@ -30,7 +30,7 @@ Public Class ChangeParameterWndVM Dim ParamIndex As Integer = 1 Dim NewBTLParam As BTLParamM = Nothing ' leggo tutti i P della feature - While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, True, ParamIndex, Nothing, NewBTLParam) + While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, m_SelPRC.nVARIANT, True, ParamIndex, Nothing, NewBTLParam) m_ParamList.Add(New Parameters(NewBTLParam)) ParamIndex += 1 End While diff --git a/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb b/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb index b9fe1ea5..7bc9295f 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb @@ -1267,7 +1267,7 @@ Public Class ConfigurationPageVM ParamIndex = 1 TempList = New List(Of QBTLParamVM) If IsP Then - While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam) + While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, 0, IsP, ParamIndex, Nothing, NewBTLParam) TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC)) ParamIndex += 1 End While diff --git a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj index 3953e1a8..f0100df6 100644 --- a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj +++ b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj @@ -15,31 +15,6 @@ - - AnyCPU - true - full - true - true - true - bin\Debug\ - EgtBEAMWALL.ViewerOptimizer.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - false - - - x86 - pdbonly - false - false - true - false - true - bin\Release\ - EgtBEAMWALL.ViewerOptimizer.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - false - On @@ -52,29 +27,6 @@ On - - true - true - true - bin\x64\Debug\ - EgtBEAMWALL.ViewerOptimizer.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - x64 - MinimumRecommendedRules.ruleset - false - - - true - bin\x64\Release\ - EgtBEAMWALL.ViewerOptimizer.xml - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - pdbonly - x64 - MinimumRecommendedRules.ruleset - false - true true @@ -104,27 +56,6 @@ app.manifest - - true - true - true - bin\RemoteDebug\ - EgtBEAMWALL.ViewerOptimizer.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - AnyCPU - - - true - true - true - bin\x64\RemoteDebug\ - EgtBEAMWALL.ViewerOptimizer.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - full - x64 - MinimumRecommendedRules.ruleset - true true diff --git a/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml b/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml index 7bc75e48..d9eb2474 100644 --- a/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml +++ b/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml @@ -32,6 +32,12 @@ Width="45"/> + +