EgtCAM5 1.6u1 :

- modifiche per nuovo gruppo di lavoro con macchina corrente
- modifiche per utensili speciali.
This commit is contained in:
Dario Sassi
2016-09-14 09:33:30 +00:00
parent 1595b9c2a8
commit 6172fdc1f7
12 changed files with 59 additions and 45 deletions
+16 -12
View File
@@ -938,7 +938,7 @@ Public Class ToolTreeViewItem
Else
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
If IsNgeFile(m_Draw) Then
If EgtOpenFile(IniFile.m_sTdbCurrMachToolsDirPath & "\" & m_Draw) Then
If EgtOpenFile(IniFile.m_sCurrMachToolsDirPath & "\" & m_Draw) Then
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
Else
@@ -984,7 +984,7 @@ Public Class ToolTreeViewItem
''' </summary>
Private Function LoadToolHolder() As String
Dim sHolder As String = String.Empty
EgtUILib.GetPrivateProfileString(S_TOOLHOLDER, Head & "." & ExitPar.ToString(), "", sHolder, IniFile.m_sDbsCurrMachIniFilePath)
EgtUILib.GetPrivateProfileString(S_TOOLHOLDER, Head & "." & ExitPar.ToString(), "", sHolder, IniFile.m_sCurrMachIniFilePath)
If String.IsNullOrWhiteSpace(sHolder) Then
Return String.Empty
Else
@@ -998,7 +998,7 @@ Public Class ToolTreeViewItem
Private Function LoadToolMaker() As Boolean
Dim sMaker As String = String.Empty
EgtUILib.GetPrivateProfileString(S_TOOLS, ConvertTypeToString(Type), "", sMaker, IniFile.m_sDbsCurrMachIniFilePath)
EgtUILib.GetPrivateProfileString(S_TOOLS, ConvertTypeToString(Type), "", sMaker, IniFile.m_sCurrMachIniFilePath)
If String.IsNullOrWhiteSpace(sMaker) Then bToolMakerError = True
' Acquisisce solo il file lua, ma meglio impostare contesto disegno utensili (se ci sono chiamate...)
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
@@ -1014,9 +1014,9 @@ Public Class ToolTreeViewItem
Case MCH_TY.MILL_STD, MCH_TY.MILL_NOTIP
Return K_MILLMAKER
Case MCH_TY.MORTISE_STD
Return "StandardMortiseMaker"
Return "MortiseMaker"
Case MCH_TY.COMPO
Return "StandardCompoMaker"
Return "CompoMaker"
End Select
Return Nothing
End Function
@@ -1033,14 +1033,14 @@ Public Class ToolTreeViewItem
StringToLen(m_Thick, dThick)
StringToLen(m_MaxMat, dMaxMat)
Select Case Type
Case MCH_TY.DRILL_STD
Case MCH_TY.DRILL_STD, MCH_TY.DRILL_LONG
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.TOTLEN", dTotLen)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
EgtLuaSetGlobNumVar("TOOL.DIAM", dDiam)
EgtLuaSetGlobNumVar("TOOL.MAXMAT", dMaxMat)
Case MCH_TY.SAW_STD
Case MCH_TY.SAW_STD, MCH_TY.SAW_FLAT
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
@@ -1049,7 +1049,7 @@ Public Class ToolTreeViewItem
EgtLuaSetGlobNumVar("TOOL.CORE", dCore)
EgtLuaSetGlobNumVar("TOOL.THICK", dThick)
EgtLuaSetGlobNumVar("TOOL.MAXMAT", dMaxMat)
Case MCH_TY.MILL_STD
Case MCH_TY.MILL_STD, MCH_TY.MILL_NOTIP
' imposto dati utensile
EgtLuaSetGlobStringVar("TOOL.TOOLHOLDER", ToolHolder)
EgtLuaSetGlobNumVar("TOOL.LEN", dLen)
@@ -1063,7 +1063,7 @@ Public Class ToolTreeViewItem
' passo all'ambiente di disegno dell'utensile
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
' eseguo creazione utensile
EgtLuaExecLine("CreateTool()")
EgtLuaCallFunction("CreateTool")
' recupero errore
Dim nErr As Integer = 999
EgtLuaGetGlobIntVar("TOOL.ERR", nErr)
@@ -1074,7 +1074,9 @@ Public Class ToolTreeViewItem
End Function
Friend Function SaveToolDraw() As Boolean
If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MILL_STD Then
If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.DRILL_LONG Or
m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Or
m_Type = MCH_TY.MILL_STD Or m_Type = MCH_TY.MILL_NOTIP Then
' nome e direttorio del file da salvare
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim sDrawName As String = Uuid
@@ -1089,7 +1091,7 @@ Public Class ToolTreeViewItem
nAuxId = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "AUX")
EgtSetStatus(nAuxId, GDB_ST.OFF)
' se lama devo ruotare -90 deg attorno a Z+
If m_Type = MCH_TY.SAW_STD Then
If m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Then
EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), -90, GDB_RT.GLOB)
End If
' salvo il modello
@@ -1097,7 +1099,7 @@ Public Class ToolTreeViewItem
Dim bOk As Boolean = EgtSaveFile(sPath, NGE.CMPTEXT)
Dim e = EgtGetCurrentContext()
' eseguo controrotazione per lama
If m_Type = MCH_TY.SAW_STD Then
If m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.SAW_FLAT Then
EgtRotate(EgtGetFirstGroupInGroup(GDB_ID.ROOT), Point3d.ORIG(), Vector3d.Z_AX(), 90, GDB_RT.GLOB)
End If
' ripristino visualizzazione layer aux
@@ -1444,6 +1446,8 @@ Public Class ToolDrawUUIDConverter
Else
Return value.ToString
End If
Else
Return Nothing
End If
End Function
+1 -1
View File
@@ -8,7 +8,7 @@
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsMovable="False" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen">
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False">
<EgtWPFLib5:EgtCustomWindow.Resources>
<local:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>
+5 -5
View File
@@ -306,19 +306,19 @@ Namespace EgtCAM5
''' </summary>
Private Function ReadActiveToolsFamilies() As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.DRILLBIT, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 1)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.SAWBLADE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 2)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MILL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 3)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MORTISE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 4)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sDbsCurrMachIniFilePath) <> 0 Then
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.COMPO, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 5)})
End If
Return ActiveToolsFamiliesList.ToArray