OmagCUT 1.6l1 :

- a simulazione aggiunto movimento singolo.
This commit is contained in:
Dario Sassi
2015-12-07 10:47:30 +00:00
parent e2daebcb5a
commit 606db6478b
8 changed files with 87 additions and 47 deletions
+2 -1
View File
@@ -14,7 +14,8 @@
Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGCUT + 400
Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGCUT + 450
Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGCUT + 490
Public Const MSG_ROWPARTPAGEUC As Integer = MSG_OMAGCUT + 500
Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGCUT + 500
Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGCUT + 550
Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGCUT + 600
Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGCUT + 700
Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGCUT + 720
+2 -2
View File
@@ -60,8 +60,8 @@ Public Class CurrentProjectPageUC
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
'Imposto i messaggi letti dal file dei messaggi
MaterialLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 9) 'Material - Materiale
HeightLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 5) 'Height - Spessore
MaterialLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
HeightLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
ToolLbl.Content = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
MachiningLbl.Content = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
+2 -2
View File
@@ -55,5 +55,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.11.10")>
<Assembly: AssemblyFileVersion("1.6.11.10")>
<Assembly: AssemblyVersion("1.6.12.1")>
<Assembly: AssemblyFileVersion("1.6.12.1")>
+3
View File
@@ -474,6 +474,9 @@
<ItemGroup>
<Resource Include="Resources\ToolsTreeviewImages\Lama.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\PlayStep.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
+15 -15
View File
@@ -38,21 +38,21 @@ Public Class RawPartPageUC
KerfTxBx.Tag = KerfLbl
'Imposto i messaggi letti dal file dei messaggi
RectangleBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 1) 'Rectangle - Rettangolo
ByPointsBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 2) 'By points - Per punti
LengthLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 3) 'Length - Lunghezza
WidthLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 4) 'Width - Larghezza
HeightLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 5) 'Height - Spessore
OffsetXLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 6) 'Offset X
OffsetYLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 7) 'Offset Y
KerfLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 8) 'Kerf
MaterialLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 9) 'Material - Materiale
DamagedAreaLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 10) 'Damaged area - Zona rovinata
NewBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 11) 'New - Nuovo
DeleteBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 12) 'Delete - Cancella
PointsLbl.Content = EgtMsg(MSG_ROWPARTPAGEUC + 13) 'Points - Punti
AddBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 14) 'Add - Aggiungi
RemoveBtn.Content = EgtMsg(MSG_ROWPARTPAGEUC + 15) 'Remove - Rimuovi
RectangleBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rectangle - Rettangolo
ByPointsBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'By points - Per punti
LengthLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 3) 'Length - Lunghezza
WidthLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 4) 'Width - Larghezza
HeightLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
OffsetXLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 6) 'Offset X
OffsetYLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 7) 'Offset Y
KerfLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 8) 'Kerf
MaterialLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
DamagedAreaLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'Damaged area - Zona rovinata
NewBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 11) 'New - Nuovo
DeleteBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 12) 'Delete - Cancella
PointsLbl.Content = EgtMsg(MSG_RAWPARTPAGEUC + 13) 'Points - Punti
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
End Sub
Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

