OmagCUT 1.6t1 :

- aggiunto log dei comandi diretti 3assi e 5assi
- aggiunta rimozione manuale sfridi anche con movimento pezzi con ventose
- aggiunta possibilità di eliminare home finale nei tagli diretti
- con NUOVO progetto e pezzi parcheggiati si chiede se conservarli
- spessore pezzo con 3 decimali (per inches)
- migliorata visualizzazione coordinate assi in simulazione
- in lista lavorazioni aggiunto flag sui tagli inclinati 
- corretta visualizzazione famiglie utensili da Ini.
This commit is contained in:
Dario Sassi
2016-08-05 18:48:41 +00:00
parent cb2257e12f
commit a8dc3d2642
28 changed files with 432 additions and 143 deletions
+12
View File
@@ -234,6 +234,18 @@
</GroupBox>
<GroupBox Name="DirectCutsParamGpBx" Style="{StaticResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="2">
<Grid Grid.Column="3" Grid.Row="1">
<TextBlock Name="FinalHomeTxBl"
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="FinalHomeChBx" Height="40" Width="40"
HorizontalAlignment="Right" Margin="0,0,11,0"/>
</Grid>
</GroupBox>
</Grid>
</Border>
+8
View File
@@ -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)
+5
View File
@@ -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)
+3
View File
@@ -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"
+44 -8
View File
@@ -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
+31 -4
View File
@@ -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()
+8
View File
@@ -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
+8
View File
@@ -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
+2
View File
@@ -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
+9 -9
View File
@@ -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
+3
View File
@@ -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)
+80 -24
View File
@@ -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
+8
View File
@@ -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
+3 -3
View File
@@ -18,7 +18,7 @@ Imports System.Windows
<Assembly: AssemblyTitle("OmagCUT 32 bit")>
<Assembly: AssemblyDescription("OmagCUTR32.exe")>
#End If
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyProduct("OmagCUT")>
<Assembly: AssemblyCopyright("Copyright © 2015-2016 by EgalTech s.r.l.")>
<Assembly: AssemblyTrademark("")>
@@ -60,5 +60,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.19.9")>
<Assembly: AssemblyFileVersion("1.6.19.9")>
<Assembly: AssemblyVersion("1.6.20.1")>
<Assembly: AssemblyFileVersion("1.6.20.1")>
+58
View File
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with.
Windows will automatically select the most compatible environment.-->
<!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
<!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
<!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node-->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->
</application>
</compatibility>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- <dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>-->
</asmv1:assembly>
+10
View File
@@ -76,6 +76,12 @@
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\OmagCUT.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="AxInterop.FXLib">
<HintPath>..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll</HintPath>
@@ -508,6 +514,7 @@
<CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource>
<None Include="app.config" />
<None Include="My Project\app.manifest" />
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
@@ -609,6 +616,9 @@
<ItemGroup>
<Resource Include="Resources\SawProbe.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\OmagCUT.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
+22 -8
View File
@@ -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
+4 -4
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

+4
View File
@@ -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
+7 -7
View File
@@ -77,27 +77,27 @@
<TextBlock Name="L1NameTxBl" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
<EgtWPFLib:EgtTextBox Name="L1ValueTxBl" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="L2NameTxBl" Grid.Column="0" Grid.Row="1" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
<EgtWPFLib:EgtTextBox Name="L2ValueTxBl" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="L3NameTxBl" Grid.Column="0" Grid.Row="2" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
<EgtWPFLib:EgtTextBox Name="L3ValueTxBl" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="R1NameTxBl" Grid.Column="0" Grid.Row="3" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
<EgtWPFLib:EgtTextBox Name="R1ValueTxBl" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="R2NameTxBl" Grid.Column="0" Grid.Row="4" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
<EgtWPFLib:EgtTextBox Name="R2ValueTxBl" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
Width="120" Style="{StaticResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
<TextBlock Name="GCodeTxBl" Grid.Column="0" Grid.Row="5" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" />
<EgtWPFLib:EgtTextBox Name="FValueTxBl" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2"
Width="120" Style="{StaticResource OmagCut_FixedTextBox}"/>
<TextBlock Name="FValueTxBl" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Right"
VerticalAlignment="Center" TextAlignment="Right" Margin="0,0,50,0" />
<TextBlock Name="TNameTxBl" Grid.Column="0" Grid.Row="6" FontSize="20" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" Margin="0,0,-50,0" />
<TextBlock Name="SValueTxBl" Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Right"
+4
View File
@@ -552,6 +552,10 @@ Public Class SingleCutUC
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
+49 -40
View File
@@ -11,6 +11,7 @@ Public Module SplitAuto
Public m_nId As Integer
Public m_vOthId As New List(Of Integer)
Public m_nType As Integer
Public m_dSideAng As Double
Public m_sLay As String
Public m_nNbrId As Integer
Public m_nInterf As Integer
@@ -47,50 +48,58 @@ Public Module SplitAuto
Mach.m_nType = EgtGetOperationType(nOperId)
' layer di origine
EgtGetInfo(nOperId, "Lay", Mach.m_sLay)
' verifica interferenza
If Mach.m_sLay = NAME_OUTLOOP Then
EgtVerifyMachining(nOperId, Mach.m_nInterf)
For Each nId As Integer In Mach.m_vOthId
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
EgtVerifyMachining(nId, nRes)
Mach.m_nInterf = Mach.m_nInterf Or nRes
Next
' se taglio con lama
If Mach.m_nType = MCH_OY.SAWING Then
' verifica interferenza
If Mach.m_sLay = NAME_OUTLOOP Then
EgtVerifyMachining(nOperId, Mach.m_nInterf)
For Each nId As Integer In Mach.m_vOthId
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
EgtVerifyMachining(nId, nRes)
Mach.m_nInterf = Mach.m_nInterf Or nRes
Next
Else
Mach.m_nInterf = FMI_TYPE.NONE
End If
' la imposto come lavorazione corrente
EgtSetCurrMachining(nOperId)
' recupero l'angolo di fianco
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
' 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(Mach.m_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_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
+10 -3
View File
@@ -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
+23 -26
View File
@@ -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
+2
View File
@@ -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
+12 -4
View File
@@ -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
+3 -3
View File
@@ -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