Compare commits

..

20 Commits

Author SHA1 Message Date
Nicola Pievani 2eff34e8b6 Correzione gestione uscita pagina DrawPage 2024-03-04 09:41:06 +01:00
Nicola Pievani e119e9673a Aggiornamento versione e logo 2024-03-01 13:01:01 +01:00
Nicola Pievani fd32ba3ea1 Gestione risoluzione immagini VeinMatch 2024-02-23 14:57:21 +01:00
Nicola Pievani 10972a466d Correzione gestione visualizzazione Tool Probe 2024-02-20 17:21:11 +01:00
Nicola Pievani 68cdd41b20 Aggiornamento versione 2.6b1 2024-02-13 15:34:05 +01:00
Nicola Pievani cf23a2b7c2 Merge commit '67c2a9d0ec787dbe69b7e36ba77f316574a72c7e' into develop 2024-02-09 18:14:06 +01:00
Nicola Pievani 67c2a9d0ec Aggiunti messaggi per gestione CUT_LIGHT 2024-02-09 18:13:54 +01:00
Nicola Pievani 7b70a27ff4 Merge commit '00c37ad74f982da20d512b6f173ac4ea7308949e' 2024-02-09 18:10:07 +01:00
Nicola Pievani 00c37ad74f Merge commit 'fcca1ed72ccbddf31f0f4d82d40720d7b9fea51a' into develop 2024-02-09 18:09:40 +01:00
Nicola Pievani 18e079d235 Merge commit 'f734885de5ac88be73e5c6ecd55640e04308453f' 2024-02-09 17:59:18 +01:00
Nicola Pievani f734885de5 Merge commit '0cc673b047f4bcde9413f53ae38ce926fa64bded' into develop 2024-02-09 17:59:06 +01:00
Nicola Pievani 0cc673b047 Nuova gestione chiave di protezione CUT_LIGHT 2024-02-09 17:58:33 +01:00
Nicola Pievani acc1365fd2 Correzione init chiave per CUT_LIGHT 2024-02-09 15:38:37 +01:00
Nicola Pievani 7dcf1fe8dc Inserita lettura Flag CUT_LIGHT 2024-02-09 15:09:53 +01:00
Nicola Pievani fcca1ed72c - Inseriti commenti per lettura variabili CurrPhase - Definizione nome programma tagli diretti 2024-02-08 18:12:46 +01:00
Nicola Pievani 36b667fcc5 Lettura variabile opzionale della fase corrente 2024-02-08 12:18:00 +01:00
Nicola Pievani cd748dea7a Cambio nome variabile 2024-02-08 09:32:02 +01:00
Nicola Pievani c2f03a883a Inserito commeto per gestione chiave di protezione 2024-02-07 18:11:40 +01:00
Nicola Pievani 9b09eeaa9c Aggiunta variabile per gestione OnlyFrame 2024-02-07 18:04:59 +01:00
Nicola Pievani fa0bc2ffdd Merge commit 'b8143b0ff5bb39b67934a00be673c1f13f151897' 2024-01-11 19:29:40 +01:00
17 changed files with 103 additions and 35 deletions
+2
View File
@@ -287,6 +287,8 @@ Module ConstIni
Public Const S_VEINMATCHING As String = "VeinMatching"
Public Const K_VEINMA_ENABLE As String = "Enable"
Public Const K_VEINMA_PLACE As String = "WinPlace"
Public Const K_VEINMA_WIDTH As String = "Width"
Public Const K_VEINMA_HEIGHT As String = "Height"
Public Const S_FASTGRID As String = "FastGrid"
Public Const K_FG_ENABLE As String = "FGEnable"
+4 -2
View File
@@ -600,13 +600,15 @@ Public Class FlatteningCut
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+4 -2
View File
@@ -535,13 +535,15 @@ Public Class GridCut
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+4 -2
View File
@@ -580,13 +580,15 @@ Public Class MultipleCut
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+4 -2
View File
@@ -180,13 +180,15 @@ Public Class Polishing
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+4 -2
View File
@@ -450,13 +450,15 @@ Public Class SawTestUC
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+4 -2
View File
@@ -584,13 +584,15 @@ Public Class SingleCutUC
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript( True)
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
+3 -1
View File
@@ -371,8 +371,10 @@ Public Class SingleDrillUC
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
+3 -1
View File
@@ -287,8 +287,10 @@ Public Class SquaringUC
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
Return
End If
Dim sNameProg As Integer = 900
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
+2 -1
View File
@@ -1190,7 +1190,7 @@ Public Class DrawPageUC
If Keyboard.Modifiers And ModifierKeys.Shift Then
bExitPage = Not bExitPage
End If
If bExitPage And m_MainWindow.FrameCutBtn.IsChecked Then
If bExitPage Then
' Aggiorno ambiente principale
EgtZoom(ZM.ALL)
' Elimino nome del componente precedente
@@ -1217,6 +1217,7 @@ Public Class DrawPageUC
Else
LoadSecondaryPage()
End If
End If
End Sub
+1 -1
View File
@@ -700,7 +700,7 @@ Public Class ToolsDbPageUC
If nTType <> MCH_TY.MILL_STD Then
' se utensile diverso da MILL
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
ElseIf nTType <> MCH_TY.MILL_STD And ToolName.Trim.ToLower = "probe" And nDebug > 4 Then
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or nDebug > 4) Then
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
End If
+45 -6
View File
@@ -23,6 +23,9 @@ Class MainWindow
' Coefficiente di scalatura della finestra rispetto a standard
Friend m_dMWinScale As Double = 1
' Variabile che definisce l'avvio forzato in modalità FRAME
Friend m_OnlyFrame As Boolean = False
' Dichiarazione delle Page UserControl
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
@@ -101,6 +104,7 @@ Class MainWindow
REGISTRATION = 2 ^ 20 ' 1048576
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
COMPOFRAME = 2 ^ 22 ' 4194304
CUT_LIGHT = 2 ^ 23 ' 8388608
End Enum
' Opzione nesting automatico
Private m_bAutoNest As Boolean = False
@@ -339,10 +343,16 @@ Class MainWindow
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2601, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2601, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2603, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2603, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
If Not bProd Then
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
End If
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -1135,7 +1145,7 @@ Class MainWindow
End If
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
EgtOutLog("Iniziato processo di chiusura programma")
m_IsClosingApplication = If( m_CNCommunication.m_nNCType = 1, 1, 2)
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
Dim nCount As Integer = 0
While m_IsClosingApplication <> 2
If nCount > 5 Then
@@ -1273,7 +1283,11 @@ Class MainWindow
m_ProdLineTimer.Start()
End If
' di default attivo la pagina CadCut
m_ActivePage = MainWindow.Pages.CadCut
If m_OnlyFrame Then
m_ActivePage = MainWindow.Pages.FrameCut
Else
m_ActivePage = MainWindow.Pages.CadCut
End If
' seleziono il tipo di avvio
m_CurrentProjectPageUC.StartProgram()
' aggiorno la grafica
@@ -1310,8 +1324,33 @@ Class MainWindow
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
EgtSetCurrentContext(nCurrCtx)
' Aggiorno interfaccia
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
If m_OnlyFrame Then
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And m_ActivePage <> Pages.RawPart Then
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91142), EgtMsg(91143), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
' Cancello progetto salvato con nome da file ini
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
' Scelta tavola della macchina
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
' Creo nuovo progetto
m_CurrentProjectPageUC.NewProject(nTabInd, False)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
FrameCutBtn_Click(Nothing, Nothing)
CadCutBtn.IsEnabled = False
Else
FrameCutBtn.IsEnabled = True
CadCutBtn.IsEnabled = False
' Attivo il pulsante FRAME
'FrameCutBtn.IsChecked = True
'CadCutBtn.IsChecked = False
End If
Else
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
End If
' DirectCutBtn.IsEnabled = bHeadH1
End Sub
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.2.1")>
<Assembly: AssemblyFileVersion("2.6.2.1")>
<Assembly: AssemblyVersion("2.6.3.1")>
<Assembly: AssemblyFileVersion("2.6.3.1")>
+1 -1
View File
@@ -276,7 +276,7 @@ Public Class CurrentProjectPageUC
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
' Carico sottopagina opportuna
If GetProjectType() <> PRJ_TYPE.FRAMES Then
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.CadCutBtn.IsChecked = True
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+2
View File
@@ -1174,6 +1174,8 @@ Friend Module VeinMatching
' Esporto il file come immagine
EgtSetCurrentContext(m_nVeinCtx)
Dim bOk As Boolean = (EgtGetFileType(sFilePath) = FT.IMG)
m_nImgWidth = GetPrivateProfileDouble(S_VEINMATCHING, K_VEINMA_WIDTH, m_nImgWidth, m_MainWindow.GetIniFile)
m_nImgHeight = GetPrivateProfileDouble(S_VEINMATCHING, K_VEINMA_WIDTH, m_nImgHeight, m_MainWindow.GetIniFile)
bOk = bOk AndAlso EgtGetImage(EgtGetShowMode(), New Color3d(255, 255, 255), New Color3d(255, 255, 255),
m_nImgWidth, m_nImgHeight, sFilePath)
' Ripristino il contesto originale
+18 -10
View File
@@ -189,25 +189,33 @@ Public Class WorkInProgressPageUC
' Valori precedenti degli assi macchina
Dim dL1p, dL2p, dL3p, dR1p, dR2p As Double
Dim bFirst As Boolean = True
' Gestione fase di lavoro
Dim sPhaseVar As String = String.Empty
GetPrivateProfileString(S_MACH_INPROGRESS, K_PHASEVAR, "E80020", sPhaseVar, m_MainWindow.GetMachIniFile())
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
System.Threading.Thread.Sleep(100)
Dim nCurrPhase = 1
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
nCurrPhase = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
Dim bCurrPhaseExists As Boolean = False
If GetPrivateProfileString(S_MACH_INPROGRESS, K_PHASEVAR, "E80020", sPhaseVar, m_MainWindow.GetMachIniFile()) <> 0 Then
bCurrPhaseExists = True
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
System.Threading.Thread.Sleep(100)
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
nCurrPhase = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
End If
EgtSetCurrPhase(nCurrPhase, True)
EgtDraw()
Else
EgtOutLog("Variabile 'PhaseVar' mancante! In CurrentMachine non sarà aggiornata la fase del grezzo")
End If
EgtSetCurrPhase(nCurrPhase, True)
EgtDraw()
' Tempo di ritardo nel ciclo
Dim nTimeStep As Integer = 50
nTimeStep = GetPrivateProfileInt(S_MACH_INPROGRESS, K_WP_STEPTIME, nTimeStep, m_MainWindow.GetMachIniFile())
EgtOutLog("Tempo di attesa tra una lettura degli assi e la successiva: " & nTimeStep.ToString & " (ms)")
' Ciclo
While m_bContinue
' Rileggo la variabile di fase
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
If bCurrPhaseExists Then m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
' Recupero la posizione degli assi macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
@@ -238,7 +246,7 @@ Public Class WorkInProgressPageUC
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
System.Threading.Thread.Sleep(nTimeStep)
' Leggo la fase
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
If bCurrPhaseExists AndAlso m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
Dim nNextPhase As Integer = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
If nNextPhase > nCurrPhase Then