Compare commits

..

3 Commits

Author SHA1 Message Date
Demetrio Cassarino ecaedb0ed2 controllo errore script aggiunta pezzo 2024-01-24 10:31:25 +01:00
Demetrio Cassarino 9a0f478529 -aggiunto controllo quando execbeam fallisce 2024-01-18 17:52:24 +01:00
Demetrio Cassarino 70761248ff aggiunto a travi, rotazione e inversione 2024-01-17 09:17:16 +01:00
41 changed files with 475 additions and 484 deletions
+4 -48
View File
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.Globalization
Imports System.Windows
Imports System.Windows.Input
Imports System.Windows.Media
@@ -132,16 +131,6 @@ 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
@@ -152,16 +141,6 @@ 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
@@ -265,7 +244,6 @@ Public Class BTLFeatureM
#Region "CONSTRUCTOR"
Protected Sub New()
CreateVariantList()
End Sub
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
@@ -280,7 +258,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)
@@ -344,22 +322,11 @@ Public Class BTLFeatureM
NewBTLFeature.m_nSelSIDE = nSIDE
NewBTLFeature.m_nPriority = 0
NewBTLFeature.m_bDO = True
NewBTLFeature.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"
@@ -395,21 +362,15 @@ 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, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, 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, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
@@ -584,7 +545,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
EgtDuploSetModified(ParentPart.nPartId)
@@ -637,11 +598,6 @@ 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
@@ -64,15 +64,6 @@ 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
@@ -593,13 +593,4 @@ 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
+2 -2
View File
@@ -144,6 +144,8 @@
Public Const BTL_PRT_INVERTED As String = "INVERTED"
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
Public Const BTL_PRT_VOLUME As String = "VOLUME"
Public Const BTL_PRT_ROT As String = "ROT"
Public Const BTL_PRT_FLIP As String = "FLIP"
' parametri pezzo
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
@@ -201,14 +203,12 @@
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"
+5 -6
View File
@@ -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,7 +24,6 @@ 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
@@ -51,7 +50,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
@@ -71,7 +70,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
-1
View File
@@ -98,7 +98,6 @@ Public Module ConstIni
Public Const K_BTLFLAG As String = "BtlFlag"
Public Const K_WALLBTLFLAG As String = "WallBtlFlag"
Public Const K_WALLOPPOSITESIDENESTING As String = "WallOppositeSideNesting"
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
'Public Const S_MACH As String = "Mach"
'Public Const K_MACHINESDIR As String = "MachinesDir"
@@ -7,9 +7,6 @@
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"
@@ -186,13 +186,7 @@ Public Class MyMachGroupPanelM
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
Dim nCurrPrId As Integer = GDB_ID.NULL
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nCurrPrId) AndAlso nCurrPrId <> GDB_ID.NULL Then
If nCurrPrId < nPRId Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
nPRId += 1
End If
nPRId = Math.Max(nPRId - 1, nCurrPrId) + 1
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
nOutlineId = EgtGetNext(nOutlineId)
Continue While
Else
@@ -231,14 +225,7 @@ Public Class MyMachGroupPanelM
Dim nPRC As Integer
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
nPRId = 0
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
If nPRId < nGlobPRId Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
nPRId = nGlobPRId
nGlobPRId += 1
End If
nGlobPRId = Math.Max(nGlobPRId - 1, nPRId) + 1
Else
If Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
nPRId = nGlobPRId
nGlobPRId += 1
+2
View File
@@ -482,6 +482,8 @@ Public Class PartM
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewPartM.m_sGROUP)
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewPartM.m_sSTOREY)
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewPartM.m_sMATERIAL)
EgtGetInfo(nPartId, BTL_PRT_ROT, NewPartM.m_dROT)
EgtGetInfo(nPartId, BTL_PRT_FLIP, NewPartM.m_nFLIP)
Dim nTemp As Integer = 0
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
nTemp = 0
+1 -7
View File
@@ -571,13 +571,7 @@ Public MustInherit Class PartVM
Public Sub CalcGlobalUpdate()
m_PartM.nCALC_GlobalState = nCALC_State
For Each Feature In FeatureVMList
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 Not Feature.bDO Then Continue For
If Feature.nState > m_PartM.nCALC_GlobalState Then
m_PartM.nCALC_GlobalState = Feature.nState
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
+3 -3
View File
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.4.1")>
<Assembly: AssemblyFileVersion("2.7.4.1")>
<Assembly: AssemblyVersion("2.5.12.2")>
<Assembly: AssemblyFileVersion("2.5.12.2")>
+2 -2
View File
@@ -126,7 +126,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, IpVariant 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, 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
@@ -134,7 +134,7 @@ Public Module BTLIniFile
ElseIf m_nBTLBWType = BWType.WALL Then
sBWQParam = "W"
End If
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
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & 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
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Egalware s.r.l.")]
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
[assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")]
[assembly: AssemblyCopyright("Copyright © 2020-2023 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.7.4.1")]
[assembly: AssemblyFileVersion("2.7.4.1")]
[assembly: AssemblyVersion("2.5.12.2")]
[assembly: AssemblyFileVersion("2.5.12.2")]
@@ -16,6 +16,31 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<IncrementalBuild>true</IncrementalBuild>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugSymbols>false</DebugSymbols>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<IncrementalBuild>false</IncrementalBuild>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
@@ -28,6 +53,29 @@
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
@@ -54,6 +102,27 @@
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\RemoteDebug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\RemoteDebug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
@@ -248,8 +248,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2512, 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())
@@ -30,7 +30,7 @@ Imports System.Windows
#End if
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtBEAMWALL.Supervisor")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.4.1")>
<Assembly: AssemblyFileVersion("2.7.4.1")>
<Assembly: AssemblyVersion("2.5.12.2")>
<Assembly: AssemblyFileVersion("2.5.12.2")>
@@ -58,12 +58,6 @@ 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)
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
End If
' inizializzo gestore travi e pareti
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
' inizializzo gestore lavorazioni
@@ -221,13 +221,6 @@ 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
@@ -1,14 +1,9 @@
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
@@ -83,14 +78,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)
@@ -119,67 +114,6 @@ 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()
@@ -252,11 +186,7 @@ Public Class BTLFeatureVM
Public ReadOnly Property sDrawPath As String
Get
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
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png"
End Get
End Property
@@ -397,7 +327,7 @@ Public Class BTLFeatureVM
AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
End Sub
' funzione che aggiorna lo stato, la rotazione e gli errori dopo calcolo
' funzione che aggiorna lo stato 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)
@@ -424,32 +354,6 @@ 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))
@@ -213,9 +213,11 @@ 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(Me.m_BTLFeatureM.nSelGRP, Me.m_BTLFeatureM.nPRC, Me.m_BTLFeatureM.nSelVARIANT, False, ParamIndex, Nothing, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, False, ParamIndex, Nothing, NewBTLParam)
Dim QBTLParam As BTLParamVM = New BTLParamVM(NewBTLParam)
If QBTLParam.sName = Me.sName Then
Me.sValue = QBTLParam.sDefault
@@ -5,7 +5,6 @@ Imports EgtBEAMWALL.Core
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports System.Windows.Threading
Imports System.Security.Cryptography
Public Class BTLPartVM
Inherits VMBase
@@ -1536,30 +1535,13 @@ 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()
Else
EgtDeselectAll()
End If
EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
Map.refLeftPanelVM.FeatureSelectionChanged()
End If
EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
End Set
End Property
@@ -1742,14 +1724,8 @@ 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
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 Not Feature.bDO And Not bFeatureFirst Then Continue For
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.ResetFeatureError()
Feature.CalcFeatureUpdate(0, 0, "")
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.ResetFeatureError()
Feature.CalcFeatureUpdate(0, 0, "")
End If
Next
Next
@@ -387,15 +387,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
@@ -422,14 +422,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
@@ -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, m_SelPRC.nVARIANT, True, ParamIndex, Nothing, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, True, ParamIndex, Nothing, NewBTLParam)
m_ParamList.Add(New Parameters(NewBTLParam))
ParamIndex += 1
End While
@@ -9,8 +9,6 @@ Imports Ionic.Zip
Imports Org.BouncyCastle.Bcpg
Imports Microsoft.VisualBasic.ApplicationServices
Imports Renci.SshNet.Security
Imports Google.Protobuf.WellKnownTypes
Imports System.Globalization
Public Class ConfigurationPageVM
Inherits VMBase
@@ -962,7 +960,7 @@ Public Class ConfigurationPageVM
ParamIndex = 1
TempList = New List(Of QBTLParamVM)
If IsP Then
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, 0, IsP, ParamIndex, Nothing, NewBTLParam)
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
@@ -16,6 +16,31 @@
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<IncrementalBuild>true</IncrementalBuild>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugSymbols>false</DebugSymbols>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<IncrementalBuild>false</IncrementalBuild>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
@@ -28,6 +53,29 @@
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
@@ -57,6 +105,27 @@
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\RemoteDebug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\RemoteDebug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
@@ -32,12 +32,6 @@
Width="45"/>
<TextBlock Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Variant_Visibility}"
Style="{StaticResource FeatureComboBox}"/>
<Button Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
@@ -1,5 +1,4 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtUILib
Imports EgtWPFLib5
Public Class FeatureManagerVM
@@ -17,18 +16,6 @@ Public Class FeatureManagerVM
End Set
End Property
Private m_Variant_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Variant_Visibility As Visibility
Get
Return m_Variant_Visibility
End Get
End Property
Public Sub SetVariant_Visibility(value As Visibility)
m_Variant_Visibility = value
NotifyPropertyChanged(NameOf(Variant_Visibility))
End Sub
Public ReadOnly Property Edit_IsEnabled As Boolean
Get
Return m_FeatureManager_IsEnabled AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso
@@ -110,6 +97,7 @@ Public Class FeatureManagerVM
NotifyPropertyChanged(NameOf(Edit_IsEnabled))
End Sub
#End Region ' METHODS
End Class
@@ -427,7 +427,7 @@ Public Class FreeContourManagerVM
' posiziono la griglia sul riferimento del contorno libero
Dim frFace As New Frame3d
EgtBeamGetSideData(SelFeature.nSelSIDE, frFace)
Dim frFrame As New Frame3d(SelFeature.BTLFeatureM.frFRAME)
Dim frFrame As Frame3d = SelFeature.BTLFeatureM.frFRAME
frFrame.ToGlob( frFace)
EgtSetGridFrame(frFrame)
EgtSetGridShow(True, True)
@@ -24,7 +24,7 @@
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
MinWidth="28">
<DataGridCheckBoxColumn.Header>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}" HorizontalAlignment="Center"/>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Validità feature-->
@@ -794,6 +794,12 @@ Public Class LeftPanelVM
EgtSetMode(nDuploId, GDB_MD.STD)
nPartDuploIdList.Add(nDuploId)
Next
'' salvo lista info
Dim saveInfoBeamList As MyMachGroupVM = BeamMachGroup
'Dim saveInfoBeamList As New List(Of PartVM)
'For Each info As PartVM In BeamMachGroup.PartVMList
' saveInfoBeamList.Add(info)
'Next
' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
Dim nInsertIndex As Integer
' scrivo dati di tutti i pezzi
@@ -852,7 +858,38 @@ Public Class LeftPanelVM
End While
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
Return False
EgtOutLog("Fallito inserimento grezzo nella barra in AddPartToBeam")
' elimino duplo
For Each nDuploId In nPartDuploIdList
EgtErase(nDuploId)
EgtRemoveRawPart(nDuploId)
Next
' rimuovo info duplo e aggiorno info grezzo
nPartIndex = 0
For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
If nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL > PartsToAdd(0).dL Then
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
nPartIndex += 1
ElseIf nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL < PartsToAdd(0).dL Then
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
nPartIndex += 1
End If
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1)
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(BeamMachGroup.PartVMList(nIndex).dPOSX, 3))
Next
' elimino vecchio grezzo ed eseguo script creazione nuovo
nRawId = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
EgtRemoveRawPart(nRawId)
nRawId = EgtGetFirstRawPart()
End While
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
End If
End If
For nDuploIndex = 0 To PartsToAdd.Count - 1
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
@@ -861,7 +898,11 @@ Public Class LeftPanelVM
' aggiorno lista pezzi
BeamMachGroup.MyMachGroupM.RefreshPartList()
' seleziono pezzo aggiunto
If BeamMachGroup.PartVMList.Count > nInsertIndex Then BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
If BeamMachGroup.PartVMList.Count > nInsertIndex Then
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
Else
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex - 1)
End If
Return True
End Function
@@ -928,15 +969,8 @@ Public Class LeftPanelVM
Case MCH_CR.BR
dPosX = WallMachGroup.dL - PartToAdd.dL - dPosX
End Select
' calcolo box del pezzo e del suo layer box per compensare la eventuale differenza
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartDuploId, GDB_BB.STANDARD, b3Part)
Dim b3Box As New BBox3d
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartDuploId, "Box")
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
' aggiungo il pezzo al grezzo
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX - vtDeltaBox.x, dPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), WallMachGroup.MyMachGroupM.nRawPartId) Then
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX, dPosY, 0), WallMachGroup.MyMachGroupM.nRawPartId) Then
EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, PartToAdd.nROTATED)
@@ -1363,7 +1397,7 @@ Public Class LeftPanelVM
NewFeat.CalcParamArray(vPar, sPar, vParQ)
' aggiorno la feature con nuovo valore
EgtBeamSetPart(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
nNewFeatureId = EgtBeamAddProcess(NewFeat.nSelGRP, NewFeat.nPRC, NewFeat.nSelSIDE, NewFeat.sDES,
nNewFeatureId = EgtBeamAddProcess(NewFeat.nSelGRP, NewFeat.nPRC, NewFeat.nSelSIDE, "",
Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.NewProcId(),
New Frame3d(), vPar, sPar, vParQ, GDB_ID.NULL, GDB_ID.NULL)
bMacroFlag = False
@@ -120,10 +120,6 @@ 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
@@ -195,10 +191,6 @@ 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
@@ -534,7 +526,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)
@@ -907,14 +899,14 @@ Class CopyPart
Return m_BTLPart
End Get
End Property
Private m_sPosX As String
Public ReadOnly Property sPosX As String
Private m_sPosX As Double
Public ReadOnly Property sPosX As Double
Get
Return m_sPosX
End Get
End Property
Private m_sPosY As String
Public ReadOnly Property sPosY As String
Private m_sPosY As Double
Public ReadOnly Property sPosY As Double
Get
Return m_sPosY
End Get
@@ -932,7 +924,7 @@ Class CopyPart
End Get
End Property
Sub New(BTLPart As BTLPartVM, sPosX As String, sPosY As String, dRot As Double, nFlip As Integer)
Sub New(BTLPart As BTLPartVM, sPosX As Double, sPosY As Double, dRot As Double, nFlip As Integer)
m_BTLPart = BTLPart
m_sPosX = sPosX
m_sPosY = sPosY
@@ -201,19 +201,47 @@ Public Class PartVM
' recupero box del layer box
Dim b3Box As New BBox3d
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
If EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB) Then
Dim vtAxes As Vector3d
' se travi ruoto attorno all'asse Z
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
vtAxes = Vector3d.Z_AX
' se pareti ruoto attorno all'asse X
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
vtAxes = Vector3d.X_AX
End If
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
m_PartM.nFLIP = If(value, 180, 0)
EgtSetInfo(nPartId, MGR_PRT_FLIP, If(value, 180, 0))
Else
NotifyPropertyChanged(NameOf(bFLIP))
End If
' recupero box del pezzo
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
' calcolo distanza tra i box
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
' reinserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), ParentMachGroupVM.MyMachGroupM.nRawPartId)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
' recupero box del pezzo
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
' calcolo distanza tra i box
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
' reinserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
' elimino vecchio grezzo ed eseguo script creazione nuovo
DeleteOldRaw()
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
EgtOutLog("Fallita creazione barra nell'ExecBeam in bFlip")
' elimino vecchio grezzo ed eseguo script creazione nuovo
DeleteOldRaw()
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
m_PartM.nFLIP = 180
EgtSetInfo(nPartId, MGR_PRT_FLIP, 180)
Else
NotifyPropertyChanged(NameOf(m_PartM.nFLIP))
End If
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
End If
End If
End If
' lo riseleziono
EgtSelectObj(nPartId)
' resetto validazione del pezzo
@@ -289,66 +317,140 @@ Public Class PartVM
End Sub
Private Sub Rotate(IsPositive As Boolean)
' salvo posizione
Dim dTempPosX As Double = m_PartM.dPOSX
Dim dTempPosY As Double = m_PartM.dPOSY
' tolgo il pezzo dal grezzo
EgtRemovePartFromRawPart(nPartId)
' recupero layer del box
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' recupero box del layer box
Dim b3Box As New BBox3d
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
' se invertito lo reinverto
Dim bFliped As Boolean = bFLIP
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
Dim dAng As Double = If(IsPositive, 90, -90)
' eseguo rotazione
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
If bOk Then
Dim TempRot = m_PartM.dROT
TempRot += dAng
If TempRot >= 360 Then
TempRot -= 360
ElseIf TempRot < 0 Then
TempRot += 360
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
' elimino vecchio grezzo ed eseguo script creazione nuovo
DeleteOldRaw()
' recupero layer del box
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' recupero box del layer box
Dim b3Box As New BBox3d
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
' se invertito lo reinverto
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
' eseguo rotazione attorno asse X
Dim dRot As Integer = 0
If dW <> dH Then
dRot = If(IsPositive, 180, -180)
ElseIf dW = dH Then
dRot = If(IsPositive, 90, -90)
End If
m_PartM.dROT = TempRot
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
End If
' ripristino eventuale inversione
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
' recupero box del pezzo
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
'aggiorno box del box con rotazione
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
' calcolo distanza tra i box
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
' calcolo posizione rispetto al riferimento
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
Case BWType.WALL
' se parete, valuto angolo di posizionamento
Select Case CurrentMachine.NestingCorner
Case MCH_CR.TL
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
dTempPosY = dTempPosY - dW + dL
Case MCH_CR.BL
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRot, GDB_RT.GLOB)
If bOk Then
Dim TempRot = m_PartM.dROT
TempRot += dRot
If TempRot >= 360 Then
TempRot -= 360
ElseIf TempRot < 0 Then
TempRot += 360
End If
m_PartM.dROT = TempRot
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
End If
' ripristino eventuale inversione
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
EgtOutLog("Fallita creazione barra nell'ExecBeam in Rotate")
' elimino vecchio grezzo ed eseguo script creazione nuovo
DeleteOldRaw()
' annullo Flip
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
' ripristino rotazione
Dim dRotation As Integer = 0
If dW <> dH Then
dRotation = m_PartM.dROT + dRot
m_PartM.dROT = dRotation
If dRotation >= 360 Then
dRotation = dRot
m_PartM.dROT = 0
End If
ElseIf dW = dH Then
dRotation = m_PartM.dROT - dRot
If dRotation = 0 Then
dRotation = 3 * dRot
m_PartM.dROT = 0
ElseIf dRotation = 90 Then
dRotation += 2 * dRot
m_PartM.dROT = 90
ElseIf dRotation = 180 Then
dRotation += dRot
m_PartM.dROT = 180
ElseIf dRotation < 0 Then
dRotation += 4 * dRot
m_PartM.dROT = 270
End If
End If
EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRotation, GDB_RT.GLOB)
' salvo informazione
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
' annullo Flip
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
End If
NotifyPropertyChanged(NameOf(m_PartM.dROT))
End If
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
' salvo posizione
Dim dTempPosX As Double = m_PartM.dPOSX
Dim dTempPosY As Double = m_PartM.dPOSY
' tolgo il pezzo dal grezzo
EgtRemovePartFromRawPart(nPartId)
' recupero layer del box
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' recupero box del layer box
Dim b3Box As New BBox3d
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
' se invertito lo reinverto
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
Dim dAng As Double = If(IsPositive, 90, -90)
' eseguo rotazione
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
If bOk Then
Dim TempRot = m_PartM.dROT
TempRot += dAng
If TempRot >= 360 Then
TempRot -= 360
ElseIf TempRot < 0 Then
TempRot += 360
End If
m_PartM.dROT = TempRot
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
End If
' ripristino eventuale inversione
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
' recupero box del pezzo
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
'aggiorno box del box con rotazione
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
' calcolo distanza tra i box
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
' calcolo posizione rispetto al riferimento
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
Case BWType.WALL
' se parete, valuto angolo di posizionamento
Select Case CurrentMachine.NestingCorner
Case MCH_CR.TL
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
dTempPosY = dTempPosY - dW + dL
Case MCH_CR.BL
'vtDeltaBox = b3Box.Min - b3Part.Min
' non cambio posizioni
Case MCH_CR.TR
'vtDeltaBox = b3Box.Max - b3Part.Max
dTempPosX = dTempPosX - dL + dW
dTempPosY = dTempPosY - dW + dL
Case MCH_CR.BR
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
dTempPosX = dTempPosX - dL + dW
End Select
Case Else
' non cambio nulla
End Select
' reinserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
Case MCH_CR.TR
'vtDeltaBox = b3Box.Max - b3Part.Max
dTempPosX = dTempPosX - dL + dW
dTempPosY = dTempPosY - dW + dL
Case MCH_CR.BR
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
dTempPosX = dTempPosX - dL + dW
End Select
Case Else
' non cambio nulla
End Select
' reinserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
End If
' lo riseleziono
EgtSelectObj(nPartId)
' resetto validazione del pezzo
@@ -356,6 +458,14 @@ Public Class PartVM
NotifyPropertyChanged(NameOf(sROT))
End Sub
Private Sub DeleteOldRaw()
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
EgtRemoveRawPart(nRawId)
nRawId = EgtGetFirstRawPart()
End While
End Sub
Friend Sub SelectBTLPart()
' eseguo la selezione nella lista pezzi
Dim nBTLPartId As Integer = MyMachGroupPanelM.DuploGetOriginal(nPartId)
@@ -242,8 +242,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2512, 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())
@@ -30,7 +30,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtBEAMWALL.ViewerOptimizer")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.4.1")>
<Assembly: AssemblyFileVersion("2.7.4.1")>
<Assembly: AssemblyVersion("2.5.12.2")>
<Assembly: AssemblyFileVersion("2.5.12.2")>
@@ -611,32 +611,27 @@ Public Class ProdManagerVM
''' </summary>
Friend Sub GoToSupervisor()
If IsNothing(m_CurrProd) Then Return
' verifico se modalita' supervisore attiva
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
' apro supervisore
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
' recupero processo del supervisore
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
If localProc.Length > 0 Then
For Each p As Process In localProc
' porto in primo piano il Supervisor
BringWindowToFront(p.MainWindowHandle)
Exit For
Next
Else
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
Try
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
Catch ex As Exception
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
End Try
End If
' mando richiesta di apertura progetto in supervisore
'Dim x = DbControllers.m_StatusMapController.GetProd
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, Map.refProdManagerVM.CurrProd.nProdId, Map.refProdManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
' apro supervisore
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
' recupero processo del supervisore
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
If localProc.Length > 0 Then
For Each p As Process In localProc
' porto in primo piano il Supervisor
BringWindowToFront(p.MainWindowHandle)
Exit For
Next
Else
MessageBox.Show("Supervisor is not available for this machine!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
Try
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
Catch ex As Exception
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
End Try
End If
' mando richiesta di apertura progetto in supervisore
'Dim x = DbControllers.m_StatusMapController.GetProd
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, Map.refProdManagerVM.CurrProd.nProdId, Map.refProdManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
End Sub
#End Region ' GoToSupervisor
@@ -1484,13 +1484,7 @@ Public Class ProjManagerVM
' creo cartella temporanea di estrazione in Temp
Dim sProjectimportDir As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\ProjectImport"
If Directory.Exists(sProjectimportDir) Then
Try
Directory.Delete(sProjectimportDir, True)
Catch ex As Exception
EgtOutLog("Delete old import project failed!")
MessageBox.Show("Importazione Fallita!", "Errore", MessageBoxButton.OK, MessageBoxImage.Error)
Return
End Try
Directory.Delete(sProjectimportDir, True)
End If
Directory.CreateDirectory(sProjectimportDir)
Try
@@ -65,12 +65,6 @@ 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)
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
End If
' inizializzo gestore travi e pareti
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
' inizializzo gestore lavorazioni
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
@@ -241,32 +240,8 @@ Public Class TopPanelVM
Map.refCALCPanelVM.Verify()
Return
End If
' verifico se modalita' supervisore attiva
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
If Not Produce(Map.refMachGroupPanelVM.SelectedMachGroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
MessageBox.Show(ErrorMsg)
End If
Else
' altrimenti lo copio se path disponibile
If Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.OK Or Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.INFO Then
Dim sSaveCncPath As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
Dim sSaveExt As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVEEXT, "", sSaveExt, CurrentMachine.sMachIniFile)
If String.IsNullOrWhiteSpace(sSaveExt) Then
sSaveExt = ".cnc"
ElseIf sSaveExt(0) <> "." Then
sSaveExt = "." & sSaveExt
End If
Try
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
File.Copy(sMachGroupFilePath, sNewPath, True)
MessageBox.Show(String.Format("File copied! You can find it at {0}", {sNewPath}), "Info", MessageBoxButton.OK, MessageBoxImage.Information)
Catch ex As Exception
MessageBox.Show(String.Format("Copy to {0} folder failed!", {sSaveCncPath}), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End Try
End If
If Not Produce(Map.refMachGroupPanelVM.SelectedMachGroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
MessageBox.Show(ErrorMsg)
End If
End Sub
@@ -331,43 +306,12 @@ Public Class TopPanelVM
End If
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 0 Then
Dim MachgroupErrorList As New List(Of MachGroupVM)
Dim sErrorMessage As String = ""
Dim bErrorMessage As Boolean = False
For Each Machgroup In Map.refMachGroupPanelVM.MachGroupVMList
' verifico se modalita' supervisore attiva
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
Dim ErrorMsg As String = ""
If Not Produce(Machgroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
MachgroupErrorList.Add(Machgroup)
End If
Else
' altrimenti lo copio se path disponibile
If Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.OK Or Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.INFO Then
Dim sSaveCncPath As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
Dim sSaveExt As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVEEXT, "", sSaveExt, CurrentMachine.sMachIniFile)
If String.IsNullOrWhiteSpace(sSaveExt) Then
sSaveExt = ".cnc"
ElseIf sSaveExt(0) <> "." Then
sSaveExt = "." & sSaveExt
End If
If String.IsNullOrWhiteSpace(sSaveCncPath) OrElse Not Directory.Exists(sSaveCncPath) Then Return
Try
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Machgroup.Name.ToString() & sSaveExt
File.Copy(sMachGroupFilePath, sNewPath, True)
sErrorMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
Catch ex As Exception
sErrorMessage &= String.Format("Copy to {0} folder failed!", {sSaveCncPath}) & Environment.NewLine
End Try
End If
Dim ErrorMsg As String = ""
If Not Produce(Machgroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
MachgroupErrorList.Add(Machgroup)
End If
Next
If Not String.IsNullOrWhiteSpace(sErrorMessage) Then
sErrorMessage = "Results for all the parts generated:" & Environment.NewLine & sErrorMessage
MessageBox.Show(sErrorMessage, If(bErrorMessage, "Error", "Info"), MessageBoxButton.OK, MessageBoxImage.Information)
End If
If MachgroupErrorList.Count > 0 Then
Dim sMachGroups As String = ""
For Each MachGroup In MachgroupErrorList
+25
View File
@@ -13,33 +13,58 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtBEAMWALL.Core", "EgtBEAM
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
RemoteDebug|x64 = RemoteDebug|x64
RemoteDebug|x86 = RemoteDebug|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{57291955-F9C4-4466-8D53-476D43BA3659}.Debug|x64.ActiveCfg = Debug|x64
{57291955-F9C4-4466-8D53-476D43BA3659}.Debug|x64.Build.0 = Debug|x64
{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|x64.ActiveCfg = Release|x64
{57291955-F9C4-4466-8D53-476D43BA3659}.Release|x64.Build.0 = Release|x64
{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|x64.ActiveCfg = RemoteDebug|x64
{57291955-F9C4-4466-8D53-476D43BA3659}.RemoteDebug|x64.Build.0 = RemoteDebug|x64
{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|x64.ActiveCfg = Debug|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x64.Build.0 = Debug|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x86.ActiveCfg = Debug|x86
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Debug|x86.Build.0 = Debug|x86
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Release|x64.ActiveCfg = Release|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Release|x64.Build.0 = Release|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Release|x86.ActiveCfg = Release|x86
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.Release|x86.Build.0 = Release|x86
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.RemoteDebug|x64.ActiveCfg = RemoteDebug|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.RemoteDebug|x64.Build.0 = RemoteDebug|x64
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.RemoteDebug|x86.ActiveCfg = RemoteDebug|x86
{B71DA327-38C8-4305-BBA1-34F3F3F32405}.RemoteDebug|x86.Build.0 = RemoteDebug|x86
{24D7760E-662A-47E4-B729-B70126C24A31}.Debug|x64.ActiveCfg = Debug|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Debug|x64.Build.0 = Debug|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Debug|x86.ActiveCfg = Debug|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Debug|x86.Build.0 = Debug|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Release|x64.ActiveCfg = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Release|x64.Build.0 = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Release|x86.ActiveCfg = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.Release|x86.Build.0 = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.RemoteDebug|x64.ActiveCfg = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.RemoteDebug|x86.ActiveCfg = Release|Any CPU
{24D7760E-662A-47E4-B729-B70126C24A31}.RemoteDebug|x86.Build.0 = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Debug|x64.ActiveCfg = Debug|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Debug|x64.Build.0 = Debug|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Debug|x86.ActiveCfg = Debug|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Debug|x86.Build.0 = Debug|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Release|x64.ActiveCfg = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Release|x64.Build.0 = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Release|x86.ActiveCfg = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.Release|x86.Build.0 = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.RemoteDebug|x64.ActiveCfg = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.RemoteDebug|x86.ActiveCfg = Release|Any CPU
{F22835A1-83D8-4334-91BB-BAAEB9CF59B1}.RemoteDebug|x86.Build.0 = Release|Any CPU
EndGlobalSection
Binary file not shown.
Binary file not shown.