Correzione fresatura in SPIANATURA

This commit is contained in:
NicolaP
2022-12-14 12:04:24 +01:00
parent a0f5585391
commit f7bcdff766
2 changed files with 38 additions and 1 deletions
+2 -1
View File
@@ -623,7 +623,8 @@ Public Class FlatteningCut
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
' recupero informazioni della fresa in uso
EgtTdbSetCurrTool(sCurrMill)
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
+36
View File
@@ -373,4 +373,40 @@ Module Utility
End If
End Sub
Public Sub GetMillFromMilling(ByRef sCurrMill As String, ByVal sCurrMilling As String)
If String.IsNullOrEmpty(sCurrMill) Or String.IsNullOrWhiteSpace(sCurrMill) Then
' creo l'elenco degli utensili di foratura
Dim sToolName As String = String.Empty
Dim nType As Integer = MCH_TY.NONE
Dim MillToolList As New ObservableCollection(Of String)
MillToolList.Clear()
If EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType) Then
MillToolList.Add(sToolName)
While EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
MillToolList.Add(sToolName)
End While
End If
' recupero l'utensile associato alla lavorazione
'Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
Dim ToolString As String = String.Empty
EgtMdbSetCurrMachining(sCurrMilling)
' Recupero nome utensile tramite TUUID
Dim sTuuid As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
EgtTdbGetToolFromUUID(sTuuid, ToolString)
Dim bToolExist As Boolean = False
For Each CurrTool As IEnumerable In MillToolList
If CurrTool.ToString() = ToolString Then
bToolExist = True
Exit For
End If
Next
If bToolExist Then
sCurrMill = ToolString
Else
sCurrMill = String.Empty
End If
End If
End Sub
End Module