EgtCAM5 1.8e3 :
- sistemate lavorazioni per nuovi parametri di categoria avanzata - nascosti parametri fresatura per tab (non ancora implementata la funzionalità) - migliorato report errori in lavorazioni - migliorato controllo attrezzaggio.
This commit is contained in:
+53
@@ -59,6 +59,11 @@
|
||||
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
|
||||
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
|
||||
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
|
||||
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel Name="OperationParametersStackPanel">
|
||||
@@ -196,6 +201,54 @@
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
|
||||
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"
|
||||
Visibility="{Binding Type, Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource AxRotRef}}">
|
||||
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="2" Height="20" Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource InvertToolDir}}">
|
||||
<TextBlock Text="{Binding InvertToolDirMsg}"/>
|
||||
<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
IsChecked="{Binding ToolInvert}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource FaceUseType}}">
|
||||
<TextBlock Text="{Binding FaceUseTypeMsg}"/>
|
||||
<ComboBox ItemsSource="{Binding FaceUseTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedFaceUseType}"
|
||||
IsSynchronizedWithCurrentItem="True">
|
||||
</ComboBox>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource AxRotRef}}">
|
||||
<TextBlock Text="{Binding InitAngsMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding InitAngs, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource BlockedAxesRef}}">
|
||||
<TextBlock Text="{Binding BlockedAxisMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding BlockedAxis, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource SolChoiceType}}">
|
||||
<TextBlock Text="{Binding SolChoiceTypeMsg}"/>
|
||||
<ComboBox ItemsSource="{Binding SolChoiceTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedSolChoiceType}"
|
||||
IsSynchronizedWithCurrentItem="True">
|
||||
</ComboBox>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
</Expander>
|
||||
|
||||
<Expander Visibility="{Binding Type,
|
||||
Converter={StaticResource OperationParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource LeadInType}}"
|
||||
|
||||
+246
-8
@@ -56,6 +56,26 @@ Namespace EgtCAM5
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedToolInvert As Boolean = False
|
||||
Private m_ToolInvert As Boolean = False
|
||||
''' <summary>
|
||||
''' Property that read and write to the Machining's database the Invert
|
||||
''' </summary>
|
||||
Public Property ToolInvert As Boolean
|
||||
Get
|
||||
Return m_ToolInvert
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_ToolInvert Then
|
||||
m_ToolInvert = value
|
||||
Dim OrigToolInvert As Boolean = False
|
||||
EgtGetMachiningParam(MCH_MP.TOOLINVERT, OrigToolInvert)
|
||||
m_IsModifiedToolInvert = If(value <> OrigToolInvert, True, False)
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Type As Integer
|
||||
''' <summary>
|
||||
''' Property that read from the Machining's database the Type
|
||||
@@ -434,6 +454,99 @@ Namespace EgtCAM5
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'ObservableCollection che contiene le variabili per il combobox FaceUseType
|
||||
Private m_FaceUseTypeList As New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 153)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTHO_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
||||
New IdNameStruct(MCH_MIL_FU.ORTUP_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 156))})
|
||||
Public ReadOnly Property FaceUseTypeList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
Return m_FaceUseTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedSelectedFaceUseType As Boolean = False
|
||||
Private m_SelectedFaceUseType As Integer = 0
|
||||
|
||||
' Proprietà che indica il FaceUseType (MCH_MIL_FU)
|
||||
Public Property SelectedFaceUseType As Integer
|
||||
Get
|
||||
If IsNothing(FaceUseTypeList) Then Return Nothing
|
||||
Return m_SelectedFaceUseType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_SelectedFaceUseType Then
|
||||
If Not IsNothing(FaceUseTypeList) Then
|
||||
m_SelectedFaceUseType = value
|
||||
Dim OrigFaceUseType As Integer = 0
|
||||
EgtGetMachiningParam(MCH_MP.FACEUSE, OrigFaceUseType)
|
||||
OrigFaceUseType = IdNameStruct.IndFromId(OrigFaceUseType, FaceUseTypeList)
|
||||
m_IsModifiedSelectedFaceUseType = If(value <> OrigFaceUseType, True, False)
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'ObservableCollection che contiene le variabili per il combobox SolChoiceType
|
||||
Private m_SolChoiceTypeList As New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_SCC.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 105)),
|
||||
New IdNameStruct(MCH_SCC.STD, EgtMsg(MSG_MACHININGSDBPAGE + 106)),
|
||||
New IdNameStruct(MCH_SCC.OPPOSITE, EgtMsg(MSG_MACHININGSDBPAGE + 107)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_XP, EgtMsg(MSG_MACHININGSDBPAGE + 108)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_XM, EgtMsg(MSG_MACHININGSDBPAGE + 109)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_YP, EgtMsg(MSG_MACHININGSDBPAGE + 110)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_YM, EgtMsg(MSG_MACHININGSDBPAGE + 111)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_ZP, EgtMsg(MSG_MACHININGSDBPAGE + 112)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_ZM, EgtMsg(MSG_MACHININGSDBPAGE + 113)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_NEAR, EgtMsg(MSG_MACHININGSDBPAGE + 114)),
|
||||
New IdNameStruct(MCH_SCC.ADIR_FAR, EgtMsg(MSG_MACHININGSDBPAGE + 115))})
|
||||
Public ReadOnly Property SolChoiceTypeList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
Return m_SolChoiceTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedSelectedSolChoiceType As Boolean = False
|
||||
Private m_SelectedSolChoiceType As Integer
|
||||
' Proprietà che indica il SolChoiceType (MCH_SCC)
|
||||
Public Property SelectedSolChoiceType As Integer
|
||||
Get
|
||||
If IsNothing(SolChoiceTypeList) Then Return Nothing
|
||||
Return m_SelectedSolChoiceType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_SelectedSolChoiceType Then
|
||||
If Not IsNothing(SolChoiceTypeList) Then
|
||||
m_SelectedSolChoiceType = value
|
||||
Dim OrigSolChoiceType As Integer = 0
|
||||
EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, OrigSolChoiceType)
|
||||
OrigSolChoiceType = IdNameStruct.IndFromId(OrigSolChoiceType, SolChoiceTypeList)
|
||||
m_IsModifiedSelectedSolChoiceType = If(value <> OrigSolChoiceType, True, False)
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedSpeed As Boolean = False
|
||||
Private m_Speed As String
|
||||
''' <summary>
|
||||
@@ -1222,6 +1335,46 @@ Namespace EgtCAM5
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedInitAngs As Boolean = False
|
||||
Private m_InitAngs As String
|
||||
''' <summary>
|
||||
''' Property that read and write to the Machining's database the Initial Angles
|
||||
''' </summary>
|
||||
Public Property InitAngs As String
|
||||
Get
|
||||
Return m_InitAngs
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value = String.Empty Or value <> m_InitAngs Then
|
||||
m_InitAngs = value
|
||||
Dim OrigInitAngs As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.INITANGS, OrigInitAngs)
|
||||
m_IsModifiedInitAngs = If(value <> OrigInitAngs, True, False)
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IsModifiedBlockedAxis As Boolean = False
|
||||
Private m_BlockedAxis As String
|
||||
''' <summary>
|
||||
''' Property that read and write to the Machining's database the Initial Angles
|
||||
''' </summary>
|
||||
Public Property BlockedAxis As String
|
||||
Get
|
||||
Return m_BlockedAxis
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value = String.Empty Or value <> m_BlockedAxis Then
|
||||
m_BlockedAxis = value
|
||||
Dim OrigBlockedAxis As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, OrigBlockedAxis)
|
||||
m_IsModifiedBlockedAxis = If(value <> OrigBlockedAxis, True, False)
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
' Public Property Depth As String
|
||||
' Get
|
||||
@@ -2035,6 +2188,42 @@ Namespace EgtCAM5
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AdvancedParamMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 150)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property InvertToolDirMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 151)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FaceUseTypeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 152)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property InitAngsMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 164)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BlockedAxisMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 165)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SolChoiceTypeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LeadInTypeMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGSDBPAGE + 56)
|
||||
@@ -2236,6 +2425,9 @@ Namespace EgtCAM5
|
||||
EgtGetMachiningParam(MCH_MP.LEAVETAB, m_LeaveTab)
|
||||
NotifyPropertyChanged("LeaveTab")
|
||||
m_IsModifiedLeaveTab = False
|
||||
EgtGetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert)
|
||||
NotifyPropertyChanged("ToolInvert")
|
||||
m_IsModifiedToolInvert = False
|
||||
EgtGetMachiningParam(MCH_MP.WORKSIDE, nValue)
|
||||
m_SelectedWorkSide = If(IsNothing(WorkSideList), nValue, IdNameStruct.IndFromId(nValue, WorkSideList))
|
||||
NotifyPropertyChanged("SelectedWorkSide")
|
||||
@@ -2272,6 +2464,16 @@ Namespace EgtCAM5
|
||||
EgtGetMachiningParam(MCH_MP.LEADLINKTYPE, m_SelectedLeadLinkType)
|
||||
NotifyPropertyChanged("SelectedLeadLinkType")
|
||||
m_IsModifiedSelectedLeadLinkType = False
|
||||
NotifyPropertyChanged("FaceUseTypeList")
|
||||
EgtGetMachiningParam(MCH_MP.FACEUSE, nValue)
|
||||
m_SelectedFaceUseType = If(IsNothing(FaceUseTypeList), nValue, IdNameStruct.IndFromId(nValue, FaceUseTypeList))
|
||||
NotifyPropertyChanged("SelectedFaceUseType")
|
||||
m_IsModifiedSelectedFaceUseType = False
|
||||
NotifyPropertyChanged("SolChoiceTypeList")
|
||||
EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
|
||||
m_SelectedSolChoiceType = If(IsNothing(SolChoiceTypeList), nValue, IdNameStruct.IndFromId(nValue, SolChoiceTypeList))
|
||||
NotifyPropertyChanged("SelectedSolChoiceType")
|
||||
m_IsModifiedSelectedSolChoiceType = False
|
||||
EgtGetMachiningParam(MCH_MP.SPEED, dValue)
|
||||
m_Speed = DoubleToString(dValue, 4)
|
||||
NotifyPropertyChanged("Speed")
|
||||
@@ -2420,6 +2622,12 @@ Namespace EgtCAM5
|
||||
EgtGetMachiningParam(MCH_MP.USERNOTES, m_UserNotes)
|
||||
NotifyPropertyChanged("UserNotes")
|
||||
m_IsModifiedUserNotes = False
|
||||
EgtGetMachiningParam(MCH_MP.INITANGS, m_InitAngs)
|
||||
NotifyPropertyChanged("InitAngs")
|
||||
m_IsModifiedInitAngs = False
|
||||
EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis)
|
||||
NotifyPropertyChanged("BlockedAxis")
|
||||
m_IsModifiedBlockedAxis = False
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
End Sub
|
||||
|
||||
@@ -2436,6 +2644,11 @@ Namespace EgtCAM5
|
||||
m_IsModifiedLeaveTab = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedToolInvert Then
|
||||
If EgtSetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert) Then
|
||||
m_IsModifiedToolInvert = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedSelectedWorkSide Then
|
||||
nValue = If(IsNothing(WorkSideList), m_SelectedWorkSide, IdNameStruct.IdFromInd(m_SelectedWorkSide, WorkSideList))
|
||||
If EgtSetMachiningParam(MCH_MP.WORKSIDE, nValue) Then
|
||||
@@ -2484,6 +2697,18 @@ Namespace EgtCAM5
|
||||
m_IsModifiedSelectedLeadLinkType = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedSelectedFaceUseType Then
|
||||
nValue = If(IsNothing(FaceUseTypeList), m_SelectedFaceUseType, IdNameStruct.IdFromInd(m_SelectedFaceUseType, FaceUseTypeList))
|
||||
If EgtSetMachiningParam(MCH_MP.FACEUSE, nValue) Then
|
||||
m_IsModifiedSelectedFaceUseType = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedSelectedSolChoiceType Then
|
||||
nValue = If(IsNothing(SolChoiceTypeList), m_SelectedSolChoiceType, IdNameStruct.IdFromInd(m_SelectedSolChoiceType, SolChoiceTypeList))
|
||||
If EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue) Then
|
||||
m_IsModifiedSelectedSolChoiceType = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedSpeed Then
|
||||
StringToDouble(m_Speed, dValue)
|
||||
If EgtSetMachiningParam(MCH_MP.SPEED, dValue) Then
|
||||
@@ -2698,6 +2923,16 @@ Namespace EgtCAM5
|
||||
m_IsModifiedUserNotes = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedInitAngs Then
|
||||
If EgtSetMachiningParam(MCH_MP.INITANGS, m_InitAngs) Then
|
||||
m_IsModifiedInitAngs = False
|
||||
End If
|
||||
End If
|
||||
If m_IsModifiedBlockedAxis Then
|
||||
If EgtSetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis) Then
|
||||
m_IsModifiedBlockedAxis = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Commands
|
||||
@@ -2733,8 +2968,8 @@ Namespace EgtCAM5
|
||||
''' Ricalcola una lavorazione.
|
||||
''' </summary>
|
||||
Public Sub UpdateMachining(ByVal param As Object)
|
||||
' Aggiorno valore depth
|
||||
'NotifyPropertyChanged("Depth")
|
||||
' La modifica di alcuni parametri forza il ricalcolo della geometria
|
||||
Dim ModifiedGeometry As Boolean = m_IsModifiedSelectedFaceUseType
|
||||
' aggiorno valori modificati
|
||||
WriteMachiningParam()
|
||||
' Carico tutta la geometria selezionata in una lista
|
||||
@@ -2744,7 +2979,6 @@ Namespace EgtCAM5
|
||||
SelectedGeometry.Add(EntityIndex)
|
||||
EntityIndex = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Dim ModifiedGeometry As Boolean = False
|
||||
' Gestione speciale provvisoria per una sola superficie con identificazione faccia
|
||||
If SelectedGeometry.Count = 1 AndAlso EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Then
|
||||
' Verifico se la superficie è cambiata
|
||||
@@ -2759,7 +2993,7 @@ Namespace EgtCAM5
|
||||
ModifiedGeometry = True
|
||||
EgtSetMachiningGeometry(SelectedGeometry.ToArray, SubEntityArray)
|
||||
End If
|
||||
' Gestione standard per curve
|
||||
' Gestione standard per curve
|
||||
Else
|
||||
' Verifico se la geometria è cambiata, confrontando selezione attuale con geometria di lavorazione
|
||||
Dim CountIndex As Integer = 0
|
||||
@@ -2784,11 +3018,15 @@ Namespace EgtCAM5
|
||||
If ModifiedGeometry Then EgtSetMachiningGeometry(SelectedGeometry.ToArray)
|
||||
End If
|
||||
' Ricalcolo la lavorazione
|
||||
If EgtApplyMachining(ModifiedGeometry) Then
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
Else
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
If Not EgtApplyMachining(ModifiedGeometry) Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
+28
-2
@@ -684,18 +684,32 @@ Namespace EgtCAM5
|
||||
''' Execute the Point. This method is invoked by the PointCommand.
|
||||
''' </summary>
|
||||
Public Sub Update()
|
||||
Application.Current.MainWindow.ForceCursor = True
|
||||
Application.Current.MainWindow.Cursor = Cursors.Wait
|
||||
' Recupero fase corrente e lavorazione corrente
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nCurrMach As Integer = EgtGetCurrMachining()
|
||||
' Ricalcolo la lavorazione per tutte le operazioni della lista
|
||||
Dim bOk As Boolean = True
|
||||
Dim sErr As String = String.Empty
|
||||
For Each Operation In OperationList
|
||||
If Operation.Type = MCH_OY.DISP Then
|
||||
EgtSetCurrPhase(EgtGetOperationPhase(Operation.Id))
|
||||
EgtSpecialApplyDisposition(Operation.Id, True)
|
||||
If Not EgtSpecialApplyDisposition(Operation.Id, True) Then
|
||||
bOk = False
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
sErr &= EgtGetLastMachMgrErrorString() & Environment.NewLine
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If EgtGetOperationMode(Operation.Id) Then
|
||||
EgtSetCurrMachining(Operation.Id)
|
||||
EgtApplyMachining(True)
|
||||
If Not EgtApplyMachining(True) Then
|
||||
bOk = False
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
sErr &= EgtGetLastMachMgrErrorString() & Environment.NewLine
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -707,6 +721,18 @@ Namespace EgtCAM5
|
||||
EgtResetCurrMachining()
|
||||
End If
|
||||
EgtDraw()
|
||||
Application.Current.MainWindow.ForceCursor = False
|
||||
Application.Current.MainWindow.Cursor = Cursors.Arrow
|
||||
' In caso di errori, li segnalo
|
||||
If Not bOk Then
|
||||
If Not String.IsNullOrEmpty(sErr) Then
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_OPERATION + 11))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' UpdateCommand
|
||||
|
||||
+16
-3
@@ -383,7 +383,12 @@ Namespace EgtCAM5
|
||||
End If
|
||||
Dim sInfo As String = "EgtCAM5 - " & sCurrFilePath
|
||||
If Not EgtGenerate(Path.ChangeExtension(sCurrFilePath, ".cnc"), sInfo) Then
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 32))
|
||||
End If
|
||||
@@ -404,8 +409,16 @@ Namespace EgtCAM5
|
||||
m_SliderX = GetPrivateProfileDouble(S_SIMUL, K_SLIDERX, 1)
|
||||
Dim SliderVal As Double = GetPrivateProfileDouble(S_SIMUL, K_SLIDERVAL, 10)
|
||||
SliderValue = SliderVal
|
||||
' Porto la testa in home
|
||||
EgtSimStart()
|
||||
' Inizio simulazione
|
||||
If Not EgtSimStart() Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
ShowCncData()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user