OmagCUT:
- Aggiunti Mola (MillNoTip) al DB Utensili e Svuotatura (Pocketing) al DB Lavorazioni, con parametri uguali a Fresa e Fresatura
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
Public Const K_DRILLBIT As String = "Drillbit"
|
||||
Public Const K_SAWBLADE As String = "Sawblade"
|
||||
Public Const K_MILL As String = "Mill"
|
||||
Public Const K_MILLNOTIP As String = "MillNoTip"
|
||||
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
|
||||
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
|
||||
Public Const K_SHOWUSERNOTES As String = "ShowUserNotes"
|
||||
@@ -135,6 +136,7 @@
|
||||
Public Const K_SAWING As String = "Sawing"
|
||||
Public Const K_DRILLING As String = "Drilling"
|
||||
Public Const K_MILLING As String = "Milling"
|
||||
Public Const K_POCKETING As String = "Pocketing"
|
||||
Public Const K_SAWROUGHING As String = "SawRoughing"
|
||||
Public Const K_SAWFINISHING As String = "SawFinishing"
|
||||
|
||||
@@ -207,11 +209,13 @@
|
||||
Public Const K_CURRSAW As String = "CurrSaw"
|
||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||
Public Const K_CURRMILL As String = "CurrMill"
|
||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||
Public Const K_CURRDRIPSAW As String = "CurrDripSaw"
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
Public Const K_CURRSAWROUGHING As String = "CurrSawRoughing"
|
||||
Public Const K_CURRSAWFINISHING As String = "CurrSawFinishing"
|
||||
Public Const K_CURRSAWSIDEFINISHING As String = "CurrSawSideFinishing"
|
||||
|
||||
@@ -62,6 +62,7 @@ Public Class CurrentMachine
|
||||
Private m_bSaw As Boolean = False
|
||||
Private m_bDrill As Boolean = False
|
||||
Private m_bMill As Boolean = False
|
||||
Private m_bMillNoTip As Boolean = False
|
||||
|
||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||
@@ -73,6 +74,7 @@ Public Class CurrentMachine
|
||||
Private m_bSawing As Boolean = False
|
||||
Private m_bDrilling As Boolean = False
|
||||
Private m_bMilling As Boolean = False
|
||||
Private m_bPocketing As Boolean = False
|
||||
Private m_bSawRoughing As Boolean = False
|
||||
Private m_bSawFinishing As Boolean = False
|
||||
|
||||
@@ -80,6 +82,7 @@ Public Class CurrentMachine
|
||||
Private m_sCurrSaw As String = String.Empty
|
||||
Private m_sCurrDrill As String = String.Empty
|
||||
Private m_sCurrMill As String = String.Empty
|
||||
Private m_sCurrMillNoTip As String = String.Empty
|
||||
Private m_sCurrDripSaw As String = String.Empty
|
||||
Private m_sCurrDripDrill As String = String.Empty
|
||||
|
||||
@@ -87,6 +90,7 @@ Public Class CurrentMachine
|
||||
Private m_sCurrSawing As String = String.Empty
|
||||
Private m_sCurrDrilling As String = String.Empty
|
||||
Private m_sCurrMilling As String = String.Empty
|
||||
Private m_sCurrPocketing As String = String.Empty
|
||||
Private m_sCurrSawRoughing As String = String.Empty
|
||||
Private m_sCurrSawFinishing As String = String.Empty
|
||||
Private m_sCurrSawSideFinishing As String = String.Empty
|
||||
@@ -359,6 +363,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bMillNoTip As Boolean
|
||||
Get
|
||||
Return m_bMillNoTip
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ShowToolChanger As Integer
|
||||
Get
|
||||
Return m_nShowToolChanger
|
||||
@@ -401,6 +411,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bPocketing As Boolean
|
||||
Get
|
||||
Return m_bPocketing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bSawRoughing As Boolean
|
||||
Get
|
||||
Return m_bSawRoughing
|
||||
@@ -447,6 +463,17 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrMillNoTip As String
|
||||
Get
|
||||
Return m_sCurrMillNoTip
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRMILLNOTIP, value, sMachIniFile) Then
|
||||
m_sCurrMillNoTip = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrDripSaw As String
|
||||
Get
|
||||
Return m_sCurrDripSaw
|
||||
@@ -502,6 +529,17 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrPocketing As String
|
||||
Get
|
||||
Return m_sCurrPocketing
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, value, sMachIniFile) Then
|
||||
m_sCurrPocketing = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawRoughing As String
|
||||
Get
|
||||
Return m_sCurrSawRoughing
|
||||
@@ -910,6 +948,9 @@ Public Class CurrentMachine
|
||||
' fresa
|
||||
m_bMill = (GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' mola
|
||||
m_bMillNoTip = (GetPrivateProfileInt(S_TOOLS, K_MILLNOTIP, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
@@ -928,6 +969,8 @@ Public Class CurrentMachine
|
||||
' fresa
|
||||
m_bMilling = (GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' mola
|
||||
m_bPocketing = (GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachIniFile) > 0)
|
||||
' sgrossatura con lama
|
||||
m_bSawRoughing = (GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachIniFile) > 0)
|
||||
' finitura con lama
|
||||
@@ -940,6 +983,8 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
|
||||
' fresa
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILL, Nothing, m_sCurrMill, sMachIniFile)
|
||||
' mola
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLNOTIP, Nothing, m_sCurrMillNoTip, sMachIniFile)
|
||||
' lama da sotto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPSAW, Nothing, m_sCurrDripSaw, sMachIniFile)
|
||||
' foretto da sotto
|
||||
@@ -952,6 +997,8 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING, Nothing, m_sCurrDrilling, sMachIniFile)
|
||||
' fresa
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLING, Nothing, m_sCurrMilling, sMachIniFile)
|
||||
' svuotatura
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, Nothing, m_sCurrPocketing, sMachIniFile)
|
||||
' sgrossatura con lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWROUGHING, Nothing, m_sCurrSawRoughing, sMachIniFile)
|
||||
' finitura con lama
|
||||
|
||||
@@ -142,6 +142,7 @@ Public Class MachiningDbPageUC
|
||||
InitializeMachiningFamily(CurrMachine.bMilling, MCH_MY.MILLING, EgtMsg(MSG_MACHININGSDBPAGEUC + 33))
|
||||
InitializeMachiningFamily(CurrMachine.bSawRoughing, MCH_MY.SAWROUGHING, EgtMsg(MSG_MACHININGSDBPAGEUC + 34))
|
||||
InitializeMachiningFamily(CurrMachine.bSawFinishing, MCH_MY.SAWFINISHING, EgtMsg(MSG_MACHININGSDBPAGEUC + 35))
|
||||
InitializeMachiningFamily(CurrMachine.bPocketing, MCH_MY.POCKETING, EgtMsg(MSG_MACHININGSDBPAGEUC + 36))
|
||||
m_bFirst = False
|
||||
End If
|
||||
' Imposto la prima lavorazione
|
||||
@@ -373,6 +374,8 @@ Public Class MachiningDbPageUC
|
||||
ToolCmBx.ItemsSource = SawTool
|
||||
Case MCH_MY.MILLING 'Fresatura
|
||||
ToolCmBx.ItemsSource = MillTool
|
||||
Case MCH_MY.POCKETING 'Svuotatura
|
||||
ToolCmBx.ItemsSource = MillTool
|
||||
Case MCH_MY.DRILLING 'Foratura
|
||||
ToolCmBx.ItemsSource = DrillTool
|
||||
Case MCH_MY.SAWROUGHING 'Sgrossatura con lama
|
||||
@@ -987,6 +990,96 @@ Public Class MachiningDbPageUC
|
||||
OffsetGpBx.SetValue(Grid.RowSpanProperty, 4)
|
||||
Next
|
||||
End If
|
||||
Case MCH_MY.POCKETING 'Parametri Svuotatura
|
||||
SideAngleTxBl.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleTxBx.Visibility = Windows.Visibility.Hidden
|
||||
InvertTxBl.Visibility = Windows.Visibility.Hidden
|
||||
InvertChBx.Visibility = Windows.Visibility.Hidden
|
||||
AcrossTxBl.Visibility = Windows.Visibility.Hidden
|
||||
AcrossChBx.Visibility = Windows.Visibility.Hidden
|
||||
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
SideBrd.Visibility = Windows.Visibility.Visible
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Visible
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Visible
|
||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
HeadSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
TypeBrd.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ExtLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
LeadOutTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadOutTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
LeadLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
LeadLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurveBrd.Visibility = Windows.Visibility.Hidden
|
||||
If MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
MachParamGrd.Children.Remove(StartPosTxBl)
|
||||
MachParamGrd.Children.Remove(StartPosTxBx)
|
||||
TypeGrd.Children.Add(StartPosTxBl)
|
||||
TypeGrd.Children.Add(StartPosTxBx)
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
'StartPosTxBx.Style = Application.Current.FindResource("OmagCut_LeftCalculatorTextBoxInBorder")
|
||||
End If
|
||||
StartPosTxBl.Visibility = Windows.Visibility.Visible
|
||||
StartPosTxBx.Visibility = Windows.Visibility.Visible
|
||||
LowLenGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ThrouAddLenTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ThrouAddLenTxBx.Visibility = Windows.Visibility.Hidden
|
||||
If DrillStepGrd.Children.Contains(StepTxBx) Then
|
||||
DrillStepGrd.Children.Remove(StepTxBx)
|
||||
SawStepGrd.Children.Add(StepTxBx)
|
||||
StepTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StepTxBx.SetValue(Grid.RowProperty, 0)
|
||||
'StepTxBx.Style = Application.Current.FindResource("OmagCut_CalculatorTextBoxInBorder")
|
||||
ElseIf SawRouStepGrd.Children.Contains(StepTxBx) Then
|
||||
SawRouStepGrd.Children.Remove(StepTxBx)
|
||||
SawStepGrd.Children.Add(StepTxBx)
|
||||
StepTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StepTxBx.SetValue(Grid.RowProperty, 0)
|
||||
'StepTxBx.Style = Application.Current.FindResource("OmagCut_CalculatorTextBoxInBorder")
|
||||
End If
|
||||
StepTxBx.Visibility = Windows.Visibility.Visible
|
||||
SawStepGpBx.Visibility = Windows.Visibility.Visible
|
||||
SawStepGpBx.SetValue(Grid.RowProperty, 21)
|
||||
SawStepGpBx.SetValue(Grid.RowSpanProperty, 6)
|
||||
BackwardSawStepTxBl.Visibility = Windows.Visibility.Hidden
|
||||
BackwardSawStepTxBx.Visibility = Windows.Visibility.Hidden
|
||||
ForwardStepSideAngTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ForwardStepSideAngTxBx.Visibility = Windows.Visibility.Hidden
|
||||
BackwardStepSideAngTxBl.Visibility = Windows.Visibility.Hidden
|
||||
BackwardStepSideAngTxBx.Visibility = Windows.Visibility.Hidden
|
||||
ForwardSawStepTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 15)
|
||||
If SawStepGrd.Children.Contains(ArcIntTxBl) Then
|
||||
SawStepGrd.Children.Remove(ArcIntTxBl)
|
||||
SawStepGrd.Children.Remove(ArcIntTxBx)
|
||||
SawStepGrd.Children.Remove(ArcExtTxBl)
|
||||
SawStepGrd.Children.Remove(ArcExtTxBx)
|
||||
SawStepGrd.RowDefinitions.RemoveAt(2)
|
||||
End If
|
||||
DrillStepBrd.Visibility = Windows.Visibility.Hidden
|
||||
SawRouStepGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ReturnPosTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ReturnPosTxBx.Visibility = Windows.Visibility.Hidden
|
||||
OffsetGpBx.Visibility = Windows.Visibility.Hidden
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
Dim RowNum As Integer = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
FeedGpBx.SetValue(Grid.RowSpanProperty, 12)
|
||||
VertFeedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
VertFeedTxBx.Visibility = Windows.Visibility.Hidden
|
||||
BackFeedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
BackFeedTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End Select
|
||||
'Parametri utensile
|
||||
ToolTxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
@@ -167,6 +167,7 @@ Public Class ToolsDbPageUC
|
||||
InitializeToolFamily(m_CurrMachine.bSaw, MCH_TF.SAWBLADE, EgtMsg(MSG_TOOLSDBPAGEUC + 31))
|
||||
InitializeToolFamily(m_CurrMachine.bDrill, MCH_TF.DRILLBIT, EgtMsg(MSG_TOOLSDBPAGEUC + 32))
|
||||
InitializeToolFamily(m_CurrMachine.bMill, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 33))
|
||||
InitializeToolFamily(m_CurrMachine.bMillNoTip, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 34))
|
||||
' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
|
||||
If Not m_CurrMachine.bShowHeadExit Then
|
||||
MoveParam()
|
||||
@@ -800,6 +801,13 @@ Public Class ToolsDbPageUC
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
ElseIf m_nToolType = MCH_TY.MILL_NOTIP Then
|
||||
Select Case nType
|
||||
Case MCH_TP.LEN
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal)
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
End If
|
||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||
End Function
|
||||
@@ -914,6 +922,35 @@ Public Class ToolsDbPageUC
|
||||
' passo all'ambiente di disegno dell'utensile
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
Return True
|
||||
Case MCH_TY.MILL_NOTIP
|
||||
' assegno parametri geometrici
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim dToolLen As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||
If dToolLen < EPS_SMALL Then
|
||||
dToolLen = 120
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dToolLen)
|
||||
EgtOutLog("ToolLen too small ->" & DoubleToString(dToolLen, 1))
|
||||
End If
|
||||
Dim dToolDiam As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||
If dToolDiam < EPS_SMALL Then
|
||||
dToolDiam = 20
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dToolDiam)
|
||||
EgtOutLog("ToolDiam too small ->" & DoubleToString(dToolDiam, 1))
|
||||
End If
|
||||
Dim dToolMaxMat As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
||||
If dToolMaxMat < EPS_SMALL Then
|
||||
dToolMaxMat = 40
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
||||
EgtOutLog("ToolMaxMat too small ->" & DoubleToString(dToolMaxMat, 1))
|
||||
End If
|
||||
' passo all'ambiente di disegno dell'utensile
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
Return True
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user