Compare commits
97 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ab7811b50 | |||
| 1899c9a735 | |||
| 3f769c49da | |||
| da4ddb2a7f | |||
| 3667ecb3b7 | |||
| 206af48539 | |||
| 253e92b111 | |||
| 123d6118e9 | |||
| a2104eaa03 | |||
| 65b9bfdcdb | |||
| 004591896c | |||
| 02af01052b | |||
| 2bc386807f | |||
| 82af1baae3 | |||
| 68b4dfed80 | |||
| ffc7536177 | |||
| 70368b73be | |||
| 05b4e2e95a | |||
| 1d7cdf8fa0 | |||
| 5190a41470 | |||
| 3afe6bb35b | |||
| c546df45ca | |||
| 554ae16e48 | |||
| 1b4d239202 | |||
| 3b2d15703a | |||
| 8e5a4d4ac5 | |||
| ef621a340a | |||
| f2ce55ff27 | |||
| ae3b16b715 | |||
| 8ff4b74725 | |||
| 18fb37b497 | |||
| 246e55f733 | |||
| e7e1946230 | |||
| 8dc6b63801 | |||
| 9b29b16a33 | |||
| 1debeab653 | |||
| 63c3a4e085 | |||
| 7830105bc4 | |||
| 8a11051575 | |||
| 0b50832b4e | |||
| 7f548e5ba6 | |||
| 40bdcec46e | |||
| 2cf1be7348 | |||
| bb932788f9 | |||
| 4c0da9af53 | |||
| 9eaca47566 | |||
| 7c53ecceb4 | |||
| 9a6f6ad37e | |||
| 8174c6137a | |||
| b84699e3c1 | |||
| 5101c1cca9 | |||
| 3ad3694454 | |||
| 9d9e184efa | |||
| cf3f756683 | |||
| 72544190cc | |||
| 2ce454ad0a | |||
| 5a3ad4356f | |||
| ba4414c9f6 | |||
| aa29e4106d | |||
| 76eb17868c | |||
| 829b58a0e5 | |||
| 79847e3cce | |||
| 59be071d12 | |||
| d9150c75f4 | |||
| 00088315cd | |||
| e12a310010 | |||
| 449fe3ad57 | |||
| e8d8637832 | |||
| 6671f2269e | |||
| 26ef6b2d3b | |||
| b5e9686da2 | |||
| f57410dffb | |||
| 346c452546 | |||
| 2eff34e8b6 | |||
| 7c3a107c31 | |||
| e119e9673a | |||
| 2407d3a0ae | |||
| fd32ba3ea1 | |||
| 9045469c0d | |||
| 10972a466d | |||
| e6b674ec46 | |||
| 68cdd41b20 | |||
| cf23a2b7c2 | |||
| 67c2a9d0ec | |||
| 7b70a27ff4 | |||
| 00c37ad74f | |||
| 18e079d235 | |||
| f734885de5 | |||
| 0cc673b047 | |||
| acc1365fd2 | |||
| 7dcf1fe8dc | |||
| 03ecf3493b | |||
| cd748dea7a | |||
| c2f03a883a | |||
| 9b09eeaa9c | |||
| fa0bc2ffdd | |||
| 529fb6d3a6 |
@@ -36,7 +36,7 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Name="LogoBrd" Grid.Column="1">
|
<Border Name="LogoBrd" Grid.Column="1">
|
||||||
<Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<Window x:Class="ChooseTestToolWD"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
Title="OpenFile" Height="382.6" Width="426.6" WindowStyle="None"
|
||||||
|
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||||
|
Background="Transparent">
|
||||||
|
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||||
|
<!--TextAlignment="Center"
|
||||||
|
FontSize="20"
|
||||||
|
VerticalAlignment="Center"-->
|
||||||
|
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
|
||||||
|
ItemsSource="{Binding ItemList}">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding ToolAlias}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,281 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class ChooseTestToolWD
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Private m_SetUpToolList As New ObservableCollection(Of TestTool)
|
||||||
|
|
||||||
|
Sub New(Owner As Window)
|
||||||
|
Me.Owner = Owner
|
||||||
|
InitializeComponent()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' Posizione finestra
|
||||||
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
' Definizione del collegamento tra ItemList e ListBox1
|
||||||
|
SetUpToolListBox.ItemsSource = m_SetUpToolList
|
||||||
|
FilePathTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 45) ' Selezionare l'utensile da tastare
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||||
|
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||||
|
LoadSetUpTool()
|
||||||
|
' ricerco l'utensile della lavorazione indicata
|
||||||
|
Dim Item As TestTool = m_SetUpToolList.FirstOrDefault(Function(x) x.ToolName = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv)
|
||||||
|
Dim Index As Integer = m_SetUpToolList.IndexOf(Item)
|
||||||
|
If Index < 0 Then
|
||||||
|
Index = 0
|
||||||
|
End If
|
||||||
|
' se presente seleziono il primo elemento
|
||||||
|
If m_SetUpToolList.Count > 0 Then
|
||||||
|
SetUpToolListBox.SelectedItem = m_SetUpToolList(Index)
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
Else
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function LoadSetUpTool() As Boolean
|
||||||
|
Dim sNameTool As String = String.Empty
|
||||||
|
Dim sHeadTool As String = String.Empty
|
||||||
|
Dim nExitTool As Integer = 0
|
||||||
|
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto la lama
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, True))
|
||||||
|
'End If
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto la fresa
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||||
|
'End If
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto il foretto
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
sNameTool = "Laser point"
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto laser di puntamento
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, ""))
|
||||||
|
End If
|
||||||
|
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto WJ
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||||
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la fresa
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto il foretto
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
|
||||||
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||||
|
' Disabilito Ok
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
' Recupero item selezionato
|
||||||
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' A seconda del tipo
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||||
|
' Disabilito Ok
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
' Recupero item selezionato
|
||||||
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
DialogResult = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' restituisce l'oggetto selezionato in elenco e lo imposta come attivo
|
||||||
|
Friend Function GetSelectedTool() As TestTool
|
||||||
|
Dim SelTestTool As TestTool = DirectCast(SetUpToolListBox.SelectedItem, TestTool)
|
||||||
|
If SelTestTool.ToolAlias = "Laser point" Then
|
||||||
|
SelTestTool.ToolHead = "H3"
|
||||||
|
SelTestTool.ToolExit = 1
|
||||||
|
SelTestTool.ToolIsSaw = False
|
||||||
|
SelTestTool.ToolIsLaser = True
|
||||||
|
Else
|
||||||
|
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||||
|
Dim sHeadTool As String = String.Empty
|
||||||
|
Dim nExitTool As Integer = 0
|
||||||
|
Dim sTypeTool As String = String.Empty
|
||||||
|
Dim nTypeTool As Integer
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nTypeTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHeadTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExitTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, sTypeTool)
|
||||||
|
SelTestTool.ToolHead = sHeadTool
|
||||||
|
SelTestTool.ToolExit = nExitTool
|
||||||
|
SelTestTool.ToolType = nTypeTool
|
||||||
|
SelTestTool.ToolIsSaw = (nTypeTool = MCH_TY.SAW_STD)
|
||||||
|
SelTestTool.ToolIsLaser = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return SelTestTool
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class TestTool
|
||||||
|
|
||||||
|
Private m_ToolAlias As String = String.Empty
|
||||||
|
Private m_ToolName As String = String.Empty
|
||||||
|
Private m_ToolHead As String = "H1"
|
||||||
|
Private m_ToolExit As Integer = 1
|
||||||
|
Private m_ToolIsSaw As Boolean = False
|
||||||
|
Private m_ToolIsLaser As Boolean = False
|
||||||
|
Private m_ToolType As Integer = -1
|
||||||
|
|
||||||
|
Public Property ToolAlias As String
|
||||||
|
Get
|
||||||
|
Return m_ToolAlias
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolAlias = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolName As String
|
||||||
|
Get
|
||||||
|
Return m_ToolName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolHead As String
|
||||||
|
Get
|
||||||
|
Return m_ToolHead
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolHead = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolExit As Integer
|
||||||
|
Get
|
||||||
|
Return m_ToolExit
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_ToolExit = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolType As Integer
|
||||||
|
Get
|
||||||
|
Return m_ToolType
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_ToolType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolIsSaw As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ToolIsSaw
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ToolIsSaw = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolIsLaser As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ToolIsLaser
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ToolIsLaser = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(sToolAlias As String, sToolName As String)
|
||||||
|
m_ToolAlias = sToolAlias
|
||||||
|
m_ToolName = sToolName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -127,11 +127,10 @@ Public Class MoveRawPartPage
|
|||||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||||
' altrimenti, aggiorno visualizzazione
|
' altrimenti, aggiorno visualizzazione
|
||||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||||
EgtDraw()
|
|
||||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||||
End If
|
End If
|
||||||
'---------------------------- AUX TABLE ----------------------------
|
'---------------------------- AUX TABLE ----------------------------
|
||||||
|
EgtDraw()
|
||||||
' Carico i parametri di movimento
|
' Carico i parametri di movimento
|
||||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||||
' Ricavo la lunghezza del baffo di taglio
|
' Ricavo la lunghezza del baffo di taglio
|
||||||
@@ -341,7 +340,6 @@ Public Class MoveRawPartPage
|
|||||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||||
' mantengo la selezione del pezzo
|
' mantengo la selezione del pezzo
|
||||||
@@ -351,6 +349,15 @@ Public Class MoveRawPartPage
|
|||||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
|
' Verifico che il pezzo corrente sia prelevabile - versione 2.6c3 -
|
||||||
|
If VerifyCollisionWithOtherRawPart(nId, True) Then
|
||||||
|
' mantengo la selezione del pezzo
|
||||||
|
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||||
|
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||||
|
EgtDraw()
|
||||||
|
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||||
m_CurrRawOnVacuum = nId
|
m_CurrRawOnVacuum = nId
|
||||||
|
|
||||||
@@ -421,7 +428,7 @@ Public Class MoveRawPartPage
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
Private Function VerifyCollisionWithOtherRawPart_0(nIdOnVacumm As Integer) As Boolean
|
||||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||||
@@ -455,6 +462,69 @@ Public Class MoveRawPartPage
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' Veririfica che il grezzo non entri in colliosione con altri pezzi - versione 2.6c3 -
|
||||||
|
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer, Optional IsTaking As Boolean = False) As Boolean
|
||||||
|
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||||
|
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||||
|
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||||
|
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||||
|
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
|
If m_nTempId = GDB_ID.NULL Then Return False
|
||||||
|
EgtSetName(m_nTempId, "RawTemp")
|
||||||
|
' recupero il contorno del'ID attaccato alle ventose e da questo genero una superificie
|
||||||
|
Dim nIdUpRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawUpReg")
|
||||||
|
Dim nIdDwnRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawDwnReg")
|
||||||
|
' recupero gli ID di tutti i grezzi della fase corrente
|
||||||
|
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||||
|
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||||
|
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||||
|
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||||
|
While nIdRaw <> GDB_ID.NULL
|
||||||
|
' verifico la fase del grezzo
|
||||||
|
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||||
|
' recupero il contorno del pezzo e genero la sua sueperificie
|
||||||
|
Dim nIdUpRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawUpReg")
|
||||||
|
Dim nIdDwnRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawDwnReg")
|
||||||
|
' creo la copia delle superifici
|
||||||
|
Dim nCopy_IdDwnRegionOnVac As Integer = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
|
||||||
|
Dim nCopy_nIdUpRegion As Integer = EgtCopyGlob(nIdUpRegion, m_nTempId)
|
||||||
|
' PRELIEVO
|
||||||
|
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdUpRegion) Then
|
||||||
|
' se esite una superficie allora esiste un'intersezione
|
||||||
|
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||||
|
EgtErase(m_nTempId)
|
||||||
|
' Esco: Intersezione TROVATA → true
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Not IsTaking Then
|
||||||
|
' DEPOSITO : devono essere esguiti due controlli ulteririori
|
||||||
|
Dim nCopy_IdUpRegionOnVac As Integer = EgtCopyGlob(nIdUpRegionOnVac, m_nTempId)
|
||||||
|
Dim nCopy_nIdDwnRegion As Integer = EgtCopyGlob(nIdDwnRegion, m_nTempId)
|
||||||
|
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdDwnRegion) Then
|
||||||
|
' se esite una superficie allora esiste un'intersezione
|
||||||
|
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||||
|
EgtErase(m_nTempId)
|
||||||
|
' Esco: Intersezione TROVATA → true
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If EgtSurfFrIntersect(nCopy_IdUpRegionOnVac, nCopy_nIdUpRegion) Then
|
||||||
|
' se esite una superficie allora esiste un'intersezione
|
||||||
|
If EgtExistsObj(nCopy_IdUpRegionOnVac) Then
|
||||||
|
EgtErase(m_nTempId)
|
||||||
|
' Esco: Intersezione TROVATA → true
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||||
|
End While
|
||||||
|
EgtErase(m_nTempId)
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
||||||
Dim nVal As Integer = 0
|
Dim nVal As Integer = 0
|
||||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||||
@@ -789,6 +859,12 @@ Public Class MoveRawPartPage
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene
|
||||||
|
If e.KeyCode = System.Windows.Forms.Keys.Delete Then
|
||||||
|
RemovePartBtn_Click(Nothing, Nothing)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nRawId <> GDB_ID.NULL
|
While nRawId <> GDB_ID.NULL
|
||||||
@@ -856,6 +932,7 @@ Public Class MoveRawPartPage
|
|||||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||||
RefreshVisibility()
|
RefreshVisibility()
|
||||||
EgtZoom(ZM.ALL, True)
|
EgtZoom(ZM.ALL, True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||||
@@ -1291,7 +1368,7 @@ Public Class MoveRawPartPage
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' ------- VISUALIZZAZIONE -------
|
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||||
If m_SplitPage.m_bShow Then
|
If m_SplitPage.m_bShow Then
|
||||||
' verifico se la fase successiva è uno scarico frontale
|
' verifico se la fase successiva è uno scarico frontale
|
||||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Public Class NestPageUC
|
|||||||
' Id della curva e del taglio selezionati per eseguire il test
|
' Id della curva e del taglio selezionati per eseguire il test
|
||||||
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
||||||
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
||||||
|
Friend m_CurrToolFromSelectedSawCurv As String = String.Empty
|
||||||
|
|
||||||
' Id del rettangolo, del taglio e della curva da modificare tramite Drag
|
' Id del rettangolo, del taglio e della curva da modificare tramite Drag
|
||||||
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
||||||
@@ -219,14 +220,21 @@ Public Class NestPageUC
|
|||||||
m_nCountSpot = 0
|
m_nCountSpot = 0
|
||||||
m_nCountSpotCUT = 0
|
m_nCountSpotCUT = 0
|
||||||
End If
|
End If
|
||||||
|
EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString)
|
||||||
' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi
|
' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi
|
||||||
If m_nCountSpot < 1 Then
|
If m_nCountSpot < 1 Then
|
||||||
UG0_Reg.IsEnabled = False
|
UG0_Reg.IsEnabled = False
|
||||||
UG1_Reg.IsEnabled = False
|
UG1_Reg.IsEnabled = False
|
||||||
|
EgtOutLog(" Abilito comandi gestione SPOT")
|
||||||
|
Else
|
||||||
|
UG0_Reg.IsEnabled = True
|
||||||
|
UG1_Reg.IsEnabled = True
|
||||||
|
EgtOutLog(" Disabilito comandi gestione SPOT")
|
||||||
End If
|
End If
|
||||||
' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli
|
' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli
|
||||||
If m_nCountSpotCUT < 1 Then
|
If m_nCountSpotCUT < 1 Then
|
||||||
InsertSpotRegistration()
|
InsertSpotRegistration()
|
||||||
|
EgtOutLog(" Creo SPOT_CUT")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se necessario riabilito impostazione modificato
|
' Se necessario riabilito impostazione modificato
|
||||||
@@ -255,7 +263,9 @@ Public Class NestPageUC
|
|||||||
End If
|
End If
|
||||||
' Se esiste un elemento selezionato
|
' Se esiste un elemento selezionato
|
||||||
EgtResetMark(m_CurrSelectedSawCurv)
|
EgtResetMark(m_CurrSelectedSawCurv)
|
||||||
' provo a riconoscere il valore medio del segmento
|
m_CurrToolFromSelectedSawCurv = String.Empty
|
||||||
|
' ripulisco da eventuali messaggi
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
' Verifico se selezionato indicativo di pezzo
|
' Verifico se selezionato indicativo di pezzo
|
||||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
Dim nSelMy As Integer
|
Dim nSelMy As Integer
|
||||||
@@ -280,20 +290,52 @@ Public Class NestPageUC
|
|||||||
' recupero il gruppo della lavorazione associata
|
' recupero il gruppo della lavorazione associata
|
||||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||||
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
|
||||||
If Not EgtGetGroupObjs(nIdSaw) Then
|
Dim nIdMachining As Integer = EgtGetFirstInGroup(nIdPV)
|
||||||
m_CurrSelectedSawCurv = nIdSaw
|
While nIdMachining <> GDB_ID.NULL
|
||||||
m_CurrSelectedCurv = nIdMy
|
Dim sNameMachining As String = String.Empty
|
||||||
EgtSetMark(nIdSaw)
|
EgtGetName(nIdMachining, sNameMachining)
|
||||||
EgtSelectObj(nIdMy)
|
If sNameMachining.Contains(nIdMy.ToString) Then
|
||||||
EgtDraw()
|
Exit While
|
||||||
Exit While
|
End If
|
||||||
End If
|
nIdMachining = EgtGetNext(nIdMachining)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' recupero la lavorazione associata nel gruppo Opers
|
||||||
|
Dim sIdRefMachining As Integer = -1
|
||||||
|
EgtGetInfo(nIdMachining, "MId", sIdRefMachining)
|
||||||
|
EgtSetCurrMachining(sIdRefMachining)
|
||||||
|
' recupero il nome dell'utensile associato alla lavorazione
|
||||||
|
Dim sToolCurrMachining As String = String.Empty
|
||||||
|
EgtGetMachiningParam(MCH_MP.TOOL, sToolCurrMachining)
|
||||||
|
' seleziono le entità nel disegno
|
||||||
|
m_CurrToolFromSelectedSawCurv = sToolCurrMachining
|
||||||
|
m_CurrSelectedSawCurv = nIdMachining
|
||||||
|
m_CurrSelectedCurv = nIdMy
|
||||||
|
EgtSetMark(nIdMachining)
|
||||||
|
EgtSelectObj(nIdMy)
|
||||||
|
EgtDraw()
|
||||||
|
|
||||||
|
'Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||||
|
'If Not EgtGetGroupObjs(nIdSaw) Then
|
||||||
|
' m_CurrSelectedSawCurv = nIdSaw
|
||||||
|
' m_CurrSelectedCurv = nIdMy
|
||||||
|
' EgtSetMark(nIdSaw)
|
||||||
|
' EgtSelectObj(nIdMy)
|
||||||
|
' EgtDraw()
|
||||||
|
' Exit While
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Exit While
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
nIdMy = EgtGetNextObjInSelWin()
|
nIdMy = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
If nIdMy = GDB_ID.NULL Then
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Select OUTLOOP")
|
||||||
|
End If
|
||||||
Return
|
Return
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ Public Module SplitAuto
|
|||||||
Public m_dStartFreeLen As Double
|
Public m_dStartFreeLen As Double
|
||||||
Public m_dEndFreeLen As Double
|
Public m_dEndFreeLen As Double
|
||||||
Public m_vtDir As Vector3d
|
Public m_vtDir As Vector3d
|
||||||
|
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
|
||||||
|
Public m_bMngLeadInOnIntCorner As Boolean
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
@@ -111,15 +113,19 @@ Public Module SplitAuto
|
|||||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||||
Mach.m_nEntId = nEntId
|
Mach.m_nEntId = nEntId
|
||||||
|
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||||
End If
|
End If
|
||||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And
|
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||||
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
||||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL And (nRes And CAR_RES.LI_OK) <> 0) And
|
Dim bIn As Boolean = False
|
||||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine
|
Dim bOut As Boolean = False
|
||||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL And (nRes And CAR_RES.LO_OK) <> 0) And
|
CanExtendSides(Mach, bIn, bOut)
|
||||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine
|
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||||
|
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||||
|
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||||
|
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||||
If nRes = 0 Then
|
If nRes = 0 Then
|
||||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||||
End If
|
End If
|
||||||
@@ -171,6 +177,26 @@ Public Module SplitAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
|
||||||
|
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
|
||||||
|
' Posso estendere SOLO l'uscita
|
||||||
|
bOut = True
|
||||||
|
bIn = False
|
||||||
|
ElseIf CurrMach.m_dPrevAng > EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||||
|
' Posso estendere SOLO l'ingresso
|
||||||
|
bIn = True
|
||||||
|
bOut = False
|
||||||
|
ElseIf CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||||
|
' NON Posso estendere
|
||||||
|
bIn = False
|
||||||
|
bOut = False
|
||||||
|
Else
|
||||||
|
bIn = True
|
||||||
|
bOut = True
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
' calcolo il numero di tipi di lavorazioni
|
' calcolo il numero di tipi di lavorazioni
|
||||||
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||||
@@ -799,13 +825,13 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
||||||
vtMove As Vector3d, dMinMove As Double) As Boolean
|
vtMove As Vector3d, dMinMove As Double) As Boolean
|
||||||
Dim bTwoHeadVac As Boolean = ( EgtGetHeadId( VACUUM_HEAD_2) <> GDB_ID.NULL)
|
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||||
Dim rmData As New RawMoveData
|
Dim rmData As New RawMoveData
|
||||||
Dim vtMove2 As Vector3d = -vtMove
|
Dim vtMove2 As Vector3d = -vtMove
|
||||||
|
|
||||||
VacuumCups.ResetHeadName()
|
VacuumCups.ResetHeadName()
|
||||||
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum= PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
||||||
rmData.m_vtRawMove = vtMove
|
rmData.m_vtRawMove = vtMove
|
||||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||||
@@ -826,9 +852,9 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
||||||
' Spostamento originale
|
' Spostamento originale
|
||||||
Dim vtOriMove As New Vector3d( vtMove)
|
Dim vtOriMove As New Vector3d(vtMove)
|
||||||
' Livello di movimento
|
' Livello di movimento
|
||||||
Dim nMoveLevel As Integer = GetPrivateProfileInt( S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
|
Dim nMoveLevel As Integer = GetPrivateProfileInt(S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
|
||||||
Dim nMove As Integer = 1
|
Dim nMove As Integer = 1
|
||||||
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
||||||
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
||||||
@@ -863,7 +889,7 @@ Public Module SplitAuto
|
|||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.5 * vtOriMove
|
vtMove += 0.5 * vtOriMove
|
||||||
nMove += 1
|
nMove += 1
|
||||||
If nMoveLevel = nMove Then return True
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ Public Class SplitPageUC
|
|||||||
' Abilita la mofica Inizio fine per i tagli interni sugli angoli
|
' Abilita la mofica Inizio fine per i tagli interni sugli angoli
|
||||||
Private m_StartEndModifyOnIntCorner As Boolean = False
|
Private m_StartEndModifyOnIntCorner As Boolean = False
|
||||||
|
|
||||||
|
Private m_IsCtrlKeyDown As Boolean = False
|
||||||
|
Private m_IsShiftKeyDown As Boolean = False
|
||||||
|
|
||||||
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
|
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
|
||||||
PrevBtn.IsEnabled = False
|
PrevBtn.IsEnabled = False
|
||||||
' Collego lista di oggetti a ListBox
|
' Collego lista di oggetti a ListBox
|
||||||
@@ -453,6 +456,10 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
#End Region ' Bridge
|
#End Region ' Bridge
|
||||||
|
|
||||||
|
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick
|
||||||
|
OnOffCut()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
If Not m_bActive OrElse m_bShow Then Return
|
If Not m_bActive OrElse m_bShow Then Return
|
||||||
@@ -595,6 +602,7 @@ Public Class SplitPageUC
|
|||||||
Dim dUsal As Double
|
Dim dUsal As Double
|
||||||
' ----------------------- REPEAT -----------------------
|
' ----------------------- REPEAT -----------------------
|
||||||
Do
|
Do
|
||||||
|
If Not m_MachiningList(m_nDragInd).m_bCanStartAll Then Exit Do
|
||||||
dDelta = -dDelta
|
dDelta = -dDelta
|
||||||
' Leggo il valore salvato nella geometria
|
' Leggo il valore salvato nella geometria
|
||||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
@@ -628,6 +636,7 @@ Public Class SplitPageUC
|
|||||||
Dim dUeal As Double
|
Dim dUeal As Double
|
||||||
dDelta = -dDelta
|
dDelta = -dDelta
|
||||||
Do
|
Do
|
||||||
|
If Not m_MachiningList(m_nDragInd).m_bCanEndAll Then Exit Do
|
||||||
dDelta = -dDelta
|
dDelta = -dDelta
|
||||||
' Leggo il valore salvato nella geometria
|
' Leggo il valore salvato nella geometria
|
||||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||||
@@ -731,6 +740,11 @@ Public Class SplitPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
|
||||||
|
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
||||||
|
OnOffCut()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
||||||
MoveItem(-1)
|
MoveItem(-1)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -914,11 +928,31 @@ Public Class SplitPageUC
|
|||||||
EnableButtons()
|
EnableButtons()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ERRORE: questo evento non è eseguito!
|
'' DA FARE: quando seleziono Esc devo togliere deselezionare tutte le enità!
|
||||||
Private Sub OnKeyDownScene(sender As Object, e As KeyEventArgs)
|
'Private Sub OnKeyDownScene(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||||
If e.Key = Key.Escape Then
|
' If e.Key = Key.Escape Then
|
||||||
' se sono in fase di creazione di un ponticello interrompo
|
' ' se sono in fase di creazione di un ponticello interrompo
|
||||||
DeselectWJBridgesPart()
|
' DeselectWJBridgesPart()
|
||||||
|
' EgtDeselectAll()
|
||||||
|
' RemoveMarkAndNumbers()
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private Sub MachiningLsBx_KeyDown(sender As Object, e As KeyEventArgs) Handles MachiningLsBx.KeyDown
|
||||||
|
If e.Key = Key.LeftCtrl Or e.Key = Key.RightCtrl Then
|
||||||
|
m_IsCtrlKeyDown = True
|
||||||
|
End If
|
||||||
|
If e.Key = Key.LeftShift Or e.Key = Key.RightShift Then
|
||||||
|
m_IsShiftKeyDown = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MachiningLsBx_KeyUp(sender As Object, e As KeyEventArgs) Handles MachiningLsBx.KeyUp
|
||||||
|
If e.Key = Key.LeftCtrl Or e.Key = Key.RightCtrl Then
|
||||||
|
m_IsCtrlKeyDown = False
|
||||||
|
End If
|
||||||
|
If e.Key = Key.LeftShift Or e.Key = Key.RightShift Then
|
||||||
|
m_IsShiftKeyDown = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1125,37 +1159,46 @@ Public Class SplitPageUC
|
|||||||
End If
|
End If
|
||||||
Dim nI As Integer = m_ItemList(Index).Ind
|
Dim nI As Integer = m_ItemList(Index).Ind
|
||||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
||||||
Dim nLiPrev As Integer
|
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
EgtOutLog(" ⚠️ L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||||
' accorcio
|
Else
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
Dim nLiPrev As Integer
|
||||||
' ri-verifico interferenza
|
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
' accorcio
|
||||||
' accorcio
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
' ri-verifico interferenza
|
||||||
ElseIf nLiPrev = MCH_SAW_LI.CENT Then
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
' allungo
|
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
' accorcio
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
' ri-verifico interferenza
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
ElseIf nLiPrev = MCH_SAW_LI.CENT Then
|
||||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_CENT Then
|
' allungo
|
||||||
' allungo
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
' ri-verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
|
ElseIf nLiPrev = MCH_SAW_LI.EXT_CENT Then
|
||||||
|
' allungo
|
||||||
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
bGenModif = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
bGenModif = True
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Se modificato qualcosa
|
' Se modificato qualcosa
|
||||||
@@ -1193,24 +1236,33 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
Private Sub AllCenStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenStartBtn.Click
|
Private Sub AllCenStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenStartBtn.Click
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
||||||
Dim nLiPrev As Integer
|
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
EgtOutLog(" ⚠️ L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||||
' accorcio
|
Else
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
Dim nLiPrev As Integer
|
||||||
' ri-verifico interferenza
|
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
' accorcio
|
||||||
' accorcio
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
' ri-verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
|
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||||
|
' accorcio
|
||||||
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
Next
|
Next
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Imposto flag di modifica
|
' Imposto flag di modifica
|
||||||
@@ -1226,37 +1278,46 @@ Public Class SplitPageUC
|
|||||||
End If
|
End If
|
||||||
Dim nI As Integer = m_ItemList(Index).Ind
|
Dim nI As Integer = m_ItemList(Index).Ind
|
||||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
||||||
Dim nLoPrev As Integer
|
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
EgtOutLog(" ⚠️ L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||||
' accorcio
|
Else
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
Dim nLoPrev As Integer
|
||||||
' ri-verifico interferenza
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
' accorcio
|
||||||
' accorcio
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
' ri-verifico interferenza
|
||||||
ElseIf nLoPrev = MCH_SAW_LO.CENT Then
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
' allungo
|
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
' accorcio
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
' ri-verifico interferenza
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
ElseIf nLoPrev = MCH_SAW_LO.CENT Then
|
||||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_CENT Then
|
' allungo
|
||||||
' allungo
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
' ri-verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
|
ElseIf nLoPrev = MCH_SAW_LO.EXT_CENT Then
|
||||||
|
' allungo
|
||||||
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
bGenModif = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
bGenModif = True
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Se modificato qualcosa
|
' Se modificato qualcosa
|
||||||
@@ -1294,24 +1355,33 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
Private Sub AllCenEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenEndBtn.Click
|
Private Sub AllCenEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenEndBtn.Click
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
||||||
Dim nLoPrev As Integer
|
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
EgtOutLog(" ⚠️ L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||||
' accorcio
|
Else
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
Dim nLoPrev As Integer
|
||||||
' ri-verifico interferenza
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
' accorcio
|
||||||
' accorcio
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
' ri-verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
|
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||||
|
' accorcio
|
||||||
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
Next
|
Next
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Imposto flag di modifica
|
' Imposto flag di modifica
|
||||||
@@ -1389,6 +1459,12 @@ Public Class SplitPageUC
|
|||||||
' Se taglio con lama
|
' Se taglio con lama
|
||||||
If nMachiningType = MCH_MY.SAWING And
|
If nMachiningType = MCH_MY.SAWING And
|
||||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||||
|
|
||||||
|
If Not m_MachiningList(nI).m_bCanStartAll Then
|
||||||
|
EgtOutLog(" ⚠️ Il taglio non puo' essere allungato all'interno del pezzo ⚠️")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
' leggo il valore salvato nella geometria
|
' leggo il valore salvato nella geometria
|
||||||
Dim dOrigUsal As Double = 0
|
Dim dOrigUsal As Double = 0
|
||||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
@@ -1564,6 +1640,11 @@ Public Class SplitPageUC
|
|||||||
If nMachiningType = MCH_MY.SAWING And
|
If nMachiningType = MCH_MY.SAWING And
|
||||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||||
|
|
||||||
|
If Not m_MachiningList(nI).m_bCanEndAll Then
|
||||||
|
EgtOutLog(" ⚠️ Il taglio non puo' essere allungato all'interno del pezzo ⚠️")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dOrigUeal As Double = 0
|
Dim dOrigUeal As Double = 0
|
||||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||||
|
|
||||||
@@ -1782,7 +1863,7 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||||
' ------- VISUALIZZAZIONE -------
|
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||||
If m_bShow Then
|
If m_bShow Then
|
||||||
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
' recupero l'operazione successiva
|
' recupero l'operazione successiva
|
||||||
@@ -2091,6 +2172,33 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnOffCut()
|
||||||
|
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||||
|
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
||||||
|
Dim nI As Integer = x.Ind
|
||||||
|
If m_MachiningList(nI).m_bEnabled Then
|
||||||
|
m_MachiningList(nI).m_bEnabled = False
|
||||||
|
x.bIsActive = False
|
||||||
|
Else
|
||||||
|
m_MachiningList(nI).m_bEnabled = True
|
||||||
|
x.bIsActive = True
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
EgtDraw()
|
||||||
|
' Imposto flag di modifica
|
||||||
|
m_bModified = True
|
||||||
|
' recupero l'elenco degli elementi selezionati
|
||||||
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
|
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||||
|
ItemList.Add(Item)
|
||||||
|
Next
|
||||||
|
VerifyHomogenousMachining(ItemList)
|
||||||
|
' Abilitazione bottone Next
|
||||||
|
EnableButtons()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||||
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ Module ConstGen
|
|||||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||||
Public Const INFO_AGG2 As String = "Agg2"
|
Public Const INFO_AGG2 As String = "Agg2"
|
||||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||||
|
Public Const INFO_DIRECTCUT As String = "DirectCut"
|
||||||
|
Public Const INFO_STEP_TYPE As String = "StepType"
|
||||||
' Info in entità da tagliare per taglio ristretto
|
' Info in entità da tagliare per taglio ristretto
|
||||||
Public Const INFO_STRICT As String = "Strict"
|
Public Const INFO_STRICT As String = "Strict"
|
||||||
' Info in entità da tagliare per angolo di lato e tallone
|
' Info in entità da tagliare per angolo di lato e tallone
|
||||||
|
|||||||
@@ -287,6 +287,8 @@ Module ConstIni
|
|||||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
||||||
|
Public Const K_VEINMA_WIDTH As String = "Width"
|
||||||
|
Public Const K_VEINMA_HEIGHT As String = "Height"
|
||||||
|
|
||||||
Public Const S_FASTGRID As String = "FastGrid"
|
Public Const S_FASTGRID As String = "FastGrid"
|
||||||
Public Const K_FG_ENABLE As String = "FGEnable"
|
Public Const K_FG_ENABLE As String = "FGEnable"
|
||||||
@@ -333,6 +335,7 @@ Module ConstIni
|
|||||||
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
||||||
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
||||||
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
||||||
|
Public Const K_DC_FLAT_CHAINEDPATH As String = "ChainedPath"
|
||||||
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
|
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
|
||||||
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
||||||
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||||
Public Const K_NAXES As String = "nAxes"
|
Public Const K_NAXES As String = "nAxes"
|
||||||
|
Public Const K_RESETSTATUS As String = "ResetStatus"
|
||||||
' Nuove variabili
|
' Nuove variabili
|
||||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||||
Public Const K_XYJOG As String = "XYJog"
|
Public Const K_XYJOG As String = "XYJog"
|
||||||
@@ -179,6 +180,8 @@
|
|||||||
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
||||||
|
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
|
||||||
|
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||||
|
|
||||||
Public Const S_TOOLS As String = "Tools"
|
Public Const S_TOOLS As String = "Tools"
|
||||||
Public Const K_DRILLBIT As String = "Drillbit"
|
Public Const K_DRILLBIT As String = "Drillbit"
|
||||||
@@ -228,6 +231,7 @@
|
|||||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||||
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
||||||
|
Public Const K_MACH_STARTCENERTOOLPATH As String = "StartCenterToolPath"
|
||||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||||
@@ -245,7 +249,7 @@
|
|||||||
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
||||||
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
||||||
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
||||||
' DrillMillC90
|
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||||
' CutLongDxSx
|
' CutLongDxSx
|
||||||
' AngRotMultiCut
|
' AngRotMultiCut
|
||||||
' MinDistHeadsMultiCut
|
' MinDistHeadsMultiCut
|
||||||
|
|||||||
@@ -183,6 +183,9 @@ Public Class ControlsDirectCutUC
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
m_SingleCut.SetEnableParam(bSaw)
|
m_SingleCut.SetEnableParam(bSaw)
|
||||||
m_MultipleCut.SetEnableParam(bSaw)
|
m_MultipleCut.SetEnableParam(bSaw)
|
||||||
m_GridCut.SetEnableParam(bSaw)
|
m_GridCut.SetEnableParam(bSaw)
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ Public Class ControlsDirectCutUC1
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
'm_SingleCut.SetEnableParam(bSaw)
|
'm_SingleCut.SetEnableParam(bSaw)
|
||||||
'm_MultipleCut.SetEnableParam(bSaw)
|
'm_MultipleCut.SetEnableParam(bSaw)
|
||||||
'm_GridCut.SetEnableParam(bSaw)
|
'm_GridCut.SetEnableParam(bSaw)
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ Public Class ControlsMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||||
|
Friend Shared m_OutLogTypeButton As Boolean = True
|
||||||
|
|
||||||
' Creazione converter da String a ImageSource
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -72,6 +75,12 @@ Public Class ControlsMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
GetTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -81,6 +90,22 @@ Public Class ControlsMachineButtonUC
|
|||||||
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||||
'-------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Friend Sub GetTypeButton(CurrMachineButton As MachineButton)
|
||||||
|
If Not m_OutLogTypeButton Then Return
|
||||||
|
Dim BtnType As Type = CurrMachineButton.GetType
|
||||||
|
If BtnType Is GetType(NoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||||
Dim SpindleButton As TwoStateButton = Nothing
|
Dim SpindleButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -730,8 +755,17 @@ Public MustInherit Class MachineButton
|
|||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||||
|
|
||||||
|
' versione 2.6h1
|
||||||
|
Dim sCurrTable As String = String.Empty
|
||||||
|
Dim nCuttTable As Integer = 1
|
||||||
|
EgtGetTableName(sCurrTable)
|
||||||
|
If sCurrTable <> "MainTab" Then nCuttTable = 2
|
||||||
|
EgtLuaSetGlobIntVar("CMD.TABLE", nCuttTable)
|
||||||
|
|
||||||
EgtLuaCallFunction("CmdString")
|
EgtLuaCallFunction("CmdString")
|
||||||
' Leggo variabili
|
|
||||||
|
' Leggo variabili da file Lua
|
||||||
CmdString = String.Empty
|
CmdString = String.Empty
|
||||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||||
b2Start = False
|
b2Start = False
|
||||||
@@ -788,11 +822,26 @@ Public Class TwoStateButton
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||||
m_IsChecked = value
|
m_IsChecked = value
|
||||||
|
Dim sLuaScriptFile As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
||||||
If value Then
|
If value Then
|
||||||
|
sLuaScriptFile &= TLuaScriptName
|
||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
Else
|
Else
|
||||||
|
sLuaScriptFile &= FLuaScriptName
|
||||||
ExecuteMDICommand(FLuaScriptName)
|
ExecuteMDICommand(FLuaScriptName)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim IsPressedShiftKey As Boolean = False
|
||||||
|
If Keyboard.Modifiers And ModifierKeys.Shift And
|
||||||
|
GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_MainWindow.GetIniFile()) > 4 Then IsPressedShiftKey = True
|
||||||
|
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
|
||||||
|
If IsPressedShiftKey Then
|
||||||
|
Try
|
||||||
|
Process.Start("Notepad.exe", sLuaScriptFile)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog(ex.ToString)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetIsChecked(value As Boolean)
|
Friend Sub SetIsChecked(value As Boolean)
|
||||||
|
|||||||
@@ -166,6 +166,15 @@ Public Class CopyTemplateUC
|
|||||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bTabOk Then Return
|
If Not m_bTabOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizione lama o laser
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
@@ -173,14 +182,19 @@ Public Class CopyTemplateUC
|
|||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -188,7 +202,7 @@ Public Class CopyTemplateUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
@@ -196,8 +210,6 @@ Public Class CopyTemplateUC
|
|||||||
Else
|
Else
|
||||||
' Verifico presenza punto da mouse
|
' Verifico presenza punto da mouse
|
||||||
If Not m_bMouseOk Then Return
|
If Not m_bMouseOk Then Return
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ Public Class DirectCutPageUC
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
||||||
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||||
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||||
|
|||||||
@@ -7,142 +7,185 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
<!-- Definizione della Grid FlatteningCut -->
|
<!-- Definizione della Grid FlatteningCut -->
|
||||||
<Grid Name="FlatteningCutGrid" >
|
<Grid Name="FlatteningCutGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
|
||||||
|
Grid.Row="1" Grid.RowSpan="11" Grid.ColumnSpan="2">
|
||||||
|
|
||||||
|
<Grid Name="DatiTaglioGrid" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.1"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="0.1"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
<TextBlock Name="ChainedPathTxBl" Grid.Row="11" Grid.ColumnSpan="2"
|
||||||
<Grid.ColumnDefinitions>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<CheckBox Name="ChainedPathChBx" Grid.Row="11" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
<ColumnDefinition Width="1*"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
<ComboBox Name="SelToolCmBx" Grid.Row="12" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
<Grid.ColumnDefinitions>
|
<ComboBox.ItemTemplate>
|
||||||
<ColumnDefinition Width="1*"/>
|
<DataTemplate>
|
||||||
<ColumnDefinition Width="1*"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
</DataTemplate>
|
||||||
</Grid.ColumnDefinitions>
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<Grid Grid.Row="13" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Border>
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports System.Reflection
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
Public Class FlatteningCut
|
Public Class FlatteningCut
|
||||||
|
|
||||||
@@ -35,14 +37,18 @@ Public Class FlatteningCut
|
|||||||
Private m_bHeadSide As Boolean = False
|
Private m_bHeadSide As Boolean = False
|
||||||
Private m_nMachType As Integer = 1
|
Private m_nMachType As Integer = 1
|
||||||
Private m_bRotLock As Boolean = False
|
Private m_bRotLock As Boolean = False
|
||||||
|
Private m_bChainedPath As Boolean = True
|
||||||
|
Private m_nTool As Integer = 0
|
||||||
' Array delle modalità di acquisizione dei punti
|
' Array delle modalità di acquisizione dei punti
|
||||||
Private m_PointsModeArray(2) As String
|
Private m_PointsModeArray(2) As String
|
||||||
' Array delle tipologia di lavorazione della spianatura
|
' Array delle tipologia di lavorazione della spianatura
|
||||||
Private m_TypeArray(1) As String
|
Private m_TypeArray(2) As String
|
||||||
' Punto selezionato nel disegno
|
' Punto selezionato nel disegno
|
||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Array degliutensili disponibili (lama e fresa)
|
||||||
|
Private m_ToolsArray(1) As String
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
@@ -57,8 +63,9 @@ Public Class FlatteningCut
|
|||||||
End Enum
|
End Enum
|
||||||
' Costanti che indicano la tipologia di lavorazione della spianatura
|
' Costanti che indicano la tipologia di lavorazione della spianatura
|
||||||
Private Enum MACH_TYPE As Integer
|
Private Enum MACH_TYPE As Integer
|
||||||
ONEWAY = 0
|
ZIGZAG = 0
|
||||||
ZIGZAG = 1
|
ONEWAY = 1
|
||||||
|
SPIRAL = 2
|
||||||
End Enum
|
End Enum
|
||||||
'Costante che indica il lato in cui posizionare i tagli
|
'Costante che indica il lato in cui posizionare i tagli
|
||||||
Private Enum CutSide As Integer
|
Private Enum CutSide As Integer
|
||||||
@@ -66,6 +73,11 @@ Public Class FlatteningCut
|
|||||||
Right
|
Right
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Private Enum TOOL As Integer
|
||||||
|
SAW = 0
|
||||||
|
MILL = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
|
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
|
||||||
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
@@ -75,8 +87,9 @@ Public Class FlatteningCut
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Creo lista tipo lavorazione
|
' Creo lista tipo lavorazione
|
||||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
|
||||||
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
||||||
|
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
||||||
|
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(MSG_COMBOBOXPARAM + 51)
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
TypeCmBx.ItemsSource = m_TypeArray
|
TypeCmBx.ItemsSource = m_TypeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
@@ -90,19 +103,26 @@ Public Class FlatteningCut
|
|||||||
ZReleasedTxBl.Text = "Z Svincolo"
|
ZReleasedTxBl.Text = "Z Svincolo"
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||||
|
ChainedPathTxBl.Text = "Chained path"
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
|
' tipo di utensile in uso per la lavorazione
|
||||||
|
m_ToolsArray(TOOL.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||||
|
m_ToolsArray(TOOL.MILL) = "Mill"
|
||||||
|
SelToolCmBx.ItemsSource = m_ToolsArray
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||||
m_dWid = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
m_dWid = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
||||||
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
|
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
|
||||||
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
|
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
|
||||||
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_nMachType = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
m_nMachType = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
||||||
m_bRotLock = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bRotLock = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_bChainedPath = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLAT_CHAINEDPATH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
m_nTool = GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile())
|
||||||
|
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -125,16 +145,16 @@ Public Class FlatteningCut
|
|||||||
' Disabilito registrazione progetto modificato
|
' Disabilito registrazione progetto modificato
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Creo layer temporaneo per crocette
|
' Creo layer temporaneo per crocette
|
||||||
m_nTempLay = EgtCreateGroup( GDB_ID.ROOT)
|
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetLevel( m_nTempLay, GDB_LV.TEMP)
|
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||||
' Origine tavola
|
' Origine tavola
|
||||||
m_bRawOk = True
|
m_bRawOk = True
|
||||||
If Not EgtGetTableRef( 1, m_ptTabOri) Then
|
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on TableRef1")
|
EgtOutLog("Error on TableRef1")
|
||||||
End If
|
End If
|
||||||
' Dati del grezzo
|
' Dati del grezzo
|
||||||
If Not GetRawBox( m_ptRawMin, m_ptRawMax) Then
|
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on RawBox")
|
EgtOutLog("Error on RawBox")
|
||||||
End If
|
End If
|
||||||
@@ -142,7 +162,7 @@ Public Class FlatteningCut
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' Inizializzo primo punto acquisito dal disegno
|
||||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||||
m_ptPrev.z = m_ptRawMax.z
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -151,10 +171,10 @@ Public Class FlatteningCut
|
|||||||
SetCoordVisibility(True)
|
SetCoordVisibility(True)
|
||||||
ShowCoord()
|
ShowCoord()
|
||||||
' Assegno parametri di lavorazione già definiti
|
' Assegno parametri di lavorazione già definiti
|
||||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
LenghtTxBx.Text = LenToString( m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
WidthTxBx.Text = LenToString( m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||||
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
||||||
' carico la quota di svincolo per la spianatura
|
' carico la quota di svincolo per la spianatura
|
||||||
@@ -163,6 +183,9 @@ Public Class FlatteningCut
|
|||||||
SideChBx.IsChecked = m_bHeadSide
|
SideChBx.IsChecked = m_bHeadSide
|
||||||
TypeCmBx.SelectedIndex = m_nMachType
|
TypeCmBx.SelectedIndex = m_nMachType
|
||||||
RotLockChBx.IsChecked = m_bRotLock
|
RotLockChBx.IsChecked = m_bRotLock
|
||||||
|
ChainedPathChBx.IsChecked = m_bChainedPath
|
||||||
|
' Assegno l'utensile in definito in macchina per la fresatura
|
||||||
|
SelToolCmBx.SelectedIndex = m_nTool
|
||||||
' Reset taglio e disabilito bottone esecuzione
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -176,16 +199,16 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString( m_dWid, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString(m_dWid, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If(m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
@@ -268,30 +291,43 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -301,15 +337,13 @@ Public Class FlatteningCut
|
|||||||
m_dAngO = dTAngO + 90
|
m_dAngO = dTAngO + 90
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -339,27 +373,40 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||||
@@ -367,15 +414,13 @@ Public Class FlatteningCut
|
|||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -524,6 +569,16 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SelToolCmBx_SelectionChanged(sender As Object, e As EventArgs) Handles SelToolCmBx.SelectionChanged
|
||||||
|
m_nTool = SelToolCmBx.SelectedIndex
|
||||||
|
' Disabilito il concatenamento
|
||||||
|
ChainedPathChBx.IsEnabled = (m_nTool = TOOL.MILL)
|
||||||
|
' Disegno il taglio
|
||||||
|
CreateFlatteningCut()
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
||||||
m_bRotLock = RotLockChBx.IsChecked
|
m_bRotLock = RotLockChBx.IsChecked
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -532,6 +587,14 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChainedPathChBx_Click(sender As Object, e As EventArgs) Handles ChainedPathChBx.Click
|
||||||
|
m_bChainedPath = ChainedPathChBx.IsChecked
|
||||||
|
' Disegno il taglio
|
||||||
|
CreateFlatteningCut()
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||||
' Recupero il valore della coordinata (in 0 Tab)
|
' Recupero il valore della coordinata (in 0 Tab)
|
||||||
Dim dXcoord As Double = 0
|
Dim dXcoord As Double = 0
|
||||||
@@ -583,9 +646,9 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -622,10 +685,12 @@ Public Class FlatteningCut
|
|||||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||||
Private Function GetFootPrintTool() As Double
|
Private Function GetFootPrintTool() As Double
|
||||||
' vedere nella pagina Allarm il capito "Incisioni"
|
' vedere nella pagina Allarm il capito "Incisioni"
|
||||||
Dim bForceUseMill As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bForceUseMill As Boolean = (m_nTool = TOOL.MILL)
|
||||||
Dim dFootPrint As Double = 0
|
Dim dFootPrint As Double = 0
|
||||||
' verifico quale lavorazione è attiva
|
' verifico quale lavorazione è attiva
|
||||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
||||||
|
Dim bSetTool As Boolean = EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
|
If Not bSetTool Then EgtOutLog("Erro nel settaggio utensile lama " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
@@ -660,18 +725,24 @@ Public Class FlatteningCut
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
|
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
If (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0) Then
|
If (m_nTool = TOOL.MILL) Then
|
||||||
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||||
End If
|
End If
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||||
' Imposto prima direzione
|
' Imposto prima direzione
|
||||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||||
|
' Imposto se iniziare la fresatura dal punto indicato
|
||||||
|
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
|
If Not bReducePath Then EgtSetInfo(nCutId, INFO_STRICT, 0)
|
||||||
|
|
||||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||||
If RotLockChBx.IsChecked Then
|
If RotLockChBx.IsChecked Then
|
||||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||||
End If
|
End If
|
||||||
|
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
||||||
' Funzione che crea i tagli successivi al primo
|
' Funzione che crea i tagli successivi al primo
|
||||||
MultiplyCut(nLayerId, nCutId)
|
MultiplyCut(nLayerId, nCutId)
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
@@ -704,10 +775,17 @@ Public Class FlatteningCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||||
|
Dim bEngWithMill As Boolean = (m_nTool = TOOL.MILL)
|
||||||
|
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
|
|
||||||
' Recupero spessore della lama (utensile) correntemente attiva
|
' Recupero spessore della lama (utensile) correntemente attiva
|
||||||
Dim dThick As Double = GetFootPrintTool()
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
If dThick = 0 Then Return False
|
If dThick = 0 Then Return False
|
||||||
|
|
||||||
|
' Salvo la prima curva nella lista dei percorsi da concatenare
|
||||||
|
Dim CutsList As New List(Of Integer)
|
||||||
|
CutsList.Add(nCutId)
|
||||||
|
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||||
' Definisco vettore di spostamento
|
' Definisco vettore di spostamento
|
||||||
@@ -725,7 +803,10 @@ Public Class FlatteningCut
|
|||||||
If nStepNum > 1 Then
|
If nStepNum > 1 Then
|
||||||
dDelta = dWidth / (nStepNum - 1)
|
dDelta = dWidth / (nStepNum - 1)
|
||||||
End If
|
End If
|
||||||
|
' definisco la larghezza dell'utensile (solo per la fresa)
|
||||||
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
||||||
|
' definisco il tipo di utensile da utilizzare
|
||||||
|
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||||
' Creo vettore delta
|
' Creo vettore delta
|
||||||
vtDelta *= dDelta
|
vtDelta *= dDelta
|
||||||
' Creo indice per impostare info che indica tipologia di spianatura
|
' Creo indice per impostare info che indica tipologia di spianatura
|
||||||
@@ -735,6 +816,7 @@ Public Class FlatteningCut
|
|||||||
' Creo copie
|
' Creo copie
|
||||||
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
||||||
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
||||||
|
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||||
' Assegno info direzione a seconda del tipo di spianatura
|
' Assegno info direzione a seconda del tipo di spianatura
|
||||||
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
||||||
If nTypeIndex = 1 Then
|
If nTypeIndex = 1 Then
|
||||||
@@ -748,10 +830,77 @@ Public Class FlatteningCut
|
|||||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
||||||
End If
|
End If
|
||||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||||
|
If m_bChainedPath And bEngWithMill Then
|
||||||
|
If bReducePath Then
|
||||||
|
If Index < nStepNum - 1 Then
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2)
|
||||||
|
ElseIf Index = nStepNum - 1 Then
|
||||||
|
If nStepNum Mod 2 = 0 Then
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2, False, True)
|
||||||
|
Else
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2, True, False)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
CutsList.Add(nCut2Id)
|
||||||
|
End If
|
||||||
|
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||||
|
If m_bChainedPath And bEngWithMill Then
|
||||||
|
' Decidere se accorciare i tagli del valore del raggio utensile!
|
||||||
|
If bReducePath Then
|
||||||
|
ExtendLenghtMillPath(CutsList(0), -dThick / 2, False, True)
|
||||||
|
End If
|
||||||
|
For Index As Integer = 0 To CutsList.Count - 2
|
||||||
|
If Index Mod 2 <> 0 Then
|
||||||
|
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||||
|
Dim PtStart_1 As Point3d
|
||||||
|
EgtStartPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||||
|
Dim PtStart_2 As Point3d
|
||||||
|
EgtStartPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||||
|
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||||
|
Else
|
||||||
|
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||||
|
Dim PtStart_1 As Point3d
|
||||||
|
EgtEndPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||||
|
Dim PtStart_2 As Point3d
|
||||||
|
EgtEndPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||||
|
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim ptNear As Point3d
|
||||||
|
EgtStartPoint(CutsList(0), ptNear)
|
||||||
|
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
|
||||||
|
' Se unisco il percorso devo per forza usare la fresa!
|
||||||
|
EgtSetInfo(IdJointCurv, "EngravingWithMill", 1)
|
||||||
|
If Not bReducePath Then EgtSetInfo(IdJointCurv, INFO_STRICT, 0)
|
||||||
|
End If
|
||||||
|
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub ExtendLenghtMillPath(ByVal IdCurv As Integer, ByVal ReduceVal As Double,
|
||||||
|
ByVal Optional bStart As Boolean = True, ByVal Optional bEnd As Boolean = True)
|
||||||
|
Dim PtStart As Point3d
|
||||||
|
EgtStartPoint(IdCurv, GDB_RT.GLOB, PtStart)
|
||||||
|
Dim PtEnd As Point3d
|
||||||
|
EgtEndPoint(IdCurv, GDB_RT.GLOB, PtEnd)
|
||||||
|
If bStart Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtStart, GDB_RT.GLOB)
|
||||||
|
If bEnd Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtEnd, GDB_RT.GLOB)
|
||||||
|
Dim dLenLine As Double
|
||||||
|
EgtCurveLength(IdCurv, dLenLine)
|
||||||
|
EgtOutLog("Lunghezza segmento ridotto: " & dLenLine.ToString)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
|
|||||||
@@ -260,6 +260,12 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -272,6 +278,13 @@ Public Class GridCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -279,7 +292,7 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -287,10 +300,10 @@ Public Class GridCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -339,6 +352,12 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -351,6 +370,13 @@ Public Class GridCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -358,7 +384,7 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -366,10 +392,10 @@ Public Class GridCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
|
|||||||
@@ -53,14 +53,43 @@ Public Class ManualAxesMoveUC
|
|||||||
' Imposto check per considerare spessore lama
|
' Imposto check per considerare spessore lama
|
||||||
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||||
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||||
|
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
m_Timer.Stop()
|
m_Timer.Stop()
|
||||||
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
||||||
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
||||||
|
' Nascondo la macchina
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function SetMachineInCurrPos() As Boolean
|
||||||
|
' Recupero la posizione macchina
|
||||||
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||||
|
' Recupero il nome degli assi macchina
|
||||||
|
Dim sL1 As String = String.Empty
|
||||||
|
Dim sL2 As String = String.Empty
|
||||||
|
Dim sL3 As String = String.Empty
|
||||||
|
Dim sR1 As String = String.Empty
|
||||||
|
Dim sR2 As String = String.Empty
|
||||||
|
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||||
|
' Visualizzo macchina in posizione
|
||||||
|
EgtSetAxisPos(sL1, dL1)
|
||||||
|
EgtSetAxisPos(sL2, dL2)
|
||||||
|
EgtSetAxisPos(sL3, dL3)
|
||||||
|
EgtSetAxisPos(sR1, dR1)
|
||||||
|
EgtSetAxisPos(sR2, dR2)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub UpdateAxesNames()
|
Private Sub UpdateAxesNames()
|
||||||
Dim sL1 As String = String.Empty
|
Dim sL1 As String = String.Empty
|
||||||
Dim sL2 As String = String.Empty
|
Dim sL2 As String = String.Empty
|
||||||
@@ -125,11 +154,16 @@ Public Class ManualAxesMoveUC
|
|||||||
Private Sub Timer_tick()
|
Private Sub Timer_tick()
|
||||||
UpdateAxesNames()
|
UpdateAxesNames()
|
||||||
UpdateUseSawThickness()
|
UpdateUseSawThickness()
|
||||||
|
' Aggiorno posizione macchina in disegno
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
' Aggiorno il disegno
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private m_MoveClicked As Boolean = False
|
Private m_MoveClicked As Boolean = False
|
||||||
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
||||||
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||||
|
EgtOutLog(" → Hold on! Do not click compulsively.")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MoveClicked = True
|
m_MoveClicked = True
|
||||||
@@ -216,6 +250,7 @@ Public Class ManualAxesMoveUC
|
|||||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||||
' leggo se stato reset
|
' leggo se stato reset
|
||||||
If Not m_CN.bResetState Then
|
If Not m_CN.bResetState Then
|
||||||
|
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||||
m_MoveClicked = False
|
m_MoveClicked = False
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -285,6 +285,12 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -297,6 +303,13 @@ Public Class MultipleCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -304,7 +317,7 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
@@ -314,10 +327,10 @@ Public Class MultipleCut
|
|||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -365,6 +378,12 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -377,6 +396,13 @@ Public Class MultipleCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -384,7 +410,7 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -392,10 +418,10 @@ Public Class MultipleCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
|
|||||||
@@ -210,17 +210,30 @@ Public Class SawTestUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -228,10 +241,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -280,17 +293,30 @@ Public Class SawTestUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -298,10 +324,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -504,6 +530,10 @@ Public Class SawTestUC
|
|||||||
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
||||||
vtPerp = vtDir
|
vtPerp = vtDir
|
||||||
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
||||||
|
Else
|
||||||
|
m_CurrProjPage.ClearMessage()
|
||||||
|
' 91144 = Set machining side: right or left.
|
||||||
|
m_CurrProjPage.SetInfoMessage(EgtMsg(91144))
|
||||||
End If
|
End If
|
||||||
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
||||||
Dim dLen2 As Double = m_dLen / 2
|
Dim dLen2 As Double = m_dLen / 2
|
||||||
|
|||||||
@@ -268,6 +268,12 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -279,6 +285,13 @@ Public Class SingleCutUC
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -286,7 +299,8 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
|
EgtOutLog("Coordinate punto 1 da H3: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -294,10 +308,11 @@ Public Class SingleCutUC
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
|
EgtOutLog("Coordinate punto 1 da H1: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -318,7 +333,6 @@ Public Class SingleCutUC
|
|||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -348,6 +362,12 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
' Recupero dati utensile e testa corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -359,6 +379,13 @@ Public Class SingleCutUC
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -366,20 +393,20 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
|
EgtOutLog("Coordinate punto 2 da H3: " & m_ptTipP2.x.ToString & " ," & m_ptTipP2.y.ToString)
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -412,6 +439,7 @@ Public Class SingleCutUC
|
|||||||
m_dAngO = dAngOrizzDeg
|
m_dAngO = dAngOrizzDeg
|
||||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
EgtOutLog("Lunghezza taglio: " & dLen.ToString & "Angolo: " & dAngOrizzDeg.ToString)
|
||||||
CreateSingleCut()
|
CreateSingleCut()
|
||||||
' Disegno la macchina nella sua posizione reale
|
' Disegno la macchina nella sua posizione reale
|
||||||
SetMachineInCurrPos()
|
SetMachineInCurrPos()
|
||||||
@@ -604,6 +632,7 @@ Public Class SingleCutUC
|
|||||||
Private Function CreateSingleCut() As Boolean
|
Private Function CreateSingleCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
|
EgtOutLog("Primo punto non valido")
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -72,7 +72,10 @@ Public Class SingleDrillUC
|
|||||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||||
|
' rimuovo utensile su uscite 1
|
||||||
|
EgtSetCalcTool("", "H1", 1)
|
||||||
|
' imposto utensile su uscita 2
|
||||||
|
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
|
||||||
' recupero informazioni del foretto usato
|
' recupero informazioni del foretto usato
|
||||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||||
@@ -213,21 +216,33 @@ Public Class SingleDrillUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sDrill As String = m_sCurrDrill
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sDrill, "H1", 2)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizione lama o laser
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
' Ricavo dati Foretto corrente
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
Dim sDrill As String = m_sCurrDrill
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -235,10 +250,10 @@ Public Class SingleDrillUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -250,10 +265,8 @@ Public Class SingleDrillUC
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sDrill As String = m_sCurrDrill
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -433,9 +446,9 @@ Public Class SingleDrillUC
|
|||||||
ptIns.z = dRawHeight
|
ptIns.z = dRawHeight
|
||||||
' Inserisco il pezzo nel grezzo
|
' Inserisco il pezzo nel grezzo
|
||||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
' Inserisco la lavorazione
|
' Inserisco la lavorazione
|
||||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||||
EgtSetCurrPhase(1)
|
|
||||||
' Eventuale eliminazione Home finale
|
' Eventuale eliminazione Home finale
|
||||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ Public Class VacuumMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||||
|
Friend m_OutLogTypeButton As Boolean = True
|
||||||
|
|
||||||
' Creazione converter da String a ImageSource
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -71,10 +74,37 @@ Public Class VacuumMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
OutLogTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "STATE CHANGED"
|
||||||
|
' ------------------------------------------------------------------------------
|
||||||
|
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Friend Sub OutLogTypeButton(CurrMachineButton As MachineButton)
|
||||||
|
If Not m_OutLogTypeButton Then Return
|
||||||
|
Dim BtnType As Type = CurrMachineButton.GetType
|
||||||
|
If BtnType Is GetType(NoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
||||||
Dim VacuumUpButton As TwoStateButton = Nothing
|
Dim VacuumUpButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -371,6 +401,8 @@ Public Class VacuumMachineButtonUC
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' State Range
|
||||||
|
|
||||||
Public Function GetPrivateProfileMachineButtons(
|
Public Function GetPrivateProfileMachineButtons(
|
||||||
ByVal lpAppName As String,
|
ByVal lpAppName As String,
|
||||||
ByVal lpKeyName As String,
|
ByVal lpKeyName As String,
|
||||||
|
|||||||
@@ -1190,7 +1190,7 @@ Public Class DrawPageUC
|
|||||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||||
bExitPage = Not bExitPage
|
bExitPage = Not bExitPage
|
||||||
End If
|
End If
|
||||||
If bExitPage And m_MainWindow.FrameCutBtn.IsChecked Then
|
If bExitPage Then
|
||||||
' Aggiorno ambiente principale
|
' Aggiorno ambiente principale
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' Elimino nome del componente precedente
|
' Elimino nome del componente precedente
|
||||||
@@ -1217,6 +1217,7 @@ Public Class DrawPageUC
|
|||||||
Else
|
Else
|
||||||
LoadSecondaryPage()
|
LoadSecondaryPage()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -7,55 +7,57 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della ImportPage -->
|
<!-- Definizione della ImportPage -->
|
||||||
<Border>
|
<Border>
|
||||||
<Grid Name="ImportPageGrid" >
|
<Grid Name="ImportPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="3*"/>
|
|
||||||
<ColumnDefinition Width="12*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="8*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore per Button -->
|
|
||||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="7*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
|
||||||
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="7.25*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.75*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
|
||||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
<!-- Definizione della Grid superiore per Button -->
|
||||||
|
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="7*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||||
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Definizione della Grid laterale -->
|
||||||
|
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="7.25*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||||
ItemsSource="{Binding ItemList}"/>
|
ItemsSource="{Binding ItemList}"/>
|
||||||
|
|
||||||
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||||
@@ -68,68 +70,68 @@
|
|||||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid inferiore per Button -->
|
|
||||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
|
|
||||||
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
|
|
||||||
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
|
|
||||||
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
|
|
||||||
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
|
||||||
TextAlignment="Right"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<!-- Definizione della Grid inferiore per Button -->
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||||
</Button>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
|
||||||
|
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
|
||||||
|
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ Public Class ImportPageUC
|
|||||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
||||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
||||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
||||||
|
EngraveBtn.Content = "Engrave"
|
||||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
||||||
Cad2dBtn.Content = "Cad 2d"
|
Cad2dBtn.Content = "Cad 2d"
|
||||||
|
|
||||||
@@ -163,6 +164,10 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
' Pulisco tutto
|
' Pulisco tutto
|
||||||
ClearView()
|
ClearView()
|
||||||
|
' Definizione di quale comando deve essere visualizzato
|
||||||
|
DripCutBtn.Visibility = If(String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw), Visibility.Hidden, Visibility.Visible)
|
||||||
|
EngraveBtn.Visibility = If(DripCutBtn.Visibility <> Visibility.Visible, Visibility.Visible, Visibility.Hidden)
|
||||||
|
|
||||||
FileListBox.UnselectAll()
|
FileListBox.UnselectAll()
|
||||||
' inibisco selezione diretta da Scene
|
' inibisco selezione diretta da Scene
|
||||||
ImportScene.SetStatusNull()
|
ImportScene.SetStatusNull()
|
||||||
@@ -343,7 +348,12 @@ Public Class ImportPageUC
|
|||||||
ResetBtn.IsEnabled = False
|
ResetBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
' Evito di settare le proprietà di oggeti che sono con visibilità Hidden
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -404,7 +414,11 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
||||||
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
||||||
@@ -420,7 +434,11 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
' altrimenti import per cornici
|
' altrimenti import per cornici
|
||||||
@@ -433,10 +451,10 @@ Public Class ImportPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked Then
|
||||||
OnMouseDownSceneSideAngle( e)
|
OnMouseDownSceneSideAngle(e)
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
OnMouseDownSceneUnderDrill( e)
|
OnMouseDownSceneUnderDrill(e)
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
OnMouseDownSceneFiloTop( e)
|
OnMouseDownSceneFiloTop( e)
|
||||||
End If
|
End If
|
||||||
@@ -619,7 +637,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub SelectedPartChanged()
|
Private Sub SelectedPartChanged()
|
||||||
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||||
m_SideAngleUC.ReLoadSideAnglePage()
|
m_SideAngleUC.ReLoadSideAnglePage()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -680,8 +698,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -712,8 +734,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -744,8 +770,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1029,22 +1059,24 @@ Public Class ImportPageUC
|
|||||||
' Salvo direttorio corrente
|
' Salvo direttorio corrente
|
||||||
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
||||||
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
If SideAngleBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Then
|
||||||
SideAngleBtn.IsChecked = False
|
SideAngleBtn.IsChecked = False
|
||||||
|
ElseIf EngraveBtn.IsChecked() Then
|
||||||
|
EngraveBtn.IsChecked = False
|
||||||
Else
|
Else
|
||||||
DripCutBtn.IsChecked() = False
|
DripCutBtn.IsChecked() = False
|
||||||
End If
|
End If
|
||||||
' Tolgo pagina fori da sotto se attiva
|
' Tolgo pagina fori da sotto se attiva
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_UnderDrillUC)
|
LeftGrid.Children.Remove(m_UnderDrillUC)
|
||||||
DripDrillBtn.IsChecked() = False
|
DripDrillBtn.IsChecked() = False
|
||||||
' Tolgo pagina Filo Top se attiva
|
' Tolgo pagina Filo Top se attiva
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1071,7 +1103,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1093,8 +1129,72 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
|
mmBtn.IsEnabled = True
|
||||||
|
inchBtn.IsEnabled = True
|
||||||
|
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||||
|
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||||
|
' Riabilito bottone reset
|
||||||
|
ResetBtn.IsEnabled = True
|
||||||
|
' Pulisco area messaggi
|
||||||
|
MessageTxBx.Text = ""
|
||||||
|
MessageBrd.Background = Brushes.Transparent
|
||||||
|
End If
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||||
|
If EngraveBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
|
' Aggiungo regioni per percorsi interni
|
||||||
|
AdjustSelectRegions()
|
||||||
|
' Dichiaro nessuna selezione
|
||||||
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
|
' Imposto modalità sideangle
|
||||||
|
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||||
|
LeftGrid.Children.Add(m_SideAngleUC)
|
||||||
|
FilePathTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
|
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
|
SideAngleBtn.IsEnabled = False
|
||||||
|
FiloTopBtn.IsEnabled = False
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
DripDrillBtn.IsEnabled = False
|
||||||
|
mmBtn.IsEnabled = False
|
||||||
|
inchBtn.IsEnabled = False
|
||||||
|
' Disabilito bottone reset
|
||||||
|
ResetBtn.IsEnabled = False
|
||||||
|
' Messaggio di selezione da effettuare
|
||||||
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
|
' Rimuovo regioni per percorsi interni
|
||||||
|
RemoveSelectRegions()
|
||||||
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
|
' Deseleziono eventuali pezzi rimasti selezionati
|
||||||
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
|
EgtDeselectAll()
|
||||||
|
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
@@ -1124,6 +1224,9 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1144,8 +1247,9 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||||
@@ -1174,7 +1278,11 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
' Disabilito bottone reset
|
' Disabilito bottone reset
|
||||||
@@ -1196,8 +1304,12 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Riabilito bottone reset
|
' Riabilito bottone reset
|
||||||
@@ -1223,7 +1335,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1245,8 +1361,12 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
|
|||||||
@@ -1193,6 +1193,7 @@ Public Class AlarmsPageUC
|
|||||||
Dim dToolDiam As Double = 0
|
Dim dToolDiam As Double = 0
|
||||||
Dim dToolThick As Double = 0
|
Dim dToolThick As Double = 0
|
||||||
Dim dToolLen As Double = 0
|
Dim dToolLen As Double = 0
|
||||||
|
Dim dCore As Double = 0
|
||||||
Dim sToolParam As String = String.Empty
|
Dim sToolParam As String = String.Empty
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sToolParam)
|
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sToolParam)
|
||||||
EgtLuaSetGlobStringVar("CMD.HEAD", sToolParam)
|
EgtLuaSetGlobStringVar("CMD.HEAD", sToolParam)
|
||||||
@@ -1204,6 +1205,8 @@ Public Class AlarmsPageUC
|
|||||||
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||||
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.CORE", dCore * 1000)
|
||||||
' Nuova varibile per gestione tastatura utensili Frankfurt (Polishing)
|
' Nuova varibile per gestione tastatura utensili Frankfurt (Polishing)
|
||||||
Dim nType As Integer
|
Dim nType As Integer
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
@@ -1262,7 +1265,7 @@ Public Class AlarmsPageUC
|
|||||||
System.Threading.Thread.Sleep(300)
|
System.Threading.Thread.Sleep(300)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||||
' Creo MsgBox di attesa
|
' Creo MsgBox di attesa
|
||||||
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_DIRECTCUTPAGEUC + 41), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(MSG_DIRECTCUTPAGEUC + 41), ToolForProbing.m_ToolName), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
' Definisco flag tastatura
|
' Definisco flag tastatura
|
||||||
Dim bProbingOk As Boolean = False
|
Dim bProbingOk As Boolean = False
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ Public Class CurrentMachine
|
|||||||
Private m_dPhotoOffsetY As Double = 0
|
Private m_dPhotoOffsetY As Double = 0
|
||||||
Private m_dTab2PhotoOffsetX As Double = 0
|
Private m_dTab2PhotoOffsetX As Double = 0
|
||||||
Private m_dTab2PhotoOffsetY As Double = 0
|
Private m_dTab2PhotoOffsetY As Double = 0
|
||||||
|
Private m_dHQPhotoOffsetX As Double = 0
|
||||||
|
Private m_dHQPhotoOffsetY As Double = 0
|
||||||
|
|
||||||
' Abilitazione scelta restart
|
' Abilitazione scelta restart
|
||||||
Private m_bEnableRestart As Boolean = False
|
Private m_bEnableRestart As Boolean = False
|
||||||
@@ -764,6 +766,10 @@ Public Class CurrentMachine
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
||||||
m_sCurrWaterJetting = value
|
m_sCurrWaterJetting = value
|
||||||
|
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -860,6 +866,10 @@ Public Class CurrentMachine
|
|||||||
Case 2
|
Case 2
|
||||||
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
||||||
Case Else
|
Case Else
|
||||||
|
' verifico quale delle due fotocamere è attualmente attiva
|
||||||
|
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||||
|
Return New Vector3d(m_dHQPhotoOffsetX, m_dHQPhotoOffsetY, 0)
|
||||||
|
End If
|
||||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
@@ -1332,6 +1342,8 @@ Public Class CurrentMachine
|
|||||||
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
||||||
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
||||||
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
||||||
|
m_dHQPhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETX, 0, sMachIniFile)
|
||||||
|
m_dHQPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETY, 0, sMachIniFile)
|
||||||
|
|
||||||
' Leggo abilitazione per restart
|
' Leggo abilitazione per restart
|
||||||
m_bEnableRestart = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENABLERESTART, 0, sMachIniFile) <> 0)
|
m_bEnableRestart = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENABLERESTART, 0, sMachIniFile) <> 0)
|
||||||
@@ -1650,7 +1662,9 @@ Public Class CurrentMachine
|
|||||||
Dim dToolDiam As Double = 0
|
Dim dToolDiam As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||||
' Confronto con massimo ammesso
|
' Confronto con massimo ammesso
|
||||||
Return (dToolDiam <= dMaxSawDiamForProbe)
|
Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe
|
||||||
|
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for probing")
|
||||||
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetPrivateProfileMaterial(
|
Friend Function GetPrivateProfileMaterial(
|
||||||
|
|||||||
@@ -308,8 +308,16 @@ Public Class MachineStatusUC
|
|||||||
Dim dSpindleOvr As Double
|
Dim dSpindleOvr As Double
|
||||||
' se attivi nuovi comandi MDI su siemens
|
' se attivi nuovi comandi MDI su siemens
|
||||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||||
dSpindlePower = m_CN.d_data(0)
|
|
||||||
dSpindleOvr = m_CN.d_data(1)
|
If m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||||
|
dSpindlePower = m_CN.d_spindle_power
|
||||||
|
'dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||||
|
dSpindleOvr = m_CN.bPowerOvr
|
||||||
|
Else
|
||||||
|
' questo sistema è deprecabile dalla versione 2.6d2 (nuova gestione dei vettori)
|
||||||
|
dSpindlePower = m_CN.d_data(0)
|
||||||
|
dSpindleOvr = m_CN.d_data(1)
|
||||||
|
End If
|
||||||
ElseIf m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
ElseIf m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||||
dSpindlePower = m_CN.d_spindle_power / 1000
|
dSpindlePower = m_CN.d_spindle_power / 1000
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Public Class MachiningDbPageUC
|
|||||||
StepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39), EgtMsg(MSG_COMBOBOXPARAM + 40)}
|
StepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39), EgtMsg(MSG_COMBOBOXPARAM + 40)}
|
||||||
RouFinStepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39)}
|
RouFinStepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39)}
|
||||||
ExtCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(MSG_COMBOBOXPARAM + 45)}
|
ExtCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(MSG_COMBOBOXPARAM + 45)}
|
||||||
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44)}
|
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(90852)}
|
||||||
|
|
||||||
' Assegno array a combobox
|
' Assegno array a combobox
|
||||||
WorkSideCmBx.ItemsSource = WorkSide
|
WorkSideCmBx.ItemsSource = WorkSide
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ Public Class ToolsDbPageUC
|
|||||||
If nTType <> MCH_TY.MILL_STD Then
|
If nTType <> MCH_TY.MILL_STD Then
|
||||||
' se utensile diverso da MILL
|
' se utensile diverso da MILL
|
||||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
ElseIf nTType <> MCH_TY.MILL_STD And ToolName.Trim.ToLower = "probe" And nDebug > 4 Then
|
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or nDebug > 4) Then
|
||||||
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
||||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Border Name="LogoBrd" Background="Transparent">
|
<Border Name="LogoBrd" Background="Transparent">
|
||||||
<Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform" Margin="1"/>
|
<Image Source="../Resources/NewIcons/Logo-Egalware (2).png" Stretch="Uniform" Margin="1"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ** Definizione della Grid delle tab ** -->
|
<!-- ** Definizione della Grid delle tab ** -->
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ Class MainWindow
|
|||||||
' Coefficiente di scalatura della finestra rispetto a standard
|
' Coefficiente di scalatura della finestra rispetto a standard
|
||||||
Friend m_dMWinScale As Double = 1
|
Friend m_dMWinScale As Double = 1
|
||||||
|
|
||||||
|
' Variabile che definisce l'avvio forzato in modalità FRAME
|
||||||
|
Friend m_OnlyFrame As Boolean = False
|
||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
||||||
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
||||||
@@ -101,6 +104,7 @@ Class MainWindow
|
|||||||
REGISTRATION = 2 ^ 20 ' 1048576
|
REGISTRATION = 2 ^ 20 ' 1048576
|
||||||
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
||||||
COMPOFRAME = 2 ^ 22 ' 4194304
|
COMPOFRAME = 2 ^ 22 ' 4194304
|
||||||
|
CUT_LIGHT = 2 ^ 23 ' 8388608
|
||||||
End Enum
|
End Enum
|
||||||
' Opzione nesting automatico
|
' Opzione nesting automatico
|
||||||
Private m_bAutoNest As Boolean = False
|
Private m_bAutoNest As Boolean = False
|
||||||
@@ -339,10 +343,15 @@ Class MainWindow
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
' Recupero opzioni della chiave
|
' Recupero opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2512, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2610, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2512, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2610, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||||
|
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||||
|
If Not bProd Then
|
||||||
|
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
|
||||||
|
End If
|
||||||
|
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
||||||
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
||||||
@@ -452,6 +461,7 @@ Class MainWindow
|
|||||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
||||||
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||||
|
EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!")
|
||||||
Else
|
Else
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
@@ -658,16 +668,12 @@ Class MainWindow
|
|||||||
|
|
||||||
' Or nAssLeftDays = 358
|
' Or nAssLeftDays = 358
|
||||||
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Then
|
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Then
|
||||||
'Dim sText As String = "Fai ammenda," & vbCrLf & "gli aggiornamenti sono in fase di scadenza!"
|
Dim sMsg As String = EgtMsg(91141) ' Assistenza in scadenza /nContattare assistenza:/n
|
||||||
'Dim sTitle As String = "⚠️ Warning!"
|
|
||||||
'Dim MissingKeyWnd As New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
|
||||||
' finestra Custom
|
|
||||||
Dim sMsg As String = EgtMsg(91141)
|
|
||||||
Dim sAssistance As String = String.Empty
|
Dim sAssistance As String = String.Empty
|
||||||
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
||||||
Dim sItems As String() = sAssistance.Split(","c)
|
Dim sItems As String() = sAssistance.Split(","c)
|
||||||
For Each Item As String In sItems
|
For Each Item As String In sItems
|
||||||
sMsg &= "→ " & Item.Trim & " /n"
|
sMsg &= " → " & Item.Trim & " /n"
|
||||||
Next
|
Next
|
||||||
Dim MyLicWn As New LicenseWindow(Me, sMsg, "Assistance " & sAssStatus)
|
Dim MyLicWn As New LicenseWindow(Me, sMsg, "Assistance " & sAssStatus)
|
||||||
MyLicWn.Show()
|
MyLicWn.Show()
|
||||||
@@ -1139,7 +1145,7 @@ Class MainWindow
|
|||||||
End If
|
End If
|
||||||
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
|
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
|
||||||
EgtOutLog("Iniziato processo di chiusura programma")
|
EgtOutLog("Iniziato processo di chiusura programma")
|
||||||
m_IsClosingApplication = If( m_CNCommunication.m_nNCType = 1, 1, 2)
|
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
|
||||||
Dim nCount As Integer = 0
|
Dim nCount As Integer = 0
|
||||||
While m_IsClosingApplication <> 2
|
While m_IsClosingApplication <> 2
|
||||||
If nCount > 5 Then
|
If nCount > 5 Then
|
||||||
@@ -1277,7 +1283,11 @@ Class MainWindow
|
|||||||
m_ProdLineTimer.Start()
|
m_ProdLineTimer.Start()
|
||||||
End If
|
End If
|
||||||
' di default attivo la pagina CadCut
|
' di default attivo la pagina CadCut
|
||||||
m_ActivePage = MainWindow.Pages.CadCut
|
If m_OnlyFrame Then
|
||||||
|
m_ActivePage = MainWindow.Pages.FrameCut
|
||||||
|
Else
|
||||||
|
m_ActivePage = MainWindow.Pages.CadCut
|
||||||
|
End If
|
||||||
' seleziono il tipo di avvio
|
' seleziono il tipo di avvio
|
||||||
m_CurrentProjectPageUC.StartProgram()
|
m_CurrentProjectPageUC.StartProgram()
|
||||||
' aggiorno la grafica
|
' aggiorno la grafica
|
||||||
@@ -1314,8 +1324,34 @@ Class MainWindow
|
|||||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
EgtSetCurrentContext(nCurrCtx)
|
EgtSetCurrentContext(nCurrCtx)
|
||||||
' Aggiorno interfaccia
|
' Aggiorno interfaccia
|
||||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
If m_OnlyFrame Then
|
||||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
|
m_ActivePage <> Pages.RawPart And m_ActivePage <> Pages.DirectCut And m_ActivePage <> Pages.Simulation Then
|
||||||
|
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91142), EgtMsg(91143), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
'' Gestione stato FastGrid
|
||||||
|
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
|
||||||
|
' Cancello progetto salvato con nome da file ini
|
||||||
|
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
|
||||||
|
' Scelta tavola della macchina
|
||||||
|
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
|
||||||
|
' Creo nuovo progetto
|
||||||
|
m_CurrentProjectPageUC.NewProject(nTabInd, False)
|
||||||
|
'' Gestione stato FastGrid
|
||||||
|
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||||
|
FrameCutBtn_Click(Nothing, Nothing)
|
||||||
|
CadCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
FrameCutBtn.IsEnabled = True
|
||||||
|
CadCutBtn.IsEnabled = False
|
||||||
|
' Attivo il pulsante FRAME
|
||||||
|
'FrameCutBtn.IsChecked = True
|
||||||
|
'CadCutBtn.IsChecked = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||||
|
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||||
|
End If
|
||||||
|
|
||||||
' DirectCutBtn.IsEnabled = bHeadH1
|
' DirectCutBtn.IsEnabled = bHeadH1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2068,6 +2104,7 @@ Class MainWindow
|
|||||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||||
EgtResetMark(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
EgtResetMark(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||||
|
m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv = String.Empty
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.IsChecked = False
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.IsChecked = False
|
||||||
Me.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
Me.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagCUT")>
|
<Assembly: AssemblyProduct("OmagCUT")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2015-2023 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2015-2024 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -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("2.5.12.4")>
|
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.5.12.4")>
|
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ Imports System.Collections.ObjectModel
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
|
Imports EgtWPFLib.EgtMsgBox
|
||||||
|
Imports OmagCUT.CN_generico
|
||||||
|
|
||||||
Public Class CNCommunication
|
Public Class CNCommunication
|
||||||
|
|
||||||
@@ -28,6 +30,9 @@ Public Class CNCommunication
|
|||||||
' Oggetto CN
|
' Oggetto CN
|
||||||
Public WithEvents m_CN As CN_generico
|
Public WithEvents m_CN As CN_generico
|
||||||
|
|
||||||
|
' NUOVO ! in fase di test
|
||||||
|
Private ListReferenceIndex As New List(Of RefereceFlagSimens)
|
||||||
|
|
||||||
' Flag di aggiornamento dati
|
' Flag di aggiornamento dati
|
||||||
Private m_bNewPosData As Boolean = True
|
Private m_bNewPosData As Boolean = True
|
||||||
Private m_bNewDeltaData As Boolean = True
|
Private m_bNewDeltaData As Boolean = True
|
||||||
@@ -236,6 +241,17 @@ Public Class CNCommunication
|
|||||||
m_bInInches = (GetPrivateProfileInt(S_AXES, K_ININCHES, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
m_bInInches = (GetPrivateProfileInt(S_AXES, K_ININCHES, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub KillSimensCom(sProcessName As String)
|
||||||
|
Dim sAppName As String = Path.GetFileNameWithoutExtension(sProcessName)
|
||||||
|
Dim pList() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses
|
||||||
|
For Each proc As System.Diagnostics.Process In pList
|
||||||
|
If proc.ProcessName.ToString = sAppName Then
|
||||||
|
proc.Kill()
|
||||||
|
EgtOutLog("ProcessKill : " & """" & sProcessName & """")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub InitCn()
|
Private Sub InitCn()
|
||||||
|
|
||||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Yellow")
|
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
@@ -271,6 +287,7 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
|
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
|
||||||
GetPrivateProfileString(S_NCDATA, K_COMM, "XIP01, 0, 10, 0, 0, 0", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_COMM, "XIP01, 0, 10, 0, 0, 0", sVal, m_MainWindow.GetMachIniFile())
|
||||||
|
EgtOutLog(" → Tipo di comunicazione: " & sVal)
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.Comm, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.Comm, sVal)
|
||||||
GetPrivateProfileString(S_NCDATA, K_REFRESH, "200", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_REFRESH, "200", sVal, m_MainWindow.GetMachIniFile())
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.Refresh, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.Refresh, sVal)
|
||||||
@@ -372,6 +389,9 @@ Public Class CNCommunication
|
|||||||
m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal)
|
||||||
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||||
|
' ver 2.6i1 : nuova gestione SiemensONE
|
||||||
|
GetPrivateProfileString(S_NCDATA, K_RESETSTATUS, "", sVal, m_MainWindow.GetMachIniFile())
|
||||||
|
m_CN.SetCnDataVar(CN_generico.CnData.ResetStatus, sVal)
|
||||||
|
|
||||||
' nuove variabili: stato dei nuovi pulsanti
|
' nuove variabili: stato dei nuovi pulsanti
|
||||||
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||||
@@ -389,7 +409,7 @@ Public Class CNCommunication
|
|||||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Solo per controllo FANUNC
|
' Solo per controllo FANUC
|
||||||
GetPrivateProfileString(S_NCDATA, K_NAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_NAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.nAxes, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.nAxes, sVal)
|
||||||
|
|
||||||
@@ -402,6 +422,10 @@ Public Class CNCommunication
|
|||||||
EgtOutLog("Error starting NC communication : " & ex.Message)
|
EgtOutLog("Error starting NC communication : " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
'' !!!!!!!!!!!!! Per forzare la lettura delle variabili siemens di configurazione !!!!!!!!!!!!!
|
||||||
|
' m_nNCType = 3
|
||||||
|
'' !!!!!!!!!!!!! Per forzare la lettura delle variabili siemens di configurazione !!!!!!!!!!!!!
|
||||||
|
|
||||||
Select Case m_nNCType
|
Select Case m_nNCType
|
||||||
Case 0 'Debug
|
Case 0 'Debug
|
||||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Yellow")
|
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
@@ -426,26 +450,137 @@ Public Class CNCommunication
|
|||||||
Try
|
Try
|
||||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_DarkGray")
|
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_DarkGray")
|
||||||
Dim sArg As String = "-start """ & m_sCNSiemensPath & """"
|
Dim sArg As String = "-start """ & m_sCNSiemensPath & """"
|
||||||
|
|
||||||
|
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
||||||
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||||
|
KillSimensCom(m_sCNSiemensHMIPath)
|
||||||
Process.Start(m_sCNSiemensHMIPath, sArg)
|
Process.Start(m_sCNSiemensHMIPath, sArg)
|
||||||
|
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||||
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
|
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||||
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
|
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||||
If m_CN.m_IsSiemensOne Then
|
If m_CN.m_IsSiemensOne Then
|
||||||
' stati bottoni parte 1
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0)
|
|
||||||
' stati bottoni ventose
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.LaserTrac), VarType.TInteger, 1)
|
|
||||||
'stati porte
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.DoorClosed), VarType.TInteger, 2)
|
|
||||||
'
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
|
||||||
' stati bottoni parte 2
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.CBAxes), VarType.TInteger, 4)
|
|
||||||
' ampere e ampere override
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Spindle), VarType.TDouble, 0)
|
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1)
|
|
||||||
|
|
||||||
|
' Leggo tutte le varaibili che sono state caricate nel percorso [NcData] del file *.ini
|
||||||
|
Dim nIndexArrayBool As Integer = 0
|
||||||
|
Dim nIndexArrayInt As Integer = 0
|
||||||
|
Dim nIndexArrayLong As Integer = 0
|
||||||
|
Dim nIndexArrayDoub As Integer = 0
|
||||||
|
Dim nIndexArrayStr As Integer = 0
|
||||||
|
' lista che associa Indice del vettore al nome (per associazioni Bit a Bit)
|
||||||
|
Dim ListIndexToVar As New List(Of IndexArrayToBit)
|
||||||
|
' Creo un vettore che mi permetta di risalire a cosa contiene ogni vettore FLAG (di tipo Enum)
|
||||||
|
For ItemIndex As Integer = 0 To m_CN.m_szCnDataVar.Count - 1
|
||||||
|
' escludo i Flag 'Comm' e 'Refresh'
|
||||||
|
If ItemIndex = CnData.Comm Or ItemIndex = CnData.Refresh Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(m_CN.m_szCnDataVar(ItemIndex)) Then
|
||||||
|
Dim sItem As String() = m_CN.m_szCnDataVar(ItemIndex).Split(","c)
|
||||||
|
Dim nVarType As VarType = VarType.TInteger
|
||||||
|
If sItem.Count > 1 Then
|
||||||
|
If IsNumeric(sItem(0)) Then
|
||||||
|
Select Case CInt(sItem(0))
|
||||||
|
Case 0
|
||||||
|
If nIndexArrayBool > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TBoolean
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayBool)
|
||||||
|
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType)
|
||||||
|
If sItem.Count = 3 Then
|
||||||
|
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||||
|
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||||
|
End If
|
||||||
|
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||||
|
nIndexArrayBool += 1
|
||||||
|
Case 1
|
||||||
|
If nIndexArrayInt > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TInteger
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayInt)
|
||||||
|
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayInt, ItemIndex, nVarType))
|
||||||
|
nIndexArrayInt += 1
|
||||||
|
Case 2
|
||||||
|
If nIndexArrayLong > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TLong
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayLong)
|
||||||
|
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayLong, ItemIndex, nVarType))
|
||||||
|
nIndexArrayLong += 1
|
||||||
|
Case 3
|
||||||
|
If nIndexArrayDoub > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TDouble
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayDoub)
|
||||||
|
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayDoub, ItemIndex, nVarType))
|
||||||
|
nIndexArrayDoub += 1
|
||||||
|
Case 4
|
||||||
|
If nIndexArrayStr > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TString
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayStr)
|
||||||
|
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayStr, ItemIndex, nVarType))
|
||||||
|
nIndexArrayStr += 1
|
||||||
|
Case 5
|
||||||
|
If nIndexArrayInt > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
' verifico se devo riempire un vettore con bit
|
||||||
|
Dim sSubItem As String() = sItem(1).Split("."c)
|
||||||
|
' //My. name. Is Bond._James Bond!
|
||||||
|
Dim sVarName = String.Join(".", sSubItem.Take(sSubItem.Length - 1)) ' //My. name. Is Bond
|
||||||
|
Dim sIndexBit = sSubItem.Last() ' //_James Bond!
|
||||||
|
If sSubItem.Count > 1 And IsNumeric(sIndexBit) Then
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
Dim nIndexArrayInt_1 As Integer = nIndexArrayInt
|
||||||
|
For Each VarSiemens As IndexArrayToBit In ListIndexToVar
|
||||||
|
If VarSiemens.sNameVar.Trim = sVarName.Trim Then
|
||||||
|
nIndexArrayInt_1 = VarSiemens.nIndex
|
||||||
|
bFound = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
nVarType = VarType.TInteger
|
||||||
|
m_CN.DVariables_Read_Subscription(sVarName, nVarType, nIndexArrayInt_1)
|
||||||
|
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit)
|
||||||
|
If sItem.Count = 3 Then
|
||||||
|
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||||
|
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||||
|
End If
|
||||||
|
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||||
|
If Not bFound Then
|
||||||
|
nIndexArrayInt += 1
|
||||||
|
ListIndexToVar.Add(New IndexArrayToBit(nIndexArrayInt_1, sVarName.Trim))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
EgtOutLog(" ATTENZIONE: in [NcData] '" & m_CN.m_szCnDataVar(ItemIndex) & "' non è inidicato il bit associato")
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
If nIndexArrayInt > 14 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
nVarType = VarType.TInteger
|
||||||
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayInt)
|
||||||
|
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayInt, ItemIndex, nVarType))
|
||||||
|
nIndexArrayInt += 1
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
EgtOutLog(" ATTENZIONE: in [NcData] '" & m_CN.m_szCnDataVar(ItemIndex) & "' non è indicato il tipo (0→Bool,1→Int,2→Long,3→Double,4→String,5→Bit)")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Attraverso la funzione "RefreshNoEvents" rileggo i dati caricati
|
||||||
|
|
||||||
|
' Recupero il perocorso delle variabili PLC
|
||||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
||||||
|
|
||||||
ElseIf m_CN.m_IsActiveModeSubscription Then
|
ElseIf m_CN.m_IsActiveModeSubscription Then
|
||||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
||||||
End If
|
End If
|
||||||
@@ -973,6 +1108,68 @@ Public Class CNCommunication
|
|||||||
'Laser = 16384
|
'Laser = 16384
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
#Region "MASCHERA per conttrollo Bit a Bit"
|
||||||
|
<Flags()>
|
||||||
|
Public Enum Mask As Integer
|
||||||
|
bit_Err = -1
|
||||||
|
bit_0 = &H1 ' 1
|
||||||
|
bit_1 = &H2 ' 2
|
||||||
|
bit_2 = &H4 ' 4
|
||||||
|
bit_3 = &H8 ' 8
|
||||||
|
bit_4 = &H10 ' 16
|
||||||
|
bit_5 = &H20 ' 32
|
||||||
|
bit_6 = &H40 ' 64
|
||||||
|
bit_7 = &H80 ' 128
|
||||||
|
bit_8 = &H100 ' 256
|
||||||
|
bit_9 = &H200 ' 512
|
||||||
|
bit_10 = &H400 ' 1024
|
||||||
|
bit_11 = &H800 ' 2048
|
||||||
|
bit_12 = &H1000 ' 4096
|
||||||
|
bit_13 = &H2000 ' 8192
|
||||||
|
bit_14 = &H4000 ' 16384
|
||||||
|
bit_15 = &H8000 ' 32768
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Function GetMaskByBit(IndexBit As Integer) As Mask
|
||||||
|
Dim Bit_ As Mask = Mask.bit_Err
|
||||||
|
Select Case IndexBit
|
||||||
|
Case 0
|
||||||
|
Bit_ = Mask.bit_0
|
||||||
|
Case 1
|
||||||
|
Bit_ = Mask.bit_1
|
||||||
|
Case 2
|
||||||
|
Bit_ = Mask.bit_2
|
||||||
|
Case 3
|
||||||
|
Bit_ = Mask.bit_3
|
||||||
|
Case 4
|
||||||
|
Bit_ = Mask.bit_4
|
||||||
|
Case 5
|
||||||
|
Bit_ = Mask.bit_5
|
||||||
|
Case 6
|
||||||
|
Bit_ = Mask.bit_6
|
||||||
|
Case 7
|
||||||
|
Bit_ = Mask.bit_7
|
||||||
|
Case 8
|
||||||
|
Bit_ = Mask.bit_8
|
||||||
|
Case 9
|
||||||
|
Bit_ = Mask.bit_9
|
||||||
|
Case 10
|
||||||
|
Bit_ = Mask.bit_10
|
||||||
|
Case 11
|
||||||
|
Bit_ = Mask.bit_11
|
||||||
|
Case 12
|
||||||
|
Bit_ = Mask.bit_12
|
||||||
|
Case 13
|
||||||
|
Bit_ = Mask.bit_13
|
||||||
|
Case 14
|
||||||
|
Bit_ = Mask.bit_14
|
||||||
|
Case 15
|
||||||
|
Bit_ = Mask.bit_15
|
||||||
|
End Select
|
||||||
|
Return Bit_
|
||||||
|
End Function
|
||||||
|
#End Region ' Maschera per controllo Bit a Bit
|
||||||
|
|
||||||
Public Function IsSetAll(value As Integer, flag As Integer) As Boolean
|
Public Function IsSetAll(value As Integer, flag As Integer) As Boolean
|
||||||
' somma Bit a Bit
|
' somma Bit a Bit
|
||||||
Return ((value And flag) = flag)
|
Return ((value And flag) = flag)
|
||||||
@@ -988,23 +1185,23 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
m_MachineStatus.DisplaySpeed()
|
m_MachineStatus.DisplaySpeed()
|
||||||
|
|
||||||
m_MachineStatus.DisplayPower()
|
'm_MachineStatus.DisplayPower()
|
||||||
|
|
||||||
m_MachineStatus.DisplayVar()
|
m_MachineStatus.DisplayVar()
|
||||||
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
|
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
|
||||||
|
|
||||||
If m_nCountRefresh > 10 Then
|
'If m_nCountRefresh > 10 Then
|
||||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
' Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
' 'EgtOutLog("Machine status: " & TempCurrMode)
|
||||||
If TempCurrMode <> m_nCurrMode Then
|
' If TempCurrMode <> m_nCurrMode Then
|
||||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
' 'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||||
m_nCurrMode = CInt(TempCurrMode)
|
' m_nCurrMode = CInt(TempCurrMode)
|
||||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
' m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||||
End If
|
' End If
|
||||||
m_nCountRefresh = 0
|
' m_nCountRefresh = 0
|
||||||
Else
|
'Else
|
||||||
m_nCountRefresh = m_nCountRefresh + 1
|
' m_nCountRefresh = m_nCountRefresh + 1
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If m_CN.b_NC_error Then
|
If m_CN.b_NC_error Then
|
||||||
ErrorList.Clear()
|
ErrorList.Clear()
|
||||||
@@ -1021,61 +1218,176 @@ Public Class CNCommunication
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' lettura delle variabili abbonate
|
||||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||||
|
|
||||||
' lettura variabili stati mancanti su Siemens
|
'------------ SINUMERIK ONE ----------------------------------------------
|
||||||
Dim nVarValue As Integer = m_CN.n_data(0)
|
For IndxLst As Integer = 0 To ListReferenceIndex.Count - 1
|
||||||
EgtOutLog("Variabile PLC control addr: " & 1 & " value: " & nVarValue)
|
Dim nType As Integer = ListReferenceIndex(IndxLst).TypeArray
|
||||||
m_CN.bSpindleState = IsSetAll(nVarValue, ControlStates.Spindle)
|
Dim nFlag As Integer = ListReferenceIndex(IndxLst).FlagIndex
|
||||||
m_CN.bLaserTracState = IsSetAll(nVarValue, ControlStates.LaserTrac)
|
Dim nIndex As Integer = ListReferenceIndex(IndxLst).SiemnesArrayIndex
|
||||||
m_CN.bCoolantState = IsSetAll(nVarValue, ControlStates.Coolant)
|
Dim nIndexBit As Integer = ListReferenceIndex(IndxLst).IndexBit
|
||||||
m_CN.bInternalCoolantState = IsSetAll(nVarValue, ControlStates.InternalCoolant)
|
Dim sDefaultValue As String = ListReferenceIndex(IndxLst).DefaultValue
|
||||||
m_CN.bExternCoolantState = IsSetAll(nVarValue, ControlStates.ExternCoolant)
|
Dim b_temp As Boolean = False
|
||||||
m_CN.bCBAxesState = IsSetAll(nVarValue, ControlStates.CAxis)
|
Dim n_temp As Integer = 0
|
||||||
m_CN.bAirBlowState = IsSetAll(nVarValue, ControlStates.AirBlow)
|
Dim l_temp As Long = 0.0
|
||||||
m_CN.bHomeState = IsSetAll(nVarValue, ControlStates.Home)
|
Dim d_temp As Double = 0.0
|
||||||
m_CN.bTableUpState = IsSetAll(nVarValue, ControlStates.TableUp)
|
' leggo il valore caricato
|
||||||
m_CN.bTableDownState = IsSetAll(nVarValue, ControlStates.TableDown)
|
Select Case nType
|
||||||
m_CN.bLimitZState = IsSetAll(nVarValue, ControlStates.LimitZ)
|
Case VarType.TBoolean
|
||||||
m_CN.b5AxesState = IsSetAll(nVarValue, ControlStates.Axis5)
|
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||||
|
' ver 2.6i1
|
||||||
|
Try
|
||||||
|
b_temp = CBool(sDefaultValue)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Default boolean value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||||
|
b_temp = m_CN.b_data(nIndex)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
b_temp = m_CN.b_data(nIndex)
|
||||||
|
End If
|
||||||
|
Case VarType.TInteger
|
||||||
|
n_temp = m_CN.n_data(nIndex)
|
||||||
|
' VENTOSE: lettura dato da intero Bit a Bit (ver_2.6h1), ritorno un Boolean
|
||||||
|
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||||
|
' ver 2.6i1
|
||||||
|
Try
|
||||||
|
b_temp = CBool(sDefaultValue)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Default bit value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||||
|
b_temp = ReadBit(nIndexBit, n_temp)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
b_temp = ReadBit(nIndexBit, n_temp)
|
||||||
|
End If
|
||||||
|
Case VarType.TLong
|
||||||
|
l_temp = m_CN.l_data(nIndex)
|
||||||
|
Case VarType.TDouble
|
||||||
|
d_temp = m_CN.d_data(nIndex)
|
||||||
|
Case VarType.TString
|
||||||
|
'b_temp = If(m_CN.d_data(nIndex) = 0, True, False)
|
||||||
|
End Select
|
||||||
|
|
||||||
nVarValue = m_CN.n_data(1)
|
Select Case nFlag
|
||||||
'EgtOutLog("Variabile PLC vacuum addr: " & m_CN.m_szCnDataVar(CN_generico.CnData.LaserTrac) & " value: " & nVarValue)
|
Case CN_generico.CnData.Mode ' (0) Stato modo attivo
|
||||||
m_CN.bVacuumUp = IsSetAll(nVarValue, VacuumStates.VacuumUp)
|
m_CN.n_index_mode = nIndex
|
||||||
m_CN.bVacuumDown = IsSetAll(nVarValue, VacuumStates.VacuumDown)
|
If m_nCountRefresh > 10 Then
|
||||||
m_CN.bVacuum2Up = IsSetAll(nVarValue, VacuumStates.Vacuum2Up)
|
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||||
m_CN.bVacuum2Down = IsSetAll(nVarValue, VacuumStates.Vacuum2Down)
|
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||||
m_CN.bVacuum1State = IsSetAll(nVarValue, VacuumStates.Vacuum1State)
|
If TempCurrMode <> m_nCurrMode Then
|
||||||
m_CN.bVacuum2State = IsSetAll(nVarValue, VacuumStates.Vacuum2State)
|
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||||
m_CN.bVacuum3State = IsSetAll(nVarValue, VacuumStates.Vacuum3State)
|
m_nCurrMode = CInt(TempCurrMode)
|
||||||
m_CN.bVacuum4State = IsSetAll(nVarValue, VacuumStates.Vacuum4State)
|
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||||
m_CN.bVacuum5State = IsSetAll(nVarValue, VacuumStates.Vacuum5State)
|
m_CN.nMachineMode = m_nCurrMode
|
||||||
m_CN.bVacuum6State = IsSetAll(nVarValue, VacuumStates.Vacuum6State)
|
End If
|
||||||
m_CN.bOpenAllState = (m_CN.bVacuum1State And m_CN.bVacuum2State And m_CN.bVacuum3State And m_CN.bVacuum4State And m_CN.bVacuum5State And m_CN.bVacuum6State)
|
m_nCountRefresh = 0
|
||||||
m_CN.bCloseAllState = (Not m_CN.bVacuum1State And Not m_CN.bVacuum2State And Not m_CN.bVacuum3State And Not m_CN.bVacuum4State And Not m_CN.bVacuum5State And Not m_CN.bVacuum6State)
|
Else
|
||||||
m_CN.bOpen123State = (m_CN.bVacuum1State And m_CN.bVacuum2State And m_CN.bVacuum3State)
|
m_nCountRefresh = m_nCountRefresh + 1
|
||||||
m_CN.bOpen456State = (m_CN.bVacuum4State And m_CN.bVacuum5State And m_CN.bVacuum6State)
|
End If
|
||||||
m_CN.bClose123State = (Not m_CN.bVacuum1State And Not m_CN.bVacuum2State And Not m_CN.bVacuum3State)
|
Case CN_generico.CnData.Power
|
||||||
m_CN.bClose456State = (Not m_CN.bVacuum4State And Not m_CN.bVacuum5State And Not m_CN.bVacuum6State)
|
m_CN.d_spindle_power = d_temp
|
||||||
m_CN.bBlowState = IsSetAll(nVarValue, VacuumStates.AirBlow)
|
Case CN_generico.CnData.Spindle ' (7) Stato rotazione mandrino
|
||||||
m_CN.bVacuumOn = IsSetAll(nVarValue, VacuumStates.VacuumOn)
|
m_CN.bSpindleState = b_temp
|
||||||
m_CN.bVacuumOff = IsSetAll(nVarValue, VacuumStates.VacuumOff)
|
Case CN_generico.CnData.Coolant ' (8) Stato acqua
|
||||||
m_CN.bBypassState = IsSetAll(nVarValue, VacuumStates.BypassState)
|
m_CN.bCoolantState = b_temp
|
||||||
|
Case CN_generico.CnData.Laser ' (9) Stato laser punto
|
||||||
|
m_CN.bLaserState = b_temp
|
||||||
|
Case CN_generico.CnData.PowerOvr ' (10) Amperaggio
|
||||||
|
m_CN.bPowerOvr = d_temp
|
||||||
|
Case CN_generico.CnData.InternalCoolant ' (13) Stato acqua interna
|
||||||
|
m_CN.bInternalCoolantState = b_temp
|
||||||
|
Case CN_generico.CnData.ExternCoolant ' (14) Stato acqua esterna
|
||||||
|
m_CN.bExternCoolantState = b_temp
|
||||||
|
Case CN_generico.CnData.CBAxes ' (15) Stato ativazione assi c e b
|
||||||
|
m_CN.bCBAxesState = b_temp
|
||||||
|
Case CN_generico.CnData.AirBlow ' (16) Stato soffio utensile
|
||||||
|
m_CN.bAirBlowState = b_temp
|
||||||
|
Case CN_generico.CnData.Home ' (17) Stato home
|
||||||
|
m_CN.bHomeState = b_temp
|
||||||
|
Case CN_generico.CnData.TableUp ' (18) Stato tavolo su
|
||||||
|
m_CN.bTableUpState = b_temp
|
||||||
|
Case CN_generico.CnData.TableDown ' (19) Stato tavolo giu'
|
||||||
|
m_CN.bTableDownState = b_temp
|
||||||
|
Case CN_generico.CnData.DoorClosed ' (20) Stato porte
|
||||||
|
m_CN.nDoorClosedState = n_temp
|
||||||
|
Case CN_generico.CnData.LimitZ ' (21) Stato limitazione asse Z
|
||||||
|
m_CN.bLimitZState = b_temp
|
||||||
|
Case CN_generico.CnData.VacuumUp ' (22) Stato ventosa su'
|
||||||
|
m_CN.bVacuumUp = b_temp
|
||||||
|
Case CN_generico.CnData.VacuumDown ' (23) Stato ventosa giu'
|
||||||
|
m_CN.bVacuumDown = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum2Up ' (24) Stato ventosa2 su'
|
||||||
|
m_CN.bVacuum2Up = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum2Down ' (25) Stato ventosa2 giu'
|
||||||
|
m_CN.bVacuum2Down = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum1State ' (26) Stato ventosa 1
|
||||||
|
m_CN.bVacuum1State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum2State ' (27) Stato ventosa 2
|
||||||
|
m_CN.bVacuum2State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum3State ' (28) Stato ventosa 3
|
||||||
|
m_CN.bVacuum3State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum4State ' (29) Stato ventosa 4
|
||||||
|
m_CN.bVacuum4State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum5State ' (30) Stato ventosa 5
|
||||||
|
m_CN.bVacuum5State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum6State ' (31) Stato ventosa 6
|
||||||
|
m_CN.bVacuum6State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum135State ' (32) Stato ventose 135
|
||||||
|
m_CN.bVacuum135State = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum246State ' (33) Stato ventose 246
|
||||||
|
m_CN.bVacuum246State = b_temp
|
||||||
|
Case CN_generico.CnData.OpenAllState ' (34) Stato apertura ventose
|
||||||
|
m_CN.bOpenAllState = b_temp
|
||||||
|
Case CN_generico.CnData.CloseAllState ' (35) Stato chiusura ventose
|
||||||
|
m_CN.bCloseAllState = b_temp
|
||||||
|
Case CN_generico.CnData.Open123State ' (36) Stato apertura ventose
|
||||||
|
m_CN.bOpen123State = b_temp
|
||||||
|
Case CN_generico.CnData.Open456State ' (37) Stato apertura ventose
|
||||||
|
m_CN.bOpen456State = b_temp
|
||||||
|
Case CN_generico.CnData.Close123State ' (38) Stato chiusura ventose
|
||||||
|
m_CN.bClose123State = b_temp
|
||||||
|
Case CN_generico.CnData.Close456State ' (39) Stato chiusura ventose
|
||||||
|
m_CN.bClose456State = b_temp
|
||||||
|
Case CN_generico.CnData.BlowState ' (40) Stato soffio ventose
|
||||||
|
m_CN.bBlowState = b_temp
|
||||||
|
Case CN_generico.CnData.VacuumOn ' (41) Stato aspirazione ventose acceso
|
||||||
|
m_CN.bVacuumOn = b_temp
|
||||||
|
Case CN_generico.CnData.BypassState ' (42) Stato bypass
|
||||||
|
m_CN.bBypassState = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum0 ' (43) Stato rotazione ventosa 0
|
||||||
|
m_CN.bVacuum0 = b_temp
|
||||||
|
Case CN_generico.CnData.Vacuum90 ' (44) Stato rotazione ventosa 0
|
||||||
|
m_CN.bVacuum90 = b_temp
|
||||||
|
Case CN_generico.CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||||
|
m_CN.bVacuumOff = b_temp
|
||||||
|
Case CN_generico.CnData.LaserTrac ' (46) Stato laser tracciatura
|
||||||
|
m_CN.bLaserTracState = b_temp
|
||||||
|
Case CN_generico.CnData.XYJog ' (47)
|
||||||
|
m_CN.bXYJog = b_temp
|
||||||
|
Case CN_generico.CnData.ZCJog ' (48)
|
||||||
|
m_CN.bZCJog = b_temp
|
||||||
|
Case CN_generico.CnData.ZBJog ' (49)
|
||||||
|
m_CN.bZBCJog = b_temp
|
||||||
|
Case CN_generico.CnData.PowerON ' (50)
|
||||||
|
m_CN.bPowerON = b_temp
|
||||||
|
Case CN_generico.CnData.Remote ' (51)
|
||||||
|
m_CN.bRemote = b_temp
|
||||||
|
Case CN_generico.CnData.Parking ' (52)
|
||||||
|
m_CN.bParkingState = b_temp
|
||||||
|
Case CN_generico.CnData.nAxes ' (55)
|
||||||
|
m_CN.n_index_is_G24_active = nIndex
|
||||||
|
m_CN.b5AxesState = b_temp
|
||||||
|
Case CN_generico.CnData.ResetStatus ' (56)
|
||||||
|
m_CN.bResetState = b_temp
|
||||||
|
|
||||||
nVarValue = m_CN.n_data(2)
|
End Select
|
||||||
'EgtOutLog("Variabile PLC door addr: " & m_CN.m_szCnDataVar(CN_generico.CnData.DoorClosed) & " value: " & nVarValue)
|
Next
|
||||||
m_CN.nDoorClosedState = nVarValue
|
'------------ SINUMERIK ONE ----------------------------------------------
|
||||||
|
|
||||||
nVarValue = m_CN.n_data(4)
|
|
||||||
'EgtOutLog("Variabile PLC control 2 addr: " & 3 & " value: " & nVarValue)
|
|
||||||
m_CN.bLaserState = IsSetAll(nVarValue, ControlStates2.Laser)
|
|
||||||
m_CN.bHsm = IsSetAll(nVarValue, ControlStates2.Hsm)
|
|
||||||
m_CN.bResetState = IsSetAll(nVarValue, ControlStates2.ResetState)
|
|
||||||
m_CN.bFeedHold = IsSetAll(nVarValue, ControlStates2.FeedHold)
|
|
||||||
m_CN.bSpeedHold = IsSetAll(nVarValue, ControlStates2.SpindleHold)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
m_MachineStatus.DisplayPower()
|
||||||
|
|
||||||
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
||||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
||||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||||
@@ -1125,6 +1437,7 @@ Public Class CNCommunication
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState)
|
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState)
|
||||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
||||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserTracStateChanged(m_CN.bLaserTracState)
|
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserTracStateChanged(m_CN.bLaserTracState)
|
||||||
|
' modalità vecchia
|
||||||
If m_CN.Is_G24_active() Then
|
If m_CN.Is_G24_active() Then
|
||||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(False)
|
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(False)
|
||||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(True)
|
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(True)
|
||||||
@@ -1153,8 +1466,25 @@ Public Class CNCommunication
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||||
|
If m_IsNewConsole Then
|
||||||
|
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||||
|
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||||
|
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||||
|
End If
|
||||||
|
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ReadBit(IndexBit As Integer, Val As Integer) As Boolean
|
||||||
|
If IndexBit < 0 Then Return False
|
||||||
|
Dim _mask = GetMaskByBit(IndexBit)
|
||||||
|
If _mask = Mask.bit_Err Then Return False
|
||||||
|
If (Val And _mask) = 0 Then Return False
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function SetProgramMainOrSub(bMain As Boolean) As Boolean
|
Friend Function SetProgramMainOrSub(bMain As Boolean) As Boolean
|
||||||
Return m_CN.SetProgramMainOrSub(bMain)
|
Return m_CN.SetProgramMainOrSub(bMain)
|
||||||
End Function
|
End Function
|
||||||
@@ -1162,6 +1492,11 @@ Public Class CNCommunication
|
|||||||
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
|
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
|
||||||
Optional bActivate As Boolean = True) As Boolean
|
Optional bActivate As Boolean = True) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
|
||||||
|
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||||
|
' m_nNCType = 2
|
||||||
|
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
' Download programma
|
' Download programma
|
||||||
If m_MainWindow.m_bNCLink Then
|
If m_MainWindow.m_bNCLink Then
|
||||||
bOk = (m_nNCType > 0)
|
bOk = (m_nNCType > 0)
|
||||||
@@ -1195,7 +1530,7 @@ Public Class CNCommunication
|
|||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
End If
|
End If
|
||||||
EgtOutLog("Download_NC_prog(sCncPath, sNumProg)")
|
EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")")
|
||||||
' -------------- START DOWNLOAD --------------
|
' -------------- START DOWNLOAD --------------
|
||||||
TimeSpanInit()
|
TimeSpanInit()
|
||||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||||
@@ -1236,7 +1571,7 @@ Public Class CNCommunication
|
|||||||
' Se richiesta attivazione
|
' Se richiesta attivazione
|
||||||
If bActivate Then
|
If bActivate Then
|
||||||
' Attivazione programma
|
' Attivazione programma
|
||||||
EgtOutLog("ActivateProgram(nNumProg)")
|
EgtOutLog("ActivateProgram(" & nNumProg.ToString & ")")
|
||||||
TimeSpanInit()
|
TimeSpanInit()
|
||||||
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
||||||
EgtOutLog(TimeSpanEnd())
|
EgtOutLog(TimeSpanEnd())
|
||||||
@@ -1366,3 +1701,95 @@ Public Class CNCommunication
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Class RefereceFlagSimens
|
||||||
|
|
||||||
|
Private m_SiemnesArrayIndex As Integer
|
||||||
|
Private m_FlagIndex As Integer
|
||||||
|
Private m_TypeArray As Integer
|
||||||
|
' Opzionale
|
||||||
|
Private m_IndexBit As Integer = -1
|
||||||
|
Private m_DefaultValue As String = ""
|
||||||
|
|
||||||
|
Public Property SiemnesArrayIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_SiemnesArrayIndex
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SiemnesArrayIndex = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FlagIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_FlagIndex
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_FlagIndex = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property TypeArray As Integer
|
||||||
|
Get
|
||||||
|
Return m_TypeArray
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_TypeArray = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property IndexBit As String
|
||||||
|
Get
|
||||||
|
Return m_IndexBit
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_IndexBit = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DefaultValue As String
|
||||||
|
Get
|
||||||
|
Return m_DefaultValue
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_DefaultValue = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(IndArray As Integer, Flag As Integer, nType As Integer)
|
||||||
|
m_SiemnesArrayIndex = IndArray
|
||||||
|
m_FlagIndex = Flag
|
||||||
|
m_TypeArray = nType
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(IndArray As Integer, Flag As Integer, nType As Integer, nIndBit As Integer)
|
||||||
|
m_SiemnesArrayIndex = IndArray
|
||||||
|
m_FlagIndex = Flag
|
||||||
|
m_TypeArray = nType
|
||||||
|
m_IndexBit = nIndBit
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class IndexArrayToBit
|
||||||
|
|
||||||
|
Private m_nIndex As Integer = 0
|
||||||
|
Public ReadOnly Property nIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sNameVar As String = ""
|
||||||
|
Public ReadOnly Property sNameVar As String
|
||||||
|
Get
|
||||||
|
Return m_sNameVar
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Index As Integer, NameVar As String)
|
||||||
|
m_nIndex = Index
|
||||||
|
m_sNameVar = NameVar
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -87,6 +87,7 @@ Public Class CN_Siemens
|
|||||||
Case 8 ' Modalita Ref Point
|
Case 8 ' Modalita Ref Point
|
||||||
sDBVarPath &= "REF_POINT"
|
sDBVarPath &= "REF_POINT"
|
||||||
End Select
|
End Select
|
||||||
|
' /plc/"OmagCUT_DB".CTRL.AUTO
|
||||||
DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "")
|
DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "")
|
||||||
Return 0
|
Return 0
|
||||||
Else
|
Else
|
||||||
@@ -132,7 +133,7 @@ Public Class CN_Siemens
|
|||||||
Public Overrides Function read_active_mode() As Short
|
Public Overrides Function read_active_mode() As Short
|
||||||
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
|
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
|
||||||
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||||
Select Case n_data(3)
|
Select Case n_data(n_index_mode)
|
||||||
Case 1
|
Case 1
|
||||||
Return 0
|
Return 0
|
||||||
Case 2
|
Case 2
|
||||||
@@ -152,7 +153,12 @@ Public Class CN_Siemens
|
|||||||
|
|
||||||
Public Overrides Function Is_G24_active() As Boolean
|
Public Overrides Function Is_G24_active() As Boolean
|
||||||
|
|
||||||
Return M_MMFiles.SiemensRet.b_interf_G24
|
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||||
|
Return b_data(n_index_is_G24_active)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Return M_MMFiles.SiemensRet.b_interf_G24
|
||||||
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -217,12 +223,12 @@ Public Class CN_Siemens
|
|||||||
Public Overrides Sub DVariables_WriteVariables3(VarAddr As String, ParType As Short, nVarValue As Integer, lVarValue As Long, dVarValue As Double, sVarValue As String)
|
Public Overrides Sub DVariables_WriteVariables3(VarAddr As String, ParType As Short, nVarValue As Integer, lVarValue As Long, dVarValue As Double, sVarValue As String)
|
||||||
Dim n_ret As Short = Write_var(VarAddr, ParType, nVarValue, lVarValue, dVarValue, sVarValue)
|
Dim n_ret As Short = Write_var(VarAddr, ParType, nVarValue, lVarValue, dVarValue, sVarValue)
|
||||||
'EgtOutLog("CN SIEMENS Dopo scrittura variabile")
|
'EgtOutLog("CN SIEMENS Dopo scrittura variabile")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub DVariables_Read_Subscription(VarAddr As String, ParType As Short, Index As Integer)
|
Public Overrides Sub DVariables_Read_Subscription(VarAddr As String, ParType As Short, Index As Integer)
|
||||||
|
' Ricevo il percorso della varibile, il tipo
|
||||||
Dim n_ret As Short = Read_subscription(VarAddr, ParType, Index)
|
Dim n_ret As Short = Read_subscription(VarAddr, ParType, Index)
|
||||||
'EgtOutLog("CN SIEMENS Dopo lettura abbonamento")
|
EgtOutLog(" ABBONAMENTO (Esito: " & n_ret.ToString & ") -> Address: " & VarAddr & ", Type: " & ParType.ToString & ", Index: " & Index.ToString)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
|||||||
Public Const MAX_VAR As Short = 100
|
Public Const MAX_VAR As Short = 100
|
||||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||||
Public Const MAX_TOOLS As Short = 100
|
Public Const MAX_TOOLS As Short = 100
|
||||||
Public Const NUM_DATA = 56 ' Numero di dati del CN (Speed,Feed,...)
|
Public Const NUM_DATA = 57 ' Numero di dati del CN (Speed,Feed,...)
|
||||||
|
|
||||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||||
|
|
||||||
@@ -72,6 +72,8 @@ Public MustInherit Class CN_generico
|
|||||||
EnablePC = 54
|
EnablePC = 54
|
||||||
|
|
||||||
nAxes = 55
|
nAxes = 55
|
||||||
|
|
||||||
|
ResetStatus = 56
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Public Enum Type As Short
|
Public Enum Type As Short
|
||||||
@@ -138,6 +140,9 @@ Public MustInherit Class CN_generico
|
|||||||
Public d_param1 As Double
|
Public d_param1 As Double
|
||||||
Public sz_string As String ' ( MAX 200 caratteri )
|
Public sz_string As String ' ( MAX 200 caratteri )
|
||||||
|
|
||||||
|
' Indice del vettore n_data associato alla lettura nMode
|
||||||
|
Public n_index_mode As Integer = 0
|
||||||
|
Public n_index_is_G24_active As Integer = 0
|
||||||
Public b_data(14) As Boolean
|
Public b_data(14) As Boolean
|
||||||
Public n_data(14) As Int16
|
Public n_data(14) As Int16
|
||||||
Public l_data(14) As Long
|
Public l_data(14) As Long
|
||||||
|
|||||||
@@ -1683,7 +1683,16 @@ Module M_Fanuc
|
|||||||
sz_Err_Msg = ""
|
sz_Err_Msg = ""
|
||||||
If Not bSimulation Then
|
If Not bSimulation Then
|
||||||
|
|
||||||
sz_MDI_program = sz_MDI_command
|
' Nicola: 10/05/2024
|
||||||
|
|
||||||
|
Dim sItems As String() = sz_MDI_command.Split(";")
|
||||||
|
Dim sNew_MDI_program As String = ""
|
||||||
|
For Each sItem As String In sItems
|
||||||
|
sNew_MDI_program &= sItem & vbLf
|
||||||
|
Next
|
||||||
|
sNew_MDI_program &= "%"
|
||||||
|
|
||||||
|
sz_MDI_program = sNew_MDI_program
|
||||||
|
|
||||||
' Nicola: 29/03/2023
|
' Nicola: 29/03/2023
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ Module M_MMFiles
|
|||||||
|
|
||||||
#Region " Structures"
|
#Region " Structures"
|
||||||
|
|
||||||
|
' Struttura per spedire un "comando" al Siemens
|
||||||
<StructLayout(LayoutKind.Sequential)> _
|
<StructLayout(LayoutKind.Sequential)>
|
||||||
Structure SiemensSendStruct
|
Structure SiemensSendStruct
|
||||||
|
|
||||||
Public n_Flag As Integer
|
Public n_Flag As Integer
|
||||||
@@ -46,7 +46,7 @@ Module M_MMFiles
|
|||||||
|
|
||||||
Private SiemensSend As SiemensSendStruct
|
Private SiemensSend As SiemensSendStruct
|
||||||
|
|
||||||
|
' Struttura per leggere l'esito di un "comando" al Siemens
|
||||||
<StructLayout(LayoutKind.Sequential)> _
|
<StructLayout(LayoutKind.Sequential)> _
|
||||||
Structure SiemensRetStruct
|
Structure SiemensRetStruct
|
||||||
|
|
||||||
@@ -75,6 +75,7 @@ Module M_MMFiles
|
|||||||
Public b_is_laser_ON As Boolean
|
Public b_is_laser_ON As Boolean
|
||||||
Public b_is_spindle_ON As Boolean
|
Public b_is_spindle_ON As Boolean
|
||||||
|
|
||||||
|
' Vettore assi macchina (file SiemensComm: axes_0_M, axes_0_P)
|
||||||
<MarshalAs(UnmanagedType.ByValArray, ArraySubType:=UnmanagedType.R8, SizeConst:=16)> _
|
<MarshalAs(UnmanagedType.ByValArray, ArraySubType:=UnmanagedType.R8, SizeConst:=16)> _
|
||||||
Public d_interf_axis_position() As Double
|
Public d_interf_axis_position() As Double
|
||||||
|
|
||||||
@@ -176,7 +177,7 @@ Module M_MMFiles
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " Commands constants"
|
#Region " Commands constants"
|
||||||
|
' Elenco codici comandi per spedire programma a SiemensComm.exe
|
||||||
Enum CMD As Short
|
Enum CMD As Short
|
||||||
|
|
||||||
CMD_Download_NC_prog = 1
|
CMD_Download_NC_prog = 1
|
||||||
@@ -205,6 +206,7 @@ Module M_MMFiles
|
|||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Friend Enum VarType As Short
|
Friend Enum VarType As Short
|
||||||
|
TBoolean = 0
|
||||||
TInteger = 1
|
TInteger = 1
|
||||||
TLong = 2
|
TLong = 2
|
||||||
TDouble = 3
|
TDouble = 3
|
||||||
@@ -343,6 +345,9 @@ Module M_MMFiles
|
|||||||
Function ActivateProgram(ByVal sz_part_program As String) As Short
|
Function ActivateProgram(ByVal sz_part_program As String) As Short
|
||||||
'EgtOutLog("ActivateProgram start dell'm_mmFiles")
|
'EgtOutLog("ActivateProgram start dell'm_mmFiles")
|
||||||
|
|
||||||
|
EgtOutLog("Flag di comando: " & CMD.CMD_ActivateProgram.ToString)
|
||||||
|
EgtOutLog("Stringa di comando: " & sz_part_program.ToString)
|
||||||
|
|
||||||
SiemensSend.n_Command = CMD.CMD_ActivateProgram
|
SiemensSend.n_Command = CMD.CMD_ActivateProgram
|
||||||
SiemensSend.sz_string = sz_part_program
|
SiemensSend.sz_string = sz_part_program
|
||||||
|
|
||||||
@@ -370,7 +375,8 @@ Module M_MMFiles
|
|||||||
SiemensSend.n_Command = CMD.CMD_CycleStart
|
SiemensSend.n_Command = CMD.CMD_CycleStart
|
||||||
|
|
||||||
execute_command()
|
execute_command()
|
||||||
'EgtOutLog("CycleStart end dell'm_mmFiles")
|
' Rimango in attesa
|
||||||
|
EgtOutLog(" → CycleStart")
|
||||||
Return SiemensRet.n_result
|
Return SiemensRet.n_result
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -597,16 +603,15 @@ Module M_MMFiles
|
|||||||
'EgtOutLog("Write_Nc_var start dell'm_mmFiles")
|
'EgtOutLog("Write_Nc_var start dell'm_mmFiles")
|
||||||
SiemensSend.n_Command = CMD.CMD_Read_NC_subscription
|
SiemensSend.n_Command = CMD.CMD_Read_NC_subscription
|
||||||
SiemensSend.sz_string_2 = VarAddr ' indirizzo su CN dell' oggetto da scrivere
|
SiemensSend.sz_string_2 = VarAddr ' indirizzo su CN dell' oggetto da scrivere
|
||||||
|
EgtOutLog(" → Sottoscrivo lettura di '" & VarAddr & "'")
|
||||||
SiemensSend.n_param1 = Index ' tipo di dato da scrivere
|
SiemensSend.n_param1 = Index ' tipo di dato da scrivere
|
||||||
|
EgtOutLog(" Indice del vettore associato '" & Index & "'")
|
||||||
SiemensSend.n_param2 = ParType ' tipo di dato da scrivere
|
SiemensSend.n_param2 = ParType ' tipo di dato da scrivere
|
||||||
|
EgtOutLog(" Indice tipo di variabile '" & ParType & "'")
|
||||||
execute_command()
|
execute_command()
|
||||||
m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message = SiemensRet.sz_interf_error_message
|
m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message = SiemensRet.sz_interf_error_message
|
||||||
|
EgtOutLog(" sz_interf_error_message: " & m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message)
|
||||||
EgtOutLog("sz_interf_error_message: " & m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message)
|
EgtOutLog(" n_result: " & SiemensRet.n_result)
|
||||||
EgtOutLog("n_result: " & SiemensRet.n_result)
|
|
||||||
Return SiemensRet.n_result
|
Return SiemensRet.n_result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -765,7 +770,7 @@ Module M_MMFiles
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' copio variabili in abbonamento
|
' copio variabili in abbonamento
|
||||||
For Index As Integer = 0 To 5
|
For Index As Integer = 0 To 14
|
||||||
CurrCN.b_data(Index) = SiemensRet.b_data(Index)
|
CurrCN.b_data(Index) = SiemensRet.b_data(Index)
|
||||||
CurrCN.n_data(Index) = SiemensRet.n_data(Index)
|
CurrCN.n_data(Index) = SiemensRet.n_data(Index)
|
||||||
CurrCN.l_data(Index) = SiemensRet.l_data(Index)
|
CurrCN.l_data(Index) = SiemensRet.l_data(Index)
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ Namespace Num
|
|||||||
|
|
||||||
' Stringhe valide : "COM" o "XIP01, 0, 10, 0, 0, 0"
|
' Stringhe valide : "COM" o "XIP01, 0, 10, 0, 0, 0"
|
||||||
Dim nret As Integer = NC_connect(m_szCnDataVar(CnData.Comm))
|
Dim nret As Integer = NC_connect(m_szCnDataVar(CnData.Comm))
|
||||||
|
EgtOutLog(" → Risultatao apertura connessiione: " & nret)
|
||||||
If nret <> 0 Then Return False
|
If nret <> 0 Then Return False
|
||||||
|
|
||||||
n_state = 2
|
n_state = 2
|
||||||
@@ -583,7 +584,6 @@ Namespace Num
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function Read_machine_pos() As Int16
|
Function Read_machine_pos() As Int16
|
||||||
|
|
||||||
Dim nret As Int16
|
Dim nret As Int16
|
||||||
Dim i, n As Integer
|
Dim i, n As Integer
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,9 @@
|
|||||||
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
||||||
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="CadCuts\ChooseTestToolWD.xaml.vb">
|
||||||
|
<DependentUpon>ChooseTestToolWD.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
||||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -444,6 +447,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="CadCuts\ChooseTestToolWD.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -1368,6 +1375,16 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\NewIcons\Move-Spot-Reg.png" />
|
<Resource Include="Resources\NewIcons\Move-Spot-Reg.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewIcons\Logo-Egalware %282%29.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewIcons\Logo-Egalware %283%29.png" />
|
||||||
|
<Resource Include="Resources\NewIcons\RawHeight.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
<BitmapImage x:Key="PhotoImg" UriSource="Resources/NewIcons/icone-tagli-1.png"></BitmapImage>
|
<BitmapImage x:Key="PhotoImg" UriSource="Resources/NewIcons/icone-tagli-1.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RawPartImg" UriSource="Resources/NewIcons/icone-tagli-5.png"></BitmapImage>
|
<BitmapImage x:Key="RawPartImg" UriSource="Resources/NewIcons/icone-tagli-5.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RawProbeImg" UriSource="Resources/NewIcons/RawProbe.png"></BitmapImage>
|
<BitmapImage x:Key="RawProbeImg" UriSource="Resources/NewIcons/RawProbe.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="RawHeightImg" UriSource="Resources/NewIcons/RawHeight.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RightArrowImg" UriSource="Resources/NewIcons/RightArrow.png"></BitmapImage>
|
<BitmapImage x:Key="RightArrowImg" UriSource="Resources/NewIcons/RightArrow.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SawProbeImg" UriSource="Resources/NewIcons/SawProbe.png"></BitmapImage>
|
<BitmapImage x:Key="SawProbeImg" UriSource="Resources/NewIcons/SawProbe.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SendImg" UriSource="Resources/NewIcons/Send.png"></BitmapImage>
|
<BitmapImage x:Key="SendImg" UriSource="Resources/NewIcons/Send.png"></BitmapImage>
|
||||||
@@ -237,7 +238,10 @@
|
|||||||
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="Foreground" Value="White"/>
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
<Setter Property="IsEnabled" Value="False"/>
|
<Setter Property="IsEnabled" Value="False"/>
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||||
|
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OmagCut_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="OmagCut_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
|||||||
@@ -133,6 +133,7 @@
|
|||||||
<BitmapImage x:Key="PhotoImg" UriSource="Resources/Photo.png"></BitmapImage>
|
<BitmapImage x:Key="PhotoImg" UriSource="Resources/Photo.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RawPartImg" UriSource="Resources/RawPart.png"></BitmapImage>
|
<BitmapImage x:Key="RawPartImg" UriSource="Resources/RawPart.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RawProbeImg" UriSource="Resources/RawProbe.png"></BitmapImage>
|
<BitmapImage x:Key="RawProbeImg" UriSource="Resources/RawProbe.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="RawHeightImg" UriSource="Resources/NewIcons/RawHeight.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="RightArrowImg" UriSource="Resources/RightArrow.png"></BitmapImage>
|
<BitmapImage x:Key="RightArrowImg" UriSource="Resources/RightArrow.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SawProbeImg" UriSource="Resources/SawProbe.png"></BitmapImage>
|
<BitmapImage x:Key="SawProbeImg" UriSource="Resources/SawProbe.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SendImg" UriSource="Resources/Send.png"></BitmapImage>
|
<BitmapImage x:Key="SendImg" UriSource="Resources/Send.png"></BitmapImage>
|
||||||
@@ -794,7 +795,13 @@
|
|||||||
<Setter Property="Margin" Value="0,8,6,4"/>
|
<Setter Property="Margin" Value="0,8,6,4"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!--Style di un immagine in al posto di una text-->
|
||||||
|
<Style x:Key="OmagCut_TextIcon" TargetType="{x:Type Image}" >
|
||||||
|
<Setter Property="Width" Value="30"/>
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!-- ScrollBar & it's component (RepeatButton, Thumb) -->
|
<!-- ScrollBar & it's component (RepeatButton, Thumb) -->
|
||||||
|
|
||||||
@@ -1191,7 +1198,7 @@
|
|||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--TextBox-->
|
<!--TextBox-->
|
||||||
|
|
||||||
@@ -1266,11 +1273,14 @@
|
|||||||
|
|
||||||
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
|
||||||
<Setter Property="Background" Value="White"/>
|
<Setter Property="Background" Value="White"/>
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
<Setter Property="IsEnabled" Value="False"/>
|
<Setter Property="IsEnabled" Value="False"/>
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||||
</Style>
|
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
|||||||
@@ -7,79 +7,80 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280"
|
d:DesignHeight="853.3" d:DesignWidth="1280"
|
||||||
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
||||||
|
|
||||||
<!-- Definizione della CurrentProjectPage -->
|
|
||||||
<Grid Name="CurrentProjectPageGrid" >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="3*"/>
|
|
||||||
<ColumnDefinition Width="12*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="8*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore -->
|
<!-- Definizione della CurrentProjectPage -->
|
||||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
<Grid Name="CurrentProjectPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="7*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
|
||||||
<Grid Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="2*"/>
|
|
||||||
<RowDefinition Height="7*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="8*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
<!-- Definizione della Grid superiore -->
|
||||||
|
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"/>
|
||||||
|
<ColumnDefinition Width="7*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Definizione della Grid laterale -->
|
||||||
|
<Grid Grid.RowSpan="3">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="0.2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="MaterialTxBl" Grid.Row="0"
|
<Image Name="MaterialTxBl"
|
||||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Width="100"
|
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
TextAlignment="Right" Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||||
<TextBlock Name="HeightTxBl" Grid.Row="1"
|
<Image Name="HeightTxBl" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Source="{DynamicResource RawHeightImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Width="100"
|
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Margin="0,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||||
|
<Image Name="ToolTxBl" Grid.Row="2"
|
||||||
|
Source="{DynamicResource DB-utensiliImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||||
|
<Image Name="MachiningTxBl" Grid.Row="3"
|
||||||
|
Source="{DynamicResource DB-lavorazioniImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||||
<TextBlock Name="ToolTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Width="100"
|
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
|
||||||
<TextBlock Name="MachiningTxBl" Grid.Row="3"
|
|
||||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Width="100"
|
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||||
|
|
||||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ Imports EgtWPFLib5
|
|||||||
Public Class CurrentProjectPageUC
|
Public Class CurrentProjectPageUC
|
||||||
' Dichiarazione eventi
|
' Dichiarazione eventi
|
||||||
Friend Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
Friend Event OnMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
Friend Event OnKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||||
' Riferimento alla MainWindow
|
' Riferimento alla MainWindow
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
@@ -57,11 +59,11 @@ Public Class CurrentProjectPageUC
|
|||||||
CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
||||||
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||||
|
|
||||||
'Imposto i messaggi letti dal file dei messaggi
|
'Imposto i messaggi letti dal file dei messaggi
|
||||||
MaterialTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
MaterialTxBl.ToolTip = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||||
HeightTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
HeightTxBl.ToolTip = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
||||||
ToolTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
ToolTxBl.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
||||||
MachiningTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
MachiningTxBl.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -107,7 +109,7 @@ Public Class CurrentProjectPageUC
|
|||||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
||||||
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||||
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
||||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Or m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_LIGHT)
|
||||||
If Not CurrentProjectScene.Init() Or Not bProd Then
|
If Not CurrentProjectScene.Init() Or Not bProd Then
|
||||||
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
||||||
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
|
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
|
||||||
@@ -118,11 +120,25 @@ Public Class CurrentProjectPageUC
|
|||||||
#Else
|
#Else
|
||||||
' Se manca la chiave
|
' Se manca la chiave
|
||||||
If m_MainWindow.GetKeyLevel() = -1 Or m_MainWindow.GetKeyLevel() = -2 Then
|
If m_MainWindow.GetKeyLevel() = -1 Or m_MainWindow.GetKeyLevel() = -2 Then
|
||||||
EgtOutLog("Missing Dongle")
|
If Not EgtGetNetHwKey() Then
|
||||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
EgtOutLog("Missing Dongle")
|
||||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||||
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
Else
|
||||||
|
EgtOutLog("NetDongle is full")
|
||||||
|
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||||
|
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||||
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
End If
|
||||||
|
ElseIf m_MainWindow.GetKeyLevel() = -9 Then
|
||||||
|
EgtOutLog("Missing Link with Net Dongle")
|
||||||
|
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||||
|
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||||
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
@@ -196,9 +212,17 @@ Public Class CurrentProjectPageUC
|
|||||||
Else
|
Else
|
||||||
MaterialTxBx.Text = "-----"
|
MaterialTxBx.Text = "-----"
|
||||||
End If
|
End If
|
||||||
' Visualizzo lama e lavorazione correnti
|
|
||||||
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSaw
|
' se macchina waterjet e senza una lama corrente impostata allora visualizzo info WJ
|
||||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
If m_MainWindow.m_CurrentMachine.bWaterJet And String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSaw) Then
|
||||||
|
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||||
|
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
|
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
|
Else
|
||||||
|
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub StartProgram()
|
Public Sub StartProgram()
|
||||||
@@ -276,7 +300,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
||||||
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
||||||
' Carico sottopagina opportuna
|
' Carico sottopagina opportuna
|
||||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
|
||||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||||
m_MainWindow.CadCutBtn.IsChecked = True
|
m_MainWindow.CadCutBtn.IsChecked = True
|
||||||
@@ -314,6 +338,10 @@ Public Class CurrentProjectPageUC
|
|||||||
RaiseEvent OnMouseDownScene(sender, e)
|
RaiseEvent OnMouseDownScene(sender, e)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.MouseDoubleClick
|
||||||
|
RaiseEvent OnMouseDownScene_DoubleClick(sender, e)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
||||||
RaiseEvent OnMouseMoveScene(sender, e)
|
RaiseEvent OnMouseMoveScene(sender, e)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -326,6 +354,10 @@ Public Class CurrentProjectPageUC
|
|||||||
SetInfoMessage(DistToString(vtDist))
|
SetInfoMessage(DistToString(vtDist))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles CurrentProjectScene.KeyDown
|
||||||
|
RaiseEvent OnKeyCancelDownScene(sender, e)
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Gestione progetto
|
' Gestione progetto
|
||||||
|
|
||||||
Friend Sub SetNextProjectIndex()
|
Friend Sub SetNextProjectIndex()
|
||||||
@@ -473,7 +505,9 @@ Public Class CurrentProjectPageUC
|
|||||||
' Nuova geometria
|
' Nuova geometria
|
||||||
Dim nAddTabId As Integer = GDB_ID.NULL
|
Dim nAddTabId As Integer = GDB_ID.NULL
|
||||||
' Se esiste geometria di riferimento
|
' Se esiste geometria di riferimento
|
||||||
Dim nRefAddTabId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( EgtGetTableId( MAIN_TAB), "SOLID"), MACH_ADD_TABLE)
|
Dim sNameTable As String = MAIN_TAB
|
||||||
|
EgtGetTableName(sNameTable)
|
||||||
|
Dim nRefAddTabId = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(EgtGetTableId(sNameTable), "SOLID"), MACH_ADD_TABLE)
|
||||||
If nRefAddTabId <> GDB_ID.NULL Then
|
If nRefAddTabId <> GDB_ID.NULL Then
|
||||||
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
||||||
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
||||||
@@ -489,7 +523,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' Sistemazioni finali
|
' Sistemazioni finali
|
||||||
If nAddTabId = GDB_ID.NULL Then Return False
|
If nAddTabId = GDB_ID.NULL Then Return False
|
||||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
If nRefAddTabId = GDB_ID.NULL Then EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||||
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -1000,10 +1034,16 @@ Public Class CurrentProjectPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateMachiningTxBx()
|
Friend Sub UpdateMachiningTxBx()
|
||||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
' se macchina waterjet e senza uscita lama allora visualizzo info WJ
|
||||||
|
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
|
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
|
Else
|
||||||
|
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Gestione fotografia della lastra (compreso riconoscimento contorno)
|
' Gestione fotografia della lastra (compreso riconoscimento contorno)
|
||||||
|
|
||||||
Friend Function LoadPhoto(sPath As String) As Boolean
|
Friend Function LoadPhoto(sPath As String) As Boolean
|
||||||
' Verifico esistenza file immagine
|
' Verifico esistenza file immagine
|
||||||
|
|||||||
@@ -314,47 +314,117 @@ Public Class ProjectMgrUC
|
|||||||
Dim m_ptRawMax, m_ptRawMin As Point3d
|
Dim m_ptRawMax, m_ptRawMin As Point3d
|
||||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then Return
|
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then Return
|
||||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
|
|
||||||
' Recupero spessore lama corrente
|
' Recupero spessore lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim TestToolWD As New ChooseTestToolWD(m_MainWindow)
|
||||||
EgtTdbSetCurrTool(sSaw)
|
TestToolWD.ShowDialog()
|
||||||
|
If Not TestToolWD.DialogResult Then Return
|
||||||
|
Dim CurrTestTool As TestTool = TestToolWD.GetSelectedTool
|
||||||
|
|
||||||
|
'Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
'EgtTdbSetCurrTool(sSaw)
|
||||||
|
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
Dim dHeight As Double = 0
|
||||||
Dim dDiam As Double = 0
|
If CurrTestTool.ToolIsSaw Then
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
' Spessore LAMA
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
|
' Diametro
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dHeight)
|
||||||
|
' Raggio lama
|
||||||
|
dHeight = dHeight / 2
|
||||||
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
|
' Raggio
|
||||||
|
dThick = 0
|
||||||
|
dHeight = 0
|
||||||
|
Else
|
||||||
|
' Diametro FRESA/FORETTO (l'altezza non serve: posizione calcolata tiene conto del Tip Tool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dThick)
|
||||||
|
' Raggio
|
||||||
|
dThick = dThick / 2
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'recupero il lato selezionato
|
'recupero il lato selezionato
|
||||||
Dim nIdSelected As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv
|
Dim nIdSelected As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv
|
||||||
If nIdSelected = -1 Then Return
|
If nIdSelected = -1 Then Return
|
||||||
' recupero gli estremi del latovda tagliare
|
' recupero il vettore nel punto medio dell'entità
|
||||||
Dim ptStart As Point3d
|
Dim vtDirLine As Vector3d
|
||||||
EgtStartPoint(nIdSelected, GDB_ID.ROOT, ptStart)
|
EgtMidVector(nIdSelected, GDB_ID.ROOT, vtDirLine)
|
||||||
Dim ptEnd As Point3d
|
|
||||||
EgtEndPoint(nIdSelected, GDB_ID.ROOT, ptEnd)
|
' calcolo il versore della linea di taglio
|
||||||
Dim vtDirLine As Vector3d = ptEnd - ptStart
|
|
||||||
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
|
||||||
Dim vtDirT As Vector3d = vtDirLine
|
Dim vtDirT As Vector3d = vtDirLine
|
||||||
vtDirT.Normalize()
|
vtDirT.Normalize()
|
||||||
vtDirT.Rotate(Vector3d.Z_AX, 90)
|
' calcolo la direzione di offset da applicare all'utensile
|
||||||
|
Dim vtOffset As New Vector3d(vtDirT.x, vtDirT.y, vtDirT.z)
|
||||||
|
vtOffset.Rotate(Vector3d.Z_AX, 90)
|
||||||
|
|
||||||
|
If CurrTestTool.ToolIsSaw Then
|
||||||
|
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
||||||
|
vtDirT.Rotate(Vector3d.Z_AX, 90)
|
||||||
|
Else
|
||||||
|
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
||||||
|
vtDirT.Rotate(Vector3d.Z_AX, 90)
|
||||||
|
' calcolo il versore perpendicolare al piano di taglio (diretto verso l'interno dell'utensile)
|
||||||
|
vtDirT.Rotate(vtDirLine, 90)
|
||||||
|
End If
|
||||||
|
|
||||||
' Calcolo punto di posizionamemto (punto medio)
|
' Calcolo punto di posizionamemto (punto medio)
|
||||||
Dim ptMid, m_ptTabOri As Point3d
|
Dim ptMid, m_ptTabOri As Point3d
|
||||||
|
|
||||||
If Not EgtGetTableRef(1, m_ptTabOri) Then Return
|
If Not EgtGetTableRef(1, m_ptTabOri) Then Return
|
||||||
ptMid.x = (ptEnd.x + ptStart.x) / 2
|
' recupero il punto medio della curva
|
||||||
ptMid.y = (ptEnd.y + ptStart.y) / 2
|
EgtMidPoint(nIdSelected, GDB_ID.ROOT, ptMid)
|
||||||
ptMid.z = (ptEnd.z + ptStart.z) / 2 + dDiam / 2
|
ptMid.z = m_ptTabOri.z + CamAuto.GetRawHeight() + dHeight
|
||||||
ptMid -= vtDirT * dThick
|
' Offset dovuto allo spessore Utensile
|
||||||
|
ptMid -= vtOffset * dThick
|
||||||
|
|
||||||
'--------------------------- Imposto la posizione della macchina ----------------------------
|
'--------------------------- Imposto la posizione della macchina ----------------------------
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
' Imposto la lama corrente, preso dalla scelta precedente
|
||||||
|
'If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
|
If Not EgtSetCalcTool(CurrTestTool.ToolName, CurrTestTool.ToolHead, CurrTestTool.ToolExit) Then Return
|
||||||
|
|
||||||
' calcolo la posizione degli assi rotanti C, B
|
' calcolo la posizione degli assi rotanti C, B
|
||||||
Dim nStat As Integer
|
Dim nStat As Integer
|
||||||
Dim dC1, dB1, dC2, dB2 As Double
|
Dim dC1, dB1, dC2, dB2 As Double
|
||||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
If CurrTestTool.ToolIsSaw Then
|
||||||
|
' Se LAMA
|
||||||
|
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||||
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
|
' Se LASER
|
||||||
|
Dim dHomeC As Double = 90
|
||||||
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Forzo B90
|
||||||
|
dB1 = 90
|
||||||
|
' Forzo la pozione in Z alla quota di Home (per evitare l'errore di fine corsa asse Z)
|
||||||
|
Dim dHomeZ As Double = 0
|
||||||
|
EgtGetAxisHomePos("Z", dHomeZ)
|
||||||
|
ptMid.z = dHomeZ
|
||||||
|
Else
|
||||||
|
' Se utensile speciale
|
||||||
|
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||||
|
' Se FRESA/FORETTO
|
||||||
|
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
||||||
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
||||||
|
' Se WJ
|
||||||
|
Dim dHomeC As Double = 90
|
||||||
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
|
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
' calcolo la posizione degli assi lineari X, Y, Z
|
' calcolo la posizione degli assi lineari X, Y, Z
|
||||||
Dim dX, dY, dZ As Double
|
Dim dX, dY, dZ As Double
|
||||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||||
@@ -362,16 +432,49 @@ Public Class ProjectMgrUC
|
|||||||
' verifica assi lineari
|
' verifica assi lineari
|
||||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
If nStat <> 0 Then
|
If nStat <> 0 Then
|
||||||
|
EgtOutLog("Out of stroke: " & nStat)
|
||||||
vtDirT = -vtDirT
|
vtDirT = -vtDirT
|
||||||
ptMid -= vtDirT * dThick
|
ptMid -= vtDirT * dThick
|
||||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
If CurrTestTool.ToolIsSaw Then
|
||||||
|
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||||
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
|
' Se LASER
|
||||||
|
Dim dHomeC As Double = 90
|
||||||
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Forzo B90
|
||||||
|
dB1 = 90
|
||||||
|
Else
|
||||||
|
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||||
|
' Se FRESA/FORETTO
|
||||||
|
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
||||||
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
||||||
|
' Se WJ
|
||||||
|
Dim dHomeC As Double = 90
|
||||||
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
|
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||||
|
|
||||||
|
' verifica assi lineari
|
||||||
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
|
If nStat <> 0 Then
|
||||||
|
EgtOutLog("2nd attemp out of stroke: " & nStat)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||||
Dim ptMachine As Point3d = New Point3d(dX, dY, dZ)
|
Dim ptMachine As Point3d = New Point3d(dX, dY, If(CurrTestTool.ToolIsLaser, 0, dZ))
|
||||||
ExecuteCommandCNC(ptMachine, dC1, dB1)
|
ExecuteCommandCNC(ptMachine, dC1, dB1, CurrTestTool)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' ---------------------------- Fine modalità test --------------------------------------------
|
' ---------------------------- Fine modalità test --------------------------------------------
|
||||||
@@ -656,6 +759,12 @@ Public Class ProjectMgrUC
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' leggo il nome della tavola da cui sto lanciando il progetto
|
||||||
|
Dim sTabeName As String = String.Empty
|
||||||
|
EgtGetTableName(sTabeName)
|
||||||
|
Dim bDoubleProg As Boolean = (GetPrivateProfileInt(S_PRODUCTIONLINE, "DoubleProg", 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
|
||||||
' Leggo eventuale variabile per lavorazione con 2 tavole in parallelo (standard E80027)
|
' Leggo eventuale variabile per lavorazione con 2 tavole in parallelo (standard E80027)
|
||||||
Dim nVarProgTwins As Integer = 1
|
Dim nVarProgTwins As Integer = 1
|
||||||
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
|
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
|
||||||
@@ -669,8 +778,26 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Verifico se posso scrivere nell'area 1
|
' Verifico se posso scrivere nell'area 1
|
||||||
If nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2) Then
|
Dim bSendToAre1 As Boolean = (nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2))
|
||||||
|
Dim bSendToAre2 As Boolean = (nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2))
|
||||||
|
|
||||||
|
If bDoubleProg Then
|
||||||
|
If sTabeName = MAIN_TAB Then
|
||||||
|
' spedisco il programma da tavola 1 solo se CN ha terminato programma 901
|
||||||
|
bSendToAre1 = (nVarProg1 = 0)
|
||||||
|
bSendToAre2 = False
|
||||||
|
EgtOutLog(" Invio programma da tavola 1")
|
||||||
|
Else
|
||||||
|
' spedisco il programma da tavola 2 solo se CN ha terminato programma 902
|
||||||
|
bSendToAre1 = False
|
||||||
|
bSendToAre2 = (nVarProg2 = 0)
|
||||||
|
EgtOutLog(" Invio programma da tavola 2")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bSendToAre1 Then
|
||||||
m_CurrNcComm.SetProgramMainOrSub(False)
|
m_CurrNcComm.SetProgramMainOrSub(False)
|
||||||
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then
|
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then
|
||||||
' Dichiaro part program inviato
|
' Dichiaro part program inviato
|
||||||
@@ -687,7 +814,7 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
m_CurrNcComm.SetProgramMainOrSub(True)
|
m_CurrNcComm.SetProgramMainOrSub(True)
|
||||||
' Altrimenti verifico se posso scrivere nell'area 2
|
' Altrimenti verifico se posso scrivere nell'area 2
|
||||||
ElseIf nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2) Then
|
ElseIf bSendToAre2 Then
|
||||||
m_CurrNcComm.SetProgramMainOrSub(False)
|
m_CurrNcComm.SetProgramMainOrSub(False)
|
||||||
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then
|
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then
|
||||||
' Dichiaro part program inviato
|
' Dichiaro part program inviato
|
||||||
@@ -707,6 +834,12 @@ Public Class ProjectMgrUC
|
|||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
||||||
End If
|
End If
|
||||||
|
' avvio programma solo se DoubleProg
|
||||||
|
If (GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 And bDoubleProg) And
|
||||||
|
(bSendToAre1 Or bSendToAre2) Then
|
||||||
|
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||||
|
MyCicloStartWD.ShowDialog()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
@@ -845,7 +978,7 @@ Public Class ProjectMgrUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double, SelTestTool As TestTool)
|
||||||
|
|
||||||
Dim CmdString As String = String.Empty
|
Dim CmdString As String = String.Empty
|
||||||
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||||
@@ -871,12 +1004,23 @@ Public Class ProjectMgrUC
|
|||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
|
|
||||||
' Recupero spessore lama corrente
|
'' Recupero spessore lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
'Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
EgtTdbSetCurrTool(sSaw)
|
'EgtTdbSetCurrTool(sSaw)
|
||||||
|
'Dim dThick As Double = 0
|
||||||
|
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
|
'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||||
|
|
||||||
|
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||||
|
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName)
|
||||||
|
EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||||
|
Dim sTCPos As String = String.Empty
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||||
|
EgtLuaSetGlobStringVar("CMD.TCPOS", sTCPos)
|
||||||
|
|
||||||
|
|
||||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||||
@@ -935,6 +1079,7 @@ Public Class ProjectMgrUC
|
|||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||||
EgtResetMark(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
EgtResetMark(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv = String.Empty
|
||||||
End If
|
End If
|
||||||
' aggiorno il disegno
|
' aggiorno il disegno
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1008,6 +1153,7 @@ Public Class ProjectMgrUC
|
|||||||
' Nascondo bottoni rawpage
|
' Nascondo bottoni rawpage
|
||||||
m_MainWindow.m_RawPartPage.OtherRefTabBtn.Visibility = Windows.Visibility.Hidden
|
m_MainWindow.m_RawPartPage.OtherRefTabBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.LoadParams()
|
||||||
' Rendo visibili i bottoni per la definizione degli Spotreg
|
' Rendo visibili i bottoni per la definizione degli Spotreg
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UG0_Reg.Visibility = Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.UG0_Reg.Visibility = Visibility.Visible
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UG1_Reg.Visibility = Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.UG1_Reg.Visibility = Visibility.Visible
|
||||||
|
|||||||
@@ -96,16 +96,22 @@ Public Class StartLauncherWD
|
|||||||
Dim ItemFile As String = String.Empty
|
Dim ItemFile As String = String.Empty
|
||||||
'carico la liste dei file recenti
|
'carico la liste dei file recenti
|
||||||
Dim sFileName As String = String.Empty
|
Dim sFileName As String = String.Empty
|
||||||
|
Dim MruFileListRemove As New List(Of String)
|
||||||
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
||||||
sFileName = ItemFile.Replace("__", "_")
|
sFileName = ItemFile.Replace("__", "_")
|
||||||
If Not String.IsNullOrEmpty(sFileName) Then
|
If Not String.IsNullOrEmpty(sFileName) AndAlso File.Exists(sFileName) Then
|
||||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||||
Else
|
Else
|
||||||
m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.Remove(ItemFile)
|
MruFileListRemove.Add(ItemFile)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
For Each ItemFileRemove As String In MruFileListRemove
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.Remove(ItemFileRemove)
|
||||||
|
EgtOutLog(" WARNING: File " & ItemFileRemove & " does not exist or is not accessible, it's been removed from MruFiles list")
|
||||||
|
Next
|
||||||
|
|
||||||
' posiziono la fistra in centro alla pagina
|
' posiziono la fistra in centro alla pagina
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
|||||||
@@ -175,20 +175,24 @@ Public Class ChooseMachining
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
' verifico che lista delle lavorazioni di lama non sia vuoto
|
If m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
If m_SawingList.Count > 0 Then
|
|
||||||
' provo ad assegnare la lama corrente (se l'associazione fallisce corrispoende ad impostare un campo vuoto)
|
|
||||||
CurrSawingCmBx.SelectedItem = m_MainWindow.m_CurrentMachine.sCurrSawing
|
|
||||||
Else
|
Else
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
' verifico che lista delle lavorazioni di lama non sia vuoto
|
||||||
End If
|
If m_SawingList.Count > 0 Then
|
||||||
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
|
' provo ad assegnare la lama corrente (se l'associazione fallisce corrispoende ad impostare un campo vuoto)
|
||||||
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
CurrSawingCmBx.SelectedItem = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
' verifico che il nome della lama esista
|
Else
|
||||||
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
|
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
m_MachIsModified = True
|
End If
|
||||||
|
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
|
||||||
|
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
||||||
|
' verifico che il nome della lama esista
|
||||||
|
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
|
||||||
|
m_MachIsModified = True
|
||||||
|
End If
|
||||||
|
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE --
|
' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE --
|
||||||
|
|||||||
@@ -136,7 +136,9 @@
|
|||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
<ToggleButton Name="RemoveBtn" Grid.Column="1"
|
<ToggleButton Name="RemoveBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
<Button Name="CloseBtn" Grid.Row="1" Grid.ColumnSpan="2"
|
<Button Name="CloseBtn" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="RectangleBtn" Grid.Row="1" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
|
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
|
||||||
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
|
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
|
||||||
CloseBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 31) 'Close - Chiudi
|
CloseBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 31) 'Close - Chiudi
|
||||||
|
RectangleBtn.Content = "Rectangle"
|
||||||
ConfirmPhotoBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 24) 'Conferma
|
ConfirmPhotoBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 24) 'Conferma
|
||||||
|
|
||||||
OtherRefTabTxBl.Text = "New Ref On Tab"
|
OtherRefTabTxBl.Text = "New Ref On Tab"
|
||||||
@@ -328,6 +329,7 @@ Public Class RawPartPageUC
|
|||||||
RawModeCmBx.SelectedIndex = RAWMODE.BY_POINTS
|
RawModeCmBx.SelectedIndex = RAWMODE.BY_POINTS
|
||||||
PointsGpBx.Visibility = Windows.Visibility.Visible
|
PointsGpBx.Visibility = Windows.Visibility.Visible
|
||||||
CloseBtn.Visibility = Windows.Visibility.Hidden
|
CloseBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Hidden
|
||||||
' Visualizzo crocette
|
' Visualizzo crocette
|
||||||
UpdateCircles()
|
UpdateCircles()
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -756,6 +758,8 @@ Public Class RawPartPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
' Non è possibile uscire con tastatura in corso
|
' Non è possibile uscire con tastatura in corso
|
||||||
If m_bProbingOn Then Return
|
If m_bProbingOn Then Return
|
||||||
' reimposto il comando OutLine
|
' reimposto il comando OutLine
|
||||||
@@ -921,6 +925,7 @@ Public Class RawPartPageUC
|
|||||||
RawModeView()
|
RawModeView()
|
||||||
' Disattivo il bottone
|
' Disattivo il bottone
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
Case 3 ' Da Lama
|
Case 3 ' Da Lama
|
||||||
If Not m_MainWindow.m_CurrentMachine.bSaw Then ' Da fotografia
|
If Not m_MainWindow.m_CurrentMachine.bSaw Then ' Da fotografia
|
||||||
@@ -953,6 +958,7 @@ Public Class RawPartPageUC
|
|||||||
RawModeView()
|
RawModeView()
|
||||||
' Disattivo il bottone
|
' Disattivo il bottone
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
Case 4 ' Da fotografia
|
Case 4 ' Da fotografia
|
||||||
' Se ero in modalità da laser
|
' Se ero in modalità da laser
|
||||||
@@ -1017,6 +1023,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 2)
|
AddBtn.SetValue(Grid.RowSpanProperty, 2)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 2)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 2)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Hidden
|
CloseBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Hidden
|
||||||
' Disattivo bottoni zone rovinate e foto
|
' Disattivo bottoni zone rovinate e foto
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1039,6 +1046,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Visible
|
||||||
' Disattivo bottoni zone rovinate e foto
|
' Disattivo bottoni zone rovinate e foto
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1061,6 +1069,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 2)
|
AddBtn.SetValue(Grid.RowSpanProperty, 2)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 2)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 2)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Hidden
|
CloseBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Hidden
|
||||||
' Attivo bottoni zone rovinate
|
' Attivo bottoni zone rovinate
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Visible
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Visible
|
||||||
' Disattivo bottoni foto
|
' Disattivo bottoni foto
|
||||||
@@ -1100,6 +1109,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Visible
|
||||||
' Disattivo bottoni zone rovinate e foto
|
' Disattivo bottoni zone rovinate e foto
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1121,6 +1131,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Visible
|
||||||
' Disattivo bottoni zone rovinate e foto
|
' Disattivo bottoni zone rovinate e foto
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1142,6 +1153,7 @@ Public Class RawPartPageUC
|
|||||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
RectangleBtn.Visibility = Windows.Visibility.Visible
|
||||||
' Disattivo bottoni zone rovinate e foto
|
' Disattivo bottoni zone rovinate e foto
|
||||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1198,6 +1210,9 @@ Public Class RawPartPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AddBtn_Click(sender As Object, e As RoutedEventArgs) Handles AddBtn.Click
|
Private Sub AddBtn_Click(sender As Object, e As RoutedEventArgs) Handles AddBtn.Click
|
||||||
|
' disabilito i comandi di chiusura contorno
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
Select Case m_ActiveRawMode
|
Select Case m_ActiveRawMode
|
||||||
Case RAWMODE.RECTANGLE
|
Case RAWMODE.RECTANGLE
|
||||||
AddBtn.IsChecked = False
|
AddBtn.IsChecked = False
|
||||||
@@ -1246,9 +1261,15 @@ Public Class RawPartPageUC
|
|||||||
m_bptLast = True
|
m_bptLast = True
|
||||||
End If
|
End If
|
||||||
m_ptLast = ptAcquired
|
m_ptLast = ptAcquired
|
||||||
|
' Se ho almeno un segmento allora deve essere la diagonale
|
||||||
|
If m_CurveXKerfList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
If m_CurveXKerfList.Count > 1 Then
|
If m_CurveXKerfList.Count > 1 Then
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
CloseBtn.IsEnabled = True
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
AddBtn.IsChecked = False
|
AddBtn.IsChecked = False
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1294,9 +1315,14 @@ Public Class RawPartPageUC
|
|||||||
m_bptLast = True
|
m_bptLast = True
|
||||||
End If
|
End If
|
||||||
m_ptLast = ptAcquired
|
m_ptLast = ptAcquired
|
||||||
|
If m_CurveXKerfList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
If m_CurveXKerfList.Count > 1 Then
|
If m_CurveXKerfList.Count > 1 Then
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
CloseBtn.IsEnabled = True
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
AddBtn.IsChecked = False
|
AddBtn.IsChecked = False
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1352,9 +1378,14 @@ Public Class RawPartPageUC
|
|||||||
m_bptLast = True
|
m_bptLast = True
|
||||||
End If
|
End If
|
||||||
m_ptLast = ptAcquired
|
m_ptLast = ptAcquired
|
||||||
|
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
If m_CurveXDamagedAreaList.Count > 1 Then
|
If m_CurveXDamagedAreaList.Count > 1 Then
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
CloseBtn.IsEnabled = True
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
AddBtn.IsChecked = False
|
AddBtn.IsChecked = False
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1400,9 +1431,14 @@ Public Class RawPartPageUC
|
|||||||
m_bptLast = True
|
m_bptLast = True
|
||||||
End If
|
End If
|
||||||
m_ptLast = ptAcquired
|
m_ptLast = ptAcquired
|
||||||
|
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
If m_CurveXDamagedAreaList.Count > 1 Then
|
If m_CurveXDamagedAreaList.Count > 1 Then
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
CloseBtn.IsEnabled = True
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
AddBtn.IsChecked = False
|
AddBtn.IsChecked = False
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1487,6 +1523,17 @@ Public Class RawPartPageUC
|
|||||||
' Aggiorno ptLast
|
' Aggiorno ptLast
|
||||||
EgtEndPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
EgtEndPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
||||||
End If
|
End If
|
||||||
|
' reset dei comandi di chiusura
|
||||||
|
If m_CurveXKerfList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
If m_CurveXKerfList.Count > 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
m_bptLast = False
|
m_bptLast = False
|
||||||
End If
|
End If
|
||||||
@@ -1507,6 +1554,17 @@ Public Class RawPartPageUC
|
|||||||
' Aggiorno ptLast
|
' Aggiorno ptLast
|
||||||
EgtEndPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
EgtEndPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
||||||
End If
|
End If
|
||||||
|
' reset dei comandi di chiusura
|
||||||
|
If m_CurveXKerfList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
If m_CurveXKerfList.Count > 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
m_bptLast = False
|
m_bptLast = False
|
||||||
End If
|
End If
|
||||||
@@ -1537,6 +1595,17 @@ Public Class RawPartPageUC
|
|||||||
' Aggiorno ptLast
|
' Aggiorno ptLast
|
||||||
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||||
End If
|
End If
|
||||||
|
' reset dei comandi di chiusura
|
||||||
|
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
If m_CurveXDamagedAreaList.Count > 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
m_bptLast = False
|
m_bptLast = False
|
||||||
End If
|
End If
|
||||||
@@ -1557,6 +1626,17 @@ Public Class RawPartPageUC
|
|||||||
' Aggiorno ptLast
|
' Aggiorno ptLast
|
||||||
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||||
End If
|
End If
|
||||||
|
' reset dei comandi di chiusura
|
||||||
|
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
If m_CurveXDamagedAreaList.Count > 1 Then
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
CloseBtn.IsEnabled = True
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
m_bptLast = False
|
m_bptLast = False
|
||||||
End If
|
End If
|
||||||
@@ -2581,6 +2661,21 @@ Public Class RawPartPageUC
|
|||||||
EgtEmptyGroup(m_nTempLay)
|
EgtEmptyGroup(m_nTempLay)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RectangleBtn_Click(sender As Object, e As RoutedEventArgs) Handles RectangleBtn.Click
|
||||||
|
Select Case m_ActiveRawMode
|
||||||
|
Case RAWMODE.DAMAGED_BY_LASER
|
||||||
|
CloseDamagedAreaByLaser_Rectangle()
|
||||||
|
Case RAWMODE.DAMAGED_BY_SAW
|
||||||
|
CloseDamagedAreaBySaw_Rectangle()
|
||||||
|
Case RAWMODE.FROM_SAW
|
||||||
|
CloseRawBySaw_Rectangle()
|
||||||
|
Case Else
|
||||||
|
CloseRawByLaser_Rectangle()
|
||||||
|
End Select
|
||||||
|
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||||
|
EgtEmptyGroup(m_nTempLay)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseRawByLaser()
|
Private Sub CloseRawByLaser()
|
||||||
' Verifico ci siano punti
|
' Verifico ci siano punti
|
||||||
If m_CurveXKerfList.Count() = 0 Then Return
|
If m_CurveXKerfList.Count() = 0 Then Return
|
||||||
@@ -2615,6 +2710,33 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Disattivo il bottone chiudi grezzo
|
' Disattivo il bottone chiudi grezzo
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseRawByLaser_Rectangle()
|
||||||
|
' Verifico ci siano punti
|
||||||
|
If m_CurveXKerfList.Count() <> 1 Then Return
|
||||||
|
' Recupero punto iniziale prima e unica linea del grezzo
|
||||||
|
Dim ptStart As Point3d
|
||||||
|
EgtStartPoint(m_CurveXKerfList(0), ptStart)
|
||||||
|
' Recupero punto finale prima e unica linea del grezzo
|
||||||
|
Dim ptEnd As Point3d
|
||||||
|
EgtEndPoint(m_CurveXKerfList(0), ptEnd)
|
||||||
|
' Elimo il segmemnto usato come diagonale
|
||||||
|
EgtErase(m_CurveXKerfList(0))
|
||||||
|
' Pulisco lista entità del grezzo (che contiene la diagonale)
|
||||||
|
m_CurveXKerfList.Clear()
|
||||||
|
' Procedo a costruire il rettangolo
|
||||||
|
Dim pt_Temp As Point3d = New Point3d(ptEnd.x, ptStart.y, ptStart.z)
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptStart, pt_Temp))
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptEnd))
|
||||||
|
pt_Temp = New Point3d(ptStart.x, ptEnd.y, ptStart.z)
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptEnd, pt_Temp))
|
||||||
|
' salvo come ultimo punto, l'ultimo calcolato
|
||||||
|
m_ptLast = pt_Temp
|
||||||
|
'CurveXKerfArray(3) = EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptStart)
|
||||||
|
'm_CurveXKerfList.Add(CurveXKerfArray(3))
|
||||||
|
CloseRawByLaser()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseRawBySaw()
|
Private Sub CloseRawBySaw()
|
||||||
@@ -2651,6 +2773,33 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Disattivo il bottone chiudi grezzo
|
' Disattivo il bottone chiudi grezzo
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseRawBySaw_Rectangle()
|
||||||
|
' Verifico ci siano punti
|
||||||
|
If m_CurveXKerfList.Count() <> 1 Then Return
|
||||||
|
' Recupero punto iniziale prima e unica linea del grezzo
|
||||||
|
Dim ptStart As Point3d
|
||||||
|
EgtStartPoint(m_CurveXKerfList(0), ptStart)
|
||||||
|
' Recupero punto finale prima e unica linea del grezzo
|
||||||
|
Dim ptEnd As Point3d
|
||||||
|
EgtEndPoint(m_CurveXKerfList(0), ptEnd)
|
||||||
|
' Elimo il segmemnto usato come diagonale
|
||||||
|
EgtErase(m_CurveXKerfList(0))
|
||||||
|
' Pulisco lista entità del grezzo (che contiene la diagonale)
|
||||||
|
m_CurveXKerfList.Clear()
|
||||||
|
' Procedo a costruire il rettangolo
|
||||||
|
Dim pt_Temp As Point3d = New Point3d(ptEnd.x, ptStart.y, ptStart.z)
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptStart, pt_Temp))
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptEnd))
|
||||||
|
pt_Temp = New Point3d(ptStart.x, ptEnd.y, ptStart.z)
|
||||||
|
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptEnd, pt_Temp))
|
||||||
|
' salvo come ultimo punto, l'ultimo calcolato
|
||||||
|
m_ptLast = pt_Temp
|
||||||
|
'CurveXKerfArray(3) = EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptStart)
|
||||||
|
'm_CurveXKerfList.Add(CurveXKerfArray(3))
|
||||||
|
CloseRawBySaw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Damaged Area"
|
#Region "Damaged Area"
|
||||||
@@ -2707,6 +2856,32 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Disattivo il bottone chiudi grezzo
|
' Disattivo il bottone chiudi grezzo
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseDamagedAreaByLaser_Rectangle()
|
||||||
|
' Verifico che esista una sola linea
|
||||||
|
If m_CurveXDamagedAreaList.Count() <> 1 Then Return
|
||||||
|
' Recupero punto iniziale prima linea del grezzo
|
||||||
|
Dim ptStart As Point3d
|
||||||
|
EgtStartPoint(m_CurveXDamagedAreaList(0), ptStart)
|
||||||
|
' Recupero punto finale prima e unica linea del grezzo
|
||||||
|
Dim ptEnd As Point3d
|
||||||
|
EgtEndPoint(m_CurveXDamagedAreaList(0), ptEnd)
|
||||||
|
' Elimo il segmemnto usato come diagonale
|
||||||
|
EgtErase(m_CurveXDamagedAreaList(0))
|
||||||
|
' Pulisco lista entità del grezzo (che contiene la diagonale)
|
||||||
|
m_CurveXDamagedAreaList.Clear()
|
||||||
|
' Procedo a costruire il rettangolo
|
||||||
|
Dim pt_Temp As Point3d = New Point3d(ptEnd.x, ptStart.y, ptStart.z)
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptStart, pt_Temp))
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptEnd))
|
||||||
|
pt_Temp = New Point3d(ptStart.x, ptEnd.y, ptStart.z)
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptEnd, pt_Temp))
|
||||||
|
' salvo come ultimo punto, l'ultimo calcolato
|
||||||
|
m_ptLast = pt_Temp
|
||||||
|
' procedo a costruire il rettangolo
|
||||||
|
CloseDamagedAreaByLaser()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseDamagedAreaBySaw()
|
Private Sub CloseDamagedAreaBySaw()
|
||||||
@@ -2733,6 +2908,32 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Disattivo il bottone chiudi grezzo
|
' Disattivo il bottone chiudi grezzo
|
||||||
CloseBtn.IsEnabled = False
|
CloseBtn.IsEnabled = False
|
||||||
|
RectangleBtn.IsEnabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseDamagedAreaBySaw_Rectangle()
|
||||||
|
' Verifico che esista una sola linea
|
||||||
|
If m_CurveXDamagedAreaList.Count() <> 1 Then Return
|
||||||
|
' Recupero punto iniziale prima linea del grezzo
|
||||||
|
Dim ptStart As Point3d
|
||||||
|
EgtStartPoint(m_CurveXDamagedAreaList(0), ptStart)
|
||||||
|
' Recupero punto finale prima e unica linea del grezzo
|
||||||
|
Dim ptEnd As Point3d
|
||||||
|
EgtEndPoint(m_CurveXDamagedAreaList(0), ptEnd)
|
||||||
|
' Elimo il segmemnto usato come diagonale
|
||||||
|
EgtErase(m_CurveXDamagedAreaList(0))
|
||||||
|
' Pulisco lista entità del grezzo (che contiene la diagonale)
|
||||||
|
m_CurveXDamagedAreaList.Clear()
|
||||||
|
' Procedo a costruire il rettangolo
|
||||||
|
Dim pt_Temp As Point3d = New Point3d(ptEnd.x, ptStart.y, ptStart.z)
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptStart, pt_Temp))
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, pt_Temp, ptEnd))
|
||||||
|
pt_Temp = New Point3d(ptStart.x, ptEnd.y, ptStart.z)
|
||||||
|
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, ptEnd, pt_Temp))
|
||||||
|
' salvo come ultimo punto, l'ultimo calcolato
|
||||||
|
m_ptLast = pt_Temp
|
||||||
|
' procedo a costruire il rettangolo
|
||||||
|
CloseDamagedAreaBySaw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RemoveDamagedArea()
|
Private Sub RemoveDamagedArea()
|
||||||
|
|||||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 16 KiB |
@@ -31,7 +31,9 @@ Public Class VeinMatchingWindow
|
|||||||
VeinMatchingSceneHost.SetValue(Grid.ColumnProperty, 1)
|
VeinMatchingSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||||
Me.VeinMatchingGrid.Children.Add(VeinMatchingSceneHost)
|
Me.VeinMatchingGrid.Children.Add(VeinMatchingSceneHost)
|
||||||
' Per non farla visualizzare alla creazione
|
' Per non farla visualizzare alla creazione
|
||||||
Me.Left = 32000
|
If GetPrivateProfileInt(S_VEINMATCHING, K_VEINMA_ENABLE, 0, m_MainWindow.GetIniFile()) = 1 Then
|
||||||
|
Me.Left = 32000
|
||||||
|
End If
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
NewBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
NewBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
||||||
ExportBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 10)
|
ExportBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 10)
|
||||||
@@ -1174,6 +1176,8 @@ Friend Module VeinMatching
|
|||||||
' Esporto il file come immagine
|
' Esporto il file come immagine
|
||||||
EgtSetCurrentContext(m_nVeinCtx)
|
EgtSetCurrentContext(m_nVeinCtx)
|
||||||
Dim bOk As Boolean = (EgtGetFileType(sFilePath) = FT.IMG)
|
Dim bOk As Boolean = (EgtGetFileType(sFilePath) = FT.IMG)
|
||||||
|
m_nImgWidth = GetPrivateProfileDouble(S_VEINMATCHING, K_VEINMA_WIDTH, m_nImgWidth, m_MainWindow.GetIniFile)
|
||||||
|
m_nImgHeight = GetPrivateProfileDouble(S_VEINMATCHING, K_VEINMA_HEIGHT, m_nImgHeight, m_MainWindow.GetIniFile)
|
||||||
bOk = bOk AndAlso EgtGetImage(EgtGetShowMode(), New Color3d(255, 255, 255), New Color3d(255, 255, 255),
|
bOk = bOk AndAlso EgtGetImage(EgtGetShowMode(), New Color3d(255, 255, 255), New Color3d(255, 255, 255),
|
||||||
m_nImgWidth, m_nImgHeight, sFilePath)
|
m_nImgWidth, m_nImgHeight, sFilePath)
|
||||||
' Ripristino il contesto originale
|
' Ripristino il contesto originale
|
||||||
|
|||||||
@@ -271,12 +271,12 @@ Public Class WorkInProgressPageUC
|
|||||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||||
' aggiorno lo stato
|
' aggiorno lo stato
|
||||||
Select Case m_nMachLook
|
Select Case m_nMachLook
|
||||||
Case MCH_LOOK.ALL
|
Case MCH_LOOK.ALL
|
||||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||||
Case MCH_LOOK.TAB_HEAD
|
Case MCH_LOOK.TAB_HEAD
|
||||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||||
Case Else
|
Case Else
|
||||||
m_nMachLook = MCH_LOOK.ALL
|
m_nMachLook = MCH_LOOK.ALL
|
||||||
End Select
|
End Select
|
||||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||||
EgtSetMachineLook(m_nMachLook)
|
EgtSetMachineLook(m_nMachLook)
|
||||||
@@ -317,7 +317,7 @@ Public Class WorkInProgressPageUC
|
|||||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
||||||
WorkInProgressScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
WorkInProgressScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||||
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
||||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Or m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_LIGHT)
|
||||||
If Not WorkInProgressScene.Init() Or Not bProd Then
|
If Not WorkInProgressScene.Init() Or Not bProd Then
|
||||||
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
||||||
Me.WorkInProgressPageGrid.Children.Remove(WorkInProgressSceneHost)
|
Me.WorkInProgressPageGrid.Children.Remove(WorkInProgressSceneHost)
|
||||||
@@ -328,16 +328,30 @@ Public Class WorkInProgressPageUC
|
|||||||
#Else
|
#Else
|
||||||
' Se manca la chiave
|
' Se manca la chiave
|
||||||
If m_MainWindow.GetKeyLevel() = -1 Or m_MainWindow.GetKeyLevel() = -2 Then
|
If m_MainWindow.GetKeyLevel() = -1 Or m_MainWindow.GetKeyLevel() = -2 Then
|
||||||
EgtOutLog("Missing Dongle")
|
If Not EgtGetNetHwKey() Then
|
||||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
EgtOutLog("Missing Dongle")
|
||||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||||
' Altrimenti manca la licenza
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
Else
|
||||||
|
EgtOutLog("NetDongle is full")
|
||||||
|
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||||
|
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||||
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
End If
|
||||||
|
ElseIf m_MainWindow.GetKeyLevel() = -9 Then
|
||||||
|
EgtOutLog("Missing Link with Net Dongle")
|
||||||
|
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||||
|
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||||
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo( sKeyInfo)
|
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 2)
|
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 2)
|
||||||
@@ -368,7 +382,7 @@ Public Class WorkInProgressPageUC
|
|||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
m_MainWindow.Close()
|
m_MainWindow.Close()
|
||||||
If bRestart Then Process.Start( Application.ResourceAssembly.Location)
|
If bRestart Then Process.Start(Application.ResourceAssembly.Location)
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
' dimensione lineare max in pixel delle textures
|
' dimensione lineare max in pixel delle textures
|
||||||
@@ -397,19 +411,19 @@ Public Class WorkInProgressPageUC
|
|||||||
' Imposto il giusto contesto
|
' Imposto il giusto contesto
|
||||||
Dim bOk As Boolean = EgtSetCurrentContext(WorkInProgressScene.GetCtx())
|
Dim bOk As Boolean = EgtSetCurrentContext(WorkInProgressScene.GetCtx())
|
||||||
' Svuoto le teste
|
' Svuoto le teste
|
||||||
EgtResetHeadSet( "H1")
|
EgtResetHeadSet("H1")
|
||||||
EgtResetHeadSet( "H2")
|
EgtResetHeadSet("H2")
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
Dim sSaw As String = GetFirstTool()
|
Dim sSaw As String = GetFirstTool()
|
||||||
If bOk Then
|
If bOk Then
|
||||||
If Not EgtSetCalcTool( sSaw, "H1", 1) Then bOk = False
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then bOk = False
|
||||||
End If
|
End If
|
||||||
' Imposto eventuale secondo utensile montato
|
' Imposto eventuale secondo utensile montato
|
||||||
If bOk Then
|
If bOk Then
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
Dim nExit As Integer = 0
|
Dim nExit As Integer = 0
|
||||||
Dim sTool As String = GetSecondTool( sHead, nExit)
|
Dim sTool As String = GetSecondTool(sHead, nExit)
|
||||||
If Not String.IsNullOrEmpty( sTool) AndAlso Not EgtLoadTool( sHead, nExit, sTool) Then
|
If Not String.IsNullOrEmpty(sTool) AndAlso Not EgtLoadTool(sHead, nExit, sTool) Then
|
||||||
bOk = False
|
bOk = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -422,7 +436,7 @@ Public Class WorkInProgressPageUC
|
|||||||
Return m_MainWindow.m_CurrentMachine.sCurrSaw
|
Return m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetSecondTool( ByRef sHead As String, ByRef nExit As Integer) As String
|
Private Function GetSecondTool(ByRef sHead As String, ByRef nExit As Integer) As String
|
||||||
' Se non previsto secondo utensile, non c'è
|
' Se non previsto secondo utensile, non c'è
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||||
Return ""
|
Return ""
|
||||||
@@ -462,17 +476,17 @@ Public Class WorkInProgressPageUC
|
|||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If bOk Then
|
If bOk Then
|
||||||
' Calcolo standard con utensile principale (lama)
|
' 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
|
' Se testa verticale e presente altro utensile, rifaccio calcolo con questo
|
||||||
Dim vtTool As Vector3d
|
Dim vtTool As Vector3d
|
||||||
If EgtGetCalcToolDirFromAngles( dR1, dR2, vtTool) AndAlso ( vtTool - Vector3d.Z_AX()).IsSmall() Then
|
If EgtGetCalcToolDirFromAngles(dR1, dR2, vtTool) AndAlso (vtTool - Vector3d.Z_AX()).IsSmall() Then
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
Dim nExit As Integer = 0
|
Dim nExit As Integer = 0
|
||||||
Dim sTool As String = GetSecondTool( sHead, nExit)
|
Dim sTool As String = GetSecondTool(sHead, nExit)
|
||||||
If Not String.IsNullOrEmpty( sTool) AndAlso EgtSetCalcTool( sTool, sHead, nExit) Then
|
If Not String.IsNullOrEmpty(sTool) AndAlso EgtSetCalcTool(sTool, sHead, nExit) Then
|
||||||
' Calcolo secondo tip
|
' Calcolo secondo tip
|
||||||
Dim ptTip2 As Point3d
|
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
|
ptTip = ptTip2
|
||||||
End If
|
End If
|
||||||
' Ripristino configurazione standard
|
' Ripristino configurazione standard
|
||||||
|
|||||||