OmagCUT :
- sistemazioni varie - aggiunta lavorazione waterjet e sua integrazione con i tagli.
This commit is contained in:
+13
-2
@@ -77,10 +77,10 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
@@ -99,6 +99,17 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
|
||||
+75
-25
@@ -20,6 +20,7 @@ Public Class AlarmsPageUC
|
||||
Private m_SawList As New ObservableCollection(Of String)
|
||||
Private m_DrillList As New ObservableCollection(Of String)
|
||||
Private m_MillList As New ObservableCollection(Of String)
|
||||
Private m_WaterJetList As New ObservableCollection(Of String)
|
||||
Private m_AuxToolTypeList As New List(Of StringIdCmBx)
|
||||
|
||||
' Costante per nessun utensile definito
|
||||
@@ -31,6 +32,7 @@ Public Class AlarmsPageUC
|
||||
CurrSawCmBx.ItemsSource = m_SawList
|
||||
CurrDrillCmBx.ItemsSource = m_DrillList
|
||||
CurrMillCmBx.ItemsSource = m_MillList
|
||||
CurrWJetCmBx.ItemsSource = m_WaterJetList
|
||||
AuxiliaryToolCmBx.ItemsSource = m_AuxToolTypeList
|
||||
|
||||
' Assegno lista ad elenco materiali
|
||||
@@ -46,6 +48,7 @@ Public Class AlarmsPageUC
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
CurrDrillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 3)
|
||||
CurrMillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 4)
|
||||
CurrWJetTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 0)
|
||||
HolesOffsetTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 9)
|
||||
HolesOverlapTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 10)
|
||||
HolesToleranceTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 11)
|
||||
@@ -141,15 +144,14 @@ Public Class AlarmsPageUC
|
||||
' Non compio alcuna azione
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
m_AuxToolTypeList.Clear()
|
||||
If m_CurrentMachine.bDrilling Then
|
||||
If m_CurrentMachine.bDrill Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_ALARMSPAGEUC + 21))) ' Foretto
|
||||
If m_CurrentMachine.bMilling Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_ALARMSPAGEUC + 22))) ' Fresa
|
||||
End If
|
||||
Else
|
||||
If m_CurrentMachine.bMilling Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_ALARMSPAGEUC + 22))) ' Fresa
|
||||
End If
|
||||
End If
|
||||
If m_CurrentMachine.bMill Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_ALARMSPAGEUC + 22))) ' Fresa
|
||||
End If
|
||||
If m_CurrentMachine.bWaterJet Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_TOOLSDBPAGEUC + 35))) ' WaterJet
|
||||
End If
|
||||
' Aggiungo elemento nessuno in fondo alla lista
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(0, EgtMsg(MSG_ALARMSPAGEUC + 20))) ' Nessuno
|
||||
@@ -160,14 +162,14 @@ Public Class AlarmsPageUC
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
If m_CurrentMachine.sCurrDrill <> String.Empty Then
|
||||
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
||||
m_DrillList.Add(NO_TOOL)
|
||||
CurrDrillCmBx.SelectedItem = m_CurrentMachine.sCurrDrill
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(1, m_AuxToolTypeList)
|
||||
CurrDrillTxBl.SetValue(Grid.RowProperty, 4)
|
||||
CurrDrillCmBx.SetValue(Grid.RowProperty, 5)
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Visible
|
||||
ElseIf m_CurrentMachine.sCurrMill <> String.Empty Then
|
||||
@@ -177,6 +179,13 @@ Public Class AlarmsPageUC
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxToolTypeList)
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Visible
|
||||
ElseIf m_CurrentMachine.sCurrWaterJet <> String.Empty Then
|
||||
CreateToolList(MCH_TF.WATERJET, m_WaterJetList)
|
||||
m_WaterJetList.Add(NO_TOOL)
|
||||
CurrWJetCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJet
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(3, m_AuxToolTypeList)
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(0, m_AuxToolTypeList)
|
||||
End If
|
||||
@@ -270,46 +279,53 @@ Public Class AlarmsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub AuxiliaryToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles AuxiliaryToolCmBx.SelectionChanged
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Dim SelectedItem As StringIdCmBx = AuxiliaryToolCmBx.SelectedItem
|
||||
Select Case SelectedItem.nId
|
||||
Case 0
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
Case 1
|
||||
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
||||
m_DrillList.Add(NO_TOOL)
|
||||
CurrDrillCmBx.SelectedItem = m_CurrentMachine.sCurrDrill
|
||||
CurrDrillTxBl.SetValue(Grid.RowProperty, 4)
|
||||
CurrDrillCmBx.SetValue(Grid.RowProperty, 5)
|
||||
If m_CurrentMachine.sCurrDrill = String.Empty Then
|
||||
CurrDrillCmBx.SelectedItem = NO_TOOL
|
||||
Else
|
||||
CurrDrillCmBx.SelectedItem = m_CurrentMachine.sCurrDrill
|
||||
End If
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Visible
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Case 2
|
||||
CreateToolList(MCH_TF.MILL, m_MillList)
|
||||
m_MillList.Add(NO_TOOL)
|
||||
CurrMillCmBx.SelectedItem = m_CurrentMachine.sCurrMill
|
||||
If m_CurrentMachine.sCurrMill = String.Empty Then
|
||||
CurrMillCmBx.SelectedItem = NO_TOOL
|
||||
Else
|
||||
CurrMillCmBx.SelectedItem = m_CurrentMachine.sCurrMill
|
||||
End If
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
CurrMillCmBx.SelectedItem = m_CurrentMachine.sCurrMill
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Visible
|
||||
Case 3
|
||||
CreateToolList(MCH_TF.WATERJET, m_WaterJetList)
|
||||
m_WaterJetList.Add(NO_TOOL)
|
||||
If m_CurrentMachine.sCurrWaterJet = String.Empty Then
|
||||
CurrWJetCmBx.SelectedItem = NO_TOOL
|
||||
Else
|
||||
CurrWJetCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJet
|
||||
End If
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -339,10 +355,12 @@ Public Class AlarmsPageUC
|
||||
' Assegno foretto
|
||||
Else
|
||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||
' Reset fresa e relativa lavorazione
|
||||
' Reset fresa, waterjet e relative lavorazioni
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
' Se nuovo foretto incompatibile con foratura corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
@@ -367,10 +385,12 @@ Public Class AlarmsPageUC
|
||||
' Assegno fresa
|
||||
Else
|
||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||
' Reset foretto e relativa lavorazione
|
||||
' Reset foretto, waterjet e relative lavorazioni
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
' Se nuova fresa incompatibile con fresatura corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
@@ -386,6 +406,36 @@ Public Class AlarmsPageUC
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrWJetCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJetCmBx.SelectionChanged
|
||||
If IsNothing(CurrWJetCmBx.SelectedItem) Then Return
|
||||
' Rimuovo Waterjet
|
||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
' Assegno Waterjet
|
||||
Else
|
||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, fresa e relative lavorazioni
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
End If
|
||||
' Se nuova Waterjet incompatibile con Waterjet corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
Dim sMchTool As String = String.Empty
|
||||
If Not EgtMdbSetCurrMachining(m_CurrentMachine.sCurrWaterJetting) Or
|
||||
Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMchTuuid) Or
|
||||
Not EgtTdbGetToolFromUUID(sMchTuuid, sMchTool) Or
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrWaterJet, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
End Sub
|
||||
|
||||
Private Overloads Sub CreateToolList(ToolType As Integer, ToolList As ObservableCollection(Of String))
|
||||
ToolList.Clear()
|
||||
Dim ToolName As String = String.Empty
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
' Assegno valori ad assi per test
|
||||
d_axis_position(0) = -1500
|
||||
d_axis_position(1) = -1300
|
||||
d_axis_position(2) = -180
|
||||
d_axis_position(2) = -70
|
||||
d_axis_position(3) = 67.315 ' asse C Siemens
|
||||
d_axis_position(4) = 90.0 ' asse B Siemens
|
||||
d_axis_position(5) = -1500
|
||||
|
||||
+35
-4
@@ -29,6 +29,23 @@ Friend Module CamAuto
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function EraseMachinings(nPartId As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
EgtLuaSetGlobIntVar("CAM.PARTID", nPartId)
|
||||
@@ -330,8 +347,15 @@ Friend Module CamAuto
|
||||
End If
|
||||
ElseIf nType = MCH_OY.MILLING Then
|
||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrMill) <> 0 And
|
||||
Not FindToolOnChanger(sTool) And
|
||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 Then
|
||||
Not FindToolOnChanger(sTool) Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sTool & ", "
|
||||
End If
|
||||
End If
|
||||
ElseIf nType = MCH_OY.WATERJETTING Then
|
||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrWaterJet) <> 0 And
|
||||
Not FindToolOnChanger(sTool) Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sTool & ", "
|
||||
@@ -368,8 +392,8 @@ Friend Module CamAuto
|
||||
' Ciclo sulle lavorazioni
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida
|
||||
If IsValidMachining(nOperId) Then
|
||||
' verifico sia una lavorazione valida di taglio con lama
|
||||
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
Dim nFlag As Integer = FMI_TYPE.NONE
|
||||
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
||||
@@ -378,6 +402,11 @@ Friend Module CamAuto
|
||||
' sistemazione lavorazione, se necessario
|
||||
If AdjustMachining(nOperId, nFlag, dReducedDepth) Then
|
||||
bModified = True
|
||||
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim nWarn As Integer = 0
|
||||
AddWaterJetMachining(nOperId, nWarn)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
@@ -630,6 +659,7 @@ Friend Module CamAuto
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||
@@ -643,6 +673,7 @@ Friend Module CamAuto
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||
|
||||
@@ -63,6 +63,16 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJettingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
+57
-22
@@ -11,6 +11,7 @@ Public Class ChooseMachining
|
||||
Private m_AuxMachTypeList As New List(Of StringIdCmBx)
|
||||
Private m_DrillingList As New List(Of String)
|
||||
Private m_MillingList As New List(Of String)
|
||||
Private m_WJettingList As New List(Of String)
|
||||
' Numero righe della finestra, necessario per non ridimensionarla quando si cambia il tipo di utensile ausiliario
|
||||
Private m_RowNumber As Integer = 6
|
||||
|
||||
@@ -27,11 +28,13 @@ Public Class ChooseMachining
|
||||
AuxiliaryMachiningCmBx.ItemsSource = m_AuxMachTypeList
|
||||
CurrDrillingCmBx.ItemsSource = m_DrillingList
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 3)
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
||||
CurrWJettingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -50,7 +53,7 @@ Public Class ChooseMachining
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
'Creo lista lavorazioni foretto e fresa
|
||||
' Creo lista lavorazioni foretto e fresa
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_CurrentMachine.sCurrDrill, m_DrillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
@@ -62,6 +65,11 @@ Public Class ChooseMachining
|
||||
If m_MillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
End If
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_CurrentMachine.sCurrWaterJet, m_WJettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_WJettingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
ElseIf m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_DrillingList)
|
||||
@@ -74,6 +82,11 @@ Public Class ChooseMachining
|
||||
If m_MillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
End If
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_WJettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_WJettingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
End If
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index = 0 To 1
|
||||
@@ -105,10 +118,10 @@ Public Class ChooseMachining
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 8)))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If m_CurrentMachine.bMilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 7)))
|
||||
End If
|
||||
ElseIf m_CurrentMachine.bMilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 7)))
|
||||
ElseIf m_CurrentMachine.bWaterJetting Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(4, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 11)))
|
||||
End If
|
||||
' Aggiungo nessuna come ultimo elemento della lista
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(0, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 5)))
|
||||
@@ -119,12 +132,12 @@ Public Class ChooseMachining
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(1, m_AuxMachTypeList)
|
||||
End If
|
||||
ElseIf m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxMachTypeList)
|
||||
ElseIf m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(4, m_AuxMachTypeList)
|
||||
Else
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxMachTypeList)
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(0, m_AuxMachTypeList)
|
||||
End If
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(0, m_AuxMachTypeList)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -217,9 +230,15 @@ Public Class ChooseMachining
|
||||
End Sub
|
||||
|
||||
Private Sub AuxiliaryMachiningCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles AuxiliaryMachiningCmBx.SelectionChanged
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Dim SelectedItem As StringIdCmBx = DirectCast(AuxiliaryMachiningCmBx.SelectedItem, StringIdCmBx)
|
||||
Select Case SelectedItem.nId
|
||||
Case 0
|
||||
Case 0 ' Nessuna
|
||||
If m_RowNumber > 8 Then
|
||||
For Index = m_RowNumber - 1 To 8 Step -1
|
||||
ChooseMachiningGrid.RowDefinitions.RemoveAt(Index)
|
||||
@@ -229,12 +248,8 @@ Public Class ChooseMachining
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = String.Empty
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Me.Height = 341.2
|
||||
Case 1
|
||||
Case 1 ' Foratura
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
@@ -253,10 +268,8 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = String.Empty
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Me.Height = 426.5
|
||||
Case 2
|
||||
Case 2 ' Fresatura
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
@@ -273,12 +286,10 @@ Public Class ChooseMachining
|
||||
CurrMillingCmBx.SelectedItem = m_CurrentMachine.sCurrMilling
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 426.5
|
||||
Case 3
|
||||
Case 3 ' Foratura + Fresatura (Entrambe)
|
||||
' Definizione di quattro righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 12 Then
|
||||
For Index = 1 To 12 - m_RowNumber
|
||||
@@ -304,6 +315,26 @@ Public Class ChooseMachining
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 511.8
|
||||
Case 4 ' WaterJetting
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = 10
|
||||
End If
|
||||
CurrWJettingTxBl.SetValue(Grid.RowProperty, 4)
|
||||
CurrWJettingCmBx.SetValue(Grid.RowProperty, 5)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 7)
|
||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 426.5
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -319,6 +350,10 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = CurrMillingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrWJettingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJettingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
@@ -652,6 +652,12 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property WaterJettingActive As Double
|
||||
Get
|
||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace( m_sCurrWaterJetting)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Property dAdditionalTable As Double
|
||||
Get
|
||||
Select Case GetCurrentTable()
|
||||
|
||||
@@ -7,15 +7,24 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OmagCUT", "OmagCUT.vbproj",
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
Trial|Any CPU = Trial|Any CPU
|
||||
Trial|x86 = Trial|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Debug|x86.Build.0 = Debug|x86
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Release|x86.ActiveCfg = Release|x86
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Release|x86.Build.0 = Release|x86
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Trial|Any CPU.ActiveCfg = Trial|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Trial|Any CPU.Build.0 = Trial|Any CPU
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Trial|x86.ActiveCfg = Trial|x86
|
||||
{AC6C1390-231E-401C-89DD-AE0844B524E7}.Trial|x86.Build.0 = Trial|x86
|
||||
EndGlobalSection
|
||||
|
||||
@@ -262,9 +262,15 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||
Not bDirectCut And
|
||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||
RemoveFinalEmptyPhases()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
ResetAllMachinings()
|
||||
Else
|
||||
RemoveFinalEmptyPhases()
|
||||
End If
|
||||
bOk = SortAllMachinings()
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetOrderMachiningFlag()
|
||||
|
||||
@@ -92,7 +92,11 @@ Public Class SimulationPageUC
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||
Not bDirectCut And
|
||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||
RemoveFinalEmptyPhases()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
ResetAllMachinings()
|
||||
Else
|
||||
RemoveFinalEmptyPhases()
|
||||
End If
|
||||
bOk = SortAllMachinings()
|
||||
If bOk Then m_CurrProjPage.SetOrderMachiningFlag()
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
|
||||
+22
-11
@@ -74,9 +74,12 @@ Public Class SplitPageUC
|
||||
EgtZoom(ZM.ALL)
|
||||
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
||||
If Not m_bShow Then
|
||||
If SortAllMachinings() Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
End If
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
End If
|
||||
' Disabilito impostazione modificato
|
||||
EgtDisableModified()
|
||||
@@ -128,7 +131,7 @@ Public Class SplitPageUC
|
||||
m_ItemList.Clear()
|
||||
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
|
||||
If Mach.m_nType = MCH_OY.SAWING Then ' Taglio
|
||||
Dim sText As String = String.Empty
|
||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||
sText = EgtMsg(90791) & " " & i.ToString()
|
||||
@@ -137,14 +140,18 @@ Public Class SplitPageUC
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -844,8 +851,11 @@ Public Class SplitPageUC
|
||||
RemoveLastPhase()
|
||||
End While
|
||||
' Aggiorno le lavorazioni
|
||||
If SortAllMachinings() Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
' Visualizzo solo anteprime di lavorazioni della fase
|
||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||
@@ -979,9 +989,10 @@ Public Class SplitPageUC
|
||||
' Per bottone PREV
|
||||
PrevBtn.IsEnabled = (m_nCurrPhase > 1)
|
||||
' Per bottone NEXT
|
||||
' Se abilitato manipolatore
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_MANIP) Or
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Then
|
||||
' Se abilitato manipolatore e non è con waterjet
|
||||
If ( m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_MANIP) Or
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP)) And
|
||||
Not m_MainWindow.m_CurrentMachine.bWaterJetting Then
|
||||
' Se in modifica
|
||||
If Not m_bShow Then
|
||||
' Se allontanamento perpendicolare
|
||||
|
||||
+16
-10
@@ -238,12 +238,18 @@ Public Class ToolsDbPageUC
|
||||
Next
|
||||
' Determino il tipo di utensile
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
||||
' Imposto testa e uscita
|
||||
' Sempre lame su H1.1 e altri utensili su H1.2
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
|
||||
If ( nType And MCH_TF.WATERJET) = 0 then
|
||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Waterjet sempre su H2.1
|
||||
Else
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H2")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, 1)
|
||||
End If
|
||||
' Per macchine senza ToolChanger, resetto la posizione su questo
|
||||
If m_CurrMachine.ShowToolChanger = 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, "")
|
||||
@@ -269,8 +275,8 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.WATERJET) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 50.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 50.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 1.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 1.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 45.0)
|
||||
@@ -552,7 +558,7 @@ Public Class ToolsDbPageUC
|
||||
Dim nTemp As Integer
|
||||
EgtTdbSetCurrToolParam(MCH_TP.NAME, NameTxBx.Text)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, TCPosTxBx.Text)
|
||||
If m_nToolType = MCH_TY.SAW_STD Then
|
||||
If m_nToolType = MCH_TY.SAW_STD Or m_nToolType = MCH_TY.WATERJET Then
|
||||
StringToLen(MaxMatTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, dTemp)
|
||||
End If
|
||||
@@ -613,8 +619,8 @@ Public Class ToolsDbPageUC
|
||||
CoolantCmBx.Visibility = If(m_nToolType <> MCH_TY.WATERJET, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
CorrTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CorrTxBx.Visibility = Windows.Visibility.Hidden
|
||||
MaxMatTxBl.Visibility = If(m_nToolType = MCH_TY.SAW_STD, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
MaxMatTxBx.Visibility = If(m_nToolType = MCH_TY.SAW_STD, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
MaxMatTxBl.Visibility = If(m_nToolType = MCH_TY.SAW_STD Or m_nToolType = MCH_TY.WATERJET, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
MaxMatTxBx.Visibility = If(m_nToolType = MCH_TY.SAW_STD Or m_nToolType = MCH_TY.WATERJET, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
OffsetGpBx.Visibility = If(m_nToolType <> MCH_TY.DRILL_STD, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
LonOffsetTxBl.Visibility = If(m_nToolType <> MCH_TY.WATERJET, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
LonOffsetTxBx.Visibility = If(m_nToolType <> MCH_TY.WATERJET, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
|
||||
@@ -377,17 +377,20 @@ Public Class WorkInProgressPageUC
|
||||
Dim nOldCtx As Integer = EgtGetCurrentContext()
|
||||
' Imposto il giusto contesto
|
||||
Dim bOk As Boolean = EgtSetCurrentContext(WorkInProgressScene.GetCtx())
|
||||
' Svuoto la testa
|
||||
EgtResetHeadSet("H1")
|
||||
' Svuoto le teste
|
||||
EgtResetHeadSet( "H1")
|
||||
EgtResetHeadSet( "H2")
|
||||
' Imposto la lama corrente
|
||||
Dim sSaw As String = GetFirstTool()
|
||||
If bOk Then
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then bOk = False
|
||||
If Not EgtSetCalcTool( sSaw, "H1", 1) Then bOk = False
|
||||
End If
|
||||
' Imposto eventuale secondo utensile montato
|
||||
If bOk Then
|
||||
Dim sTool As String = GetSecondTool()
|
||||
If Not String.IsNullOrEmpty(sTool) AndAlso Not EgtLoadTool("H1", 2, sTool) Then
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
Dim sTool As String = GetSecondTool( sHead, nExit)
|
||||
If Not String.IsNullOrEmpty( sTool) AndAlso Not EgtLoadTool( sHead, nExit, sTool) Then
|
||||
bOk = False
|
||||
End If
|
||||
End If
|
||||
@@ -400,15 +403,33 @@ Public Class WorkInProgressPageUC
|
||||
Return m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
End Function
|
||||
|
||||
Private Function GetSecondTool() As String
|
||||
Private Function GetSecondTool( ByRef sHead As String, ByRef nExit As Integer) As String
|
||||
' Se non previsto secondo utensile, non c'è
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
Return String.Empty
|
||||
Return ""
|
||||
End If
|
||||
' Cerco se foretto o fresa
|
||||
' Se foretto
|
||||
Dim sTool As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
If String.IsNullOrEmpty(sTool) Then sTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
Return sTool
|
||||
If Not String.IsNullOrEmpty(sTool) Then
|
||||
sHead = "H1"
|
||||
nExit = 2
|
||||
Return sTool
|
||||
End If
|
||||
' se fresa
|
||||
sTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
If Not String.IsNullOrEmpty(sTool) Then
|
||||
sHead = "H1"
|
||||
nExit = 2
|
||||
Return sTool
|
||||
End If
|
||||
' se waterjet
|
||||
sTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
If Not String.IsNullOrEmpty(sTool) Then
|
||||
sHead = "H2"
|
||||
nExit = 1
|
||||
Return sTool
|
||||
End If
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Friend Function GetTipFromPositions(dL1 As Double, dL2 As Double, dL3 As Double, dR1 As Double, dR2 As Double,
|
||||
@@ -422,15 +443,17 @@ Public Class WorkInProgressPageUC
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If bOk Then
|
||||
' Calcolo standard con utensile principale (lama)
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTip) Then bOk = False
|
||||
If Not EgtGetCalcTipFromPositions( dL1, dL2, dL3, dR1, dR2, True, ptTip) Then bOk = False
|
||||
' Se testa verticale e presente altro utensile, rifaccio calcolo con questo
|
||||
Dim vtTool As Vector3d
|
||||
If EgtGetCalcToolDirFromAngles(dR1, dR2, vtTool) AndAlso (vtTool - Vector3d.Z_AX()).IsSmall() Then
|
||||
Dim sTool As String = GetSecondTool()
|
||||
If Not String.IsNullOrEmpty(sTool) AndAlso EgtSetCalcTool(sTool, "H1", 2) Then
|
||||
If EgtGetCalcToolDirFromAngles( dR1, dR2, vtTool) AndAlso ( vtTool - Vector3d.Z_AX()).IsSmall() Then
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
Dim sTool As String = GetSecondTool( sHead, nExit)
|
||||
If Not String.IsNullOrEmpty( sTool) AndAlso EgtSetCalcTool( sTool, sHead, nExit) Then
|
||||
' Calcolo secondo tip
|
||||
Dim ptTip2 As Point3d
|
||||
If EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTip2) Then
|
||||
If EgtGetCalcTipFromPositions( dL1, dL2, dL3, dR1, dR2, True, ptTip2) Then
|
||||
ptTip = ptTip2
|
||||
End If
|
||||
' Ripristino configurazione standard
|
||||
|
||||
Reference in New Issue
Block a user