Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37adc352a1 | |||
| 2708670d9a | |||
| 737366ba27 | |||
| d10588867f | |||
| 54158406b7 | |||
| 5c3c231729 | |||
| d3c0b1c2c6 | |||
| ad04e5d916 | |||
| db623544e9 | |||
| 3075c2f4af | |||
| 045e7cba61 | |||
| 57d4a29b74 | |||
| b045f0ce7b | |||
| 41767f4f3a | |||
| 85f05f280f | |||
| b4338ef88e | |||
| 9d6236b767 | |||
| d946c39a9d | |||
| 55bd41ca4c | |||
| 5e6208a9c4 | |||
| 29ecd7c780 | |||
| 6ca56d3a12 | |||
| b4ef388603 | |||
| aebfb05b94 | |||
| 04a7c05e99 | |||
| 8cc0d88600 |
@@ -154,6 +154,7 @@ Friend Module CamAuto
|
||||
Return ResetAllMachinings(nWarn)
|
||||
End Function
|
||||
|
||||
' Ricalcola tutte le lavorazioni
|
||||
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
@@ -170,6 +171,7 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Elimina da ogni entità il nome della lavorazione asseganta
|
||||
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
@@ -180,6 +182,11 @@ Friend Module CamAuto
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
'nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
||||
'If nIdLayerOutLoop <> GDB_ID.NULL Then
|
||||
' nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
' SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
'End If
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
@@ -189,6 +196,11 @@ Friend Module CamAuto
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
||||
If nIdLayerOutLoop <> GDB_ID.NULL Then
|
||||
nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
End If
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Title" Grid.Row="1" Grid.Column="1"
|
||||
<TextBlock Name="TableListMsg" Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ItemsControl Name="TableList"
|
||||
|
||||
@@ -20,7 +20,7 @@ Public Class SelectTableWD
|
||||
|
||||
Private Sub ChangeTable_Initialized() Handles Me.Initialized
|
||||
|
||||
Title.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
|
||||
TableListMsg.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
|
||||
' recuepero l'inidce della tavola corrente
|
||||
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||
|
||||
+497
-203
@@ -1,5 +1,6 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.Reflection
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SplitPageUC
|
||||
@@ -203,7 +204,7 @@ Public Class SplitPageUC
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
If Mach.m_bFinalCut Then AddFinalText(sText)
|
||||
Else
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
AddItemToList(i, Mach, sText, MCH_OY.SAWING)
|
||||
@@ -916,6 +917,8 @@ Public Class SplitPageUC
|
||||
Next
|
||||
m_CurrFirstInd = m_ItemList.IndexOf(ItemList(0))
|
||||
m_CurrLastInd = m_ItemList.IndexOf(ItemList(ItemList.Count - 1))
|
||||
' Aggiorno lo stato dei bottoni
|
||||
UpdateEnableMoveBtn()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -932,7 +935,9 @@ Public Class SplitPageUC
|
||||
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
||||
Dim Index As Integer = MachiningLsBx.SelectedIndex
|
||||
If Index = -1 Then Return
|
||||
ChangeMachinig(m_MachiningList(Index).m_nId)
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
ChangeMachinig(m_MachiningList(Index).m_nId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
||||
@@ -962,11 +967,31 @@ Public Class SplitPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Uno spostamento è possibile solo se la pozione di arrivo è un taglio dello stesso tipo (FinalCut)
|
||||
Private Sub UpdateEnableMoveBtn()
|
||||
If Not MoveUpBtn.IsEnabled And Not MoveDownBtn.IsEnabled Then Return
|
||||
|
||||
' MOVE UP (-1)
|
||||
If m_CurrFirstInd > 0 Then
|
||||
Dim OldItem As SplitMach = m_MachiningList(m_CurrFirstInd - 1)
|
||||
Dim NewItem As SplitMach = m_MachiningList(m_CurrLastInd)
|
||||
MoveUpBtn.IsEnabled = Not (OldItem.m_bFinalCut Or NewItem.m_bFinalCut) Or (OldItem.m_bFinalCut And NewItem.m_bFinalCut)
|
||||
End If
|
||||
|
||||
' MOVE DOWN (1)
|
||||
If m_CurrLastInd < m_MachiningList.Count - 1 Then
|
||||
Dim OldItem = m_MachiningList(m_CurrLastInd + 1)
|
||||
Dim NewItem = m_MachiningList(m_CurrFirstInd)
|
||||
MoveDownBtn.IsEnabled = Not (OldItem.m_bFinalCut Or NewItem.m_bFinalCut) Or (OldItem.m_bFinalCut And NewItem.m_bFinalCut)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MoveItem(direction As Integer)
|
||||
' Checking selected item
|
||||
If m_CurrFirstInd = -1 OrElse MachiningLsBx.SelectedIndex < 0 Then
|
||||
Return
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
|
||||
' Se la direzione è giù
|
||||
If direction = 1 And m_CurrLastInd < m_ItemList.Count - 1 Then
|
||||
@@ -990,7 +1015,8 @@ Public Class SplitPageUC
|
||||
m_CurrFirstInd -= 1
|
||||
m_CurrLastInd -= 1
|
||||
End If
|
||||
|
||||
' Aggiorno lo stato dei bottoni
|
||||
UpdateEnableMoveBtn()
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
End Sub
|
||||
@@ -1250,17 +1276,31 @@ Public Class SplitPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
' Dato l'indice della lavorazione restituisce l'indice della lavorazione TwinCut
|
||||
Private Function GetIndexTwinCut(nIndex As Integer, Optional OnlyFinalCut As Boolean = True) As Integer
|
||||
Dim nIndexTwinCut As Integer = -1
|
||||
If m_MachiningList(nIndex).m_bFinalCut Or Not OnlyFinalCut Then
|
||||
Dim nIdTwinCut As Integer = -1
|
||||
EgtGetInfo(m_MachiningList(nIndex).m_nId, "IdTwinCut", nIdTwinCut)
|
||||
nIndexTwinCut = m_MachiningList.FindIndex(Function(x) x.m_nId = nIdTwinCut)
|
||||
End If
|
||||
Return nIndexTwinCut
|
||||
End Function
|
||||
|
||||
' Ok: gestione info 'IdTwinCut' per tagli FinalCut
|
||||
Private Function AdjustBothCuts(nI As Integer,
|
||||
Optional bAllForced As Boolean = False,
|
||||
Optional bAccForced As Boolean = False) As Boolean
|
||||
Dim nIndexTwinCut As Integer = GetIndexTwinCut(nI, False)
|
||||
' Verifico che entrambi gli estremi siano allungabili
|
||||
If Not (m_MachiningList(nI).m_bCanStartAll And m_MachiningList(nI).m_bCanEndAll) Then Return False
|
||||
If Not ((m_MachiningList(nI).m_bCanStartAll And m_MachiningList(nI).m_bCanEndAll) Or nIndexTwinCut > -1) Then Return False
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLiPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
Dim nLoPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
|
||||
If (m_MachiningList(nI).m_bStartAll Or m_MachiningList(nI).m_bEndAll) And Not bAllForced Then
|
||||
' accorcio
|
||||
If nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
@@ -1276,6 +1316,28 @@ Public Class SplitPageUC
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
m_MachiningList(nI).m_bStartAll = False
|
||||
m_MachiningList(nI).m_bEndAll = False
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
|
||||
' accorcio
|
||||
If nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
End If
|
||||
If nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
ElseIf m_MachiningList(nI).m_bEnabled And Not bAccForced Then
|
||||
' allungo
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
@@ -1291,20 +1353,44 @@ Public Class SplitPageUC
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
m_MachiningList(nI).m_bStartAll = True
|
||||
m_MachiningList(nI).m_bEndAll = True
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||
End If
|
||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Ok: gestione info 'IdTwinCut' per tagli FinalCut
|
||||
Private Function AdjustStartCut(nI As Integer,
|
||||
Optional bAllForced As Boolean = False,
|
||||
Optional bAccForced As Boolean = False) As Boolean
|
||||
Dim nIndexTwinCut As Integer = GetIndexTwinCut(nI, False)
|
||||
' Verifico che l'estremo iniziale sia allungabile
|
||||
If Not m_MachiningList(nI).m_bCanStartAll Then Return False
|
||||
If Not (m_MachiningList(nI).m_bCanStartAll Or nIndexTwinCut > -1) Then Return False
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLiPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
|
||||
If m_MachiningList(nI).m_bStartAll And Not bAllForced Then
|
||||
' accorcio
|
||||
If nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
@@ -1314,6 +1400,21 @@ Public Class SplitPageUC
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
m_MachiningList(nI).m_bStartAll = False
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
' accorcio
|
||||
If nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
ElseIf m_MachiningList(nI).m_bEnabled And Not bAccForced Then
|
||||
' allungo
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
@@ -1323,20 +1424,38 @@ Public Class SplitPageUC
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
m_MachiningList(nI).m_bStartAll = True
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
' allungo
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Ok: gestione info 'IdTwinCut' per tagli FinalCut
|
||||
Private Function AdjustEndCut(nI As Integer,
|
||||
Optional bAllForced As Boolean = False,
|
||||
Optional bAccForced As Boolean = False) As Boolean
|
||||
Dim nIndexTwinCut As Integer = GetIndexTwinCut(nI, False)
|
||||
' Verifico che l'estremo finale sia allungabile
|
||||
If Not m_MachiningList(nI).m_bCanEndAll Then Return False
|
||||
If Not (m_MachiningList(nI).m_bCanEndAll Or nIndexTwinCut > -1) Then Return False
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLoPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
|
||||
If m_MachiningList(nI).m_bEndAll And Not bAllForced Then
|
||||
' accorcio
|
||||
If nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||
@@ -1345,6 +1464,21 @@ Public Class SplitPageUC
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
End If
|
||||
m_MachiningList(nI).m_bEndAll = False
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
' accorcio
|
||||
If nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
ElseIf m_MachiningList(nI).m_bEnabled And Not bAccForced Then
|
||||
' allungo
|
||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||
@@ -1353,62 +1487,106 @@ Public Class SplitPageUC
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||
End If
|
||||
m_MachiningList(nI).m_bEndAll = True
|
||||
|
||||
' ver_2.7h3
|
||||
If nIndexTwinCut > -1 And nIndexTwinCut < m_MachiningList.Count Then
|
||||
' Eseguo allungamento o riporto allo standard
|
||||
EgtSetCurrMachining(m_MachiningList(nIndexTwinCut).m_nId)
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
' allungo
|
||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nIndexTwinCut).m_nId, True)
|
||||
End If
|
||||
|
||||
End If
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Ok: gestione info 'IdTwinCut' per tagli FinalCut
|
||||
Private Sub OutCenStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles OutCenStartBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
If Not m_ItemList(Index).IsSelected Then
|
||||
Dim nIndexTwinCut As Integer = -1
|
||||
' Indice di controllo LOOP: se > 10 allora il ciclo è potenzialmente infinito!
|
||||
Dim nCount As Integer = 0
|
||||
Dim CurrIndex = Index
|
||||
If Not m_ItemList(CurrIndex).IsSelected Then
|
||||
Continue For
|
||||
End If
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog(" ⚠️ L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||
Else
|
||||
Do
|
||||
nCount = nCount + 1
|
||||
Dim nI As Integer = m_ItemList(CurrIndex).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog("L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama")
|
||||
Else
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLiPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
' Recupero il taglio TwinCut associato (Optional: False -> non controllo se è FinalCut)
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If nIndexTwinCut > -1 Then
|
||||
' Se non è stato selezionato allora devo modificarlo, alrtimenti resetto l'indice
|
||||
If m_ItemList(nIndexTwinCut).IsSelected Then
|
||||
nIndexTwinCut = -1
|
||||
Else
|
||||
CurrIndex = nIndexTwinCut
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLiPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiPrev)
|
||||
If nLiPrev = MCH_SAW_LI.OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLiPrev = MCH_SAW_LI.EXT_CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.EXT_OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
If nCount > 10 Then
|
||||
EgtOutLog("! FATAL ERROR ! In function 'OutCenEndBtn' cycle 'Do Loop Until' is potentially infinte")
|
||||
' Forzo l'uscita dal ciclo
|
||||
nIndexTwinCut = -1
|
||||
End If
|
||||
Loop Until nIndexTwinCut < 0
|
||||
|
||||
' ---- FINE ----- metodo per mofica paramtri
|
||||
|
||||
Next
|
||||
' Se modificato qualcosa
|
||||
If bGenModif Then
|
||||
@@ -1417,6 +1595,7 @@ Public Class SplitPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Ok: anche per tagli TwinCut con affondament ridotto
|
||||
Private Sub AllOutStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOutStartBtn.Click
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -1443,12 +1622,13 @@ Public Class SplitPageUC
|
||||
m_bModified = True
|
||||
End Sub
|
||||
|
||||
' Ok: anche per tagli TwinCut con affondament ridotto
|
||||
Private Sub AllCenStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenStartBtn.Click
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog(" ⚠️ L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||
EgtOutLog("L'ingresso di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama")
|
||||
Else
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -1478,56 +1658,84 @@ Public Class SplitPageUC
|
||||
m_bModified = True
|
||||
End Sub
|
||||
|
||||
' Ok: gestione info 'IdTwinCut' per tagli FinalCut
|
||||
Private Sub OutCenEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles OutCenEndBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
If Not m_ItemList(Index).IsSelected Then
|
||||
Dim nIndexTwinCut As Integer = -1
|
||||
' Indice di controllo LOOP: se > 10 allora il ciclo è potenzialmente infinito!
|
||||
Dim nCount As Integer = 0
|
||||
Dim CurrIndex = Index
|
||||
If Not m_ItemList(CurrIndex).IsSelected Then
|
||||
Continue For
|
||||
End If
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog(" ⚠️ L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||
Else
|
||||
Do
|
||||
nCount = nCount + 1
|
||||
Dim nI As Integer = m_ItemList(CurrIndex).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog("L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama")
|
||||
Else
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLoPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
' Recupero il taglio TwinCut associato (Optional: False -> non controllo se è FinalCut)
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If nIndexTwinCut > -1 Then
|
||||
' Se non è stato selezionato allora devo modificarlo, alrtimenti resetto l'indice
|
||||
If m_ItemList(nIndexTwinCut).IsSelected Then
|
||||
nIndexTwinCut = -1
|
||||
Else
|
||||
CurrIndex = nIndexTwinCut
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim nLoPrev As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoPrev)
|
||||
If nLoPrev = MCH_SAW_LO.OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_OUT Then
|
||||
' accorcio
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_CENT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||
' ri-verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ElseIf nLoPrev = MCH_SAW_LO.EXT_CENT Then
|
||||
' allungo
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.EXT_OUT)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
If nCount > 10 Then
|
||||
EgtOutLog("! FATAL ERROR ! In function 'OutCenEndBtn' cycle 'Do Loop Until' is potentially infinte")
|
||||
' Forzo l'uscita dal ciclo
|
||||
nIndexTwinCut = -1
|
||||
End If
|
||||
Loop Until nIndexTwinCut < 0
|
||||
|
||||
|
||||
Next
|
||||
' Se modificato qualcosa
|
||||
If bGenModif Then
|
||||
@@ -1536,6 +1744,7 @@ Public Class SplitPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Ok: anche per tagli TwinCut con affondament ridotto
|
||||
Private Sub AllOutEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOutEndBtn.Click
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -1562,12 +1771,13 @@ Public Class SplitPageUC
|
||||
m_bModified = True
|
||||
End Sub
|
||||
|
||||
' Ok
|
||||
Private Sub AllCenEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllCenEndBtn.Click
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
|
||||
' se ho forzato il tipo di ingresso da CamAuto qui non posso moficarlo!
|
||||
If m_MachiningList(nI).m_bMngLeadInOnIntCorner Then
|
||||
EgtOutLog(" ⚠️ L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama ⚠️")
|
||||
EgtOutLog("L'uscita di taglio associato all'entita'_" & m_MachiningList(nI).m_nEntId & " non puo' essere modificato per problemi di ingombro lama")
|
||||
Else
|
||||
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -1597,6 +1807,7 @@ Public Class SplitPageUC
|
||||
m_bModified = True
|
||||
End Sub
|
||||
|
||||
' Ok
|
||||
Private Sub AllExtendBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllExtendBtn.Click
|
||||
Dim bModif As Boolean = False
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
@@ -1618,6 +1829,7 @@ Public Class SplitPageUC
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
' Ok
|
||||
Private Sub AllReduceBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllReduceBtn.Click
|
||||
Dim bModif As Boolean = False
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
@@ -1639,6 +1851,7 @@ Public Class SplitPageUC
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
' Ok
|
||||
Private Sub ModifStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifStartBtn.Click
|
||||
Dim bLen As Boolean = True
|
||||
' abilito la finestra per inserire i valori solo per il primo elemento della lista (di default tutti gli altri oggetti assumono lo stesso valore)
|
||||
@@ -1659,76 +1872,115 @@ Public Class SplitPageUC
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
If Not m_ItemList(Index).IsSelected Then
|
||||
Dim nIndexTwinCut As Integer = -1
|
||||
Dim CurrIndex As Integer = Index
|
||||
' Indice di controllo LOOP: se > 10 allora il ciclo è potenzialmente infinito!
|
||||
Dim nCount As Integer = 0
|
||||
|
||||
If Not m_ItemList(CurrIndex).IsSelected Then
|
||||
Continue For
|
||||
End If
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
|
||||
Dim nI As Integer = m_ItemList(CurrIndex).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
|
||||
' Se taglio con lama
|
||||
If nMachiningType = MCH_MY.SAWING And
|
||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
If nMachiningType = MCH_MY.SAWING Then
|
||||
|
||||
If Not m_MachiningList(nI).m_bCanStartAll Then
|
||||
EgtOutLog(" ⚠️ Il taglio non puo' essere allungato all'interno del pezzo ⚠️")
|
||||
Return
|
||||
End If
|
||||
|
||||
' leggo il valore salvato nella geometria
|
||||
Dim dOrigUsal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, "SAW: " & EgtMsg(90375)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal, bLen)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dUsal = ValWnd.GetVal(bLen)
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
' Riassegno i valori dell'indice corrente
|
||||
nI = m_ItemList(CurrIndex).Ind
|
||||
nOperId = m_MachiningList(nI).m_nId
|
||||
|
||||
nCount = nCount + 1
|
||||
If Not (m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If Not (m_MachiningList(nI).m_bCanStartAll Or nIndexTwinCut > -1) Then
|
||||
EgtOutLog("Il taglio non puo' essere allungato all'interno del pezzo")
|
||||
' Passo al prossimo indice disponibile
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' leggo il valore salvato nella geometria
|
||||
Dim dOrigUsal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, "SAW: " & EgtMsg(90375)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal, bLen)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dUsal = ValWnd.GetVal(bLen)
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUsal < -10 * EPS_SMALL) Then
|
||||
' Passo al prossimo indice disponibile
|
||||
Continue For
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
' Recupero il taglio TwinCut associato (Optional: False -> non controllo se è FinalCut)
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If nIndexTwinCut > -1 Then
|
||||
' Se non è stato selezionato allora devo modificarlo, alrtimenti resetto l'indice
|
||||
If m_ItemList(nIndexTwinCut).IsSelected Then
|
||||
nIndexTwinCut = -1
|
||||
Else
|
||||
CurrIndex = nIndexTwinCut
|
||||
End If
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUsal < -10 * EPS_SMALL) Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
If nCount > 10 Then
|
||||
EgtOutLog("! FATAL ERROR ! In function 'ModifStartBtn' cycle 'Do Loop Until' is potentially infinte")
|
||||
' Forzo l'uscita dal ciclo
|
||||
nIndexTwinCut = -1
|
||||
End If
|
||||
|
||||
Loop Until nIndexTwinCut < 0
|
||||
|
||||
' se altrimenti fresatura sopra
|
||||
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
|
||||
@@ -1741,7 +1993,10 @@ Public Class SplitPageUC
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, "MILL: " & EgtMsg(90375)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal, bLen)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
If Not ValWnd.ShowDialog() Then
|
||||
' Esco da tutto
|
||||
Return
|
||||
End If
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dUsal = ValWnd.GetVal(bLen)
|
||||
' comunico che ho letto il primo dato
|
||||
@@ -1783,8 +2038,10 @@ Public Class SplitPageUC
|
||||
ModifStartWnd.SetLiTangDist(nOriginalTangDist)
|
||||
ModifStartWnd.SetLiPerpDist(nOriginalPerpDist)
|
||||
ModifStartWnd.SetLeadInType(nOriginalLeadInType)
|
||||
If Not ModifStartWnd.ShowDialog() Then Return
|
||||
|
||||
If Not ModifStartWnd.ShowDialog() Then
|
||||
' esco da tutto
|
||||
Return
|
||||
End If
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dWJAddLen = ModifStartWnd.GetElongation()
|
||||
bWJLiHole = ModifStartWnd.GetHole()
|
||||
@@ -1820,6 +2077,7 @@ Public Class SplitPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Ok
|
||||
Private Sub ModifEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifEndBtn.Click
|
||||
Dim bLen As Boolean = True
|
||||
' abilito la finestra per inserire i valori solo per il primo elemento della lista (di default tutti gli altri oggetti assumono lo stesso valore)
|
||||
@@ -1839,74 +2097,110 @@ Public Class SplitPageUC
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nIndexTwinCut As Integer = -1
|
||||
Dim CurrIndex As Integer = Index
|
||||
' Indice di controllo LOOP: se > 10 allora il ciclo è potenzialmente infinito!
|
||||
Dim nCount As Integer = 0
|
||||
|
||||
If Not m_ItemList(Index).IsSelected Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
|
||||
' Se taglio con lama
|
||||
If nMachiningType = MCH_MY.SAWING And
|
||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
If nMachiningType = MCH_MY.SAWING Then
|
||||
|
||||
If Not m_MachiningList(nI).m_bCanEndAll Then
|
||||
EgtOutLog(" ⚠️ Il taglio non puo' essere allungato all'interno del pezzo ⚠️")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim dOrigUeal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, "SAW: " & EgtMsg(90375)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal, bLen)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
dUeal = ValWnd.GetVal(bLen)
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
' Riassegno i valori dell'indice corrente
|
||||
nI = m_ItemList(CurrIndex).Ind
|
||||
nOperId = m_MachiningList(nI).m_nId
|
||||
|
||||
nCount = nCount + 1
|
||||
If Not (m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If Not (m_MachiningList(nI).m_bCanEndAll Or nIndexTwinCut > -1) Then
|
||||
EgtOutLog("Il taglio non puo' essere allungato all'interno del pezzo")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim dOrigUeal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, "SAW: " & EgtMsg(90375)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal, bLen)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
dUeal = ValWnd.GetVal(bLen)
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
End If
|
||||
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
' Recupero il taglio TwinCut associato (Optional: False -> non controllo se è FinalCut)
|
||||
nIndexTwinCut = GetIndexTwinCut(nI, False)
|
||||
If nIndexTwinCut > -1 Then
|
||||
' Se non è stato selezionato allora devo modificarlo, alrtimenti resetto l'indice
|
||||
If m_ItemList(nIndexTwinCut).IsSelected Then
|
||||
nIndexTwinCut = -1
|
||||
Else
|
||||
CurrIndex = nIndexTwinCut
|
||||
End If
|
||||
End If
|
||||
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
|
||||
Return
|
||||
If nCount > 10 Then
|
||||
EgtOutLog("! FATAL ERROR ! In function 'ModifStartBtn' cycle 'Do Loop Until' is potentially infinte")
|
||||
' Forzo l'uscita dal ciclo
|
||||
nIndexTwinCut = -1
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
Loop Until nIndexTwinCut < 0
|
||||
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
' se altrimenti fresatura sopra
|
||||
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
|
||||
|
||||
|
||||
@@ -261,17 +261,11 @@ Module ConstIni
|
||||
Public Const K_REGANGSTEP As String = "AngStep"
|
||||
|
||||
Public Const S_CAMERA As String = "Camera"
|
||||
Public Const K_CAM_COUNT As String = "Count"
|
||||
Public Const K_CAM_EXEPATH As String = "ExePath"
|
||||
Public Const K_CAM_IMAGE As String = "Image"
|
||||
Public Const K_CAM_INFO As String = "Info"
|
||||
Public Const K_CAM_RESULT As String = "Result"
|
||||
Public Const K_CAM_CONTOUR As String = "Contour"
|
||||
Public Const K_CAM_EXEPATH2 As String = "ExePath2"
|
||||
Public Const K_CAM_IMAGE2 As String = "Image2"
|
||||
Public Const K_CAM_INFO2 As String = "Info2"
|
||||
Public Const K_CAM_RESULT2 As String = "Result2"
|
||||
Public Const K_CAM_CONTOUR2 As String = "Contour2"
|
||||
Public Const K_CAM_THRESHOLD As String = "Threshold"
|
||||
Public Const K_CAM_TOLERANCE As String = "Tolerance"
|
||||
Public Const K_CAM_TIMEOUT As String = "Timeout"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Public Const S_NUMERICALCONTROL As String = "NumericalControl"
|
||||
Public Const K_TYPE As String = "Type"
|
||||
Public Const K_SPECIALSEND As String = "SpecialSend"
|
||||
|
||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||
Public Const K_EXTENSION As String = "Extension"
|
||||
@@ -12,24 +13,34 @@
|
||||
Public Const K_SIMULATIONAXESNUM As String = "SimulationAxesNum"
|
||||
Public Const K_L1NAME As String = "L1Name"
|
||||
Public Const K_L1ID As String = "L1Id"
|
||||
Public Const K_L1TYPE As String = "L1Type"
|
||||
Public Const K_L2NAME As String = "L2Name"
|
||||
Public Const K_L2ID As String = "L2Id"
|
||||
Public Const K_L2TYPE As String = "L2Type"
|
||||
Public Const K_L3NAME As String = "L3Name"
|
||||
Public Const K_L3ID As String = "L3Id"
|
||||
Public Const K_L3TYPE As String = "L3Type"
|
||||
Public Const K_R1NAME As String = "R1Name"
|
||||
Public Const K_R1ID As String = "R1Id"
|
||||
Public Const K_R1TYPE As String = "R1Type"
|
||||
Public Const K_R2NAME As String = "R2Name"
|
||||
Public Const K_R2ID As String = "R2Id"
|
||||
Public Const K_R2TYPE As String = "R2Type"
|
||||
Public Const K_A6NAME As String = "A6Name"
|
||||
Public Const K_A6ID As String = "A6Id"
|
||||
Public Const K_A6TYPE As String = "A6Type"
|
||||
Public Const K_A7NAME As String = "A7Name"
|
||||
Public Const K_A7ID As String = "A7Id"
|
||||
Public Const K_A7TYPE As String = "A7Type"
|
||||
Public Const K_A8NAME As String = "A8Name"
|
||||
Public Const K_A8ID As String = "A8Id"
|
||||
Public Const K_A8TYPE As String = "A8Type"
|
||||
Public Const K_A9NAME As String = "A9Name"
|
||||
Public Const K_A9ID As String = "A9Id"
|
||||
Public Const K_A9TYPE As String = "A9Type"
|
||||
Public Const K_A10NAME As String = "A10Name"
|
||||
Public Const K_A10ID As String = "A10Id"
|
||||
Public Const K_A10TYPE As String = "A10Type"
|
||||
Public Const K_DELTA_C As String = "DeltaC"
|
||||
Public Const K_ININCHES As String = "InInches"
|
||||
Public Const K_CPOS As String = "CPos"
|
||||
|
||||
@@ -267,6 +267,7 @@ Public Class GridCut
|
||||
EraseDirectCutPart()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
ActivateAllMachinings()
|
||||
EgtSetCurrPhase(1)
|
||||
' Abilito registrazione progetto modificato
|
||||
EgtEnableModified()
|
||||
' Nascondo la macchina
|
||||
@@ -763,10 +764,37 @@ Public Class GridCut
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
' Se richiesta gestione tagli finali
|
||||
OrderFinalSawCuts()
|
||||
' Aggiorno stato bottoni
|
||||
UpdateSimulOkBtn()
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function OrderFinalSawCuts() As Boolean
|
||||
' Se gestione tagli finali non richiesta, esco
|
||||
If Not m_MainWindow.m_CurrentMachine.bEnableFinalSawCut Then Return False
|
||||
' Sposto i tagli finali alla fine, conservando l'ordine relativo
|
||||
Dim nFirstMovedId As Integer = GDB_ID.NULL
|
||||
Dim nRefId As Integer = EgtGetLastActiveOperation()
|
||||
Dim nOpeId As Integer = EgtGetFirstActiveOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
If nOpeId = nFirstMovedId Then Exit While
|
||||
Dim nNextOpeId As Integer = EgtGetNextActiveOperation( nOpeId)
|
||||
If EgtGetOperationType( nOpeId) = MCH_OY.SAWING Then
|
||||
Dim bFinalCut As Boolean = False
|
||||
IF EgtGetInfo( nOpeId, "FinalCut", bFinalCut) AndAlso bFinalCut Then
|
||||
EgtRelocateGlob( nOpeId, nRefId, GDB_POS.AFTER)
|
||||
nRefId = nOpeId
|
||||
If nFirstMovedId = GDB_ID.NULL Then nFirstMovedId = nOpeId
|
||||
End If
|
||||
End If
|
||||
nOpeId = nNextOpeId
|
||||
End While
|
||||
' Esco
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||
If m_bCustomGrid Then
|
||||
Return MultiplyCut_1(nLayerId)
|
||||
|
||||
@@ -1563,10 +1563,15 @@ Public Class DrawPageUC
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
|
||||
End Select
|
||||
|
||||
' Pulisco l'ambiente lua
|
||||
ResetLuaVariables()
|
||||
|
||||
Try
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
Catch ex As Exception
|
||||
Dim x As Boolean = True
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Class CompoVar
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
|
||||
@@ -248,5 +248,5 @@ Public Class SecondaryComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Add(m_MainComponentPage)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -167,7 +167,42 @@ Public Class SideAngleUC
|
||||
End If
|
||||
|
||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||
TxBlChBxView()
|
||||
' Controllo se la checkbox SideAngle è attiva
|
||||
If SideAngleChBx.IsChecked Then
|
||||
Dim dSideAngle As Double = 0
|
||||
Dim dHell As Double = 0
|
||||
' Controllo se l'angolo della nuova entità non è nullo
|
||||
If Not String.IsNullOrEmpty(NewA1TxBx.Text) Then
|
||||
StringToDouble(NewA1TxBx.Text, dSideAngle)
|
||||
' Controllo se l'angolo è diverso da 0
|
||||
If dSideAngle <> 0 Then
|
||||
' Aggiorno l'angolo delle entità
|
||||
UpdateSideAngleAllEntities()
|
||||
End If
|
||||
End If
|
||||
' Controllo se il tallone della nuova entità non è nullo
|
||||
If Not String.IsNullOrEmpty(NewH1TxBx.Text) Then
|
||||
StringToDouble(NewH1TxBx.Text, dHell)
|
||||
' Controllo se il tallone è maggiore di 0
|
||||
If dHell > 0 Then
|
||||
' Aggiorno il tallone delle entità
|
||||
UpdateHeelAllEntities()
|
||||
End If
|
||||
End If
|
||||
' Elimino le righe per riposizionarle
|
||||
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
||||
|
||||
Grid.SetRow(SideAngleBl, MAX_LINES - m_nShow)
|
||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
' Rendo visibile solo la nuova entità
|
||||
CollapsedCheckAllTextSideAng()
|
||||
Else
|
||||
' Altrimenti eseguo impaginazione classica
|
||||
TxBlChBxView()
|
||||
End If
|
||||
|
||||
' Aggiorno valori
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
@@ -406,10 +441,16 @@ Public Class SideAngleUC
|
||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
||||
|
||||
NewEntity.Text = "A#"
|
||||
' Se interrompo la creazione di un unico SideAng
|
||||
If Not GetSideAngleFromAllEntities() Then Return
|
||||
|
||||
CollapsedCheckAllTextSideAng()
|
||||
End Sub
|
||||
|
||||
' Rende visibile NewEntity quando si attiva la spunta sulla checkbox
|
||||
Private Sub CollapsedCheckAllTextSideAng()
|
||||
NewEntity.Text = "A#"
|
||||
|
||||
PrevBtn.Visibility = Visibility.Collapsed
|
||||
NextBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -1465,7 +1506,7 @@ Public Class SideAngleUC
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) And m_MainWindow.m_CurrentMachine.bApplySawingTilted Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
|
||||
+171
-10
@@ -16,7 +16,7 @@
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -27,7 +27,9 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="FinalSawCutGpBx" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.RowSpan="4" Margin="5,0,5,0">
|
||||
<!--definizione della grigli ainterna-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -36,23 +38,182 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Name="FinalDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="FinalDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri fori: 4 Parametri-->
|
||||
<GroupBox Name="HolesGpBx" Grid.Column="1" Grid.RowSpan="3" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
||||
<GroupBox Name="RectificationWJParamGpBx" Grid.Column="1" Grid.Row="4" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" >
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableRectificationTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="EnableRectificationChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri WaterJet: 5 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||
<GroupBox Name="WjsParamGpBx" Grid.Column="1" Grid.RowSpan="4" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesDiameterWJTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOffsetWJTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetWJTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="MinRadiusWJTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MinRadiusWJTxBx" Grid.Column="2" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerWJTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri Fresatura: 3 Parametri-->
|
||||
<GroupBox Name="MillingsParamGpBx" Grid.Column="2" Grid.RowSpan="3" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
|
||||
+262
-14
@@ -1,30 +1,278 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class Alarms2PageUC
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_CurrentMachine As CurrentMachine
|
||||
|
||||
' Properties
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
Private Sub Alarms2Page_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
||||
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
||||
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
||||
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
||||
MillingsParamGpBx.Header = EgtMsg(90929) ' Parametri fresature
|
||||
WjsParamGpBx.Header = EgtMsg(91058) ' Parametri waterjet
|
||||
WjsParamGpBx.Header = EgtMsg(91058) ' Parametri waterjet
|
||||
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
|
||||
|
||||
HolesOffsetTxBl.Text = EgtMsg(90909) ' Offset fori
|
||||
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
||||
HolesToleranceTxBl.Text = EgtMsg(90911) ' Tolleranza fori
|
||||
OneHoleInCornerTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
CutExtraLenTxBl.Text = EgtMsg(90906) ' Sicurezza tagli
|
||||
AngleCutExtraLenTxBl.Text = EgtMsg(90907) ' Sicur. angoli
|
||||
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
||||
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
||||
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
ShortTxBl.Text = EgtMsg(90949) ' Accorciamento
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
|
||||
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
|
||||
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Allarm2Page_Loaded() Handles Me.Loaded
|
||||
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
|
||||
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
|
||||
If m_bFirst Then
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
'Da implementare
|
||||
End Select
|
||||
|
||||
' Se non previste forature, disabilito relativo box
|
||||
If Not m_CurrentMachine.bDrilling Then
|
||||
HolesGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
||||
If Not m_CurrentMachine.bMilling Then
|
||||
MillingsParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
Dim dVal As Double
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
HolesOffsetTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sovrapposizione fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOverlapTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo tolleranza diametro fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
HolesToleranceTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo un solo foro in corner
|
||||
OneHoleInCornerChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo sicurezza su tagli
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
CutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sicurezza su tagli in angoli interni
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 0, m_MainWindow.GetMachIniFile())
|
||||
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo raggio minimo arco esterno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = (nPreCutExit <> 0)
|
||||
End If
|
||||
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
End Sub
|
||||
|
||||
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
||||
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
||||
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub FinalDepthTxBx_EgtClosed() Handles FinalDepthTxBx.EgtClosed
|
||||
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(FinalDepthTxBx.Text, dVal)
|
||||
m_MainWindow.m_CurrentMachine.dFinalDepth = dVal
|
||||
WritePrivateProfileString(S_MACH, K_FINALDEPTH, DoubleToString(m_MainWindow.m_CurrentMachine.dFinalDepth, 3), m_MainWindow.GetMachIniFile())
|
||||
StringToLen(CutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub AngleCutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AngleCutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(AngleCutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||
If PreCutExitChBx.IsChecked Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOffsetTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OFFSET, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOverlapTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOverlapTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OVERLAP, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesToleranceTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesToleranceTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesToleranceTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
||||
If OneHoleInCornerChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||
If CornerCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ShortTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_SHORTENING, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
||||
If InternalCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
||||
If WjIntCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
End Class
|
||||
|
||||
+72
-280
@@ -20,7 +20,6 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -30,254 +29,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||
<Grid.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<!--GroupBox: vai ad Home-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri fori: 4 Parametri-->
|
||||
<GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri Fresatura: 3 Parametri-->
|
||||
<GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
||||
<GroupBox Name="RectificationWJParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" >
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="EnableRectificationTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="EnableRectificationChBx" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--<TextBlock Name="OffsetRectificationTxBl" Grid.Row="1" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetRectificationTxBx" Grid.Row="1" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri WaterJet: 5 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="4"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesDiameterWJTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOffsetWJTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetWJTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="MinRadiusWJTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MinRadiusWJTxBx" Grid.Column="2" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerWJTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FinalHomeChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid Grid.RowSpan="3" Margin="6,0,6,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -492,7 +244,7 @@
|
||||
|
||||
</Grid>-->
|
||||
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Margin="5,0,5,0"
|
||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||
|
||||
<Grid>
|
||||
@@ -524,7 +276,7 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Margin="0,0,5,0"
|
||||
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
|
||||
@@ -639,7 +391,7 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,5,0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -651,36 +403,29 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="4">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
@@ -693,7 +438,8 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<GroupBox Name="NestingParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -736,7 +482,8 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -773,8 +520,9 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="2" Grid.RowSpan="1">
|
||||
<GroupBox Name="CutFredGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2"
|
||||
Grid.Row="0" Grid.RowSpan="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -798,8 +546,8 @@
|
||||
</GroupBox>
|
||||
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="3" Grid.RowSpan="3">
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Margin="0,0,5,0"
|
||||
Grid.Row="1" Grid.RowSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -831,8 +579,36 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FinalSawCutGpBx" Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Name="FinalDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="FinalDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="SideAngCutProbeGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -846,9 +622,11 @@
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</GroupBox>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<GroupBox Name="WashingGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}"
|
||||
Grid.Column="3" Grid.Row="3" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -862,10 +640,11 @@
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</GroupBox>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<GroupBox Name="FrameGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="5" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -881,7 +660,20 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||
<GroupBox Name="DirectCutsParamGpBx" Margin="0,0,5,0"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FinalHomeChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8" Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
|
||||
+40
-240
@@ -62,45 +62,19 @@ Public Class AlarmsPageUC
|
||||
CurrCupWheelTxBl.Text = EgtMsg(91070) ' Scasso corrente
|
||||
CurrMillTxBl.Text = EgtMsg(90904) ' Fresa corrente
|
||||
CurrWJetTxBl.Text = EgtMsg(90900) ' Waterjet corrente
|
||||
HolesOffsetTxBl.Text = EgtMsg(90909) ' Offset fori
|
||||
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
||||
HolesToleranceTxBl.Text = EgtMsg(90911) ' Tolleranza fori
|
||||
OneHoleInCornerTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
CutExtraLenTxBl.Text = EgtMsg(90906) ' Sicurezza tagli
|
||||
AngleCutExtraLenTxBl.Text = EgtMsg(90907) ' Sicur. angoli
|
||||
CompleteCutsTxBl.Text = EgtMsg(90908) ' Rispetta i tagli completi
|
||||
SafeZTxBl.Text = EgtMsg(90905) ' Z Sicura
|
||||
MaterialsGpBx.Header = EgtMsg(90913) ' Materiali
|
||||
NewMatBtn.Content = EgtMsg(90914) ' Aggiungi
|
||||
RemoveMatBtn.Content = EgtMsg(90915) ' Rimuovi
|
||||
SetUpGpBx.Header = EgtMsg(90916) ' Utensili correnti
|
||||
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
||||
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
||||
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||
MachineParamGpBx.Header = EgtMsg(90919) ' Parametri macchina
|
||||
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
||||
DirectCutsParamGpBx.Header = EgtMsg(90927) ' Tagli diretti
|
||||
FinalHomeTxBl.Text = EgtMsg(90928) ' Home finale
|
||||
MillingsParamGpBx.Header = EgtMsg(90929) ' Parametri fresature
|
||||
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
||||
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
ShortTxBl.Text = EgtMsg(90949) ' Accorciamento
|
||||
TopMillGpBx.Header = EgtMsg( 91061) ' Parametri incisioni
|
||||
TopMillGpBx.Header = EgtMsg(91061) ' Parametri incisioni
|
||||
TmEnableTxBl.Text = EgtMsg( 91062) ' Con fresa
|
||||
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
||||
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
|
||||
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
|
||||
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(90926) ' Un solo foro in angolo
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
|
||||
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
|
||||
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
NestingParamGpBx.Header = EgtMsg(90931) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||
@@ -113,8 +87,6 @@ Public Class AlarmsPageUC
|
||||
BackImageBtn.Content = EgtMsg(90938) ' Sfondo
|
||||
ThresholdTxBl.Text = EgtMsg(90939) ' Soglia
|
||||
ToleranceTxBl.Text = EgtMsg(90940) ' Tolleranza
|
||||
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
||||
SideAngCutProbeTxBl.Text = EgtMsg(90950) ' Tastatura tagli inclinati
|
||||
CutFredGpBx.Header = EgtMsg(90946) ' Tagli Feed inizio/fine
|
||||
CfrLenTxBl.Text = EgtMsg(90947) ' Lunghezza
|
||||
CfrPercTxBl.Text = EgtMsg(90948) ' Riduzione %
|
||||
@@ -130,16 +102,20 @@ Public Class AlarmsPageUC
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||
SideAngCutProbeGpBx.Header = EgtMsg(90950) ' Tastatura
|
||||
SideAngCutProbeTxBl.Text = EgtMsg(90950) ' Tastatura tagli inclinati
|
||||
WashingGpBx.Header = EgtMsg(90941) ' Lavaggio
|
||||
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
||||
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
||||
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
||||
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
If m_bFirst Then
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
TopMillGpBx.Visibility = Visibility.Hidden
|
||||
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||
@@ -157,31 +133,18 @@ Public Class AlarmsPageUC
|
||||
CurrToolsGrid.RowDefinitions.Add(EndRow)
|
||||
SetUpGpBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
'Da implementare
|
||||
End Select
|
||||
|
||||
' Se non previste forature, disabilito relativo box
|
||||
If Not m_CurrentMachine.bDrilling Then
|
||||
HolesGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
||||
If Not m_CurrentMachine.bMilling Then
|
||||
MillingsParamGpBx.Visibility = Visibility.Hidden
|
||||
TmEnableChBx.IsEnabled = False
|
||||
TmEnableChBx.IsChecked = False
|
||||
End If
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
If m_MainWindow.m_Camera.GetCalcContour() Then
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -353,71 +316,12 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Leggo offset fori
|
||||
Dim dVal As Double
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
HolesOffsetTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sovrapposizione fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOverlapTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo tolleranza diametro fori
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
HolesToleranceTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo un solo foro in corner
|
||||
OneHoleInCornerChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo sicurezza su tagli
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
CutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo sicurezza su tagli in angoli interni
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 0, m_MainWindow.GetMachIniFile())
|
||||
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo distanza di sicurezza
|
||||
dVal = 0
|
||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, dVal)
|
||||
SafeZTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo raggio minimo arco esterno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = ( nPreCutExit <> 0)
|
||||
End If
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo flag abilitazione incisioni con fresa
|
||||
TmEnableChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
@@ -483,6 +387,8 @@ Public Class AlarmsPageUC
|
||||
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||
End If
|
||||
|
||||
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
|
||||
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
@@ -708,6 +614,24 @@ Public Class AlarmsPageUC
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
|
||||
' Se è associata anche una lavorazione inclinata allora deve essere resettata
|
||||
If m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
m_CurrentMachine.sCurrSawTilted = CurrSawCmBx.SelectedItem.ToString()
|
||||
' Se nuova lama incompatibile con lavorazione di taglio corrente, resetto quest'ultima
|
||||
sMchTuuid = String.Empty
|
||||
sMchTool = String.Empty
|
||||
If Not EgtMdbSetCurrMachining(m_CurrentMachine.sCurrSawingTilted) Or
|
||||
Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMchTuuid) Or
|
||||
Not EgtTdbGetToolFromUUID(sMchTuuid, sMchTool) Or
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSawTilted, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- SAW TILTED --
|
||||
@@ -925,50 +849,6 @@ Public Class AlarmsPageUC
|
||||
m_MainWindow.m_MachinePageUC.MachinePageGrid.Children.Add(m_SetUpPage)
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOffsetTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OFFSET, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesOverlapTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOverlapTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_OVERLAP, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesToleranceTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HolesToleranceTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesToleranceTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_HOLES_DIAMTOLER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
||||
If OneHoleInCornerChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(CutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_CUT, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTRALONCUTREG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub AngleCutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AngleCutExtraLenTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(AngleCutExtraLenTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub SafeZTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SafeZTxBx.EgtClosed
|
||||
Dim dSafeZ As Double = 0
|
||||
StringToLen(SafeZTxBx.Text, dSafeZ)
|
||||
@@ -976,30 +856,6 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||
If PreCutExitChBx.IsChecked Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CompleteCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CompleteCutsChBx.Click
|
||||
Dim NestPage As NestPageUC = m_MainWindow.m_CadCutPageUC.m_NestPage
|
||||
If CompleteCutsChBx.IsChecked() Then
|
||||
@@ -1025,74 +881,6 @@ Public Class AlarmsPageUC
|
||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
End Sub
|
||||
|
||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||
If CornerCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ShortTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_SHORTENING, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
||||
If InternalCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
||||
If WjIntCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
||||
If TmEnableChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -1557,4 +1345,16 @@ Public Class AlarmsPageUC
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
||||
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
||||
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub FinalDepthTxBx_EgtClosed() Handles FinalDepthTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(FinalDepthTxBx.Text, dVal)
|
||||
m_MainWindow.m_CurrentMachine.dFinalDepth = dVal
|
||||
WritePrivateProfileString(S_MACH, K_FINALDEPTH, DoubleToString(m_MainWindow.m_CurrentMachine.dFinalDepth, 3), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<GroupBox Name="PartProgTransferGpBx"
|
||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.ColumnSpan="3">
|
||||
Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -127,9 +127,16 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="SpecialSendGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.Column="2" Grid.ColumnSpan="1" Margin="5,0,5,0">
|
||||
<CheckBox Name="SpecialSendChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,0"/>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
||||
<Grid>
|
||||
Grid.Column="3" Grid.ColumnSpan="1" Margin="5,0,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
|
||||
@@ -37,6 +37,16 @@ Public Class MachineCNPageUC
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se prevista, scelta invio speciale part program
|
||||
Dim nSpecialSend As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALSEND, -1, m_MainWindow.GetMachIniFile())
|
||||
If nSpecialSend <> -1 Then
|
||||
SpecialSendChBx.IsChecked() = (nSpecialSend = 1)
|
||||
SpecialSendGpBx.Header = "Special Send"
|
||||
SpecialSendGpBx.Visibility = Visibility.Visible
|
||||
else
|
||||
SpecialSendGpBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
' nuovi pulsanti
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
PowerONBtn.Content = "ON"
|
||||
@@ -85,7 +95,7 @@ Public Class MachineCNPageUC
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
Dim sTestVal As String = String.Empty
|
||||
' se non trovo il primo pulsante della lista allora nascondo l'elenco dei pulasnti per accensione
|
||||
' se non trovo il primo pulsante della lista allora nascondo l'elenco dei pulsanti per accensione
|
||||
If GetPrivateProfileString("MachineButtons", K_BUTTON & "1", "", sTestVal, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
Return
|
||||
@@ -323,6 +333,10 @@ Public Class MachineCNPageUC
|
||||
MDITxBx.Background = Brushes.LightGray
|
||||
End Sub
|
||||
|
||||
Private Sub SpecialSend_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendChBx.Click
|
||||
m_MainWindow.m_CNCommunication.SpecialSend() = If( SpecialSendChBx.IsChecked(), 1, 0)
|
||||
End Sub
|
||||
|
||||
Private Sub PowerON_Click(sender As Object, e As RoutedEventArgs) Handles PowerONBtn.Click
|
||||
Dim PowerOnButton As MachineButton = m_ButtonPower(0)
|
||||
' eseguo lo script lua associato
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource DatiMacchinaImg1}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Alarms2Btn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource DatiMacchinaImg2}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
@@ -236,6 +236,10 @@ Public Class MachineStatusUC
|
||||
End Sub
|
||||
|
||||
Sub DisplayPosition()
|
||||
Dim nNumDec As Integer = -3
|
||||
If m_MainWindow.m_CNCommunication.GetMachineInInches() Then
|
||||
nNumDec = -4
|
||||
End If
|
||||
' Recupero le posizioni macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
||||
@@ -247,33 +251,37 @@ Public Class MachineStatusUC
|
||||
dL3 = ptTip.z
|
||||
End If
|
||||
' Visualizzazione
|
||||
Axis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
Axis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
Axis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
Axis1TxBx.Text = LenToString(dL1, nNumDec, True)
|
||||
Axis2TxBx.Text = LenToString(dL2, nNumDec, True)
|
||||
Axis3TxBx.Text = LenToString(dL3, nNumDec, True)
|
||||
Axis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
Axis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, nNumDec, True)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, nNumDec, True)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, nNumDec, True)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, nNumDec, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayPositionDelta()
|
||||
Dim nNumDec As Integer = -3
|
||||
If m_MainWindow.m_CNCommunication.GetMachineInInches() Then
|
||||
nNumDec = -4
|
||||
End If
|
||||
' Recupero le posizioni macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
||||
' Visualizzazione
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, nNumDec, True)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, nNumDec, True)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, nNumDec, True)
|
||||
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, nNumDec, True)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, nNumDec, True)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, nNumDec, True)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, nNumDec, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayFeed()
|
||||
@@ -335,16 +343,16 @@ Public Class MachineStatusUC
|
||||
|
||||
Sub DisplayActiveMode(Mode As Integer)
|
||||
Select Case Mode
|
||||
Case 0
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Auto.png", UriKind.Relative))
|
||||
Case 1
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Single.png", UriKind.Relative))
|
||||
Case 2
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Mdi.png", UriKind.Relative))
|
||||
Case 7
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Manual.png", UriKind.Relative))
|
||||
Case 8
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Home.png", UriKind.Relative))
|
||||
Case 0
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Auto.png", UriKind.Relative))
|
||||
Case 1
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Single.png", UriKind.Relative))
|
||||
Case 2
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Mdi.png", UriKind.Relative))
|
||||
Case 7
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Manual.png", UriKind.Relative))
|
||||
Case 8
|
||||
MachineStatusImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("\Resources\MachineStatusImage\Home.png", UriKind.Relative))
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2221,7 +2221,7 @@ Public Class MachiningDbPageUC
|
||||
Friend Function SaveCurrMachining() As Boolean
|
||||
SetMachiningParams()
|
||||
If EgtMdbIsCurrMachiningModified() Then
|
||||
Dim SaveCurrMachiningWnd As New EgtMsgBox(m_MainWindow, "", EgtMsg(91003), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL) ' Inclinazione
|
||||
Dim SaveCurrMachiningWnd As New EgtMsgBox(m_MainWindow, "", EgtMsg(91103), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL) ' Inclinazione
|
||||
Select Case SaveCurrMachiningWnd.m_nPressedBtn
|
||||
Case 0 ' Annulla
|
||||
Return False
|
||||
|
||||
+2
-2
@@ -362,8 +362,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2707, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2707, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2709, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2709, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.7.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.7.2")>
|
||||
<Assembly: AssemblyVersion("2.7.9.3")>
|
||||
<Assembly: AssemblyFileVersion("2.7.9.3")>
|
||||
|
||||
+250
-93
@@ -20,6 +20,21 @@ Public Class CNCommunication
|
||||
' Variabile per tipologia CN
|
||||
Friend m_nNCType As Integer
|
||||
|
||||
' Modalità speciale invio programmi (attualmente solo per Fanuc, fino a 4 programmi)
|
||||
Private m_nSpecialSend As Integer = -1
|
||||
Friend Property SpecialSend As Integer
|
||||
Get
|
||||
Return m_nSpecialSend
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
value = Math.Max( Math.Min( value, 1), -1)
|
||||
If value <> m_nSpecialSend Then
|
||||
m_nSpecialSend = value
|
||||
WritePrivateProfileString( S_NUMERICALCONTROL, K_SPECIALSEND, value.ToString(), m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Variabile che indica il Mode corrente
|
||||
Private m_nCurrMode As Integer = -1
|
||||
|
||||
@@ -73,6 +88,11 @@ Public Class CNCommunication
|
||||
Private m_nA10 As Integer = 9
|
||||
Private m_bInInches As Boolean = False ' Solo per comandi diretti (assi sempre in mm)
|
||||
|
||||
' NUVO! ver. 2.7h2: m_sA1=nome (in grafica), tipo (Linear/Rotary), m_nA1=indice (nel vettore CN)
|
||||
Private m_ListAxesData As New List(Of AxisData)
|
||||
Public Function GetListAxesData() As List(Of AxisData)
|
||||
Return m_ListAxesData
|
||||
End Function
|
||||
|
||||
Friend Sub CNCommunication_Initialization()
|
||||
|
||||
@@ -93,6 +113,10 @@ Public Class CNCommunication
|
||||
|
||||
EgtOutLog("NcLink=" & m_MainWindow.m_bNCLink.ToString & " type=" & m_nNCType)
|
||||
|
||||
' Leggo flag invio speciale programma di lavoro
|
||||
Dim nTemp As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALSEND, -1, m_MainWindow.GetMachIniFile())
|
||||
m_nSpecialSend = Math.Max( Math.Min( nTemp, 1), -1)
|
||||
|
||||
' Se CN Siemens leggo dati programma intermedio di comunicazione
|
||||
If m_nNCType = 3 Then
|
||||
Dim sExeName As String = String.Empty
|
||||
@@ -164,83 +188,149 @@ Public Class CNCommunication
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "ver 2.7h2 NUOVA LETTURA ASSI"
|
||||
|
||||
' Dal nome della chiave cerca di estrarre la definizione del tipo di asse
|
||||
Private Sub GetDefaultTypeAxis(sKeyAxis As String, ByRef bIsLinear As Boolean)
|
||||
' non è stato definito il tipo asse: cerco di assegnarlo di default
|
||||
Dim sMsg As String = String.Empty
|
||||
If sKeyAxis.StartsWith("L") Then
|
||||
sMsg = "Linear"
|
||||
bIsLinear = True
|
||||
ElseIf sKeyAxis.StartsWith("R") Then
|
||||
sMsg = "Rotary"
|
||||
bIsLinear = False
|
||||
Else
|
||||
sMsg = "Linear"
|
||||
bIsLinear = True
|
||||
End If
|
||||
EgtOutLog("In file *.ini machine in section '[Axes]' axis type '" & sKeyAxis & "' has been defined by default as " & sMsg)
|
||||
End Sub
|
||||
|
||||
' Legge da file *.ini macchina la definizione del tipo di asse
|
||||
Private Function GetTypeAxis(sKeyAxis As String)
|
||||
Dim bIsLinear As Boolean = True
|
||||
Dim sValue As String = String.Empty
|
||||
GetPrivateProfileString(S_AXES, sKeyAxis, "", sValue, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sValue) Then
|
||||
If sValue.ToLower = "linear" Then
|
||||
bIsLinear = True
|
||||
ElseIf sValue.ToLower = "rotary" Then
|
||||
bIsLinear = False
|
||||
Else
|
||||
GetDefaultTypeAxis(sKeyAxis, bIsLinear)
|
||||
End If
|
||||
Else
|
||||
GetDefaultTypeAxis(sKeyAxis, bIsLinear)
|
||||
End If
|
||||
' Ritorno il booleano che definisce il tipo di asse che è stato letto
|
||||
Return bIsLinear
|
||||
End Function
|
||||
|
||||
' Imposto il vettore dei tipi asse macchina
|
||||
Private Sub SetArrayAxisIsLinear()
|
||||
For Each Item As AxisData In m_ListAxesData
|
||||
m_CN.b_axis_is_linear(Item.nIndex) = Item.bIsLinear
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Legge da file *.ini macchina il nome dell'asse, se non esiste impone il valore di default e restituisce FALSE
|
||||
Private Function SetNameAxis(sKeyAxis As String, sAxisDefaultName As String, ByRef sAxisName As String) As Boolean
|
||||
Dim bAxisExist As Boolean = False
|
||||
Dim sValue As String = String.Empty
|
||||
bAxisExist = (GetPrivateProfileString(S_AXES, sKeyAxis, "", sValue, m_MainWindow.GetMachIniFile()) > 0)
|
||||
If String.IsNullOrEmpty(sValue) Then
|
||||
sAxisName = sAxisDefaultName
|
||||
Else
|
||||
sAxisName = sValue
|
||||
End If
|
||||
Return bAxisExist
|
||||
End Function
|
||||
|
||||
Private Function SetIndexAxis(sKeyAxis As String, nAxisDefaultIndex As Integer, ByRef nAxisIndex As String) As Boolean
|
||||
Dim bAxisExist As Boolean = True
|
||||
nAxisIndex = GetPrivateProfileInt(S_AXES, sKeyAxis, nAxisDefaultIndex, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(nAxisIndex) Then
|
||||
nAxisIndex = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on " & sKeyAxis)
|
||||
bAxisExist = False
|
||||
End If
|
||||
Return bAxisExist
|
||||
End Function
|
||||
|
||||
Private Sub ReadAxesData()
|
||||
' Nomi e indici degli assi macchina: definisco il nome degli assi da satampare nella pagina MachineStatusUC
|
||||
m_bAxesOk = True
|
||||
GetPrivateProfileString(S_AXES, K_L1NAME, "X", m_sA1, m_MainWindow.GetMachIniFile())
|
||||
m_nA1 = GetPrivateProfileInt(S_AXES, K_L1ID, 0, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA1) Then
|
||||
m_nA1 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on L1ID")
|
||||
Dim bAxisExist As Boolean = False
|
||||
bAxisExist = SetNameAxis(K_L1NAME, "X", m_sA1)
|
||||
If SetIndexAxis(K_L1ID, 0, m_nA1) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_L1TYPE), m_sA1, m_nA1))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_L2NAME, "Y", m_sA2, m_MainWindow.GetMachIniFile())
|
||||
m_nA2 = GetPrivateProfileInt(S_AXES, K_L2ID, 1, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA2) Then
|
||||
m_nA2 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on L2ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_L2NAME, "Y", m_sA2)
|
||||
If SetIndexAxis(K_L2ID, 1, m_nA2) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_L2TYPE), m_sA2, m_nA2))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_L3NAME, "Z", m_sA3, m_MainWindow.GetMachIniFile())
|
||||
m_nA3 = GetPrivateProfileInt(S_AXES, K_L3ID, 2, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA3) Then
|
||||
m_nA3 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on L3ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_L3NAME, "Z", m_sA3)
|
||||
If SetIndexAxis(K_L3ID, 2, m_nA3) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_L3TYPE), m_sA3, m_nA3))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_R1NAME, "C", m_sA4, m_MainWindow.GetMachIniFile())
|
||||
m_nA4 = GetPrivateProfileInt(S_AXES, K_R1ID, 8, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA4) Then
|
||||
m_nA4 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on R1ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_R1NAME, "C", m_sA4)
|
||||
If SetIndexAxis(K_R1ID, 8, m_nA4) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_R1TYPE), m_sA4, m_nA4))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_R2NAME, "B", m_sA5, m_MainWindow.GetMachIniFile())
|
||||
m_nA5 = GetPrivateProfileInt(S_AXES, K_R2ID, 7, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA5) Then
|
||||
m_nA5 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on R2ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_R2NAME, "B", m_sA5)
|
||||
If SetIndexAxis(K_R2ID, 7, m_nA5) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_R2TYPE), m_sA5, m_nA5))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_A6NAME, "A", m_sA6, m_MainWindow.GetMachIniFile())
|
||||
m_nA6 = GetPrivateProfileInt(S_AXES, K_A6ID, 6, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA6) Then
|
||||
m_nA6 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on A6ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_A6NAME, "A", m_sA6)
|
||||
If SetIndexAxis(K_A6ID, 6, m_nA6) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_A6TYPE), m_sA6, m_nA6))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_A7NAME, "U", m_sA7, m_MainWindow.GetMachIniFile())
|
||||
m_nA7 = GetPrivateProfileInt(S_AXES, K_A7ID, 3, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA7) Then
|
||||
m_nA7 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on A7ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_A7NAME, "U", m_sA7)
|
||||
If SetIndexAxis(K_A7ID, 3, m_nA7) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_A7TYPE), m_sA7, m_nA7))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_A8NAME, "V", m_sA8, m_MainWindow.GetMachIniFile())
|
||||
m_nA8 = GetPrivateProfileInt(S_AXES, K_A8ID, 4, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA8) Then
|
||||
m_nA8 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on A8ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_A8NAME, "V", m_sA8)
|
||||
If SetIndexAxis(K_A8ID, 4, m_nA8) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_A8TYPE), m_sA8, m_nA8))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_A9NAME, "W", m_sA9, m_MainWindow.GetMachIniFile())
|
||||
m_nA9 = GetPrivateProfileInt(S_AXES, K_A9ID, 5, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA9) Then
|
||||
m_nA9 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on A9ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_A9NAME, "W", m_sA9)
|
||||
If SetIndexAxis(K_A9ID, 5, m_nA9) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_A9TYPE), m_sA9, m_nA9))
|
||||
End If
|
||||
GetPrivateProfileString(S_AXES, K_A10NAME, "P", m_sA10, m_MainWindow.GetMachIniFile())
|
||||
m_nA10 = GetPrivateProfileInt(S_AXES, K_A10ID, 5, m_MainWindow.GetMachIniFile())
|
||||
If Not m_CN.VerifyAxis(m_nA10) Then
|
||||
m_nA10 = -1
|
||||
m_bAxesOk = False
|
||||
EgtOutLog("Error on A10ID")
|
||||
|
||||
bAxisExist = SetNameAxis(K_A10NAME, "P", m_sA10)
|
||||
If SetIndexAxis(K_A10ID, 5, m_nA10) Then
|
||||
' aggiungo l'asse alla lista degli assi
|
||||
If bAxisExist Then m_ListAxesData.Add(New AxisData(GetTypeAxis(K_A10TYPE), m_sA10, m_nA10))
|
||||
End If
|
||||
|
||||
' Unità di misura
|
||||
m_bInInches = (GetPrivateProfileInt(S_AXES, K_ININCHES, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Crea il vettore che ad ogni posizione definisce il tipo di asse assegnato
|
||||
SetArrayAxisIsLinear()
|
||||
End Sub
|
||||
|
||||
#End Region ' ver 2.7h2 nuova gestione
|
||||
|
||||
Private Sub KillSimensCom(sProcessName As String)
|
||||
Dim sAppName As String = Path.GetFileNameWithoutExtension(sProcessName)
|
||||
Dim pList() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses
|
||||
@@ -1112,7 +1202,7 @@ Public Class CNCommunication
|
||||
'Laser = 16384
|
||||
End Enum
|
||||
|
||||
#Region "MASCHERA per conttrollo Bit a Bit"
|
||||
#Region "MASCHERA per controllo Bit a Bit"
|
||||
<Flags()>
|
||||
Public Enum Mask As Integer
|
||||
bit_Err = -1
|
||||
@@ -1497,10 +1587,6 @@ Public Class CNCommunication
|
||||
Optional bActivate As Boolean = True) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
|
||||
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||
' m_nNCType = 2
|
||||
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||
|
||||
' Download programma
|
||||
If m_MainWindow.m_bNCLink Then
|
||||
bOk = (m_nNCType > 0)
|
||||
@@ -1511,6 +1597,10 @@ Public Class CNCommunication
|
||||
Else
|
||||
sNumProg = nNumProg.ToString()
|
||||
End If
|
||||
' Se Fanuc con trasmissione speciale, disabilito attivazione
|
||||
If m_nNCType = 4 AndAlso m_nSpecialSend = 1 Then
|
||||
bActivate = False
|
||||
End If
|
||||
' Se richiesta successiva attivazione, faccio reset
|
||||
If bActivate Then
|
||||
EgtOutLog("Call function: DGeneralFunctions_Reset")
|
||||
@@ -1529,42 +1619,47 @@ Public Class CNCommunication
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
ElseIf m_nNCType = 4 Then
|
||||
' FANUC: imposto modalità EDIT
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(1) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
' FANUC: imposto modalità EDIT se non special send
|
||||
If m_nSpecialSend <> 1 Then
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(1) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
End If
|
||||
EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")")
|
||||
' -------------- START DOWNLOAD --------------
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' FANUC: genero un file 901 vuoto da aspedire, attivare; poi rispedisco il file 900
|
||||
If m_nNCType = 4 And Not bOk Then
|
||||
bOk = True
|
||||
Dim sCncPath1 As String = m_MainWindow.GetCncDir() & "\PlaceHolder" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim fs As FileStream = File.Create(sCncPath1)
|
||||
' Add text to the file.
|
||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(vbLf & "(PlaceHolder)")
|
||||
fs.Write(info, 0, info.Length)
|
||||
fs.Close()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath1, "901") = 0)
|
||||
If m_nNCType = 4 AndAlso m_nSpecialSend = 1 Then
|
||||
bOk = bOk AndAlso SpecialSendProgram(sCncPath, sNumProg)
|
||||
Else
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
If bActivate Then
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram("901") = 0)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' FANUC: genero un file 901 vuoto da spedire, attivare; poi rispedisco il file 900
|
||||
If m_nNCType = 4 And Not bOk Then
|
||||
bOk = True
|
||||
Dim sCncPath1 As String = m_MainWindow.GetCncDir() & "\PlaceHolder" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim fs As FileStream = File.Create(sCncPath1)
|
||||
' Add text to the file.
|
||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(vbLf & "(PlaceHolder)")
|
||||
fs.Write(info, 0, info.Length)
|
||||
fs.Close()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath1, "901") = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
If bActivate Then
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram("901") = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
' riprovo ad eseguire il programma 900
|
||||
bOk = True
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
' riprovo ad eseguire il programma 900
|
||||
bOk = True
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
EgtOutLog("Nc Type : " & m_nNCType.ToString)
|
||||
' AXIUM (NUM OLD): se DripFeed non esegluo attivazione programma)
|
||||
' AXIUM (NUM OLD): se DripFeed non eseguo attivazione programma)
|
||||
If m_nNCType = 1 AndAlso m_CN.bIsDripFeed Then
|
||||
' eventauli cambi di stato sono trattati all'interno della funzione DownLoad_NC_prog
|
||||
Return True
|
||||
@@ -1581,7 +1676,7 @@ Public Class CNCommunication
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Attivo la modalità AUTO prima per preparar il cyclo start
|
||||
' Attivo la modalità AUTO prima per preparare il cyclo start
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
@@ -1604,6 +1699,56 @@ Public Class CNCommunication
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function SpecialSendProgram(sz_PC_filename As String, sz_NC_filename As String) As Boolean
|
||||
' Solo per Fanuc
|
||||
If m_nNCType <> 4 Then Return False
|
||||
' Indice base
|
||||
Dim nBase As Integer = 900
|
||||
' Ho possibilità di trasmettere in 4 aree consecutive (901, 902, 903 e 904)
|
||||
For I As Integer = 1 To 4
|
||||
' Leggo la variabile semaforo dell'area I-esima
|
||||
Dim nVal As Integer = -1
|
||||
Dim sVar As String = "#" & (nBase + I).ToString()
|
||||
EgtOutLog( "IndVar=" & sVar)
|
||||
For J As Integer = 1 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_CN.ReadEls_Add_Parameter(sVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If m_CN.n_DReadELS_handle = 3 Then
|
||||
nVal = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
EgtOutLog( "Value=" & nVal.ToString())
|
||||
If nVal <> -1 Then
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' Se posso trasmettere
|
||||
If nVal = 0 Then
|
||||
' Assegno numero di programma
|
||||
Dim sNumProg As String = "O0" & ( nBase + I).ToString()
|
||||
EgtOutLog( "NumProg=" & sNumProg)
|
||||
' Eseguo trasmissione
|
||||
Dim bOk As Boolean = ( m_CN.Download_NC_prog(sz_PC_filename, sNumProg) = 0)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
EgtOutLog( "SendResult=" & bOk.ToString())
|
||||
' Se non riuscita riprovo
|
||||
If Not bOk Then
|
||||
bOk = ( m_CN.Download_NC_prog(sz_PC_filename, sNumProg) = 0)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
EgtOutLog( "SecondSendResult=" & bOk.ToString())
|
||||
End If
|
||||
' Se andata a buon fine
|
||||
If bOk Then
|
||||
' Dichiaro programma trasmesso
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(sVar, "1")
|
||||
System.Threading.Thread.Sleep(100)
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub GetSpecialCAxes()
|
||||
If m_CN.bCPos Then
|
||||
m_CN.d_axis_position(m_nA4) = m_CN.dCPos
|
||||
@@ -1808,4 +1953,16 @@ Public Class IndexArrayToBit
|
||||
m_sNameVar = NameVar
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
' Utlizzata per definire la lista degli assi impostati in macchina
|
||||
Public Class AxisData
|
||||
Public bIsLinear As Boolean
|
||||
Public sName As String
|
||||
Public nIndex As Integer
|
||||
Sub New(_bIsLinear As Boolean, _sName As String, _nINdex As Integer)
|
||||
bIsLinear = _bIsLinear
|
||||
sName = _sName
|
||||
nIndex = _nINdex
|
||||
End Sub
|
||||
End Class
|
||||
@@ -131,6 +131,8 @@ Public MustInherit Class CN_generico
|
||||
Public d_axis_position(MAX_AXES) As Double
|
||||
Public d_axis_delta(MAX_AXES) As Double
|
||||
Public b_axis_valid(MAX_AXES) As Boolean
|
||||
' ver. 2.7h2: gestione del tipo di asse per eseguire una corretta conversione dei dati inch/mm
|
||||
Public b_axis_is_linear(MAX_AXES) As Boolean
|
||||
|
||||
Public d_DReadELS_value As Double
|
||||
Public n_DReadELS_handle As Short
|
||||
|
||||
+5
-1
@@ -1372,7 +1372,11 @@ Module M_Fanuc
|
||||
FileOpen(nFilew, szFileProgramma, OpenMode.Output)
|
||||
|
||||
' PrintLine(nFilew, "%" & vbLf & "<" & NomeSend & ">") ' !!!!!!!! da spostare
|
||||
PrintLine(nFilew, vbLf & "<" & NomeSend & ">") ' !!
|
||||
If NomeSend.StartsWith( "O") Then
|
||||
PrintLine(nFilew, vbLf & NomeSend) ' !!
|
||||
Else
|
||||
PrintLine(nFilew, vbLf & "<" & NomeSend & ">") ' !!
|
||||
End If
|
||||
|
||||
'trascrivo file tranne prima linea
|
||||
While (Not EOF(nFiler))
|
||||
|
||||
+884
-866
File diff suppressed because it is too large
Load Diff
+19
-8
@@ -734,15 +734,26 @@ Module M_MMFiles
|
||||
' Copia delle quote degli assi
|
||||
For nI As Integer = 0 To (m_Axes_Id.Count() - 1)
|
||||
Dim nId As Short = m_Axes_Id(nI)
|
||||
' agli assi lineari devo applicare il coefficiente
|
||||
If (nId Mod 10) < 3 Then
|
||||
CurrCN.d_axis_position(nI) = SiemensRet.d_interf_axis_position(nId) * LinCoeff
|
||||
CurrCN.d_axis_delta(nI) = SiemensRet.d_interf_axis_delta(nId) * LinCoeff
|
||||
' gli assi rotanti sono sempre in gradi
|
||||
Else
|
||||
CurrCN.d_axis_position(nI) = SiemensRet.d_interf_axis_position(nId)
|
||||
CurrCN.d_axis_delta(nI) = SiemensRet.d_interf_axis_delta(nId)
|
||||
|
||||
'' agli assi lineari devo applicare il coefficiente
|
||||
'If (nId Mod 10) < 3 Then
|
||||
' CurrCN.d_axis_position(nI) = SiemensRet.d_interf_axis_position(nId) * LinCoeff
|
||||
' CurrCN.d_axis_delta(nI) = SiemensRet.d_interf_axis_delta(nId) * LinCoeff
|
||||
' ' gli assi rotanti sono sempre in gradi
|
||||
'Else
|
||||
' CurrCN.d_axis_position(nI) = SiemensRet.d_interf_axis_position(nId)
|
||||
' CurrCN.d_axis_delta(nI) = SiemensRet.d_interf_axis_delta(nId)
|
||||
'End If
|
||||
|
||||
' ver 2.7h2
|
||||
CurrCN.d_axis_position(nI) = SiemensRet.d_interf_axis_position(nId)
|
||||
CurrCN.d_axis_delta(nI) = SiemensRet.d_interf_axis_delta(nId)
|
||||
' verifico se l'indice 'i' è associato ad un asse rotativo oppure lineare
|
||||
If CurrCN.b_axis_is_linear(nI) Then
|
||||
CurrCN.d_axis_position(nI) *= LinCoeff
|
||||
CurrCN.d_axis_delta(nI) *= LinCoeff
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
' Copia variabili R
|
||||
|
||||
@@ -1447,6 +1447,12 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBottom-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina2.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="Margin" Value="6,0,0,0"/>
|
||||
</Style>
|
||||
@@ -639,10 +639,10 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="GroupBoxHeaderTemplate">
|
||||
@@ -748,8 +748,80 @@
|
||||
|
||||
<!--TextBlock per elementi delle ListBox-->
|
||||
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!--DataTemplate testo ed immagine-->
|
||||
<DataTemplate x:Key="DataTemplateItem">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />-->
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Style="{DynamicResource OmagCut_ListBoxIcon}" />
|
||||
<!--<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" VerticalAlignment="Center" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- ListBoxItem -->
|
||||
|
||||
<Style x:Key="ItemList" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Margin" Value="1,0,1,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="false"/>
|
||||
<Condition Property="IsMouseOver" Value="true"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="LightGray"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="LightGray"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -194,7 +194,8 @@
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DatiMacchinaImg1" UriSource="Resources/NewIcons/DatiMacchina1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DatiMacchinaImg2" UriSource="Resources/NewIcons/DatiMacchina2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
@@ -1039,6 +1040,7 @@
|
||||
|
||||
<!--TextBlock per elementi delle ListBox-->
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@@ -1046,6 +1048,8 @@
|
||||
|
||||
<Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
@@ -1115,9 +1119,10 @@
|
||||
|
||||
<!-- ListBoxItem -->
|
||||
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Style x:Key="ItemList" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Margin" Value="1,0,1,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
|
||||
@@ -330,13 +330,18 @@ Public Class CurrentProjectPageUC
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
ClearMessage()
|
||||
' Se è stata modificata l'uso della lama inclinata allora aggiorno anche questa lavorazione
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
' assegno la lavorazione corrente per i tagli di lama inclinati (solo se specificato nella ComboBox della ChooseMachinig)
|
||||
RestoreDef_Machinig(True)
|
||||
End If
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White"
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
@@ -46,7 +46,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Name="FileListBox"
|
||||
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
ItemsSource="{Binding ItemList}"
|
||||
ItemContainerStyle="{DynamicResource ItemList}"/>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -56,10 +56,10 @@
|
||||
PlacementTarget="{Binding ElementName=ResetCutBtn}">
|
||||
<WrapPanel Orientation="Vertical"
|
||||
Background="{DynamicResource OmagCut_Gray}">
|
||||
<Button x:Name="ResetCut1Btn"
|
||||
<Button x:Name="ResetCut2Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button x:Name="ResetCut2Btn"
|
||||
<Button x:Name="ResetCut1Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</WrapPanel>
|
||||
|
||||
+167
-21
@@ -2,6 +2,9 @@
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class ProjectMgrUC
|
||||
' Creo una varibile statica per verificare di non stampare due volte lo stesso messaggio
|
||||
Public Shared bFirstRun As Boolean = True
|
||||
|
||||
' Riferimenti a pagine (condivisi tra tutte le istanze della classe)
|
||||
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private Shared m_CurrProjPage As CurrentProjectPageUC
|
||||
@@ -11,6 +14,7 @@ Public Class ProjectMgrUC
|
||||
' usato per scrivere i comadi di movimento test lavorazione
|
||||
Friend m_CN As CN_generico
|
||||
|
||||
' L'inizializzazine avviene 2 volte: una per i tagli CAD ed una per le cornici
|
||||
Private Sub ProjectMgrUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
NewBtn.ToolTip = EgtMsg(90303) ' Nuovo
|
||||
@@ -21,9 +25,12 @@ Public Class ProjectMgrUC
|
||||
VeinMatchingBtn.ToolTip = EgtMsg(90309) ' Vein Match
|
||||
|
||||
RegisterBtn.Content = "REG" ' Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(90336) ' Reset
|
||||
ResetCut2Btn.Content = EgtMsg(91024) ' Reset lavorazioni
|
||||
ResetCut1Btn.Content = EgtMsg(91025) ' Aggiorna feed/speed
|
||||
|
||||
'ResetCutBtn.Content = EgtMsg(90336) ' Reset
|
||||
'ResetCut2Btn.Content = EgtMsg(91024) ' Reset lavorazioni
|
||||
'ResetCut1Btn.Content = EgtMsg(91025) ' Aggiorna feed/speed
|
||||
PopulateListCmdReset()
|
||||
|
||||
SimulateBtn.ToolTip = EgtMsg(90301) ' Simulate - Simula
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
WorkBtn.ToolTip = EgtMsg(90310) ' Export - Esporta
|
||||
@@ -255,6 +262,8 @@ Public Class ProjectMgrUC
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut
|
||||
End Sub
|
||||
|
||||
#Region "RESET"
|
||||
|
||||
Private Sub ResetCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCutBtn.Click
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
If ResetCutPopUp.IsOpen Then
|
||||
@@ -263,18 +272,28 @@ Public Class ProjectMgrUC
|
||||
ResetCutPopUp.IsOpen = True
|
||||
End If
|
||||
Else
|
||||
ResetCut3Btn_Click()
|
||||
CallFunction(0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Reimposto le feed di tutte le lavorazioni
|
||||
Private Sub ResetCut1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut1Btn.Click
|
||||
CallFunction(1)
|
||||
End Sub
|
||||
|
||||
' Reimposto le lavorazioni di default e ripristino i parametri
|
||||
Private Sub ResetCut2Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut2Btn.Click
|
||||
CallFunction(2)
|
||||
End Sub
|
||||
|
||||
' Reimposto le feed di tutte le lavorazioni
|
||||
Private Sub FeedReset()
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
End Sub
|
||||
|
||||
' Reimposto le lavorazioni di default e ripristino i parametri
|
||||
Private Sub ResetCut2Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut2Btn.Click
|
||||
Private Sub HardReset()
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
@@ -307,7 +326,7 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
' Resetta i valori dei parametri (ma non le lavorazioni)
|
||||
Private Sub ResetCut3Btn_Click()
|
||||
Private Sub StandardReset()
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
@@ -333,6 +352,96 @@ Public Class ProjectMgrUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Const HARD_RESET As String = "HARD"
|
||||
Private Const STANDARD_RESET As String = "STANDARD"
|
||||
Private Const FEED_RESET As String = "FEED"
|
||||
|
||||
Private Enum RESET_TYPE
|
||||
HARD
|
||||
STANDARD
|
||||
FEED
|
||||
End Enum
|
||||
|
||||
Private m_ListCmdReset As New List(Of RESET_TYPE) From {RESET_TYPE.HARD, RESET_TYPE.STANDARD, RESET_TYPE.FEED}
|
||||
|
||||
Private Sub CallFunction(IndexListCmdReset As Integer)
|
||||
Select Case m_ListCmdReset(IndexListCmdReset)
|
||||
Case RESET_TYPE.STANDARD
|
||||
EgtOutLog("STNADRD Reset")
|
||||
StandardReset()
|
||||
Case RESET_TYPE.HARD
|
||||
EgtOutLog("HARD Reset")
|
||||
HardReset()
|
||||
Case RESET_TYPE.FEED
|
||||
EgtOutLog("FEED Reset")
|
||||
FeedReset()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub SetBtnResetContent(IndexListCmdReset As Integer, Btn As Button)
|
||||
Select Case m_ListCmdReset(IndexListCmdReset)
|
||||
Case RESET_TYPE.STANDARD
|
||||
Btn.Content = EgtMsg(90336) ' Reset
|
||||
Case RESET_TYPE.HARD
|
||||
Btn.Content = EgtMsg(91024) ' Reset lavorazioni
|
||||
Case RESET_TYPE.FEED
|
||||
Btn.Content = EgtMsg(91025) ' Aggiorna feed/speed
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub PopulateListCmdReset()
|
||||
Dim sConfig As String = "HARD,STANDARD,FEED"
|
||||
GetPrivateProfileString(S_GENERAL, "ResetCmd", sConfig, sConfig, m_MainWindow.GetIniFile())
|
||||
Dim sItems As String() = sConfig.Split(",")
|
||||
' VERIFICA della lettura configurazione
|
||||
If sItems.Count <> 3 Then
|
||||
If bFirstRun Then
|
||||
EgtOutLog("WARNING configurazione: in Config.ini del programma nella sezione 'General/ResetCmd' " &
|
||||
"non trovato una sequenza del tipo 'HARD,STANDARD,FEED'")
|
||||
End If
|
||||
Else
|
||||
Dim bOk As Boolean = True
|
||||
Dim sErrMsg As String = String.Empty
|
||||
' popolo una lista di appoggio
|
||||
Dim TempList As New List(Of RESET_TYPE) From {RESET_TYPE.STANDARD, RESET_TYPE.STANDARD, RESET_TYPE.STANDARD}
|
||||
For Index As Integer = 0 To sItems.Count - 1
|
||||
If sItems(Index).Trim = STANDARD_RESET Then
|
||||
TempList(Index) = RESET_TYPE.STANDARD
|
||||
ElseIf sItems(Index).Trim = HARD_RESET Then
|
||||
TempList(Index) = RESET_TYPE.HARD
|
||||
ElseIf sItems(Index).Trim = FEED_RESET Then
|
||||
TempList(Index) = RESET_TYPE.FEED
|
||||
Else
|
||||
bOk = False
|
||||
sErrMsg = sErrMsg & If(String.IsNullOrEmpty(sErrMsg), "", ",") & sItems(Index).Trim
|
||||
End If
|
||||
Next
|
||||
' verifico che non ci siano elementi ripetuti nella lista
|
||||
If Not bOk Then
|
||||
If bFirstRun Then
|
||||
EgtOutLog("WARNING configurazione: in Config.ini del programma nella sezione 'General/ResetCmd' " &
|
||||
"non trovato una sequenza del tipo 'HARD,STANDARD,FEED' (i seguenti parametri non sono decodificati: " &
|
||||
sErrMsg & " )")
|
||||
End If
|
||||
ElseIf TempList(0) = TempList(1) Or TempList(0) = TempList(2) Or TempList(1) = TempList(2) Then
|
||||
If bFirstRun Then
|
||||
EgtOutLog("WARNING configurazione: in Config.ini del programma nella sezione 'General/ResetCmd' " &
|
||||
"non trovato una sequenza del tipo 'HARD,STANDARD,FEED' (due o più dati sono ripetuti)")
|
||||
End If
|
||||
Else
|
||||
m_ListCmdReset = TempList
|
||||
End If
|
||||
End If
|
||||
|
||||
SetBtnResetContent(0, ResetCutBtn)
|
||||
SetBtnResetContent(1, ResetCut1Btn)
|
||||
SetBtnResetContent(2, ResetCut2Btn)
|
||||
|
||||
bFirstRun = False
|
||||
End Sub
|
||||
|
||||
#End Region ' Reset
|
||||
|
||||
Private Sub SimulateBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulateBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
@@ -657,7 +766,8 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
|
||||
'------------------- INIZIO Avvio il Ciclo-Start-------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
If GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 AndAlso
|
||||
( m_MainWindow.m_CNCommunication.m_nNCType <> 4 Or m_MainWindow.m_CNCommunication.SpecialSend <> 1) Then
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
End If
|
||||
@@ -923,35 +1033,32 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateFeedAllMachining()
|
||||
' recupero il valore di Feed della lavorazione corrente
|
||||
Dim SettedMachinig As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, SettedMachinig)
|
||||
|
||||
' Parametri della lavorazione letta da DB
|
||||
Dim sMachiningName As String = String.Empty
|
||||
If Not EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sMachiningName) Then
|
||||
' errore: lavorazione non trovata
|
||||
EgtOutLog(" - Prima di 'Reset Feed' accedere alla pagina MACCHINA!")
|
||||
'm_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Salvare la lavorazione corrente")
|
||||
Return
|
||||
End If
|
||||
Dim dFeed As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dFeed)
|
||||
Dim dFeedStarted As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dFeedStarted)
|
||||
Dim dFeedEnded As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dFeedEnded)
|
||||
Dim dFeedTipped As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dFeedTipped)
|
||||
Dim dFeedBack As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.BACKFEED, dFeedBack)
|
||||
Dim dFeedSideAng As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGFEED, dFeedSideAng)
|
||||
' Elenco delle lavorazioni
|
||||
Dim MachiningList As New List(Of SplitMach)
|
||||
|
||||
' Recupero l'indice della fase corrente
|
||||
Dim nCurrPhase As Integer = 1
|
||||
' recupero in numero di fasi presenti nel progetto
|
||||
Dim nCountPhase As Integer = EgtGetPhaseCount()
|
||||
' ciclo su tutte le fasi di lavorazione
|
||||
' Numero di lavorazioni del progetto (conteggiate nel ciclo for)
|
||||
Dim nMach As Integer = 0
|
||||
' Numero di lavorazioni aggiornate (conteggate nel ciclo for)
|
||||
Dim nMachUpdated As Integer = 0
|
||||
' Elenco dei nomi lavorazioni aggiorniate
|
||||
Dim UpdateMachinigNameList As New List(Of String)
|
||||
|
||||
' ciclo su tutte le fasi di lavorazione
|
||||
For IndexPhase As Integer = 1 To nCountPhase
|
||||
' imposto la fase corrente
|
||||
nCurrPhase = IndexPhase
|
||||
@@ -963,6 +1070,31 @@ Public Class ProjectMgrUC
|
||||
Dim nOperId As Integer = MachiningList(IndexMachining).m_nId
|
||||
' setto la lavorazione come corrente
|
||||
If EgtSetCurrMachining(nOperId) Then
|
||||
Dim sCurrMachiningName As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.NAME, sCurrMachiningName)
|
||||
' Se la lavorazione corrente da DB è diversa da quella della lavorazione allora aggiorno i dati
|
||||
If sCurrMachiningName <> sMachiningName Then
|
||||
sMachiningName = sCurrMachiningName
|
||||
' Recupero la lavorazione dell'operazione indicata
|
||||
If Not EgtMdbSetCurrMachining(sMachiningName) Then
|
||||
EgtOutLog("ERRORE: Machining '" & sMachiningName & "' does not exist in DB of machining.")
|
||||
sMachiningName = String.Empty
|
||||
Continue For
|
||||
End If
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dFeed)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dFeedStarted)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dFeedEnded)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dFeedTipped)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.BACKFEED, dFeedBack)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGFEED, dFeedSideAng)
|
||||
Else
|
||||
' verifico se è stata applicata una variazione delle Feed
|
||||
If UpdateMachinigNameList.FindIndex(Function(x) x = sCurrMachiningName) = -1 Then
|
||||
' La lavorazione corrente non ha nessun parametro nuovo
|
||||
Continue For
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim bUpdate As Boolean = False
|
||||
' STANDARD
|
||||
Dim dOrigFeed As Double
|
||||
@@ -1021,10 +1153,24 @@ Public Class ProjectMgrUC
|
||||
' conto il numero di lavorazioni aggiornate
|
||||
If bUpdate Then
|
||||
nMachUpdated += 1
|
||||
If UpdateMachinigNameList.FindIndex(Function(x) x = sCurrMachiningName) = -1 Then
|
||||
UpdateMachinigNameList.Add(sCurrMachiningName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
If UpdateMachinigNameList.Count > 0 Then
|
||||
Dim sMsg As String = String.Empty
|
||||
For Each Item As String In UpdateMachinigNameList
|
||||
sMsg = sMsg & If(String.IsNullOrEmpty(sMsg), "", ",") & Item
|
||||
Next
|
||||
EgtOutLog("Le lavorazioni aggiornate sono: " & sMsg)
|
||||
Else
|
||||
EgtOutLog("Nessuna lavorazione è stata aggiornata: Feed da DB uguali a quelle impostate nelle lavorazioni")
|
||||
End If
|
||||
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91243) & nMachUpdated & "/ " & nMach) ' Lavorazione aggiornate:
|
||||
End Sub
|
||||
|
||||
|
||||
+37
-29
@@ -26,28 +26,19 @@ Public Class Camera
|
||||
Private m_bCalcContour As Boolean = False
|
||||
Private m_nCameraCount As Integer = 0
|
||||
Private m_sCameraPath As String = String.Empty
|
||||
'Private m_sCameraPath2 As String = String.Empty
|
||||
Private m_sCameraProcName As String = String.Empty
|
||||
'Private m_sCameraProcName2 As String = String.Empty
|
||||
Private m_sImage As String = String.Empty
|
||||
'Private m_sImage2 As String = String.Empty
|
||||
Private m_sInfo As String = String.Empty
|
||||
'Private m_sInfo2 As String = String.Empty
|
||||
Private m_sResult As String = String.Empty
|
||||
'Private m_sResult2 As String = String.Empty
|
||||
Private m_sContour As String = String.Empty
|
||||
'Private m_sContour2 As String = String.Empty
|
||||
Private m_nThreshold As Integer = 60
|
||||
Private m_dTolerance As Double = 5
|
||||
Private m_nTimeout As Integer = 30
|
||||
Private m_sImageDir As String = String.Empty
|
||||
|
||||
Private Const CAMERAMNG As String = "CameraMng"
|
||||
Private Const N_LOOP As Integer = 20
|
||||
|
||||
'Public m_ProcessCmg As New Process()
|
||||
|
||||
' Lista dei processi Cmg associati ad igni tavola
|
||||
' Lista dei processi Cmg associati ad ogni tavola
|
||||
Public m_ProcessCmgList As New List(Of Process)
|
||||
' restituisce lo stato che il processo associato alla tavola corrente (PrepareCamera)
|
||||
Private m_bIsRunnigProc As Boolean = False
|
||||
@@ -96,6 +87,8 @@ Public Class Camera
|
||||
(GetPrivateProfileInt(S_GENERAL, K_CONTOURFROMCAMERA, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Ricavo il nome del processo associato
|
||||
m_sCameraProcName = Path.GetFileNameWithoutExtension(m_sCameraPath)
|
||||
' Terminazione di eventuali processi omonimi in esecuzione
|
||||
KillPreviousProcesses()
|
||||
' Avvio processi del camera manager per ogni tavola
|
||||
CamerasHide()
|
||||
Return True
|
||||
@@ -104,7 +97,7 @@ Public Class Camera
|
||||
Public Function Close() As Boolean
|
||||
If m_bBusy Then Return False
|
||||
If m_bCameraLink Then
|
||||
KillProcess()
|
||||
KillProcesses()
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -179,7 +172,7 @@ Public Class Camera
|
||||
' Indice di processo uguale all'indice della tavola
|
||||
nIndProc = nIndTab
|
||||
Case 1
|
||||
' Alla tavola 1 possono essre associati 2 processi (solo se camera Hq abilitata e attiva)
|
||||
' Alla tavola 1 possono essere associati 2 processi (solo se camera Hq abilitata e attiva)
|
||||
If nIndTab = 1 And
|
||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso
|
||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
@@ -197,6 +190,8 @@ Public Class Camera
|
||||
|
||||
' OK: Avvio un processo per ogni tavola presente in macchina
|
||||
Public Function CamerasHide() As Boolean
|
||||
If Not m_bCameraLink Then Return False
|
||||
|
||||
' Lancio il programma in cieco, se già attivo lo nascondo
|
||||
m_nCameraCount = GetTableCount()
|
||||
|
||||
@@ -215,12 +210,13 @@ Public Class Camera
|
||||
' Gestisco correttamente solo il caso: 2 tavole e 1 camera
|
||||
m_nCameraCount = m_nCameraCount - 1
|
||||
Case Else
|
||||
EgtOutLog(" 🚨 CAUTION : Differenza tra numero di camere e numero di tavole: " & DeltaCameraTab.ToString &
|
||||
EgtOutLog(" --> CAUTION : Differenza tra numero di camere e numero di tavole: " & DeltaCameraTab.ToString &
|
||||
", sarà attivata solo la prima camera.")
|
||||
DeltaCameraTab = 0
|
||||
End Select
|
||||
Else
|
||||
EgtOutLog(" 🚨 CAUTION : In file *.ini machine '[Photo]' there is not param 'CameraCounter'.")
|
||||
' 🚨 CAUTION:
|
||||
EgtOutLog(" --> CAUTION : In file *.ini machine '[Photo]' there is not param 'CameraCounter'.")
|
||||
' Aggiungo un altro processo se camera Hq abilitata (non esite una vera tavola associata)
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
m_nCameraCount = m_nCameraCount + 1
|
||||
@@ -464,10 +460,12 @@ Public Class Camera
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT, "", m_sResult, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR, "", m_sContour, m_MainWindow.GetIniFile())
|
||||
|
||||
m_sImage = m_sImage.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sInfo = m_sInfo.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sResult = m_sResult.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
m_sContour = m_sContour.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
||||
If nIndProc <> 1 Then
|
||||
m_sImage = m_sImage.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||
m_sInfo = m_sInfo.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||
m_sResult = m_sResult.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||
m_sContour = m_sContour.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||
End If
|
||||
|
||||
Return If(m_bIsRunnigProc, nIndProc, -1)
|
||||
End Function
|
||||
@@ -796,20 +794,30 @@ Public Class Camera
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function ProcessIsRunning() As Boolean
|
||||
' OK: chiudo tutti i processi di CameraMng in esecuzione prima dell'avvio
|
||||
Private Sub KillPreviousProcesses()
|
||||
If Not m_bCameraLink Then Return
|
||||
Dim Procs() As Process
|
||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
||||
Return (Procs.Length() > 0)
|
||||
End Function
|
||||
For i As Integer = 0 To Procs.Count() - 1
|
||||
Try
|
||||
Procs(i).Kill()
|
||||
Procs(i).WaitForExit( 50)
|
||||
Catch Ex As Exception
|
||||
EgtOutLog(ex.Message())
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' OK: chiudo tutti i processi che hanno il nome CameraMng.exe
|
||||
Private Sub KillProcess()
|
||||
Dim Procs() As Process
|
||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
||||
For i As Integer = 0 To Procs.Length() - 1
|
||||
Procs(i).Kill()
|
||||
Procs(i).WaitForExit(2000)
|
||||
Next i
|
||||
' OK: chiudo tutti i processi di CameraMng lanciati
|
||||
Private Sub KillProcesses()
|
||||
For i As Integer = 0 To m_ProcessCmgList.Count() - 1
|
||||
Try
|
||||
m_ProcessCmgList(i).Kill()
|
||||
Catch Ex As Exception
|
||||
EgtOutLog(ex.Message())
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
+1
-132
@@ -45,140 +45,9 @@ Module Utility
|
||||
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
#Region "INCHES FRACTIONS"
|
||||
'Enum FractionPattern
|
||||
' None
|
||||
' Feet_Inches
|
||||
' Inches
|
||||
'End Enum
|
||||
|
||||
'' seleziona il tipo di Pattern con cui stamoare i dati
|
||||
' seleziona il tipo di Pattern di stampa dei dati
|
||||
Friend nCurrFractionPattern As FractionStringConverter.FractionPattern = FractionPattern.Feet_Inches
|
||||
Friend dPrecision As Double = 64
|
||||
|
||||
'Friend Function StringFractionToStringDecimal(dVal As Double, dBase As Double) As String
|
||||
' Dim sSign As String = String.Empty
|
||||
' If dVal < 0 Then
|
||||
' sSign = "-"
|
||||
' dVal = Math.Abs(dVal)
|
||||
' End If
|
||||
' Dim sFraction As String = String.Empty
|
||||
' ' integer and decima part of the value
|
||||
' Dim dInteger As Double = Math.Floor(dVal)
|
||||
' Dim dFraction As Double = dVal - dInteger
|
||||
' ' the nearest decimal numerator
|
||||
' Dim dNumeretor As Double = dFraction * dBase
|
||||
' Dim dRound As Double = Math.Round(dNumeretor)
|
||||
' ' estimates the irreducible fraction
|
||||
' If dRound = 0 Then
|
||||
' ' no decimal part
|
||||
' ElseIf dRound = dBase Then
|
||||
' ' no decimal part
|
||||
' dInteger = dInteger + 1
|
||||
' Else
|
||||
' ' simplify fraction
|
||||
' While dRound Mod 2 = 0
|
||||
' dRound = dRound / 2
|
||||
' dBase = dBase / 2
|
||||
' End While
|
||||
' sFraction = DoubleToString(dRound, 0) & "/" & DoubleToString(dBase, 0)
|
||||
' End If
|
||||
' ' sVal: dFeet'dInteger"sFraction --- dInteger sFraction
|
||||
' Return WriteFraction(dInteger, sFraction)
|
||||
'End Function
|
||||
|
||||
'' trasforma il valore da pollici a piedi
|
||||
'Private Sub ConvertInchesToFeet(ByRef dFeet As Double, ByRef dInches As Double)
|
||||
' If dInches = 0 Then Return
|
||||
' While dInches - 12 >= 0
|
||||
' dFeet = dFeet + 1
|
||||
' dInches = dInches - 12
|
||||
' End While
|
||||
'End Sub
|
||||
|
||||
'' stampa dati in funzione del pattern dichiarato
|
||||
'Private Function WriteFraction(ByVal dInches As Double, sFraction As String) As String
|
||||
' Dim sVal As String = String.Empty
|
||||
' Select Case nCurrFractionPattern
|
||||
' Case FractionPattern.Feet_Inches
|
||||
' Dim dFeet As Double = 0
|
||||
' ConvertInchesToFeet(dFeet, dInches)
|
||||
' If dFeet > 0 Then
|
||||
' sVal = String.Format("{0}'{1}""{2}", DoubleToString(dFeet, 0), DoubleToString(dInches, 0), sFraction).Trim
|
||||
' Else
|
||||
' sVal = String.Format("{0}""{1}", DoubleToString(dInches, 0), sFraction).Trim
|
||||
' End If
|
||||
' Case FractionPattern.Inches
|
||||
' sVal = DoubleToString(dInches, 0) & " " & sFraction
|
||||
' sVal = String.Format("{0}""{1}", DoubleToString(dInches, 0), sFraction).Trim
|
||||
' End Select
|
||||
' Return sVal
|
||||
'End Function
|
||||
|
||||
'' riceve la stringa sorgente e restituisce la nuova strunga in formato decimale (senza eseguire conversioni di unità)
|
||||
'Friend Function StringFractionToDouble(sVal As String, ByRef sValConverted As String) As Boolean
|
||||
' Dim dVal As Double = 0
|
||||
' ' dato in ingresso: sVal = 2'3"23/32
|
||||
' Dim sFeet As String = String.Empty
|
||||
' Dim sFeetPattern As String = "^.*?(?=')"
|
||||
' Dim dFeet As Double = 0
|
||||
' Dim bOkFeet As Boolean = True
|
||||
' Dim bFeetExists As Boolean = False
|
||||
' Dim sInch As String = String.Empty
|
||||
' Dim sInchPattern As String = "(?<=')(.*?)(?="")" ' se la stringa contiene l'apice singolo
|
||||
' Dim sInchPattern1 As String = "(.*?)(?="")" ' se la stringa NON contiene l'apice singolo
|
||||
' Dim dInch As Double = 0
|
||||
' Dim bOkInch As Boolean = True
|
||||
' Dim bInchExists As Boolean = False
|
||||
' Dim sFraction As String = String.Empty
|
||||
' Dim sFractionPattern As String = "(?<="")(.*)" ' se la stringa contiene l'apice doppio
|
||||
' Dim sFractionPattern1 As String = "(?<=')(.*)" ' se la stringa NON contiene l'apice doppio ma solo quello singolo
|
||||
' Dim dFraction As Double = 0
|
||||
' Dim bOkFraction As Boolean = True
|
||||
' Dim bFractionExists As Boolean = False
|
||||
|
||||
' ' recupero il valore di Feet (2')
|
||||
' Dim sMyMatch As String = Regex.Match(sVal, sFeetPattern).Groups(1).Value
|
||||
' If Not String.IsNullOrEmpty(sMyMatch) Or Not String.IsNullOrWhiteSpace(sMyMatch) Then
|
||||
' sFeet = sMyMatch.Trim
|
||||
' bOkFeet = StringToDouble(sFeet, dFeet)
|
||||
' bFeetExists = True
|
||||
' End If
|
||||
|
||||
' ' recupero il valore di Inch (3") dopo i Feet - oppure direttamente i pollici
|
||||
' If bFeetExists Then
|
||||
' sMyMatch = Regex.Match(sVal, sInchPattern).Groups(1).Value
|
||||
' Else
|
||||
' sMyMatch = Regex.Match(sVal, sInchPattern1).Groups(1).Value
|
||||
' End If
|
||||
' If Not String.IsNullOrEmpty(sMyMatch) Or Not String.IsNullOrWhiteSpace(sMyMatch) Then
|
||||
' sInch = sMyMatch.Trim
|
||||
' bOkInch = StringToDouble(sInch, dInch)
|
||||
' bInchExists = True
|
||||
' End If
|
||||
|
||||
' ' recupero il valore frazionario (23/32) dopo i pollici - oppure dopo i feet - oppure direttamente i valore inteso come pollici
|
||||
' If bInchExists Then
|
||||
' sMyMatch = Regex.Match(sVal, sFractionPattern).Groups(1).Value
|
||||
' ElseIf bFeetExists And Not bInchExists Then
|
||||
' sMyMatch = Regex.Match(sVal, sFractionPattern1).Groups(1).Value
|
||||
' ElseIf Not bFeetExists And Not bInchExists Then
|
||||
' sMyMatch = sVal
|
||||
' End If
|
||||
' If Not String.IsNullOrEmpty(sMyMatch) Or Not String.IsNullOrWhiteSpace(sMyMatch) Then
|
||||
' sFraction = sMyMatch
|
||||
' bOkFraction = StringToDouble(sFraction, dFraction)
|
||||
' End If
|
||||
|
||||
' ' calcolo il valore decimale dell'espressione
|
||||
' If bOkFeet And bOkInch And bOkFraction Then
|
||||
' dVal = dFeet / 12 + dInch + dFraction
|
||||
' sValConverted = DoubleToString(dVal, 4)
|
||||
' Return True
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
#End Region ' Inches Fraction
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user