diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb
index 711c816..fee7ba4 100644
--- a/Constants/ConstIni.vb
+++ b/Constants/ConstIni.vb
@@ -181,6 +181,7 @@ Module ConstIni
Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining"
Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling"
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
+ Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index 220d32c..90337b1 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -191,6 +191,9 @@
StoneDrillingParameterExpanderV.xaml
+
+ SurfRoughingParameterExpanderV.xaml
+
WoodDrillingParameterExpanderV.xaml
@@ -497,6 +500,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
index 2841fc3..84b4946 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
@@ -85,6 +85,7 @@ Public Class MachiningParameterExpanderVM
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
Dim WjParamExpanderV As WaterjettingParameterExpanderV
Dim FiveAxExpanderV As FiveAxisMachinigParameterExpanderV
+ Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
Private Sub Dummy()
@@ -217,6 +218,10 @@ Public Class MachiningParameterExpanderVM
If IsNothing(FiveAxExpanderV) Then FiveAxExpanderV = New FiveAxisMachinigParameterExpanderV
FiveAxExpanderV.DataContext = m_CurrOperation
Return FiveAxExpanderV
+ Case MCH_OY.SURFROUGHING
+ If IsNothing(SurfRoughExpanderV) Then SurfRoughExpanderV = New SurfRoughingParameterExpanderV
+ SurfRoughExpanderV.DataContext = m_CurrOperation
+ Return SurfRoughExpanderV
End Select
'MachiningParameterExpanderItem.ReadOperationParam()
@@ -508,6 +513,8 @@ Public Class OperationParamVisibilityConverter
Return TMDbParamVisibility.Chiseling(CInt(parameter))
Case MCH_OY.SURFFINISHING
Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
+ Case MCH_OY.SURFROUGHING
+ Return TMDbParamVisibility.SurfRoughing(CInt(parameter))
Case MCH_OY.WATERJETTING
Return TMDbParamVisibility.WaterJetting(CInt(parameter))
Case MCH_OY.FIVEAXISMILLING
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml
new file mode 100644
index 0000000..780af27
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml
@@ -0,0 +1,347 @@
+
+
+
+
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml.vb
new file mode 100644
index 0000000..eb18a26
--- /dev/null
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfRoughingParameterExpanderV.xaml.vb
@@ -0,0 +1,83 @@
+Imports EgtWPFLib5.EgtFloating
+
+Public Class SurfRoughingParameterExpanderV
+
+ Private m_RightTrayV As RightTrayV
+ Private EgtFloatingPanel As EgtFloatingPanel
+
+ Private m_bFirst As Boolean = True
+
+ Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
+ If m_bFirst Then
+ m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
+ EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
+ AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
+ PanelHeight = EgtFloatingPanel.DesiredSize.Height
+ Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
+ m_bFirst = False
+ End If
+ CalculateOperationParametersStackPanelMaxHeight()
+ End Sub
+
+ Dim m_bSizeChanging As Boolean = False
+
+ Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
+ If m_bSizeChanging Then Return
+ m_bSizeChanging = True
+ CalculateOperationParametersStackPanelMaxHeight()
+ m_bSizeChanging = False
+ End Sub
+
+ Dim PanelHeight As Double = 0
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+
+ ' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
+ Private Sub CalculateOperationParametersStackPanelMaxHeight()
+ Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
+ Dim OpenedExpanderList As New List(Of Boolean)
+ For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If IndexedExpander.IsExpanded Then
+ OpenedExpanderList.Add(True)
+ IndexedExpander.IsExpanded = False
+ Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
+ CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
+ AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
+ ' Sottraggo anche i padding
+ AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Else
+ OpenedExpanderList.Add(False)
+ End If
+ Next
+ Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
+ AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
+ For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
+ If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
+ Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
+ If OpenedExpanderList(Index) Then
+ IndexedExpander.IsExpanded = True
+ End If
+ End If
+ Next
+ End Sub
+
+ ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
+ Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
+ Dim target As DependencyObject = dependencyObject
+ Do
+ target = LogicalTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ If IsNothing(target) Then
+ target = dependencyObject
+ Do
+ target = VisualTreeHelper.GetParent(target)
+ Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
+ End If
+ Return TryCast(target, T)
+ End Function
+
+End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
index ea9a84d..7bc7e2f 100644
--- a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
@@ -170,6 +170,8 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling
Case MCH_OY.SURFFINISHING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing
+ Case MCH_OY.SURFROUGHING
+ Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfRoughing
Case MCH_OY.WATERJETTING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
Case MCH_OY.FIVEAXISMILLING
diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb
index 747ded3..f29421e 100644
--- a/OptionsWindow/OptionModule.vb
+++ b/OptionsWindow/OptionModule.vb
@@ -53,6 +53,7 @@ Friend Module OptionModule
Friend m_SelGeomGenMachining As SceneSelModeOpt
Friend m_SelGeomChiseling As SceneSelModeOpt
Friend m_SelGeomSurfFinishing As SceneSelModeOpt
+ Friend m_SelGeomSurfRoughing As SceneSelModeOpt
Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
@@ -142,6 +143,8 @@ Friend Module OptionModule
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFFINISHING, -1)
m_SelGeomSurfFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
+ Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFROUGHING, -1)
+ m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
diff --git a/OptionsWindow/OptionWindowV.xaml b/OptionsWindow/OptionWindowV.xaml
index e085c11..f70e3ef 100644
--- a/OptionsWindow/OptionWindowV.xaml
+++ b/OptionsWindow/OptionWindowV.xaml
@@ -9,7 +9,7 @@
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
- Width="400" Height="500"
+ Width="400" Height="520"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
@@ -277,7 +277,7 @@
-
+
diff --git a/OptionsWindow/OptionWindowVM.vb b/OptionsWindow/OptionWindowVM.vb
index e82b1ea..b3e43a3 100644
--- a/OptionsWindow/OptionWindowVM.vb
+++ b/OptionsWindow/OptionWindowVM.vb
@@ -148,16 +148,16 @@ Public Class OptionWindowVM
End Set
End Property
- 'Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
- ' Get
- ' Return OptionModule.m_SelGeomSurfRoughing
- ' End Get
- ' Set(value As SceneSelModeOpt)
- ' If WritePrivateProfileString(S_MACH, K_SELGEOMSURFROUGHING, CInt(value).ToString()) Then
- ' OptionModule.m_SelGeomSurfRoughing = value
- ' End If
- ' End Set
- 'End Property
+ Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
+ Get
+ Return OptionModule.m_SelGeomSurfRoughing
+ End Get
+ Set(value As SceneSelModeOpt)
+ If WritePrivateProfileString(S_MACH, K_SELGEOMSURFROUGHING, CInt(value).ToString()) Then
+ OptionModule.m_SelGeomSurfRoughing = value
+ End If
+ End Set
+ End Property
Public Property SelectedSurfFinishGeomType As SceneSelModeOpt
Get
@@ -191,6 +191,7 @@ Public Class OptionWindowVM
End If
End Set
End Property
+
Public Property GeometryTolerance As String
Get
Return LenToString(OptionModule.m_dGeometryTolerance, 5)
@@ -959,6 +960,12 @@ Public Class OptionWindowVM
End Get
End Property
+ Public ReadOnly Property GeomTypeSurRoughMsg As String
+ Get
+ Return EgtMsg(31212)
+ End Get
+ End Property
+
#End Region
#Region "COMMANDS"
diff --git a/Utility/TMDbParamVisibility.vb b/Utility/TMDbParamVisibility.vb
index 45f9330..5464958 100644
--- a/Utility/TMDbParamVisibility.vb
+++ b/Utility/TMDbParamVisibility.vb
@@ -28,6 +28,7 @@
Friend SurfFinishing(63) As Visibility
Friend WaterJetting(63) As Visibility
Friend FiveAxMachining(63) As Visibility
+ Friend SurfRoughing(63) As Visibility
' Array che contiene il valore della proprietà visibility per ogni campo delle operazioni
Friend OperationDisposition(49) As Visibility
@@ -1123,6 +1124,72 @@
FiveAxMachining(62) = Visibility.Collapsed ' TabMax
FiveAxMachining(63) = Visibility.Collapsed ' TabMin
+ ' Parametri SurfRoughing
+ SurfRoughing(0) = Visibility.Visible ' Invert
+ SurfRoughing(1) = Visibility.Collapsed ' LeaveTab
+ SurfRoughing(2) = Visibility.Collapsed ' WorkSide
+ SurfRoughing(3) = Visibility.Collapsed ' HeadSide
+ SurfRoughing(4) = Visibility.Visible ' LeadInType
+ SurfRoughing(5) = Visibility.Collapsed ' ExtLinkType
+ SurfRoughing(6) = Visibility.Visible ' LeadOutType
+ SurfRoughing(7) = Visibility.Collapsed ' CurveUse
+ SurfRoughing(8) = Visibility.Collapsed ' StepType
+ SurfRoughing(9) = Visibility.Visible ' LeadLinkType
+ SurfRoughing(10) = Visibility.Visible ' Speed
+ SurfRoughing(11) = Visibility.Visible ' Feed
+ SurfRoughing(12) = Visibility.Visible ' StartFeed
+ SurfRoughing(13) = Visibility.Visible ' EndFeed
+ SurfRoughing(14) = Visibility.Visible ' TipFeed
+ SurfRoughing(15) = Visibility.Visible ' OffSr
+ SurfRoughing(16) = Visibility.Collapsed ' OffSl
+ SurfRoughing(17) = Visibility.Visible ' SideAngle
+ SurfRoughing(18) = Visibility.Visible ' Approx
+ SurfRoughing(19) = Visibility.Visible ' StartPos
+ SurfRoughing(20) = Visibility.Collapsed ' StartSlowLen
+ SurfRoughing(21) = Visibility.Collapsed ' EndSlowLen
+ SurfRoughing(22) = Visibility.Collapsed ' ThroughAddlen
+ SurfRoughing(23) = Visibility.Collapsed ' StepPar
+ SurfRoughing(24) = Visibility.Collapsed ' Returnpos
+ SurfRoughing(25) = Visibility.Collapsed ' TabLen
+ SurfRoughing(26) = Visibility.Collapsed ' TabDist
+ SurfRoughing(27) = Visibility.Collapsed ' TabHeight
+ SurfRoughing(28) = Visibility.Collapsed ' TabAngle
+ SurfRoughing(29) = Visibility.Visible ' LiTang
+ SurfRoughing(30) = Visibility.Visible ' LiPerp
+ SurfRoughing(31) = Visibility.Collapsed ' LiElev
+ SurfRoughing(32) = Visibility.Collapsed ' LiCompLen
+ SurfRoughing(33) = Visibility.Visible ' LoTang
+ SurfRoughing(34) = Visibility.Visible ' LoPerp
+ SurfRoughing(35) = Visibility.Collapsed ' LoElev
+ SurfRoughing(36) = Visibility.Collapsed ' LoCompLen
+ SurfRoughing(37) = Visibility.Collapsed ' StartAddLen
+ SurfRoughing(38) = Visibility.Collapsed ' EndAddLen
+ SurfRoughing(39) = Visibility.Collapsed ' StepExtArc
+ SurfRoughing(40) = Visibility.Collapsed ' StepIntArc
+ SurfRoughing(41) = Visibility.Visible ' SideStep
+ SurfRoughing(42) = Visibility.Collapsed ' VertFeed
+ SurfRoughing(43) = Visibility.Visible ' Name
+ SurfRoughing(44) = Visibility.Visible ' Tool
+ SurfRoughing(45) = Visibility.Visible ' DepthStr
+ SurfRoughing(46) = Visibility.Visible ' UserNotes
+ SurfRoughing(47) = Visibility.Visible ' OverLapStr
+ SurfRoughing(48) = Visibility.Collapsed ' OffsetStr
+ SurfRoughing(49) = Visibility.Visible ' SubType
+ SurfRoughing(50) = Visibility.Visible ' SelectedSolChoiceType
+ SurfRoughing(51) = Visibility.Visible ' AxRotRef
+ SurfRoughing(52) = Visibility.Visible ' BlockedAxesRef
+ SurfRoughing(53) = Visibility.Collapsed ' FaceUseType
+ SurfRoughing(54) = Visibility.Collapsed ' InvertToolDir
+ SurfRoughing(55) = Visibility.Visible ' Expander LeadIn
+ SurfRoughing(56) = Visibility.Visible ' Expander LeadOut
+ SurfRoughing(57) = Visibility.Visible ' ApproxGen
+ SurfRoughing(58) = Visibility.Collapsed ' OscEnable
+ SurfRoughing(59) = Visibility.Collapsed ' OscHeight
+ SurfRoughing(60) = Visibility.Collapsed ' OscRampLen
+ SurfRoughing(61) = Visibility.Collapsed ' OscFlatLen
+ SurfRoughing(62) = Visibility.Collapsed ' TabMax
+ SurfRoughing(63) = Visibility.Collapsed ' TabMin
+
End Sub
End Module