From 127671cc2fa138fdc172dd3059aff1630f5fa69d Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Sun, 28 Feb 2016 19:33:29 +0000 Subject: [PATCH] OmagCUT : - Migliorata pagina macchina. - Introdotto grezzo acquisito con laser. --- AlarmsPageUC.xaml | 11 - AlarmsPageUC.xaml.vb | 1 - CNCommunication.vb | 4 +- CadCutPageUC.xaml.vb | 1 + ConstMsg.vb | 1 + DrawPageUC.xaml.vb | 17 +- ImportPageUC.xaml.vb | 13 +- MachineCNPageUC.xaml | 130 +++++++++++ ...gPageUC.xaml.vb => MachineCNPageUC.xaml.vb | 25 +- MachinePageUC.xaml | 2 +- MachinePageUC.xaml.vb | 52 ++--- MachineStatusUC.xaml | 2 +- MachineStatusUC.xaml.vb | 36 +-- MainWindow.xaml.vb | 13 +- OmagCUT.vbproj | 6 +- PhotoPageUC.xaml.vb | 2 + RawPartPageUC.xaml | 36 ++- RawPartPageUC.xaml.vb | 220 +++++++++++++++++- SideAngleUc.xaml.vb | 124 +++++++--- TestingPageUC.xaml | 73 ------ 20 files changed, 558 insertions(+), 211 deletions(-) create mode 100644 MachineCNPageUC.xaml rename TestingPageUC.xaml.vb => MachineCNPageUC.xaml.vb (69%) delete mode 100644 TestingPageUC.xaml diff --git a/AlarmsPageUC.xaml b/AlarmsPageUC.xaml index de21fc2..2e7acd7 100644 --- a/AlarmsPageUC.xaml +++ b/AlarmsPageUC.xaml @@ -182,17 +182,6 @@ - - - - - - - - - - - diff --git a/AlarmsPageUC.xaml.vb b/AlarmsPageUC.xaml.vb index 0f991cb..b8c0572 100644 --- a/AlarmsPageUC.xaml.vb +++ b/AlarmsPageUC.xaml.vb @@ -44,7 +44,6 @@ Public Class AlarmsPageUC AngleCutExtraLenTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 7) CompleteCutsTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 8) SafeZTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 5) - ErrorLstGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 12) MaterialsGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 13) NewMatBtn.Content = EgtMsg(MSG_ALARMSPAGEUC + 14) RemoveMatBtn.Content = EgtMsg(MSG_ALARMSPAGEUC + 15) diff --git a/CNCommunication.vb b/CNCommunication.vb index 3b9f173..e304901 100644 --- a/CNCommunication.vb +++ b/CNCommunication.vb @@ -187,7 +187,7 @@ Public Class CNCommunication ' Assegno riferimento al CN alle diverse pagine m_MainWindow.m_MachineStatusUC.m_CN = Me.m_CN m_MainWindow.m_MachinePageUC.m_AlarmsPageUC.m_CN = Me.m_CN - m_MainWindow.m_MachinePageUC.m_TestingPage.m_CN = Me.m_CN + m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.m_CN = Me.m_CN m_MainWindow.m_DirectCutPageUC.m_MachineButtons.m_CN = Me.m_CN m_MainWindow.m_DirectCutPageUC.m_ManualAxesMove.m_CN = Me.m_CN m_MainWindow.m_DirectCutPageUC.m_CN = Me.m_CN @@ -271,7 +271,7 @@ Public Class CNCommunication For Each Item In m_CN.sz_NC_error_messages ErrorList.Add(Item) Next - m_AlarmsPage.ErrorLstBx.ItemsSource = ErrorList + m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.ErrorLstBx.ItemsSource = ErrorList End If m_CN.b_NC_error = False m_AlarmsPage.NcError() diff --git a/CadCutPageUC.xaml.vb b/CadCutPageUC.xaml.vb index d5ff571..425d50f 100644 --- a/CadCutPageUC.xaml.vb +++ b/CadCutPageUC.xaml.vb @@ -79,6 +79,7 @@ Public Class CadCutPageUC Else m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC) m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_PhotoPage) + m_MainWindow.m_ActivePage = MainWindow.Pages.Photo End If End Sub diff --git a/ConstMsg.vb b/ConstMsg.vb index a16e108..b2766c4 100644 --- a/ConstMsg.vb +++ b/ConstMsg.vb @@ -25,6 +25,7 @@ Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGCUT + 760 Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGCUT + 800 Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGCUT + 900 + Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGCUT + 930 Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGCUT + 950 Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGCUT + 1100 diff --git a/DrawPageUC.xaml.vb b/DrawPageUC.xaml.vb index 3b4e6c9..64bbcef 100644 --- a/DrawPageUC.xaml.vb +++ b/DrawPageUC.xaml.vb @@ -357,16 +357,25 @@ Public Class DrawPageUC ' Ne recupero l'Id Dim nId2 As Integer = EgtGetLastPart() ' Ne recupero il layer OutLoop - Dim nOutLoopLayer As Integer = EgtGetFirstNameInGroup(nId2, "OutLoop") + Dim nOutLoopLayer As Integer = EgtGetFirstNameInGroup(nId2, SideAngleUC.OUTLOOP_LAYER) + ' Calcolo dimensione ingombro OutLoop + Dim ptMin, ptMax As Point3d + EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, ptMin, ptMax) + Dim dBBoxRad As Double = 0.5 * Point3d.DistXY(ptMin, ptMax) + ' Creo layer per testi nesting + Dim TextLayer As Integer = EgtCreateGroup(nId2) + EgtSetName(TextLayer, SideAngleUC.NEST_SIDE_ANGLE_LAYER) ' Modifico inclinazione lati For Each Entity In m_SideAngle.m_SideAngleEntityList Dim nCurrEntityName As Integer = EgtGetFirstNameInGroup(nOutLoopLayer, Entity.sEntityName) - If Entity.dSideAngle <> 0 Then + If Math.Abs(Entity.dSideAngle) > EPS_ANG_SMALL Then ' Scrivo nuovo angolo nelle info - EgtSetInfo(nCurrEntityName, "SideAng", Entity.dSideAngle) + EgtSetInfo(nCurrEntityName, SideAngleUC.SIDE_ANGLE_INFO, Entity.dSideAngle) + ' Creo testo con angolo di inclinazione per nesting + SideAngleUC.AddTextToLine(Entity.dSideAngle & "°", TextLayer, nCurrEntityName, 10, dBBoxRad, False) Else ' Cancello inclinazione nell'apposito campo info - EgtRemoveInfo(nCurrEntityName, "SideAng") + EgtRemoveInfo(nCurrEntityName, SideAngleUC.SIDE_ANGLE_INFO) End If Next ' Muovo la regione in Z per evitare problemi in visualizzazione diff --git a/ImportPageUC.xaml.vb b/ImportPageUC.xaml.vb index 13d788c..af892df 100644 --- a/ImportPageUC.xaml.vb +++ b/ImportPageUC.xaml.vb @@ -444,6 +444,11 @@ Public Class ImportPageUC End Sub Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click + ' Ricavo nome pezzo selezionato per cancellarne i testi + Dim Part1 As Integer = m_MainWindow.m_ImportPageUC.m_nSelectedPart + EgtErase(EgtGetFirstNameInGroup(Part1, SideAngleUC.SIDE_ANGLE_LAYER)) + ' Scrivo testi per nesting + m_SideAngleUC.WriteSideAngleForNest() ' Vettore nomi file temporanei Dim sTmpFiles As New ArrayList() ' Ciclo di salvataggio dei pezzi @@ -520,11 +525,9 @@ Public Class ImportPageUC FilePathTxBl.Visibility = Windows.Visibility.Visible FileListBox.Visibility = Windows.Visibility.Visible LeftGrid.Children.Remove(m_SideAngleUC) - ' Ricavo nome primo pezzo - Dim Part1 As Integer = EgtGetFirstInGroup(GDB_ID.ROOT) - ' Ricavo nome pezzo precedentemente selezionato - Part1 = m_MainWindow.m_ImportPageUC.m_nSelectedPart - EgtErase(EgtGetFirstNameInGroup(Part1, "SideAngle")) + ' Ricavo nome pezzo selezionato + Dim Part1 As Integer = m_MainWindow.m_ImportPageUC.m_nSelectedPart + EgtErase(EgtGetFirstNameInGroup(Part1, SideAngleUC.SIDE_ANGLE_LAYER)) End If End Sub diff --git a/MachineCNPageUC.xaml b/MachineCNPageUC.xaml new file mode 100644 index 0000000..b698050 --- /dev/null +++ b/MachineCNPageUC.xaml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +