diff --git a/AlarmsPageUC.xaml b/AlarmsPageUC.xaml
index 85561c3..128112e 100644
--- a/AlarmsPageUC.xaml
+++ b/AlarmsPageUC.xaml
@@ -234,6 +234,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/AlarmsPageUC.xaml.vb b/AlarmsPageUC.xaml.vb
index 7d03370..9766a17 100644
--- a/AlarmsPageUC.xaml.vb
+++ b/AlarmsPageUC.xaml.vb
@@ -57,6 +57,8 @@ Public Class AlarmsPageUC
ExtArcMinRadTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 18)
MachineParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 19)
SawGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 25)
+ DirectCutsParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 27) ' Tagli diretti
+ FinalHomeTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 28) ' Home finale
End Sub
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -179,6 +181,8 @@ Public Class AlarmsPageUC
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
' Salvo DB lavorazioni con aggiornamenti parametri generali
EgtMdbSave()
+ ' Flag per movimento in home alla fine dei tagli diretti
+ FinalHomeChBx.IsChecked = m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome
End Sub
Private Sub AuxiliaryToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles AuxiliaryToolCmBx.SelectionChanged
@@ -398,6 +402,10 @@ Public Class AlarmsPageUC
End If
End Sub
+ Private Sub FinalHomeChBx_Click(sender As Object, e As RoutedEventArgs) Handles FinalHomeChBx.Click
+ m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome = FinalHomeChBx.IsChecked()
+ End Sub
+
Friend Sub NcError()
If m_CN.sz_NC_error_messages.Count > 0 Then
'NCErrorMessages.Text = m_CN.sz_NC_error_messages(0)
diff --git a/CamAuto.vb b/CamAuto.vb
index 97799b8..23ac4ea 100644
--- a/CamAuto.vb
+++ b/CamAuto.vb
@@ -106,6 +106,11 @@ Public Module CamAuto
Return True
End Function
+ Friend Function RemoveFinalHome() As Boolean
+ Dim nId As Integer = EgtGetLastActiveOperation()
+ Return EgtRemoveOperationHome(nId)
+ End Function
+
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
Dim bOk As Boolean = True
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
diff --git a/ConstMachIni.vb b/ConstMachIni.vb
index ca827ca..7263a1c 100644
--- a/ConstMachIni.vb
+++ b/ConstMachIni.vb
@@ -89,6 +89,9 @@
Public Const K_MANUALPOS As String = "ManualPos"
Public Const K_MANUALNAME As String = "ManualName"
+ Public Const S_MACH_DIRECTCUTS As String = "DirectCuts"
+ Public Const K_FINALHOME As String = "FinalHome"
+
Public Const S_MACHBUTTONS As String = "MachButtons"
Public Const K_BUTTON As String = "Button"
diff --git a/CurrentMachine.vb b/CurrentMachine.vb
index 9890c37..d6dd16a 100644
--- a/CurrentMachine.vb
+++ b/CurrentMachine.vb
@@ -34,16 +34,20 @@ Public Class CurrentMachine
Private m_dSafeZ As Double = 0
' Massimo diametro lama per utilizzo ventose movimento pezzi
- Private m_dMaxSawDiamForVac As Double = 650
+ Private m_dMaxSawDiamForVac As Double = 630
' Massimo diametro lama per tastatura grezzo
- Private m_dMaxSawDiamForProbe As Double = 650
+ Private m_dMaxSawDiamForProbe As Double = 630
' Flag che indicano stato tipologia utensili (attivo/non attivo)
Private m_bSaw As Boolean = False
Private m_bDrill As Boolean = False
Private m_bMill As Boolean = False
+ ' Flag per visualizzazione TcPos e Testa/uscita
+ Private m_bShowToolChanger As Boolean = False
+ Private m_bShowHeadExit As Boolean = False
+
' Flag che indicano presenza tipologia lavorazioni (attivo/non attivo)
Private m_bSawing As Boolean = False
Private m_bDrilling As Boolean = False
@@ -51,8 +55,6 @@ Public Class CurrentMachine
Private m_bSawRoughing As Boolean = False
Private m_bSawFinishing As Boolean = False
- ' Variabili che nel caso di porta utensili indicano quanti utensili possono essere ospitati per tipo
-
' Variabili che contengono il nome degli utensili disponibili per tipo
Private m_sCurrSaw(0) As String
Private m_sCurrDrill(0) As String
@@ -69,6 +71,9 @@ Public Class CurrentMachine
' Spessore sottopezzo
Private m_dAdditionalTable As Double = 0
+ ' Flag home finale per tagli diretti
+ Private m_bDirectCutsFinalHome As Boolean = True
+
' Numero portautensili presenti
Private m_ToolChangerNum As Double = 0
@@ -217,6 +222,18 @@ Public Class CurrentMachine
End Get
End Property
+ Friend ReadOnly Property bShowToolChanger As Boolean
+ Get
+ Return m_bShowToolChanger
+ End Get
+ End Property
+
+ Friend ReadOnly Property bShowHeadExit As Boolean
+ Get
+ Return m_bShowHeadExit
+ End Get
+ End Property
+
Friend ReadOnly Property bSawing As Boolean
Get
Return m_bSawing
@@ -358,6 +375,17 @@ Public Class CurrentMachine
End Set
End Property
+ Friend Property bDirectCutsFinalHome As Boolean
+ Get
+ Return m_bDirectCutsFinalHome
+ End Get
+ Set(value As Boolean)
+ If WritePrivateProfileString(S_MACH_DIRECTCUTS, K_FINALHOME, If(value, "1", "0"), sMachIniFile) Then
+ m_bDirectCutsFinalHome = value
+ End If
+ End Set
+ End Property
+
Friend ReadOnly Property dToolChangerNum As Double
Get
Return m_ToolChangerNum
@@ -544,17 +572,22 @@ Public Class CurrentMachine
' foretto
m_bDrill = (GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, sMachIniFile) > 0)
' fresa
- m_bMill = (GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachIniFile) > 0)
+ m_bMill = (GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachIniFile) > 0) And
+ m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
+ ' Leggo abilitazione visualizzazione TcPos e Head/exit
+ m_bShowToolChanger = (GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile) > 0)
+ m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
' Leggo limiti diametro lama per altre operazioni
- m_dMaxSawDiamForVac = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORVAC, 650, sMachIniFile)
- m_dMaxSawDiamForProbe = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORPROBE, 650, sMachIniFile)
+ m_dMaxSawDiamForVac = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORVAC, 630, sMachIniFile)
+ m_dMaxSawDiamForProbe = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORPROBE, 630, sMachIniFile)
' Leggo flag presenza tipologie lavorazioni
' lama
m_bSawing = (GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachIniFile) > 0)
' foretto
m_bDrilling = (GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachIniFile) > 0)
' fresa
- m_bMilling = (GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachIniFile) > 0)
+ m_bMilling = (GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachIniFile) > 0) And
+ m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
' sgrossatura con lama
m_bSawRoughing = (GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachIniFile) > 0)
' finitura con lama
@@ -608,6 +641,9 @@ Public Class CurrentMachine
' Leggo altezza sopratavola
m_dAdditionalTable = GetPrivateProfileDouble(S_TABLE, K_ADDITIONALTABLE, 0, sMachIniFile)
+ ' Leggo flag per posizione home alla fine dei tagli diretti
+ m_bDirectCutsFinalHome = (GetPrivateProfileInt(S_MACH_DIRECTCUTS, K_FINALHOME, 1, sMachIniFile) <> 0)
+
' Creo materiale di default e lo aggiungo alla lista
' m_Materials.Add(New Material(0, "Generico"))
' Leggo la lista dei materiali
diff --git a/CurrentProjectPageUC.xaml.vb b/CurrentProjectPageUC.xaml.vb
index 0900a47..a1b5287 100644
--- a/CurrentProjectPageUC.xaml.vb
+++ b/CurrentProjectPageUC.xaml.vb
@@ -181,7 +181,21 @@ Public Class CurrentProjectPageUC
End If
End Sub
- Friend Function NewProject(Optional sTabName As String = MAIN_TAB) As Boolean
+ Friend Function NewProject(Optional sTabName As String = MAIN_TAB,
+ Optional bRetainParkedParts As Boolean = False) As Boolean
+ ' Se richiesto, conservo eventuali pezzi parcheggiati del progetto corrente
+ Dim sTmpFiles As New ArrayList()
+ Dim nId As Integer = If(bRetainParkedParts, EgtGetFirstPart(), GDB_ID.NULL)
+ While nId <> GDB_ID.NULL
+ ' Esporto il pezzo in un file temporaneo
+ Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPart" & nId & ".Nge"
+ sTmpFiles.Add(sTmpFile)
+ If Not EgtSaveObjToFile(nId, sTmpFile, NGE.BIN) Then
+ Return False
+ End If
+ ' Passo al pezzo successivo
+ nId = EgtGetNextPart(nId)
+ End While
' Imposto nuovo indice di progetto
SetNextProjectIndex()
' Imposto il nuovo progetto
@@ -204,7 +218,20 @@ Public Class CurrentProjectPageUC
m_nRawId = GDB_ID.NULL
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
m_dRawHeight = 0
- HeightTxBx.Text = LenToString(m_dRawHeight, 2)
+ UpdateHeightTxBx()
+ ' Recupero i pezzi parcheggiati precedentemente salvati
+ For Each sTmpfile As String In sTmpFiles
+ If My.Computer.FileSystem.FileExists(sTmpfile) Then
+ ' Inserisco il pezzo
+ EgtInsertFile(sTmpfile)
+ ' Ne recupero l'Id
+ Dim nId2 As Integer = EgtGetLastPart()
+ ' Inserisco in parcheggio
+ m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
+ ' Cancello il file
+ My.Computer.FileSystem.DeleteFile(sTmpfile)
+ End If
+ Next
' Dichiaro progetto non modificato
EgtResetModified()
Return True
@@ -251,7 +278,7 @@ Public Class CurrentProjectPageUC
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
' aggiorno spessore grezzo
m_dRawHeight = GetRawHeight()
- HeightTxBx.Text = LenToString(m_dRawHeight, 2)
+ UpdateHeightTxBx()
' Dichiaro progetto non modificato
EgtResetModified()
Return True
@@ -530,7 +557,7 @@ Public Class CurrentProjectPageUC
End Function
Friend Sub UpdateHeightTxBx()
- HeightTxBx.Text = LenToString(m_dRawHeight, 2)
+ HeightTxBx.Text = LenToString(m_dRawHeight, 3)
End Sub
Friend Sub UpdateMachiningTxBx()
diff --git a/FlatteningCut.xaml.vb b/FlatteningCut.xaml.vb
index e6d105e..37320f9 100644
--- a/FlatteningCut.xaml.vb
+++ b/FlatteningCut.xaml.vb
@@ -580,6 +580,10 @@ Public Class FlatteningCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
@@ -627,6 +631,10 @@ Public Class FlatteningCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
diff --git a/GridCut.xaml.vb b/GridCut.xaml.vb
index 2f45862..8ea248c 100644
--- a/GridCut.xaml.vb
+++ b/GridCut.xaml.vb
@@ -529,6 +529,10 @@ Public Class GridCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
@@ -572,6 +576,10 @@ Public Class GridCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
diff --git a/MachineButtonsUC.xaml.vb b/MachineButtonsUC.xaml.vb
index d8222c7..3ca0ac3 100644
--- a/MachineButtonsUC.xaml.vb
+++ b/MachineButtonsUC.xaml.vb
@@ -185,6 +185,8 @@ Public Class MachineButtonsUC
' Reset lua
EgtLuaResetGlobVar("CmdString")
EgtLuaResetGlobVar("CMD")
+ ' Log del comando
+ EgtOutLog("CmdString=" & CmdString & " b2Start=" & b2Start.ToString())
Dim nResult As Short
Select Case m_MainWindow.m_CNCommunication.m_nNCType
diff --git a/MachiningDbPageUC.xaml.vb b/MachiningDbPageUC.xaml.vb
index 86be40c..84e475f 100644
--- a/MachiningDbPageUC.xaml.vb
+++ b/MachiningDbPageUC.xaml.vb
@@ -283,17 +283,17 @@ Public Class MachiningDbPageUC
End Sub
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
- If bEnabled Then
- Dim MachiningCathegory As New CathegoryItem(sFName, nFType)
- Dim MachiningName As String = String.Empty
- If EgtMdbGetFirstMachining(nFType, MachiningName) Then
+ If Not bEnabled Then Return
+ ' Inserisco categoria ed eventuali elementi
+ Dim MachiningCathegory As New CathegoryItem(sFName, nFType)
+ Dim MachiningName As String = String.Empty
+ If EgtMdbGetFirstMachining(nFType, MachiningName) Then
+ MachiningCathegory.Items.Add(New CustomItem(MachiningName, nFType))
+ While EgtMdbGetNextMachining(nFType, MachiningName)
MachiningCathegory.Items.Add(New CustomItem(MachiningName, nFType))
- While EgtMdbGetNextMachining(nFType, MachiningName)
- MachiningCathegory.Items.Add(New CustomItem(MachiningName, nFType))
- End While
- End If
- MachiningsList.Add(MachiningCathegory)
+ End While
End If
+ MachiningsList.Add(MachiningCathegory)
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
diff --git a/ManualAxesMoveUC.xaml.vb b/ManualAxesMoveUC.xaml.vb
index 4012917..d0c607a 100644
--- a/ManualAxesMoveUC.xaml.vb
+++ b/ManualAxesMoveUC.xaml.vb
@@ -117,8 +117,11 @@ Public Class ManualAxesMoveUC
' Calcolo stringa di comando risultante
EgtLuaExecLine("CmdString()")
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
+ ' Reset lua
EgtLuaResetGlobVar("CmdString")
EgtLuaResetGlobVar("CMD")
+ ' Log del comando
+ EgtOutLog("CmdString=" & CmdString)
' Eseguo in MDI
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
System.Threading.Thread.Sleep(150)
diff --git a/MoveRawPartPage.xaml.vb b/MoveRawPartPage.xaml.vb
index 72c4cb9..b33c5a0 100644
--- a/MoveRawPartPage.xaml.vb
+++ b/MoveRawPartPage.xaml.vb
@@ -18,10 +18,9 @@ Public Class MoveRawPartPage
Private m_dOrigDist As Double = 0 ' distanza iniziale (spessore taglio)
Private m_dCurrDist As Double = 0 ' distanza corrente
' Gestione movimento con ventose
- 'Private m_nTempId As Integer = GDB_ID.NULL
- 'Private m_nVacId As Integer = GDB_ID.NULL
- 'Private m_nRefId As Integer = GDB_ID.NULL
- Private m_RawMoveDataList As New List(Of RawMoveData)
+ Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
+ Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
+ Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
PrevBtn.IsEnabled = False
@@ -39,7 +38,7 @@ Public Class MoveRawPartPage
' Se movimento con ventosa, verifico se lama troppo grande
If Not m_bByHand And Not m_MainWindow.m_CurrentMachine.IsVacuumMovePossible() Then
m_bByHand = True
- m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
End If
' Deseleziono tutto
EgtDeselectAll()
@@ -93,6 +92,8 @@ Public Class MoveRawPartPage
End If
' Altrimenti movimento con ventose
Else
+ m_bRemovedRaw = False
+ m_bRawWithCups = False
' Pulisco lista info per grezzi
m_RawMoveDataList.Clear()
m_RawMoveDataList.Capacity() = 10
@@ -101,13 +102,12 @@ Public Class MoveRawPartPage
If m_bByHand Then
LeftBtn.Visibility = Windows.Visibility.Hidden
RightBtn.Visibility = Windows.Visibility.Hidden
- RemovePartBtn.Visibility = Windows.Visibility.Visible
' Altrimeni per movimento con ventose
Else
LeftBtn.Visibility = Windows.Visibility.Visible
RightBtn.Visibility = Windows.Visibility.Visible
- RemovePartBtn.Visibility = Windows.Visibility.Hidden
End If
+ RemovePartBtn.Visibility = Windows.Visibility.Visible
End Sub
@@ -154,6 +154,14 @@ Public Class MoveRawPartPage
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
' Aggiorno i dati
AddRawMoveData(rmData)
+ m_bRawWithCups = True
+ ' Reset eventuale messaggio
+ m_CurrProjPage.ClearMessage()
+ Else
+ ' Aggiorno i dati
+ m_bRawWithCups = False
+ ' Messaggio di avvertimento
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If
End If
End If
@@ -184,10 +192,14 @@ Public Class MoveRawPartPage
End If
' Altrimenti movimento Y +
Else
- Dim vtMove As New Vector3d(0, m_dStep, 0)
- If EgtMoveRawPart(nRawId, vtMove) Then
- EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
- AddRawMoveData(nRawId, vtMove)
+ If m_bRawWithCups Then
+ Dim vtMove As New Vector3d(0, m_dStep, 0)
+ If EgtMoveRawPart(nRawId, vtMove) Then
+ EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
+ AddRawMoveData(nRawId, vtMove)
+ End If
+ Else
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If
End If
nRawId = EgtGetNextSelectedObj()
@@ -217,10 +229,14 @@ Public Class MoveRawPartPage
End If
' Altrimenti movimento Y -
Else
- Dim vtMove As New Vector3d(0, -m_dStep, 0)
- If EgtMoveRawPart(nRawId, vtMove) Then
- EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
- AddRawMoveData(nRawId, vtMove)
+ If m_bRawWithCups Then
+ Dim vtMove As New Vector3d(0, -m_dStep, 0)
+ If EgtMoveRawPart(nRawId, vtMove) Then
+ EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
+ AddRawMoveData(nRawId, vtMove)
+ End If
+ Else
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If
End If
nRawId = EgtGetNextSelectedObj()
@@ -229,12 +245,18 @@ Public Class MoveRawPartPage
End Sub
Private Sub RightBtn_Click(sender As Object, e As RoutedEventArgs) Handles RightBtn.Click
+ ' Solo movimento con ventose
+ If m_bByHand Then Return
Dim nRawId As Integer = EgtGetFirstSelectedObj()
While nRawId <> GDB_ID.NULL
- Dim vtMove As New Vector3d(m_dStep, 0, 0)
- If EgtMoveRawPart(nRawId, vtMove) Then
- EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
- AddRawMoveData(nRawId, vtMove)
+ If m_bRawWithCups Then
+ Dim vtMove As New Vector3d(m_dStep, 0, 0)
+ If EgtMoveRawPart(nRawId, vtMove) Then
+ EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
+ AddRawMoveData(nRawId, vtMove)
+ End If
+ Else
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -242,12 +264,18 @@ Public Class MoveRawPartPage
End Sub
Private Sub LeftBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftBtn.Click
+ ' Solo movimento con ventose
+ If m_bByHand Then Return
Dim nRawId As Integer = EgtGetFirstSelectedObj()
While nRawId <> GDB_ID.NULL
- Dim vtMove As New Vector3d(-m_dStep, 0, 0)
- If EgtMoveRawPart(nRawId, vtMove) Then
- EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
- AddRawMoveData(nRawId, vtMove)
+ If m_bRawWithCups Then
+ Dim vtMove As New Vector3d(-m_dStep, 0, 0)
+ If EgtMoveRawPart(nRawId, vtMove) Then
+ EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
+ AddRawMoveData(nRawId, vtMove)
+ End If
+ Else
+ m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -258,6 +286,16 @@ Public Class MoveRawPartPage
Dim nRawId As Integer = EgtGetFirstSelectedObj()
While nRawId <> GDB_ID.NULL
EgtRemoveRawPartFromCurrPhase(nRawId)
+ ' Se con ventose
+ If Not m_bByHand Then
+ m_bRemovedRaw = True
+ ' rimuovo eventuali indicazioni di movimento
+ RemoveRawMoveData(nRawId)
+ ' nascondo le ventose
+ EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
+ ' Reset eventuale messaggio
+ m_CurrProjPage.ClearMessage()
+ End If
nRawId = EgtGetFirstSelectedObj()
End While
EgtDraw()
@@ -285,8 +323,9 @@ Public Class MoveRawPartPage
If Not m_bByHand Then
' nascondo le ventose
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
- ' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
+ ' recupero disposizione fase corrente
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
+ ' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
For Each rmData As RawMoveData In m_RawMoveDataList
' Se movimento significativo
If Not rmData.m_vtMove.IsSmall() Then
@@ -294,6 +333,8 @@ Public Class MoveRawPartPage
SaveMoveInfoInDisposition(nDispId, rmData)
End If
Next
+ ' imposto presenza operazioni manuali
+ SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
' Eseguo calcolo speciale dei movimenti
EgtSpecialApplyDisposition(nDispId, True)
End If
@@ -336,6 +377,21 @@ Public Class MoveRawPartPage
Return nInd
End Function
+ Private Sub RemoveRawMoveData(nRawId As Integer)
+ ' Cerco in lista record con dati del grezzo indicato
+ Dim nInd As Integer = -1
+ For i As Integer = 0 To m_RawMoveDataList.Count() - 1
+ If m_RawMoveDataList(i).m_nId = nRawId Then
+ nInd = i
+ Exit For
+ End If
+ Next
+ ' Se trovato, lo elimino
+ If nInd >= 0 Then
+ m_RawMoveDataList.RemoveAt(nInd)
+ End If
+ End Sub
+
End Class
diff --git a/MultipleCut.xaml.vb b/MultipleCut.xaml.vb
index e94e8d8..55a86d6 100644
--- a/MultipleCut.xaml.vb
+++ b/MultipleCut.xaml.vb
@@ -552,6 +552,10 @@ Public Class MultipleCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
@@ -599,6 +603,10 @@ Public Class MultipleCut
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 3dff5fa..fa21ab9 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -18,7 +18,7 @@ Imports System.Windows
#End If
-
+
@@ -60,5 +60,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/My Project/app.manifest b/My Project/app.manifest
new file mode 100644
index 0000000..684187d
--- /dev/null
+++ b/My Project/app.manifest
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OmagCUT.vbproj b/OmagCUT.vbproj
index 3340ae5..202da60 100644
--- a/OmagCUT.vbproj
+++ b/OmagCUT.vbproj
@@ -76,6 +76,12 @@
OnOutputUpdated
+
+ My Project\app.manifest
+
+
+ Resources\OmagCUT.ico
+
..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll
@@ -508,6 +514,7 @@
My.Resources
+
SettingsSingleFileGenerator
Settings.Designer.vb
@@ -609,6 +616,9 @@
+
+
+
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
diff --git a/ProjectMgrUC.xaml.vb b/ProjectMgrUC.xaml.vb
index 99620ed..b1e86fc 100644
--- a/ProjectMgrUC.xaml.vb
+++ b/ProjectMgrUC.xaml.vb
@@ -36,17 +36,31 @@ Public Class ProjectMgrUC
If EgtGetModified() Then
Dim SaveCurrProj As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_EGTMSGBOX + 1), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
Select Case SaveCurrProj.DialogResult
- Case 0 ' Annulla
- Return
- Case 1 ' Si
- m_CurrProjPage.SaveNamedProject()
- m_CurrProjPage.SaveProject()
- Case 2 ' No
- ' Non devo fare alcunchè
+ Case 0 ' Annulla
+ Return
+ Case 1 ' Si
+ 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())
+ ' Se ci sono pezzi in parcheggio, chiedo se conservarli
+ Dim bRetainParkedParts As Boolean = False
+ If EgtGetFirstPart() <> GDB_ID.NULL Then
+ ' Conservare i pezzi in parcheggio ?
+ Dim RetainParkedParts As New EgtMsgBox(m_MainWindow, "", EgtMsg(91118), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
+ Select Case RetainParkedParts.DialogResult
+ Case 0 ' Annulla
+ Return
+ Case 1 ' Si
+ bRetainParkedParts = True
+ Case 2 ' No
+ ' Non devo fare alcunchè
+ End Select
+ End If
' Se macchina con due tavole, chiedo su quale si vuole operare
Dim sTabName As String = MAIN_TAB
If EgtGetTableId(SECOND_TAB) <> GDB_ID.NULL Then
@@ -60,7 +74,7 @@ Public Class ProjectMgrUC
End Select
End If
' Creo nuovo progetto
- m_CurrProjPage.NewProject(sTabName)
+ m_CurrProjPage.NewProject(sTabName, bRetainParkedParts)
EgtZoom(ZM.ALL)
End Sub
diff --git a/RawPartPageUC.xaml.vb b/RawPartPageUC.xaml.vb
index 38f8ab8..9dc3dcc 100644
--- a/RawPartPageUC.xaml.vb
+++ b/RawPartPageUC.xaml.vb
@@ -178,7 +178,7 @@ Public Class RawPartPageUC
' Assegno dati grezzo rettangolare ai textbox
LengthTxBx.Text = LenToString(m_RawLength, 2)
WidthTxBx.Text = LenToString(m_RawWidth, 2)
- HeightTxBx.Text = LenToString(m_RawHeight, 2)
+ HeightTxBx.Text = LenToString(m_RawHeight, 3)
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
KerfTxBx.Text = LenToString(m_RawKerf, 2)
@@ -1007,7 +1007,7 @@ Public Class RawPartPageUC
EgtDraw()
End If
Else
- HeightTxBx.Text = LenToString(m_RawHeight, 2)
+ HeightTxBx.Text = LenToString(m_RawHeight, 3)
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 18)) 'Non sono ammessi spessori negativi
End If
End Sub
@@ -1180,14 +1180,14 @@ Public Class RawPartPageUC
If RawThickness > -EPS_ZERO Then
m_CurrProjPage.ClearMessage()
If Math.Abs(RawThickness - m_RawHeight) > EPS_SMALL Then
- HeightTxBx.Text = LenToString(RawThickness, 2)
+ HeightTxBx.Text = LenToString(RawThickness, 3)
m_RawHeight = RawThickness
UpdateRawPartHeight()
' Ridisegno
EgtDraw()
End If
Else
- HeightTxBx.Text = LenToString(m_RawHeight, 2)
+ HeightTxBx.Text = LenToString(m_RawHeight, 3)
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 18)) 'Non sono ammessi spessori negativi
End If
' Chiudo msgbox
diff --git a/Resources/OmagCUT.ico b/Resources/OmagCUT.ico
new file mode 100644
index 0000000..02e2036
Binary files /dev/null and b/Resources/OmagCUT.ico differ
diff --git a/SawTestUC.xaml.vb b/SawTestUC.xaml.vb
index 5793e28..7f3f27a 100644
--- a/SawTestUC.xaml.vb
+++ b/SawTestUC.xaml.vb
@@ -417,6 +417,10 @@ Public Class SawTestUC
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId, True, True)
+ ' Eventuale eliminazione Home finale
+ If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
+ RemoveFinalHome()
+ End If
UpdateOkBtn()
Return m_bCutOk
End Function
diff --git a/SimulationPageUC.xaml b/SimulationPageUC.xaml
index de54fc5..8d044b5 100644
--- a/SimulationPageUC.xaml
+++ b/SimulationPageUC.xaml
@@ -77,27 +77,27 @@
+ Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
+ Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
+ Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
+ Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
+ Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
-
+
-EPS_SMALL And dEndAddLen > -EPS_SMALL And
+ Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
+ Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
+ Mach.m_bCanStartAll = (nRes And CAR_RES.LI_OK) <> 0
+ Mach.m_bCanEndAll = (nRes And CAR_RES.LO_OK) <> 0
+ Else
+ Mach.m_bCanStartAll = False
+ Mach.m_bCanEndAll = False
+ End If
+ ' se trasformabile in taglio di separazione, verifico se lo è
+ If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
+ EgtSetCurrMachining(nOperId)
+ Dim nLiType As Integer
+ EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
+ Dim nLoType As Integer
+ EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
+ Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
+ Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT)
+ Else
+ Mach.m_bStartAll = False
+ Mach.m_bEndAll = False
+ End If
+ ' Forature e fresature
Else
Mach.m_nInterf = FMI_TYPE.NONE
- End If
- ' la imposto come lavorazione corrente e ne ricavo il tipo
- EgtSetCurrMachining(nOperId)
- Dim nMchType As Integer = MCH_MY.NONE
- EgtGetMachiningParam(MCH_MP.TYPE, nMchType)
- ' se taglio con lama, recupero l'angolo di fianco
- Dim dSideAng As Double = 90
- EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
- ' se taglio con lama, recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
- Dim dStartAddLen As Double = -10
- EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
- Dim dEndAddLen As Double = -10
- EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
- ' verifico se trasformabile in un taglio di separazione
- If Math.Abs(dSideAng) < EPS_ANG_SMALL And
- dStartAddLen > -EPS_SMALL And dEndAddLen > -EPS_SMALL And
- Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
- Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
- Mach.m_bCanStartAll = (nRes And CAR_RES.LI_OK) <> 0
- Mach.m_bCanEndAll = (nRes And CAR_RES.LO_OK) <> 0
- Else
+ Mach.m_dSideAng = 0
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
- End If
- ' se trasformabile in taglio di separazione, verifico se lo è
- If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
- EgtSetCurrMachining(nOperId)
- Dim nLiType As Integer
- EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
- Dim nLoType As Integer
- EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
- Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
- Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT)
- Else
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
diff --git a/SplitPageUC.xaml.vb b/SplitPageUC.xaml.vb
index 28afcd8..524fa56 100644
--- a/SplitPageUC.xaml.vb
+++ b/SplitPageUC.xaml.vb
@@ -75,13 +75,20 @@ Public Class SplitPageUC
For i As Integer = 1 To m_MachiningList.Count()
Dim Mach As SplitMach = m_MachiningList(i - 1)
If Mach.m_nType = MCH_OY.SAWING Then ' Taglio
- Dim sText As String = EgtMsg(90791) & i.ToString()
+ Dim sText As String = String.Empty
+ If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
+ sText = EgtMsg(90791) & " " & i.ToString()
+ ElseIf Mach.m_dSideAng > 0 Then
+ sText = EgtMsg(90791) & " _\ " & i.ToString()
+ Else
+ sText = EgtMsg(90791) & " _/ " & i.ToString()
+ End If
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
- Dim sText As String = EgtMsg(90792) & i.ToString()
+ Dim sText As String = EgtMsg(90792) & " " & i.ToString()
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
- Dim sText As String = EgtMsg(90793) & i.ToString()
+ Dim sText As String = EgtMsg(90793) & " " & i.ToString()
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
End If
Next
diff --git a/ToolsDbPageUC.xaml.vb b/ToolsDbPageUC.xaml.vb
index ece63e5..9544654 100644
--- a/ToolsDbPageUC.xaml.vb
+++ b/ToolsDbPageUC.xaml.vb
@@ -9,15 +9,15 @@ Public Class ToolsDbPageUC
' Riferimento alla MainWindow
Private m_MainWindow As MainWindow = Application.Current.MainWindow
+ ' Riferimento alla macchina corrente
+ Private m_CurrMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
+
' Lista degli utensili
Dim ToolsList As New ObservableCollection(Of CathegoryItem)
' Proprietà
Private m_bFirst As Boolean = True
' Direttorio costruttori geometria utensili
Private m_sToolMakersDir As String = String.Empty
- ' Abilitazioni visualizzazioni speciali
- Private m_bShowToolChanger As Boolean = True
- Private m_bShowHeadExit As Boolean = True
' Stringa identificativa variabile geometrica in modifica
Private m_sCurrVar As String = String.Empty
' Parametri geometrici dell'utensile corrente
@@ -162,16 +162,13 @@ Public Class ToolsDbPageUC
ToolScene.SetStatusNull()
' leggo direttorio toolmakers
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir, m_MainWindow.GetIniFile())
- ' leggo abilitazioni visualizzazione campi utensili
- m_bShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 1, m_MainWindow.GetMachIniFile()) <> 0
- m_bShowHeadExit = GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 1, m_MainWindow.GetMachIniFile()) <> 0
' Inizializzo le famiglie di utensili nell'albero
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
- InitializeToolFamily(K_SAWBLADE, MCH_TF.SAWBLADE, EgtMsg(MSG_TOOLSDBPAGEUC + 31))
- InitializeToolFamily(K_DRILLBIT, MCH_TF.DRILLBIT, EgtMsg(MSG_TOOLSDBPAGEUC + 32))
- InitializeToolFamily(K_MILL, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 33))
- 'Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
- If Not m_bShowHeadExit Then
+ InitializeToolFamily(m_CurrMachine.bSaw, MCH_TF.SAWBLADE, EgtMsg(MSG_TOOLSDBPAGEUC + 31))
+ InitializeToolFamily(m_CurrMachine.bDrill, MCH_TF.DRILLBIT, EgtMsg(MSG_TOOLSDBPAGEUC + 32))
+ InitializeToolFamily(m_CurrMachine.bMill, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 33))
+ ' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
+ If Not m_CurrMachine.bShowHeadExit Then
MoveParam()
End If
m_bFirst = False
@@ -239,7 +236,7 @@ Public Class ToolsDbPageUC
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nTemp)
Dim bSaw As Boolean = ((nTemp And MCH_TF.SAWBLADE) <> 0)
' Per macchine con ToolChanger lame su H1.1 e altri utensili su H2.1
- If m_bShowToolChanger Then
+ If m_CurrMachine.bShowToolChanger Then
EgtTdbSetCurrToolParam(MCH_TP.HEAD, If(bSaw, "H1", "H2"))
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, 1)
' Altrimenti lame su H1.1 e altri utensili su H1.2
@@ -248,7 +245,7 @@ Public Class ToolsDbPageUC
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
End If
' Per macchine senza ToolChanger, resetto la posizione su questo
- If Not m_bShowToolChanger Then
+ If Not m_CurrMachine.bShowToolChanger Then
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, "")
End If
EgtTdbSaveCurrTool()
@@ -332,19 +329,19 @@ Public Class ToolsDbPageUC
m_MainWindow.m_MachinePageUC.AlarmsBtn.IsChecked = True
End Sub
- Friend Sub InitializeToolFamily(sFIniConst As String, nFType As Integer, sFName As String)
- If GetPrivateProfileInt(S_TOOLS, sFIniConst, 0, m_MainWindow.GetMachIniFile()) = 1 Then
- Dim ToolCathegory As New CathegoryItem(sFName, nFType)
- Dim nType As Integer = 0
- Dim ToolName As String = String.Empty
- If EgtTdbGetFirstTool(nFType, ToolName, nType) Then
+ Friend Sub InitializeToolFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
+ If Not bEnabled Then Return
+ ' Inserisco categoria ed eventuali elementi
+ Dim ToolCathegory As New CathegoryItem(sFName, nFType)
+ Dim nType As Integer = 0
+ Dim ToolName As String = String.Empty
+ If EgtTdbGetFirstTool(nFType, ToolName, nType) Then
+ ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
+ While EgtTdbGetNextTool(nFType, ToolName, nType)
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
- While EgtTdbGetNextTool(nFType, ToolName, nType)
- ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
- End While
- End If
- ToolsList.Add(ToolCathegory)
+ End While
End If
+ ToolsList.Add(ToolCathegory)
End Sub
Private Sub GetToolParams()
@@ -453,8 +450,8 @@ Public Class ToolsDbPageUC
Private Sub ViewToolParams()
NameTxBl.Visibility = Windows.Visibility.Visible
NameTxBx.Visibility = Windows.Visibility.Visible
- TCPosBrd.Visibility = If(m_bShowToolChanger, Windows.Visibility.Visible, Windows.Visibility.Hidden)
- HeadExitBrd.Visibility = If(m_bShowHeadExit, Windows.Visibility.Visible, Windows.Visibility.Hidden)
+ TCPosBrd.Visibility = If(m_CurrMachine.bShowToolChanger, Windows.Visibility.Visible, Windows.Visibility.Hidden)
+ HeadExitBrd.Visibility = If(m_CurrMachine.bShowHeadExit, Windows.Visibility.Visible, Windows.Visibility.Hidden)
SpeedGpBx.Visibility = Windows.Visibility.Visible
FeedGpBx.Visibility = Windows.Visibility.Visible
CoolantTxBl.Visibility = Windows.Visibility.Visible
diff --git a/Utility.vb b/Utility.vb
index 046a713..37f7b6e 100644
--- a/Utility.vb
+++ b/Utility.vb
@@ -23,6 +23,7 @@ Module Utility
End Function
Friend Function StringToDouble(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ If String.IsNullOrEmpty(sVal) Then Return False
Return EgtLuaEvalNumExpr(sVal, dVal)
End Function
@@ -31,6 +32,7 @@ Module Utility
End Function
Friend Function StringToLen(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ If String.IsNullOrEmpty(sVal) Then Return False
If EgtLuaEvalNumExpr(sVal, dVal) Then
dVal = EgtFromUiUnits(dVal)
Return True
diff --git a/VacuumCups.vb b/VacuumCups.vb
index e396ea7..0015a7c 100644
--- a/VacuumCups.vb
+++ b/VacuumCups.vb
@@ -307,12 +307,12 @@ Module VacuumCups
sInfo = rmData.m_nId.ToString()
EgtSetInfo(nRpmId, "Id", sInfo)
sInfo = DoubleToString(rmData.m_vtMove.x, 4) & "," &
- DoubleToString(rmData.m_vtMove.y, 4) & "," &
- DoubleToString(rmData.m_vtMove.z, 4)
+ DoubleToString(rmData.m_vtMove.y, 4) & "," &
+ DoubleToString(rmData.m_vtMove.z, 4)
EgtSetInfo(nRpmId, "Mv", sInfo)
sInfo = DoubleToString(rmData.m_vtDelta.x, 4) & "," &
- DoubleToString(rmData.m_vtDelta.y, 4) & "," &
- DoubleToString(rmData.m_vtDelta.z, 4)
+ DoubleToString(rmData.m_vtDelta.y, 4) & "," &
+ DoubleToString(rmData.m_vtDelta.z, 4)
EgtSetInfo(nRpmId, "Dt", sInfo)
sInfo = DoubleToString(rmData.m_dAngRotDeg, 4)
EgtSetInfo(nRpmId, "Ad", sInfo)
@@ -323,4 +323,12 @@ Module VacuumCups
Return True
End Function
+ Friend Function SaveRemoveByHandInDisposition(nDispId As Integer, bRemoveByHand As Boolean) As Boolean
+ ' Verifico DispId
+ If EgtGetOperationType(nDispId) <> MCH_OY.DISP Then Return False
+ ' Imposto flag
+ EgtSetInfo(nDispId, "Rbh", If(bRemoveByHand, "1", "0"))
+ Return True
+ End Function
+
End Module
diff --git a/WorkInProgressPageUC.xaml.vb b/WorkInProgressPageUC.xaml.vb
index 907063d..28f0e12 100644
--- a/WorkInProgressPageUC.xaml.vb
+++ b/WorkInProgressPageUC.xaml.vb
@@ -95,7 +95,7 @@ Public Class WorkInProgressPageUC
m_bContinue = False
End Sub
- Private Function NewProject() As Boolean
+ Private Function WipNewProject() As Boolean
' Imposto il nuovo progetto
EgtNewFile()
' Creo un gruppo di lavoro e carico la macchina corrente
@@ -147,7 +147,7 @@ Public Class WorkInProgressPageUC
End If
End If
If Not My.Computer.FileSystem.FileExists(sPath) Then
- Return NewProject()
+ Return WipNewProject()
End If
' Carico il progetto
EgtOpenFile(sPath)
@@ -318,7 +318,7 @@ Public Class WorkInProgressPageUC
' Inizializzo gestore lavorazioni
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir())
' Carico macchina
- If Not NewProject() Then
+ If Not WipNewProject() Then
EgtOutLog("WorkInProgress : error loading machine")
End If
' Recupero origine tavola