OmagCUT 3.1e2 :
- correzioni al polishing (oar si notifica che è un taglio diretto e si controlla meglio l'utensile) - varie migliorie nei tagli diretti.
This commit is contained in:
+60
-14
@@ -603,18 +603,20 @@ Friend Module CamAuto
|
|||||||
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
||||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
Dim CurrMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||||
|
sMissingTools = ""
|
||||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
sMissingTools = String.Empty
|
|
||||||
Dim nId As Integer = EgtGetFirstOperation()
|
Dim nId As Integer = EgtGetFirstOperation()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
If IsValidMachining(nId) Then
|
If IsValidMachining(nId) Then
|
||||||
Dim nType As Integer = MCH_OY.NONE
|
Dim nType As Integer = MCH_OY.NONE
|
||||||
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
||||||
Dim sTuuid As String = String.Empty
|
Dim sTuuid As String = String.Empty
|
||||||
Dim sTool As String = String.Empty
|
|
||||||
Dim sTool2 As String = String.Empty
|
|
||||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
|
Dim sTool As String = String.Empty
|
||||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||||
|
Dim nToolType As Integer = MCH_TY.NONE
|
||||||
|
if EgtTdbSetCurrTool( sTool) Then EgtTdbGetCurrToolParam( MCH_TP.TYPE, nToolType)
|
||||||
If String.IsNullOrWhiteSpace(sTool) Then
|
If String.IsNullOrWhiteSpace(sTool) Then
|
||||||
Dim sMchTool As String = ""
|
Dim sMchTool As String = ""
|
||||||
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||||
@@ -623,6 +625,7 @@ Friend Module CamAuto
|
|||||||
sMissingTools = sMissingTools & sMchTool & ", "
|
sMissingTools = sMissingTools & sMchTool & ", "
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.SAWING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Then
|
ElseIf nType = MCH_OY.SAWING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Then
|
||||||
|
Dim sTool2 As String = String.Empty
|
||||||
If bIsMultiCut Then
|
If bIsMultiCut Then
|
||||||
' L'utensile sulla seconda testa ha lo stesso nome di quello sulla prima con suffisso "-2"
|
' L'utensile sulla seconda testa ha lo stesso nome di quello sulla prima con suffisso "-2"
|
||||||
If sTool.Substring(sTool.Length() - 2) = "-2" Then
|
If sTool.Substring(sTool.Length() - 2) = "-2" Then
|
||||||
@@ -630,7 +633,7 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
sTool2 = sTool & "-2"
|
sTool2 = sTool & "-2"
|
||||||
End If
|
End If
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
If CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
Dim bOnTC As Boolean = FindToolOnChanger( sTool)
|
Dim bOnTC As Boolean = FindToolOnChanger( sTool)
|
||||||
If Not bOnTC Then
|
If Not bOnTC Then
|
||||||
bOk = False
|
bOk = False
|
||||||
@@ -638,17 +641,17 @@ Friend Module CamAuto
|
|||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
ElseIf String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
|
||||||
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, CurrMachine.sCurrSaw) <> 0) AndAlso
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
|
String.Compare(sTool, CurrMachine.sCurrDripSaw) <> 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.DRILLING Then
|
ElseIf nType = MCH_OY.DRILLING Then
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDrill) <> 0 And
|
If String.Compare(sTool, CurrMachine.sCurrDrill) <> 0 And
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripDrill) <> 0 And
|
String.Compare(sTool, CurrMachine.sCurrDripDrill) <> 0 And
|
||||||
Not FindToolOnChanger(sTool) Then
|
Not FindToolOnChanger(sTool) Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
@@ -656,17 +659,56 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.MILLING Then
|
ElseIf nType = MCH_OY.MILLING Then
|
||||||
' Verifico anche le lame perchè il taglio di lama singolo sulle cornici è una lavorazione di fresatura
|
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrMill) <> 0 And
|
If nToolType = MCH_TY.MILL_POLISHING AndAlso
|
||||||
Not FindToolOnChanger(sTool) And
|
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 Then
|
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Verifico sia la fresa corrente, oppure sia attrezzato oppure la lama corrente
|
||||||
|
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
|
||||||
|
ElseIf String.Compare(sTool, CurrMachine.sCurrMill) <> 0 AndAlso
|
||||||
|
Not FindToolOnChanger(sTool) AndAlso
|
||||||
|
String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
|
||||||
|
nToolType <> MCH_TY.MILL_POLISHING Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf nType = MCH_OY.POCKETING Then
|
||||||
|
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
|
||||||
|
If nToolType = MCH_TY.MILL_POLISHING AndAlso
|
||||||
|
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
|
||||||
|
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Verifico sia la mola da scasso corrente, oppure sia attrezzato
|
||||||
|
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
|
||||||
|
ElseIf String.Compare(sTool, CurrMachine.sCurrMillNoTip) <> 0 AndAlso
|
||||||
|
Not FindToolOnChanger(sTool) AndAlso
|
||||||
|
nToolType <> MCH_TY.MILL_POLISHING Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.WATERJETTING Then
|
ElseIf nType = MCH_OY.WATERJETTING Then
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrWaterJet) <> 0 And
|
If String.Compare(sTool, CurrMachine.sCurrWaterJet) <> 0 And
|
||||||
Not FindToolOnChanger(sTool) Then
|
Not FindToolOnChanger(sTool) Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
@@ -715,6 +757,10 @@ Friend Module CamAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function CanChangeTool() As Boolean
|
Friend Function CanChangeTool() As Boolean
|
||||||
|
' Se solo lama, non è possibile
|
||||||
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
' Se non è TC anche per lama, sempre possibile
|
' Se non è TC anche per lama, sempre possibile
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ Public Class ChooseTestToolWD
|
|||||||
' Imposto la lama
|
' Imposto la lama
|
||||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
End If
|
End If
|
||||||
|
Return True
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
@@ -78,7 +79,7 @@ Public Class ChooseTestToolWD
|
|||||||
' Imposto il foretto
|
' Imposto il foretto
|
||||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
End If
|
End If
|
||||||
|
Return True
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
@@ -95,7 +96,6 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
@@ -124,7 +124,6 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
@@ -147,12 +146,9 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return False
|
Return False
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ Public Class ControlsDirectCutUC
|
|||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
|
|
||||||
Friend m_SingleCutAuto As SingleCutAuto
|
|
||||||
' ---- MAI USATA ----
|
|
||||||
Friend m_MachineButtons As MachineButtonsUC
|
Friend m_MachineButtons As MachineButtonsUC
|
||||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||||
|
Friend m_SingleCutAuto As SingleCutAuto
|
||||||
Friend m_SingleCut As SingleCutUC
|
Friend m_SingleCut As SingleCutUC
|
||||||
Friend m_SingleDrill As SingleDrillUC
|
Friend m_SingleDrill As SingleDrillUC
|
||||||
Friend m_MultipleCut As MultipleCut
|
Friend m_MultipleCut As MultipleCut
|
||||||
@@ -60,13 +58,15 @@ Public Class ControlsDirectCutUC
|
|||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
|
||||||
m_bManualCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
|
||||||
|
|
||||||
'Creazione delle Page UserControl
|
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||||
|
m_bManualCut = ( GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
|
||||||
|
' Creazione delle Page UserControl
|
||||||
m_MachineButtons = New MachineButtonsUC
|
m_MachineButtons = New MachineButtonsUC
|
||||||
m_ManualAxesMove = New ManualAxesMoveUC
|
m_ManualAxesMove = New ManualAxesMoveUC
|
||||||
m_SingleCut = New SingleCutUC
|
m_SingleCut = New SingleCutUC
|
||||||
|
m_SingleCutAuto = New SingleCutAuto
|
||||||
m_SingleDrill = New SingleDrillUC
|
m_SingleDrill = New SingleDrillUC
|
||||||
m_MultipleCut = New MultipleCut
|
m_MultipleCut = New MultipleCut
|
||||||
m_GridCut = New GridCut
|
m_GridCut = New GridCut
|
||||||
@@ -74,13 +74,10 @@ Public Class ControlsDirectCutUC
|
|||||||
m_Squaring = New SquaringUC
|
m_Squaring = New SquaringUC
|
||||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||||
' reiferimento alla pagina succesiva
|
' Riferimento alla pagina succesiva
|
||||||
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
||||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
|
||||||
m_SingleCutAuto = New SingleCutAuto
|
|
||||||
|
|
||||||
|
' Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||||
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
|
||||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||||
@@ -97,22 +94,14 @@ Public Class ControlsDirectCutUC
|
|||||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
' ManualBtn.Content = EgtMsg(90201)
|
|
||||||
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
||||||
'SingleCutBtn.Content = EgtMsg(90202)
|
|
||||||
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
||||||
'SingleDrillBtn.Content = "Foro singolo"
|
|
||||||
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
||||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
|
||||||
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
||||||
'GridCutBtn.Content = EgtMsg(90204)
|
|
||||||
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
||||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
|
||||||
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
||||||
' 90261=Squaring
|
SquaringTxt.Text = EgtMsg(90261) ' Squadratura
|
||||||
SquaringTxt.Text = EgtMsg(90261)
|
ChangeUCTxBl.Text = EgtMsg(90409) ' Altri
|
||||||
' 90409=Others
|
|
||||||
ChangeUCTxBl.Text = EgtMsg(90409)
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ Module DirectCut
|
|||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
' Polishing attivo
|
||||||
|
Friend m_bPolishingOn As Boolean = False
|
||||||
|
|
||||||
Friend Function CreateDirectCutPart() As Integer
|
Friend Function CreateDirectCutPart() As Integer
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||||
@@ -27,4 +30,8 @@ Module DirectCut
|
|||||||
Return EgtGetFirstNameInGroup(m_MainWindow.m_CurrentProjectPageUC.m_nRawId, NAME_DIRECTCUT)
|
Return EgtGetFirstNameInGroup(m_MainWindow.m_CurrentProjectPageUC.m_nRawId, NAME_DIRECTCUT)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function IsDirectCutOn() As Boolean
|
||||||
|
Return ( GetDirectCutPart() <> GDB_ID.NULL OrElse m_bPolishingOn)
|
||||||
|
End Function
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -718,8 +718,7 @@ Public Class FlatteningCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
|
||||||
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_ONPATH)
|
EgtSetName(nLayerId, NAME_ONPATH)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
|
|||||||
@@ -730,9 +730,8 @@ Public Class GridCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio parallelo alla lama
|
' Creo il taglio parallelo alla lama
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -636,10 +636,8 @@ Public Class MultipleCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
' Creo layer di taglio
|
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -78,16 +78,18 @@ Public Class Polishing
|
|||||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
||||||
' Cancello eventuali lucidature
|
' Cancello eventuali lucidature
|
||||||
RemovePolishings()
|
RemovePolishings()
|
||||||
|
' Dichiaro polishing non più attivo
|
||||||
|
DirectCut.m_bPolishingOn = False
|
||||||
' Riattivo eventuali lavorazioni presenti
|
' Riattivo eventuali lavorazioni presenti
|
||||||
ActivateAllMachinings()
|
ActivateAllMachinings()
|
||||||
' Abilito registrazione progetto modificato
|
|
||||||
EgtEnableModified()
|
|
||||||
' Nascondo la macchina
|
' Nascondo la macchina
|
||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
' Ripristino opacità del grezzo
|
' Ripristino opacità del grezzo
|
||||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||||
EgtSetAlpha( nRawSolidId, 100)
|
EgtSetAlpha( nRawSolidId, 100)
|
||||||
|
' Abilito registrazione progetto modificato
|
||||||
|
EgtEnableModified()
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
@@ -211,6 +213,8 @@ Public Class Polishing
|
|||||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup( m_CurrProjPage.m_nRawId, NAME_KERF)
|
Dim nKerfId As Integer = EgtGetFirstNameInGroup( m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||||
m_bPoliOk = AddPolishings( sKitName, nKerfId)
|
m_bPoliOk = AddPolishings( sKitName, nKerfId)
|
||||||
EgtSetCurrPhase( 1)
|
EgtSetCurrPhase( 1)
|
||||||
|
' Dichiaro polishing attivo
|
||||||
|
DirectCut.m_bPolishingOn = True
|
||||||
Return m_bPoliOk
|
Return m_bPoliOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -514,9 +514,8 @@ Public Class SawTestUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -783,8 +783,8 @@ Public Class SingleCutAuto
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = CreateDirectCutPart()
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -657,8 +657,8 @@ Public Class SingleCutUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = CreateDirectCutPart()
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -317,9 +317,8 @@ Public Class SquaringUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio parallelo alla lama
|
' Creo il taglio parallelo alla lama
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.1.5.1")>
|
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||||
<Assembly: AssemblyFileVersion("3.1.5.1")>
|
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||||
|
|||||||
@@ -690,7 +690,7 @@ Public Class ProjectMgrUC
|
|||||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||||
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
Dim bDirectCut As Boolean = IsDirectCutOn()
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
Not bDirectCut And
|
Not bDirectCut And
|
||||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ Public Class SimulationPageUC
|
|||||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||||
' Se pezzi piani e non taglio diretto e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
' Se pezzi piani e non taglio diretto e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
Dim bDirectCut As Boolean = IsDirectCutOn()
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
Not bDirectCut And
|
Not bDirectCut And
|
||||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||||
@@ -311,7 +311,7 @@ Public Class SimulationPageUC
|
|||||||
' Se non c'è restart esco
|
' Se non c'è restart esco
|
||||||
If m_nRestart = 0 Then Return
|
If m_nRestart = 0 Then Return
|
||||||
' Se tagli diretti restart non valido ed esco
|
' Se tagli diretti restart non valido ed esco
|
||||||
If GetDirectCutPart() <> GDB_ID.NULL Then Return
|
If IsDirectCutOn() Then Return
|
||||||
' Info
|
' Info
|
||||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90359) & " (" & m_nRestart.ToString() & ")") ' Restart (n)
|
m_CurrProjPage.SetInfoMessage(EgtMsg(90359) & " (" & m_nRestart.ToString() & ")") ' Restart (n)
|
||||||
' Salto
|
' Salto
|
||||||
|
|||||||
Reference in New Issue
Block a user