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:
Dario Sassi
2017-05-31 14:25:44 +00:00
parent 4ce3213e69
commit da569de0a3
12 changed files with 675 additions and 186 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
Public Const MSG_TOOLSDBPAGE As Integer = MSG_EGTCAM5 + 1000
Public Const MSG_TOOLSERRORS As Integer = MSG_EGTCAM5 + 1100
Public Const MSG_MACHININGSDBPAGE As Integer = MSG_EGTCAM5 + 1200
Public Const MSG_MACHININGSERRORS As Integer = MSG_EGTCAM5 + 1350
Public Const MSG_MACHININGSERRORS As Integer = MSG_EGTCAM5 + 1370
Public Const MSG_MACHININGOPTIONPAGE As Integer = MSG_EGTCAM5 + 1400
Public Const MSG_SETUP As Integer = MSG_EGTCAM5 + 1450
Public Const MSG_SETUPERRORS As Integer = MSG_EGTCAM5 + 1470
+9 -3
View File
@@ -25,14 +25,20 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Columns="2" Margin="0,0,0,5">
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding SafeZMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding SafeZ}" Height="25" Margin="5,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding SafeAggrBottZMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding SafeAggrBottZ}" Height="25" Margin="5,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="2" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding SplitArcsMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding SplitArcsList}" Height="25" Margin="5,0,0,0"
SelectedItem="{Binding SelectedSplitArcs}">
@@ -44,7 +50,7 @@
</ComboBox>
</UniformGrid>
<UniformGrid Grid.Row="2" Columns="2">
<UniformGrid Grid.Row="3" Columns="2">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="5,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+26
View File
@@ -19,6 +19,20 @@ Namespace EgtCAM5
End Set
End Property
Private m_dSafeAggrBottZ As String
Public Property SafeAggrBottZ As String
Get
Return m_dSafeAggrBottZ
End Get
Set(value As String)
Dim dSafeAggrBottZ As Double = 0
StringToLen(value, dSafeAggrBottZ)
EgtMdbSetGeneralParam(MCH_GP.SAFEAGGRBOTTZ, dSafeAggrBottZ)
EgtMdbSave()
m_dSafeAggrBottZ = value
End Set
End Property
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
Get
@@ -65,11 +79,19 @@ Namespace EgtCAM5
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 1)
End Get
End Property
Public ReadOnly Property SafeAggrBottZMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 8)
End Get
End Property
Public ReadOnly Property SplitArcsMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 2)
End Get
End Property
Public ReadOnly Property DefaultSetUpMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
@@ -86,6 +108,10 @@ Namespace EgtCAM5
Dim dVal As Double = 0
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, dVal)
m_dSafeZ = LenToString(dVal, 2)
' Leggo distanza di sicurezza per rinvii da sotto
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.SAFEAGGRBOTTZ, dVal)
m_dSafeAggrBottZ = LenToString(dVal, 2)
' Leggo tipo di spezzatura archi
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
+57 -10
View File
@@ -575,6 +575,48 @@ Public Class MachiningTreeViewItem
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_SAW_EL)
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 DbSolChoiceType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, DbSolChoiceType)
DbSolChoiceType = IdNameStruct.IndFromId(DbSolChoiceType, SolChoiceTypeList)
m_IsModifiedSelectedSolChoiceType = If(value <> DbSolChoiceType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid And (IsModified Or NewMachining), True)
NotifyPropertyChanged("SelectedSolChoiceType")
End If
End If
End Set
End Property
Private m_IsModifiedSpeed As Boolean = False
Private m_Speed As String
''' <summary>
@@ -1596,6 +1638,8 @@ Public Class MachiningTreeViewItem
SelectedSubType = If(IsNothing(SubTypeList), nValue, IdNameStruct.IndFromId(nValue, SubTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nValue)
SelectedLeadLinkType = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
SelectedSolChoiceType = If(IsNothing(SolChoiceTypeList), nValue, IdNameStruct.IndFromId(nValue, SolChoiceTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.SPEED, dValue)
Speed = DoubleToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dValue)
@@ -1720,6 +1764,8 @@ Public Class MachiningTreeViewItem
nValue = If(IsNothing(SubTypeList), m_SelectedSubType, IdNameStruct.IdFromInd(m_SelectedSubType, SubTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, nValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, SelectedLeadLinkType)
nValue = If(IsNothing(SolChoiceTypeList), m_SelectedSolChoiceType, IdNameStruct.IdFromInd(m_SelectedSolChoiceType, SolChoiceTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
StringToDouble(Speed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.SPEED, dValue)
StringToLen(Feed, dValue)
@@ -1856,16 +1902,17 @@ Public Class MachiningTreeViewItem
Public ReadOnly Property IsModified() As Boolean
Get
Return m_IsModifiedInvert OrElse m_IsModifiedLeaveTab OrElse m_IsModifiedSelectedWorkSide OrElse m_IsModifiedSelectedHeadSide OrElse m_IsModifiedSelectedLeadInType _
OrElse m_IsModifiedSelectedExtLinkType OrElse m_IsModifiedSelectedLeadOutType OrElse m_IsModifiedSelectedCurveUse OrElse m_IsModifiedSelectedStepType _
OrElse m_IsModifiedSelectedSubType OrElse m_IsModifiedSelectedLeadLinkType OrElse m_IsModifiedSpeed OrElse m_IsModifiedFeed OrElse m_IsModifiedStartFeed _
OrElse m_IsModifiedEndFeed OrElse m_IsModifiedTipFeed OrElse m_IsModifiedOffSr OrElse m_IsModifiedOffSl OrElse m_IsModifiedSideAngle OrElse m_IsModifiedApprox _
OrElse m_IsModifiedStartPos OrElse m_IsModifiedStartSlowLen OrElse m_IsModifiedEndSlowLen OrElse m_IsModifiedThrouAddLen OrElse m_IsModifiedStepPar _
OrElse m_IsModifiedReturnPos OrElse m_IsModifiedTabLen OrElse m_IsModifiedTabDist OrElse m_IsModifiedTabHeight OrElse m_IsModifiedTabAngle _
OrElse m_IsModifiedLiTang OrElse m_IsModifiedLiPerp OrElse m_IsModifiedLiElev OrElse m_IsModifiedLiCompLen OrElse m_IsModifiedLoTang OrElse m_IsModifiedLoPerp _
OrElse m_IsModifiedLoElev OrElse m_IsModifiedLoCompLen OrElse m_IsModifiedStartAddLen OrElse m_IsModifiedEndAddLen OrElse m_IsModifiedStepExtArc _
OrElse m_IsModifiedStepIntArc OrElse m_IsModifiedSideStep OrElse m_IsModifiedVertFeed OrElse m_IsModifiedName OrElse m_IsModifiedSelectedTool _
OrElse m_IsModifiedDepthStr OrElse m_IsModifiedUserNotes OrElse m_IsModifiedOverLap
Return m_IsModifiedInvert OrElse m_IsModifiedLeaveTab OrElse m_IsModifiedSelectedWorkSide OrElse m_IsModifiedSelectedHeadSide OrElse m_IsModifiedSelectedLeadInType OrElse
m_IsModifiedSelectedExtLinkType OrElse m_IsModifiedSelectedLeadOutType OrElse m_IsModifiedSelectedCurveUse OrElse m_IsModifiedSelectedStepType OrElse
m_IsModifiedSelectedSubType OrElse m_IsModifiedSelectedLeadLinkType OrElse m_IsModifiedSelectedSolChoiceType OrElse
m_IsModifiedSpeed OrElse m_IsModifiedFeed OrElse m_IsModifiedStartFeed OrElse
m_IsModifiedEndFeed OrElse m_IsModifiedTipFeed OrElse m_IsModifiedOffSr OrElse m_IsModifiedOffSl OrElse m_IsModifiedSideAngle OrElse m_IsModifiedApprox OrElse
m_IsModifiedStartPos OrElse m_IsModifiedStartSlowLen OrElse m_IsModifiedEndSlowLen OrElse m_IsModifiedThrouAddLen OrElse m_IsModifiedStepPar OrElse
m_IsModifiedReturnPos OrElse m_IsModifiedTabLen OrElse m_IsModifiedTabDist OrElse m_IsModifiedTabHeight OrElse m_IsModifiedTabAngle OrElse
m_IsModifiedLiTang OrElse m_IsModifiedLiPerp OrElse m_IsModifiedLiElev OrElse m_IsModifiedLiCompLen OrElse m_IsModifiedLoTang OrElse m_IsModifiedLoPerp OrElse
m_IsModifiedLoElev OrElse m_IsModifiedLoCompLen OrElse m_IsModifiedStartAddLen OrElse m_IsModifiedEndAddLen OrElse m_IsModifiedStepExtArc OrElse
m_IsModifiedStepIntArc OrElse m_IsModifiedSideStep OrElse m_IsModifiedVertFeed OrElse m_IsModifiedName OrElse m_IsModifiedSelectedTool OrElse
m_IsModifiedDepthStr OrElse m_IsModifiedUserNotes OrElse m_IsModifiedOverLap
End Get
End Property
+156 -1
View File
@@ -71,6 +71,11 @@
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLap">47</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SelectedSolChoiceType">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>
</EgtWPFLib5:EgtCustomWindow.Resources>
@@ -1368,8 +1373,158 @@
</Grid>
</UniformGrid>
<UniformGrid Columns="2">
</StackPanel>
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource AxRotRef}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding AxRotRefTxBl}" Style="{StaticResource MachiningsTextBlock}"
Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource AxRotRef}}"/>
<EgtWPFLib5:EgtTextBox Name="AxRotRefTxBx" Grid.Column="1" Style="{StaticResource MachiningsTextBox}"
Text="{Binding Path=SelectedItem.AxRotRef,
ElementName=MachiningsTreeView, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Path=SelectedItem.Type,
ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource AxRotRef}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=SideStepTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
</Grid>
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource BlockedAxesRef}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding BlockedAxesRefTxBl}" Style="{StaticResource MachiningsTextBlock}"
Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource BlockedAxesRef}}"/>
<EgtWPFLib5:EgtTextBox Name="BlockedAxesRefTxBx" Grid.Column="1" Style="{StaticResource MachiningsTextBox}"
Text="{Binding Path=SelectedItem.BlockedAxesRef,
ElementName=MachiningsTreeView, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Path=SelectedItem.Type,
ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource BlockedAxesRef}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=SideStepTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
</Grid>
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource FaceUseType}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding FaceUseTypeTxBl}" Style="{StaticResource MachiningsTextBlock}"
Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource FaceUseType}}"/>
<ComboBox Grid.Column="1" ItemsSource="{Binding Path=SelectedItem.FaceUseTypeList,
ElementName=MachiningsTreeView, Mode=OneWay}"
Style="{StaticResource MachiningsComboBox}"
SelectedIndex="{Binding Path=SelectedItem.SelFaceUseType,
ElementName=MachiningsTreeView}"
IsSynchronizedWithCurrentItem="True"
Visibility="{Binding Path=SelectedItem.Type,
ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource FaceUseType}}"/>
</Grid>
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource InvertToolDir}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding InvertToolDirTxBl}" Style="{StaticResource MachiningsTextBlock}"
Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource InvertToolDir}}"/>
<CheckBox Name="InvertToolDirTxBx" Grid.Column="1" Height="20" Width="20" Margin="10,5,0,0"
IsChecked="{Binding Path=SelectedItem.InvertToolDir,
ElementName=MachiningsTreeView, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Path=SelectedItem.Type,
ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource InvertToolDir}}"/>
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
Content="{Binding ElementName=LeaveTabTxBx,
Path=(Validation.Errors).CurrentItem,
UpdateSourceTrigger=PropertyChanged}"/>-->
</Grid>
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource SelectedSolChoiceType}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding SolChoiceTypeTxBl}" Style="{StaticResource MachiningsTextBlock}"
Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource SelectedSolChoiceType}}"/>
<ComboBox Grid.Column="1" ItemsSource="{Binding Path=SelectedItem.SolChoiceTypeList,
ElementName=MachiningsTreeView, Mode=OneWay}"
Style="{StaticResource MachiningsComboBox}"
SelectedIndex="{Binding Path=SelectedItem.SelectedSolChoiceType,
ElementName=MachiningsTreeView}"
IsSynchronizedWithCurrentItem="True"
Visibility="{Binding Path=SelectedItem.Type,
ElementName=MachiningsTreeView,
Converter={StaticResource MachiningParamVisibilityConverter},
ConverterParameter={StaticResource SelectedSolChoiceType}}"/>
</Grid>
</UniformGrid>
</StackPanel>
<Grid Grid.Row="2">
<Grid Visibility="{Binding Path=SelectedItem.Type, ElementName=MachiningsTreeView,
@@ -119,6 +119,12 @@ Namespace EgtCAM5
End Get
End Property
Public ReadOnly Property SolChoiceTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
End Get
End Property
Public ReadOnly Property SpeedTxBl As String
Get
Return EgtMsg(MSG_MACHININGSDBPAGE + 63)
+2 -2
View File
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.8.5.2")>
<Assembly: AssemblyFileVersion("1.8.5.2")>
<Assembly: AssemblyVersion("1.8.5.3")>
<Assembly: AssemblyFileVersion("1.8.5.3")>
@@ -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}}"
@@ -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
@@ -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
@@ -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
+75 -156
View File
@@ -15,15 +15,15 @@
Friend Compo(25) As Visibility
' Array che contiene il valore della proprietà visibility per ogni campo della lavorazione
Friend Milling(49) As Visibility
Friend Drilling(49) As Visibility
Friend Sawing(49) As Visibility
Friend Pocketing(49) As Visibility
Friend Mortising(49) As Visibility
Friend Sawroughing(49) As Visibility
Friend Sawfinishing(49) As Visibility
Friend GenMachining(49) As Visibility
Friend Chiseling(49) As Visibility
Friend Milling(54) As Visibility
Friend Drilling(54) As Visibility
Friend Sawing(54) As Visibility
Friend Pocketing(54) As Visibility
Friend Mortising(54) As Visibility
Friend Sawroughing(54) As Visibility
Friend Sawfinishing(54) As Visibility
Friend GenMachining(54) As Visibility
Friend Chiseling(54) As Visibility
' Array che contiene il valore della proprietà visibility per ogni campo delle operazioni
Friend OperationDisposition(49) As Visibility
@@ -283,7 +283,7 @@
' Parametri Milling
Milling(0) = Visibility.Visible ' Invert
Milling(1) = Visibility.Visible ' LeaveTab
Milling(1) = Visibility.Collapsed ' LeaveTab
Milling(2) = Visibility.Visible ' WorkSide
Milling(3) = Visibility.Collapsed ' HeadSide
Milling(4) = Visibility.Visible ' LeadInType
@@ -307,10 +307,10 @@
Milling(22) = Visibility.Collapsed ' ThroughAddlen
Milling(23) = Visibility.Visible ' StepPar
Milling(24) = Visibility.Collapsed ' ReturnPos
Milling(25) = Visibility.Visible ' TabLen
Milling(26) = Visibility.Visible ' TabDist
Milling(27) = Visibility.Visible ' TabHeight
Milling(28) = Visibility.Visible ' TabAngle
Milling(25) = Visibility.Collapsed ' TabLen
Milling(26) = Visibility.Collapsed ' TabDist
Milling(27) = Visibility.Collapsed ' TabHeight
Milling(28) = Visibility.Collapsed ' TabAngle
Milling(29) = Visibility.Visible ' LiTang
Milling(30) = Visibility.Visible ' LiPerp
Milling(31) = Visibility.Visible ' LiElev
@@ -332,6 +332,11 @@
Milling(47) = Visibility.Visible ' OverLapStr
Milling(48) = Visibility.Collapsed ' OffsetStr
Milling(49) = Visibility.Collapsed ' SubType
Milling(50) = Visibility.Visible ' SelectedSolChoiceType
Milling(51) = Visibility.Visible ' AxRotRef
Milling(52) = Visibility.Visible ' BlockedAxesRef
Milling(53) = Visibility.Visible ' FaceUseType
Milling(54) = Visibility.Visible ' InvertToolDir
' Parametri Drilling
Drilling(0) = Visibility.Visible ' Invert
@@ -384,6 +389,11 @@
Drilling(47) = Visibility.Collapsed ' OverLapStr
Drilling(48) = Visibility.Collapsed ' OffsetStr
Drilling(49) = Visibility.Collapsed ' SubType
Drilling(50) = Visibility.Visible ' SelectedSolChoiceType
Drilling(51) = Visibility.Visible ' AxRotRef
Drilling(52) = Visibility.Visible ' BlockedAxesRef
Drilling(53) = Visibility.Collapsed ' FaceUseType
Drilling(54) = Visibility.Collapsed ' InvertToolDir
' Parametri Sawing
Sawing(0) = Visibility.Visible ' Invert
@@ -436,6 +446,11 @@
Sawing(47) = Visibility.Collapsed ' OverLapStr
Sawing(48) = Visibility.Collapsed ' OffsetStr
Sawing(49) = Visibility.Collapsed ' SubType
Sawing(50) = Visibility.Visible ' SelectedSolChoiceType
Sawing(51) = Visibility.Visible ' AxRotRef
Sawing(52) = Visibility.Visible ' BlockedAxesRef
Sawing(53) = Visibility.Collapsed ' FaceUseType
Sawing(54) = Visibility.Collapsed ' InvertToolDir
' Parametri Pocketing
Pocketing(0) = Visibility.Visible ' Invert
@@ -488,6 +503,11 @@
Pocketing(47) = Visibility.Collapsed ' OverLapStr
Pocketing(48) = Visibility.Collapsed ' OffsetStr
Pocketing(49) = Visibility.Visible ' SubType
Pocketing(50) = Visibility.Visible ' SelectedSolChoiceType
Pocketing(51) = Visibility.Visible ' AxRotRef
Pocketing(52) = Visibility.Visible ' BlockedAxesRef
Pocketing(53) = Visibility.Collapsed ' FaceUseType
Pocketing(54) = Visibility.Visible ' InvertToolDir
' Parametri Mortising
Mortising(0) = Visibility.Visible ' Invert
@@ -540,6 +560,11 @@
Mortising(47) = Visibility.Collapsed ' OverLapStr
Mortising(48) = Visibility.Collapsed ' OffsetStr
Mortising(49) = Visibility.Collapsed ' SubType
Mortising(50) = Visibility.Visible ' SelectedSolChoiceType
Mortising(51) = Visibility.Visible ' AxRotRef
Mortising(52) = Visibility.Visible ' BlockedAxesRef
Mortising(53) = Visibility.Collapsed ' FaceUseType
Mortising(54) = Visibility.Collapsed ' InvertToolDir
' Parametri Sawroughing
Sawroughing(0) = Visibility.Visible ' Invert
@@ -592,6 +617,11 @@
Sawroughing(47) = Visibility.Collapsed ' OverLapStr
Sawroughing(48) = Visibility.Collapsed ' OffsetStr
Sawroughing(49) = Visibility.Collapsed ' SubType
Sawroughing(50) = Visibility.Visible ' SelectedSolChoiceType
Sawroughing(51) = Visibility.Visible ' AxRotRef
Sawroughing(52) = Visibility.Visible ' BlockedAxesRef
Sawroughing(53) = Visibility.Collapsed ' FaceUseType
Sawroughing(54) = Visibility.Collapsed ' InvertToolDir
' Parametri Sawfinishing
Sawfinishing(0) = Visibility.Visible ' Invert
@@ -644,6 +674,11 @@
Sawfinishing(47) = Visibility.Collapsed ' OverLapStr
Sawfinishing(48) = Visibility.Collapsed ' OffsetStr
Sawfinishing(49) = Visibility.Visible ' SubType
Sawfinishing(50) = Visibility.Visible ' SelectedSolChoiceType
Sawfinishing(51) = Visibility.Visible ' AxRotRef
Sawfinishing(52) = Visibility.Visible ' BlockedAxesRef
Sawfinishing(53) = Visibility.Collapsed ' FaceUseType
Sawfinishing(54) = Visibility.Collapsed ' InvertToolDir
' Parametri GenMachining
GenMachining(0) = Visibility.Visible ' Invert
@@ -696,6 +731,11 @@
GenMachining(47) = Visibility.Collapsed ' OverLapStr
GenMachining(48) = Visibility.Collapsed ' OffsetStr
GenMachining(49) = Visibility.Visible ' SubType
GenMachining(50) = Visibility.Visible ' SelectedSolChoiceType
GenMachining(51) = Visibility.Visible ' AxRotRef
GenMachining(52) = Visibility.Visible ' BlockedAxesRef
GenMachining(53) = Visibility.Collapsed ' FaceUseType
GenMachining(54) = Visibility.Collapsed ' InvertToolDir
' Parametri Chiseling
Chiseling(0) = Visibility.Visible ' Invert
@@ -748,150 +788,29 @@
Chiseling(47) = Visibility.Collapsed ' OverLapStr
Chiseling(48) = Visibility.Collapsed ' OffsetStr
Chiseling(49) = Visibility.Collapsed ' SubType
Chiseling(50) = Visibility.Visible ' SelectedSolChoiceType
Chiseling(51) = Visibility.Visible ' AxRotRef
Chiseling(52) = Visibility.Visible ' BlockedAxesRef
Chiseling(53) = Visibility.Collapsed ' FaceUseType
Chiseling(54) = Visibility.Visible ' InvertToolDir
' Parametri OperationDisposition
OperationDisposition(0) = Visibility.Collapsed ' BaseParameters
OperationDisposition(1) = Visibility.Collapsed ' GenericParameters
OperationDisposition(2) = Visibility.Collapsed ' LeadInTypeParameters
OperationDisposition(3) = Visibility.Collapsed ' LeadOutTypeParameters
OperationDisposition(4) = Visibility.Collapsed ' LeaveTabParameters
OperationDisposition(5) = Visibility.Collapsed ' ToolParameters
OperationDisposition(6) = Visibility.Collapsed ' OverLap
OperationDisposition(11) = Visibility.Collapsed ' ThrouAddLen
OperationDisposition(8) = Visibility.Collapsed ' StepType
OperationDisposition(9) = Visibility.Collapsed ' StartSlowLen
OperationDisposition(10) = Visibility.Collapsed ' EndSlowLen
OperationDisposition(11) = Visibility.Collapsed ' SideAngle
OperationDisposition(12) = Visibility.Collapsed ' OffsetSr
OperationDisposition(13) = Visibility.Collapsed ' OffsetSl
OperationDisposition(14) = Visibility.Collapsed ' WorkSide
OperationDisposition(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationDrilling
'OperationDrilling(0) = Visibility.Visible ' BaseParameters
'OperationDrilling(1) = Visibility.Visible ' GenericParameters
'OperationDrilling(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationDrilling(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationDrilling(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationDrilling(5) = Visibility.Visible ' ToolParameters
'OperationDrilling(6) = Visibility.Collapsed ' OverLap
'OperationDrilling(7) = Visibility.Visible ' ThrouAddLen
'OperationDrilling(8) = Visibility.Collapsed ' StepType
'OperationDrilling(9) = Visibility.Visible ' StartSlowLen
'OperationDrilling(10) = Visibility.Visible ' EndSlowLen
'OperationDrilling(11) = Visibility.Collapsed ' SideAngle
'OperationDrilling(12) = Visibility.Collapsed ' OffsetSr
'OperationDrilling(13) = Visibility.Collapsed ' OffsetSl
'OperationDrilling(14) = Visibility.Collapsed ' WorkSide
'OperationDrilling(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationSawing
'OperationSawing(0) = Visibility.Visible ' BaseParameters
'OperationSawing(1) = Visibility.Visible ' GenericParameters
'OperationSawing(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationSawing(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationSawing(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationSawing(5) = Visibility.Visible ' ToolParameters
'OperationSawing(6) = Visibility.Collapsed ' OverLap
'OperationSawing(7) = Visibility.Collapsed ' ThrouAddLen
'OperationSawing(8) = Visibility.Visible ' StepType
'OperationSawing(9) = Visibility.Collapsed ' StartSlowLen
'OperationSawing(10) = Visibility.Collapsed ' EndSlowLen
'OperationSawing(11) = Visibility.Visible ' SideAngle
'OperationSawing(12) = Visibility.Visible ' OffsetSr
'OperationSawing(13) = Visibility.Visible ' OffsetSl
'OperationSawing(14) = Visibility.Visible ' WorkSide
'OperationSawing(15) = Visibility.Visible ' HeadSide
'' Parametri OperationMilling
'OperationMilling(0) = Visibility.Visible ' BaseParameters
'OperationMilling(1) = Visibility.Visible ' GenericParameters
'OperationMilling(2) = Visibility.Visible ' LeadInTypeParameters
'OperationMilling(3) = Visibility.Visible ' LeadOutTypeParameters
'OperationMilling(4) = Visibility.Visible ' LeaveTabParameters
'OperationMilling(5) = Visibility.Visible ' ToolParameters
'OperationMilling(6) = Visibility.Visible ' OverLap
'OperationMilling(7) = Visibility.Collapsed ' ThrouAddLen
'OperationMilling(8) = Visibility.Visible ' StepType
'OperationMilling(9) = Visibility.Collapsed ' StartSlowLen
'OperationMilling(10) = Visibility.Collapsed ' EndSlowLen
'OperationMilling(11) = Visibility.Visible ' SideAngle
'OperationMilling(12) = Visibility.Visible ' OffsetSr
'OperationMilling(13) = Visibility.Visible ' OffsetSl
'OperationMilling(14) = Visibility.Visible ' WorkSide
'OperationMilling(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationPocketing
'OperationPocketing(0) = Visibility.Visible ' BaseParameters
'OperationPocketing(1) = Visibility.Visible ' GenericParameters
'OperationPocketing(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationPocketing(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationPocketing(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationPocketing(5) = Visibility.Visible ' ToolParameters
'OperationPocketing(6) = Visibility.Collapsed ' OverLap
'OperationPocketing(7) = Visibility.Collapsed ' ThrouAddLen
'OperationPocketing(8) = Visibility.Collapsed ' StepType
'OperationPocketing(9) = Visibility.Collapsed ' StartSlowLen
'OperationPocketing(10) = Visibility.Collapsed ' EndSlowLen
'OperationPocketing(11) = Visibility.Collapsed ' SideAngle
'OperationPocketing(12) = Visibility.Collapsed ' OffsetSr
'OperationPocketing(13) = Visibility.Collapsed ' OffsetSl
'OperationPocketing(14) = Visibility.Visible ' WorkSide
'OperationPocketing(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationMortising
'OperationMortising(0) = Visibility.Visible ' BaseParameters
'OperationMortising(1) = Visibility.Visible ' GenericParameters
'OperationMortising(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationMortising(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationMortising(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationMortising(5) = Visibility.Visible ' ToolParameters
'OperationMortising(6) = Visibility.Collapsed ' OverLap
'OperationMortising(7) = Visibility.Collapsed ' ThrouAddLen
'OperationMortising(8) = Visibility.Collapsed ' StepType
'OperationMortising(9) = Visibility.Collapsed ' StartSlowLen
'OperationMortising(10) = Visibility.Collapsed ' EndSlowLen
'OperationMortising(11) = Visibility.Collapsed ' SideAngle
'OperationMortising(12) = Visibility.Collapsed ' OffsetSr
'OperationMortising(13) = Visibility.Collapsed ' OffsetSl
'OperationMortising(14) = Visibility.Visible ' WorkSide
'OperationMortising(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationSawroughing
'OperationSawroughing(0) = Visibility.Visible ' BaseParameters
'OperationSawroughing(1) = Visibility.Visible ' GenericParameters
'OperationSawroughing(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationSawroughing(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationSawroughing(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationSawroughing(5) = Visibility.Visible ' ToolParameters
'OperationSawroughing(6) = Visibility.Collapsed ' OverLap
'OperationSawroughing(7) = Visibility.Collapsed ' ThrouAddLen
'OperationSawroughing(8) = Visibility.Collapsed ' StepType
'OperationSawroughing(9) = Visibility.Collapsed ' StartSlowLen
'OperationSawroughing(10) = Visibility.Collapsed ' EndSlowLen
'OperationSawroughing(11) = Visibility.Collapsed ' SideAngle
'OperationSawroughing(12) = Visibility.Collapsed ' OffsetSr
'OperationSawroughing(13) = Visibility.Collapsed ' OffsetSl
'OperationSawroughing(14) = Visibility.Visible ' WorkSide
'OperationSawroughing(15) = Visibility.Collapsed ' HeadSide
'' Parametri OperationSawfinishing
'OperationSawfinishing(0) = Visibility.Visible ' BaseParameters
'OperationSawfinishing(1) = Visibility.Visible ' GenericParameters
'OperationSawfinishing(2) = Visibility.Collapsed ' LeadInTypeParameters
'OperationSawfinishing(3) = Visibility.Collapsed ' LeadOutTypeParameters
'OperationSawfinishing(4) = Visibility.Collapsed ' LeaveTabParameters
'OperationSawfinishing(5) = Visibility.Visible ' ToolParameters
'OperationSawfinishing(6) = Visibility.Collapsed ' OverLap
'OperationSawfinishing(7) = Visibility.Collapsed ' ThrouAddLen
'OperationSawfinishing(8) = Visibility.Collapsed ' StepType
'OperationSawfinishing(9) = Visibility.Collapsed ' StartSlowLen
'OperationSawfinishing(10) = Visibility.Collapsed ' EndSlowLen
'OperationSawfinishing(11) = Visibility.Collapsed ' SideAngle
'OperationSawfinishing(12) = Visibility.Collapsed ' OffsetSr
'OperationSawfinishing(13) = Visibility.Collapsed ' OffsetSl
'OperationSawfinishing(14) = Visibility.Visible ' WorkSide
'OperationSawfinishing(15) = Visibility.Collapsed ' HeadSide
OperationDisposition(0) = Visibility.Collapsed
OperationDisposition(1) = Visibility.Collapsed
OperationDisposition(2) = Visibility.Collapsed
OperationDisposition(3) = Visibility.Collapsed
OperationDisposition(4) = Visibility.Collapsed
OperationDisposition(5) = Visibility.Collapsed
OperationDisposition(6) = Visibility.Collapsed
OperationDisposition(7) = Visibility.Collapsed
OperationDisposition(8) = Visibility.Collapsed
OperationDisposition(9) = Visibility.Collapsed
OperationDisposition(10) = Visibility.Collapsed
OperationDisposition(11) = Visibility.Collapsed
OperationDisposition(12) = Visibility.Collapsed
OperationDisposition(13) = Visibility.Collapsed
OperationDisposition(14) = Visibility.Collapsed
OperationDisposition(15) = Visibility.Collapsed
End Sub