+2 -2
View File
@@ -84,8 +84,8 @@
<TextBlock Name="SValueTxBl" Grid.Column="1" Grid.Row="7" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Right"
VerticalAlignment="Center" TextAlignment="Right" Margin="0,0,50,0" />
<Button Name="HomeBtn" Grid.Column="0" Grid.Row="9" >
<Image Source="Resources/IndietroVeloce.png" Width="65" Height="65" HorizontalAlignment="Center"
<Button Name="StepBtn" Grid.Column="0" Grid.Row="9" >
<Image Source="Resources/PlayStep.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
+61 -25
View File
@@ -9,7 +9,8 @@ Public Class SimulationPageUC
Public Enum SIM_ST As Integer
ST_STOP = 1
ST_PLAY = 2
ST_PAUSE = 3
ST_STEP = 3
ST_PAUSE = 4
End Enum
Private m_nStatus As Integer = SIM_ST.ST_STOP
@@ -86,48 +87,70 @@ Public Class SimulationPageUC
SpeedSlider.Value = SliderVal
' Porto la testa in home
EgtSimStart()
HomeBtn_Click(Me, Nothing)
EgtSimHome()
EgtDraw()
ShowCncData()
End Sub
Private Sub HomeBtn_Click(sender As Object, e As RoutedEventArgs) Handles HomeBtn.Click
If m_nStatus <> SIM_ST.ST_STOP Then
Return
Private Sub StepBtn_Click(sender As Object, e As RoutedEventArgs) Handles StepBtn.Click
' Se stato stop, devo avviare simulazione
If m_nStatus = SIM_ST.ST_STOP Then
m_nStatus = SIM_ST.ST_STEP
ExecSim()
' Alrimenti imposto solo il nuovo stato
Else
m_nStatus = SIM_ST.ST_STEP
End If
' Vado in home
EgtSimHome()
' Aggiorno visualizzazione
EgtDraw()
' Aggiorno dati CNC
ShowCncData()
' Aggiornamenti per bottone Play/Pause
m_bPlay = False
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Pause.png", UriKind.Relative))
End Sub
Private Sub PlayPauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PlayPauseBtn.Click
If m_bPlay Then
' Aggiorno bottone
m_bPlay = False
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Pause.png", UriKind.Relative))
SetPlayPauseBtnToPause()
' Eseguo
If m_nStatus = SIM_ST.ST_STOP Then
' Lancio simulazione
m_nStatus = SIM_ST.ST_PLAY
ExecSim()
' Aggiorno bottone
m_bPlay = True
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Play.png", UriKind.Relative))
SetPlayPauseBtnToPlay()
ElseIf m_nStatus = SIM_ST.ST_PAUSE Then
m_nStatus = SIM_ST.ST_PLAY
End If
Else
' Aggiorno bottone
m_bPlay = True
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Play.png", UriKind.Relative))
' Se play, imposto stato pausa
If m_nStatus = SIM_ST.ST_PLAY Then
SetPlayPauseBtnToPlay()
' Se play o step, imposto stato pausa
If m_nStatus = SIM_ST.ST_PLAY Or m_nStatus = SIM_ST.ST_STEP Then
m_nStatus = SIM_ST.ST_PAUSE
End If
End If
End Sub
Private Sub SetPlayPauseBtnToPlay()
m_bPlay = True
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Play.png", UriKind.Relative))
End Sub
Private Sub SetPlayPauseBtnToPause()
m_bPlay = False
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Pause.png", UriKind.Relative))
End Sub
Private Sub StopBtn_Click(sender As Object, e As RoutedEventArgs) Handles StopBtn.Click
' Se stato già stop, porto in home
If m_nStatus = SIM_ST.ST_STOP Then
' Vado in home
EgtSimHome()
' Aggiorno visualizzazione
EgtDraw()
' Aggiorno dati CNC
ShowCncData()
End If
' Imposto il nuovo stato
m_nStatus = SIM_ST.ST_STOP
End Sub
@@ -136,32 +159,45 @@ Public Class SimulationPageUC
End Sub
Private Sub ExecSim()
m_nStatus = SIM_ST.ST_PLAY
EgtSimStart()
EgtSimSetStep(SpeedSlider.Value * m_SliderX)
While m_nStatus <> SIM_ST.ST_STOP
' Se simulazione in svolgimento
If m_nStatus = SIM_ST.ST_PLAY Then
If m_nStatus = SIM_ST.ST_PLAY Or m_nStatus = SIM_ST.ST_STEP Then
' Eseguo movimento
Dim nMove As Integer
Dim bMove As Boolean = EgtSimMove(nMove)
' Se arrivato a fine step e sono in step
If bMove Then
If m_nStatus = SIM_ST.ST_STEP And nMove = MCH_SIM.END_STEP Then
' Imposto stato Pausa
m_nStatus = SIM_ST.ST_PAUSE
' Aggiornamenti per bottone Play/Pause
SetPlayPauseBtnToPlay()
End If
' Se movimento non riuscito
If Not bMove Then
Else
m_nStatus = SIM_ST.ST_STOP
' Aggiornamenti per bottone Play/Pause
SetPlayPauseBtnToPlay()
Select Case nMove
Case MCH_SIM.END_
OutMessageLbl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
OutMessageLbl.Background = Brushes.Green
OutMessageLbl.Visibility = Windows.Visibility.Visible
EgtOutLog(OutMessageLbl.Text)
Case MCH_SIM.OUTSTROKE
OutMessageLbl.Text = EgtMsg(90317) 'Extracorsa
OutMessageLbl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 2) 'Extracorsa
OutMessageLbl.Background = Brushes.Tomato
OutMessageLbl.Visibility = Windows.Visibility.Visible
EgtOutLog(OutMessageLbl.Text)
Case MCH_SIM.DIR_ERR
OutMessageLbl.Text = EgtMsg(90318) 'Direzione utensile irraggiungibile
OutMessageLbl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 3) 'Direzione utensile irraggiungibile
OutMessageLbl.Background = Brushes.Tomato
OutMessageLbl.Visibility = Windows.Visibility.Visible
EgtOutLog(OutMessageLbl.Text)
Case Else
OutMessageLbl.Text = EgtMsg(90319) 'Errore
OutMessageLbl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 4) 'Errore
OutMessageLbl.Background = Brushes.Tomato
OutMessageLbl.Visibility = Windows.Visibility.Visible
EgtOutLog(OutMessageLbl.Text)