Compare commits

...

17 Commits

Author SHA1 Message Date
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 919890e68d - Nascondo utensile PROBE - Pagina ASSISTENZA in scandeza - Correzione Text per spostamenti 2024-02-06 15:04:00 +01:00
Nicola Pievani b8143b0ff5 Cambio versione 2024-01-11 19:29:27 +01:00
Nicola Pievani 085975338a Merge commit '53fc2694a34f89878a5d9821387894adcfa808d2' into develop 2023-12-20 11:47:19 +01:00
Nicola Pievani 53fc2694a3 Aggiornamento versione 2.5l1 2023-12-20 11:46:48 +01:00
Nicola Pievani 9c8563f5c3 Merge commit '2f78dd796d946b2622a93aa975fa1e7df4407eaa' 2023-12-19 20:17:23 +01:00
Nicola Pievani 2f78dd796d Gestione OffsetLama tagli diretti MULTIPI e GRIGLIA 2023-12-19 20:16:57 +01:00
Nicola Pievani 378369d3d5 Merge commit '656c5a7d54504095793cba103234ee49403c7fee' into develop 2023-12-19 15:24:36 +01:00
Nicola Pievani 656c5a7d54 Migliorata importazione DXF 2023-11-28 09:35:09 +01:00
Nicola Pievani c40bc508d0 Merge commit 'de2234387d145276935dd44369dcb4989bbbb6bc' 2023-11-14 11:27:19 +01:00
Nicola Pievani de2234387d Merge commit 'd7c1ecacc2d11234a0ddbdfb38d2bc3fdfb2af2a' into develop 2023-11-14 11:27:03 +01:00
Nicola Pievani d7c1ecacc2 Correzione gestione Flattening (CamAuto) 2023-11-14 11:26:51 +01:00
Nicola Pievani ec813beae5 Reset dei tagli di separazione inseriti in OFFICE 2023-10-12 16:13:27 +02:00
Nicola Pievani 7a9faf537f Merge branch 'develop' 2023-10-10 18:56:56 +02:00
Nicola Pievani eb571bf5fd Merge commit '3d11abfa314f94573451e994c53a8aa19302d5a0' 2023-09-11 12:45:54 +02:00
Nicola Pievani b1f8d21cc5 Merge commit 'ec8fbd3297eb42576e0a949ae749830551cba528' 2023-09-01 18:34:53 +02:00
30 changed files with 366 additions and 63 deletions
+10 -5
View File
@@ -23,7 +23,8 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
@@ -44,13 +45,17 @@
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="15" />
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
</Grid>
+13
View File
@@ -33,6 +33,19 @@ Public Class AboutBoxWD
#Else
KeyLbl.Text = sKey & " - " & sOpts
#End If
' COPIATO da codice CAM5
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 Then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
ElseIf nAssLeftDays > 0 Then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
AssStatusLbl.Text = sAssStatus
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
+39
View File
@@ -164,6 +164,45 @@ Friend Module CamAuto
Return bOk
End Function
Friend Function ResetAllSplitCut() As Boolean
Dim PartList As New List(Of Integer)
' Ricerca nei grezzi dei pezzi (devono essere ricercati tra quelli presenti nei grezzi)
Dim bOk As Boolean = True
' Recupero il numero di fasi presenti nel progetto
Dim nPhaseCount As Integer = EgtGetPhaseCount()
For nPhase As Integer = 1 To nPhaseCount
EgtSetCurrPhase(nPhase)
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
While nParId <> GDB_ID.NULL
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
Dim sName As String = String.Empty
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
' Rimuovo il pezzo dal grezzo
If EgtRemovePartFromRawPart(nParId) Then
' Salvo l'indice del pezzo se non è stato già inserito
Dim nIndex As Integer = PartList.FirstOrDefault(Function(nId) nId = nParId)
If nIndex = 0 Then PartList.Add(nParId)
End If
End If
nParId = nNextParId
End While
End If
nRawId = EgtGetNextRawPart(nRawId)
End While
Next
' Reimposto la prima fase del progetto
EgtSetCurrPhase(1)
' Procedo ad eliminare il pezzo
For Each Item As Integer In PartList
bOk = bOk And EgtErase(Item)
Next
Return bOk
End Function
Friend Function ResetAllRawPart() As Boolean
Dim nPhase As Integer = 1
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
+4 -1
View File
@@ -3063,7 +3063,10 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
Else
m_dRegStep = Math.Max(dVal, 2 * EPS_SMALL)
End If
WritePrivateProfileString(S_NEST, K_STEP, StepMoveTxBx.Text, m_MainWindow.GetIniFile())
Dim dCurrVal As Double = 0
StringToLen(StepMoveTxBx.Text, dCurrVal)
DoubleToString(dCurrVal, 2)
WritePrivateProfileString(S_NEST, K_STEP, DoubleToString(dCurrVal, 2), m_MainWindow.GetIniFile())
End If
End Sub
-2
View File
@@ -343,7 +343,6 @@ Public Class SplitPageUC
EgtTrimCurveEndAtLen(nIdBridge, dLen - 10 * EPS_SMALL)
EgtTrimCurveStartAtLen(nIdBridge, 10 * EPS_SMALL)
End If
' EgtSaveFile("c:\EgtData\OmagCUT\Temp\Bridge.nge", NGE.BIN)
Dim nIdPart As Integer = GDB_ID.NULL
nIdPart = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nIdPart <> GDB_ID.NULL
@@ -351,7 +350,6 @@ Public Class SplitPageUC
Dim nIdSurf As Integer = EgtGetFirstInGroup(nIdRegion)
While nIdSurf <> GDB_ID.NULL
If EgtGetType(nIdSurf) = GDB_TY.SRF_FRGN Then
' EgtSaveFile("c:\EgtData\OmagCUT\Temp\Bridge.nge", NGE.BIN)
' se la linea bridge interseca la superficie allora restitusco false
If EgtCurveWithRegionClassify(nIdBridge, nIdSurf) <> CREGC.OUT Then
EgtExtendCurveStartByLen(nIdBridge, 10 * EPS_SMALL)
+2
View File
@@ -318,6 +318,8 @@ Module ConstGen
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
' Info in OutLoop per punto inzio lavorazione WaterJet
Public Const INFO_START As String = "Start"
' Nome dei tagli diretti inseriti in fase di Splitting
Public Const SPLIT_CUT As String = "SplitCut"
' Nome di pezzo che è una cornice
Public Const NAME_FRAME As String = "Frame"
+1
View File
@@ -19,6 +19,7 @@ Module ConstIni
Public Const K_DEBUG As String = "Debug"
Public Const K_LICENCE As String = "Licence"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LOCKID As String = "LockId"
Public Const K_MESSAGESDIR As String = "MessagesDir"
Public Const K_MESSAGES As String = "Messages"
Public Const K_SUPPORT As String = "Support"
+7 -5
View File
@@ -187,11 +187,11 @@ Public Class FlatteningCut
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
' imposto la Z di sicurezza corretta
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
EgtMdbSave()
' Se non vado in simulazione
If Not m_bSimul Then
' imposto la Z di sicurezza corretta
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
EgtMdbSave()
' Dichiaro sottopagina da non riattivare
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
' Rimuovo layer temporaneo per crocette
@@ -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
+34 -3
View File
@@ -38,6 +38,8 @@ Public Class GridCut
Private m_ptPrev As Point3d
' Layer per crocette temporanee
Private m_nTempLay As Integer = GDB_ID.NULL
' Gestione spessore lama
Private m_bSawTh As Boolean = False
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
@@ -82,7 +84,12 @@ Public Class GridCut
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDimY = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
@@ -141,6 +148,11 @@ Public Class GridCut
NumPzYTxBx.Text = m_nNumY.ToString()
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
SideChBx.IsChecked = m_bHeadSide
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Reset taglio e disabilito bottone esecuzione
m_bCutOk = False
UpdateSimulOkBtn()
@@ -523,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
@@ -616,6 +630,15 @@ Public Class GridCut
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutParaId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
@@ -634,6 +657,13 @@ Public Class GridCut
' Arretro il punto di partenza di uno spessore lama
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Specchio se è attivo il flag che cambia lato di disegno
If SideChBx.IsChecked() Then
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
@@ -656,6 +686,7 @@ Public Class GridCut
End Function
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
ptP += New Vector3d(0, 0, 0.15)
' Aggiungo crocette
Dim vtCrossX As New Vector3d(20, 0, 0)
Dim vtCrossY As New Vector3d(0, 20, 0)
+35 -5
View File
@@ -38,7 +38,8 @@ Public Class MultipleCut
Private m_ptPrev As Point3d
' Layer per crocette temporanee
Private m_nTempLay As Integer = GDB_ID.NULL
' Gestione spessore lama
Private m_bSawTh As Boolean = False
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
Private Const MIN_CUT_LEN As Double = 10.0
@@ -90,9 +91,14 @@ Public Class MultipleCut
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGV, m_dAngV, m_MainWindow.GetIniFile())
For nI As Integer = 0 To 9
m_nNum( nI) = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_NUM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
m_dDim( nI) = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_DIM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
m_nNum(nI) = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_MULT_NUM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
m_dDim(nI) = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_MULT_DIM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
Next
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
@@ -168,6 +174,11 @@ Public Class MultipleCut
NumPz10TxBx.Text = m_nNum(9).ToString()
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
SideChBx.IsChecked = m_bHeadSide
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Reset taglio e disabilito bottone esecuzione
m_bCutOk = False
UpdateSimulOkBtn()
@@ -569,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
@@ -606,6 +619,22 @@ Public Class MultipleCut
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
EgtTdbSetCurrTool(sSaw)
Dim dThick As Double = 0
' Se è impostata una lavorazione di lama
If Not String.IsNullOrEmpty(sSawing) Then
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
End If
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
@@ -698,6 +727,7 @@ Public Class MultipleCut
End Function
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
ptP += New Vector3d(0, 0, 0.15)
' Aggiungo crocette
Dim vtCrossX As New Vector3d(20, 0, 0)
Dim vtCrossY As New Vector3d(0, 20, 0)
+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)
+1 -1
View File
@@ -1190,7 +1190,7 @@ Public Class DrawPageUC
If Keyboard.Modifiers And ModifierKeys.Shift Then
bExitPage = Not bExitPage
End If
If bExitPage Then
If bExitPage And m_MainWindow.FrameCutBtn.IsChecked Then
' Aggiorno ambiente principale
EgtZoom(ZM.ALL)
' Elimino nome del componente precedente
+4
View File
@@ -361,6 +361,10 @@ Public Class ImportPageUC
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
' Importo file DXF
bOk = bOk AndAlso EgtImportDxf(sPath, dScale)
' riporto al piano tutte le superifici
EgtSelectAll()
EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0)
EgtDeselectAll()
ElseIf m_nFileType = FT.NGE Then
' Carico Nge
bOk = bOk AndAlso EgtOpenFile(sPath)
+63
View File
@@ -0,0 +1,63 @@
<Window x:Class="LicenseWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="500.6" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="5.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock Name="IconTxBl" Foreground="White" FontSize="32"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Name="LicenseTxBl"
Foreground="White" FontSize="20"
VerticalAlignment="Center" HorizontalAlignment="Left"
TextWrapping="Wrap"/>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal"
HorizontalAlignment="Center">
<ScrollViewer Name="MyScrollViewer" VerticalScrollBarVisibility="Auto">
<TextBlock Name="LicenseMsgTxBl" MaxWidth="340"
HorizontalAlignment="Center"
Foreground="{DynamicResource Omag_White}" FontSize="20" VerticalAlignment="Center"
TextWrapping="Wrap"/>
</ScrollViewer>
</StackPanel>
<Grid Grid.Column="1" Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+37
View File
@@ -0,0 +1,37 @@
Public Class LicenseWindow
Private m_sMessage As String = String.Empty
Private m_sTitle As String = String.Empty
Public Sub New(Owner As Window, sMsg As String, sTitle As String)
Me.Owner = Owner
m_sMessage = sMsg
m_sTitle = sTitle
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Public Sub Init() Handles Me.Initialized
IconTxBl.Text = "⚠️"
LicenseTxBl.Text = "Warning" & vbCrLf & m_sTitle
m_sMessage = m_sMessage.Replace("/n", "£")
Dim sItems As String() = m_sMessage.Split("£")
For Index As Integer = 0 To sItems.Count - 1
If Index = 0 Then
m_sMessage = sItems(Index)
Else
m_sMessage &= vbCrLf & sItems(Index)
End If
Next
LicenseMsgTxBl.Text = m_sMessage
End Sub
Public Sub Exit_Click() Handles ExitBtn.Click
Me.Close()
End Sub
End Class
+1 -1
View File
@@ -208,7 +208,7 @@ Public Class MachiningDbPageUC
MillTool.Clear()
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
While bFound
If nType = MCH_TY.MILL_STD Then MillTool.Add( sToolName)
If nType = MCH_TY.MILL_STD And sToolName.Trim.ToLower <> "probe" Then MillTool.Add(sToolName)
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
End While
PocketTool.Clear()
+10 -1
View File
@@ -695,7 +695,16 @@ Public Class ToolsDbPageUC
Dim ToolName As String = String.Empty
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
While bFound
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
Dim nDebug As Integer = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
If nType = nTType Then
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
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
End If
End If
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
End While
ToolsList.Add(ToolCathegory)
+42 -2
View File
@@ -326,11 +326,21 @@ Class MainWindow
EgtSetNestKey(sNestKey)
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetHwKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty(sLockId) Then
EgtSetLockId(sLockId)
End If
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2510, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2510, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2512, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2512, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Inizializzazione generale di EgtInterface
@@ -634,6 +644,35 @@ Class MainWindow
m_IdleTimer.Interval = TimeSpan.FromMilliseconds(100)
m_IdleTimer.Start()
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 Then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
ElseIf nAssLeftDays > 0 Then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
' Or nAssLeftDays = 358
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Then
'Dim sText As String = "Fai ammenda," & vbCrLf & "gli aggiornamenti sono in fase di scadenza!"
'Dim sTitle As String = "⚠️ Warning!"
'Dim MissingKeyWnd As New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
' finestra Custom
Dim sMsg As String = EgtMsg(91141)
Dim sAssistance As String = String.Empty
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
Dim sItems As String() = sAssistance.Split(","c)
For Each Item As String In sItems
sMsg &= "" & Item.Trim & " /n"
Next
Dim MyLicWn As New LicenseWindow(Me, sMsg, "Assistance " & sAssStatus)
MyLicWn.Show()
End If
' inizilizzo
End Sub
@@ -1243,6 +1282,7 @@ Class MainWindow
m_CurrentProjectPageUC.StartProgram()
' aggiorno la grafica
EgtZoom(ZM.ALL, True)
End Sub
Friend Sub EgtWPFInit()
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.10.1")>
<Assembly: AssemblyFileVersion("2.5.10.1")>
<Assembly: AssemblyVersion("2.5.12.4")>
<Assembly: AssemblyFileVersion("2.5.12.4")>
+10 -3
View File
@@ -115,6 +115,9 @@
<Reference Include="AxInterop.FXLib">
<HintPath>..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll</HintPath>
</Reference>
<Reference Include="DotNetZip">
<HintPath>..\..\EgtProg\OmagCUT\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="EgtPHOTOLib">
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
</Reference>
@@ -142,9 +145,6 @@
<HintPath>..\..\EgtProg\OmagCUT\Interop.FXServer.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Ionic.Zip">
<HintPath>..\..\EgtProg\OmagCUT\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
@@ -209,6 +209,9 @@
<Compile Include="DrawImport\UnderDrillUC.xaml.vb">
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
</Compile>
<Compile Include="LicenseWindow.xaml.vb">
<DependentUpon>LicenseWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Machine\AlarmsPageUC.xaml.vb">
<DependentUpon>AlarmsPageUC.xaml</DependentUpon>
</Compile>
@@ -485,6 +488,10 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="LicenseWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Machine\AlarmsPageUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+2
View File
@@ -1304,6 +1304,8 @@ Public Class OptionsPageUC
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo file macchine
For Each sMachineName As String In Machines
Dim sMachineDir As String = m_MainWindow.GetMachinesRootDir() & "\" & sMachineName
+2
View File
@@ -266,6 +266,8 @@ Public Class ProjectMgrUC
ResetAllStartCurv()
' cancello tutti i ponticelli disegnati
ResetAllBRidges()
' cancella tutti i tagli di separazione inseriti in OFFICE
ResetAllSplitCut()
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
-1
View File
@@ -2860,7 +2860,6 @@ Public Class RawPartPageUC
End If
EgtDraw()
'EgtSaveFile("C:\EgtData\OmagCUT\Temp\MyTest.nge", NGE.BIN)
Return True
End Function
+11 -11
View File
@@ -25,18 +25,18 @@ Module Utility
StopWatch.Start()
End Sub
Friend Function TimeSpanEnd()
Dim sTime As String = ""
If Not IsNothing(StopWatch) Then
StopWatch.Stop()
Dim ts As TimeSpan = StopWatch.Elapsed
sTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds)
End If
Return sTime
End Function
Friend Function TimeSpanEnd() As String
Dim sTime As String = ""
If Not IsNothing(StopWatch) Then
StopWatch.Stop()
Dim ts As TimeSpan = StopWatch.Elapsed
sTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds)
End If
Return sTime
End Function
'--------------------------------------------------------------------------------------------------
Friend Sub UpdateUI()
'--------------------------------------------------------------------------------------------------
Friend Sub UpdateUI()
' Costringo ad aggiornare UI
Dim nDummy As Integer
Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background, _
-2
View File
@@ -383,8 +383,6 @@ Friend Module VeinMatching
ShowParkedParts()
' Ripristino il contesto corrente
EgtSetCurrentContext(nCurrCtx)
' EgtSaveFile("C:\EgtData\OmagCUT\Temp\MyVeinMatch.nge", NGE.TEXT)
Return True
End Function
+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