OmagCUT :

- aggiunta gestione macchine con 2 tavole
- commentata comunicazione con Siemens (in attesa di completamento)
- aggiunta gestione estensione file da trasmettere al CN (da INI di macchina, default xpi)
- piccole migliorie a gestione buchi nei componenti parametrici.
This commit is contained in:
Dario Sassi
2016-04-19 16:01:57 +00:00
parent a7bd2b290a
commit f0cde68314
26 changed files with 127 additions and 62 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ Public Class AboutBoxWD
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.ToString()
EgtGetKeyInfo(KeyLbl.Text)
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
Dim sOpts As String = m_MainWindow.GetKeyOptions()
KeyLbl.Text = sKey & " - " & sOpts
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
+2 -2
View File
@@ -137,8 +137,8 @@ Public Class CNCommunication
m_CN = New Num.NumNCOld
Case 2
m_CN = New Num.NumNC
Case 3
m_CN = New CN_Siemens
'Case 3
' m_CN = New CN_Siemens
End Select
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
Dim sVal As String = String.Empty
-1
View File
@@ -220,7 +220,6 @@ Public Class CompoDimensionUC
' Deseleziono oggetto corrente e aggiorno visualizzazione
EgtDeselectAll()
EgtDraw()
EgtSaveFile("C:\Temp\qqq.nge", NGE.CMPTEXT)
End Sub
End Class
+1
View File
@@ -54,6 +54,7 @@ Module ConstGen
' Costanti per lavorazioni
Public Const MACH_GROUP As String = "Mach01"
Public Const MAIN_TAB As String = "MainTab"
Public Const SECOND_TAB As String = "2ndTab"
Public Const PHOTO_GRP As String = "Photos"
Public Const PHOTO_NAME As String = "Raw"
+3
View File
@@ -3,6 +3,9 @@
Public Const S_NUMERICALCONTROL As String = "NumericalControl"
Public Const K_TYPE As String = "Type"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension"
Public Const S_AXES As String = "Axes"
Public Const K_L1NAME As String = "L1Name"
Public Const K_L1ID As String = "L1Id"
-1
View File
@@ -243,7 +243,6 @@ Public Class CopyTemplateUC
Dim nPart As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_COPYTEMPLATE)
Dim nOutLoop As Integer = EgtGetFirstNameInGroup(nPart, NAME_OUTLOOP)
Dim nId As Integer = EgtCreateLine(nOutLoop, m_ptPrevAcquire, m_ptTipP1)
'EgtSaveFile("C:\Temp\qqq.nge", NGE.CMPTEXT)
End Sub
Private Sub CreateArc()
+13 -1
View File
@@ -12,7 +12,10 @@ Public Class CurrentMachine
' File ini della macchina
Private m_sMachIniFile As String = String.Empty
' Incremento da dare all'asse C per far oincidere la linea della lama con l'asse X
' Estensione dei file programma pezzo (detti anche file Iso)
Private m_sIsoFileExt As String = String.Empty
' Incremento da dare all'asse C per far coincidere la linea della lama con l'asse X
Private m_dDeltaC As Double = 0
' Numero e tipo di utensili correntemente disponibili sulla macchina
@@ -93,6 +96,12 @@ Public Class CurrentMachine
End Get
End Property
Friend ReadOnly Property sIsoFileExt As String
Get
Return m_sIsoFileExt
End Get
End Property
Friend ReadOnly Property dDeltaC As Double
Get
Return m_dDeltaC
@@ -443,6 +452,9 @@ Public Class CurrentMachine
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
' Leggo flag incremento asse C
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
' Leggo estensione del file programma pezzo
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt
' Leggo configurazione degli utensili in macchina
m_MountedToolConfig = GetPrivateProfileInt(S_TOOLS, K_MOUNTEDTOOLCONFIG, 0, sMachIniFile)
' Leggo flag presenza tipologie utensili
+7 -5
View File
@@ -176,7 +176,7 @@ Public Class CurrentProjectPageUC
End If
End Sub
Friend Function NewProject() As Boolean
Friend Function NewProject(Optional sTabName As String = MAIN_TAB) As Boolean
' Imposto nuovo indice di progetto
SetNextProjectIndex()
' Imposto il nuovo progetto
@@ -189,7 +189,7 @@ Public Class CurrentProjectPageUC
Return False
End If
' Imposto la tavola corrente
If Not EgtSetTable(MAIN_TAB) Then
If Not EgtSetTable(sTabName) Then
Return False
End If
EgtShowOnlyTable(True)
@@ -402,10 +402,12 @@ Public Class CurrentProjectPageUC
Friend Function GetCurrentProjectName() As String
Dim CurrProjName As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", CurrProjName, m_MainWindow.GetIniFile())
If String.IsNullOrEmpty(CurrProjName) Then
CurrProjName = Math.Abs(m_nCurrProj).ToString("D4")
If Not String.IsNullOrEmpty(CurrProjName) Then
CurrProjName &= ".nge (" & Math.Abs(m_nCurrProj).ToString("D4") & ")"
Else
CurrProjName = Math.Abs(m_nCurrProj).ToString("D4") & ".nge"
End If
Return CurrProjName & ".nge"
Return CurrProjName
End Function
Private Function GetProjectType() As Integer
+5 -3
View File
@@ -211,7 +211,7 @@ Public Class DirectCutPageUC
' Modifico stringa per inserire i newline
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
' Creo file...
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing.xpi"
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing" & m_MainWindow.m_CurrentMachine.sIsoFileExt
' ...e ci scrivo
Dim Writer As New IO.StreamWriter(FilePath, False)
Writer.Write(CmdString)
@@ -221,7 +221,9 @@ Public Class DirectCutPageUC
Exit Sub
End If
' Mando file al CN
m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900)
If Not m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900) Then
Exit Sub
End If
' Aspetto e lo avvio
System.Threading.Thread.Sleep(300)
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
@@ -292,7 +294,7 @@ Public Class DirectCutPageUC
Next
Else
MsgBoxStateInfo.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 44)
MsgBoxStateInfo.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 44) ' Errore in tastatura lama
' Costringo ad aggiornare UI
UpdateUI()
System.Threading.Thread.Sleep(1500)
+15 -6
View File
@@ -221,6 +221,7 @@ Public Class DrawPageUC
End If
End If
Next
ShowVariables()
' Imposto l'indice del componente
If Not EgtLuaSetGlobIntVar(LUA_CMP_INDEX, nCmp) Then
Return
@@ -261,8 +262,6 @@ Public Class DrawPageUC
Public Sub SelectedComponent(sCompo As String)
' Carico componente
LoadCurrentCompo(sCompo)
EgtSaveFile("C:\Temp\qqq.nge", NGE.CMPTEXT)
End Sub
Private Sub LoadCurrentCompo(ByVal sCompo As String)
@@ -290,8 +289,6 @@ Public Class DrawPageUC
ReadAndShowVariables()
' abilito bottoni Vista e Inserisci
OkBtn.IsEnabled = True
' un pezzo da inserire
'tbNbr.Text = "1"
End Sub
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
@@ -344,8 +341,6 @@ Public Class DrawPageUC
' aggiorno visualizzazione
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
EgtSaveFile("C:\Temp\qqq.nge", NGE.CMPTEXT)
End Sub
Private Function ExecCompoFile() As Boolean
@@ -389,6 +384,20 @@ Public Class DrawPageUC
Return True
End Function
Private Function ShowVariables() As Boolean
' Conto numero variabili definite e nascoste
Dim nShow As Integer = GetDefinedVarCount()
Dim nHide As Integer = NUM_VAR - nShow
' Aggiorno i valori visualizzati
m_bShowVar = True
For i As Integer = 1 To nShow
Dim j As Integer = nHide + i
m_CompoDimension.GetValueEdit(j).Text = m_CVars(i - 1).ToString()
Next
m_bShowVar = False
Return True
End Function
Private Function UpdateVariables() As Boolean
' Conto numero variabili definite e da nascondere
Dim nShow As Integer = GetDefinedVarCount()
+1 -1
View File
@@ -521,7 +521,7 @@ Public Class FlatteningCut
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCuti" & m_MainWindow.m_CurrentMachine.sIsoFileExt
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut")
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then
+1 -1
View File
@@ -474,7 +474,7 @@ Public Class GridCut
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut")
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then
+3 -1
View File
@@ -546,7 +546,7 @@ Public Class ImportPageUC
Dim nLayerId As Integer = EgtGetFirstLayer(EgtGetFirstPart())
If nLayerId = GDB_ID.NULL Then Return
' Lo esporto in un file temporaneo
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame" & nLayerId & ".Nge"
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame.Nge"
If Not EgtSaveObjToFile(nLayerId, sTmpFile, NGE.BIN) Then Return
' Passo al contesto principale
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
@@ -559,6 +559,8 @@ Public Class ImportPageUC
m_MainWindow.m_FrameCutPageUC.CreateFrame(nPartId)
' Ricalcolo lavorazioni
AddFrameMachinings()
' Cancello il file
My.Computer.FileSystem.DeleteFile(sTmpFile)
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
+2 -2
View File
@@ -91,11 +91,11 @@ Public Class MachineCNPageUC
If m_MainWindow.m_CNCommunication.m_nNCType = 1 Then
m_CN.Delete_NC_prog(DULoadTxBx.Text)
End If
m_CN.Download_NC_prog(m_MainWindow.GetCncDir() & "\CadCut.xpi", "%" & DULoadTxBx.Text)
m_CN.Download_NC_prog(m_MainWindow.GetCncDir() & "\CadCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt, "%" & DULoadTxBx.Text)
End Sub
Private Sub UploadBtn_Click(sender As Object, e As RoutedEventArgs) Handles UploadBtn.Click
m_CN.Upload_NC_prog(m_MainWindow.GetCncDir() & "\" & DULoadTxBx.Text & ".xpi", "%" & DULoadTxBx.Text)
m_CN.Upload_NC_prog(m_MainWindow.GetCncDir() & "\" & DULoadTxBx.Text & m_MainWindow.m_CurrentMachine.sIsoFileExt, "%" & DULoadTxBx.Text)
End Sub
Private Sub ActivateBtn_Click(sender As Object, e As RoutedEventArgs) Handles ActivateBtn.Click
+4
View File
@@ -145,6 +145,10 @@ Class MainWindow
Return m_nKeyOptions And nKeyOpt
End Function
Friend Function GetKeyOptions() As UInteger
Return m_nKeyOptions
End Function
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Verifico sia l'unica istanza
ManageSingleIstance()
+1 -1
View File
@@ -493,7 +493,7 @@ Public Class MultipleCut
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut")
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then
+2 -2
View File
@@ -60,5 +60,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.16.2")>
<Assembly: AssemblyFileVersion("1.6.16.2")>
<Assembly: AssemblyVersion("1.6.16.3")>
<Assembly: AssemblyFileVersion("1.6.16.3")>
+17 -2
View File
@@ -344,7 +344,7 @@ Public Class NestPageUC
' Rotazione dei pezzi attorno al loro centro
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
' Sistemazione nel parcheggio
EgtPackBox(GDB_ID.SEL, -5000, -INFINITO, 1000, -3000, 20, False)
PackPartInStore(GDB_ID.SEL)
Return True
' Altrimenti li ruoto tenendo conto delle collisioni
@@ -457,7 +457,7 @@ Public Class NestPageUC
' Parcheggio
EgtRemovePartFromRawPart(nId)
EgtSetStatus(nId, GDB_ST.ON_)
EgtPackBox(nId, -5000, -INFINITO, 1000, -3000, 20, False)
PackPartInStore(nId)
' Aggiusto la posizione in Z
Dim ptPartMin, ptPartMax As Point3d
If EgtGetBBoxGlob(nId, GDB_BB.IGNORE_DIM + GDB_BB.IGNORE_TEXT, ptPartMin, ptPartMax) Then
@@ -468,6 +468,21 @@ Public Class NestPageUC
Return False
End Function
Private Function PackPartInStore(nId As Integer) As Boolean
' Recupero box tavola
Dim b3Tab As New BBox3d
If Not EgtGetTableArea(1, b3Tab) Then
b3Tab.Add(New Point3d(0, 0, 0))
b3Tab.Add(New Point3d(-3600, -2600, 0))
End If
' Parcheggio
Const STORE_LARGH As Double = 6000
Const STORE_DIST As Double = 200
Const STORE_OFFS As Double = 20
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (STORE_LARGH - b3Tab.DimX())
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + STORE_LARGH, b3Tab.Min().y - STORE_DIST, STORE_OFFS, False)
End Function
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
' Ciclo di cancellazione dei pezzi selezionati
Dim nId As Integer = EgtGetFirstSelectedObj()
-1
View File
@@ -142,7 +142,6 @@
<Compile Include="CNCommunication.vb" />
<Compile Include="CN_Debug.vb" />
<Compile Include="CN_generico.vb" />
<Compile Include="CN_Siemens.vb" />
<Compile Include="CompoDimensionUC.xaml.vb">
<DependentUpon>CompoDimensionUC.xaml</DependentUpon>
</Compile>
+1
View File
@@ -287,6 +287,7 @@ Public Class OpenPageUC
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_OpenPage)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
' Non modifico progetto corrente
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
End Sub
Private Sub OpenPage_Unloaded(sender As Object, e As RoutedEventArgs)
+36 -24
View File
@@ -34,15 +34,28 @@ Public Class ProjectMgrUC
Case 0 ' Annulla
Return
Case 1 ' Si
m_MainWindow.m_CurrentProjectPageUC.SaveNamedProject()
m_MainWindow.m_CurrentProjectPageUC.SaveProject()
m_CurrProjPage.SaveNamedProject()
m_CurrProjPage.SaveProject()
Case 2 ' No
' Non devo fare alcunchè
End Select
End If
' Cancello progetto salvato con nome da file ini
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", m_MainWindow.GetIniFile())
m_MainWindow.m_CurrentProjectPageUC.NewProject()
' Se macchina con due tavole, chiedo su quale si vuole operare
Dim sTabName As String = MAIN_TAB
If EgtExistsTable(SECOND_TAB) Then
' Tavolo da usare ?
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", EgtMsg(91111), EgtMsgBox.Buttons.ONE_TWO, EgtMsgBox.Icons.NULL)
Select Case TableToUse.DialogResult
Case 1 ' 1
' si conferma la tavola principale
Case 0 ' 2
sTabName = SECOND_TAB
End Select
End If
' Creo nuovo progetto
m_CurrProjPage.NewProject(sTabName)
EgtZoom(ZM.ALL)
End Sub
@@ -54,8 +67,8 @@ Public Class ProjectMgrUC
Case 0 ' Annulla
Return
Case 1 ' Si
m_MainWindow.m_CurrentProjectPageUC.SaveNamedProject()
m_MainWindow.m_CurrentProjectPageUC.SaveProject()
m_CurrProjPage.SaveNamedProject()
m_CurrProjPage.SaveProject()
Case 2 ' No
' Non devo fare alcunchè
End Select
@@ -69,10 +82,9 @@ Public Class ProjectMgrUC
End Sub
Friend Sub PostLoad(ByVal sCurrDir As String, sCurrFile As String)
Dim CurrentProjectPageUC As CurrentProjectPageUC = m_MainWindow.m_CurrentProjectPageUC
EgtSetCurrentContext(CurrentProjectPageUC.CurrentProjectScene.GetCtx())
If Not CurrentProjectPageUC.LoadProject(sCurrDir & "\" & sCurrFile) Then
CurrentProjectPageUC.NewProject()
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
If Not m_CurrProjPage.LoadProject(sCurrDir & "\" & sCurrFile) Then
m_CurrProjPage.NewProject()
Else
' Verifico se file salvato con nome guardando il nome della cartella in cui si trova
Dim sSaveNameDir As String = String.Empty
@@ -80,25 +92,25 @@ Public Class ProjectMgrUC
If sCurrDir = sSaveNameDir Then
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, sCurrFile.Substring(0, sCurrFile.Length - 4), m_MainWindow.GetIniFile())
' Salvo equivalente con indice
CurrentProjectPageUC.SetNextProjectIndex()
CurrentProjectPageUC.SaveProject()
m_CurrProjPage.SetNextProjectIndex()
m_CurrProjPage.SaveProject()
Else
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, String.Empty, m_MainWindow.GetIniFile())
End If
End If
' Verifico se andare nel CadCut o nel FrameCut
Dim nPrjType As Integer = CurrentProjectPageUC.GetCurrentProjectType()
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
m_MainWindow.m_PrevActivePage <> MainWindow.Pages.CadCut Then
CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_FrameCutPageUC)
CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_FrameCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.FrameCutBtn.IsChecked = False
m_MainWindow.CadCutBtn.IsChecked = True
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES And
m_MainWindow.m_PrevActivePage <> MainWindow.Pages.FrameCut Then
CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC)
CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
m_MainWindow.CadCutBtn.IsChecked = False
m_MainWindow.FrameCutBtn.IsChecked = True
@@ -118,9 +130,9 @@ Public Class ProjectMgrUC
Return
End If
' Salvataggio con nome
m_MainWindow.m_CurrentProjectPageUC.SaveNamedProject()
m_CurrProjPage.SaveNamedProject()
' Salvataggio con numero ciclico
m_MainWindow.m_CurrentProjectPageUC.SaveProject()
m_CurrProjPage.SaveProject()
' Se cornici, ripristino visualizzazione lavorazioni
If m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut Then
ShowAllCurrPhaseMachinings()
@@ -153,15 +165,15 @@ Public Class ProjectMgrUC
End Sub
Private Sub SimulateBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulateBtn.Click
m_MainWindow.m_CurrentProjectPageUC.CurrProjGrid.Visibility = Windows.Visibility.Hidden
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
If m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut Then
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut
Else
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_FrameCutPageUC)
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_FrameCutPageUC)
m_MainWindow.m_PrevActivePage = MainWindow.Pages.FrameCut
End If
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
End Sub
@@ -198,11 +210,11 @@ Public Class ProjectMgrUC
UpdateUI()
' Salvo il progetto con le lavorazioni
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\MachProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
m_CurrProjPage.SaveFile(sMchPath)
' Costringo ad aggiornare UI
UpdateUI()
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\CadCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\CadCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
bOk = EgtGenerate(sCncPath, "OmagCut") And bOk
' Costringo ad aggiornare UI
UpdateUI()
+2 -2
View File
@@ -71,7 +71,7 @@
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<ComboBox Name="RawModeCmBx" Grid.Row="0" Grid.ColumnSpan="2" Height="38" Width="200"
<ComboBox Name="RawModeCmBx" Grid.Row="0" Grid.ColumnSpan="2" Height="40" Width="200"
MaxDropDownHeight="300">
<ComboBox.ItemTemplate>
<DataTemplate>
@@ -104,7 +104,7 @@
<!-- Definizione della Grid per il materiale -->
<GroupBox Name="MaterialGpBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_GroupBox}">
<ComboBox Name="MaterialsCmbx" Height="38" Width="200"
<ComboBox Name="MaterialsCmbx" Height="40" Width="200"
MaxDropDownHeight="600">
<ComboBox.ItemTemplate>
<DataTemplate>
+5 -3
View File
@@ -1061,7 +1061,7 @@ Public Class RawPartPageUC
' Modifico stringa per inserire i newline
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
' Creo file...
Dim FilePath As String = m_MainWindow.GetCncDir() & "\RawProbing.xpi"
Dim FilePath As String = m_MainWindow.GetCncDir() & "\RawProbing" & m_MainWindow.m_CurrentMachine.sIsoFileExt
' ...e ci scrivo
Dim Writer As New IO.StreamWriter(FilePath, False)
Writer.Write(CmdString)
@@ -1071,7 +1071,9 @@ Public Class RawPartPageUC
Exit Sub
End If
' Mando file al CN
m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900)
If Not m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900) Then
Exit Sub
End If
' Aspetto e lo avvio
System.Threading.Thread.Sleep(300)
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
@@ -1148,7 +1150,7 @@ Public Class RawPartPageUC
Next
Else
MsgBoxStateInfo.Text = EgtMsg(MSG_RAWPARTPAGEUC + 28)
MsgBoxStateInfo.Text = EgtMsg(MSG_RAWPARTPAGEUC + 28) 'Errore nella tastatura del grezzo
' Costringo ad aggiornare GUI
UpdateUI()
System.Threading.Thread.Sleep(1500)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -331,7 +331,7 @@ Public Class SawTestUC
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut")
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then
+1 -1
View File
@@ -486,7 +486,7 @@ Public Class SingleCutUC
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut.xpi"
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut")
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then