Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 141522fccb | |||
| ab283a3efa | |||
| 45948e7004 | |||
| e710c55c2c | |||
| dbcd4ca7a0 | |||
| 88ff42a8c6 | |||
| daeaec3b6b | |||
| 6173e1dc15 | |||
| 70177a4a0e | |||
| b6f4e0e2d7 | |||
| 34fe2b1810 | |||
| 0e42d59e21 | |||
| d962c43e0c | |||
| 55bb27e40f | |||
| eed9b0a81d | |||
| 1dba739917 | |||
| 283dc6d188 | |||
| 325cecf91b | |||
| 5e3fbbaaaa | |||
| fc7edae5f8 | |||
| 4277434fce | |||
| c0e8838394 | |||
| bd006a197f | |||
| 82a99ff2b0 | |||
| 21f7f23c3f | |||
| 3c2c0a48ff | |||
| fadb601732 | |||
| 2d385229d2 | |||
| cfcde65bd7 | |||
| 6c72457108 | |||
| a7d89047bd | |||
| 6c7d27d9e9 | |||
| 95bfb04511 | |||
| faddb8bbad | |||
| be97eb2b80 | |||
| e06e721c65 | |||
| f51b990674 | |||
| f79cffb414 | |||
| 76f4ef1732 | |||
| 79eddf4628 | |||
| ae2e64bcb0 | |||
| 7a1cbbeb82 | |||
| 7d647fd1c4 | |||
| 97836125a7 | |||
| 908cc381db | |||
| 8436250574 | |||
| 7d0c63e92b | |||
| 0569f3b0ad | |||
| e01b93a76b | |||
| f0f6c4484e | |||
| 3740ec6de7 | |||
| 6feae32493 | |||
| 1ca93f2943 | |||
| bcba126741 | |||
| 7c9a26b3af | |||
| 5263813253 | |||
| 7182059818 | |||
| 09f3b0b534 | |||
| 37adc352a1 | |||
| 2708670d9a | |||
| 737366ba27 | |||
| d10588867f | |||
| 54158406b7 | |||
| 5c3c231729 | |||
| d3c0b1c2c6 | |||
| ad04e5d916 | |||
| db623544e9 |
@@ -36,7 +36,7 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Name="LogoBrd" Grid.Column="1">
|
<Border Name="LogoBrd" Grid.Column="1">
|
||||||
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/>
|
<Image Source="../Resources/NewIcons/Logo-Egalware.png" Stretch="Uniform"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function AddSawMachining(nOperId As Integer, ByRef nNewOperation As Integer) As Boolean
|
Friend Function UpdateSawing(nOperId As Integer, ByRef nNewOperation As Integer) As Boolean
|
||||||
EgtLuaCreateGlobTable("CAM")
|
EgtLuaCreateGlobTable("CAM")
|
||||||
SetLuaStandardCamParams()
|
SetLuaStandardCamParams()
|
||||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||||
@@ -89,7 +89,6 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' versione CamAuto 2.6l1: gestione tagli con ridotto affondamento
|
|
||||||
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
|
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
|
||||||
EgtLuaCreateGlobTable("CAM")
|
EgtLuaCreateGlobTable("CAM")
|
||||||
SetLuaStandardCamParams()
|
SetLuaStandardCamParams()
|
||||||
@@ -149,6 +148,24 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function InvertWaterjet(nOperId As Integer) As Boolean
|
||||||
|
EgtLuaCreateGlobTable("CAM")
|
||||||
|
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||||
|
Dim nErr As Integer = 999
|
||||||
|
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||||
|
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||||
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertWaterjet")
|
||||||
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
|
EgtLuaResetGlobVar("CAM")
|
||||||
|
If nErr > 0 Then
|
||||||
|
bOk = False
|
||||||
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
|
End If
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function ResetAllMachinings() As Boolean
|
Friend Function ResetAllMachinings() As Boolean
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
Return ResetAllMachinings(nWarn)
|
Return ResetAllMachinings(nWarn)
|
||||||
@@ -163,7 +180,7 @@ Friend Module CamAuto
|
|||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||||
' Reinserisco tutte le lavorazioni piane
|
' Reinserisco tutte le lavorazioni piane
|
||||||
AddMachinings(GDB_ID.NULL, nWarn)
|
AddMachinings(GDB_ID.NULL, nWarn)
|
||||||
' Se altrimenti progetto con cornici
|
' Se altrimenti progetto con cornici
|
||||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||||
' Reinserisco tutte le lavorazioni delle cornici
|
' Reinserisco tutte le lavorazioni delle cornici
|
||||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||||
@@ -175,63 +192,57 @@ Friend Module CamAuto
|
|||||||
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
||||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||||
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||||
Dim bOk As Boolean = True
|
' Controllo le geometrie dei pezzi in parcheggio
|
||||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||||
While nIdPart <> GDB_ID.NULL
|
While nIdPart <> GDB_ID.NULL
|
||||||
' accedo al Layer OutLoop dei pezzi nel grezzo
|
|
||||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
RestoreDefaultTiltedSawing(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)
|
nIdPart = EgtGetNextPart(nIdPart)
|
||||||
End While
|
End While
|
||||||
|
' Controllo le geometrie dei pezzi inseriti nei grezzi
|
||||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||||
While nIdPart <> GDB_ID.NULL
|
While nIdPart <> GDB_ID.NULL
|
||||||
' accedo al Layer OutLoop dei pezzi in parcheggio
|
|
||||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
RestoreDefaultTiltedSawing(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||||
nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
||||||
If nIdLayerOutLoop <> GDB_ID.NULL Then
|
If nIdLayerOutLoop <> GDB_ID.NULL Then
|
||||||
nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
RestoreDefaultTiltedSawing(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||||
End If
|
End If
|
||||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||||
End While
|
End While
|
||||||
Return bOk
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' ripristina la lavorazone indicata di default per i tagli inclinati
|
' ripristina la lavorazone indicata di default per i tagli inclinati
|
||||||
Private Sub SetResetDef_Machining(nEntId As Integer, sSawingTilted As String, bApplySawingTilted As Boolean, bOnlySideAng As Boolean)
|
Private Sub RestoreDefaultTiltedSawing(nEntId As Integer, sSawingTilted As String, bApply As Boolean, bOnlySideAng As Boolean)
|
||||||
While nEntId <> GDB_ID.NULL
|
While nEntId <> GDB_ID.NULL
|
||||||
Dim sInfoOrigSideAng As String = String.Empty
|
Dim dOrigSideAng As Double = 0
|
||||||
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, sInfoOrigSideAng)
|
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dOrigSideAng)
|
||||||
' Se è un'entità associata ad una lavorazione inclinata
|
' Se è un'entità con lavorazione inclinata
|
||||||
If Not String.IsNullOrEmpty(sInfoOrigSideAng) AndAlso sInfoOrigSideAng <> "0" Then
|
If Math.Abs( dOrigSideAng) > EPS_ANG_SMALL Then
|
||||||
If bApplySawingTilted Then
|
' Se richiesta applicazione
|
||||||
' forzo la lavorazione inclinata
|
If bApply Then
|
||||||
|
' Se non definita lavorazione specifica applico qualla standard
|
||||||
If String.IsNullOrEmpty(sSawingTilted) Then
|
If String.IsNullOrEmpty(sSawingTilted) Then
|
||||||
' ma se non esiste nessuna lavorezione specifica applico qualla standard
|
|
||||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||||
|
' altrimenti applico quella specifica
|
||||||
Else
|
Else
|
||||||
' Applico quella specificata
|
|
||||||
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
|
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||||
End If
|
End If
|
||||||
|
' altrimenti rimuovo la lavorazione specifica (verrà poi applicata quella standard)
|
||||||
Else
|
Else
|
||||||
' Rimuovo la lavorazione e applico quella standard
|
|
||||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||||
End If
|
End If
|
||||||
|
' altrimenti se richiesta modifica anche delle altre
|
||||||
ElseIf Not bOnlySideAng Then
|
ElseIf Not bOnlySideAng Then
|
||||||
Dim sInfo As String = String.Empty
|
Dim sInfo As String = String.Empty
|
||||||
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
|
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
|
||||||
|
' se esiste una lavorazione specificata allora la rimuovo
|
||||||
If Not String.IsNullOrEmpty(sInfo) Then
|
If Not String.IsNullOrEmpty(sInfo) Then
|
||||||
' se esiste una lavorazione specificata allora la rimuovo
|
|
||||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -244,7 +255,7 @@ Friend Module CamAuto
|
|||||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||||
While nIdPart <> GDB_ID.NULL
|
While nIdPart <> GDB_ID.NULL
|
||||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, LAY_AUX_SPLIT_WJ)
|
||||||
EgtErase(IdAuxLayer)
|
EgtErase(IdAuxLayer)
|
||||||
' accedo al Layer OutLoop
|
' accedo al Layer OutLoop
|
||||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
@@ -259,7 +270,7 @@ Friend Module CamAuto
|
|||||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||||
While nIdPart <> GDB_ID.NULL
|
While nIdPart <> GDB_ID.NULL
|
||||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, LAY_AUX_SPLIT_WJ)
|
||||||
EgtErase(IdAuxLayer)
|
EgtErase(IdAuxLayer)
|
||||||
' accedo al Layer OutLoop
|
' accedo al Layer OutLoop
|
||||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
@@ -293,12 +304,9 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function ResetAllBRidges() As Boolean
|
Friend Function ResetAllBridges() As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim nBridgesGroupId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Bridges")
|
||||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
Return EgtErase(nBridgesGroupId)
|
||||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
|
||||||
bOk = EgtErase(nBridgesGroup)
|
|
||||||
Return bOk
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function ResetAllSplitCut() As Boolean
|
Friend Function ResetAllSplitCut() As Boolean
|
||||||
@@ -317,7 +325,7 @@ Friend Module CamAuto
|
|||||||
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
||||||
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
||||||
Dim sName As String = String.Empty
|
Dim sName As String = String.Empty
|
||||||
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
|
If EgtGetName(nParId, sName) AndAlso sName.Contains(NAME_SPLIT_CUT) Then
|
||||||
' Rimuovo il pezzo dal grezzo
|
' Rimuovo il pezzo dal grezzo
|
||||||
If EgtRemovePartFromRawPart(nParId) Then
|
If EgtRemovePartFromRawPart(nParId) Then
|
||||||
' Salvo l'indice del pezzo se non è stato già inserito
|
' Salvo l'indice del pezzo se non è stato già inserito
|
||||||
@@ -595,18 +603,20 @@ Friend Module CamAuto
|
|||||||
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
||||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
Dim CurrMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||||
|
sMissingTools = ""
|
||||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
sMissingTools = String.Empty
|
|
||||||
Dim nId As Integer = EgtGetFirstOperation()
|
Dim nId As Integer = EgtGetFirstOperation()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
If IsValidMachining(nId) Then
|
If IsValidMachining(nId) Then
|
||||||
Dim nType As Integer = MCH_OY.NONE
|
Dim nType As Integer = MCH_OY.NONE
|
||||||
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
||||||
Dim sTuuid As String = String.Empty
|
Dim sTuuid As String = String.Empty
|
||||||
Dim sTool As String = String.Empty
|
|
||||||
Dim sTool2 As String = String.Empty
|
|
||||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
|
Dim sTool As String = String.Empty
|
||||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||||
|
Dim nToolType As Integer = MCH_TY.NONE
|
||||||
|
if EgtTdbSetCurrTool( sTool) Then EgtTdbGetCurrToolParam( MCH_TP.TYPE, nToolType)
|
||||||
If String.IsNullOrWhiteSpace(sTool) Then
|
If String.IsNullOrWhiteSpace(sTool) Then
|
||||||
Dim sMchTool As String = ""
|
Dim sMchTool As String = ""
|
||||||
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||||
@@ -615,6 +625,7 @@ Friend Module CamAuto
|
|||||||
sMissingTools = sMissingTools & sMchTool & ", "
|
sMissingTools = sMissingTools & sMchTool & ", "
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.SAWING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Then
|
ElseIf nType = MCH_OY.SAWING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Then
|
||||||
|
Dim sTool2 As String = String.Empty
|
||||||
If bIsMultiCut Then
|
If bIsMultiCut Then
|
||||||
' L'utensile sulla seconda testa ha lo stesso nome di quello sulla prima con suffisso "-2"
|
' L'utensile sulla seconda testa ha lo stesso nome di quello sulla prima con suffisso "-2"
|
||||||
If sTool.Substring(sTool.Length() - 2) = "-2" Then
|
If sTool.Substring(sTool.Length() - 2) = "-2" Then
|
||||||
@@ -622,33 +633,25 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
sTool2 = sTool & "-2"
|
sTool2 = sTool & "-2"
|
||||||
End If
|
End If
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
If CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
Dim bOnHolder As Boolean = False
|
Dim bOnTC As Boolean = FindToolOnChanger( sTool)
|
||||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
If Not bOnTC Then
|
||||||
If ToolPosition.sTool <> String.Empty Then
|
|
||||||
If sTool = ToolPosition.sTool Then
|
|
||||||
bOnHolder = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If Not bOnHolder Then
|
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
ElseIf String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
|
||||||
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, CurrMachine.sCurrSaw) <> 0) AndAlso
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
|
String.Compare(sTool, CurrMachine.sCurrDripSaw) <> 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.DRILLING Then
|
ElseIf nType = MCH_OY.DRILLING Then
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDrill) <> 0 And
|
If String.Compare(sTool, CurrMachine.sCurrDrill) <> 0 And
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripDrill) <> 0 And
|
String.Compare(sTool, CurrMachine.sCurrDripDrill) <> 0 And
|
||||||
Not FindToolOnChanger(sTool) Then
|
Not FindToolOnChanger(sTool) Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
@@ -656,17 +659,56 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.MILLING Then
|
ElseIf nType = MCH_OY.MILLING Then
|
||||||
' Verifico anche le lame perchè il taglio di lama singolo sulle cornici è una lavorazione di fresatura
|
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrMill) <> 0 And
|
If nToolType = MCH_TY.MILL_POLISHING AndAlso
|
||||||
Not FindToolOnChanger(sTool) And
|
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
|
||||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 Then
|
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Verifico sia la fresa corrente, oppure sia attrezzato oppure la lama corrente
|
||||||
|
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
|
||||||
|
ElseIf String.Compare(sTool, CurrMachine.sCurrMill) <> 0 AndAlso
|
||||||
|
Not FindToolOnChanger(sTool) AndAlso
|
||||||
|
String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
|
||||||
|
nToolType <> MCH_TY.MILL_POLISHING Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf nType = MCH_OY.POCKETING Then
|
||||||
|
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
|
||||||
|
If nToolType = MCH_TY.MILL_POLISHING AndAlso
|
||||||
|
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
|
||||||
|
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
|
||||||
|
bOk = False
|
||||||
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
|
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Verifico sia la mola da scasso corrente, oppure sia attrezzato
|
||||||
|
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
|
||||||
|
ElseIf String.Compare(sTool, CurrMachine.sCurrMillNoTip) <> 0 AndAlso
|
||||||
|
Not FindToolOnChanger(sTool) AndAlso
|
||||||
|
nToolType <> MCH_TY.MILL_POLISHING Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sTool & ", "
|
sMissingTools = sMissingTools & sTool & ", "
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf nType = MCH_OY.WATERJETTING Then
|
ElseIf nType = MCH_OY.WATERJETTING Then
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrWaterJet) <> 0 And
|
If String.Compare(sTool, CurrMachine.sCurrWaterJet) <> 0 And
|
||||||
Not FindToolOnChanger(sTool) Then
|
Not FindToolOnChanger(sTool) Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
@@ -699,6 +741,34 @@ Friend Module CamAuto
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function CanChangeSaw() As Boolean
|
||||||
|
' Se non è TC anche per lama, non è possibile
|
||||||
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
' Se è nei TC manuali con posizione T0, non è possibile
|
||||||
|
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
If m_MainWindow.m_CurrentMachine.sCurrSaw = ToolPosition.sTool And ToolPosition.sName = "T0" Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Si può cambiare
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function CanChangeTool() As Boolean
|
||||||
|
' Se solo lama, non è possibile
|
||||||
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
' Se non è TC anche per lama, sempre possibile
|
||||||
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
' Altrimenti possibile solo se si può cambiare lama
|
||||||
|
Return CanChangeSaw()
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function TestAllMachiningsForStrict() As Boolean
|
Friend Function TestAllMachiningsForStrict() As Boolean
|
||||||
Dim bModified As Boolean = False
|
Dim bModified As Boolean = False
|
||||||
' Affondamento ridotto
|
' Affondamento ridotto
|
||||||
@@ -1038,6 +1108,8 @@ Friend Module CamAuto
|
|||||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
Dim bWaterjetOptimize As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_OPTIMIZE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
Dim bWaterjetOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
||||||
@@ -1057,6 +1129,8 @@ Friend Module CamAuto
|
|||||||
EgtLuaSetGlobBoolVar("CAM.MILLINGONCORNERS", bMillingOnCorners)
|
EgtLuaSetGlobBoolVar("CAM.MILLINGONCORNERS", bMillingOnCorners)
|
||||||
EgtLuaSetGlobBoolVar("CAM.MILLINGONSINKS", bMillingOnSinks)
|
EgtLuaSetGlobBoolVar("CAM.MILLINGONSINKS", bMillingOnSinks)
|
||||||
EgtLuaSetGlobNumVar("CAM.MILLINGSHORT", dMillingShort)
|
EgtLuaSetGlobNumVar("CAM.MILLINGSHORT", dMillingShort)
|
||||||
|
EgtLuaSetGlobBoolVar("CAM.WATERJETOPTIMIZE", bWaterjetOptimize)
|
||||||
|
EgtLuaSetGlobBoolVar("CAM.WATERJETONSINKS", bWaterjetOnSinks)
|
||||||
EgtLuaSetGlobNumVar("CAM.RAWHEIGHT", GetRawHeight())
|
EgtLuaSetGlobNumVar("CAM.RAWHEIGHT", GetRawHeight())
|
||||||
EgtLuaSetGlobNumVar("CAM.REGROT", GetRegistrationRotation())
|
EgtLuaSetGlobNumVar("CAM.REGROT", GetRegistrationRotation())
|
||||||
Return True
|
Return True
|
||||||
@@ -1479,14 +1553,14 @@ Friend Module CamAuto
|
|||||||
dStartDist = dEndDist
|
dStartDist = dEndDist
|
||||||
dEndDist = dTemp
|
dEndDist = dTemp
|
||||||
End If
|
End If
|
||||||
' altrimenti
|
' altrimenti
|
||||||
Else
|
Else
|
||||||
Dim vtSide As Vector3d
|
Dim vtSide As Vector3d
|
||||||
' Se faccia non limitata da altre o sopra la limitante
|
' Se faccia non limitata da altre o sopra la limitante
|
||||||
If bFree Then
|
If bFree Then
|
||||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
||||||
vtSide = Vector3d.Z_AX()
|
vtSide = Vector3d.Z_AX()
|
||||||
' altrimenti è stata trovata una faccia adiacente limitante
|
' altrimenti è stata trovata una faccia adiacente limitante
|
||||||
Else
|
Else
|
||||||
If vtAdjN.x > 10 * EPS_SMALL Then
|
If vtAdjN.x > 10 * EPS_SMALL Then
|
||||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
||||||
@@ -1549,7 +1623,7 @@ Friend Module CamAuto
|
|||||||
EgtSetMachiningParam(MCH_MP.STEPTYPE, If(nStepType = MCH_SAW_ST.ONEWAY, MCH_MIL_ST.ONEWAY, MCH_MIL_ST.ZIGZAG))
|
EgtSetMachiningParam(MCH_MP.STEPTYPE, If(nStepType = MCH_SAW_ST.ONEWAY, MCH_MIL_ST.ONEWAY, MCH_MIL_ST.ZIGZAG))
|
||||||
If dStep >= EPS_SMALL And dStep < dElev Then
|
If dStep >= EPS_SMALL And dStep < dElev Then
|
||||||
EgtSetMachiningParam(MCH_MP.STEP_, dStep)
|
EgtSetMachiningParam(MCH_MP.STEP_, dStep)
|
||||||
EgtSetMachiningParam(MCH_MP.USERNOTES, "SideElev=" & dElev.ToString() & ";")
|
EgtSetMachiningParam(MCH_MP.USERNOTES, "SideElev=" & DoubleToString( dElev, 1) & ";")
|
||||||
End If
|
End If
|
||||||
' Recupero la distanza di sicurezza
|
' Recupero la distanza di sicurezza
|
||||||
Dim dSafeZ As Double = m_MainWindow.m_CurrentMachine.dSafeZ()
|
Dim dSafeZ As Double = m_MainWindow.m_CurrentMachine.dSafeZ()
|
||||||
|
|||||||
@@ -149,13 +149,13 @@ Public Class CSVPage
|
|||||||
Dim sRefGroup As String = String.Empty
|
Dim sRefGroup As String = String.Empty
|
||||||
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
|
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
|
||||||
' deseleziono il pezzo corrente
|
' deseleziono il pezzo corrente
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFaimily(sRefGroup)
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFamily(sRefGroup)
|
||||||
Select Case SelectWD.NumberOfSelection
|
Select Case SelectWD.NumberOfSelection
|
||||||
Case 0 ' Annulla
|
Case 0 ' Annulla
|
||||||
' continuo senza eseguire niente
|
' continuo senza eseguire niente
|
||||||
Case Else
|
Case Else
|
||||||
' seleziono il numero di pezzi indicati
|
' seleziono il numero di pezzi indicati
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFaimily(sRefGroup, SelectWD.NumberOfSelection)
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFamily(sRefGroup, SelectWD.NumberOfSelection)
|
||||||
End Select
|
End Select
|
||||||
m_bIsCounterLy = False
|
m_bIsCounterLy = False
|
||||||
' disassegno il riferimento all'oggetto appena creato
|
' disassegno il riferimento all'oggetto appena creato
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
@@ -145,7 +145,7 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -173,7 +173,7 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
@@ -183,7 +183,7 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
@@ -207,7 +207,7 @@ Public Class CadCutPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.15*"/>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.15*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Imports EgtUILib
|
|||||||
Public Class ChangeToolWD
|
Public Class ChangeToolWD
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
Private m_SetUpMachiningList As New ObservableCollection(Of ItemMachining)
|
Private m_MachiningList As New ObservableCollection(Of ItemMachining)
|
||||||
|
|
||||||
Sub New(Owner As Window)
|
Sub New(Owner As Window)
|
||||||
Me.Owner = Owner
|
Me.Owner = Owner
|
||||||
@@ -68,25 +68,25 @@ Public Class ChangeToolWD
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub ChangeToolWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Posizione finestra
|
' Posizione finestra
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
' Definizione del collegamento tra ItemList e ListBox1
|
' Definizione del collegamento tra ItemList e ListBox1
|
||||||
SetUpToolListBox.ItemsSource = m_SetUpMachiningList
|
SetUpToolListBox.ItemsSource = m_MachiningList
|
||||||
' 90378=Seleziona lavorazione
|
' Seleziona lavorazione
|
||||||
FilePathTxBl.Text = EgtMsg(90378)
|
FilePathTxBl.Text = EgtMsg(90378)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
Private Sub ChangeToolWD_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||||
If String.IsNullOrEmpty(m_CurrSawing) Then
|
If String.IsNullOrEmpty(m_CurrSawing) Then
|
||||||
m_CurrSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
m_CurrSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
End If
|
End If
|
||||||
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||||
LoadSetUpMachining()
|
LoadSetUpMachining()
|
||||||
' ricerco la lavorazione corrente
|
' ricerco la lavorazione corrente
|
||||||
Dim Item As ItemMachining = m_SetUpMachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
|
Dim Item As ItemMachining = m_MachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
|
||||||
Dim Index As Integer = m_SetUpMachiningList.IndexOf(Item)
|
Dim Index As Integer = m_MachiningList.IndexOf(Item)
|
||||||
If Index < 0 Then
|
If Index < 0 Then
|
||||||
' Imposto lavorazione di default
|
' Imposto lavorazione di default
|
||||||
EgtMdbSetCurrMachining(m_CurrSawing)
|
EgtMdbSetCurrMachining(m_CurrSawing)
|
||||||
@@ -97,8 +97,8 @@ Public Class ChangeToolWD
|
|||||||
Index = 0
|
Index = 0
|
||||||
End If
|
End If
|
||||||
' se presente seleziono il primo elemento
|
' se presente seleziono il primo elemento
|
||||||
If m_SetUpMachiningList.Count > 0 Then
|
If m_MachiningList.Count > 0 Then
|
||||||
SetUpToolListBox.SelectedItem = m_SetUpMachiningList(Index)
|
SetUpToolListBox.SelectedItem = m_MachiningList(Index)
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
Else
|
Else
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
@@ -109,54 +109,55 @@ Public Class ChangeToolWD
|
|||||||
|
|
||||||
' Creo le liste da mostrare nella lista
|
' Creo le liste da mostrare nella lista
|
||||||
Private Function LoadSetUpMachining() As Boolean
|
Private Function LoadSetUpMachining() As Boolean
|
||||||
Dim sNameTool As String = String.Empty
|
' Pulisco la lista delle lavorazioni di lama
|
||||||
Dim nType As Integer = 0
|
m_MachiningList.Clear()
|
||||||
Dim sHeadTool As String = String.Empty
|
|
||||||
Dim nExitTool As Integer = 0
|
|
||||||
' Imposto il contesto corrente
|
' Imposto il contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Recupero la lista di tutte le lavorazioni di lama
|
' Recupero la lista di tutte le lavorazioni di lama
|
||||||
Dim local_Sawing As TreeViewItem.CathegoryItem = GetAllSwaing()
|
Dim SawingList As List(Of String) = GetAllSawing()
|
||||||
' Se non ci sono lavorazioni di lama allora esco
|
' Se non ci sono lavorazioni di lama allora esco
|
||||||
If IsNothing(local_Sawing) Then Return False
|
If SawingList.Count() = 0 Then Return False
|
||||||
|
' Carico le lavorazioni di lama compatibili
|
||||||
' Ripulisco la lista degli utensili
|
CreateSawingList(SawingList)
|
||||||
m_SetUpMachiningList.Clear()
|
|
||||||
CreateSawingList(local_Sawing)
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Creo la lista delle delle lavorazioni di lama da proporre
|
' Creo la lista delle delle lavorazioni di lama da proporre
|
||||||
Private Sub CreateSawingList(SawingFam As TreeViewItem.CathegoryItem)
|
Private Sub CreateSawingList(SawingList As List(Of String))
|
||||||
' Recupero le info della lama montata di default
|
' Recupero le info della lama montata di default
|
||||||
GetDiamAndThickDefaultSaw()
|
GetDiamAndThickDefaultSaw()
|
||||||
|
' Verifico se lama fissa
|
||||||
|
Dim bFixedSaw As Boolean = Not CamAuto.CanChangeSaw()
|
||||||
' recupero la prima lavorazione
|
' recupero la prima lavorazione
|
||||||
For Each Item As TreeViewItem.CustomItem In SawingFam.Items
|
For Each sSawingName As String In SawingList
|
||||||
Dim sNameTool As String = String.Empty
|
Dim sToolName As String = ""
|
||||||
' Imposto la lavorazione corrente
|
' Imposto la lavorazione corrente
|
||||||
EgtMdbSetCurrMachining(Item.Name)
|
EgtMdbSetCurrMachining(sSawingName)
|
||||||
' Recupero il nome dell'utensile della lavorazione
|
' Recupero il nome dell'utensile della lavorazione
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool)
|
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sToolName)
|
||||||
If Not String.IsNullOrEmpty(sNameTool) And VerifyCurrSawTollerance(sNameTool) Then
|
If String.IsNullOrWhiteSpace( sToolName) Then Continue For
|
||||||
' Verifico che sia montata su un portautensile
|
' Se lama fissa
|
||||||
EgtTdbSetCurrTool(sNameTool)
|
If bFixedSaw Then
|
||||||
Dim sTCPos As String = String.Empty
|
' Sono ammesse solo altre lavorazioni con la stessa lama
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
If sToolName = m_DefaultSaw_Name AndAlso VerifyCurrMachiningMaterial() Then
|
||||||
If Not String.IsNullOrEmpty(sTCPos) Then
|
' recupero eventuale posizione
|
||||||
' Cerco nel porta utensili automaitico
|
EgtTdbSetCurrTool(sToolName)
|
||||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
Dim sTCPos As String = ""
|
||||||
If ToolPosition.sTool <> String.Empty Then
|
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||||
If sNameTool = ToolPosition.sTool Then
|
' inserisco in lista
|
||||||
' Verifico che il materiale e lo spessore
|
m_MachiningList.Add(New ItemMachining(sSawingName, sToolName, sTCPos, New Color3d(0, 0, 0, 100)))
|
||||||
If VerifyCurrMachiningMaterial() Then
|
|
||||||
m_SetUpMachiningList.Add(New ItemMachining(Item.Name, sNameTool, sTCPos, Utility.GetColorPV()))
|
|
||||||
End If
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
' altrimenti (ammessa solo se da TC)
|
||||||
|
Else
|
||||||
|
' Verifico compatibilità nelle dimensioni lama e nei materiali ammessi dalla lavorazione
|
||||||
|
If Not( VerifyCurrSawTolerance(sToolName) AndAlso VerifyCurrMachiningMaterial()) Then Continue For
|
||||||
|
' Cerco la lama nel TC
|
||||||
|
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
|
If sToolName = ToolPosition.sTool Then
|
||||||
|
m_MachiningList.Add(New ItemMachining(sSawingName, sToolName, ToolPosition.sName, Utility.GetColorPV()))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' reimposto la lavorazione di lama e la lama impostate in macchina
|
' reimposto la lavorazione di lama e la lama impostate in macchina
|
||||||
@@ -164,54 +165,44 @@ Public Class ChangeToolWD
|
|||||||
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
|
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se può lavorare il grezzo corrente
|
' Verifico se la lavorazione impostata nella chiamante e quindi corrente può lavorare il grezzo corrente
|
||||||
Private Function VerifyCurrMachiningMaterial() As Boolean
|
Private Function VerifyCurrMachiningMaterial() As Boolean
|
||||||
Dim m_MaterialsList As New ObservableCollection(Of MachiningMaterial)
|
' Stringa identificativa del materiale corrente
|
||||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
Dim sCurrMatId As String = m_MainWindow.m_CurrentMachine.CurrMat.nId.ToString()
|
||||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
sCurrMatId &= "." & m_MainWindow.m_CurrentMachine.CurrMat.SubId.ToString()
|
||||||
Else
|
End If
|
||||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
' Recupero elenco materiali della lavorazione
|
||||||
|
Dim sSysNotes As String = ""
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, sSysNotes)
|
||||||
|
If String.IsNullOrWhiteSpace( sSysNotes) Then Return False
|
||||||
|
' Cerco un materiale compatibile con il corrente
|
||||||
|
Dim sItems() As String = sSysNotes.Split(";".ToCharArray)
|
||||||
|
For Ind As Integer = 0 To sItems.Count() - 1
|
||||||
|
' Divido il materiale nei suoi parametri
|
||||||
|
Dim sParams() = sItems(Ind).Split(",".ToCharArray)
|
||||||
|
' Se è il materiale del grezzo corrente
|
||||||
|
If sParams.Count() >= 3 AndAlso Trim(sParams(0)) = sCurrMatId Then
|
||||||
|
' Verifico rientri nello spessore ammesso
|
||||||
|
Dim dMinTh As Double = 0
|
||||||
|
Dim dMaxTh As Double = 0
|
||||||
|
StringToDouble(sParams(1), dMinTh)
|
||||||
|
StringToDouble(sParams(2), dMaxTh)
|
||||||
|
If dMinTh < dMaxTh - 10 * EPS_SMALL And
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight >= dMinTh And
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight <= dMaxTh Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
' Non ho trovato niente
|
||||||
Dim ToolString As String = String.Empty
|
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
|
||||||
If ToolString <> String.Empty Then
|
|
||||||
Dim sItems() = ToolString.Split(";".ToCharArray)
|
|
||||||
Dim Index As Integer = 0
|
|
||||||
For Each Material As MachiningMaterial In m_MaterialsList
|
|
||||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
|
||||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
|
||||||
Dim nParId As Integer = 0
|
|
||||||
Dim nSubParId As Integer = 0
|
|
||||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
|
||||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId AndAlso SubParam.Count > 1 AndAlso
|
|
||||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
|
||||||
StringToDouble(Param(1), Material.dMinThickness)
|
|
||||||
StringToDouble(Param(2), Material.dMaxThickness)
|
|
||||||
Material.VerifyIfActive()
|
|
||||||
Else
|
|
||||||
Material.VerifyIfActive()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If StringToInt(Param(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId Then
|
|
||||||
StringToDouble(Param(1), Material.dMinThickness)
|
|
||||||
StringToDouble(Param(2), Material.dMaxThickness)
|
|
||||||
Material.VerifyIfActive()
|
|
||||||
If m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight > Material.dMinThickness And m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight < Material.dMaxThickness Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Index += 1
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
|
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
|
||||||
Private Function VerifyCurrSawTollerance(sNameTool As String) As Boolean
|
Private Function VerifyCurrSawTolerance(sNameTool As String) As Boolean
|
||||||
If m_DefaultSaw_Exists Then
|
If m_DefaultSaw_Exists Then
|
||||||
If EgtTdbSetCurrTool(sNameTool) Then
|
If EgtTdbSetCurrTool(sNameTool) Then
|
||||||
' Diametro nuova lama
|
' Diametro nuova lama
|
||||||
@@ -220,42 +211,41 @@ Public Class ChangeToolWD
|
|||||||
' Spessore lama
|
' Spessore lama
|
||||||
Dim NewThick As Double = 0
|
Dim NewThick As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
|
||||||
' Verifico che la nuova lama possa essere applicata: diametro minore, uguale spessore
|
' Verifico che la nuova lama possa essere applicata: diametro max 1.25*prec, uguale spessore
|
||||||
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
|
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
|
||||||
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
|
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
|
||||||
If Delta_Diam < EPS_SMALL And Delta_Thick < EPS_SMALL Then
|
If Delta_Diam < 0.25 * m_DefaultSaw_Diam And Delta_Thick < EPS_SMALL Then
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
EgtOutLog(String.Format("New saw {0} can not repalce the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
|
EgtOutLog(String.Format("New saw {0} can not replace the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Impossible to find in tooldb SAW: " & sNameTool)
|
EgtOutLog("Impossible to find in toolDB saw: " & sNameTool)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
|
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
|
||||||
EgtOutLog("There is no currsaw setted in machine!")
|
EgtOutLog("There is no machine CurrSaw!")
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Impossible to find in tooldb currsaw setted in machine: " & m_DefaultSaw_Name)
|
EgtOutLog("Impossible to find in toolDB machine CurrSaw: " & m_DefaultSaw_Name)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Restituisce tutto l'elenco delle lavorazioni disponibili in macchina
|
' Restituisce tutto l'elenco delle lavorazioni di taglio di lama disponibili in macchina
|
||||||
Private Function GetAllSwaing() As TreeViewItem.CathegoryItem
|
Private Function GetAllSawing() As List(Of String)
|
||||||
Dim sFName As String = EgtMsg(90771) ' Uscita
|
Dim sFName As String = EgtMsg(90771) ' Uscita
|
||||||
Dim nFType As Integer = MCH_MY.SAWING
|
|
||||||
If Not m_MainWindow.m_CurrentMachine.bSawing Then Return Nothing
|
If Not m_MainWindow.m_CurrentMachine.bSawing Then Return Nothing
|
||||||
' Inserisco categoria ed eventuali elementi
|
' Inserisco categoria ed eventuali elementi
|
||||||
Dim MachiningCathegory As New TreeViewItem.CathegoryItem(sFName, nFType)
|
Dim SawingList As New List(Of String)
|
||||||
|
Dim nFType As Integer = MCH_MY.SAWING
|
||||||
Dim MachiningName As String = String.Empty
|
Dim MachiningName As String = String.Empty
|
||||||
If EgtMdbGetFirstMachining(nFType, MachiningName) Then
|
Dim bFound As Boolean = EgtMdbGetFirstMachining(nFType, MachiningName)
|
||||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
While bFound
|
||||||
While EgtMdbGetNextMachining(nFType, MachiningName)
|
SawingList.Add( MachiningName)
|
||||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
bFound = EgtMdbGetNextMachining(nFType, MachiningName)
|
||||||
End While
|
End While
|
||||||
End If
|
Return SawingList
|
||||||
Return MachiningCathegory
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' Set up machinining
|
#End Region ' Set up machinining
|
||||||
@@ -266,12 +256,12 @@ Public Class ChangeToolWD
|
|||||||
' Recupero item selezionato
|
' Recupero item selezionato
|
||||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
Return
|
Return
|
||||||
|
Else
|
||||||
|
m_NewSawing = m_MachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||||
|
m_EgtColor = m_MachiningList(SetUpToolListBox.SelectedIndex).FootprintToolColor
|
||||||
|
m_TCPos = m_MachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
End If
|
End If
|
||||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
|
||||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
|
||||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
|
||||||
' A seconda del tipo
|
|
||||||
OkBtn.IsEnabled = True
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||||
@@ -281,9 +271,9 @@ Public Class ChangeToolWD
|
|||||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
m_NewSawing = m_MachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
m_EgtColor = m_MachiningList(SetUpToolListBox.SelectedIndex).FootprintToolColor
|
||||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
m_TCPos = m_MachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -301,7 +291,7 @@ Public Class ItemMachining
|
|||||||
Private m_Machining As String = String.Empty
|
Private m_Machining As String = String.Empty
|
||||||
Private m_ToolExit As Integer = 1
|
Private m_ToolExit As Integer = 1
|
||||||
Private m_ToolType As Integer = -1
|
Private m_ToolType As Integer = -1
|
||||||
Private m_PrintFootToolColor As New Color3d(0, 255, 0, 100)
|
Private m_FootprintToolColor As New Color3d(0, 255, 0, 100)
|
||||||
Private m_cSawColor As SolidColorBrush
|
Private m_cSawColor As SolidColorBrush
|
||||||
|
|
||||||
' Posizione porta utensile
|
' Posizione porta utensile
|
||||||
@@ -352,12 +342,12 @@ Public Class ItemMachining
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property PrintFootToolColor As Color3d
|
Public Property FootprintToolColor As Color3d
|
||||||
Get
|
Get
|
||||||
Return m_PrintFootToolColor
|
Return m_FootprintToolColor
|
||||||
End Get
|
End Get
|
||||||
Set(value As Color3d)
|
Set(value As Color3d)
|
||||||
m_PrintFootToolColor = value
|
m_FootprintToolColor = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -374,8 +364,8 @@ Public Class ItemMachining
|
|||||||
m_Machining = sMachining
|
m_Machining = sMachining
|
||||||
m_ToolPos = sToolPos
|
m_ToolPos = sToolPos
|
||||||
m_ToolName = sToolName
|
m_ToolName = sToolName
|
||||||
m_PrintFootToolColor = cColor
|
m_FootprintToolColor = cColor
|
||||||
m_cSawColor = New SolidColorBrush(Color.FromRgb(m_PrintFootToolColor.R, m_PrintFootToolColor.G, m_PrintFootToolColor.B))
|
m_cSawColor = New SolidColorBrush(Color.FromRgb(m_FootprintToolColor.R, m_FootprintToolColor.G, m_FootprintToolColor.B))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -40,25 +40,8 @@ Public Class ChooseTestToolWD
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function LoadSetUpTool() As Boolean
|
Private Function LoadSetUpTool() As Boolean
|
||||||
Dim sNameTool As String = String.Empty
|
|
||||||
Dim sHeadTool As String = String.Empty
|
|
||||||
Dim nExitTool As Integer = 0
|
|
||||||
|
|
||||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sNameTool As String = String.Empty
|
||||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
|
||||||
' ' Imposto la lama
|
|
||||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, True))
|
|
||||||
'End If
|
|
||||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
|
||||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
|
||||||
' ' Imposto la fresa
|
|
||||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
|
||||||
'End If
|
|
||||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
|
||||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
|
||||||
' ' Imposto il foretto
|
|
||||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
|
||||||
'End If
|
|
||||||
|
|
||||||
sNameTool = "Laser point"
|
sNameTool = "Laser point"
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
@@ -79,6 +62,7 @@ Public Class ChooseTestToolWD
|
|||||||
' Imposto la lama
|
' Imposto la lama
|
||||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
End If
|
End If
|
||||||
|
Return True
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
@@ -95,7 +79,7 @@ Public Class ChooseTestToolWD
|
|||||||
' Imposto il foretto
|
' Imposto il foretto
|
||||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
End If
|
End If
|
||||||
|
Return True
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
@@ -112,7 +96,6 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
@@ -141,7 +124,6 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
@@ -164,12 +146,9 @@ Public Class ChooseTestToolWD
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return False
|
Return False
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -405,9 +405,9 @@ Public Class MoveRawPartPage
|
|||||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||||
' Aggiorno i dati
|
' Aggiorno i dati
|
||||||
m_bRawWithCups = False
|
m_bRawWithCups = False
|
||||||
If VacuumCups.bOverWeight Then
|
If VacuumCups.m_bOverWeight Then
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90364)) ' Pezzo troppo pesante : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90364)) ' Pezzo troppo pesante : non si può muovere
|
||||||
ElseIf VacuumCups.bExtraStroke Then
|
ElseIf VacuumCups.m_bExtraStroke Then
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90365)) ' Pezzo oltre le corse : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90365)) ' Pezzo oltre le corse : non si può muovere
|
||||||
Else
|
Else
|
||||||
' Messaggio di avvertimento
|
' Messaggio di avvertimento
|
||||||
@@ -469,16 +469,16 @@ Public Class MoveRawPartPage
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi - versione 2.6c3 -
|
' Verifica che il grezzo non entri in collisione con altri pezzi - versione 2.6c3 -
|
||||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer, Optional IsTaking As Boolean = False) As Boolean
|
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer, Optional IsTaking As Boolean = False) As Boolean
|
||||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalare errori per pezzi ricavati interni al grezzo...)
|
||||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
' Creo gruppo temporaneo in cui generare le superfici per la verifica di collisione
|
||||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
If m_nTempId = GDB_ID.NULL Then Return False
|
If m_nTempId = GDB_ID.NULL Then Return False
|
||||||
EgtSetName(m_nTempId, "RawTemp")
|
EgtSetName(m_nTempId, "RawTemp")
|
||||||
' recupero il contorno del'ID attaccato alle ventose e da questo genero una superificie
|
' recupero le regioni del grezzo attaccato alle ventose e da questo genero una superficie
|
||||||
Dim nIdUpRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawUpReg")
|
Dim nIdUpRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawUpReg")
|
||||||
Dim nIdDwnRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawDwnReg")
|
Dim nIdDwnRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawDwnReg")
|
||||||
' recupero gli ID di tutti i grezzi della fase corrente
|
' recupero gli ID di tutti i grezzi della fase corrente
|
||||||
@@ -489,38 +489,37 @@ Public Class MoveRawPartPage
|
|||||||
While nIdRaw <> GDB_ID.NULL
|
While nIdRaw <> GDB_ID.NULL
|
||||||
' verifico la fase del grezzo
|
' verifico la fase del grezzo
|
||||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||||
' recupero il contorno del pezzo e genero la sua sueperificie
|
' recupero le regioni del grezzo
|
||||||
Dim nIdUpRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawUpReg")
|
Dim nIdUpRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawUpReg")
|
||||||
Dim nIdDwnRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawDwnReg")
|
Dim nIdDwnRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawDwnReg")
|
||||||
' creo la copia delle superifici
|
' creo la copia delle regioni
|
||||||
Dim nCopy_IdDwnRegionOnVac As Integer = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
|
Dim nCopy_IdDwnRegionOnVac As Integer = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
|
||||||
Dim nCopy_nIdUpRegion As Integer = EgtCopyGlob(nIdUpRegion, m_nTempId)
|
|
||||||
' PRELIEVO
|
' PRELIEVO
|
||||||
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdUpRegion) Then
|
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nIdUpRegion) Then
|
||||||
' se esite una superficie allora esiste un'intersezione
|
' se esiste la regione risultato, allora c'è intersezione
|
||||||
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||||
EgtErase(m_nTempId)
|
EgtErase(m_nTempId)
|
||||||
' Esco: Intersezione TROVATA → true
|
' Esco: Intersezione TROVATA -> true
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
' DEPOSITO : devono essere eseguiti due controlli ulteriori
|
||||||
If Not IsTaking Then
|
If Not IsTaking Then
|
||||||
' DEPOSITO : devono essere esguiti due controlli ulteririori
|
nCopy_IdDwnRegionOnVac = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
|
||||||
Dim nCopy_IdUpRegionOnVac As Integer = EgtCopyGlob(nIdUpRegionOnVac, m_nTempId)
|
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nIdDwnRegion) Then
|
||||||
Dim nCopy_nIdDwnRegion As Integer = EgtCopyGlob(nIdDwnRegion, m_nTempId)
|
' se esiste la regione risultato, allora c'è intersezione
|
||||||
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdDwnRegion) Then
|
|
||||||
' se esite una superficie allora esiste un'intersezione
|
|
||||||
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||||
EgtErase(m_nTempId)
|
EgtErase(m_nTempId)
|
||||||
' Esco: Intersezione TROVATA → true
|
' Esco: Intersezione TROVATA -> true
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If EgtSurfFrIntersect(nCopy_IdUpRegionOnVac, nCopy_nIdUpRegion) Then
|
Dim nCopy_IdUpRegionOnVac As Integer = EgtCopyGlob(nIdUpRegionOnVac, m_nTempId)
|
||||||
' se esite una superficie allora esiste un'intersezione
|
If EgtSurfFrIntersect(nCopy_IdUpRegionOnVac, nIdUpRegion) Then
|
||||||
|
' se esiste la regione risultato, allora c'è intersezione
|
||||||
If EgtExistsObj(nCopy_IdUpRegionOnVac) Then
|
If EgtExistsObj(nCopy_IdUpRegionOnVac) Then
|
||||||
EgtErase(m_nTempId)
|
EgtErase(m_nTempId)
|
||||||
' Esco: Intersezione TROVATA → true
|
' Esco: Intersezione TROVATA -> true
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -536,7 +535,7 @@ Public Class MoveRawPartPage
|
|||||||
Dim nVal As Integer = 0
|
Dim nVal As Integer = 0
|
||||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||||
If nVal = 1 Or nVal = 2 Then
|
If nVal = 1 Or nVal = 2 Then
|
||||||
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
|
' 1 -> definito come nuovo grezzo oppure, 2 -> definito come nuovo grezzo ed inserito nel DB delle lastre
|
||||||
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
|
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
|
||||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||||
Return True
|
Return True
|
||||||
@@ -579,13 +578,13 @@ Public Class MoveRawPartPage
|
|||||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
VerifyReleasdPositionIsValid(vtMove)
|
VerifyReleasePositionIsValid(vtMove)
|
||||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
VacuumCups.m_ptStartPointLift.y -= vtMove.y
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -622,13 +621,13 @@ Public Class MoveRawPartPage
|
|||||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
VerifyReleasdPositionIsValid(vtMove)
|
VerifyReleasePositionIsValid(vtMove)
|
||||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
VacuumCups.m_ptStartPointLift.y -= vtMove.y
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -648,13 +647,13 @@ Public Class MoveRawPartPage
|
|||||||
Dim vtMove As New Vector3d(m_dStep, 0, 0)
|
Dim vtMove As New Vector3d(m_dStep, 0, 0)
|
||||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
VerifyReleasdPositionIsValid(vtMove)
|
VerifyReleasePositionIsValid(vtMove)
|
||||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
VacuumCups.m_ptStartPointLift.x -= vtMove.x
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -673,13 +672,13 @@ Public Class MoveRawPartPage
|
|||||||
Dim vtMove As New Vector3d(-m_dStep, 0, 0)
|
Dim vtMove As New Vector3d(-m_dStep, 0, 0)
|
||||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
VerifyReleasdPositionIsValid(vtMove)
|
VerifyReleasePositionIsValid(vtMove)
|
||||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
VacuumCups.m_ptStartPointLift.x -= vtMove.x
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -691,15 +690,15 @@ Public Class MoveRawPartPage
|
|||||||
|
|
||||||
#End Region 'Move Up/Down/Left/Right
|
#End Region 'Move Up/Down/Left/Right
|
||||||
|
|
||||||
' verifica che la poszione da raggiungere sia nei limiti delle corse
|
' verifica che la posizione da raggiungere sia nei limiti delle corse
|
||||||
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
Private Function VerifyReleasePositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
' determino il punto finale dello spostamento
|
' determino il punto finale dello spostamento
|
||||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
Dim ptEndPointLift As Point3d = VacuumCups.m_ptStartPointLift
|
||||||
ptEndPointLift.x += vtMove.x
|
ptEndPointLift.x += vtMove.x
|
||||||
ptEndPointLift.y += vtMove.y
|
ptEndPointLift.y += vtMove.y
|
||||||
Dim sInfo As String = String.Empty
|
Dim sInfo As String = String.Empty
|
||||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.dDegRotStartAng)
|
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.m_dDegRotStartAng)
|
||||||
Case 1
|
Case 1
|
||||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
EgtGetOutstrokeInfo(sInfo)
|
||||||
@@ -754,7 +753,7 @@ Public Class MoveRawPartPage
|
|||||||
bOk = False
|
bOk = False
|
||||||
End Select
|
End Select
|
||||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
VacuumCups.m_ptStartPointLift = ptEndPointLift
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -783,8 +782,8 @@ Public Class MoveRawPartPage
|
|||||||
' Memorizzo
|
' Memorizzo
|
||||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
VacuumCups.m_ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||||
VacuumCups.dDegRotStartAng -= dAng
|
VacuumCups.m_dDegRotStartAng -= dAng
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -817,8 +816,8 @@ Public Class MoveRawPartPage
|
|||||||
' Memorizzo
|
' Memorizzo
|
||||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||||
Else
|
Else
|
||||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
VacuumCups.m_ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||||
VacuumCups.dDegRotStartAng -= dAng
|
VacuumCups.m_dDegRotStartAng -= dAng
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||||
@@ -834,8 +833,8 @@ Public Class MoveRawPartPage
|
|||||||
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
' determino il punto finale dello spostamento
|
' determino il punto finale dello spostamento
|
||||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
Dim ptEndPointLift As Point3d = VacuumCups.m_ptStartPointLift
|
||||||
Dim dDegRotEndAng As Double = VacuumCups.dDegRotStartAng + dAngDeg
|
Dim dDegRotEndAng As Double = VacuumCups.m_dDegRotStartAng + dAngDeg
|
||||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||||
Dim sInfo As String = String.Empty
|
Dim sInfo As String = String.Empty
|
||||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
|
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
|
||||||
@@ -861,8 +860,8 @@ Public Class MoveRawPartPage
|
|||||||
bOk = False
|
bOk = False
|
||||||
End Select
|
End Select
|
||||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
VacuumCups.m_ptStartPointLift = ptEndPointLift
|
||||||
VacuumCups.dDegRotStartAng = dDegRotEndAng
|
VacuumCups.m_dDegRotStartAng = dDegRotEndAng
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -1030,7 +1029,7 @@ Public Class MoveRawPartPage
|
|||||||
Next
|
Next
|
||||||
If Not bOkRotate Then Return
|
If Not bOkRotate Then Return
|
||||||
Else
|
Else
|
||||||
' sposto il pezzo in centro tavola → perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
|
' sposto il pezzo in centro tavola, perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
|
||||||
Dim b3Area As New BBox3d
|
Dim b3Area As New BBox3d
|
||||||
EgtGetTableArea(1, b3Area)
|
EgtGetTableArea(1, b3Area)
|
||||||
Dim b3RawTemp As New BBox3d
|
Dim b3RawTemp As New BBox3d
|
||||||
|
|||||||
@@ -100,31 +100,6 @@
|
|||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!--Comandi attivi solo in madalità REG-->
|
|
||||||
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
|
|
||||||
<ToggleButton Name="AddPointRegBtn" Visibility="Hidden"
|
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource RefTabImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
|
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource RefTabImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<!--Comandi attivi solo in madalità REG-->
|
|
||||||
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
|
|
||||||
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
|
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
|
||||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
@@ -137,18 +112,37 @@
|
|||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
|
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
|
||||||
|
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="DragRectangleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Drag_RectangleImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource SplitWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource SplitWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
|
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
|
||||||
|
<Button Visibility="Hidden"/>
|
||||||
|
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
<Button Visibility="Hidden"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Name ="UG2" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="3" >
|
<UniformGrid Name ="UG2" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="3" >
|
||||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ Public Class SelParkIndWD
|
|||||||
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
|
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
|
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non riuscita")
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -470,15 +470,14 @@ Public Class ParkInd
|
|||||||
m_Ind = Ind
|
m_Ind = Ind
|
||||||
m_Name = Name
|
m_Name = Name
|
||||||
m_Status = Stat
|
m_Status = Stat
|
||||||
|
Dim MyMainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
' Costruisco il percorso immagine
|
' Costruisco il percorso immagine
|
||||||
If m_Ind = 0 Then
|
If m_Ind = 0 Then
|
||||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
m_Img = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
|
||||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
|
m_Svg = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
|
||||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
|
|
||||||
ElseIf m_Ind = 999 Then
|
ElseIf m_Ind = 999 Then
|
||||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
m_Img = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
|
||||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
|
m_Svg = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
|
||||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
|
|
||||||
Else
|
Else
|
||||||
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
|
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
|
||||||
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
|
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
|
||||||
@@ -850,7 +849,7 @@ Public Module XMLReader
|
|||||||
End While
|
End While
|
||||||
' Libero il file dalla lettura
|
' Libero il file dalla lettura
|
||||||
m_xmlr.Close()
|
m_xmlr.Close()
|
||||||
' popolo la canvas con le Ptah che ho caricato
|
' popolo la canvas con le Path che ho caricato
|
||||||
Canv.LoadCanvas()
|
Canv.LoadCanvas()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="Title" Grid.Row="1" Grid.Column="1"
|
<TextBlock Name="TableListMsg" Grid.Row="1" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
<ItemsControl Name="TableList"
|
<ItemsControl Name="TableList"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Public Class SelectTableWD
|
|||||||
|
|
||||||
Private Sub ChangeTable_Initialized() Handles Me.Initialized
|
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
|
' recuepero l'inidce della tavola corrente
|
||||||
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||||
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||||
|
|||||||
@@ -52,14 +52,14 @@ Public Module SplitAuto
|
|||||||
' verifico sia una lavorazione valida della fase corrente
|
' verifico sia una lavorazione valida della fase corrente
|
||||||
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
||||||
Dim Mach As New SplitMach
|
Dim Mach As New SplitMach
|
||||||
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
|
If CreateMach(nOperId, Mach) Then MachSplitList.Add(Mach)
|
||||||
End If
|
End If
|
||||||
nOperId = EgtGetNextOperation(nOperId)
|
nOperId = EgtGetNextOperation(nOperId)
|
||||||
End While
|
End While
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function CreateMach(ByRef Mach As SplitMach, nOperId As Integer) As Boolean
|
Friend Function CreateMach(nOperId As Integer, ByRef Mach As SplitMach) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
' se appartiene ad un grezzo attivo la inserisco in lista
|
||||||
If IsMachiningInActiveRaw(nOperId) Then
|
If IsMachiningInActiveRaw(nOperId) Then
|
||||||
@@ -173,7 +173,7 @@ Public Module SplitAuto
|
|||||||
Mach.m_bStartAll = False
|
Mach.m_bStartAll = False
|
||||||
Mach.m_bEndAll = False
|
Mach.m_bEndAll = False
|
||||||
End If
|
End If
|
||||||
' Waterjet
|
' Waterjet
|
||||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||||
Mach.m_nInterf = FMI_TYPE.NONE
|
Mach.m_nInterf = FMI_TYPE.NONE
|
||||||
' recupero l'angolo di fianco
|
' recupero l'angolo di fianco
|
||||||
@@ -182,7 +182,7 @@ Public Module SplitAuto
|
|||||||
Mach.m_bCanEndAll = False
|
Mach.m_bCanEndAll = False
|
||||||
Mach.m_bStartAll = False
|
Mach.m_bStartAll = False
|
||||||
Mach.m_bEndAll = False
|
Mach.m_bEndAll = False
|
||||||
' Forature e fresature
|
' Forature e fresature
|
||||||
Else
|
Else
|
||||||
Mach.m_nInterf = FMI_TYPE.NONE
|
Mach.m_nInterf = FMI_TYPE.NONE
|
||||||
Mach.m_dSideAng = 0
|
Mach.m_dSideAng = 0
|
||||||
@@ -241,18 +241,20 @@ Public Module SplitAuto
|
|||||||
Dim bEnabled As Boolean = MachSplit.m_bEnabled
|
Dim bEnabled As Boolean = MachSplit.m_bEnabled
|
||||||
Dim nInterf As Integer = If(bReset, FMI_TYPE.NONE, MachSplit.m_nInterf)
|
Dim nInterf As Integer = If(bReset, FMI_TYPE.NONE, MachSplit.m_nInterf)
|
||||||
' Colore della lavorazione principale
|
' Colore della lavorazione principale
|
||||||
ColorSingleMachining(MachSplit.m_nId, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
|
ColorSingleMachining(MachSplit.m_nId, MachSplit.m_nType, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
|
||||||
' Colore delle lavorazioni inglobate
|
' Colore delle lavorazioni inglobate
|
||||||
For Each nId As Integer In MachSplit.m_vOthId
|
For Each nId As Integer In MachSplit.m_vOthId
|
||||||
ColorSingleMachining(nId, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
|
ColorSingleMachining(nId, MachSplit.m_nType, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
|
||||||
Next
|
Next
|
||||||
EgtEnableModified()
|
EgtEnableModified()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
Private Sub ColorSingleMachining(nOperId As Integer, nOperType As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
||||||
' Verifico se è un taglio da sopra o da sotto
|
' Verifico se è un taglio da sopra o da sotto
|
||||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
||||||
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
||||||
|
' Verifico se macchina con cambio utensile per lama
|
||||||
|
Dim bSawTc As Boolean = ( m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW)
|
||||||
' Recupero il preview della lavorazione
|
' Recupero il preview della lavorazione
|
||||||
Dim nPvId As Integer = GDB_ID.NULL
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
@@ -287,20 +289,23 @@ Public Module SplitAuto
|
|||||||
colCut = COL_MCH_ONCUT()
|
colCut = COL_MCH_ONCUT()
|
||||||
ElseIf bDrip Then
|
ElseIf bDrip Then
|
||||||
colCut = COL_MCH_DRIPCUT()
|
colCut = COL_MCH_DRIPCUT()
|
||||||
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
ElseIf nOperType = MCH_OY.WATERJETTING Then
|
||||||
|
If Math.Abs(dSideAng) > EPS_ANG_SMALL then
|
||||||
|
colCut = COL_MCH_WJ_ANG()
|
||||||
|
Else
|
||||||
|
colCut = COL_MCH_WJ()
|
||||||
|
End If
|
||||||
|
ElseIf nOperType = MCH_OY.SAWING AndAlso bSawTc Then
|
||||||
|
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetMachiningAndTool(nOperId, sSawing, sSaw)
|
||||||
|
' Setto l'utensile corrente
|
||||||
|
EgtTdbSetCurrTool(sSaw)
|
||||||
|
' recupero il colore della lavorazione direttamente dall'utensile
|
||||||
|
colCut = Utility.GetColorPV()
|
||||||
|
ElseIf nOperType = MCH_OY.SAWING AndAlso Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
||||||
colCut = COL_MCH_CUT_ANG()
|
colCut = COL_MCH_CUT_ANG()
|
||||||
Else
|
Else
|
||||||
' Se macchina con cambio utensile di lama
|
colCut = COL_MCH_CUT()
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
|
||||||
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
|
|
||||||
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetCurrSawingAndSaw(nOperId, sSawing, sSaw)
|
|
||||||
' Setto l'utensile corrente
|
|
||||||
EgtTdbSetCurrTool(sSaw)
|
|
||||||
' recupero il colore della lavorazione direttamente dall'utensile
|
|
||||||
colCut = Utility.GetColorPV()
|
|
||||||
Else
|
|
||||||
colCut = COL_MCH_CUT()
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each nId In vCutId
|
For Each nId In vCutId
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ Module VacuumCups
|
|||||||
Private m_RawWeight As Double = 0
|
Private m_RawWeight As Double = 0
|
||||||
Private m_MaxWeightSinglePlugger As Double = 250
|
Private m_MaxWeightSinglePlugger As Double = 250
|
||||||
Private m_MaxWeightDoublePlugger As Double = 750
|
Private m_MaxWeightDoublePlugger As Double = 750
|
||||||
Public bOverWeight As Boolean = False
|
Public m_bOverWeight As Boolean = False
|
||||||
' dati per rotazione ventose vicono al fine corsa Y e X
|
' dati per rotazione ventose vicino al fine corsa Y e X
|
||||||
Private bRotateVacuumNearExtraStrokeY As Boolean = False
|
Private m_bRotateVacuumNearExtraStrokeY As Boolean = False
|
||||||
Private bRotateVacuumNearExtraStrokeX As Boolean = False
|
Private m_bRotateVacuumNearExtraStrokeX As Boolean = False
|
||||||
' dati stroke
|
' dati stroke
|
||||||
Public bExtraStroke As Boolean = False
|
Public m_bExtraStroke As Boolean = False
|
||||||
Public ptStartPointLift As Point3d
|
Public m_ptStartPointLift As Point3d
|
||||||
Public dDegRotStartAng As Double
|
Public m_dDegRotStartAng As Double
|
||||||
|
|
||||||
' Nome del gruppo temporaneo per le ventose
|
' Nome del gruppo temporaneo per le ventose
|
||||||
Private Const VACTMP_GRP As String = "VacTmp"
|
Private Const VACTMP_GRP As String = "VacTmp"
|
||||||
@@ -85,12 +85,12 @@ Module VacuumCups
|
|||||||
m_MaxWeightDoublePlugger = MaxDouble
|
m_MaxWeightDoublePlugger = MaxDouble
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
|
Friend Sub SetRotationForExtraStrokeY(bRotate As Boolean)
|
||||||
bRotateVacuumNearExtraStrokeY = Rotate
|
m_bRotateVacuumNearExtraStrokeY = bRotate
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
|
Friend Sub SetRotationForExtraStrokeX(bRotate As Boolean)
|
||||||
bRotateVacuumNearExtraStrokeX = Rotate
|
m_bRotateVacuumNearExtraStrokeX = bRotate
|
||||||
End Sub
|
End Sub
|
||||||
Friend Function GetVacuumId() As Integer
|
Friend Function GetVacuumId() As Integer
|
||||||
Return m_nVacId
|
Return m_nVacId
|
||||||
@@ -328,7 +328,7 @@ Module VacuumCups
|
|||||||
Dim sCups() As String = Nothing
|
Dim sCups() As String = Nothing
|
||||||
Dim sCups2() As String = Nothing
|
Dim sCups2() As String = Nothing
|
||||||
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
||||||
bExtraStroke = False
|
m_bExtraStroke = False
|
||||||
' Determino validità soluzioni della configurazione
|
' Determino validità soluzioni della configurazione
|
||||||
Dim vtMove As New Vector3d
|
Dim vtMove As New Vector3d
|
||||||
Dim ptRotCen As New Point3d
|
Dim ptRotCen As New Point3d
|
||||||
@@ -337,6 +337,8 @@ Module VacuumCups
|
|||||||
Dim ptRotCen2 As New Point3d
|
Dim ptRotCen2 As New Point3d
|
||||||
Dim dRotAngDeg2 As Double = 0
|
Dim dRotAngDeg2 As Double = 0
|
||||||
Dim dDist = TestVacuumCupSelection(sCups, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove, ptRotCen, dRotAngDeg)
|
Dim dDist = TestVacuumCupSelection(sCups, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove, ptRotCen, dRotAngDeg)
|
||||||
|
Dim ptStartPointLift_1 As New Point3d( m_ptStartPointLift)
|
||||||
|
Dim dDegRotStartAng_1 As Double = m_dDegRotStartAng
|
||||||
Dim dDist2 = TestVacuumCupSelection(sCups2, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove2, ptRotCen2, dRotAngDeg2)
|
Dim dDist2 = TestVacuumCupSelection(sCups2, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove2, ptRotCen2, dRotAngDeg2)
|
||||||
If dDist > INFINITO - 1 And dDist2 > INFINITO - 1 Then Continue For
|
If dDist > INFINITO - 1 And dDist2 > INFINITO - 1 Then Continue For
|
||||||
If dDist2 < dDist Then
|
If dDist2 < dDist Then
|
||||||
@@ -344,6 +346,9 @@ Module VacuumCups
|
|||||||
vtMove = vtMove2
|
vtMove = vtMove2
|
||||||
ptRotCen = ptRotCen2
|
ptRotCen = ptRotCen2
|
||||||
dRotAngDeg = dRotAngDeg2
|
dRotAngDeg = dRotAngDeg2
|
||||||
|
Else
|
||||||
|
m_ptStartPointLift = ptStartPointLift_1
|
||||||
|
m_dDegRotStartAng = dDegRotStartAng_1
|
||||||
End If
|
End If
|
||||||
' Eseguo il movimento
|
' Eseguo il movimento
|
||||||
EgtMove(m_nVacId, vtMove, GDB_RT.GLOB)
|
EgtMove(m_nVacId, vtMove, GDB_RT.GLOB)
|
||||||
@@ -433,18 +438,18 @@ Module VacuumCups
|
|||||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||||
'-------------------- INIZIO VERIFICA PESO --------------------
|
'-------------------- INIZIO VERIFICA PESO --------------------
|
||||||
bOverWeight = False
|
m_bOverWeight = False
|
||||||
Select Case GetPluggerFromCameras(sCups)
|
Select Case GetPluggerFromCameras(sCups)
|
||||||
Case 2
|
Case 2
|
||||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||||
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
||||||
bOverWeight = True
|
m_bOverWeight = True
|
||||||
Return INFINITO
|
Return INFINITO
|
||||||
End If
|
End If
|
||||||
Case 1
|
Case 1
|
||||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||||
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
||||||
bOverWeight = True
|
m_bOverWeight = True
|
||||||
Return INFINITO
|
Return INFINITO
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -466,14 +471,14 @@ Module VacuumCups
|
|||||||
Dim dPreferredRot As Double = m_dPreferredRot
|
Dim dPreferredRot As Double = m_dPreferredRot
|
||||||
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||||
' verifico l'orientamento del pezzo
|
' verifico l'orientamento del pezzo
|
||||||
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
If m_bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||||
' se l'orientamento è verticale
|
' se l'orientamento è verticale
|
||||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||||
dPreferredRot = m_dPrefVertRotXMinus
|
dPreferredRot = m_dPrefVertRotXMinus
|
||||||
Else
|
Else
|
||||||
dPreferredRot = m_dPrefVertRotXPlus
|
dPreferredRot = m_dPrefVertRotXPlus
|
||||||
End If
|
End If
|
||||||
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
ElseIf m_bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||||
dPreferredRot = m_dPrefVertRotYPlus
|
dPreferredRot = m_dPrefVertRotYPlus
|
||||||
@@ -541,12 +546,12 @@ Module VacuumCups
|
|||||||
|
|
||||||
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
||||||
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
||||||
bExtraStroke = True
|
m_bExtraStroke = True
|
||||||
Return INFINITO
|
Return INFINITO
|
||||||
End If
|
End If
|
||||||
' se la posizione è accettbaile allora salvo i dati
|
' se la posizione è accettbaile allora salvo i dati
|
||||||
ptStartPointLift = ptRef
|
m_ptStartPointLift = ptRef
|
||||||
dDegRotStartAng = dRotAngDeg
|
m_dDegRotStartAng = dRotAngDeg
|
||||||
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
||||||
|
|
||||||
' Ne calcolo la distanza dal centro della tavola
|
' Ne calcolo la distanza dal centro della tavola
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ Module ConstGen
|
|||||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||||
Public Const INFO_DIRECTCUT As String = "DirectCut"
|
Public Const INFO_DIRECTCUT As String = "DirectCut"
|
||||||
Public Const INFO_STEP_TYPE As String = "StepType"
|
Public Const INFO_STEP_TYPE As String = "StepType"
|
||||||
|
Public Const INFO_ENGR_MILL As String = "EngravingWithMill"
|
||||||
' Info in entità da tagliare per taglio ristretto
|
' Info in entità da tagliare per taglio ristretto
|
||||||
Public Const INFO_STRICT As String = "Strict"
|
Public Const INFO_STRICT As String = "Strict"
|
||||||
' Info in entità da tagliare per angolo di lato e tallone
|
' Info in entità da tagliare per angolo di lato e tallone
|
||||||
@@ -319,12 +320,12 @@ Module ConstGen
|
|||||||
Public Const INFO_PARTROT As String = "ROT"
|
Public Const INFO_PARTROT As String = "ROT"
|
||||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||||
Public Const INFO_JOINENTITY As String = "JoinEntity"
|
Public Const INFO_JOINENTITY As String = "JoinEntity"
|
||||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
' Nome layer per "*" indicanti un lato separato nel taglio WaterJet
|
||||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
Public Const LAY_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
' Info in OutLoop per punto inizio lavorazione WaterJet
|
||||||
Public Const INFO_START As String = "Start"
|
Public Const INFO_START As String = "Start"
|
||||||
' Nome dei tagli diretti inseriti in fase di Splitting
|
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||||
Public Const SPLIT_CUT As String = "SplitCut"
|
Public Const NAME_SPLIT_CUT As String = "SplitCut"
|
||||||
' Forzo specifica lavorazione
|
' Forzo specifica lavorazione
|
||||||
Public Const DEF_MACHINING As String = "Def_Machining"
|
Public Const DEF_MACHINING As String = "Def_Machining"
|
||||||
' Forzo specifica lavorazione solo per tagli con inclinazione
|
' Forzo specifica lavorazione solo per tagli con inclinazione
|
||||||
@@ -365,6 +366,16 @@ Module ConstGen
|
|||||||
Public Const BRIDGES As String = "Bridges"
|
Public Const BRIDGES As String = "Bridges"
|
||||||
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
|
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
|
||||||
Public Const BRIDGELINE As String = "BridgeLine"
|
Public Const BRIDGELINE As String = "BridgeLine"
|
||||||
|
' Info dell'Id pezzo di partenza del ponticello
|
||||||
|
Public Const INFO_BRIDGE_PARTSTART As String = "PartStart"
|
||||||
|
' Info dell'Id entita' di partenza del ponticello
|
||||||
|
Public Const INFO_BRIDGE_ENTSTART As String = "EntStart"
|
||||||
|
' Info dell'Id pezzo di arrivo del ponticello
|
||||||
|
Public Const INFO_BRIDGE_PARTEND As String = "PartEnd"
|
||||||
|
' Info dell'Id entita' di arrivo del ponticello
|
||||||
|
Public Const INFO_BRIDGE_ENTEND As String = "EntEnd"
|
||||||
|
' Info con la fase di appartenenza del ponticello
|
||||||
|
Public Const INFO_BRIDGE_PHASE As String = "Ph"
|
||||||
|
|
||||||
' utensile per le lavorazioni manuali
|
' utensile per le lavorazioni manuali
|
||||||
Public Const DUMMY_SAW As String = "DummySAW"
|
Public Const DUMMY_SAW As String = "DummySAW"
|
||||||
@@ -406,6 +417,12 @@ Module ConstGen
|
|||||||
Public Function COL_MCH_ONFREE() As Color3d
|
Public Function COL_MCH_ONFREE() As Color3d
|
||||||
Return New Color3d(192, 128, 0)
|
Return New Color3d(192, 128, 0)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function COL_MCH_WJ() As Color3d
|
||||||
|
Return New Color3d(0, 128, 128)
|
||||||
|
End Function
|
||||||
|
Public Function COL_MCH_WJ_ANG() As Color3d
|
||||||
|
Return New Color3d(255, 0, 255)
|
||||||
|
End Function
|
||||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||||
Return New Color3d(255, 0, 165)
|
Return New Color3d(255, 0, 165)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Module ConstIni
|
|||||||
Public Const K_IMAGEDIR As String = "ImageDir"
|
Public Const K_IMAGEDIR As String = "ImageDir"
|
||||||
Public Const K_CAMERALINK As String = "CameraLink"
|
Public Const K_CAMERALINK As String = "CameraLink"
|
||||||
Public Const K_CNLINK As String = "CNLink"
|
Public Const K_CNLINK As String = "CNLink"
|
||||||
|
Public Const K_STEPBYSTEPSEND As String = "StepByStepSend"
|
||||||
Public Const K_TESTINGPAGE As String = "TestingPage"
|
Public Const K_TESTINGPAGE As String = "TestingPage"
|
||||||
Public Const K_SHOWTIPAXES As String = "ShowTipAxes"
|
Public Const K_SHOWTIPAXES As String = "ShowTipAxes"
|
||||||
Public Const K_LASTPROJFINISHED As String = "LastProjFinished"
|
Public Const K_LASTPROJFINISHED As String = "LastProjFinished"
|
||||||
@@ -48,6 +49,7 @@ Module ConstIni
|
|||||||
Public Const K_THEME As String = "Theme"
|
Public Const K_THEME As String = "Theme"
|
||||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||||
Public Const K_TEST As String = "Test"
|
Public Const K_TEST As String = "Test"
|
||||||
|
Public Const K_ADD_TAB_BY_PROJ As String = "AdditionalTableByProj"
|
||||||
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||||
Public Const K_STARTPROGRAM As String = "StartProgram"
|
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||||
Public Const K_GENERATECN As String = "GenerateCN"
|
Public Const K_GENERATECN As String = "GenerateCN"
|
||||||
@@ -165,7 +167,7 @@ Module ConstIni
|
|||||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||||
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
|
Public Const K_DRAG_RECTANGLE As String = "DragRectangle"
|
||||||
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||||
|
|
||||||
Public Const S_SPLIT As String = "Split"
|
Public Const S_SPLIT As String = "Split"
|
||||||
@@ -240,7 +242,6 @@ Module ConstIni
|
|||||||
Public Const K_REFTAB As String = "RefTab"
|
Public Const K_REFTAB As String = "RefTab"
|
||||||
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
||||||
|
|
||||||
|
|
||||||
Public Const S_RAWMOVE As String = "RawMove"
|
Public Const S_RAWMOVE As String = "RawMove"
|
||||||
Public Const K_RAWSTEP As String = "Step"
|
Public Const K_RAWSTEP As String = "Step"
|
||||||
Public Const K_EXTRASTEP As String = "ExtraStep"
|
Public Const K_EXTRASTEP As String = "ExtraStep"
|
||||||
@@ -261,17 +262,11 @@ Module ConstIni
|
|||||||
Public Const K_REGANGSTEP As String = "AngStep"
|
Public Const K_REGANGSTEP As String = "AngStep"
|
||||||
|
|
||||||
Public Const S_CAMERA As String = "Camera"
|
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_EXEPATH As String = "ExePath"
|
||||||
Public Const K_CAM_IMAGE As String = "Image"
|
Public Const K_CAM_IMAGE As String = "Image"
|
||||||
Public Const K_CAM_INFO As String = "Info"
|
Public Const K_CAM_INFO As String = "Info"
|
||||||
Public Const K_CAM_RESULT As String = "Result"
|
Public Const K_CAM_RESULT As String = "Result"
|
||||||
Public Const K_CAM_CONTOUR As String = "Contour"
|
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_THRESHOLD As String = "Threshold"
|
||||||
Public Const K_CAM_TOLERANCE As String = "Tolerance"
|
Public Const K_CAM_TOLERANCE As String = "Tolerance"
|
||||||
Public Const K_CAM_TIMEOUT As String = "Timeout"
|
Public Const K_CAM_TIMEOUT As String = "Timeout"
|
||||||
@@ -285,7 +280,6 @@ Module ConstIni
|
|||||||
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||||
Public Const K_CURRMACH As String = "CurrMach"
|
Public Const K_CURRMACH As String = "CurrMach"
|
||||||
Public Const K_ENABLEFINALSAWCUT As String = "EnableFinalSawCut"
|
Public Const K_ENABLEFINALSAWCUT As String = "EnableFinalSawCut"
|
||||||
Public Const K_FINALDEPTH As String = "FinalDepth"
|
|
||||||
|
|
||||||
Public Const S_SIMUL As String = "Simul"
|
Public Const S_SIMUL As String = "Simul"
|
||||||
Public Const K_SLIDERX As String = "SliderX"
|
Public Const K_SLIDERX As String = "SliderX"
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
Public Const S_NUMERICALCONTROL As String = "NumericalControl"
|
Public Const S_NUMERICALCONTROL As String = "NumericalControl"
|
||||||
Public Const K_TYPE As String = "Type"
|
Public Const K_TYPE As String = "Type"
|
||||||
|
Public Const K_SPECIALSEND As String = "SpecialSend"
|
||||||
|
Public Const K_SPECIALAREAS As String = "SpecialAreas"
|
||||||
|
Public Const K_SPECIALDEST As String = "SpecialDest"
|
||||||
|
Public Const K_SPECIALEXEC As String = "SpecialExec"
|
||||||
|
|
||||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||||
Public Const K_EXTENSION As String = "Extension"
|
Public Const K_EXTENSION As String = "Extension"
|
||||||
@@ -187,6 +191,10 @@
|
|||||||
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
|
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
|
||||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||||
|
Public Const K_ALLTABORIGTAB1 As String = "AllTabOrigTab1"
|
||||||
|
Public Const K_TABX As String = "TabX"
|
||||||
|
Public Const K_TABY As String = "TabY"
|
||||||
|
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||||
|
|
||||||
Public Const S_PHOTO As String = "Photo"
|
Public Const S_PHOTO As String = "Photo"
|
||||||
Public Const K_PHOTO_CAMERACOUNTER As String = "CameraCounter"
|
Public Const K_PHOTO_CAMERACOUNTER As String = "CameraCounter"
|
||||||
@@ -202,7 +210,7 @@
|
|||||||
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||||
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
|
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
|
||||||
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
|
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
|
||||||
Public Const K_ENABELE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
|
Public Const K_ENABLE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
|
||||||
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
|
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
|
||||||
|
|
||||||
Public Const S_TOOLS As String = "Tools"
|
Public Const S_TOOLS As String = "Tools"
|
||||||
@@ -253,9 +261,11 @@
|
|||||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||||
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
||||||
Public Const K_MACH_STARTCENERTOOLPATH As String = "StartCenterToolPath"
|
Public Const K_MACH_STARTCENTERTOOLPATH As String = "StartCenterToolPath"
|
||||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||||
|
Public Const K_MACH_WATERJET_OPTIMIZE As String = "WjOptimize"
|
||||||
|
Public Const K_MACH_WATERJET_ON_SINKS As String = "WjOnSinks"
|
||||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||||
Public Const K_MACH_NEST_GHIGLIOTTINA As String = "Guillotine"
|
Public Const K_MACH_NEST_GHIGLIOTTINA As String = "Guillotine"
|
||||||
Public Const K_MACH_WASHING As String = "Washing"
|
Public Const K_MACH_WASHING As String = "Washing"
|
||||||
@@ -265,17 +275,8 @@
|
|||||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
|
||||||
Public Const K_HOLES_DIAMITERWJ As String = "HolesDiameterWJ"
|
|
||||||
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
|
||||||
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
|
||||||
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
|
||||||
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
|
||||||
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||||
' CutLongDxSx
|
Public Const K_USEBAXISLOCK As String = "UseBAxisLock"
|
||||||
' AngRotMultiCut
|
|
||||||
' MinDistHeadsMultiCut
|
|
||||||
' MinSawRbHeight
|
|
||||||
|
|
||||||
Public Const S_MACH_FRAME As String = "Frame"
|
Public Const S_MACH_FRAME As String = "Frame"
|
||||||
Public Const K_MACH_PAUSE As String = "Pause"
|
Public Const K_MACH_PAUSE As String = "Pause"
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ Public Class ControlsDirectCutUC
|
|||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
|
|
||||||
Friend m_SingleCutAuto As SingleCutAuto
|
|
||||||
' ---- MAI USATA ----
|
|
||||||
Friend m_MachineButtons As MachineButtonsUC
|
Friend m_MachineButtons As MachineButtonsUC
|
||||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||||
|
Friend m_SingleCutAuto As SingleCutAuto
|
||||||
Friend m_SingleCut As SingleCutUC
|
Friend m_SingleCut As SingleCutUC
|
||||||
Friend m_SingleDrill As SingleDrillUC
|
Friend m_SingleDrill As SingleDrillUC
|
||||||
Friend m_MultipleCut As MultipleCut
|
Friend m_MultipleCut As MultipleCut
|
||||||
@@ -36,7 +34,7 @@ Public Class ControlsDirectCutUC
|
|||||||
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||||
Friend m_NewMachineButtonsType As Boolean
|
Friend m_NewMachineButtonsType As Boolean
|
||||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||||
Friend m_bManulaCut As Boolean = False
|
Friend m_bManualCut As Boolean = False
|
||||||
|
|
||||||
' elenco dei nuovi bottoni
|
' elenco dei nuovi bottoni
|
||||||
Private m_ButtonJogList As New List(Of MachineButton)
|
Private m_ButtonJogList As New List(Of MachineButton)
|
||||||
@@ -60,13 +58,15 @@ Public Class ControlsDirectCutUC
|
|||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
|
||||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
|
||||||
|
|
||||||
'Creazione delle Page UserControl
|
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||||
|
m_bManualCut = ( GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
|
||||||
|
' Creazione delle Page UserControl
|
||||||
m_MachineButtons = New MachineButtonsUC
|
m_MachineButtons = New MachineButtonsUC
|
||||||
m_ManualAxesMove = New ManualAxesMoveUC
|
m_ManualAxesMove = New ManualAxesMoveUC
|
||||||
m_SingleCut = New SingleCutUC
|
m_SingleCut = New SingleCutUC
|
||||||
|
m_SingleCutAuto = New SingleCutAuto
|
||||||
m_SingleDrill = New SingleDrillUC
|
m_SingleDrill = New SingleDrillUC
|
||||||
m_MultipleCut = New MultipleCut
|
m_MultipleCut = New MultipleCut
|
||||||
m_GridCut = New GridCut
|
m_GridCut = New GridCut
|
||||||
@@ -74,17 +74,14 @@ Public Class ControlsDirectCutUC
|
|||||||
m_Squaring = New SquaringUC
|
m_Squaring = New SquaringUC
|
||||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||||
' reiferimento alla pagina succesiva
|
' Riferimento alla pagina succesiva
|
||||||
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
||||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
|
||||||
m_SingleCutAuto = New SingleCutAuto
|
|
||||||
|
|
||||||
|
' Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||||
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
|
||||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||||
If m_bManulaCut Then
|
If m_bManualCut Then
|
||||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||||
Else
|
Else
|
||||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||||
@@ -97,22 +94,14 @@ Public Class ControlsDirectCutUC
|
|||||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
' ManualBtn.Content = EgtMsg(90201)
|
|
||||||
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
||||||
'SingleCutBtn.Content = EgtMsg(90202)
|
|
||||||
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
||||||
'SingleDrillBtn.Content = "Foro singolo"
|
|
||||||
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
||||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
|
||||||
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
||||||
'GridCutBtn.Content = EgtMsg(90204)
|
|
||||||
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
||||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
|
||||||
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
||||||
' 90261=Squaring
|
SquaringTxt.Text = EgtMsg(90261) ' Squadratura
|
||||||
SquaringTxt.Text = EgtMsg(90261)
|
ChangeUCTxBl.Text = EgtMsg(90409) ' Altri
|
||||||
' 90409=Others
|
|
||||||
ChangeUCTxBl.Text = EgtMsg(90409)
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -149,11 +138,11 @@ Public Class ControlsDirectCutUC
|
|||||||
|
|
||||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
Dim bH1Exists As Boolean = m_MainWindow.m_CurrentMachine.ExistsSawHead()
|
||||||
|
|
||||||
ManualBtn.IsEnabled = bH1Exists
|
ManualBtn.IsEnabled = bH1Exists
|
||||||
' sviluppo rimasto in sospeso
|
' sviluppo rimasto in sospeso
|
||||||
If m_bManulaCut Then
|
If m_bManualCut Then
|
||||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||||
SingleCutBtn.IsEnabled = True
|
SingleCutBtn.IsEnabled = True
|
||||||
Else
|
Else
|
||||||
@@ -200,7 +189,7 @@ Public Class ControlsDirectCutUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||||
If m_bManulaCut Then
|
If m_bManualCut Then
|
||||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ Public Class ControlsDirectCutUC1
|
|||||||
' Caso standard
|
' Caso standard
|
||||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||||
|
|
||||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa per lama (H1)
|
||||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
Dim bSawHeadOk As Boolean = m_MainWindow.m_CurrentMachine.ExistsSawHead()
|
||||||
|
|
||||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
SawTestBtn.IsEnabled = (bRawOk And bSawHeadOk)
|
||||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
CopyTemplateBtn.IsEnabled = bSawHeadOk
|
||||||
|
|
||||||
' aggiorno la visualizzazione dei parametri
|
' aggiorno la visualizzazione dei parametri
|
||||||
ReloadParam()
|
ReloadParam()
|
||||||
|
|||||||
@@ -551,256 +551,6 @@ Public MustInherit Class MachineButton
|
|||||||
m_StateFlag = StateFlag
|
m_StateFlag = StateFlag
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Friend Sub ExecuteMDICommand(sLuaFileName As String)
|
|
||||||
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
|
|
||||||
Dim CmdString As String = String.Empty
|
|
||||||
Dim b2Start As Boolean = False
|
|
||||||
Dim EActive As Boolean = False
|
|
||||||
Dim ENumber As String = String.Empty
|
|
||||||
Dim EValue As String = String.Empty
|
|
||||||
Dim EType As String = 0
|
|
||||||
Dim ENumber2 As String = String.Empty
|
|
||||||
Dim EValue2 As String = String.Empty
|
|
||||||
Dim EType2 As String = 0
|
|
||||||
' eseguo la lettura del file .lua associato al comando
|
|
||||||
ExecuteDirectCmdLua(sLuaFileName, CmdString, b2Start, EActive, ENumber, EValue, EType, ENumber2, EValue2, EType2)
|
|
||||||
'--------------------------------------------------------- PLC ---------------------------------------------------------
|
|
||||||
If EActive Then
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2
|
|
||||||
' se scrittura delle varibili PLC
|
|
||||||
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
|
||||||
' solo per Flexium
|
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
|
||||||
If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
|
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
|
||||||
End If
|
|
||||||
' altrimenti scrittura delle variabili E
|
|
||||||
Else
|
|
||||||
m_CN.DVariables_WriteVariables2(ENumber, EValue)
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
Case 3
|
|
||||||
' scrivo prima variabile
|
|
||||||
Select Case CShort(EType)
|
|
||||||
Case 1
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), CInt(EValue), 0, 0, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CInt(EValue))
|
|
||||||
Case 2
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, CLng(EValue), 0, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CLng(EValue))
|
|
||||||
Case 3
|
|
||||||
Dim d As Double = 0
|
|
||||||
StringToDouble(EValue, d)
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, d, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & d)
|
|
||||||
Case 4
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, 0, EValue)
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & EValue)
|
|
||||||
End Select
|
|
||||||
EgtOutLog("dopo scrittura prima variabile")
|
|
||||||
If Not IsNothing(EType2) AndAlso CShort(EType) > 0 Then
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
' scrivo seconda variabile
|
|
||||||
Select Case CShort(EType2)
|
|
||||||
Case 1
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), CInt(EValue2), 0, 0, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CInt(EValue2))
|
|
||||||
Case 2
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, CLng(EValue2), 0, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CLng(EValue2))
|
|
||||||
Case 3
|
|
||||||
Dim d As Double = 0
|
|
||||||
StringToDouble(EValue2, d)
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, d, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & d)
|
|
||||||
Case 4
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, 0, EValue2)
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & EValue2)
|
|
||||||
End Select
|
|
||||||
EgtOutLog("dopo scrittura seconda variabile")
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
Case 4
|
|
||||||
' ------------------------------------ FANUC ------------------------------------
|
|
||||||
' eventuale scrittura di linea di comando MDI
|
|
||||||
If Not String.IsNullOrEmpty(CmdString) Then
|
|
||||||
' attivo mpdalità MDI
|
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
' salvo la stringa di comando ricevuta dal file lua
|
|
||||||
m_CN.sz_ManualDataInput = CmdString
|
|
||||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
|
||||||
m_CN.MDI_command()
|
|
||||||
End If
|
|
||||||
' attivo modalità AUTO
|
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
If String.IsNullOrEmpty(EValue) Then
|
|
||||||
' EActive: impulsivo "D#####"
|
|
||||||
m_CN.NC_pulse_bit(ENumber)
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
|
||||||
Else
|
|
||||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
|
||||||
If ENumber.Contains(".") Then
|
|
||||||
' D#####.#
|
|
||||||
Dim bEValue As Boolean
|
|
||||||
If EValue.Trim = "1" Then bEValue = True
|
|
||||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
|
||||||
Else
|
|
||||||
' D#####
|
|
||||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
|
||||||
End If
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
|
||||||
End If
|
|
||||||
' eventale caricamento seconda variabile
|
|
||||||
If String.IsNullOrEmpty(EValue2) Then
|
|
||||||
' EActive: impulsivo "D#####"
|
|
||||||
m_CN.NC_pulse_bit(ENumber2)
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
|
||||||
Else
|
|
||||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
|
||||||
If ENumber2.Contains(".") Then
|
|
||||||
' D#####.#
|
|
||||||
Dim bEValue2 As Boolean
|
|
||||||
If EValue2.Trim = "1" Then bEValue2 = True
|
|
||||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
|
||||||
Else
|
|
||||||
' D#####
|
|
||||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
|
||||||
End If
|
|
||||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
|
||||||
Dim nResult As Short
|
|
||||||
' assegno la modalità di funzionamento
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2, 4
|
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
|
||||||
Case 3
|
|
||||||
'Per il siemens non devo fare nulla
|
|
||||||
End Select
|
|
||||||
' salvo la stringa di comando ricevuta dal file lua
|
|
||||||
m_CN.sz_ManualDataInput = CmdString
|
|
||||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
|
||||||
m_CN.MDI_command()
|
|
||||||
' avvio l'esecuzione del comando
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2
|
|
||||||
System.Threading.Thread.Sleep(500)
|
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
|
||||||
Case 3
|
|
||||||
'Per il siemens non devo fare nulla
|
|
||||||
End Select
|
|
||||||
' se richiesto ripeto l'operazione
|
|
||||||
If b2Start Then
|
|
||||||
EgtOutLog("Avvio secondo cliclo start")
|
|
||||||
System.Threading.Thread.Sleep(800)
|
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
|
||||||
End If
|
|
||||||
System.Threading.Thread.Sleep(300)
|
|
||||||
' ripristino la modalità manuale..?? siucuri ??
|
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' lettura delle variavili scritte nel file Lua
|
|
||||||
Friend Sub ExecuteDirectCmdLua(LuaFileName As String, ByRef CmdString As String, ByRef b2Start As Boolean, ByRef EActive As Boolean, ByRef ENumber As String, ByRef EValue As String, ByRef EType As String, ByRef ENumber2 As String, ByRef EValue2 As String, ByRef EType2 As String)
|
|
||||||
Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
|
||||||
If EgtLuaExecFile(sBaseDir & LuaFileName) Then
|
|
||||||
EgtOutLog("Lua " & sBaseDir & LuaFileName & " eseguito")
|
|
||||||
Else
|
|
||||||
EgtOutLog("Lua " & sBaseDir & LuaFileName & " non eseguito")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dFeed As Double = 0
|
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text) Then
|
|
||||||
StringToLen(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text, dFeed)
|
|
||||||
Else
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
|
||||||
End If
|
|
||||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
|
||||||
|
|
||||||
Dim dSpeed As Double = 0
|
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
|
||||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
|
||||||
Else
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
|
||||||
End If
|
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
|
||||||
|
|
||||||
' versione 2.5e1
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
Dim sToolPos As String = String.Empty
|
|
||||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
|
||||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
|
||||||
End If
|
|
||||||
Dim dToolDiam As Double = 0
|
|
||||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
|
||||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L2", dL2)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L3", dL3)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
|
||||||
|
|
||||||
' versione 2.6h1
|
|
||||||
Dim sCurrTable As String = String.Empty
|
|
||||||
Dim nCuttTable As Integer = 1
|
|
||||||
EgtGetTableName(sCurrTable)
|
|
||||||
If sCurrTable <> "MainTab" Then nCuttTable = 2
|
|
||||||
EgtLuaSetGlobIntVar("CMD.TABLE", nCuttTable)
|
|
||||||
|
|
||||||
EgtLuaCallFunction("CmdString")
|
|
||||||
|
|
||||||
' Leggo variabili da file Lua
|
|
||||||
CmdString = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
|
||||||
b2Start = False
|
|
||||||
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
|
|
||||||
EActive = False
|
|
||||||
EgtLuaGetGlobBoolVar("CMD.EACTIVE", EActive)
|
|
||||||
ENumber = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ENUMBER", ENumber)
|
|
||||||
EValue = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.EVALUE", EValue)
|
|
||||||
EType = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ETYPE", EType)
|
|
||||||
EgtOutLog("ENUMBER: " & ENumber & " EVALUE: " & EValue & " ETYPE: " & EType)
|
|
||||||
ENumber2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ENUMBER2", ENumber2)
|
|
||||||
EValue2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.EVALUE2", EValue2)
|
|
||||||
EType2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ETYPE2", EType2)
|
|
||||||
EgtOutLog("ENUMBER2: " & ENumber2 & " EVALUE2: " & EValue2 & " ETYPE2: " & EType2)
|
|
||||||
' Reset lua
|
|
||||||
EgtLuaResetGlobVar("CmdString")
|
|
||||||
EgtLuaResetGlobVar("CMD")
|
|
||||||
' Log del comando
|
|
||||||
EgtOutLog("CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
|
|
||||||
" b2Start=" & b2Start.ToString() &
|
|
||||||
" EActive=" & EActive.ToString &
|
|
||||||
" ENumber=" & If(Not String.IsNullOrEmpty(ENumber), ENumber, "") &
|
|
||||||
" EValue=" & If(Not String.IsNullOrEmpty(EValue), EValue, "") &
|
|
||||||
" EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") &
|
|
||||||
" ENumber2=" & If(Not String.IsNullOrEmpty(ENumber2), ENumber2, "") &
|
|
||||||
" EValue2=" & If(Not String.IsNullOrEmpty(EValue2), EValue2, "") &
|
|
||||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
||||||
|
|
||||||
@@ -831,8 +581,7 @@ Public Class TwoStateButton
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim IsPressedShiftKey As Boolean = False
|
Dim IsPressedShiftKey As Boolean = False
|
||||||
If Keyboard.Modifiers And ModifierKeys.Shift And
|
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 AndAlso m_MainWindow.GetDebug() > 4 Then IsPressedShiftKey = True
|
||||||
GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_MainWindow.GetIniFile()) > 4 Then IsPressedShiftKey = True
|
|
||||||
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
|
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
|
||||||
If IsPressedShiftKey Then
|
If IsPressedShiftKey Then
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ Module DirectCut
|
|||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
' Polishing attivo
|
||||||
|
Friend m_bPolishingOn As Boolean = False
|
||||||
|
|
||||||
Friend Function CreateDirectCutPart() As Integer
|
Friend Function CreateDirectCutPart() As Integer
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||||
@@ -27,4 +30,8 @@ Module DirectCut
|
|||||||
Return EgtGetFirstNameInGroup(m_MainWindow.m_CurrentProjectPageUC.m_nRawId, NAME_DIRECTCUT)
|
Return EgtGetFirstNameInGroup(m_MainWindow.m_CurrentProjectPageUC.m_nRawId, NAME_DIRECTCUT)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function IsDirectCutOn() As Boolean
|
||||||
|
Return ( GetDirectCutPart() <> GDB_ID.NULL OrElse m_bPolishingOn)
|
||||||
|
End Function
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ Public Class DirectCutPageUC
|
|||||||
Next
|
Next
|
||||||
If IsNothing(XYJogButton) Then Return
|
If IsNothing(XYJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
||||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ Public Class DirectCutPageUC
|
|||||||
Next
|
Next
|
||||||
If IsNothing(ZJogButton) Then Return
|
If IsNothing(ZJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ZCJogChanged(bZAxes As Boolean)
|
Friend Sub ZCJogChanged(bZAxes As Boolean)
|
||||||
@@ -329,7 +329,7 @@ Public Class DirectCutPageUC
|
|||||||
Next
|
Next
|
||||||
If IsNothing(ZBJogButton) Then Return
|
If IsNothing(ZBJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
||||||
@@ -366,7 +366,7 @@ Public Class DirectCutPageUC
|
|||||||
Else
|
Else
|
||||||
sLuaFileName = RemoteButton.FLuaScriptName
|
sLuaFileName = RemoteButton.FLuaScriptName
|
||||||
End If
|
End If
|
||||||
RemoteButton.ExecuteMDICommand(sLuaFileName)
|
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub RemoteChanged(bRemote As Boolean)
|
Friend Sub RemoteChanged(bRemote As Boolean)
|
||||||
@@ -403,7 +403,7 @@ Public Class DirectCutPageUC
|
|||||||
Else
|
Else
|
||||||
sLuaFileName = ParkingButton.FLuaScriptName
|
sLuaFileName = ParkingButton.FLuaScriptName
|
||||||
End If
|
End If
|
||||||
ParkingButton.ExecuteMDICommand(sLuaFileName)
|
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ParkingStateChanged(bParkingState As Boolean)
|
Friend Sub ParkingStateChanged(bParkingState As Boolean)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ Public Class FlatteningCut
|
|||||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
' tipo di utensile in uso per la lavorazione
|
' tipo di utensile in uso per la lavorazione
|
||||||
m_ToolsArray(TOOL.SAW) = EgtMsg(90224) ' Lama
|
m_ToolsArray(TOOL.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) ' Mill
|
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) ' Fresa
|
||||||
SelToolCmBx.ItemsSource = m_ToolsArray
|
SelToolCmBx.ItemsSource = m_ToolsArray
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
@@ -186,7 +186,7 @@ Public Class FlatteningCut
|
|||||||
TypeCmBx.SelectedIndex = m_nMachType
|
TypeCmBx.SelectedIndex = m_nMachType
|
||||||
RotLockChBx.IsChecked = m_bRotLock
|
RotLockChBx.IsChecked = m_bRotLock
|
||||||
ChainedPathChBx.IsChecked = m_bChainedPath
|
ChainedPathChBx.IsChecked = m_bChainedPath
|
||||||
' Assegno l'utensile in definito in macchina per la fresatura
|
' Assegno l'utensile definito in macchina per la fresatura
|
||||||
SelToolCmBx.SelectedIndex = m_nTool
|
SelToolCmBx.SelectedIndex = m_nTool
|
||||||
' Reset taglio e disabilito bottone esecuzione
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
@@ -339,7 +339,7 @@ Public Class FlatteningCut
|
|||||||
m_dAngO = dTAngO + 90
|
m_dAngO = dTAngO + 90
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
@@ -493,11 +493,9 @@ Public Class FlatteningCut
|
|||||||
' Recupero il valore di larghezza impostato
|
' Recupero il valore di larghezza impostato
|
||||||
Dim dWidth As Double = 0
|
Dim dWidth As Double = 0
|
||||||
StringToLen(WidthTxBx.Text, dWidth)
|
StringToLen(WidthTxBx.Text, dWidth)
|
||||||
' Recupero lo spessore della lama corrente
|
' Recupero l'impronta dell'utensile corrente
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
Dim dThick As Double = GetToolFootprint()
|
||||||
Dim dThick As Double = GetFootPrintTool()
|
' La larghezza della spianatura non può essere inferiore all'impronta dell'utensile (spessore per lama, diametro per fresa)
|
||||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
|
||||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
|
||||||
m_dWid = Math.Max(dWidth, dThick)
|
m_dWid = Math.Max(dWidth, dThick)
|
||||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -523,8 +521,7 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
||||||
' Recupero spessore della lama correntemente attiva
|
' Recupero spessore della lama correntemente attiva
|
||||||
Dim dThick As Double = GetFootPrintTool()
|
Dim dThick As Double = GetToolFootprint()
|
||||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
|
||||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||||
Dim dOverlap As Double = 0
|
Dim dOverlap As Double = 0
|
||||||
Const MIN_OFFSET As Double = 1.0
|
Const MIN_OFFSET As Double = 1.0
|
||||||
@@ -684,23 +681,26 @@ Public Class FlatteningCut
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
' ricavo impronta di lavorazione (in larghezza) in funzione dell'utensile selezionato
|
||||||
Private Function GetFootPrintTool() As Double
|
Private Function GetToolFootprint() As Double
|
||||||
' vedere nella pagina Allarm il capito "Incisioni"
|
|
||||||
Dim bForceUseMill As Boolean = (m_nTool = TOOL.MILL)
|
|
||||||
Dim dFootPrint As Double = 0
|
Dim dFootPrint As Double = 0
|
||||||
' verifico quale lavorazione è attiva
|
' se richiesta lama
|
||||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
If m_nTool <> TOOL.MILL Then
|
||||||
Dim bSetTool As Boolean = EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) Then
|
||||||
If Not bSetTool Then EgtOutLog("Erro nel settaggio utensile lama " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
Else
|
||||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
EgtOutLog("In ToolDB missing saw " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
|
End If
|
||||||
|
' altrimenti è richiesta fresa
|
||||||
|
Else
|
||||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
If String.IsNullOrWhiteSpace( sCurrMill) Then sCurrMill = GetMillFromMilling(m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||||
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
|
||||||
' recupero informazioni della fresa in uso
|
' recupero informazioni della fresa in uso
|
||||||
EgtTdbSetCurrTool(sCurrMill)
|
If EgtTdbSetCurrTool(sCurrMill) Then
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||||
|
Else
|
||||||
|
EgtOutLog("In ToolDB missing mill " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Return dFootPrint
|
Return dFootPrint
|
||||||
End Function
|
End Function
|
||||||
@@ -718,35 +718,39 @@ Public Class FlatteningCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nLayerId, NAME_OUTLOOP)
|
|
||||||
EgtSetName(nLayerId, NAME_ONPATH)
|
EgtSetName(nLayerId, NAME_ONPATH)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId As Integer = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
' Inidico che è un taglio Diretto di tipo Flattening
|
' Indico che è un taglio Diretto di tipo Flattening
|
||||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
||||||
|
EgtSetInfo(nCutId, INFO_ENGR_MILL, m_nTool)
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
If (m_nTool = TOOL.MILL) Then
|
Dim dThick As Double = GetToolFootprint()
|
||||||
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
||||||
End If
|
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||||
' Imposto prima direzione
|
' Imposto prima direzione
|
||||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||||
' Imposto se iniziare la fresatura dal punto indicato
|
' Eventuale riduzione lavorazione
|
||||||
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
Dim bReducePath As Boolean = ( GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENTERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) = 0)
|
||||||
If Not bReducePath Then EgtSetInfo(nCutId, INFO_STRICT, 0)
|
' Per fresatura eventuale riduzione della geometria
|
||||||
|
If m_nTool = TOOL.MILL Then
|
||||||
|
If bReducePath Then ExtendLenghtMillPath(nCutId, -dThick / 2)
|
||||||
|
EgtSetInfo(nCutId, INFO_STRICT, 0)
|
||||||
|
' per tagli con lama eventuale riduzione della lavorazione
|
||||||
|
Else
|
||||||
|
EgtSetInfo(nCutId, INFO_STRICT, If( bReducePath, 3, 0))
|
||||||
|
End If
|
||||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||||
If RotLockChBx.IsChecked Then
|
If RotLockChBx.IsChecked Then
|
||||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||||
End If
|
End If
|
||||||
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
||||||
' Funzione che crea i tagli successivi al primo
|
' Funzione che crea eventuali tagli successivi al primo
|
||||||
MultiplyCut(nLayerId, nCutId)
|
MultiplyCut(nLayerId, nCutId)
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||||
@@ -778,131 +782,78 @@ Public Class FlatteningCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||||
Dim bEngWithMill As Boolean = (m_nTool = TOOL.MILL)
|
|
||||||
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
|
||||||
|
|
||||||
' Recupero spessore della lama (utensile) correntemente attiva
|
' Recupero impronta della lama o fresa utilizzata
|
||||||
Dim dThick As Double = GetFootPrintTool()
|
Dim dThick As Double = GetToolFootprint()
|
||||||
If dThick = 0 Then Return False
|
If dThick = 0 Then Return False
|
||||||
|
|
||||||
' Salvo la prima curva nella lista dei percorsi da concatenare
|
' Salvo la curva originale nella lista dei percorsi da concatenare
|
||||||
Dim CutsList As New List(Of Integer)
|
Dim CutsList As New List(Of Integer)
|
||||||
CutsList.Add(nCutId)
|
CutsList.Add(nCutId)
|
||||||
|
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||||
' Definisco vettore di spostamento
|
|
||||||
Dim vtDelta As Vector3d
|
|
||||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
|
||||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
|
||||||
|
|
||||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
' Calcolo numero di passate necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||||
Dim nStepNum As Integer
|
Dim dDelta As Double = dThick - m_dOverlap
|
||||||
Dim dDelta As Double
|
Dim dWidth As Double = m_dWid - dThick
|
||||||
Dim dWidth As Double = m_dWid
|
Dim nStepNum As Integer = CInt(Math.Ceiling(dWidth / dDelta)) + 1
|
||||||
dDelta = dThick - m_dOverlap
|
If nStepNum > 1 Then dDelta = dWidth / (nStepNum - 1)
|
||||||
dWidth -= dThick
|
' Definisco vettore di spostamento
|
||||||
nStepNum = CInt(Math.Ceiling(dWidth / dDelta)) + 1
|
Dim vtDelta As Vector3d = Vector3d.FromPolar(dDelta, m_dAngO)
|
||||||
If nStepNum > 1 Then
|
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||||
dDelta = dWidth / (nStepNum - 1)
|
' Creo le ripetizioni
|
||||||
End If
|
|
||||||
' definisco la larghezza dell'utensile (solo per la fresa)
|
|
||||||
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
|
||||||
' definisco il tipo di utensile da utilizzare
|
|
||||||
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
|
||||||
' Creo vettore delta
|
|
||||||
vtDelta *= dDelta
|
|
||||||
' Creo indice per impostare info che indica tipologia di spianatura
|
|
||||||
Dim nTypeIndex As Integer = 1
|
|
||||||
For Index As Integer = 1 To nStepNum - 1
|
For Index As Integer = 1 To nStepNum - 1
|
||||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||||
' Creo copie
|
' Creo copie
|
||||||
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
||||||
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
|
||||||
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
|
||||||
' Assegno info direzione a seconda del tipo di spianatura
|
|
||||||
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
|
||||||
If nTypeIndex = 1 Then
|
|
||||||
EgtSetInfo(nCut2Id, INFO_DIR, 2)
|
|
||||||
nTypeIndex = 2
|
|
||||||
Else
|
|
||||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
|
||||||
nTypeIndex = 1
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
|
||||||
End If
|
|
||||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||||
|
' Assegno info direzione a seconda del tipo di spianatura
|
||||||
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
Dim nDir As Integer = 1
|
||||||
If m_bChainedPath And bEngWithMill Then
|
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG And Index Mod 2 <> 0 Then nDir = 2
|
||||||
If bReducePath Then
|
EgtSetInfo(nCut2Id, INFO_DIR, nDir)
|
||||||
If Index < nStepNum - 1 Then
|
' Inserisco nell'elenco delle curve eventualmente da concatenare
|
||||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2)
|
CutsList.Add(nCut2Id)
|
||||||
ElseIf Index = nStepNum - 1 Then
|
|
||||||
If nStepNum Mod 2 = 0 Then
|
|
||||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2, False, True)
|
|
||||||
Else
|
|
||||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2, True, False)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
CutsList.Add(nCut2Id)
|
|
||||||
End If
|
|
||||||
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
' Se fresatura e richiesto percorso concatenato
|
||||||
If m_bChainedPath And bEngWithMill Then
|
If m_nTool = TOOL.MILL And m_bChainedPath Then
|
||||||
' Decidere se accorciare i tagli del valore del raggio utensile!
|
' Trasformo la prima curva in composita (copiando tutte le info)
|
||||||
If bReducePath Then
|
Dim vsInfo As String() = Nothing
|
||||||
ExtendLenghtMillPath(CutsList(0), -dThick / 2, False, True)
|
EgtGetAllInfo( CutsList(0), vsInfo)
|
||||||
End If
|
Dim nCompoCrv As Integer = EgtCreateCurveCompo(nLayerId, CutsList(0), True)
|
||||||
For Index As Integer = 0 To CutsList.Count - 2
|
For Each sInfo As String In vsInfo
|
||||||
If Index Mod 2 <> 0 Then
|
Dim KeyAndVal As String() = sInfo.Split( "=".ToCharArray)
|
||||||
' Costruisco la linea di collegamento tra due curve adiacenti
|
If KeyAndVal.Count() >= 2 Then EgtSetInfo( nCompoCrv, KeyAndVal(0), KeyAndVal(1))
|
||||||
Dim PtStart_1 As Point3d
|
Next
|
||||||
EgtStartPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
' Accodo opportunamente le curve successive
|
||||||
Dim PtStart_2 As Point3d
|
For Index As Integer = 1 To CutsList.Count - 1
|
||||||
EgtStartPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
' Inverto le curve di ritorno (di indice dispari in lista)
|
||||||
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
If Index Mod 2 <> 0 Then EgtInvertCurve( CutsList(Index))
|
||||||
Else
|
' Aggiungo il collegamento
|
||||||
' Costruisco la linea di collegamento tra due curve adiacenti
|
Dim ptStart As Point3d
|
||||||
Dim PtStart_1 As Point3d
|
EgtStartPoint(CutsList(Index), CutsList(Index), ptStart)
|
||||||
EgtEndPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
EgtAddCurveCompoLine( nCompoCrv, ptStart)
|
||||||
Dim PtStart_2 As Point3d
|
' Aggiungo la curva
|
||||||
EgtEndPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
EgtAddCurveCompoCurve( nCompoCrv, CutsList(Index), true)
|
||||||
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
Dim ptNear As Point3d
|
|
||||||
EgtStartPoint(CutsList(0), ptNear)
|
|
||||||
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
|
|
||||||
' Inidico che è un taglio Diretto di tipo Flattening
|
|
||||||
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
|
||||||
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
|
|
||||||
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
|
|
||||||
' Se unisco il percorso devo per forza usare la fresa!
|
|
||||||
EgtSetInfo(IdJointCurv, "EngravingWithMill", 1)
|
|
||||||
If Not bReducePath Then EgtSetInfo(IdJointCurv, INFO_STRICT, 0)
|
|
||||||
End If
|
End If
|
||||||
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub ExtendLenghtMillPath(ByVal IdCurv As Integer, ByVal ReduceVal As Double,
|
Private Sub ExtendLenghtMillPath(IdCurv As Integer, dExtend As Double,
|
||||||
ByVal Optional bStart As Boolean = True, ByVal Optional bEnd As Boolean = True)
|
Optional bStart As Boolean = True, Optional bEnd As Boolean = True)
|
||||||
Dim PtStart As Point3d
|
If bStart Then
|
||||||
EgtStartPoint(IdCurv, GDB_RT.GLOB, PtStart)
|
Dim ptStart As Point3d
|
||||||
Dim PtEnd As Point3d
|
EgtStartPoint(IdCurv, IdCurv, ptStart)
|
||||||
EgtEndPoint(IdCurv, GDB_RT.GLOB, PtEnd)
|
EgtTrimExtendCurveByLen(IdCurv, dExtend, ptStart)
|
||||||
If bStart Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtStart, GDB_RT.GLOB)
|
End If
|
||||||
If bEnd Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtEnd, GDB_RT.GLOB)
|
If bEnd Then
|
||||||
Dim dLenLine As Double
|
Dim ptEnd As Point3d
|
||||||
EgtCurveLength(IdCurv, dLenLine)
|
EgtEndPoint(IdCurv, IdCurv, ptEnd)
|
||||||
EgtOutLog("Lunghezza segmento ridotto: " & dLenLine.ToString)
|
EgtTrimExtendCurveByLen(IdCurv, dExtend, ptEnd)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ Public Class GridCut
|
|||||||
EraseDirectCutPart()
|
EraseDirectCutPart()
|
||||||
' Riattivo eventuali lavorazioni presenti
|
' Riattivo eventuali lavorazioni presenti
|
||||||
ActivateAllMachinings()
|
ActivateAllMachinings()
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
' Abilito registrazione progetto modificato
|
' Abilito registrazione progetto modificato
|
||||||
EgtEnableModified()
|
EgtEnableModified()
|
||||||
' Nascondo la macchina
|
' Nascondo la macchina
|
||||||
@@ -729,9 +730,8 @@ Public Class GridCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio parallelo alla lama
|
' Creo il taglio parallelo alla lama
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
@@ -763,10 +763,37 @@ Public Class GridCut
|
|||||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
End If
|
End If
|
||||||
|
' Se richiesta gestione tagli finali
|
||||||
|
OrderFinalSawCuts()
|
||||||
|
' Aggiorno stato bottoni
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
Return m_bCutOk
|
Return m_bCutOk
|
||||||
End Function
|
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
|
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||||
If m_bCustomGrid Then
|
If m_bCustomGrid Then
|
||||||
Return MultiplyCut_1(nLayerId)
|
Return MultiplyCut_1(nLayerId)
|
||||||
|
|||||||
@@ -154,46 +154,39 @@ Public Class MachineButtonsUC
|
|||||||
' recupero l'inidce del bottone selezionato
|
' recupero l'inidce del bottone selezionato
|
||||||
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
||||||
|
|
||||||
Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
|
||||||
Dim sLuaFileName As String = String.Empty
|
|
||||||
|
|
||||||
' Se il bottone chiamantè quello delle porte allora devo eseguire due comandi MDI
|
' Se il bottone chiamante è quello delle porte allora devo eseguire due comandi MDI
|
||||||
If nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED) OrElse
|
If nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED) OrElse
|
||||||
nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_CLOSED) Then
|
nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_CLOSED) Then
|
||||||
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
|
VarMdiCommand.ExecuteMDICommand(CommandArrayY(nIndex))
|
||||||
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
|
VarMdiCommand.ExecuteMDICommand(CommandArrayN(nIndex))
|
||||||
ExecuteMDICommand(CurrentBtn, sTLuaFile)
|
|
||||||
ExecuteMDICommand(CurrentBtn, sFLuaFile)
|
|
||||||
CurrentBtn.IsChecked = False
|
CurrentBtn.IsChecked = False
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se il bottone chiamantè quello per la selezione del pannello di controllo
|
' Se il bottone chiamante è quello per la selezione del pannello di controllo
|
||||||
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
|
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
|
||||||
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
|
|
||||||
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
|
|
||||||
If m_CN.nEnablePc = 1 Then
|
If m_CN.nEnablePc = 1 Then
|
||||||
ExecuteMDICommand(CurrentBtn, sTLuaFile)
|
VarMdiCommand.ExecuteMDICommand(CommandArrayY(nIndex))
|
||||||
ElseIf m_CN.nEnablePc = 2 Then
|
ElseIf m_CN.nEnablePc = 2 Then
|
||||||
ExecuteMDICommand(CurrentBtn, sFLuaFile)
|
VarMdiCommand.ExecuteMDICommand(CommandArrayN(nIndex))
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim sLuaFileName As String = ""
|
||||||
If CurrentBtn.IsChecked() Then
|
If CurrentBtn.IsChecked() Then
|
||||||
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
|
sLuaFileName = CommandArrayY(nIndex)
|
||||||
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
|
|
||||||
Else
|
Else
|
||||||
If Not (StateFlagArray(nIndex) = BTN_STATE_THREEAXIS Or
|
If Not (StateFlagArray(nIndex) = BTN_STATE_THREEAXIS Or
|
||||||
StateFlagArray(nIndex) = BTN_STATE_FIVEAXIS) Then
|
StateFlagArray(nIndex) = BTN_STATE_FIVEAXIS) Then
|
||||||
'EgtLuaExecFile(sBaseDir & CommandArrayN(nIndex))
|
sLuaFileName = CommandArrayN(nIndex)
|
||||||
sLuaFileName = sBaseDir & CommandArrayN(nIndex)
|
|
||||||
Else
|
Else
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ExecuteMDICommand(CurrentBtn, sLuaFileName)
|
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
|
||||||
|
|
||||||
' se non ha stato e quindi è un bottone normale, tolgo il check
|
' se non ha stato e quindi è un bottone normale, tolgo il check
|
||||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING Then
|
If StateFlagArray(nIndex) = BTN_STATE_NOTHING Then
|
||||||
@@ -202,241 +195,6 @@ Public Class MachineButtonsUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ExecuteMDICommand(CurrentBtn As Primitives.ToggleButton, sLuaFileName As String)
|
|
||||||
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
|
|
||||||
Dim CmdString As String = String.Empty
|
|
||||||
Dim b2Start As Boolean = False
|
|
||||||
Dim EActive As Boolean = False
|
|
||||||
Dim ENumber As String = String.Empty
|
|
||||||
Dim EValue As String = String.Empty
|
|
||||||
Dim EType As String = 0
|
|
||||||
Dim ENumber2 As String = String.Empty
|
|
||||||
Dim EValue2 As String = String.Empty
|
|
||||||
Dim EType2 As String = 0
|
|
||||||
' eseguo la lettura del file .lua associato al comando
|
|
||||||
ExecuteDirectCmdLua(sLuaFileName, CmdString, b2Start, EActive, ENumber, EValue, EType, ENumber2, EValue2, EType2)
|
|
||||||
' comunico i dati calcolati al PLC (quidni ignoro eventuali comandi MDI), scrivo messaggio MDI
|
|
||||||
If EActive Then
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2
|
|
||||||
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
|
||||||
' solo per Flexium
|
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
|
||||||
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
|
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
|
||||||
End If
|
|
||||||
' altrimenti scrittura delle variabili E
|
|
||||||
Else
|
|
||||||
m_CN.DVariables_WriteVariables2(ENumber, EValue)
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
Case 3
|
|
||||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
|
||||||
' scrivo prima variabile
|
|
||||||
Select Case CShort(EType)
|
|
||||||
Case 1
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), CInt(EValue), 0, 0, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CInt(EValue))
|
|
||||||
Case 2
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, CLng(EValue), 0, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CLng(EValue))
|
|
||||||
Case 3
|
|
||||||
Dim d As Double = 0
|
|
||||||
StringToDouble(EValue, d)
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, d, "")
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & d)
|
|
||||||
Case 4
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, 0, EValue)
|
|
||||||
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & EValue)
|
|
||||||
End Select
|
|
||||||
EgtOutLog("dopo scrittura prima variabile")
|
|
||||||
If Not IsNothing(EType2) AndAlso CShort(EType) > 0 Then
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
' scrivo seconda variabile
|
|
||||||
Select Case CShort(EType2)
|
|
||||||
Case 1
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), CInt(EValue2), 0, 0, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CInt(EValue2))
|
|
||||||
Case 2
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, CLng(EValue2), 0, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CLng(EValue2))
|
|
||||||
Case 3
|
|
||||||
Dim d As Double = 0
|
|
||||||
StringToDouble(EValue2, d)
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, d, "")
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & d)
|
|
||||||
Case 4
|
|
||||||
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, 0, EValue2)
|
|
||||||
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & EValue2)
|
|
||||||
End Select
|
|
||||||
EgtOutLog("dopo scrittura seconda variabile")
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
' CONTROLLO FANUC
|
|
||||||
Case 4
|
|
||||||
' ------------------------------------ FANUC ------------------------------------
|
|
||||||
' eventuale scrittura di linea di comando MDI
|
|
||||||
If Not String.IsNullOrEmpty(CmdString) Then
|
|
||||||
' attivo mpdalità MDI
|
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
' salvo la stringa di comando ricevuta dal file lua
|
|
||||||
m_CN.sz_ManualDataInput = CmdString
|
|
||||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
|
||||||
m_CN.MDI_command()
|
|
||||||
End If
|
|
||||||
' attivo modalità AUTO
|
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
If String.IsNullOrEmpty(EValue) Then
|
|
||||||
' EActive: impulsivo "D#####"
|
|
||||||
m_CN.NC_pulse_bit(ENumber)
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
|
||||||
Else
|
|
||||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
|
||||||
If ENumber.Contains(".") Then
|
|
||||||
' D#####.#
|
|
||||||
Dim bEValue As Boolean
|
|
||||||
If EValue.Trim = "1" Then bEValue = True
|
|
||||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
|
||||||
Else
|
|
||||||
' D#####
|
|
||||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
|
||||||
End If
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
|
||||||
End If
|
|
||||||
' eventale caricamento seconda variabile
|
|
||||||
If String.IsNullOrEmpty(EValue2) Then
|
|
||||||
' EActive: impulsivo "D#####"
|
|
||||||
m_CN.NC_pulse_bit(ENumber2)
|
|
||||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
|
||||||
Else
|
|
||||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
|
||||||
If ENumber2.Contains(".") Then
|
|
||||||
' D#####.#
|
|
||||||
Dim bEValue2 As Boolean
|
|
||||||
If EValue2.Trim = "1" Then bEValue2 = True
|
|
||||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
|
||||||
Else
|
|
||||||
' D#####
|
|
||||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
|
||||||
End If
|
|
||||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
|
||||||
End If
|
|
||||||
Return
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim nResult As Short
|
|
||||||
' Imposto modalità MDI per controlli num
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2
|
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2)
|
|
||||||
Case 3
|
|
||||||
'Per il siemens non devo fare nulla
|
|
||||||
End Select
|
|
||||||
m_CN.sz_ManualDataInput = CmdString
|
|
||||||
m_CN.MDI_command()
|
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
|
||||||
Case 1, 2
|
|
||||||
System.Threading.Thread.Sleep(300)
|
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
|
||||||
Case 3
|
|
||||||
'Per il siemens non devo fare nulla
|
|
||||||
Case 4
|
|
||||||
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If b2Start Then
|
|
||||||
System.Threading.Thread.Sleep(800)
|
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
|
||||||
End If
|
|
||||||
System.Threading.Thread.Sleep(300)
|
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' questa è una copia della funzione presente nel codice ControlsMachineButtonUC.xaml.vb
|
|
||||||
Friend Sub ExecuteDirectCmdLua(LuaFileName As String, ByRef CmdString As String, ByRef b2Start As Boolean, ByRef EActive As Boolean, ByRef ENumber As String, ByRef EValue As String, ByRef EType As String, ByRef ENumber2 As String, ByRef EValue2 As String, ByRef EType2 As String)
|
|
||||||
'Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
|
||||||
If EgtLuaExecFile(LuaFileName) Then
|
|
||||||
EgtOutLog("Lua " & LuaFileName & " eseguito")
|
|
||||||
Else
|
|
||||||
EgtOutLog("Lua " & LuaFileName & " non eseguito")
|
|
||||||
End If
|
|
||||||
Dim dFeed As Double = 0
|
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text) Then
|
|
||||||
StringToLen(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text, dFeed)
|
|
||||||
Else
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
|
||||||
End If
|
|
||||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
|
||||||
Dim dSpeed As Double = 0
|
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
|
||||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
|
||||||
Else
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
|
||||||
End If
|
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
|
||||||
' versione 2.5e1
|
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
|
||||||
Dim sToolPos As String = String.Empty
|
|
||||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
|
||||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
|
||||||
End If
|
|
||||||
Dim dToolDiam As Double = 0
|
|
||||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
|
||||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L2", dL2)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.L3", dL3)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
|
||||||
EgtLuaCallFunction("CmdString")
|
|
||||||
' Leggo variabili
|
|
||||||
CmdString = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
|
||||||
b2Start = False
|
|
||||||
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
|
|
||||||
EActive = False
|
|
||||||
EgtLuaGetGlobBoolVar("CMD.EACTIVE", EActive)
|
|
||||||
ENumber = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ENUMBER", ENumber)
|
|
||||||
EValue = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.EVALUE", EValue)
|
|
||||||
EType = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ETYPE", EType)
|
|
||||||
EgtOutLog("ENUMBER: " & ENumber & " EVALUE: " & EValue & " ETYPE: " & EType)
|
|
||||||
ENumber2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ENUMBER2", ENumber2)
|
|
||||||
EValue2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.EVALUE2", EValue2)
|
|
||||||
EType2 = String.Empty
|
|
||||||
EgtLuaGetGlobStringVar("CMD.ETYPE2", EType2)
|
|
||||||
EgtOutLog("ENUMBER2: " & ENumber2 & " EVALUE2: " & EValue2 & " ETYPE2: " & EType2)
|
|
||||||
' Reset lua
|
|
||||||
EgtLuaResetGlobVar("CmdString")
|
|
||||||
EgtLuaResetGlobVar("CMD")
|
|
||||||
' Log del comando
|
|
||||||
EgtOutLog("CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
|
|
||||||
" b2Start=" & b2Start.ToString() &
|
|
||||||
" EActive=" & EActive.ToString &
|
|
||||||
" ENumber=" & If(Not String.IsNullOrEmpty(ENumber), ENumber, "") &
|
|
||||||
" EValue=" & If(Not String.IsNullOrEmpty(EValue), EValue, "") &
|
|
||||||
" EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") &
|
|
||||||
" ENumber2=" & If(Not String.IsNullOrEmpty(ENumber2), ENumber2, "") &
|
|
||||||
" EValue2=" & If(Not String.IsNullOrEmpty(EValue2), EValue2, "") &
|
|
||||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "STATE CHANGED"
|
#Region "STATE CHANGED"
|
||||||
|
|
||||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ Public Class ManualAxesMoveUC
|
|||||||
Private m_MoveClicked As Boolean = False
|
Private m_MoveClicked As Boolean = False
|
||||||
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
||||||
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||||
EgtOutLog(" → Hold on! Do not click compulsively.")
|
EgtOutLog(" -> Hold on! Do not click compulsively.")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MoveClicked = True
|
m_MoveClicked = True
|
||||||
|
|||||||
@@ -636,10 +636,8 @@ Public Class MultipleCut
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
' Creo layer di taglio
|
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -78,16 +78,18 @@ Public Class Polishing
|
|||||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
||||||
' Cancello eventuali lucidature
|
' Cancello eventuali lucidature
|
||||||
RemovePolishings()
|
RemovePolishings()
|
||||||
|
' Dichiaro polishing non più attivo
|
||||||
|
DirectCut.m_bPolishingOn = False
|
||||||
' Riattivo eventuali lavorazioni presenti
|
' Riattivo eventuali lavorazioni presenti
|
||||||
ActivateAllMachinings()
|
ActivateAllMachinings()
|
||||||
' Abilito registrazione progetto modificato
|
|
||||||
EgtEnableModified()
|
|
||||||
' Nascondo la macchina
|
' Nascondo la macchina
|
||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
' Ripristino opacità del grezzo
|
' Ripristino opacità del grezzo
|
||||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||||
EgtSetAlpha( nRawSolidId, 100)
|
EgtSetAlpha( nRawSolidId, 100)
|
||||||
|
' Abilito registrazione progetto modificato
|
||||||
|
EgtEnableModified()
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
@@ -211,6 +213,8 @@ Public Class Polishing
|
|||||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup( m_CurrProjPage.m_nRawId, NAME_KERF)
|
Dim nKerfId As Integer = EgtGetFirstNameInGroup( m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||||
m_bPoliOk = AddPolishings( sKitName, nKerfId)
|
m_bPoliOk = AddPolishings( sKitName, nKerfId)
|
||||||
EgtSetCurrPhase( 1)
|
EgtSetCurrPhase( 1)
|
||||||
|
' Dichiaro polishing attivo
|
||||||
|
DirectCut.m_bPolishingOn = True
|
||||||
Return m_bPoliOk
|
Return m_bPoliOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -514,9 +514,8 @@ Public Class SawTestUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -783,8 +783,8 @@ Public Class SingleCutAuto
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = CreateDirectCutPart()
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -657,8 +657,8 @@ Public Class SingleCutUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = CreateDirectCutPart()
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -72,13 +72,14 @@ Public Class SingleDrillUC
|
|||||||
|
|
||||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
If String.IsNullOrWhiteSpace(m_sCurrDrill) Then m_sCurrDrill = GetDrillFromDrilling(m_CurrentMachine.sCurrDrilling)
|
||||||
' rimuovo utensile su uscite 1
|
' rimuovo utensile su uscite 1
|
||||||
EgtSetCalcTool("", "H1", 1)
|
EgtSetCalcTool("", "H1", 1)
|
||||||
' imposto utensile su uscita 2
|
' imposto utensile su uscita 2
|
||||||
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
|
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
|
||||||
' recupero informazioni del foretto usato
|
' recupero informazioni del foretto usato
|
||||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||||
|
m_dDiameter = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||||
|
|
||||||
' Attivo la pagina
|
' Attivo la pagina
|
||||||
@@ -412,34 +413,34 @@ Public Class SingleDrillUC
|
|||||||
EgtEmptyGroup(m_nTempLay)
|
EgtEmptyGroup(m_nTempLay)
|
||||||
' Spessore grezzo
|
' Spessore grezzo
|
||||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
' Recupero spessore lama corrente
|
' Recupero diametro foretto corrente
|
||||||
Dim sDrill As String = m_sCurrDrill
|
Dim sDrill As String = m_sCurrDrill
|
||||||
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
If String.IsNullOrWhiteSpace( sDrill) Then sDrill = GetDrillFromDrilling(m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
||||||
EgtTdbSetCurrTool(sDrill)
|
EgtTdbSetCurrTool(sDrill)
|
||||||
Dim dDiam As Double = 0
|
m_dDiameter = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||||
EraseDirectCutPart()
|
EraseDirectCutPart()
|
||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
|
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = CreateDirectCutPart()
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_INLOOP)
|
EgtSetName(nLayerId, NAME_INLOOP)
|
||||||
' Creo il Drill
|
' Creo il Drill
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
|
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
Dim nCrossLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
' Aggiungo crocetta/e
|
' Aggiungo crocetta/e
|
||||||
If m_bPointP1Ok Then
|
If m_bPointP1Ok Then
|
||||||
CreateCross(nCrossLayerId, ptStart)
|
CreateCross(nCrossLayerId, ptStart)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
||||||
' Inidico che è un taglio Diretto di tipo SingleDrill
|
' Indico che è un taglio Diretto di tipo SingleDrill
|
||||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
|
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
|
||||||
' Calcolo punto di inserimento nel grezzo
|
' Calcolo punto di inserimento nel grezzo
|
||||||
Dim ptMin, ptMax As Point3d
|
Dim ptMin, ptMax As Point3d
|
||||||
|
|||||||
@@ -317,9 +317,8 @@ Public Class SquaringUC
|
|||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
DeactivateAllMachinings()
|
DeactivateAllMachinings()
|
||||||
' Creo nuovo pezzo per il taglio diretto
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId As Integer = CreateDirectCutPart()
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
' Creo il taglio parallelo alla lama
|
' Creo il taglio parallelo alla lama
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
|||||||
@@ -0,0 +1,294 @@
|
|||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
|
Module VarMdiCommand
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Public Sub ExecuteMDICommand(sLuaFileName As String)
|
||||||
|
|
||||||
|
' Verifica esistenza pagina DirectCut e ne recupero CN corrente
|
||||||
|
If IsNothing( m_MainWindow.m_DirectCutPageUC) Then Return
|
||||||
|
Dim CurrCN As CN_generico = m_MainWindow.m_DirectCutPageUC.m_CN
|
||||||
|
|
||||||
|
' Verifico esistenza nome script lua
|
||||||
|
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
|
||||||
|
|
||||||
|
' Eseguo script
|
||||||
|
Dim CmdString As String = String.Empty
|
||||||
|
Dim b2Start As Boolean = False
|
||||||
|
Dim bEActive As Boolean = False
|
||||||
|
Dim sENumber As String = String.Empty
|
||||||
|
Dim sEValue As String = String.Empty
|
||||||
|
Dim sEType As String = 0
|
||||||
|
Dim sENumber2 As String = String.Empty
|
||||||
|
Dim sEValue2 As String = String.Empty
|
||||||
|
Dim sEType2 As String = 0
|
||||||
|
If Not ExecDirectCmdLua(sLuaFileName, CmdString, b2Start, bEActive, sENumber, sEValue, sEType, sENumber2, sEValue2, sEType2) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Se richiesta scrittura variabili
|
||||||
|
If bEActive Then
|
||||||
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
|
Case 1, 2 ' Num Axium e Flexium
|
||||||
|
' se Flexium e abilitata scrittura variabili PLC
|
||||||
|
If m_MainWindow.m_CNCommunication.m_nNCType = 2 And CurrCN.m_NewVariable Then
|
||||||
|
CurrCN.DPlcVariables_WriteVariables(sENumber, sEValue)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sENumber2) AndAlso Not String.IsNullOrWhiteSpace(sEValue2) Then
|
||||||
|
CurrCN.DPlcVariables_WriteVariables(sENumber2, sEValue2)
|
||||||
|
End If
|
||||||
|
' altrimenti scrittura della variabile E
|
||||||
|
Else
|
||||||
|
CurrCN.DVariables_WriteVariables2(sENumber, sEValue)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
|
Case 3 ' Siemens
|
||||||
|
' Scrivo prima variabile
|
||||||
|
Dim nEType As Integer = 0
|
||||||
|
StringToInt( sEType, nEType)
|
||||||
|
Select Case nEType
|
||||||
|
Case 1
|
||||||
|
Dim nEvalue As Integer = 0
|
||||||
|
StringToInt( sEvalue, nEvalue)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber, 1, nEValue, 0, 0, "")
|
||||||
|
EgtOutLog("ENumber=" & sENumber & " EType=1 " & " EValue=" & nEValue.ToString())
|
||||||
|
Case 2
|
||||||
|
Dim lEvalue As Long = 0
|
||||||
|
Long.TryParse(sEValue, lEvalue)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber, 2, 0, lEvalue, 0, "")
|
||||||
|
EgtOutLog("ENumber=" & sENumber & " EType=2 " & " EValue=" & lEvalue.ToString())
|
||||||
|
Case 3
|
||||||
|
Dim dEValue As Double = 0
|
||||||
|
StringToDouble(sEValue, dEValue)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber, 3, 0, 0, dEValue, "")
|
||||||
|
EgtOutLog("ENumber=" & sENumber & " EType=3 " & " EValue=" & dEValue.ToString())
|
||||||
|
Case 4
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber, 4, 0, 0, 0, sEValue)
|
||||||
|
EgtOutLog("ENumber=" & sENumber & " EType=4 " & " EValue=" & sEValue)
|
||||||
|
Case Else
|
||||||
|
EgtOutLog("EType wrong : ENumber=" & sENumber & " EType=" & sEType & " EValue= " & sEValue)
|
||||||
|
End Select
|
||||||
|
If Not String.IsNullOrWhiteSpace(sEType2) AndAlso sEType2 <> "0" Then
|
||||||
|
' Pausa
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' Scrivo seconda variabile
|
||||||
|
Dim nEType2 As Integer = 0
|
||||||
|
StringToInt( sEType2, nEType2)
|
||||||
|
Select Case nEType2
|
||||||
|
Case 1
|
||||||
|
Dim nEvalue2 As Integer = 0
|
||||||
|
StringToInt( sEvalue2, nEvalue2)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber2, 1, nEValue2, 0, 0, "")
|
||||||
|
EgtOutLog("ENumber2=" & sENumber2 & " EType2=1" & " EValue2=" & nEValue2.ToString())
|
||||||
|
Case 2
|
||||||
|
Dim lEvalue2 As Long = 0
|
||||||
|
Long.TryParse(sEValue2, lEvalue2)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber2, 2, 0, lEValue2, 0, "")
|
||||||
|
EgtOutLog("ENumber2=" & sENumber2 & " EType2=2" & " EValue2=" & lEValue2.ToString())
|
||||||
|
Case 3
|
||||||
|
Dim dEValue2 As Double = 0
|
||||||
|
StringToDouble(sEValue2, dEValue2)
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber2, 3, 0, 0, dEValue2, "")
|
||||||
|
EgtOutLog("ENumber2=" & sENumber2 & " EType2=3" & " EValue2=" & dEValue2.ToString())
|
||||||
|
Case 4
|
||||||
|
CurrCN.DVariables_WriteVariables3(sENumber2, 4, 0, 0, 0, sEValue2)
|
||||||
|
EgtOutLog("ENumber2=" & sENumber2 & " EType2=4" & " EValue2=" & sEValue2)
|
||||||
|
Case Else
|
||||||
|
EgtOutLog("EType2 wrong : ENumber2=" & sENumber2 & " EType2=" & sEType2 & " EValue2=" & sEValue2)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
Return
|
||||||
|
Case 4 ' Fanuc
|
||||||
|
' eventuale scrittura di linea di comando MDI
|
||||||
|
If Not String.IsNullOrWhiteSpace(CmdString) Then
|
||||||
|
' attivo mpdalità MDI
|
||||||
|
CurrCN.DGeneralFunctions_WriteCncMode(2)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
CurrCN.sz_ManualDataInput = CmdString
|
||||||
|
' eseguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
CurrCN.MDI_command()
|
||||||
|
End If
|
||||||
|
' attivo modalità Manuale
|
||||||
|
CurrCN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' eventuale caricamento prima variabile
|
||||||
|
If Not String.IsNullOrEmpty(sENumber) Then
|
||||||
|
If String.IsNullOrWhiteSpace(sEValue) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
CurrCN.NC_pulse_bit(sENumber)
|
||||||
|
EgtOutLog("Fanuc : DNumber=" & sENumber)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If sENumber.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue As Boolean = ( sEValue.Trim <> "0")
|
||||||
|
CurrCN.NC_write_var_bit(sENumber, bEValue)
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
CurrCN.NC_write_var_short(sENumber, CShort(sEValue))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc : DNumber=" & sENumber & " DValue=" & sEValue)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
EgtOutLog("Fanuc : DNumber=NullOrEmpty")
|
||||||
|
End If
|
||||||
|
' eventale caricamento seconda variabile
|
||||||
|
If Not String.IsNullOrEmpty(sENumber2) Then
|
||||||
|
If String.IsNullOrWhiteSpace(sEValue2) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
CurrCN.NC_pulse_bit(sENumber2)
|
||||||
|
EgtOutLog("Fanuc : DNumber2=" & sENumber2)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If sENumber2.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue2 As Boolean = ( sEValue2.Trim <> "0")
|
||||||
|
CurrCN.NC_write_var_bit(sENumber2, bEValue2)
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
CurrCN.NC_write_var_short(sENumber2, CShort(sEValue2))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc : DNumber2=" & sENumber2 & " DValue2=" & sEValue2)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
EgtOutLog("Fanuc : DNumber2=NullOrEmpty")
|
||||||
|
End If
|
||||||
|
Return
|
||||||
|
Case Else ' Demo
|
||||||
|
EgtOutLog("Demo : ENumber=" & sENumber & " EType=" & sEType & " EValue=" & sEValue)
|
||||||
|
EgtOutLog("Demo : ENumber2=" & sENumber2 & " EType2=" & sEType2 & " EValue2=" & sEValue2)
|
||||||
|
Return
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Esecuzione comando MDI
|
||||||
|
Dim nResult As Short
|
||||||
|
' assegno la modalità di funzionamento
|
||||||
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
|
Case 1, 2, 4
|
||||||
|
nResult = CurrCN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
||||||
|
Case 3
|
||||||
|
'Per Siemens non devo fare nulla
|
||||||
|
End Select
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
CurrCN.sz_ManualDataInput = CmdString
|
||||||
|
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
CurrCN.MDI_command()
|
||||||
|
' avvio l'esecuzione del comando
|
||||||
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
|
Case 1, 2
|
||||||
|
System.Threading.Thread.Sleep(500)
|
||||||
|
CurrCN.DGeneralFunctions_CycleStart()
|
||||||
|
Case 3, 4
|
||||||
|
'Per Siemens e Fanuc non devo fare nulla
|
||||||
|
End Select
|
||||||
|
' se richiesto ripeto l'operazione
|
||||||
|
If b2Start Then
|
||||||
|
EgtOutLog("Avvio secondo cliclo start")
|
||||||
|
System.Threading.Thread.Sleep(800)
|
||||||
|
CurrCN.DGeneralFunctions_CycleStart()
|
||||||
|
End If
|
||||||
|
System.Threading.Thread.Sleep(300)
|
||||||
|
' ripristino la modalità Manuale
|
||||||
|
nResult = CurrCN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Esecuzione dello script lua per impostazione dati del comando diretto
|
||||||
|
Private Function ExecDirectCmdLua(sLuaFileName As String,
|
||||||
|
ByRef CmdString As String, ByRef b2Start As Boolean, ByRef bEActive As Boolean,
|
||||||
|
ByRef sENumber As String, ByRef sEValue As String, ByRef sEType As String,
|
||||||
|
ByRef sENumber2 As String, ByRef sEValue2 As String, ByRef sEType2 As String) As Boolean
|
||||||
|
' Esecuzione script
|
||||||
|
Dim sLuaPath As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\" & sLuaFileName
|
||||||
|
Dim bOk As Boolean = EgtLuaExecFile(sLuaPath)
|
||||||
|
EgtOutLog("DirectCmd Script " & sLuaPath & If(bOk, " completed", " stopped with errors"))
|
||||||
|
If Not bOk Then Return False
|
||||||
|
|
||||||
|
' Assegnazione valori a variabili lua
|
||||||
|
Dim ManualAxesMove As ManualAxesMoveUC = m_MainWindow.m_DirectCutPageUC.m_ManualAxesMove
|
||||||
|
|
||||||
|
Dim dFeed As Double = 0
|
||||||
|
If Not String.IsNullOrWhiteSpace(ManualAxesMove.FeedTxBx.Text) Then
|
||||||
|
StringToLen(ManualAxesMove.FeedTxBx.Text, dFeed)
|
||||||
|
Else
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
||||||
|
End If
|
||||||
|
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
||||||
|
|
||||||
|
Dim dSpeed As Double = 0
|
||||||
|
If Not String.IsNullOrWhiteSpace(ManualAxesMove.SpeedTxBx.Text) Then
|
||||||
|
StringToDouble(ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
||||||
|
Else
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||||
|
End If
|
||||||
|
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||||
|
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
Dim sToolPos As String = String.Empty
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||||
|
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||||
|
End If
|
||||||
|
Dim dToolDiam As Double = 0
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.L2", dL2)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.L3", dL3)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
|
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||||
|
|
||||||
|
Dim sCurrTable As String = String.Empty
|
||||||
|
Dim nCurrTable As Integer = 1
|
||||||
|
EgtGetTableName(sCurrTable)
|
||||||
|
If sCurrTable <> "MainTab" Then nCurrTable = 2
|
||||||
|
EgtLuaSetGlobIntVar("CMD.TABLE", nCurrTable)
|
||||||
|
|
||||||
|
' Esecuzione funzione
|
||||||
|
bOk = EgtLuaCallFunction("CmdString")
|
||||||
|
EgtOutLog(" CmdString function" & If(bOk, " completed", " stopped with errors"))
|
||||||
|
If Not bOk Then Return False
|
||||||
|
|
||||||
|
' Leggo variabili da file Lua
|
||||||
|
CmdString = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||||
|
b2Start = False
|
||||||
|
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
|
||||||
|
bEActive = False
|
||||||
|
EgtLuaGetGlobBoolVar("CMD.EACTIVE", bEActive)
|
||||||
|
sENumber = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.ENUMBER", sENumber)
|
||||||
|
sEValue = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.EVALUE", sEValue)
|
||||||
|
sEType = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.ETYPE", sEType)
|
||||||
|
sENumber2 = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.ENUMBER2", sENumber2)
|
||||||
|
sEValue2 = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.EVALUE2", sEValue2)
|
||||||
|
sEType2 = String.Empty
|
||||||
|
EgtLuaGetGlobStringVar("CMD.ETYPE2", sEType2)
|
||||||
|
' Reset variabili lua
|
||||||
|
EgtLuaResetGlobVar("CmdString")
|
||||||
|
EgtLuaResetGlobVar("CMD")
|
||||||
|
' Log del comando
|
||||||
|
EgtOutLog(" CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
|
||||||
|
" DOUBLESTART=" & b2Start.ToString() &
|
||||||
|
" EActive=" & bEActive.ToString() &
|
||||||
|
" ENumber=" & If(Not String.IsNullOrEmpty(sENumber), sENumber, "") &
|
||||||
|
" EValue=" & If(Not String.IsNullOrEmpty(sEValue), sEValue, "") &
|
||||||
|
" EType=" & If(Not String.IsNullOrEmpty(sEType), sEType, "") &
|
||||||
|
" ENumber2=" & If(Not String.IsNullOrEmpty(sENumber2), sENumber2, "") &
|
||||||
|
" EValue2=" & If(Not String.IsNullOrEmpty(sEValue2), sEValue2, "") &
|
||||||
|
" EType2=" & If(Not String.IsNullOrEmpty(sEType2), sEType2, ""))
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="ChooseMachining" Height="276.5" Width="426.5">
|
Title="CompoCsvData" Height="276.5" Width="426.5">
|
||||||
|
|
||||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="ChooseMachining" Height="426.5" Width="426.5">
|
Title="CompoTrfData" Height="426.5" Width="426.5">
|
||||||
|
|
||||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|||||||
@@ -1188,7 +1188,7 @@ Public Class DrawPageUC
|
|||||||
ActivateParkIndZero()
|
ActivateParkIndZero()
|
||||||
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||||
' Se Shift premuto eseguo il contrario
|
' Se Shift premuto eseguo il contrario
|
||||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||||
bExitPage = Not bExitPage
|
bExitPage = Not bExitPage
|
||||||
End If
|
End If
|
||||||
If bExitPage Then
|
If bExitPage Then
|
||||||
|
|||||||
@@ -867,12 +867,11 @@ Public Class ImportPageUC
|
|||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
' Genero l'immagine solo se è abilitata la modalità
|
' Genero l'immagine solo se è abilitata la modalità
|
||||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then Print()
|
If m_MainWindow.EnabledDxfPark() Then Print()
|
||||||
' Se import per pezzi piatti
|
' Se import per pezzi piatti
|
||||||
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
||||||
' Eseguo importazione pezzi piatti
|
' Eseguo importazione pezzi piatti
|
||||||
LoadFlatParts()
|
LoadFlatParts()
|
||||||
|
|
||||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello indicato
|
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello indicato
|
||||||
Dim ListParkInd As New List(Of ParkInd)
|
Dim ListParkInd As New List(Of ParkInd)
|
||||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||||
@@ -888,7 +887,7 @@ Public Class ImportPageUC
|
|||||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' altrimenti import per cornici
|
' altrimenti import per cornici
|
||||||
Else
|
Else
|
||||||
LoadFrame()
|
LoadFrame()
|
||||||
End If
|
End If
|
||||||
@@ -903,9 +902,6 @@ Public Class ImportPageUC
|
|||||||
' recupero la lista degli indici di parcheggio
|
' recupero la lista degli indici di parcheggio
|
||||||
NewParkInd = SelParkIndWD.NewParkInd()
|
NewParkInd = SelParkIndWD.NewParkInd()
|
||||||
|
|
||||||
Dim SM_Select As SM = SM.SHADING
|
|
||||||
' SM_Select = SM.HIDDENLINE
|
|
||||||
' SM_Select = SM.WIREFRAME
|
|
||||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||||
Dim sPath As String = SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".png"
|
Dim sPath As String = SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".png"
|
||||||
' Recupero le dimensioni dell'area di stampa
|
' Recupero le dimensioni dell'area di stampa
|
||||||
@@ -920,13 +916,11 @@ Public Class ImportPageUC
|
|||||||
' Recupero le dimensioni correnti della pagina di disegno
|
' Recupero le dimensioni correnti della pagina di disegno
|
||||||
Dim nImgW As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualWidth()
|
Dim nImgW As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualWidth()
|
||||||
Dim nImgH As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualHeight()
|
Dim nImgH As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualHeight()
|
||||||
If Not EgtGetImage(SM_Select, colBackTopColor, colBackBottomColor, nImgW, nImgH, sPath) Then
|
If Not EgtGetImage(SM.SHADING, colBackTopColor, colBackBottomColor, nImgW, nImgH, sPath) Then
|
||||||
' Error in creating the print image
|
' Error in creating the print image
|
||||||
EgtOutLog(EgtMsg(50181))
|
EgtOutLog(EgtMsg(50181))
|
||||||
EgtSetLineAttribs(1)
|
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
EgtSetLineAttribs(1)
|
|
||||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||||
'carico la bitmap e la metto in uno stream in memoria
|
'carico la bitmap e la metto in uno stream in memoria
|
||||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||||
@@ -944,9 +938,8 @@ Public Class ImportPageUC
|
|||||||
tmpImg.Source = bitImage
|
tmpImg.Source = bitImage
|
||||||
tmpImg.Stretch = Stretch.Uniform
|
tmpImg.Stretch = Stretch.Uniform
|
||||||
tmpImg.EndInit()
|
tmpImg.EndInit()
|
||||||
' eseguo la stampa
|
|
||||||
Catch
|
Catch
|
||||||
' Rrror in executing print
|
' Error in executing print
|
||||||
EgtOutLog(EgtMsg(50182))
|
EgtOutLog(EgtMsg(50182))
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
@@ -1049,8 +1042,8 @@ Public Class ImportPageUC
|
|||||||
Dim dNewArea As Double = 0
|
Dim dNewArea As Double = 0
|
||||||
Dim nId As Integer = nFirstId
|
Dim nId As Integer = nFirstId
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Definisco l'indice di parcheggio asssganto al pezzo
|
' Definisco l'indice di parcheggio assegnato al pezzo
|
||||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
If m_MainWindow.EnabledDxfPark() Then
|
||||||
EgtSetInfo(nId, INFO_PARKIND, NewParkInd.ToString)
|
EgtSetInfo(nId, INFO_PARKIND, NewParkInd.ToString)
|
||||||
' Imposto lo stato
|
' Imposto lo stato
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
@@ -1111,7 +1104,7 @@ Public Class ImportPageUC
|
|||||||
' Imposto path di provenienza
|
' Imposto path di provenienza
|
||||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||||
' Inserisco in parcheggio
|
' Inserisco in parcheggio
|
||||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
If m_MainWindow.EnabledDxfPark() Then
|
||||||
' Mantengo la posizione relativa tra i pezzi
|
' Mantengo la posizione relativa tra i pezzi
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, DimX, DimY, BBoxMaxPt)
|
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, DimX, DimY, BBoxMaxPt)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ Module SideAngle
|
|||||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
If Not String.IsNullOrWhiteSpace(sSawingTilted) Then
|
||||||
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
|
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -190,13 +190,14 @@ Public Class SideAngleUC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Elimino le righe per riposizionarle
|
' Elimino le righe per riposizionarle
|
||||||
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
|
Dim nMyShow = Math.Max( m_nShow, 1)
|
||||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
Grid.SetRow(NewEntity, MAX_LINES - nMyShow + 1)
|
||||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
Grid.SetRow(NewA1TxBx, MAX_LINES - nMyShow + 1)
|
||||||
|
Grid.SetRow(NewH1TxBx, MAX_LINES - nMyShow + 1)
|
||||||
|
|
||||||
Grid.SetRow(SideAngleBl, MAX_LINES - m_nShow)
|
Grid.SetRow(SideAngleBl, MAX_LINES - nMyShow)
|
||||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
Grid.SetRow(HeelBl, MAX_LINES - nMyShow)
|
||||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
Grid.SetRow(SideAngleGrid, MAX_LINES - nMyShow)
|
||||||
' Rendo visibile solo la nuova entità
|
' Rendo visibile solo la nuova entità
|
||||||
CollapsedCheckAllTextSideAng()
|
CollapsedCheckAllTextSideAng()
|
||||||
Else
|
Else
|
||||||
@@ -948,7 +949,7 @@ Public Class SideAngleUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' nuova funzione per gestire l'accorcaimento dei segmenti
|
' nuova funzione per gestire l'accorciamento dei segmenti
|
||||||
Friend Sub CreateDripGeom(nPartId As Integer)
|
Friend Sub CreateDripGeom(nPartId As Integer)
|
||||||
' Recupero Id layer di contorno esterno
|
' Recupero Id layer di contorno esterno
|
||||||
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||||
@@ -1145,7 +1146,7 @@ Public Class SideAngleUC
|
|||||||
EgtStartVector(nCrvId, vtAux)
|
EgtStartVector(nCrvId, vtAux)
|
||||||
Dim vtExtrusion As Vector3d
|
Dim vtExtrusion As Vector3d
|
||||||
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
' ruoto il vetottore nella nuova direzione
|
' ruoto il vettore nella nuova direzione
|
||||||
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||||
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||||
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Public Class FrameCutPageUC
|
|||||||
m_AlongAx.Add(EgtMsg(90614)) ' Guida
|
m_AlongAx.Add(EgtMsg(90614)) ' Guida
|
||||||
End If
|
End If
|
||||||
SelSectionBtn.ToolTip = EgtMsg(90615) ' Sezione
|
SelSectionBtn.ToolTip = EgtMsg(90615) ' Sezione
|
||||||
SelGuideBtn.Content = EgtMsg(906116) ' Guida
|
SelGuideBtn.Content = EgtMsg(90616) ' Guida
|
||||||
ArcRadTxBl.Text = EgtMsg(90617) ' Rad
|
ArcRadTxBl.Text = EgtMsg(90617) ' Rad
|
||||||
ArcAngTxBl.Text = EgtMsg(90618) ' Ang
|
ArcAngTxBl.Text = EgtMsg(90618) ' Ang
|
||||||
MirrorPartBtn.ToolTip = EgtMsg(90607) ' Mirror cornice
|
MirrorPartBtn.ToolTip = EgtMsg(90607) ' Mirror cornice
|
||||||
@@ -468,7 +468,7 @@ Public Class FrameCutPageUC
|
|||||||
|
|
||||||
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRectangleOff()
|
||||||
m_MainWindow.SplitCurvWJOff()
|
m_MainWindow.SplitCurvWJOff()
|
||||||
m_MainWindow.StartCurvWJOff()
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
|
|||||||
@@ -93,6 +93,17 @@ Public Class FrameMachiningUC
|
|||||||
m_CurrMachine.sCurrSawSingle = String.Empty
|
m_CurrMachine.sCurrSawSingle = String.Empty
|
||||||
End If
|
End If
|
||||||
m_DisableCalc = False
|
m_DisableCalc = False
|
||||||
|
' Lato opposto abilitato solo se cornice con linea guida
|
||||||
|
Dim nPartId As Integer = EgtGetFirstPartInRawPart( EgtGetFirstRawPart())
|
||||||
|
Dim nCurrAx As Integer = 0
|
||||||
|
EgtGetInfo( nPartId, INFO_FRAME_DIR, nCurrAx)
|
||||||
|
If nCurrAx = 3 Then
|
||||||
|
OthSideTxBl.Visibility = Visibility.Visible
|
||||||
|
OthSideChBx.Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
OthSideTxBl.Visibility = Visibility.Hidden
|
||||||
|
OthSideChBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateMachiningList(MachiningType As Integer, CurrTool As String, ByRef MachiningList As ObservableCollection(Of String))
|
Private Sub UpdateMachiningList(MachiningType As Integer, CurrTool As String, ByRef MachiningList As ObservableCollection(Of String))
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.0*"/>
|
||||||
|
<RowDefinition Height="1.0*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
@@ -112,29 +112,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
<!--Parametri WaterJet: 2 Parametri-->
|
||||||
<GroupBox Name="RectificationWJParamGpBx" Grid.Column="1" Grid.Row="4" Margin="0,0,5,0"
|
<GroupBox Name="WjsParamGpBx" Grid.Column="1" Grid.RowSpan="2" 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}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -145,35 +124,17 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
<TextBlock Name="WjOptimizeTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||||
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0"
|
<CheckBox Name="WjOptimizeChBx" Grid.Column="2" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
|
||||||
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
|
||||||
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" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||||
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4"
|
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
|
||||||
@@ -213,7 +174,6 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ Public Class Alarms2PageUC
|
|||||||
|
|
||||||
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
SawGpBx.Header = EgtMsg(90925) ' Parametri lama
|
||||||
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
HolesGpBx.Header = EgtMsg(90917) ' Parametri fori
|
||||||
|
WjsParamGpBx.Header = EgtMsg(91058) ' Parametri waterjet
|
||||||
MillingsParamGpBx.Header = EgtMsg(90929) ' Parametri fresature
|
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
|
HolesOffsetTxBl.Text = EgtMsg(90909) ' Offset fori
|
||||||
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
HolesOverlapTxBl.Text = EgtMsg(90910) ' Sovrapp. fori
|
||||||
@@ -30,24 +28,17 @@ Public Class Alarms2PageUC
|
|||||||
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
ExtArcMinRadTxBl.Text = EgtMsg(90918) ' Rmin archi est.
|
||||||
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
IntArcMaxSideAngTxBl.Text = EgtMsg(90924) ' Amax archi int.
|
||||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||||
|
WjOptimizeTxBl.Text = EgtMsg(91043) ' Ottimizza
|
||||||
|
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||||
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
CornerCutsTxBl.Text = EgtMsg(90944) ' Sempre sugli angoli
|
||||||
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
InternalCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||||
ShortTxBl.Text = EgtMsg(90949) ' Accorciamento
|
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
|
End Sub
|
||||||
|
|
||||||
Private Sub Allarm2Page_Loaded() Handles Me.Loaded
|
Private Sub Alarms2Page_Loaded() Handles Me.Loaded
|
||||||
If m_bFirst Then
|
If m_bFirst Then
|
||||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
' Se non previsti tagli di lama, nascondo i relativi parametri
|
||||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If Not m_CurrentMachine.bSawing Then
|
||||||
SawGpBx.Visibility = Visibility.Hidden
|
SawGpBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -57,25 +48,28 @@ Public Class Alarms2PageUC
|
|||||||
' Disattivo il gruppo dei parametri fori
|
' Disattivo il gruppo dei parametri fori
|
||||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
'Non faccio alcunchè
|
' Non faccio alcunchè
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
'Da implementare
|
' Da implementare
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
' Se non previste forature, disabilito relativo box
|
' Se non previste forature, nascondo relativo box
|
||||||
If Not m_CurrentMachine.bDrilling Then
|
If Not m_CurrentMachine.bDrilling Then
|
||||||
HolesGpBx.Visibility = Visibility.Hidden
|
HolesGpBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
' Se non previste fresature, nascondo relativo box e uso fresa con incisione
|
||||||
If Not m_CurrentMachine.bMilling Then
|
If Not m_CurrentMachine.bMilling Then
|
||||||
MillingsParamGpBx.Visibility = Visibility.Hidden
|
MillingsParamGpBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se non previsti tagli waterjet, disabilito relativo box
|
' Se non previsto taglio ad acqua (waterjet), nascondo relativo box
|
||||||
If Not m_CurrentMachine.bWaterJetting Then
|
If Not m_CurrentMachine.bWaterJet Then
|
||||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
' se altrimenti non c'è lama, nascondo il check e lo considero sempre vero
|
||||||
|
ElseIf Not m_CurrentMachine.bSawing Then
|
||||||
|
WjIntCutsTxBl.Visibility = Visibility.Hidden
|
||||||
|
WjIntCutsChBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
m_bFirst = False
|
m_bFirst = False
|
||||||
@@ -103,11 +97,15 @@ Public Class Alarms2PageUC
|
|||||||
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
AngleCutExtraLenTxBx.Text = LenToString(dVal, 2)
|
||||||
' Leggo raggio minimo arco esterno
|
' Leggo raggio minimo arco esterno
|
||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
If Not EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal) Then
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||||
|
End If
|
||||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||||
' Leggo angolo di fianco massimo arco interno
|
' Leggo angolo di fianco massimo arco interno
|
||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
if Not EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal) Then
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||||
|
End If
|
||||||
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||||
@@ -126,17 +124,10 @@ Public Class Alarms2PageUC
|
|||||||
' Leggo accorciamento angoli con fresa
|
' Leggo accorciamento angoli con fresa
|
||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
ShortTxBx.Text = LenToString(dVal, 2)
|
ShortTxBx.Text = LenToString(dVal, 2)
|
||||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
' Leggo ottimizzazione lavorazione waterjet
|
||||||
EnableRectificationChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
WjOptimizeChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_OPTIMIZE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
WjIntCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
' Leggo lavorazione interni con waterjet
|
||||||
' Lavorazione preforo lavello con WaterJet
|
WjIntCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
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
|
End Sub
|
||||||
|
|
||||||
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
Private Sub CutExtraLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles CutExtraLenTxBx.EgtClosed
|
||||||
@@ -156,17 +147,25 @@ Public Class Alarms2PageUC
|
|||||||
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
Private Sub ExtArcMinRadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ExtArcMinRadTxBx.EgtClosed
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
StringToLen(ExtArcMinRadTxBx.Text, dVal)
|
||||||
|
If EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal) Then
|
||||||
|
EgtMdbSave()
|
||||||
|
Else
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||||
|
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||||
|
End If
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_EXTARCMINRAD, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
|
||||||
EgtMdbSave()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
Private Sub IntArcMaxSideAngTxBx_EgtClosed(sender As Object, e As EventArgs) Handles IntArcMaxSideAngTxBx.EgtClosed
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
StringToDouble(IntArcMaxSideAngTxBx.Text, dVal)
|
||||||
|
If EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal) Then
|
||||||
|
EgtMdbSave()
|
||||||
|
Else
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||||
|
IntArcMaxSideAngTxBx.Text = DoubleToString(dVal, 2)
|
||||||
|
End If
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
|
||||||
EgtMdbSave()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||||
@@ -200,19 +199,13 @@ Public Class Alarms2PageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
Private Sub OneHoleInCornerChBx_Click(sender As Object, e As RoutedEventArgs) Handles OneHoleInCornerChBx.Click
|
||||||
If OneHoleInCornerChBx.IsChecked() Then
|
Dim sVal As String = If( OneHoleInCornerChBx.IsChecked(), "1", "0")
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, sVal, m_MainWindow.GetMachIniFile())
|
||||||
Else
|
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, "0", m_MainWindow.GetMachIniFile())
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||||
If CornerCutsChBx.IsChecked() Then
|
Dim sVal As String = If( CornerCutsChBx.IsChecked(), "1", "0")
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, sVal, m_MainWindow.GetMachIniFile())
|
||||||
Else
|
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
Private Sub ShortTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ShortTxBx.EgtClosed
|
||||||
@@ -222,57 +215,18 @@ Public Class Alarms2PageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
Private Sub InternalCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles InternalCutsChBx.Click
|
||||||
If InternalCutsChBx.IsChecked() Then
|
Dim sVal As String = If( InternalCutsChBx.IsChecked(), "1", "0")
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, sVal, m_MainWindow.GetMachIniFile())
|
||||||
Else
|
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
Private Sub WjOptimizeChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjOptimizeChBx.Click
|
||||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
Dim sVal As String = If( WjOptimizeChBx.IsChecked(), "1", "0")
|
||||||
If EnableRectificationChBx.IsChecked() Then
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_WATERJET_OPTIMIZE, sVal, m_MainWindow.GetMachIniFile())
|
||||||
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
|
End Sub
|
||||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
|
||||||
|
|
||||||
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
Private Sub WjIntCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles WjIntCutsChBx.Click
|
||||||
If WjIntCutsChBx.IsChecked() Then
|
Dim sVal As String = If( WjIntCutsChBx.IsChecked(), "1", "0")
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_WATERJET_ON_SINKS, sVal, m_MainWindow.GetMachIniFile())
|
||||||
Else
|
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, "0", m_MainWindow.GetMachIniFile())
|
|
||||||
End If
|
|
||||||
End Sub
|
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
|
End Class
|
||||||
|
|||||||
@@ -135,115 +135,9 @@
|
|||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<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="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<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="{StaticResource 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="{StaticResource 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>
|
|
||||||
|
|
||||||
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="1"
|
|
||||||
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="WjIntCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
|
||||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
</Grid>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
</Grid>-->
|
|
||||||
|
|
||||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Margin="5,0,5,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.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||||
|
|
||||||
@@ -299,27 +193,27 @@
|
|||||||
|
|
||||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrSawingTiltedTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="CurrSawingTiltedTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTiltedTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrSawingTiltedTxBx" Grid.Column="1" Grid.Row="1" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="2" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="3" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="4" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
@@ -328,11 +222,11 @@
|
|||||||
<Grid Grid.Column="1" Grid.Row="5">
|
<Grid Grid.Column="1" Grid.Row="5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="5*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.6*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="5,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -353,44 +247,6 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
|
||||||
<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"
|
|
||||||
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"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>-->
|
|
||||||
|
|
||||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,5,0" >
|
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,5,0" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -428,16 +284,6 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
|
||||||
<Grid>
|
|
||||||
<TextBlock Name="FinalHomeTxBl"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
|
||||||
<CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>-->
|
|
||||||
|
|
||||||
<GroupBox Name="NestingParamGpBx" Margin="0,0,5,0"
|
<GroupBox Name="NestingParamGpBx" Margin="0,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||||
<Grid Name="NestingGrid">
|
<Grid Name="NestingGrid">
|
||||||
@@ -579,7 +425,7 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="FinalSawCutGpBx" Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Margin="0,0,5,0"
|
<GroupBox Name="FinalSawCutGpBx" Grid.Column="2" Grid.Row="4" Margin="0,0,5,0"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -588,7 +434,6 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
@@ -596,14 +441,6 @@
|
|||||||
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right"/>
|
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>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
@@ -696,6 +533,18 @@
|
|||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Column="3" Grid.Row="8" Margin="0,0,5,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="4.5*"/>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Name="UseBAxisLockTxBl" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="UseBAxisLockChBx"
|
||||||
|
Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
|
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
|
||||||
If Not String.IsNullOrEmpty(GetExecLuaFile()) And
|
If Not String.IsNullOrWhiteSpace(GetExecLuaFile()) Then
|
||||||
ExecLuaBtn.Visibility = Visibility.Visible Then
|
ExecLuaBtn.Visibility = Visibility.Visible
|
||||||
Else
|
Else
|
||||||
ExecLuaBtn.Visibility = Visibility.Hidden
|
ExecLuaBtn.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
@@ -108,14 +108,14 @@ Public Class AlarmsPageUC
|
|||||||
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
WashingTxBl.Text = EgtMsg(90941) ' Lavaggio
|
||||||
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
|
||||||
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
|
||||||
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
|
UseBAxisLockTxBl.Text = EgtMsg(91257) ' Blocca Asse B
|
||||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
If m_bFirst Then
|
If m_bFirst Then
|
||||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
' in assenza della testa lama (H1) nascondo i parametri lama
|
||||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If Not m_CurrentMachine.ExistsSawHead() Then
|
||||||
TopMillGpBx.Visibility = Visibility.Hidden
|
TopMillGpBx.Visibility = Visibility.Hidden
|
||||||
CurrSawTxBl.Visibility = Visibility.Hidden
|
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||||
CurrSawCmBx.Visibility = Visibility.Hidden
|
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||||
@@ -132,11 +132,8 @@ Public Class AlarmsPageUC
|
|||||||
EndRow.Height = New GridLength(0.25, GridUnitType.Star)
|
EndRow.Height = New GridLength(0.25, GridUnitType.Star)
|
||||||
CurrToolsGrid.RowDefinitions.Add(EndRow)
|
CurrToolsGrid.RowDefinitions.Add(EndRow)
|
||||||
SetUpGpBx.SetValue(Grid.RowSpanProperty, 1)
|
SetUpGpBx.SetValue(Grid.RowSpanProperty, 1)
|
||||||
' Disattivo il gruppo dei parametri fori
|
Case Else
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
'Non faccio alcunchè
|
||||||
'Non faccio alcunchè
|
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
|
||||||
'Da implementare
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
' Se non previste fresature, disabilito relativo box e uso fresa con incisione
|
||||||
@@ -155,7 +152,7 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Abilitazione Feed ridotta su inizio/fine tagli
|
' Abilitazione Feed ridotta su inizio/fine tagli
|
||||||
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
|
If m_CurrentMachine.bFsevEnable And m_CurrentMachine.ExistsSawHead() Then
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -187,7 +184,7 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
m_AuxToolTypeList.Clear()
|
m_AuxToolTypeList.Clear()
|
||||||
' creo l'elenco degli utensili ausiliri
|
' creo l'elenco degli utensili ausiliari
|
||||||
If m_CurrentMachine.bDrill Then
|
If m_CurrentMachine.bDrill Then
|
||||||
m_AuxToolTypeList.Add(New StringIdCmBx(1, EgtMsg(90921))) ' Foretto
|
m_AuxToolTypeList.Add(New StringIdCmBx(1, EgtMsg(90921))) ' Foretto
|
||||||
End If
|
End If
|
||||||
@@ -219,7 +216,7 @@ Public Class AlarmsPageUC
|
|||||||
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
|
||||||
' verifico quale utensile è attulamente "montato sulla macchina"
|
' verifico quale utensile è attualmente "montato sulla macchina"
|
||||||
If m_CurrentMachine.sCurrDrill <> String.Empty Then
|
If m_CurrentMachine.sCurrDrill <> String.Empty Then
|
||||||
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
||||||
m_DrillList.Add(NO_TOOL)
|
m_DrillList.Add(NO_TOOL)
|
||||||
@@ -257,9 +254,10 @@ Public Class AlarmsPageUC
|
|||||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
' Aggiorno la lista delle lame con quelle montate sul portautensile automatico
|
' Determino la lista delle lame presenti nei TC automatico e manuale
|
||||||
Dim m_SawOnHolderList As New ObservableCollection(Of String)
|
Dim SawOnAllTcList As New ObservableCollection(Of String)
|
||||||
Dim bOnHolder As Boolean = False
|
Dim SawOnAutoTcList As New ObservableCollection(Of String)
|
||||||
|
Dim bSawFound As Boolean = False
|
||||||
For Each sNameTool As String In m_SawList
|
For Each sNameTool As String In m_SawList
|
||||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
' Verifico che sia montata su un portautensile
|
' Verifico che sia montata su un portautensile
|
||||||
@@ -267,15 +265,25 @@ Public Class AlarmsPageUC
|
|||||||
Dim sTCPos As String = String.Empty
|
Dim sTCPos As String = String.Empty
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||||
If Not String.IsNullOrEmpty(sTCPos) Then
|
If Not String.IsNullOrEmpty(sTCPos) Then
|
||||||
' Cerco nel porta utensili automaitico
|
' Cerco nel TC automatico
|
||||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
For Each ToolPosition As ToolChangerPos In m_CurrentMachine.ToolChanger
|
||||||
If ToolPosition.sTool <> String.Empty Then
|
If ToolPosition.sTool <> String.Empty Then
|
||||||
If sNameTool = ToolPosition.sTool Then
|
If sNameTool = ToolPosition.sTool Then
|
||||||
m_SawOnHolderList.Add(sNameTool)
|
SawOnAllTcList.Add(sNameTool)
|
||||||
|
SawOnAutoTcList.Add(sNameTool)
|
||||||
' Se il nome dell'utensile è lo stesso di quello impostato nella combo allora lo setto
|
' Se il nome dell'utensile è lo stesso di quello impostato nella combo allora lo setto
|
||||||
If sNameTool = m_CurrentMachine.sCurrSaw Then
|
If sNameTool = m_CurrentMachine.sCurrSaw Then bSawFound = True
|
||||||
bOnHolder = True
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Cerco nel TC manuale
|
||||||
|
For Each ToolPosition As ToolChangerPos In m_CurrentMachine.ManualToolChanger
|
||||||
|
If ToolPosition.sTool <> String.Empty Then
|
||||||
|
If sNameTool = ToolPosition.sTool Then
|
||||||
|
SawOnAllTcList.Add(sNameTool)
|
||||||
|
' Se il nome dell'utensile è lo stesso di quello impostato nella combo allora lo setto
|
||||||
|
If sNameTool = m_CurrentMachine.sCurrSaw Then bSawFound = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -283,9 +291,10 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
m_SawList = m_SawOnHolderList
|
' Sostituisco la lista delle lame con quelle disponibili su TC automatico e manuale
|
||||||
|
m_SawList = SawOnAllTcList
|
||||||
CurrSawCmBx.ItemsSource = m_SawList
|
CurrSawCmBx.ItemsSource = m_SawList
|
||||||
If bOnHolder Then
|
If bSawFound Then
|
||||||
' reimposto la lavorazione di lama e la lama impostate in macchina
|
' reimposto la lavorazione di lama e la lama impostate in macchina
|
||||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrSaw)
|
EgtTdbSetCurrTool(m_CurrentMachine.sCurrSaw)
|
||||||
' Seleziono lama corrente
|
' Seleziono lama corrente
|
||||||
@@ -293,26 +302,28 @@ Public Class AlarmsPageUC
|
|||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrSawing = ""
|
m_CurrentMachine.sCurrSawing = ""
|
||||||
End If
|
End If
|
||||||
|
' Per i tagli inclinati imposto solo le lame su TC automatico
|
||||||
CurrSawTiltedCmBx.ItemsSource = m_SawList
|
CurrSawTiltedCmBx.ItemsSource = SawOnAutoTcList
|
||||||
If m_SawList.IndexOf(m_CurrentMachine.sCurrSawTilted) > -1 Then
|
If SawOnAutoTcList.IndexOf(m_CurrentMachine.sCurrSawTilted) > -1 Then
|
||||||
' Seleziono lama corrente
|
' Seleziono lama corrente
|
||||||
CurrSawTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawTilted
|
CurrSawTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawTilted
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrSawingTilted = ""
|
m_CurrentMachine.sCurrSawingTilted = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' attivo la selezione della lama per il taglio in inlinato
|
' Se abilitato TC, visualizzo la selezione della lama per il taglio inclinato
|
||||||
CurrSawTiltedTxBl.Visibility = Visibility.Visible
|
If CamAuto.CanChangeSaw() Then
|
||||||
CurrSawTiltedCmBx.Visibility = Visibility.Visible
|
CurrSawTiltedTxBl.Visibility = Visibility.Visible
|
||||||
|
CurrSawTiltedCmBx.Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
|
|
||||||
' attivo il bottone per l'apertura della pagina che mostra la configurazione degli utensili in parcheggio
|
' attivo il bottone per l'apertura della pagina che mostra gli utensili nel TC
|
||||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
' aggiorno le TextBlock con le lavorazioni correnti
|
' aggiorno le TextBlock con le lavorazioni correnti
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
|
|
||||||
' Leggo offset fori
|
' Leggo offset fori
|
||||||
Dim dVal As Double
|
Dim dVal As Double
|
||||||
@@ -323,7 +334,7 @@ Public Class AlarmsPageUC
|
|||||||
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
' Salvo DB lavorazioni con aggiornamenti parametri generali
|
||||||
EgtMdbSave()
|
EgtMdbSave()
|
||||||
' Leggo flag abilitazione incisioni con fresa
|
' Leggo flag abilitazione incisioni con fresa
|
||||||
TmEnableChBx.IsChecked =
|
TmEnableChBx.IsChecked = m_CurrentMachine.bMilling AndAlso
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
' Leggo profondità e larghezza incisioni
|
' Leggo profondità e larghezza incisioni
|
||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_ENGRAVING_DEPTH, 0, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_ENGRAVING_DEPTH, 0, m_MainWindow.GetMachIniFile())
|
||||||
@@ -333,21 +344,23 @@ Public Class AlarmsPageUC
|
|||||||
' Flag per movimento in home alla fine dei tagli diretti
|
' Flag per movimento in home alla fine dei tagli diretti
|
||||||
FinalHomeChBx.IsChecked = m_CurrentMachine.bDirectCutsFinalHome
|
FinalHomeChBx.IsChecked = m_CurrentMachine.bDirectCutsFinalHome
|
||||||
' Leggo tagli ridotti per interferenza in nesting
|
' Leggo tagli ridotti per interferenza in nesting
|
||||||
CompleteCutsChBx.IsChecked =
|
CompleteCutsChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
|
||||||
' Flag per nesting allineato
|
' Flag per nesting allineato
|
||||||
AlignChBx.IsChecked =
|
AlignChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
|
||||||
' Flag per nesting a ghigliottina
|
' Flag per nesting a ghigliottina
|
||||||
GhigliottinaChBx.IsChecked =
|
GhigliottinaChBx.IsChecked = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
|
||||||
' Flag per nesting automatico
|
' Flag per nesting automatico
|
||||||
AutomaticChBx.IsChecked =
|
AutomaticChBx.IsChecked = (GetPrivateProfileInt(S_NEST, K_AUTOMATICOPTIMIZE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
(GetPrivateProfileInt(S_NEST, K_AUTOMATICOPTIMIZE, 0, m_MainWindow.GetIniFile()) <> 0)
|
|
||||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||||
' Flag per inserire la puasa dopo la sgrossatura delle cornici
|
' Flag per inserire la pausa dopo la sgrossatura delle cornici
|
||||||
FramePauseChBx.IsChecked =
|
If m_CurrentMachine.bSawRoughing Then
|
||||||
(GetPrivateProfileInt(S_MACH_FRAME, K_MACH_PAUSE, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
FrameGpBx.Visibility = Visibility.Visible
|
||||||
|
FramePauseChBx.IsChecked = (GetPrivateProfileInt(S_MACH_FRAME, K_MACH_PAUSE, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
Else
|
||||||
|
FrameGpBx.Visibility = Visibility.Hidden
|
||||||
|
FramePauseChBx.IsChecked = False
|
||||||
|
End If
|
||||||
|
|
||||||
' Aggiorno messaggio sovratavola con numero tavola
|
' Aggiorno messaggio sovratavola con numero tavola
|
||||||
If GetTableCount() > 1 Then
|
If GetTableCount() > 1 Then
|
||||||
AdditionalTableTxBl.Text = EgtMsg(90936) & " " & GetCurrentTable().ToString() ' Altezza sovratavola
|
AdditionalTableTxBl.Text = EgtMsg(90936) & " " & GetCurrentTable().ToString() ' Altezza sovratavola
|
||||||
@@ -377,7 +390,7 @@ Public Class AlarmsPageUC
|
|||||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||||
|
|
||||||
' leggo flag per tavola definita da laser
|
' leggo flag per origine pezzo definita da laser ( o lama)
|
||||||
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
||||||
If nUseLaserOrigin = -1 Then
|
If nUseLaserOrigin = -1 Then
|
||||||
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
||||||
@@ -387,12 +400,29 @@ Public Class AlarmsPageUC
|
|||||||
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
|
' leggo flag per bloccaggio asse B con pistone o similare
|
||||||
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
|
Dim nUseBAxisLock As Integer = GetPrivateProfileInt(S_MACH_NEST, K_USEBAXISLOCK, -1, m_MainWindow.GetMachIniFile())
|
||||||
|
If nUseBAxisLock = -1 Then
|
||||||
|
UseBAxisLockTxBl.Visibility = Visibility.Hidden
|
||||||
|
UseBAxisLockChBx.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
UseBAxisLockTxBl.Visibility = Visibility.Visible
|
||||||
|
UseBAxisLockChBx.IsChecked = (nUseBAxisLock <> 0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Taglio finale
|
||||||
|
If m_CurrentMachine.bSawing Then
|
||||||
|
FinalSawCutGpBx.Visibility = Visibility.Visible
|
||||||
|
EnableFinalSawCutChBx.IsChecked = m_CurrentMachine.bEnableFinalSawCut
|
||||||
|
Else
|
||||||
|
FinalSawCutGpBx.Visibility = Visibility.Hidden
|
||||||
|
EnableFinalSawCutChBx.IsChecked = False
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||||
Private Sub RefreschMachining()
|
Private Sub RefreshMachining()
|
||||||
If m_CurrentMachine.sCurrSawing <> String.Empty Then
|
If m_CurrentMachine.sCurrSawing <> String.Empty Then
|
||||||
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
|
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
|
||||||
CurrSawingTxBl.Visibility = Windows.Visibility.Visible
|
CurrSawingTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -497,7 +527,13 @@ Public Class AlarmsPageUC
|
|||||||
Select Case SelectedItem.nId
|
Select Case SelectedItem.nId
|
||||||
Case 0
|
Case 0
|
||||||
m_CurrentMachine.sCurrDrill = String.Empty
|
m_CurrentMachine.sCurrDrill = String.Empty
|
||||||
|
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||||
m_CurrentMachine.sCurrMill = String.Empty
|
m_CurrentMachine.sCurrMill = String.Empty
|
||||||
|
m_CurrentMachine.sCurrMilling = String.Empty
|
||||||
|
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||||
|
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||||
|
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||||
|
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||||
Case 1
|
Case 1
|
||||||
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
||||||
m_DrillList.Add(NO_TOOL)
|
m_DrillList.Add(NO_TOOL)
|
||||||
@@ -563,8 +599,8 @@ Public Class AlarmsPageUC
|
|||||||
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
||||||
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
||||||
End Select
|
End Select
|
||||||
' aggionro l'elenco delle lavoarzioni
|
' aggiorno l'elenco delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -584,17 +620,6 @@ Public Class AlarmsPageUC
|
|||||||
m_CurrentMachine.sCurrSawing = String.Empty
|
m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dim sVal As String = String.Empty
|
|
||||||
'Dim dVal As Double = 0
|
|
||||||
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
|
||||||
' StringToDouble(sVal, dVal)
|
|
||||||
' m_CurrentMachine.SetFsevLength(dVal)
|
|
||||||
'End If
|
|
||||||
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
|
||||||
' StringToDouble(sVal, dVal)
|
|
||||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim sVal As String = String.Empty
|
Dim sVal As String = String.Empty
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||||
@@ -613,7 +638,7 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
|
|
||||||
' Se è associata anche una lavorazione inclinata allora deve essere resettata
|
' Se è associata anche una lavorazione inclinata allora deve essere resettata
|
||||||
If m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
If m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
@@ -630,8 +655,36 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Se TC anche con lame
|
||||||
|
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
|
' Se in uso lama da TC
|
||||||
|
If CamAuto.CanChangeSaw() Then
|
||||||
|
CurrSawTiltedTxBl.Visibility = Visibility.Visible
|
||||||
|
CurrSawTiltedCmBx.Visibility = Visibility.Visible
|
||||||
|
If Not String.IsNullOrEmpty(m_CurrentMachine.sCurrSawTilted) Then
|
||||||
|
For Each ToolPosition As ToolChangerPos In m_CurrentMachine.ManualToolChanger
|
||||||
|
If m_CurrentMachine.sCurrSawTilted = ToolPosition.sTool And ToolPosition.sName = "T0" Then
|
||||||
|
m_CurrentMachine.sCurrSawTilted = String.Empty
|
||||||
|
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||||
|
CurrSawTiltedCmBx.SelectedItem = Nothing
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
' altrimenti in uso lama manuale (non sono utilizzabili altri utensili)
|
||||||
|
Else
|
||||||
|
CurrSawTiltedTxBl.Visibility = Visibility.Hidden
|
||||||
|
CurrSawTiltedCmBx.Visibility = Visibility.Hidden
|
||||||
|
If m_CurrentMachine.sCurrSawTilted <> m_CurrentMachine.sCurrSaw Then
|
||||||
|
m_CurrentMachine.sCurrSawTilted = m_CurrentMachine.sCurrSaw
|
||||||
|
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- SAW TILTED --
|
' -- SAW TILTED --
|
||||||
@@ -649,25 +702,10 @@ Public Class AlarmsPageUC
|
|||||||
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Dim sVal As String = String.Empty
|
|
||||||
' Dim dVal As Double = 0
|
|
||||||
' If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
|
||||||
' StringToDouble(sVal, dVal)
|
|
||||||
' m_CurrentMachine.SetFsevLength(dVal)
|
|
||||||
' End If
|
|
||||||
' If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
|
||||||
' StringToDouble(sVal, dVal)
|
|
||||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
|
||||||
' End If
|
|
||||||
'
|
|
||||||
' ' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
|
||||||
' CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
|
||||||
' CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
|
||||||
|
|
||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- DRILL --
|
' -- DRILL --
|
||||||
@@ -702,7 +740,7 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- MILL --
|
' -- MILL --
|
||||||
@@ -737,7 +775,7 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- CUPWHEEL --
|
' -- CUPWHEEL --
|
||||||
@@ -772,7 +810,7 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' -- WATERJET --
|
' -- WATERJET --
|
||||||
@@ -805,7 +843,7 @@ Public Class AlarmsPageUC
|
|||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
RefreschMachining()
|
RefreshMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET
|
#End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET
|
||||||
@@ -1031,6 +1069,14 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UseBAxisLockChBx_Click() Handles UseBAxisLockChBx.Click
|
||||||
|
If UseBAxisLockChBx.IsChecked() Then
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_USEBAXISLOCK, "1", m_MainWindow.GetMachIniFile())
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_USEBAXISLOCK, "0", m_MainWindow.GetMachIniFile())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
||||||
If WashingChBx.IsChecked() Then
|
If WashingChBx.IsChecked() Then
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||||
@@ -1149,7 +1195,7 @@ Public Class AlarmsPageUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
' Se fanuc passo in modalità AUTO e attivo
|
' Se Fanuc passo in modalità AUTO e attivo
|
||||||
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||||
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(0)
|
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||||
@@ -1160,9 +1206,9 @@ Public Class AlarmsPageUC
|
|||||||
' Creo MsgBox di attesa
|
' Creo MsgBox di attesa
|
||||||
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(90241), ToolForProbing.m_ToolName), EgtMsg(90242), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(90241), ToolForProbing.m_ToolName), EgtMsg(90242), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
' Definisco flag tastatura
|
' Ciclo di verifica tastatura completata (attesa max 4 minuti)
|
||||||
Dim bProbingOk As Boolean = False
|
Dim bProbingOk As Boolean = False
|
||||||
For I As Integer = 0 To 120
|
For I As Integer = 0 To 240
|
||||||
' Devo rileggere la variabile ad ogni ciclo
|
' Devo rileggere la variabile ad ogni ciclo
|
||||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||||
System.Threading.Thread.Sleep(100)
|
System.Threading.Thread.Sleep(100)
|
||||||
@@ -1183,7 +1229,7 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
System.Threading.Thread.Sleep(900)
|
System.Threading.Thread.Sleep(900)
|
||||||
' Incremento progressbar
|
' Incremento progressbar
|
||||||
MsgBoxStateInfo.LoadingPrBr_Value += 100 / 120
|
MsgBoxStateInfo.LoadingPrBr_Value += ( 100 - MsgBoxStateInfo.LoadingPrBr_Value) / 60
|
||||||
' Costringo ad aggiornare UI
|
' Costringo ad aggiornare UI
|
||||||
UpdateUI()
|
UpdateUI()
|
||||||
' Verifico se interrotto dall'utente
|
' Verifico se interrotto dall'utente
|
||||||
@@ -1215,7 +1261,7 @@ Public Class AlarmsPageUC
|
|||||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||||
bRead = True
|
bRead = True
|
||||||
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||||
' Se fanuc il dato è in mm (NON MICRON)
|
' Se Fanuc il dato è in mm (NON MICRON)
|
||||||
If m_MainWindow.m_CNCommunication.m_nNCType <> 4 Then
|
If m_MainWindow.m_CNCommunication.m_nNCType <> 4 Then
|
||||||
dVal = dVal / 1000
|
dVal = dVal / 1000
|
||||||
End If
|
End If
|
||||||
@@ -1268,7 +1314,8 @@ Public Class AlarmsPageUC
|
|||||||
Select Case m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
|
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER,
|
||||||
|
CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
||||||
If ChooseTool.ShowDialog Then
|
If ChooseTool.ShowDialog Then
|
||||||
Return ChooseTool.GetSelectedTool
|
Return ChooseTool.GetSelectedTool
|
||||||
@@ -1346,15 +1393,8 @@ Public Class AlarmsPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
|
||||||
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
|
||||||
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(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 Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.Security.Cryptography.X509Certificates
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ChooseToolWD
|
Public Class ChooseToolWD
|
||||||
@@ -78,12 +79,14 @@ Public Class ChooseToolWD
|
|||||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
Dim bIsSaw As Boolean = ToolIsSaw( ToolChangerPos.sTool)
|
||||||
|
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, bIsSaw))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
Dim bIsSaw As Boolean = ToolIsSaw( ToolChangerPos.sTool)
|
||||||
|
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, bIsSaw))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
@@ -92,6 +95,13 @@ Public Class ChooseToolWD
|
|||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function ToolIsSaw( sToolName As String) As Boolean
|
||||||
|
If Not EgtTdbSetCurrTool( sToolName) Then Return False
|
||||||
|
Dim nType As Integer = MCH_TY.NONE
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
|
Return ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||||
' Disabilito Ok
|
' Disabilito Ok
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ Public Class CurrentMachine
|
|||||||
|
|
||||||
' Dati su linea di produzione
|
' Dati su linea di produzione
|
||||||
Private m_bDemo As Boolean = False
|
Private m_bDemo As Boolean = False
|
||||||
Public nLastProjSentToViewDEMO As Integer = 0
|
|
||||||
|
|
||||||
Private m_bProdLine As Boolean = False
|
Private m_bProdLine As Boolean = False
|
||||||
Private m_sVarProg1 As String = "E80021"
|
Private m_sVarProg1 As String = "E80021"
|
||||||
Private m_nProg1 As Integer = 901
|
Private m_nProg1 As Integer = 901
|
||||||
@@ -81,8 +79,8 @@ Public Class CurrentMachine
|
|||||||
Private m_bPolishingWheel As Boolean = False
|
Private m_bPolishingWheel As Boolean = False
|
||||||
Private m_bWaterJet As Boolean = False
|
Private m_bWaterJet As Boolean = False
|
||||||
|
|
||||||
' Flag che indica se gesire l'inversione del taglio nei tagli singoli
|
' Flag che indica se gestire l'inversione del taglio nei tagli singoli
|
||||||
Private m_bEnableInvetrt As Boolean = True
|
Private m_bEnableInvert As Boolean = True
|
||||||
|
|
||||||
' Abilitazione DB WaterJet
|
' Abilitazione DB WaterJet
|
||||||
Private m_bFromDBWaterJet As Boolean = False
|
Private m_bFromDBWaterJet As Boolean = False
|
||||||
@@ -217,9 +215,6 @@ Public Class CurrentMachine
|
|||||||
' Massima altezza lavorabile con lama grande
|
' Massima altezza lavorabile con lama grande
|
||||||
Private m_dHighPieceZ As Double = 200.0
|
Private m_dHighPieceZ As Double = 200.0
|
||||||
|
|
||||||
'
|
|
||||||
Private m_dFinalDepth As Double = 0.0
|
|
||||||
|
|
||||||
' Flag che abilita l'esecuzione del taglio finale
|
' Flag che abilita l'esecuzione del taglio finale
|
||||||
Private m_bEnableFinalSawCut As Boolean = False
|
Private m_bEnableFinalSawCut As Boolean = False
|
||||||
|
|
||||||
@@ -457,6 +452,10 @@ Public Class CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend Function ExistsSawHead As Boolean
|
||||||
|
Return ( EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend ReadOnly Property bSaw As Boolean
|
Friend ReadOnly Property bSaw As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bSaw
|
Return m_bSaw
|
||||||
@@ -582,7 +581,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSaw
|
Return m_sCurrSaw
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAW, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAW, value, sMachIniFile) Then
|
||||||
m_sCurrSaw = value
|
m_sCurrSaw = value
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
||||||
End If
|
End If
|
||||||
@@ -594,7 +593,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawTilted
|
Return m_sCurrSawTilted
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWTILTED, value, sMachIniFile) Then
|
||||||
m_sCurrSawTilted = value
|
m_sCurrSawTilted = value
|
||||||
' m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
' m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
||||||
End If
|
End If
|
||||||
@@ -606,7 +605,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDrill
|
Return m_sCurrDrill
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRILL, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRILL, value, sMachIniFile) Then
|
||||||
m_sCurrDrill = value
|
m_sCurrDrill = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -617,7 +616,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrMill
|
Return m_sCurrMill
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRMILL, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRMILL, value, sMachIniFile) Then
|
||||||
m_sCurrMill = value
|
m_sCurrMill = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -628,7 +627,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrMillNoTip
|
Return m_sCurrMillNoTip
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRMILLNOTIP, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRMILLNOTIP, value, sMachIniFile) Then
|
||||||
m_sCurrMillNoTip = value
|
m_sCurrMillNoTip = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -639,7 +638,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDripSaw
|
Return m_sCurrDripSaw
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRIPSAW, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRIPSAW, value, sMachIniFile) Then
|
||||||
m_sCurrDripSaw = value
|
m_sCurrDripSaw = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -650,7 +649,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDripDrill
|
Return m_sCurrDripDrill
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILL, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRIPDRILL, value, sMachIniFile) Then
|
||||||
m_sCurrDripDrill = value
|
m_sCurrDripDrill = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -661,7 +660,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrWaterJet
|
Return m_sCurrWaterJet
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJET, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRWATERJET, value, sMachIniFile) Then
|
||||||
m_sCurrWaterJet = value
|
m_sCurrWaterJet = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -672,7 +671,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawing
|
Return m_sCurrSawing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||||
m_sCurrSawing = value
|
m_sCurrSawing = value
|
||||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
End If
|
End If
|
||||||
@@ -684,7 +683,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawingTilted
|
Return m_sCurrSawingTilted
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWINGTILTED, value, sMachIniFile) Then
|
||||||
m_sCurrSawingTilted = value
|
m_sCurrSawingTilted = value
|
||||||
'm_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
'm_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
End If
|
End If
|
||||||
@@ -697,11 +696,7 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
m_bApplySawingTilted = value
|
m_bApplySawingTilted = value
|
||||||
If m_bApplySawingTilted Then
|
EgtWriteStringUtf8toIni(S_MACH_MACH, K_APPLYSAWINGTILTED, If( m_bApplySawingTilted,"1","0"), sMachIniFile)
|
||||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "1", sMachIniFile)
|
|
||||||
Else
|
|
||||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "0", sMachIniFile)
|
|
||||||
End If
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -710,7 +705,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDrilling
|
Return m_sCurrDrilling
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRILLING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRILLING, value, sMachIniFile) Then
|
||||||
m_sCurrDrilling = value
|
m_sCurrDrilling = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -721,7 +716,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrMilling
|
Return m_sCurrMilling
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRMILLING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRMILLING, value, sMachIniFile) Then
|
||||||
m_sCurrMilling = value
|
m_sCurrMilling = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -732,7 +727,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrPocketing
|
Return m_sCurrPocketing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRPOCKETING, value, sMachIniFile) Then
|
||||||
m_sCurrPocketing = value
|
m_sCurrPocketing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -743,7 +738,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawRoughing
|
Return m_sCurrSawRoughing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWROUGHING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWROUGHING, value, sMachIniFile) Then
|
||||||
m_sCurrSawRoughing = value
|
m_sCurrSawRoughing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -754,7 +749,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawFinishing
|
Return m_sCurrSawFinishing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWFINISHING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWFINISHING, value, sMachIniFile) Then
|
||||||
m_sCurrSawFinishing = value
|
m_sCurrSawFinishing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -765,7 +760,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawSideFinishing
|
Return m_sCurrSawSideFinishing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWSIDEFINISHING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWSIDEFINISHING, value, sMachIniFile) Then
|
||||||
m_sCurrSawSideFinishing = value
|
m_sCurrSawSideFinishing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -776,7 +771,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrSawSingle
|
Return m_sCurrSawSingle
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWSINGLE, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRSAWSINGLE, value, sMachIniFile) Then
|
||||||
m_sCurrSawSingle = value
|
m_sCurrSawSingle = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -787,7 +782,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDripSawing
|
Return m_sCurrDripSawing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRIPSAWING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRIPSAWING, value, sMachIniFile) Then
|
||||||
m_sCurrDripSawing = value
|
m_sCurrDripSawing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -798,7 +793,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrDripDrilling
|
Return m_sCurrDripDrilling
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRDRIPDRILLING, value, sMachIniFile) Then
|
||||||
m_sCurrDripDrilling = value
|
m_sCurrDripDrilling = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -809,12 +804,11 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrWaterJetting
|
Return m_sCurrWaterJetting
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
||||||
m_sCurrWaterJetting = value
|
m_sCurrWaterJetting = value
|
||||||
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If m_bWaterJet And Not ExistsSawHead() Then
|
||||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -824,7 +818,7 @@ Public Class CurrentMachine
|
|||||||
Return m_sCurrWaterJettingQuality
|
Return m_sCurrWaterJettingQuality
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
If EgtWriteStringUtf8toIni(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||||
m_sCurrWaterJettingQuality = value
|
m_sCurrWaterJettingQuality = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -838,7 +832,7 @@ Public Class CurrentMachine
|
|||||||
|
|
||||||
Friend ReadOnly Property bEnableInvert As Boolean
|
Friend ReadOnly Property bEnableInvert As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bEnableInvetrt
|
Return m_bEnableInvert
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -994,8 +988,6 @@ Public Class CurrentMachine
|
|||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
m_dFsevLength = value
|
m_dFsevLength = value
|
||||||
' salvo il dato nelle UserNote della lavorazione
|
|
||||||
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
|
|
||||||
' salvo il dato nelle UserNote dell'utensile
|
' salvo il dato nelle UserNote dell'utensile
|
||||||
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
|
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
|
||||||
End If
|
End If
|
||||||
@@ -1014,8 +1006,6 @@ Public Class CurrentMachine
|
|||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
m_dFsevPerc = value
|
m_dFsevPerc = value
|
||||||
'' salvo il dato nelle UserNote della lavorazione
|
|
||||||
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
|
|
||||||
' salvo il dato nelle UserNote dell'utensile
|
' salvo il dato nelle UserNote dell'utensile
|
||||||
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
|
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
|
||||||
End If
|
End If
|
||||||
@@ -1053,7 +1043,7 @@ Public Class CurrentMachine
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
If value <> m_ToolChanger(Index).sTool Then
|
If value <> m_ToolChanger(Index).sTool Then
|
||||||
m_ToolChanger(Index).sTool = value
|
m_ToolChanger(Index).sTool = value
|
||||||
WritePrivateProfileString(S_TOOLCHANGER, K_POS & Index + 1, value, sMachIniFile)
|
EgtWriteStringUtf8toIni(S_TOOLCHANGER, K_POS & (Index + 1).ToString(), value, sMachIniFile)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -1084,7 +1074,7 @@ Public Class CurrentMachine
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
If value <> m_ManualToolChanger(Index).sTool Then
|
If value <> m_ManualToolChanger(Index).sTool Then
|
||||||
m_ManualToolChanger(Index).sTool = value
|
m_ManualToolChanger(Index).sTool = value
|
||||||
WritePrivateProfileString(S_TOOLCHANGER, K_MANUALPOS & Index + 1, value, sMachIniFile)
|
EgtWriteStringUtf8toIni(S_TOOLCHANGER, K_MANUALPOS & (Index + 1).ToString(), value, sMachIniFile)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -1236,24 +1226,15 @@ Public Class CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Property dFinalDepth As Double
|
|
||||||
Get
|
|
||||||
Return m_dFinalDepth
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_dFinalDepth = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' Leggo da file ini nome macchina corrente
|
' Leggo da file ini nome macchina corrente
|
||||||
GetPrivateProfileString(S_MACH, K_CURRMACH, "", m_sMachineName, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_MACH, K_CURRMACH, "", m_sMachineName, m_MainWindow.GetIniFile())
|
||||||
' Impostazione direttorio macchina
|
' Impostazione direttorio macchina
|
||||||
m_sMachDir = m_MainWindow.GetMachinesRootDir & "\" & sMachineName
|
m_sMachDir = m_MainWindow.GetMachinesRootDir & "\" & m_sMachineName
|
||||||
' Impostazione path MachIni file
|
' Impostazione path MachIni file
|
||||||
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
|
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & m_sMachineName & "\" & m_sMachineName & ".ini"
|
||||||
' Leggo estensione del file programma pezzo
|
' Leggo estensione del file programma pezzo
|
||||||
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
|
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
|
||||||
' per gestione canali separati (macchina NUM con più di 5 Assi) ver. 2.5g1
|
' per gestione canali separati (macchina NUM con più di 5 Assi) ver. 2.5g1
|
||||||
@@ -1290,12 +1271,12 @@ Public Class CurrentMachine
|
|||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGSTATE2VAR, "", m_sProdLiProbingState2Var, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGSTATE2VAR, "", m_sProdLiProbingState2Var, sMachIniFile)
|
||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGTCPOS2VAR, "0", m_sProdLiProbingTcPos2Var, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGTCPOS2VAR, "0", m_sProdLiProbingTcPos2Var, sMachIniFile)
|
||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLISAWDIAMETER2VAR, "", m_sProdLiSawDiameter2Var, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLISAWDIAMETER2VAR, "", m_sProdLiSawDiameter2Var, sMachIniFile)
|
||||||
|
' Leggo parametri per foto su linea di lucidatura
|
||||||
GetPrivateProfileString(S_POLISHLINE, K_CLICKSTATE, "", m_sClickState, sMachIniFile)
|
GetPrivateProfileString(S_POLISHLINE, K_CLICKSTATE, "", m_sClickState, sMachIniFile)
|
||||||
GetPrivateProfileString(S_POLISHLINE, k_CLICKDIR, "", m_sClickDir, sMachIniFile)
|
GetPrivateProfileString(S_POLISHLINE, k_CLICKDIR, "", m_sClickDir, sMachIniFile)
|
||||||
If Not Directory.Exists(m_sClickDir) Then
|
If Not String.IsNullOrEmpty( m_sClickState) AndAlso Not Directory.Exists(m_sClickDir) Then
|
||||||
m_sClickState = ""
|
m_sClickState = ""
|
||||||
EgtOutLog("Directory " & m_sClickDir & " does not exist")
|
EgtOutLog("Polish Line Directory " & m_sClickDir & " does not exist")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Leggo configurazione degli utensili in macchina
|
' Leggo configurazione degli utensili in macchina
|
||||||
@@ -1355,61 +1336,61 @@ Public Class CurrentMachine
|
|||||||
' possibilità di definire attacco speciale per materiali ceramici
|
' possibilità di definire attacco speciale per materiali ceramici
|
||||||
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
||||||
' mantengo la direzione del taglio definita nel taglio diretto
|
' mantengo la direzione del taglio definita nel taglio diretto
|
||||||
m_bEnableInvetrt = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLEINVERT, 1, sMachIniFile) <> 0)
|
m_bEnableInvert = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLEINVERT, 1, sMachIniFile) <> 0)
|
||||||
|
|
||||||
' Leggo utensili correnti
|
' Leggo utensili correnti
|
||||||
' lama
|
' lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAW, "", m_sCurrSaw, sMachIniFile)
|
||||||
' lama inclinata
|
' lama inclinata
|
||||||
If m_MountedToolConfig = 4 Then
|
If m_MountedToolConfig = 4 Then
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, Nothing, m_sCurrSawTilted, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWTILTED, "", m_sCurrSawTilted, sMachIniFile)
|
||||||
Else
|
Else
|
||||||
' se non è configurato il cambio utensile e allora imposto l'unica lama disponibile per i tagli inclinati
|
' se non è configurato il cambio utensile e allora imposto l'unica lama disponibile per i tagli inclinati
|
||||||
m_sCurrSawTilted = m_sCurrSaw
|
m_sCurrSawTilted = m_sCurrSaw
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' foretto
|
' foretto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRILL, "", m_sCurrDrill, sMachIniFile)
|
||||||
' fresa
|
' fresa
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILL, Nothing, m_sCurrMill, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRMILL, "", m_sCurrMill, sMachIniFile)
|
||||||
' mola
|
' mola
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLNOTIP, Nothing, m_sCurrMillNoTip, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRMILLNOTIP, "", m_sCurrMillNoTip, sMachIniFile)
|
||||||
' lama da sotto
|
' lama da sotto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPSAW, Nothing, m_sCurrDripSaw, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRIPSAW, "", m_sCurrDripSaw, sMachIniFile)
|
||||||
' foretto da sotto
|
' foretto da sotto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILL, Nothing, m_sCurrDripDrill, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRIPDRILL, "", m_sCurrDripDrill, sMachIniFile)
|
||||||
' waterjet
|
' waterjet
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJET, Nothing, m_sCurrWaterJet, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRWATERJET, "", m_sCurrWaterJet, sMachIniFile)
|
||||||
|
|
||||||
' Leggo lavorazioni correnti
|
' Leggo lavorazioni correnti
|
||||||
' lama
|
' lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, m_sCurrSawing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWING, "", m_sCurrSawing, sMachIniFile)
|
||||||
' lama inlicnata
|
' lama inlicnata
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, Nothing, m_sCurrSawingTilted, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWINGTILTED, "", m_sCurrSawingTilted, sMachIniFile)
|
||||||
' applica lavorazione di lama inclinata
|
' applica lavorazione di lama inclinata
|
||||||
m_bApplySawingTilted = (GetPrivateProfileInt(S_MACH_MACH, K_APPLYSAWINGTILTED, 0, sMachIniFile) <> 0)
|
m_bApplySawingTilted = (GetPrivateProfileInt(S_MACH_MACH, K_APPLYSAWINGTILTED, 0, sMachIniFile) <> 0)
|
||||||
' foretto
|
' foretto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING, Nothing, m_sCurrDrilling, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRILLING, "", m_sCurrDrilling, sMachIniFile)
|
||||||
' fresa
|
' fresa
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLING, Nothing, m_sCurrMilling, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRMILLING, "", m_sCurrMilling, sMachIniFile)
|
||||||
' svuotatura
|
' svuotatura
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, Nothing, m_sCurrPocketing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRPOCKETING, "", m_sCurrPocketing, sMachIniFile)
|
||||||
' sgrossatura con lama
|
' sgrossatura con lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWROUGHING, Nothing, m_sCurrSawRoughing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWROUGHING, "", m_sCurrSawRoughing, sMachIniFile)
|
||||||
' finitura con lama
|
' finitura con lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWFINISHING, Nothing, m_sCurrSawFinishing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWFINISHING, "", m_sCurrSawFinishing, sMachIniFile)
|
||||||
' spatolatura con lama
|
' spatolatura con lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWSIDEFINISHING, Nothing, m_sCurrSawSideFinishing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWSIDEFINISHING, "", m_sCurrSawSideFinishing, sMachIniFile)
|
||||||
' taglio singolo
|
' taglio singolo
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWSINGLE, Nothing, m_sCurrSawSingle, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRSAWSINGLE, "", m_sCurrSawSingle, sMachIniFile)
|
||||||
' lama da sotto
|
' lama da sotto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPSAWING, Nothing, m_sCurrDripSawing, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRIPSAWING, "", m_sCurrDripSawing, sMachIniFile)
|
||||||
' foretto da sotto
|
' foretto da sotto
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRDRIPDRILLING, "", m_sCurrDripDrilling, sMachIniFile)
|
||||||
' waterjetting
|
' waterjetting
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRWATERJETTING, "", m_sCurrWaterJetting, sMachIniFile)
|
||||||
' waterjettingquality
|
' waterjettingquality
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, "", m_sCurrWaterJettingQuality, sMachIniFile)
|
||||||
|
|
||||||
' Leggo numero di portautensili
|
' Leggo numero di portautensili
|
||||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||||
@@ -1419,8 +1400,8 @@ Public Class CurrentMachine
|
|||||||
For Index As Integer = 1 To m_ToolChangerNbr
|
For Index As Integer = 1 To m_ToolChangerNbr
|
||||||
Dim sName As String = String.Empty
|
Dim sName As String = String.Empty
|
||||||
Dim sTool As String = String.Empty
|
Dim sTool As String = String.Empty
|
||||||
GetPrivateProfileString(S_TOOLCHANGER, K_NAME & Index, Nothing, sName, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_TOOLCHANGER, K_NAME & Index.ToString(), "", sName, sMachIniFile)
|
||||||
GetPrivateProfileString(S_TOOLCHANGER, K_POS & Index, Nothing, sTool, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_TOOLCHANGER, K_POS & Index.ToString(), "", sTool, sMachIniFile)
|
||||||
m_ToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
m_ToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -1432,8 +1413,8 @@ Public Class CurrentMachine
|
|||||||
For Index As Integer = 1 To m_ManualToolChangerNbr
|
For Index As Integer = 1 To m_ManualToolChangerNbr
|
||||||
Dim sName As String = String.Empty
|
Dim sName As String = String.Empty
|
||||||
Dim sTool As String = String.Empty
|
Dim sTool As String = String.Empty
|
||||||
GetPrivateProfileString(S_TOOLCHANGER, K_MANUALNAME & Index, Nothing, sName, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_TOOLCHANGER, K_MANUALNAME & Index.ToString(), "", sName, sMachIniFile)
|
||||||
GetPrivateProfileString(S_TOOLCHANGER, K_MANUALPOS & Index, Nothing, sTool, sMachIniFile)
|
EgtGetStringUtf8FromIni(S_TOOLCHANGER, K_MANUALPOS & Index.ToString(), "", sTool, sMachIniFile)
|
||||||
m_ManualToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
m_ManualToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -1542,9 +1523,6 @@ Public Class CurrentMachine
|
|||||||
|
|
||||||
' Flag per abilitare taglio finale
|
' Flag per abilitare taglio finale
|
||||||
m_bEnableFinalSawCut = GetPrivateProfileInt(S_MACH, K_ENABLEFINALSAWCUT, 0, m_MainWindow.GetMachIniFile()) <> 0
|
m_bEnableFinalSawCut = GetPrivateProfileInt(S_MACH, K_ENABLEFINALSAWCUT, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
|
|
||||||
' Flag per abilitare taglio finale
|
|
||||||
m_dFinalDepth = GetPrivateProfileDouble(S_MACH, K_FINALDEPTH, 0.0, m_MainWindow.GetMachIniFile())
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
||||||
@@ -1681,7 +1659,7 @@ Public Class CurrentMachine
|
|||||||
' Imposto utensile lama corrente
|
' Imposto utensile lama corrente
|
||||||
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||||
Dim UserNotes As String = String.Empty
|
Dim UserNotes As String = String.Empty
|
||||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
' Aggiunge Key=Value; alle UserNotes della lavorazione
|
||||||
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
|
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
|
||||||
EgtMdbSaveCurrMachining()
|
EgtMdbSaveCurrMachining()
|
||||||
EgtMdbSave()
|
EgtMdbSave()
|
||||||
@@ -1698,7 +1676,7 @@ Public Class CurrentMachine
|
|||||||
' Imposto utensile lama corrente
|
' Imposto utensile lama corrente
|
||||||
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||||
Dim UserNotes As String = String.Empty
|
Dim UserNotes As String = String.Empty
|
||||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
' Aggiunge Key=Value; alle UserNotes dell'utensile
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
|
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
|
||||||
EgtTdbSaveCurrTool()
|
EgtTdbSaveCurrTool()
|
||||||
EgtTdbSave()
|
EgtTdbSave()
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="7.5*"/>
|
<ColumnDefinition Width="7.5*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
<GroupBox Name="PartProgTransferGpBx"
|
<GroupBox Name="PartProgTransferGpBx"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="2">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
@@ -127,9 +127,24 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
<GroupBox Name="SpecialSendGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||||
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
Grid.Column="2" Grid.ColumnSpan="1" Margin="5,0,5,0">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<CheckBox Name="SpecialSendChBx" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
|
Margin="0,0,0,0"/>
|
||||||
|
<Button Name="SpecialSendBtn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||||
|
Grid.Column="3" Grid.ColumnSpan="1" Margin="5,0,0,0">
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
|
|||||||
@@ -37,6 +37,19 @@ Public Class MachineCNPageUC
|
|||||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
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)
|
||||||
|
SpecialSendBtn.Content = "Run"
|
||||||
|
SpecialSendGpBx.Header = "Special Send"
|
||||||
|
SpecialSendGpBx.Visibility = Visibility.Visible
|
||||||
|
Dim nSpecialAreas As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALAREAS, 4, m_MainWindow.GetMachIniFile())
|
||||||
|
If nSpecialAreas <> 0 Then SpecialSendBtn.Visibility = Visibility.Collapsed
|
||||||
|
else
|
||||||
|
SpecialSendGpBx.Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
' nuovi pulsanti
|
' nuovi pulsanti
|
||||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||||
PowerONBtn.Content = "ON"
|
PowerONBtn.Content = "ON"
|
||||||
@@ -85,7 +98,7 @@ Public Class MachineCNPageUC
|
|||||||
Dim m_nCount As Integer = 1
|
Dim m_nCount As Integer = 1
|
||||||
Dim bFoundBtn As Boolean = True
|
Dim bFoundBtn As Boolean = True
|
||||||
Dim sTestVal As String = String.Empty
|
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
|
If GetPrivateProfileString("MachineButtons", K_BUTTON & "1", "", sTestVal, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||||
PowerGpBx.Visibility = Visibility.Collapsed
|
PowerGpBx.Visibility = Visibility.Collapsed
|
||||||
Return
|
Return
|
||||||
@@ -323,17 +336,40 @@ Public Class MachineCNPageUC
|
|||||||
MDITxBx.Background = Brushes.LightGray
|
MDITxBx.Background = Brushes.LightGray
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SpecialSendChBx_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendChBx.Click
|
||||||
|
m_MainWindow.m_CNCommunication.SpecialSend = If( SpecialSendChBx.IsChecked(), 1, 0)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SpecialSendBtn_Click(sender As Object, e As RoutedEventArgs) Handles SpecialSendBtn.Click
|
||||||
|
' Recupero path dell'eseguibile
|
||||||
|
Dim sSpecialExec As String = ""
|
||||||
|
GetPrivateProfileString(S_NUMERICALCONTROL, K_SPECIALEXEC, "", sSpecialExec, m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||||
|
' Verifico validità
|
||||||
|
If String.IsNullOrWhiteSpace( sSpecialExec) Then
|
||||||
|
EgtOutLog( "Warning : SpecialExec with empty name")
|
||||||
|
End If
|
||||||
|
' Recupero il nome
|
||||||
|
Dim sSpecialName As String = IO.Path.GetFileNameWithoutExtension(sSpecialExec)
|
||||||
|
' Mando in esecuzione
|
||||||
|
Dim ProcsSpecial As Process() = Process.GetProcessesByName(sSpecialName)
|
||||||
|
If ProcsSpecial.Length() > 0 Then
|
||||||
|
ShowWindow(ProcsSpecial(0).MainWindowHandle, 3)
|
||||||
|
Else
|
||||||
|
Process.Start(sSpecialExec)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub PowerON_Click(sender As Object, e As RoutedEventArgs) Handles PowerONBtn.Click
|
Private Sub PowerON_Click(sender As Object, e As RoutedEventArgs) Handles PowerONBtn.Click
|
||||||
Dim PowerOnButton As MachineButton = m_ButtonPower(0)
|
Dim PowerOnButton As MachineButton = m_ButtonPower(0)
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
PowerOnButton.ExecuteMDICommand(PowerOnButton.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(PowerOnButton.TLuaScriptName)
|
||||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PowerOFF_Click(sender As Object, e As RoutedEventArgs) Handles PowerOFFBtn.Click
|
Private Sub PowerOFF_Click(sender As Object, e As RoutedEventArgs) Handles PowerOFFBtn.Click
|
||||||
Dim PowerOffButton As MachineButton = m_ButtonPower(1)
|
Dim PowerOffButton As MachineButton = m_ButtonPower(1)
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
PowerOffButton.ExecuteMDICommand(PowerOffButton.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(PowerOffButton.TLuaScriptName)
|
||||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2221,7 +2221,7 @@ Public Class MachiningDbPageUC
|
|||||||
Friend Function SaveCurrMachining() As Boolean
|
Friend Function SaveCurrMachining() As Boolean
|
||||||
SetMachiningParams()
|
SetMachiningParams()
|
||||||
If EgtMdbIsCurrMachiningModified() Then
|
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
|
Select Case SaveCurrMachiningWnd.m_nPressedBtn
|
||||||
Case 0 ' Annulla
|
Case 0 ' Annulla
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
@@ -728,7 +728,12 @@ Public Class SetUpPage
|
|||||||
Dim ToolName As String = String.Empty
|
Dim ToolName As String = String.Empty
|
||||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||||
While bFound
|
While bFound
|
||||||
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
If nType = nTType Then
|
||||||
|
' non aggiungo le Frese di nome "PROBE"
|
||||||
|
If nTType <> MCH_TY.MILL_STD OrElse ToolName.Trim.ToLower <> "probe" Then
|
||||||
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||||
End While
|
End While
|
||||||
m_ToolTreeList.Add(ToolCathegory)
|
m_ToolTreeList.Add(ToolCathegory)
|
||||||
@@ -1099,34 +1104,44 @@ Public Class SetUpPage
|
|||||||
EgtTdbSave()
|
EgtTdbSave()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Funzione di utilità per la successiva
|
||||||
|
Private Sub AddOneSetUpPos( nPosInd As Integer, sPosName As String, sToolName As String, ByRef sFileContent As String)
|
||||||
|
If String.IsNullOrEmpty(sToolName) Then
|
||||||
|
' Aggiungo la posizione vuota
|
||||||
|
sFileContent &= "Pos" & nPosInd.ToString & "=" & sPosName & vbCrLf
|
||||||
|
Else
|
||||||
|
EgtTdbSetCurrTool(sToolName)
|
||||||
|
' Recupero l'uscita
|
||||||
|
Dim nExit As Integer = 1
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExit)
|
||||||
|
' Recupero la testa
|
||||||
|
Dim sHead As String = ""
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
|
||||||
|
' Recupero identificativo UUID dell'utensile
|
||||||
|
Dim sUUID As String = ""
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
||||||
|
' Aggiungo la posizione con i dati utensile
|
||||||
|
sFileContent &= "Pos" & nPosInd.ToString & "=" & sPosName & ";" & sHead & ";" & nExit.ToString & "/" & sUUID & "/" & sToolName & vbCrLf
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
' Funzione che genera il file di setup corrente (per Cam5 e Office)
|
' Funzione che genera il file di setup corrente (per Cam5 e Office)
|
||||||
Private Sub SaveSetUpFile()
|
Private Sub SaveSetUpFile()
|
||||||
If m_CurrMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
If m_CurrMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
||||||
Dim sContentFile As String = EgtMsg(91239) & vbCrLf ' ; this file has been created by program OmagCUT by current setup
|
Dim sFileContent As String = "; this file has been created by program OmagCUT by current setup" & vbCrLf
|
||||||
sContentFile &= EgtMsg(91240) & vbCrLf ' [General]
|
sFileContent &= "[General]" & vbCrLf
|
||||||
|
Dim nPosition As Integer = 0
|
||||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||||
Dim sToolName As String = ToolPosition.sTool
|
nPosition += 1
|
||||||
Dim sPositionName As String = ToolPosition.sName
|
AddOneSetUpPos( nPosition, ToolPosition.sName, ToolPosition.sTool, sFileContent)
|
||||||
Dim sPosition As Integer = ToolPosition.nPosition
|
Next
|
||||||
If Not String.IsNullOrEmpty(sToolName) Then
|
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ManualToolChanger
|
||||||
EgtTdbSetCurrTool(sToolName)
|
nPosition += 1
|
||||||
' Recupero l'uscita
|
AddOneSetUpPos( nPosition, ToolPosition.sName, ToolPosition.sTool, sFileContent)
|
||||||
Dim nExit As Integer = 1
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExit)
|
|
||||||
' Recupero la testa
|
|
||||||
Dim sHead As String = ""
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
|
|
||||||
' Recupero nome file nge dell'utensile
|
|
||||||
Dim sUUID As String = ""
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
|
||||||
'local sRaw='Pos'..tostring(Index)..'='..TcPos..';'..EgtTdbGetCurrToolParam( MCH_TP.HEAD)..';'..EgtTdbGetCurrToolParam( MCH_TP.EXIT)..'/'..EgtTdbGetCurrToolParam( MCH_TP.UUID)..'/'..ToolName
|
|
||||||
sContentFile &= "Pos" & sPosition.ToString & "=" & sPositionName & ";" & sHead & ";" & nExit.ToString & "/" & sUUID & "/" & sToolName & vbCrLf
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
' Apro il file e lo sovrascrivo
|
' Apro il file e lo sovrascrivo
|
||||||
Dim sFileOmagCutSetUp As String = m_CurrMachine.sMachDir & "\SetUp\CurrOmagCUT.stu"
|
Dim sSetUpFile As String = m_CurrMachine.sMachDir & "\SetUp\CurrOmagCUT.stu"
|
||||||
Try
|
Try
|
||||||
My.Computer.FileSystem.WriteAllText(sFileOmagCutSetUp, sContentFile, False)
|
My.Computer.FileSystem.WriteAllText(sSetUpFile, sFileContent, False)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Error in creatinf file CurrOmagCUT.stu: " & ex.ToString)
|
EgtOutLog("Error in creatinf file CurrOmagCUT.stu: " & ex.ToString)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Public Class ToolsDbPageUC
|
|||||||
Private m_nToolType As Integer = MCH_TY.NONE
|
Private m_nToolType As Integer = MCH_TY.NONE
|
||||||
Private m_sToolName As String = String.Empty
|
Private m_sToolName As String = String.Empty
|
||||||
Private m_sEndLife As String = String.Empty
|
Private m_sEndLife As String = String.Empty
|
||||||
|
Private m_bShowColor As Boolean = False
|
||||||
|
|
||||||
' Array che contengono i tipi di Coolant
|
' Array che contengono i tipi di Coolant
|
||||||
Dim ToolCoolant() As String
|
Dim ToolCoolant() As String
|
||||||
@@ -573,6 +574,12 @@ Public Class ToolsDbPageUC
|
|||||||
Dim ChooseColor As New ChooseColor(m_MainWindow)
|
Dim ChooseColor As New ChooseColor(m_MainWindow)
|
||||||
If ChooseColor.ShowDialog() Then
|
If ChooseColor.ShowDialog() Then
|
||||||
ColorBtn.Background = m_MainWindow.m_brCurrentColor
|
ColorBtn.Background = m_MainWindow.m_brCurrentColor
|
||||||
|
Dim nOldCtx As String = EgtGetCurrentContext()
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
EgtTdbSetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ColorToString(ColorBtn.Background.ToString()))
|
||||||
|
EgtSetCurrentContext(nOldCtx)
|
||||||
|
CreateToolDraw()
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -701,13 +708,12 @@ Public Class ToolsDbPageUC
|
|||||||
Dim ToolName As String = String.Empty
|
Dim ToolName As String = String.Empty
|
||||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||||
While bFound
|
While bFound
|
||||||
Dim nDebug As Integer = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
|
||||||
If nType = nTType Then
|
If nType = nTType Then
|
||||||
|
' se utensile diverso da MILL
|
||||||
If nTType <> MCH_TY.MILL_STD Then
|
If nTType <> MCH_TY.MILL_STD Then
|
||||||
' se utensile diverso da MILL
|
|
||||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or nDebug > 4) Then
|
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
||||||
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or m_MainWindow.GetDebug() > 4) Then
|
||||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -772,28 +778,38 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
||||||
UserNotesTxBx.Text = ToolString
|
UserNotesTxBx.Text = ToolString
|
||||||
End If
|
End If
|
||||||
' Inizializzo colore di default
|
' Determino se richiesta gestione colore
|
||||||
Dim EgtCol As Color3d = Utility.GetColorPV()
|
m_bShowColor = (m_nToolType = MCH_TY.SAW_STD And m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW)
|
||||||
ColorBtn.Background = New SolidColorBrush(Color.FromRgb(EgtCol.R, EgtCol.G, EgtCol.B))
|
' Se necessario, inizializzo colore di default
|
||||||
|
If m_bShowColor Then
|
||||||
|
Dim EgtCol As Color3d = Utility.GetColorPV()
|
||||||
|
ColorBtn.Background = New SolidColorBrush(Color.FromRgb(EgtCol.R, EgtCol.G, EgtCol.B))
|
||||||
|
End If
|
||||||
' Eventualmente verifico se inserito nel setup
|
' Eventualmente verifico se inserito nel setup
|
||||||
VerifyToolInSetUp(m_sToolName, TCPosTxBx.Text)
|
VerifyToolInSetUp(m_sToolName, TCPosTxBx.Text)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub VerifyToolInSetUp(sNameTool As String, sTCPos As String)
|
Private Sub VerifyToolInSetUp(sToolName As String, sTCPos As String)
|
||||||
' Se configurato cambio utensile lama
|
' Se non c'è cambio utensile per lama, esco subito
|
||||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
||||||
|
' Cerco la posizione di attrezzaggio della lama
|
||||||
Dim bFound As Boolean = False
|
Dim bFound As Boolean = False
|
||||||
Dim sCurrTCPos As String = String.Empty
|
Dim sCurrTCPos As String = String.Empty
|
||||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
If ToolPosition.sTool <> String.Empty Then
|
If Not String.IsNullOrWhiteSpace( sToolName) AndAlso sToolName = ToolPosition.sTool Then
|
||||||
If sNameTool = ToolPosition.sTool Then
|
sCurrTCPos = ToolPosition.sName
|
||||||
sCurrTCPos = ToolPosition.sName
|
bFound = True
|
||||||
bFound = True
|
Exit For
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
If Not String.IsNullOrWhiteSpace( sToolName) AndAlso sToolName = ToolPosition.sTool Then
|
||||||
|
sCurrTCPos = ToolPosition.sName
|
||||||
|
bFound = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Se non trovata
|
||||||
If Not bFound Then
|
If Not bFound Then
|
||||||
TCPosTxBl.Foreground = Brushes.Red
|
TCPosTxBl.Foreground = Brushes.Red
|
||||||
If String.IsNullOrEmpty(sTCPos) Then
|
If String.IsNullOrEmpty(sTCPos) Then
|
||||||
@@ -871,7 +887,11 @@ Public Class ToolsDbPageUC
|
|||||||
If Not SetSpecials() Then
|
If Not SetSpecials() Then
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
||||||
End If
|
End If
|
||||||
EgtTdbSetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ColorToString(ColorBtn.Background.ToString()))
|
If m_bShowColor Then
|
||||||
|
EgtTdbSetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ColorToString(ColorBtn.Background.ToString()))
|
||||||
|
Else
|
||||||
|
EgtTdbRemoveCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ColorToString(color As String) As String
|
Private Function ColorToString(color As String) As String
|
||||||
@@ -945,9 +965,8 @@ Public Class ToolsDbPageUC
|
|||||||
SupplierTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
SupplierTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
EndLifeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
EndLifeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
EndLifeChBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
EndLifeChBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
|
ColorTxBl.Visibility = If(m_bShowColor, Visibility.Visible, Visibility.Hidden)
|
||||||
ColorTxBl.Visibility = If(m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW, Visibility.Visible, Visibility.Hidden)
|
ColorBtn.Visibility = If(m_bShowColor, Visibility.Visible, Visibility.Hidden)
|
||||||
ColorBtn.Visibility = If(m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW, Visibility.Visible, Visibility.Hidden)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub HideToolParams()
|
Private Sub HideToolParams()
|
||||||
@@ -975,7 +994,6 @@ Public Class ToolsDbPageUC
|
|||||||
SupplierTxBx.Visibility = Windows.Visibility.Hidden
|
SupplierTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
EndLifeTxBl.Visibility = Windows.Visibility.Hidden
|
EndLifeTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
EndLifeChBx.Visibility = Windows.Visibility.Hidden
|
EndLifeChBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
|
||||||
ColorTxBl.Visibility = Visibility.Hidden
|
ColorTxBl.Visibility = Visibility.Hidden
|
||||||
ColorBtn.Visibility = Visibility.Hidden
|
ColorBtn.Visibility = Visibility.Hidden
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1013,8 +1031,6 @@ Public Class ToolsDbPageUC
|
|||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||||
EgtSetView(VT.TOP, False)
|
EgtSetView(VT.TOP, False)
|
||||||
'EgtSetGenericView(150, -150)
|
|
||||||
'EgtSetView(VT.ISO_SE, False)
|
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Border Name="LogoBrd" Background="Transparent">
|
<Border Name="LogoBrd" Background="Transparent">
|
||||||
<Image Source="../Resources/NewIcons/logo-OmCut.png" Stretch="Uniform" Margin="1"/>
|
<Image Source="../Resources/NewIcons/Logo-OmagCut.png" Stretch="Uniform" Margin="1"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ** Definizione della Grid delle tab ** -->
|
<!-- ** Definizione della Grid delle tab ** -->
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ Class MainWindow
|
|||||||
' Variabile che indica il tipo di pc su cui gira il programma
|
' Variabile che indica il tipo di pc su cui gira il programma
|
||||||
Private m_bIsSiemensPc As Boolean = False
|
Private m_bIsSiemensPc As Boolean = False
|
||||||
|
|
||||||
|
' Abilitazione parcheggio dei pezzi
|
||||||
|
Private m_bEnabledDxfPark As Boolean = False
|
||||||
|
|
||||||
' Variabile che indica il colore corrente di ColorToSIdeAng in OptionsPageUC
|
' Variabile che indica il colore corrente di ColorToSIdeAng in OptionsPageUC
|
||||||
Friend m_brCurrentColor As Brush
|
Friend m_brCurrentColor As Brush
|
||||||
|
|
||||||
@@ -274,6 +277,10 @@ Class MainWindow
|
|||||||
Return m_bIsSiemensPc
|
Return m_bIsSiemensPc
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function EnabledDxfPark() As Boolean
|
||||||
|
Return m_bEnabledDxfPark
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetDebug() As Integer
|
Public Function GetDebug() As Integer
|
||||||
Return m_nDebug
|
Return m_nDebug
|
||||||
End Function
|
End Function
|
||||||
@@ -362,8 +369,8 @@ Class MainWindow
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
' Recupero opzioni della chiave
|
' Recupero opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2707, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 3105, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2707, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 3105, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||||
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||||
@@ -438,6 +445,8 @@ Class MainWindow
|
|||||||
' Inizializzazione della libreria EgtWPFLib
|
' Inizializzazione della libreria EgtWPFLib
|
||||||
EgtWPFInit()
|
EgtWPFInit()
|
||||||
EgtTextBox.EnableKeybCalc = (GetPrivateProfileInt(S_GENERAL, K_VIRTUALKEYBOARD, 1, m_sIniFile) <> 0)
|
EgtTextBox.EnableKeybCalc = (GetPrivateProfileInt(S_GENERAL, K_VIRTUALKEYBOARD, 1, m_sIniFile) <> 0)
|
||||||
|
' Abilitazione parcheggio pezzi
|
||||||
|
m_bEnabledDxfPark = ( GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, GetIniFile) <> 0)
|
||||||
' Inizializzo classe macchina corrente
|
' Inizializzo classe macchina corrente
|
||||||
m_CurrentMachine = New CurrentMachine
|
m_CurrentMachine = New CurrentMachine
|
||||||
' Crezione della MachineStatusBar
|
' Crezione della MachineStatusBar
|
||||||
@@ -476,11 +485,11 @@ Class MainWindow
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' abilito il bottone per la gestione del comando di Check-Up-Start (posziona lama prelavorazione)
|
' Abilito il bottone per la gestione del comando di Check-Up-Start (posiziono utensile scelto prelavorazione)
|
||||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
If GetPrivateProfileInt(S_GENERAL, "Test", 0, m_sIniFile) = 0 OrElse
|
||||||
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||||
EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!")
|
EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', button 'TEST' collapsed!")
|
||||||
Else
|
Else
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
@@ -651,12 +660,14 @@ Class MainWindow
|
|||||||
|
|
||||||
Dim sVal As String = String.Empty
|
Dim sVal As String = String.Empty
|
||||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||||
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
|
Dim dFsevLength As Double
|
||||||
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
|
StringToDouble(sVal, dFsevLength)
|
||||||
|
m_CurrentMachine.SetFsevLength(dFsevLength)
|
||||||
End If
|
End If
|
||||||
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||||
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
|
Dim dFsevPerc As Double
|
||||||
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
|
StringToDouble(sVal, dFsevPerc)
|
||||||
|
m_CurrentMachine.SetFsevPerc(dFsevPerc)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se macchina fotografica abilitata, ne inizializzo il gestore
|
' Se macchina fotografica abilitata, ne inizializzo il gestore
|
||||||
@@ -699,7 +710,7 @@ Class MainWindow
|
|||||||
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
||||||
Dim sItems As String() = sAssistance.Split(","c)
|
Dim sItems As String() = sAssistance.Split(","c)
|
||||||
For Each Item As String In sItems
|
For Each Item As String In sItems
|
||||||
sMsg_RefAssistance &= " → " & Item.Trim & " /n"
|
sMsg_RefAssistance &= " -> " & Item.Trim & " /n"
|
||||||
Next
|
Next
|
||||||
' 91148=Grazie per la vostra collaborazione.
|
' 91148=Grazie per la vostra collaborazione.
|
||||||
Dim sMsg_ThankYou As String = EgtMsg(91148)
|
Dim sMsg_ThankYou As String = EgtMsg(91148)
|
||||||
@@ -711,14 +722,14 @@ Class MainWindow
|
|||||||
' inizializzo
|
' inizializzo
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Selezione dei bottoni IN LAVORO, TAGLII DIRETTI, TAGLI CAD, CORNICI, MACCHINA, OPZIONI"
|
#Region "Selezione dei bottoni IN LAVORO, TAGLI DIRETTI, TAGLI CAD, CORNICI, MACCHINA, OPZIONI"
|
||||||
|
|
||||||
Private Sub WorkInProgressBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkInProgressBtn.Click
|
Private Sub WorkInProgressBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkInProgressBtn.Click
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
' disbilito Test
|
' disbilito Test
|
||||||
TestOff()
|
TestOff()
|
||||||
' disabilito DragRettangle
|
' disabilito DragRettangle
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
' disabilito SplitCurv
|
' disabilito SplitCurv
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
' disattivo StartCurv
|
' disattivo StartCurv
|
||||||
@@ -781,7 +792,7 @@ Class MainWindow
|
|||||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
StartCurvWJOff()
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
@@ -839,7 +850,7 @@ Class MainWindow
|
|||||||
Private Sub CadCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CadCutBtn.Click
|
Private Sub CadCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CadCutBtn.Click
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
StartCurvWJOff()
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
@@ -896,7 +907,7 @@ Class MainWindow
|
|||||||
Private Sub FrameCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrameCutBtn.Click
|
Private Sub FrameCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrameCutBtn.Click
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
StartCurvWJOff()
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
@@ -954,7 +965,7 @@ Class MainWindow
|
|||||||
Private Sub MachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachineBtn.Click
|
Private Sub MachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachineBtn.Click
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
StartCurvWJOff()
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
@@ -1007,7 +1018,7 @@ Class MainWindow
|
|||||||
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
|
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
|
||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRectangleOff()
|
||||||
SplitCurvWJOff()
|
SplitCurvWJOff()
|
||||||
StartCurvWJOff()
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
@@ -1073,7 +1084,7 @@ Class MainWindow
|
|||||||
If m_CurrentProjectPageUC.OutMessageBrd.IsMouseOver Then
|
If m_CurrentProjectPageUC.OutMessageBrd.IsMouseOver Then
|
||||||
m_CurrentProjectPageUC.ClearMessage()
|
m_CurrentProjectPageUC.ClearMessage()
|
||||||
' se è premuto il pulsante Shift allora provvedo ad aprire il file di Log
|
' se è premuto il pulsante Shift allora provvedo ad aprire il file di Log
|
||||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||||
' Genero file CNC (lancio anche se errore in precedenza)
|
' Genero file CNC (lancio anche se errore in precedenza)
|
||||||
Dim sTemoDirect As String = GetTempDir() & "\OmagCUTLog.txt"
|
Dim sTemoDirect As String = GetTempDir() & "\OmagCUTLog.txt"
|
||||||
Try
|
Try
|
||||||
@@ -1354,38 +1365,32 @@ Class MainWindow
|
|||||||
' Verifico presenza testa H1 per lama/fresa (nel contesto principale)
|
' Verifico presenza testa H1 per lama/fresa (nel contesto principale)
|
||||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||||
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
Dim bHeadH1 As Boolean = m_CurrentMachine.ExistsSawHead()
|
||||||
EgtSetCurrentContext(nCurrCtx)
|
EgtSetCurrentContext(nCurrCtx)
|
||||||
' Aggiorno interfaccia
|
' Aggiorno interfaccia
|
||||||
If m_OnlyFrame Then
|
If m_OnlyFrame Then
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
m_ActivePage <> Pages.RawPart And m_ActivePage <> Pages.DirectCut And m_ActivePage <> Pages.Simulation Then
|
m_ActivePage <> Pages.RawPart And m_ActivePage <> Pages.DirectCut And m_ActivePage <> Pages.Simulation Then
|
||||||
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91141), EgtMsg(91142), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL) ' Attenzione! Licenza non abilitata per tagli CAD.
|
' Attenzione! Licenza non abilitata per tagli CAD.
|
||||||
'' Gestione stato FastGrid
|
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91141), EgtMsg(91142), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
|
|
||||||
' Cancello progetto salvato con nome da file ini
|
' Cancello progetto salvato con nome da file ini
|
||||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
|
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
|
||||||
' Scelta tavola della macchina
|
' Scelta tavola della macchina
|
||||||
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
|
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
|
||||||
' Creo nuovo progetto
|
' Creo nuovo progetto
|
||||||
m_CurrentProjectPageUC.NewProject(nTabInd, False)
|
m_CurrentProjectPageUC.NewProject(nTabInd, False)
|
||||||
'' Gestione stato FastGrid
|
'
|
||||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
|
||||||
FrameCutBtn_Click(Nothing, Nothing)
|
FrameCutBtn_Click(Nothing, Nothing)
|
||||||
CadCutBtn.IsEnabled = False
|
CadCutBtn.IsEnabled = False
|
||||||
Else
|
Else
|
||||||
FrameCutBtn.IsEnabled = True
|
FrameCutBtn.IsEnabled = True
|
||||||
CadCutBtn.IsEnabled = False
|
CadCutBtn.IsEnabled = False
|
||||||
' Attivo il pulsante FRAME
|
|
||||||
'FrameCutBtn.IsChecked = True
|
|
||||||
'CadCutBtn.IsChecked = False
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' DirectCutBtn.IsEnabled = bHeadH1
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Nomi dei file per OmagVIEW
|
' Nomi dei file per OmagVIEW
|
||||||
@@ -2143,18 +2148,16 @@ Class MainWindow
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' spegne il comando per la mofica dei rettangoli
|
' spegne il comando per la mofica dei rettangoli
|
||||||
Public Sub DragRettangleOff()
|
Public Sub DragRectangleOff()
|
||||||
m_CadCutPageUC.m_NestPage.DragRettanleBtn.IsChecked = False
|
m_CadCutPageUC.m_NestPage.DragRectangleBtn.IsChecked = False
|
||||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedDragRettangle = False
|
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedDragRectangle = False
|
||||||
ShowParkedParts()
|
ShowParkedParts()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub SplitCurvWJOff()
|
Public Sub SplitCurvWJOff()
|
||||||
m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.IsChecked = False
|
m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.IsChecked = False
|
||||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedSplitCurveWJ = False
|
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedSplitCurveWJ = False
|
||||||
m_CadCutPageUC.m_NestPage.ResetSplitCurvWJParam()
|
m_CadCutPageUC.m_NestPage.ResetSplitCurvWJParam()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub StartCurvWJOff()
|
Public Sub StartCurvWJOff()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagCUT")>
|
<Assembly: AssemblyProduct("OmagCUT")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2015-2025 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2015-2026 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.7.8.2")>
|
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||||
<Assembly: AssemblyFileVersion("2.7.8.2")>
|
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
Imports System.Windows.Threading
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
|
Imports System.Windows.Threading
|
||||||
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib.EgtMsgBox
|
Imports EgtWPFLib.EgtMsgBox
|
||||||
|
Imports EgtWPFLib5
|
||||||
Imports OmagCUT.CN_generico
|
Imports OmagCUT.CN_generico
|
||||||
|
|
||||||
Public Class CNCommunication
|
Public Class CNCommunication
|
||||||
@@ -20,6 +21,26 @@ Public Class CNCommunication
|
|||||||
' Variabile per tipologia CN
|
' Variabile per tipologia CN
|
||||||
Friend m_nNCType As Integer
|
Friend m_nNCType As Integer
|
||||||
|
|
||||||
|
' Modalità invio programmi step a step (attualmente solo per Siemens)
|
||||||
|
Private m_bStepByStepSend As Boolean = False
|
||||||
|
|
||||||
|
' 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
|
||||||
|
Private m_nSpecialAreas As Integer = 4
|
||||||
|
Private m_sSpecialDest As String = ""
|
||||||
|
|
||||||
' Variabile che indica il Mode corrente
|
' Variabile che indica il Mode corrente
|
||||||
Private m_nCurrMode As Integer = -1
|
Private m_nCurrMode As Integer = -1
|
||||||
|
|
||||||
@@ -98,12 +119,24 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
EgtOutLog("NcLink=" & m_MainWindow.m_bNCLink.ToString & " type=" & m_nNCType)
|
EgtOutLog("NcLink=" & m_MainWindow.m_bNCLink.ToString & " type=" & m_nNCType)
|
||||||
|
|
||||||
|
' Leggo flag invio programma a step per debug (da Ini di OmagCUT)
|
||||||
|
m_bStepByStepSend = (GetPrivateProfileInt(S_GENERAL, K_STEPBYSTEPSEND, 0, m_MainWindow.GetIniFile()) = 1)
|
||||||
|
|
||||||
|
' 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)
|
||||||
|
' Leggo numero di aree per invio speciale
|
||||||
|
Dim nTemp2 As Integer = GetPrivateProfileInt(S_NUMERICALCONTROL, K_SPECIALAREAS, 4, m_MainWindow.GetMachIniFile())
|
||||||
|
m_nSpecialAreas = Math.Max( Math.Min( nTemp2, 16), 0)
|
||||||
|
' Leggo il direttorio di destinazione (se Fanuc data server è "//DATA_SV/PROGRAM_DS/")
|
||||||
|
GetPrivateProfileString(S_NUMERICALCONTROL, K_SPECIALDEST, "", m_sSpecialDest, m_MainWindow.GetMachIniFile())
|
||||||
|
|
||||||
' Se CN Siemens leggo dati programma intermedio di comunicazione
|
' Se CN Siemens leggo dati programma intermedio di comunicazione
|
||||||
If m_nNCType = 3 Then
|
If m_nNCType = 3 Then
|
||||||
Dim sExeName As String = String.Empty
|
Dim sExeName As String = String.Empty
|
||||||
GetPrivateProfileString(S_NCSIEMENS, K_COMM_NAME, "", sExeName, m_MainWindow.m_CurrentMachine.sMachIniFile)
|
GetPrivateProfileString(S_NCSIEMENS, K_COMM_NAME, "", sExeName, m_MainWindow.GetMachIniFile())
|
||||||
m_sCNSiemensPath = m_MainWindow.GetExeRootDir() & "\" & sExeName
|
m_sCNSiemensPath = m_MainWindow.GetExeRootDir() & "\" & sExeName
|
||||||
GetPrivateProfileString(S_NCSIEMENS, K_PATH_HMI, "", m_sCNSiemensHMIPath, m_MainWindow.m_CurrentMachine.sMachIniFile)
|
GetPrivateProfileString(S_NCSIEMENS, K_PATH_HMI, "", m_sCNSiemensHMIPath, m_MainWindow.GetMachIniFile())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Inizializzo la connessione
|
' Inizializzo la connessione
|
||||||
@@ -312,7 +345,7 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
#End Region ' ver 2.7h2 nuova gestione
|
#End Region ' ver 2.7h2 nuova gestione
|
||||||
|
|
||||||
Private Sub KillSimensCom(sProcessName As String)
|
Private Sub KillSiemensCom(sProcessName As String)
|
||||||
Dim sAppName As String = Path.GetFileNameWithoutExtension(sProcessName)
|
Dim sAppName As String = Path.GetFileNameWithoutExtension(sProcessName)
|
||||||
Dim pList() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses
|
Dim pList() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses
|
||||||
For Each proc As System.Diagnostics.Process In pList
|
For Each proc As System.Diagnostics.Process In pList
|
||||||
@@ -358,7 +391,7 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
|
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
|
||||||
GetPrivateProfileString(S_NCDATA, K_COMM, "XIP01, 0, 10, 0, 0, 0", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_COMM, "XIP01, 0, 10, 0, 0, 0", sVal, m_MainWindow.GetMachIniFile())
|
||||||
EgtOutLog(" → Tipo di comunicazione: " & sVal)
|
EgtOutLog(" -> Tipo di comunicazione: " & sVal)
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.Comm, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.Comm, sVal)
|
||||||
GetPrivateProfileString(S_NCDATA, K_REFRESH, "200", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_REFRESH, "200", sVal, m_MainWindow.GetMachIniFile())
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.Refresh, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.Refresh, sVal)
|
||||||
@@ -528,7 +561,7 @@ Public Class CNCommunication
|
|||||||
|
|
||||||
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
||||||
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||||
KillSimensCom(m_sCNSiemensHMIPath)
|
KillSiemensCom(m_sCNSiemensHMIPath)
|
||||||
Process.Start(m_sCNSiemensHMIPath, sArg)
|
Process.Start(m_sCNSiemensHMIPath, sArg)
|
||||||
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
' !!!!!!!!!!!!!! FORZO LA SIMULAZIONE DELLA LETTURA DELLE VARIBILI E SIEMENS !!!!!!!!!!!!!!
|
||||||
|
|
||||||
@@ -647,13 +680,13 @@ Public Class CNCommunication
|
|||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
EgtOutLog(" ATTENZIONE: in [NcData] '" & m_CN.m_szCnDataVar(ItemIndex) & "' non è indicato il tipo (0→Bool,1→Int,2→Long,3→Double,4→String,5→Bit)")
|
EgtOutLog(" ATTENZIONE: in [NcData] '" & m_CN.m_szCnDataVar(ItemIndex) & "' non è indicato il tipo (0=Bool,1=Int,2=Long,3=Double,4=String,5=Bit)")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Attraverso la funzione "RefreshNoEvents" rileggo i dati caricati
|
' Attraverso la funzione "RefreshNoEvents" rileggo i dati caricati
|
||||||
|
|
||||||
' Recupero il perocorso delle variabili PLC
|
' Recupero il percorso delle variabili PLC
|
||||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
||||||
|
|
||||||
ElseIf m_CN.m_IsActiveModeSubscription Then
|
ElseIf m_CN.m_IsActiveModeSubscription Then
|
||||||
@@ -821,7 +854,7 @@ Public Class CNCommunication
|
|||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE → vedere come esempio il NUM che assegna queste variabili
|
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE : vedere come esempio il NUM che assegna queste variabili
|
||||||
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
||||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
||||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||||
@@ -994,7 +1027,7 @@ Public Class CNCommunication
|
|||||||
m_CN.nMachineMode = m_nCurrMode
|
m_CN.nMachineMode = m_nCurrMode
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE → vedere come esempio il NUM che assegna queste variabili
|
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE : vedere come esempio il NUM che assegna queste variabili
|
||||||
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
||||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
||||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||||
@@ -1183,7 +1216,7 @@ Public Class CNCommunication
|
|||||||
'Laser = 16384
|
'Laser = 16384
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
#Region "MASCHERA per conttrollo Bit a Bit"
|
#Region "MASCHERA per controllo Bit a Bit"
|
||||||
<Flags()>
|
<Flags()>
|
||||||
Public Enum Mask As Integer
|
Public Enum Mask As Integer
|
||||||
bit_Err = -1
|
bit_Err = -1
|
||||||
@@ -1568,10 +1601,6 @@ Public Class CNCommunication
|
|||||||
Optional bActivate As Boolean = True) As Boolean
|
Optional bActivate As Boolean = True) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
|
||||||
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
|
||||||
' m_nNCType = 2
|
|
||||||
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
' Download programma
|
' Download programma
|
||||||
If m_MainWindow.m_bNCLink Then
|
If m_MainWindow.m_bNCLink Then
|
||||||
bOk = (m_nNCType > 0)
|
bOk = (m_nNCType > 0)
|
||||||
@@ -1582,6 +1611,20 @@ Public Class CNCommunication
|
|||||||
Else
|
Else
|
||||||
sNumProg = nNumProg.ToString()
|
sNumProg = nNumProg.ToString()
|
||||||
End If
|
End If
|
||||||
|
' Se Fanuc con trasmissione speciale come copia in un direttorio opportuno
|
||||||
|
If m_nNCType = 4 AndAlso m_nSpecialSend = 1 AndAlso m_nSpecialAreas = 0 Then
|
||||||
|
bOk = SpecialSendCopyProgram(sCncPath)
|
||||||
|
If bOk Then
|
||||||
|
m_CurrProjPage.SetInfoMessage(EgtMsg(90317)) ' Programma CN trasmesso con successo
|
||||||
|
Else
|
||||||
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90315)) ' Errore nella trasmissione del programma CN
|
||||||
|
End If
|
||||||
|
Return bOk
|
||||||
|
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
|
' Se richiesta successiva attivazione, faccio reset
|
||||||
If bActivate Then
|
If bActivate Then
|
||||||
EgtOutLog("Call function: DGeneralFunctions_Reset")
|
EgtOutLog("Call function: DGeneralFunctions_Reset")
|
||||||
@@ -1591,6 +1634,10 @@ Public Class CNCommunication
|
|||||||
End If
|
End If
|
||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nResetSendDelay)
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nResetSendDelay)
|
||||||
|
' Se modalità invio a step per debug di Siemens
|
||||||
|
If m_bStepByStepSend And m_nNCType = 3 Then
|
||||||
|
MessageBox.Show( "Reset Done, Press Ok to Continue", "Send Program Step by Step")
|
||||||
|
End If
|
||||||
If m_nNCType = 1 Then
|
If m_nNCType = 1 Then
|
||||||
' Cancellazione eventuale file già presente con lo stesso nome (ignoro eventuale errore)
|
' Cancellazione eventuale file già presente con lo stesso nome (ignoro eventuale errore)
|
||||||
EgtOutLog("Delete_NC_prog(sNumProg)")
|
EgtOutLog("Delete_NC_prog(sNumProg)")
|
||||||
@@ -1600,42 +1647,51 @@ Public Class CNCommunication
|
|||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(100)
|
System.Threading.Thread.Sleep(100)
|
||||||
ElseIf m_nNCType = 4 Then
|
ElseIf m_nNCType = 4 Then
|
||||||
' FANUC: imposto modalità EDIT
|
' FANUC: imposto modalità EDIT se non special send
|
||||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(1) = 0)
|
If m_nSpecialSend <> 1 Then
|
||||||
' Attesa opportuna
|
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(1) = 0)
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
' Attesa opportuna
|
||||||
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")")
|
EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")")
|
||||||
' -------------- START DOWNLOAD --------------
|
' -------------- START DOWNLOAD --------------
|
||||||
TimeSpanInit()
|
TimeSpanInit()
|
||||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
If m_nNCType = 4 AndAlso m_nSpecialSend = 1 Then
|
||||||
' Attesa opportuna
|
bOk = bOk AndAlso SpecialSendProgram(sCncPath, sNumProg)
|
||||||
System.Threading.Thread.Sleep(100)
|
Else
|
||||||
' FANUC: genero un file 901 vuoto da aspedire, attivare; poi rispedisco il file 900
|
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||||
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
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(100)
|
||||||
If bActivate Then
|
' Se modalità invio a step per debug di Siemens
|
||||||
bOk = bOk AndAlso (m_CN.ActivateProgram("901") = 0)
|
If m_bStepByStepSend And m_nNCType = 3 Then
|
||||||
|
MessageBox.Show( "Download NC Prog Done, Press Ok to Continue", "Send Program Step by Step")
|
||||||
|
End If
|
||||||
|
' 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
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
End If
|
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
|
End If
|
||||||
EgtOutLog("Nc Type : " & m_nNCType.ToString)
|
' AXIUM (NUM OLD): se DripFeed non eseguo attivazione programma)
|
||||||
' AXIUM (NUM OLD): se DripFeed non esegluo attivazione programma)
|
|
||||||
If m_nNCType = 1 AndAlso m_CN.bIsDripFeed Then
|
If m_nNCType = 1 AndAlso m_CN.bIsDripFeed Then
|
||||||
' eventauli cambi di stato sono trattati all'interno della funzione DownLoad_NC_prog
|
' eventauli cambi di stato sono trattati all'interno della funzione DownLoad_NC_prog
|
||||||
Return True
|
Return True
|
||||||
@@ -1652,10 +1708,18 @@ Public Class CNCommunication
|
|||||||
EgtOutLog(TimeSpanEnd())
|
EgtOutLog(TimeSpanEnd())
|
||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(100)
|
System.Threading.Thread.Sleep(100)
|
||||||
' Attivo la modalità AUTO prima per preparar il cyclo start
|
' Se modalità invio a step per debug di Siemens
|
||||||
|
If m_bStepByStepSend And m_nNCType = 3 Then
|
||||||
|
MessageBox.Show( "ActivateProgram Done, Press Ok to Continue", "Send Program Step by Step")
|
||||||
|
End If
|
||||||
|
' Attivo la modalità AUTO prima per preparare il cyclo start
|
||||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(100)
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' Se modalità invio a step per debug di Siemens
|
||||||
|
If m_bStepByStepSend And m_nNCType = 3 Then
|
||||||
|
MessageBox.Show( "AUTO Mode Setting Done, Press Ok to Continue", "Send Program Step by Step")
|
||||||
|
End If
|
||||||
' Modalità automatica
|
' Modalità automatica
|
||||||
EgtOutLog("DGeneralFunctions_WriteCncMode(0)")
|
EgtOutLog("DGeneralFunctions_WriteCncMode(0)")
|
||||||
TimeSpanInit()
|
TimeSpanInit()
|
||||||
@@ -1675,6 +1739,89 @@ Public Class CNCommunication
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
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
|
||||||
|
|
||||||
|
' Nuova modalità con nome di programma come progetto
|
||||||
|
If Not String.IsNullOrEmpty( m_sSpecialDest) Then
|
||||||
|
Dim sDestProg As String = m_CurrProjPage.GetCurrentProjectTitle().ToUpperInvariant()
|
||||||
|
' Eseguo trasmissione
|
||||||
|
Dim bOk As Boolean = ( m_CN.Download2_NC_prog(sz_PC_filename, m_sSpecialDest, sDestProg) = 0)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
EgtOutLog( "Send2Result=" & bOk.ToString())
|
||||||
|
' Se non riuscita riprovo
|
||||||
|
If Not bOk Then
|
||||||
|
bOk = ( m_CN.Download2_NC_prog(sz_PC_filename, m_sSpecialDest, sDestProg) = 0)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
EgtOutLog( "SecondSend2Result=" & bOk.ToString())
|
||||||
|
End If
|
||||||
|
Return bOk
|
||||||
|
|
||||||
|
' Vecchia modalità con numero di programma
|
||||||
|
Else
|
||||||
|
' Indice base
|
||||||
|
Dim nBase As Integer = 900
|
||||||
|
' Ho possibilità di trasmettere in più aree consecutive (901, 902, ...)
|
||||||
|
For I As Integer = 1 To m_nSpecialAreas
|
||||||
|
' 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 If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function SpecialSendCopyProgram(sz_PC_filename As String) As Boolean
|
||||||
|
' Solo per Fanuc
|
||||||
|
If m_nNCType <> 4 Then Return False
|
||||||
|
' Creo path destinazione
|
||||||
|
Try
|
||||||
|
Dim sDestProg As String = m_CurrProjPage.GetCurrentProjectTitle() & ".cnc"
|
||||||
|
Dim sDestPath As String = My.Computer.FileSystem.CombinePath(m_sSpecialDest, sDestProg)
|
||||||
|
My.Computer.FileSystem.CopyFile(sz_PC_filename, sDestPath, True)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub GetSpecialCAxes()
|
Private Sub GetSpecialCAxes()
|
||||||
If m_CN.bCPos Then
|
If m_CN.bCPos Then
|
||||||
m_CN.d_axis_position(m_nA4) = m_CN.dCPos
|
m_CN.d_axis_position(m_nA4) = m_CN.dCPos
|
||||||
|
|||||||
@@ -327,6 +327,10 @@ Public MustInherit Class CN_generico
|
|||||||
Public MustOverride Function Write_var_1(sz_par As String, lvalue As Long) As Int16
|
Public MustOverride Function Write_var_1(sz_par As String, lvalue As Long) As Int16
|
||||||
|
|
||||||
Public MustOverride Function Download_NC_prog(sz_PC_filename As String, sz_NC_filename As String) As Int16
|
Public MustOverride Function Download_NC_prog(sz_PC_filename As String, sz_NC_filename As String) As Int16
|
||||||
|
|
||||||
|
Public Overridable Function Download2_NC_prog(sz_PC_filename As String, sz_NC_Dir As String, sz_NC_filename As String) As Int16
|
||||||
|
Return -1
|
||||||
|
End Function
|
||||||
|
|
||||||
Public MustOverride Function Upload_NC_prog(sz_PC_filename As String, sz_NC_filename As String) As Int16
|
Public MustOverride Function Upload_NC_prog(sz_PC_filename As String, sz_NC_filename As String) As Int16
|
||||||
|
|
||||||
|
|||||||
@@ -1018,7 +1018,7 @@ Module M_Fanuc
|
|||||||
Function Send_file_to_nc(ByVal szFileToSend As String, ByVal szDirCn As String, ByVal szNameOnNc As String) As Boolean
|
Function Send_file_to_nc(ByVal szFileToSend As String, ByVal szDirCn As String, ByVal szNameOnNc As String) As Boolean
|
||||||
|
|
||||||
Dim szNamePrgCopy As String
|
Dim szNamePrgCopy As String
|
||||||
Dim szProgramDel As String = szDirCn & "\" & szNameOnNc
|
Dim szProgramDel As String
|
||||||
Dim b_ret As Boolean = False
|
Dim b_ret As Boolean = False
|
||||||
|
|
||||||
If File.Exists(szFileToSend) Then
|
If File.Exists(szFileToSend) Then
|
||||||
@@ -1026,7 +1026,11 @@ Module M_Fanuc
|
|||||||
szNamePrgCopy = InserisciNome(szFileToSend, szNameOnNc) ' correct name inserting for Fanuc 30 series Dim szProgramDel As String = szDirCn & "\" & szNameOnNc
|
szNamePrgCopy = InserisciNome(szFileToSend, szNameOnNc) ' correct name inserting for Fanuc 30 series Dim szProgramDel As String = szDirCn & "\" & szNameOnNc
|
||||||
|
|
||||||
If szDirCn <> "" Then
|
If szDirCn <> "" Then
|
||||||
szProgramDel = szDirCn & "\" & szNameOnNc
|
If szDirCn.EndsWith( "/") Then
|
||||||
|
szProgramDel = szDirCn & szNameOnNc
|
||||||
|
Else
|
||||||
|
szProgramDel = szDirCn & "/" & szNameOnNc
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
szProgramDel = szNameOnNc
|
szProgramDel = szNameOnNc
|
||||||
End If
|
End If
|
||||||
@@ -1357,8 +1361,6 @@ Module M_Fanuc
|
|||||||
|
|
||||||
nLen = InStrRev(szFileName, "\")
|
nLen = InStrRev(szFileName, "\")
|
||||||
|
|
||||||
'NomeOk = Mid(szFileName, nLen + 1) ' filename ( senza "\"
|
|
||||||
|
|
||||||
szFileProgramma = Mid(szFileName, 1, nLen) ' path ( fino a "\" inclusa )
|
szFileProgramma = Mid(szFileName, 1, nLen) ' path ( fino a "\" inclusa )
|
||||||
|
|
||||||
szFileProgramma = szFileProgramma & "Temp.txt"
|
szFileProgramma = szFileProgramma & "Temp.txt"
|
||||||
@@ -1371,28 +1373,28 @@ Module M_Fanuc
|
|||||||
nFilew = FreeFile()
|
nFilew = FreeFile()
|
||||||
FileOpen(nFilew, szFileProgramma, OpenMode.Output)
|
FileOpen(nFilew, szFileProgramma, OpenMode.Output)
|
||||||
|
|
||||||
' PrintLine(nFilew, "%" & vbLf & "<" & NomeSend & ">") ' !!!!!!!! da spostare
|
' scrittura nome programma preceduta da linea vuota
|
||||||
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
|
' Trascrivo file tranne prima linea
|
||||||
While (Not EOF(nFiler))
|
While Not EOF(nFiler)
|
||||||
|
|
||||||
' leggo linea
|
' leggo linea
|
||||||
szLine = LineInput(nFiler)
|
szLine = LineInput(nFiler)
|
||||||
|
|
||||||
' leva linee con % e <e cambia M30 in M99
|
' leva linee con %
|
||||||
|
If InStr(szLine, "%") > 0 Then
|
||||||
' dopo il % serve il nome del programma
|
' Nothing
|
||||||
|
' leva linee con < (se non preceduto da M98)
|
||||||
If ((InStr(szLine, "%") > 0)) Then 'leva %
|
ElseIf InStr(szLine, "<") > 0 AndAlso InStr(szLine, "M98") = 0 Then
|
||||||
' PrintLine(nFilew, szLine)
|
' Nothing
|
||||||
ElseIf ((InStr(szLine, "<") > 0)) Then 'leva <....
|
' leva le righe Oxxxxx
|
||||||
'PrintLine(nFilew, "<" & NomeSend & ">")
|
ElseIf Mid(szLine, 1, 1) = "O" Then
|
||||||
' qq
|
' Nothing
|
||||||
ElseIf (Mid(szLine, 1, 1) = "O") Then ' leva le righe Oxxxxx
|
|
||||||
'qq
|
|
||||||
'ElseIf ((InStr(szLine, "M30") > 0)) Then ' cambia M30 in M99
|
|
||||||
' PrintLine(nFilew, "M99")
|
|
||||||
Else
|
Else
|
||||||
PrintLine(nFilew, szLine)
|
PrintLine(nFilew, szLine)
|
||||||
End If
|
End If
|
||||||
@@ -1405,9 +1407,7 @@ Module M_Fanuc
|
|||||||
FileClose(nFiler)
|
FileClose(nFiler)
|
||||||
FileClose(nFilew)
|
FileClose(nFilew)
|
||||||
|
|
||||||
|
|
||||||
Return szFileProgramma
|
Return szFileProgramma
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function Get_null_terminated_string(cha As Char()) As String
|
Private Function Get_null_terminated_string(cha As Char()) As String
|
||||||
|
|||||||
@@ -106,32 +106,23 @@ Namespace Fanuc
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function set_NC_mode(n_mode As Integer) As Int16
|
Private Function set_NC_mode(n_mode As Integer) As Int16
|
||||||
Dim nret As Integer = -1
|
|
||||||
' Nicola: 29/03/2023
|
|
||||||
'
|
|
||||||
' trascodifica !!!!! da mettere anche nella SET MODE !!!!!
|
|
||||||
'
|
|
||||||
Select Case n_mode
|
Select Case n_mode
|
||||||
|
Case 0 ' Auto
|
||||||
Case 0 ' Auto
|
n_mode = 1
|
||||||
n_mode = 1 ' NUM dice 2 per Auto
|
Case 1 ' EDIT
|
||||||
|
n_mode = 3
|
||||||
Case 1 ' EDIT
|
Case 2 ' MDI
|
||||||
n_mode = 3 ' NUM dice .. ?
|
n_mode = 0
|
||||||
|
Case 7 ' JOG-Manual
|
||||||
Case 2 ' MDI
|
n_mode = 5
|
||||||
n_mode = 0 ' NUM dice 2 per MDI
|
|
||||||
|
|
||||||
Case 7 ' JOG-Manual
|
|
||||||
n_mode = 5 ' NUM dice 2 per Manual
|
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
n_mode = -99
|
n_mode = -99
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim bret As Boolean = NC_write_var_short(s_addr_set_nc_mode, CShort(n_mode))
|
Dim bret As Boolean = NC_write_var_short(s_addr_set_nc_mode, CShort(n_mode))
|
||||||
|
|
||||||
|
Dim nret As Integer = -1
|
||||||
If Not bret Then
|
If Not bret Then
|
||||||
EgtOutLog("Error in set_NC_mode(" & n_mode.ToString() & ")")
|
EgtOutLog("Error in set_NC_mode(" & n_mode.ToString() & ")")
|
||||||
Else
|
Else
|
||||||
@@ -140,28 +131,19 @@ Namespace Fanuc
|
|||||||
|
|
||||||
Return nret
|
Return nret
|
||||||
|
|
||||||
'nret = WriteObjectVarious2(n_portNC, Mode, n_mode) ' 0 AUTO 1 SEQUENZIALE 2 IMD 7 MANUALE
|
|
||||||
|
|
||||||
'If nret <> 0 Then
|
|
||||||
' EgtOutLog("Error in set_NC_mode(" & n_mode.ToString() & ") : " & nret.ToString())
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function set_MDI_command(sz_command As String) As Int16
|
Private Function set_MDI_command(sz_command As String) As Int16
|
||||||
Dim b_ret As Boolean
|
|
||||||
Dim n_ret As Short
|
|
||||||
|
|
||||||
' !!!!! SET THE NC TO THE MDI MODE
|
' !!!!! SET THE NC TO THE MDI MODE
|
||||||
|
|
||||||
b_ret = F_MDI_write_program(sz_command) ' create the command
|
Dim b_ret As Boolean = F_MDI_write_program(sz_command) ' create the command
|
||||||
|
|
||||||
If b_ret Then
|
If b_ret Then
|
||||||
|
|
||||||
' START CYCLE-2
|
' START CYCLE-2
|
||||||
|
|
||||||
n_ret = F_cycle_start()
|
Dim n_ret As Short = F_cycle_start()
|
||||||
|
|
||||||
If b_ret Then
|
If b_ret Then
|
||||||
Return 0
|
Return 0
|
||||||
@@ -368,6 +350,20 @@ Namespace Fanuc
|
|||||||
|
|
||||||
Return n_ret
|
Return n_ret
|
||||||
|
|
||||||
|
End Function
|
||||||
|
'
|
||||||
|
' da PC a CN con la possibilita' di specificare il direttorio sul CN
|
||||||
|
'
|
||||||
|
Public Overrides Function Download2_NC_prog(sz_PC_filename As String, sz_NC_Dir As String, sz_NC_filename As String) As Int16
|
||||||
|
|
||||||
|
Dim b_ret As Boolean, n_ret As Short = -99
|
||||||
|
|
||||||
|
b_ret = M_Fanuc.Send_file_to_nc(sz_PC_filename, sz_NC_Dir, sz_NC_filename)
|
||||||
|
|
||||||
|
If b_ret Then Return 0
|
||||||
|
|
||||||
|
Return n_ret
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
'
|
'
|
||||||
' da CN a pc
|
' da CN a pc
|
||||||
@@ -626,74 +622,61 @@ Namespace Fanuc
|
|||||||
Dim by_buffer(300) As Byte, by_temp As Byte
|
Dim by_buffer(300) As Byte, by_temp As Byte
|
||||||
Dim b_temp As Boolean
|
Dim b_temp As Boolean
|
||||||
|
|
||||||
' read int variables
|
' Read int variables
|
||||||
|
|
||||||
b_ret = F_Read_n_Int_From_PLC(n_Base_addr_int_vars, Convert_NC_Area_code("D"), buffer, n_num_var_int_to_read)
|
b_ret = F_Read_n_Int_From_PLC(n_Base_addr_int_vars, Convert_NC_Area_code("D"), buffer, n_num_var_int_to_read)
|
||||||
If Not b_ret Then
|
If Not b_ret Then Exit Sub
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
' process int variables
|
|
||||||
|
|
||||||
|
' Process int variables
|
||||||
For n = 0 To (n_Nc_var_int_defined - 1)
|
For n = 0 To (n_Nc_var_int_defined - 1)
|
||||||
|
|
||||||
n_temp = buffer((Nc_var_int(n).offset) / 2)
|
n_temp = buffer((Nc_var_int(n).offset) / 2)
|
||||||
n_index = Nc_var_int(n).index
|
n_index = Nc_var_int(n).index
|
||||||
|
|
||||||
Select Case n_index
|
Select Case n_index
|
||||||
|
|
||||||
Case CnData.Mode ' (0) modo 0:AUTO;1:SEQ;2:MDI;3:RAPIDO;4:SERCH;5:EDIT;6:TEST;7:MANUALE;
|
Case CnData.Mode ' (0) modo 0:AUTO;1:SEQ;2:MDI;3:RAPIDO;4:SERCH;5:EDIT;6:TEST;7:MANUALE;
|
||||||
' nMachineMode = n_temp
|
' nMachineMode = n_temp
|
||||||
|
|
||||||
' Applico transcodifica
|
' Applico transcodifica
|
||||||
nMachineMode = Trascodifica_nc_mode(n_temp)
|
nMachineMode = Trascodifica_nc_mode(n_temp)
|
||||||
|
|
||||||
Case CnData.JogIncr ' (1) Tipo man. 0:0.1 u; 1:1 u; 2:10 u; 3:100 u; 4:1 mm; 5:10 mm; 6:ILL; 8:HANDWEEL; 9:0.01 u; 10:0.001 u;
|
Case CnData.JogIncr ' (1) Tipo man. 0:0.1 u; 1:1 u; 2:10 u; 3:100 u; 4:1 mm; 5:10 mm; 6:ILL; 8:HANDWEEL; 9:0.01 u; 10:0.001 u;
|
||||||
' ...
|
' ...
|
||||||
|
|
||||||
Case CnData.Feed ' (2)
|
Case CnData.Feed ' (2)
|
||||||
d_DInterpo_Prog_Feed = CDbl(n_temp) ' d_DInterpo_Prog_Feed
|
d_DInterpo_Prog_Feed = CDbl(n_temp) ' d_DInterpo_Prog_Feed
|
||||||
|
|
||||||
Case CnData.FeedOvr ' (3) Potenziom. Feed = * 0.47059
|
Case CnData.FeedOvr ' (3) Potenziom. Feed = * 0.47059
|
||||||
d_DInterpo_Feed_override = CDbl(n_temp)
|
d_DInterpo_Feed_override = CDbl(n_temp)
|
||||||
b_feed_changed = True
|
b_feed_changed = True
|
||||||
|
|
||||||
Case CnData.Speed ' (4) Speed
|
Case CnData.Speed ' (4) Speed
|
||||||
d_spindle_eff(0) = CDbl(n_temp)
|
d_spindle_eff(0) = CDbl(n_temp)
|
||||||
|
|
||||||
Case CnData.SpeedOvr ' (5) Potenziom. speed = ...
|
Case CnData.SpeedOvr ' (5) Potenziom. speed = ...
|
||||||
n_spindle_override(0) = n_temp
|
n_spindle_override(0) = n_temp
|
||||||
|
Case CnData.Power ' (6) Ampère = * 0.001
|
||||||
Case CnData.Power ' (6) Ampère = * 0.01
|
|
||||||
d_spindle_power = CDbl(n_temp)
|
d_spindle_power = CDbl(n_temp)
|
||||||
|
If d_spindle_power < 0 Then
|
||||||
|
d_spindle_power = 65536 + d_spindle_power
|
||||||
|
End If
|
||||||
b_spindle_power_changed = True
|
b_spindle_power_changed = True
|
||||||
|
|
||||||
Case CnData.PowerOvr ' (10) valore assorbimento massimo mandrino con l'utensile corrente
|
Case CnData.PowerOvr ' (10) valore assorbimento massimo mandrino con l'utensile corrente
|
||||||
bPowerOvr = CDbl(n_temp)
|
bPowerOvr = CDbl(n_temp)
|
||||||
b_spindle_power_changed = True
|
b_spindle_power_changed = True
|
||||||
|
|
||||||
Case CnData.DoorClosed ' (20) Stato porte
|
Case CnData.DoorClosed ' (20) Stato porte
|
||||||
nDoorClosedState = n_temp
|
nDoorClosedState = n_temp
|
||||||
|
|
||||||
Case CnData.EnableZone ' (53)
|
Case CnData.EnableZone ' (53)
|
||||||
nEnableZone = n_temp
|
nEnableZone = n_temp
|
||||||
|
|
||||||
Case CnData.EnablePC ' (54)
|
Case CnData.EnablePC ' (54)
|
||||||
nEnablePc = n_temp
|
nEnablePc = n_temp
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' read bit variables as bytes
|
' Read Cnc interface unit (for Feed units)
|
||||||
|
Dim bCncHmiInches As Boolean = False
|
||||||
b_ret = F_Read_n_Bytes_From_PLC(n_Base_addr_byte_for_bits_vars, Convert_NC_Area_code("D"), by_buffer, n_num_var_byte_for_bits_to_read)
|
if NC_read_var_bit( "F2.0", bCncHmiInches) Then
|
||||||
If Not b_ret Then
|
If bCncHmiInches Then d_DInterpo_Prog_Feed *= ONEINCH / 10
|
||||||
Exit Sub
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' process bit variables
|
' Read bit variables as bytes
|
||||||
|
b_ret = F_Read_n_Bytes_From_PLC(n_Base_addr_byte_for_bits_vars, Convert_NC_Area_code("D"), by_buffer, n_num_var_byte_for_bits_to_read)
|
||||||
|
If Not b_ret Then Exit Sub
|
||||||
|
|
||||||
|
' Process bit variables
|
||||||
For n = 0 To (n_Nc_var_bit_defined - 1)
|
For n = 0 To (n_Nc_var_bit_defined - 1)
|
||||||
|
|
||||||
by_temp = by_buffer(Nc_var_bit(n).offset)
|
by_temp = by_buffer(Nc_var_bit(n).offset)
|
||||||
@@ -702,9 +685,7 @@ Namespace Fanuc
|
|||||||
|
|
||||||
b_temp = Get_bit2(by_temp, n_num_bit)
|
b_temp = Get_bit2(by_temp, n_num_bit)
|
||||||
|
|
||||||
|
|
||||||
Select Case n_index
|
Select Case n_index
|
||||||
|
|
||||||
Case CnData.Spindle ' (7) Stato rotazione mandrino
|
Case CnData.Spindle ' (7) Stato rotazione mandrino
|
||||||
bSpindleState = b_temp
|
bSpindleState = b_temp
|
||||||
Case CnData.Coolant ' (8) Stato acqua
|
Case CnData.Coolant ' (8) Stato acqua
|
||||||
@@ -725,7 +706,6 @@ Namespace Fanuc
|
|||||||
bTableUpState = b_temp
|
bTableUpState = b_temp
|
||||||
Case CnData.TableDown ' (19) Stato tavolo giu'
|
Case CnData.TableDown ' (19) Stato tavolo giu'
|
||||||
bTableDownState = b_temp
|
bTableDownState = b_temp
|
||||||
|
|
||||||
Case CnData.LimitZ ' (21) Stato limitazione asse Z
|
Case CnData.LimitZ ' (21) Stato limitazione asse Z
|
||||||
bLimitZState = b_temp
|
bLimitZState = b_temp
|
||||||
Case CnData.VacuumUp ' (22) Stato ventosa su'
|
Case CnData.VacuumUp ' (22) Stato ventosa su'
|
||||||
@@ -776,10 +756,8 @@ Namespace Fanuc
|
|||||||
bVacuum90 = b_temp
|
bVacuum90 = b_temp
|
||||||
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||||
bVacuumOff = b_temp
|
bVacuumOff = b_temp
|
||||||
|
|
||||||
Case CnData.LaserTrac ' (46) Stato laser tracciatura
|
Case CnData.LaserTrac ' (46) Stato laser tracciatura
|
||||||
bLaserTracState = b_temp
|
bLaserTracState = b_temp
|
||||||
|
|
||||||
Case CnData.XYJog ' (47)
|
Case CnData.XYJog ' (47)
|
||||||
bXYJog = b_temp
|
bXYJog = b_temp
|
||||||
Case CnData.ZCJog ' (48)
|
Case CnData.ZCJog ' (48)
|
||||||
@@ -790,27 +768,14 @@ Namespace Fanuc
|
|||||||
bPowerON = b_temp
|
bPowerON = b_temp
|
||||||
Case CnData.Remote ' (51)
|
Case CnData.Remote ' (51)
|
||||||
bRemote = b_temp
|
bRemote = b_temp
|
||||||
|
|
||||||
Case CnData.Parking ' (52)
|
Case CnData.Parking ' (52)
|
||||||
bParkingState = b_temp
|
bParkingState = b_temp
|
||||||
|
|
||||||
Case CnData.nAxes ' (55)
|
Case CnData.nAxes ' (55)
|
||||||
b5AxesActive = b_temp
|
b5AxesActive = b_temp
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Private Sub OnTimedEvent(source As Object, e As System.Timers.ElapsedEventArgs)
|
' Private Sub OnTimedEvent(source As Object, e As System.Timers.ElapsedEventArgs)
|
||||||
Public Overrides Function Geppo() As Boolean
|
Public Overrides Function Geppo() As Boolean
|
||||||
|
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ Module M_MMFiles
|
|||||||
|
|
||||||
execute_command()
|
execute_command()
|
||||||
' Rimango in attesa
|
' Rimango in attesa
|
||||||
EgtOutLog(" → CycleStart")
|
EgtOutLog(" -> CycleStart")
|
||||||
Return SiemensRet.n_result
|
Return SiemensRet.n_result
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -603,7 +603,7 @@ Module M_MMFiles
|
|||||||
'EgtOutLog("Write_Nc_var start dell'm_mmFiles")
|
'EgtOutLog("Write_Nc_var start dell'm_mmFiles")
|
||||||
SiemensSend.n_Command = CMD.CMD_Read_NC_subscription
|
SiemensSend.n_Command = CMD.CMD_Read_NC_subscription
|
||||||
SiemensSend.sz_string_2 = VarAddr ' indirizzo su CN dell' oggetto da scrivere
|
SiemensSend.sz_string_2 = VarAddr ' indirizzo su CN dell' oggetto da scrivere
|
||||||
EgtOutLog(" → Sottoscrivo lettura di '" & VarAddr & "'")
|
EgtOutLog(" -> Sottoscrivo lettura di '" & VarAddr & "'")
|
||||||
SiemensSend.n_param1 = Index ' tipo di dato da scrivere
|
SiemensSend.n_param1 = Index ' tipo di dato da scrivere
|
||||||
EgtOutLog(" Indice del vettore associato '" & Index & "'")
|
EgtOutLog(" Indice del vettore associato '" & Index & "'")
|
||||||
SiemensSend.n_param2 = ParType ' tipo di dato da scrivere
|
SiemensSend.n_param2 = ParType ' tipo di dato da scrivere
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ Namespace Num
|
|||||||
|
|
||||||
' Stringhe valide : "COM" o "XIP01, 0, 10, 0, 0, 0"
|
' Stringhe valide : "COM" o "XIP01, 0, 10, 0, 0, 0"
|
||||||
Dim nret As Integer = NC_connect(m_szCnDataVar(CnData.Comm))
|
Dim nret As Integer = NC_connect(m_szCnDataVar(CnData.Comm))
|
||||||
EgtOutLog(" → Risultatao apertura connessiione: " & nret)
|
EgtOutLog(" -> Risultato apertura connessione: " & nret)
|
||||||
If nret <> 0 Then Return False
|
If nret <> 0 Then Return False
|
||||||
|
|
||||||
n_state = 2
|
n_state = 2
|
||||||
@@ -538,7 +538,7 @@ Namespace Num
|
|||||||
If nret <> 0 Then
|
If nret <> 0 Then
|
||||||
EgtOutLog("Error in set_NC_mode(" & n_mode.ToString() & ") : " & nret.ToString())
|
EgtOutLog("Error in set_NC_mode(" & n_mode.ToString() & ") : " & nret.ToString())
|
||||||
Else
|
Else
|
||||||
EgtOutLog("set_NC_mode(" & n_mode.ToString() & ") : " & nret.ToString() & " → ok")
|
EgtOutLog("set_NC_mode(" & n_mode.ToString() & ") : " & nret.ToString() & " -> ok")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
global_state = eStateType.READY
|
global_state = eStateType.READY
|
||||||
@@ -928,7 +928,7 @@ Namespace Num
|
|||||||
' Ultimo numero di segmento invaito
|
' Ultimo numero di segmento invaito
|
||||||
Dim i As UInt16
|
Dim i As UInt16
|
||||||
' Invia il primo segmento (dati comunicazione)
|
' Invia il primo segmento (dati comunicazione)
|
||||||
EgtOutLog(" -> Invia il primo segmento " & " → PPport: " & n_PPport & " → NC file name: " & sz_PC_filename & " → Dnc Mode: " & DNC_MODE_FIRST)
|
EgtOutLog(" -> Invia il primo segmento " & " -> PPport: " & n_PPport & " -> NC file name: " & sz_PC_filename & " -> Dnc Mode: " & DNC_MODE_FIRST)
|
||||||
Dim nRet As Int16 = DownLoadPPPFile2(n_PPport, l, 32768, sz_PC_filename, Nothing, DNC_MODE_FIRST, i)
|
Dim nRet As Int16 = DownLoadPPPFile2(n_PPport, l, 32768, sz_PC_filename, Nothing, DNC_MODE_FIRST, i)
|
||||||
' Inserisco un tempo di attesa di sicurezza
|
' Inserisco un tempo di attesa di sicurezza
|
||||||
Thread.Sleep(100)
|
Thread.Sleep(100)
|
||||||
|
|||||||
@@ -211,6 +211,7 @@
|
|||||||
<Compile Include="DirectCuts\SquaringUC.xaml.vb">
|
<Compile Include="DirectCuts\SquaringUC.xaml.vb">
|
||||||
<DependentUpon>SquaringUC.xaml</DependentUpon>
|
<DependentUpon>SquaringUC.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="DirectCuts\VarMdiCommand.vb" />
|
||||||
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
||||||
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -1157,7 +1158,7 @@
|
|||||||
<Resource Include="Resources\NewIcons\MHT.png" />
|
<Resource Include="Resources\NewIcons\MHT.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\NewIcons\logo-OmCut.png" />
|
<Resource Include="Resources\NewIcons\Logo-OmagCut.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\PartRotOff.png" />
|
<Resource Include="Resources\PartRotOff.png" />
|
||||||
@@ -1364,7 +1365,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\Spiral.png" />
|
<Resource Include="Resources\Spiral.png" />
|
||||||
<Resource Include="Resources\NewIcons\Drag_Rettangle.png" />
|
<Resource Include="Resources\NewIcons\Drag_Rectangle.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\NewIcons\GenerateCN.png" />
|
<Resource Include="Resources\NewIcons\GenerateCN.png" />
|
||||||
@@ -1419,12 +1420,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
|
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\NewIcons\Logo-Egalware %282%29.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\NewIcons\Logo-Egalware %283%29.png" />
|
|
||||||
<Resource Include="Resources\NewIcons\RawHeight.png" />
|
<Resource Include="Resources\NewIcons\RawHeight.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<BitmapImage x:Key="ZoomInImg" UriSource="Resources/NewIcons/Zoom+.png"></BitmapImage>
|
<BitmapImage x:Key="ZoomInImg" UriSource="Resources/NewIcons/Zoom+.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/NewIcons/Zoom-.png"></BitmapImage>
|
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/NewIcons/Zoom-.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/NewIcons/ZoomWIn.png"></BitmapImage>
|
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/NewIcons/ZoomWIn.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/NewIcons/logo-OmCut.png"></BitmapImage>
|
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/NewIcons/Logo-OmagCut.png"></BitmapImage>
|
||||||
|
|
||||||
<!--Nuove icone da sistemare-->
|
<!--Nuove icone da sistemare-->
|
||||||
<BitmapImage x:Key="AvantiVeloceImg" UriSource="Resources/NewIcons/AvantiVeloce.png"></BitmapImage>
|
<BitmapImage x:Key="AvantiVeloceImg" UriSource="Resources/NewIcons/AvantiVeloce.png"></BitmapImage>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
<BitmapImage x:Key="Drag_RectangleImg" UriSource="Resources/NewIcons/Drag_Rectangle.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
<BitmapImage x:Key="Drag_RectangleImg" UriSource="Resources/NewIcons/Drag_Rectangle.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Public Class OptionsPageUC
|
|||||||
FractionPatternCmBx.SelectedIndex = nCurrFractionPattern
|
FractionPatternCmBx.SelectedIndex = nCurrFractionPattern
|
||||||
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
||||||
|
|
||||||
' Imposto la preciosne della rappresentazione frazionaria
|
' Imposto la precisione della rappresentazione frazionaria
|
||||||
dPrecision = CDbl(GetPrivateProfileInt(S_GENERAL, K_PRECISION, 64, m_MainWindow.GetIniFile()))
|
dPrecision = CDbl(GetPrivateProfileInt(S_GENERAL, K_PRECISION, 64, m_MainWindow.GetIniFile()))
|
||||||
Dim Index As Integer = PrecisionCmBx.Items.IndexOf(dPrecision)
|
Dim Index As Integer = PrecisionCmBx.Items.IndexOf(dPrecision)
|
||||||
PrecisionCmBx.SelectedIndex = Index
|
PrecisionCmBx.SelectedIndex = Index
|
||||||
@@ -49,7 +49,7 @@ Public Class OptionsPageUC
|
|||||||
|
|
||||||
' Carico la lista con il tipo di avvio
|
' Carico la lista con il tipo di avvio
|
||||||
StartLauncherCmBx.ItemsSource = StartLauncherList
|
StartLauncherCmBx.ItemsSource = StartLauncherList
|
||||||
' 0-New, 1-Last, 2-Open, 3-Window
|
' 0-Ultimo progetto, 1-Nuovo progetto, 2-Apri cartella, 3-Mostra finestra
|
||||||
StartLauncherCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
StartLauncherCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' Rendo invisibile il GroupBox dei Temi la versione corrente
|
' Rendo invisibile il GroupBox dei Temi la versione corrente
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ Public Class AddToDataBaseUC
|
|||||||
If Not EgtPHOTOLib.MainData.bEnableTextId Then
|
If Not EgtPHOTOLib.MainData.bEnableTextId Then
|
||||||
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
' aggiorno il testo del messaggio "Add" → "Save"
|
' aggiorno il testo del messaggio "Add" -> "Save"
|
||||||
AddBtn.Content = EgtMsg(91252) ' Save
|
AddBtn.Content = EgtMsg(91252) ' Save
|
||||||
|
|
||||||
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
|
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ Public Class CurrentProjectPageUC
|
|||||||
m_dRawHeight = 0
|
m_dRawHeight = 0
|
||||||
UpdateHeightTxBx()
|
UpdateHeightTxBx()
|
||||||
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
|
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGroupInPark()
|
||||||
' Parcheggio correttamente i pezzi precedentemente salvati
|
' Parcheggio correttamente i pezzi precedentemente salvati
|
||||||
Dim nIdList As New List(Of Integer)
|
Dim nIdList As New List(Of Integer)
|
||||||
Dim nStatList As New List(Of Integer)
|
Dim nStatList As New List(Of Integer)
|
||||||
@@ -555,9 +555,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' carica ultimo progetto
|
' carica ultimo progetto
|
||||||
Friend Function LoadProject(ByVal sPath As String, Optional ByVal bUpdateIndex As Boolean = True) As Boolean
|
Friend Function LoadProject(ByVal sPath As String, Optional ByVal bUpdateIndex As Boolean = True) As Boolean
|
||||||
' Se richiesto, imposto nuovo indice di progetto
|
' Se richiesto, imposto nuovo indice di progetto
|
||||||
If bUpdateIndex Then
|
If bUpdateIndex Then SetNextProjectIndex()
|
||||||
SetNextProjectIndex()
|
|
||||||
End If
|
|
||||||
' Carico il file del progetto
|
' Carico il file del progetto
|
||||||
EgtOutLog("LoadProject : " & sPath & " (" & m_nCurrProj.ToString() & ")")
|
EgtOutLog("LoadProject : " & sPath & " (" & m_nCurrProj.ToString() & ")")
|
||||||
If Not LoadFile(sPath) Then
|
If Not LoadFile(sPath) Then
|
||||||
@@ -574,39 +572,42 @@ Public Class CurrentProjectPageUC
|
|||||||
UpdateHeightTxBx()
|
UpdateHeightTxBx()
|
||||||
' aggiorno materiale
|
' aggiorno materiale
|
||||||
m_MainWindow.m_CurrentMachine.SetCurrMatByName(GetProjectMaterial())
|
m_MainWindow.m_CurrentMachine.SetCurrMatByName(GetProjectMaterial())
|
||||||
|
' recupero Id del gruppo "OmagCUT"
|
||||||
|
Dim nProjMarkId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
||||||
' aggiorno altezza sovaratavola
|
' aggiorno altezza sovaratavola
|
||||||
If GetPrivateProfileInt(S_GENERAL, "AdditionalTableByProj", 0, m_sIniFile) = 1 Then
|
If GetPrivateProfileInt(S_GENERAL, K_ADD_TAB_BY_PROJ, 0, m_sIniFile) = 1 Then
|
||||||
' leggo il valore OrigiAdditionalTable
|
' leggo il valore OrigAdditionalTable
|
||||||
Dim dValue As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
Dim dValue As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||||
|
Dim sKey As String = K_ADDITIONALTABLE
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
|
Case 4
|
||||||
|
sKey = K_TAB4_ADDITIONALTABLE
|
||||||
Case 3
|
Case 3
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
sKey = K_TAB3_ADDITIONALTABLE
|
||||||
Case 2
|
Case 2
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
sKey = K_TAB2_ADDITIONALTABLE
|
||||||
Case Else
|
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
|
||||||
End Select
|
End Select
|
||||||
|
EgtGetInfo(nProjMarkId, sKey, dValue)
|
||||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
||||||
End If
|
End If
|
||||||
' forzo visualizzazione eventuali dati su aree
|
' Forzo visualizzazione eventuali dati su aree
|
||||||
SetAreasStatus(True)
|
SetAreasStatus(True)
|
||||||
' Recupero info C Home
|
' Recupero info C_Home corrente
|
||||||
Dim dCHomeCurrMach As Double
|
Dim dCHomeCurrMach As Double
|
||||||
Dim dCHomeCurrproj As Double
|
|
||||||
EgtGetAxisHomePos("C", dCHomeCurrMach)
|
EgtGetAxisHomePos("C", dCHomeCurrMach)
|
||||||
' Verifico che esista l'info del progetto
|
' Verifico C_Home del progetto
|
||||||
If EgtExistsInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME) Then
|
Dim dCHomeCurrproj As Double
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, dCHomeCurrproj)
|
If EgtGetInfo(nProjMarkId, INFO_CAXESHOME, dCHomeCurrproj) Then
|
||||||
' Se la macchina indicata ha C Home differente allora comunico un errore del progetto
|
' Recupero tipo di ventose usate
|
||||||
If Math.Abs(dCHomeCurrproj - dCHomeCurrMach) > EPS_ANG_SMALL Then
|
Dim nVacType As Integer = 0
|
||||||
|
EgtGetInfo(EgtGetHeadId("H4"), KEY_VAC_TYPE, nVacType)
|
||||||
|
' Se ventose di lato alla testa e C_Home diverso, registro un problema
|
||||||
|
If nVacType = 2 And Math.Abs(dCHomeCurrproj - dCHomeCurrMach) > EPS_ANG_SMALL Then
|
||||||
EgtOutLog(" WARNING -> C axes home project is different from current machine, delta ang C home:" & DoubleToString(dCHomeCurrproj - dCHomeCurrMach, 2))
|
EgtOutLog(" WARNING -> C axes home project is different from current machine, delta ang C home:" & DoubleToString(dCHomeCurrproj - dCHomeCurrMach, 2))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHomeCurrMach, 0))
|
EgtSetInfo(nProjMarkId, INFO_CAXESHOME, DoubleToString(dCHomeCurrMach, 0))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SelParkIndWD.UpdateViewOnParkInd(False)
|
|
||||||
|
|
||||||
' Dichiaro progetto non modificato
|
' Dichiaro progetto non modificato
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
Return True
|
Return True
|
||||||
@@ -632,7 +633,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' Se la macchina del file è quella impostata
|
' Se la macchina del file è quella impostata
|
||||||
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
|
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
|
||||||
AdjustAdditionalTable(True)
|
AdjustAdditionalTable(True)
|
||||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||||
Else
|
Else
|
||||||
' Emetto messaggio
|
' Emetto messaggio
|
||||||
Dim sOut As String = EgtMsg(90320) & " (" & sFileMachine & ")" ' Macchina diversa
|
Dim sOut As String = EgtMsg(90320) & " (" & sFileMachine & ")" ' Macchina diversa
|
||||||
@@ -708,7 +709,7 @@ Public Class CurrentProjectPageUC
|
|||||||
End If
|
End If
|
||||||
' Notifico a foto il cambio di path
|
' Notifico a foto il cambio di path
|
||||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||||
Else
|
Else
|
||||||
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
|
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
|
||||||
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
|
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
|
||||||
@@ -727,10 +728,11 @@ Public Class CurrentProjectPageUC
|
|||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||||
AddProjectMark()
|
Dim nMarkId As Integer = AddProjectMark()
|
||||||
' Assegno indice di progetto e materiale
|
' Assegno nome, indice di progetto e materiale
|
||||||
SetProjectIndexFlag()
|
SetProjectName( nMarkId)
|
||||||
SetProjectMaterial()
|
SetProjectIndex( nMarkId)
|
||||||
|
SetProjectMaterial( nMarkId)
|
||||||
' Eseguo
|
' Eseguo
|
||||||
If Not SaveFile(sPath) Then Return False
|
If Not SaveFile(sPath) Then Return False
|
||||||
' aggiungo il file all'elenco dei file recenti
|
' aggiungo il file all'elenco dei file recenti
|
||||||
@@ -759,9 +761,7 @@ Public Class CurrentProjectPageUC
|
|||||||
Dim CurrProjName As String = String.Empty
|
Dim CurrProjName As String = String.Empty
|
||||||
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", CurrProjName, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", CurrProjName, m_MainWindow.GetIniFile())
|
||||||
' Se nome vuoto, non salvo
|
' Se nome vuoto, non salvo
|
||||||
If String.IsNullOrEmpty(CurrProjName) Then
|
If String.IsNullOrEmpty(CurrProjName) Then Return False
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
Dim sPath As String = m_MainWindow.GetNamedSaveDir() & "\" & CurrProjName & ".nge"
|
Dim sPath As String = m_MainWindow.GetNamedSaveDir() & "\" & CurrProjName & ".nge"
|
||||||
' Rinomino eventuale fotografia
|
' Rinomino eventuale fotografia
|
||||||
Dim nPhotoId As Integer = GetPhoto()
|
Dim nPhotoId As Integer = GetPhoto()
|
||||||
@@ -784,8 +784,8 @@ Public Class CurrentProjectPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'--------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------
|
||||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
If m_MainWindow.EnabledDxfPark() Then
|
||||||
' Gestione visulizzazione lista pezzi in parcheggio
|
' Gestione visualizzazione lista pezzi in parcheggio
|
||||||
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
|
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
|
||||||
SelParkIndWD.CopyImgSvg(sPath)
|
SelParkIndWD.CopyImgSvg(sPath)
|
||||||
SelParkIndWD.sActualProj = String.Empty
|
SelParkIndWD.sActualProj = String.Empty
|
||||||
@@ -794,11 +794,13 @@ Public Class CurrentProjectPageUC
|
|||||||
'--------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------
|
||||||
|
|
||||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||||
AddProjectMark()
|
Dim nMarkId As Integer = AddProjectMark()
|
||||||
|
' Assegno nome, indice di progetto e materiale
|
||||||
|
SetProjectName( nMarkId)
|
||||||
|
SetProjectIndex( nMarkId)
|
||||||
|
SetProjectMaterial( nMarkId)
|
||||||
' Eseguo
|
' Eseguo
|
||||||
If Not SaveFile(sPath) Then
|
If Not SaveFile(sPath) Then Return False
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
' aggiungo il file all'elenco dei file recenti
|
' aggiungo il file all'elenco dei file recenti
|
||||||
m_MruFiles.Add(sPath)
|
m_MruFiles.Add(sPath)
|
||||||
' Dichiaro progetto non modificato
|
' Dichiaro progetto non modificato
|
||||||
@@ -835,6 +837,15 @@ Public Class CurrentProjectPageUC
|
|||||||
Friend Function GetCurrentProject() As Integer
|
Friend Function GetCurrentProject() As Integer
|
||||||
Return m_nCurrProj
|
Return m_nCurrProj
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetCurrentProjectTitle() As String
|
||||||
|
Dim CurrProjName As String = ""
|
||||||
|
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", CurrProjName, m_MainWindow.GetIniFile())
|
||||||
|
If String.IsNullOrWhiteSpace(CurrProjName) Then
|
||||||
|
CurrProjName = Math.Abs(m_nCurrProj).ToString("D4")
|
||||||
|
End If
|
||||||
|
Return CurrProjName
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function GetCurrentProjectName() As String
|
Friend Function GetCurrentProjectName() As String
|
||||||
Dim CurrProjName As String = String.Empty
|
Dim CurrProjName As String = String.Empty
|
||||||
@@ -907,22 +918,16 @@ Public Class CurrentProjectPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function AddProjectMark() As Integer
|
Friend Function AddProjectMark() As Integer
|
||||||
' Recupero flag di tagli ridotti
|
|
||||||
Dim nReducedCut As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 1, m_MainWindow.GetMachIniFile())
|
|
||||||
' Se assente, inserisco contrassegno di progetto OmagCut valido e imposto flag dei tagli ridotti
|
' Se assente, inserisco contrassegno di progetto OmagCut valido e imposto flag dei tagli ridotti
|
||||||
Dim nMarkId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
Dim nMarkId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
||||||
If nMarkId = GDB_ID.NULL Then
|
If nMarkId = GDB_ID.NULL Then
|
||||||
nMarkId = EgtCreateGroup(GDB_ID.ROOT)
|
nMarkId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
|
||||||
' altrimenti, aggiorno il flag dei tagli ridotti
|
|
||||||
Else
|
|
||||||
Dim nMarkReducedCut As Integer = 0
|
|
||||||
If Not EgtGetInfo(nMarkId, INFO_REDUCEDCUT, nMarkReducedCut) OrElse nMarkReducedCut <> nReducedCut Then
|
|
||||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
' Recupero flag di tagli ridotti e lo imposo o aggiorno nel progetto
|
||||||
|
Dim nReducedCut As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 1, m_MainWindow.GetMachIniFile())
|
||||||
|
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut, True)
|
||||||
Return nMarkId
|
Return nMarkId
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -987,9 +992,16 @@ Public Class CurrentProjectPageUC
|
|||||||
Return (nFlag <> 0)
|
Return (nFlag <> 0)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetProjectIndexFlag() As Boolean
|
Friend Function SetProjectName( Optional nMarkId As Integer = GDB_ID.NULL) As Boolean
|
||||||
Dim nMarkId As Integer = AddProjectMark()
|
If nMarkId = GDB_ID.NULL Then nMarkId = AddProjectMark()
|
||||||
Return EgtSetInfo(nMarkId, INFO_PROJINDEX, Math.Abs(m_nCurrProj))
|
Dim sCurrProjName As String = String.Empty
|
||||||
|
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", sCurrProjName, m_MainWindow.GetIniFile())
|
||||||
|
Return EgtSetInfo(nMarkId, INFO_PROJNAME, sCurrProjName, True)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetProjectIndex( Optional nMarkId As Integer = GDB_ID.NULL) As Boolean
|
||||||
|
If nMarkId = GDB_ID.NULL Then nMarkId = AddProjectMark()
|
||||||
|
Return EgtSetInfo(nMarkId, INFO_PROJINDEX, Math.Abs(m_nCurrProj), True)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetProjectOrder(sOrder As String) As Boolean
|
Friend Function SetProjectOrder(sOrder As String) As Boolean
|
||||||
@@ -1017,13 +1029,10 @@ Public Class CurrentProjectPageUC
|
|||||||
Return EgtRemoveInfo(nMarkId, INFO_LASTSLAB)
|
Return EgtRemoveInfo(nMarkId, INFO_LASTSLAB)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetProjectMaterial() As Boolean
|
Friend Function SetProjectMaterial( Optional nMarkId As Integer = GDB_ID.NULL) As Boolean
|
||||||
Dim nMarkId As Integer = AddProjectMark()
|
If nMarkId = GDB_ID.NULL Then nMarkId = AddProjectMark()
|
||||||
If Not IsNothing(m_MainWindow.m_CurrentMachine.CurrMat) Then
|
If IsNothing(m_MainWindow.m_CurrentMachine.CurrMat) Then Return False
|
||||||
Return EgtSetInfo(nMarkId, INFO_PROJMAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
Return EgtSetInfo(nMarkId, INFO_PROJMAT, m_MainWindow.m_CurrentMachine.CurrMat.sName, True)
|
||||||
Else
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetProjectMaterial() As String
|
Friend Function GetProjectMaterial() As String
|
||||||
@@ -1073,7 +1082,7 @@ Public Class CurrentProjectPageUC
|
|||||||
|
|
||||||
Friend Sub UpdateMachiningTxBx()
|
Friend Sub UpdateMachiningTxBx()
|
||||||
' se macchina waterjet e senza uscita lama allora visualizzo info WJ
|
' se macchina waterjet e senza uscita lama allora visualizzo info WJ
|
||||||
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If m_MainWindow.m_CurrentMachine.bWaterJet And Not m_MainWindow.m_CurrentMachine.ExistsSawHead() Then
|
||||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Public Class OmagPhotoWD
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'--------------- DEFINSCO nuova lastra esistente ---------------
|
'--------------- DEFINSCO nuova lastra esistente ---------------
|
||||||
' imposto come prima pagina sempre la lista (per inizializzare gli elementi della libreria) → ACCELERARE il processo di creazione di questo oggetto!
|
' imposto come prima pagina sempre la lista (per inizializzare gli elementi della libreria) -> ACCELERARE il processo di creazione di questo oggetto!
|
||||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
EgtPHOTOLib.PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
||||||
' imposto il percoso della foto appena generato
|
' imposto il percoso della foto appena generato
|
||||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ImagePath = sImage
|
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ImagePath = sImage
|
||||||
@@ -142,7 +142,7 @@ Public Class OmagPhotoWD
|
|||||||
m_AddToDataBaseUC.MatTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Material
|
m_AddToDataBaseUC.MatTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Material
|
||||||
m_AddToDataBaseUC.ThicknessTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness
|
m_AddToDataBaseUC.ThicknessTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness
|
||||||
m_AddToDataBaseUC.ProjectTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo
|
m_AddToDataBaseUC.ProjectTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo
|
||||||
' aggiorno il testo del messaggio "Add" → "Save"
|
' aggiorno il testo del messaggio "Add" -> "Save"
|
||||||
m_AddToDataBaseUC.AddBtn.Content = EgtMsg(91252) ' Save
|
m_AddToDataBaseUC.AddBtn.Content = EgtMsg(91252) ' Save
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ Public Class OpenPageUC
|
|||||||
SelParkIndWD.sActualProj = sPath
|
SelParkIndWD.sActualProj = sPath
|
||||||
Dim ListParkInd As New List(Of ParkInd)
|
Dim ListParkInd As New List(Of ParkInd)
|
||||||
SelParkIndWD.LoadParkInd(ListParkInd, OpenScene.GetCtx)
|
SelParkIndWD.LoadParkInd(ListParkInd, OpenScene.GetCtx)
|
||||||
If ListParkInd.Count > 2 And GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
If m_MainWindow.EnabledDxfPark() And ListParkInd.Count > 2 Then
|
||||||
m_SelParkInd = New SelParkIndWD(m_MainWindow, OpenScene.GetCtx)
|
m_SelParkInd = New SelParkIndWD(m_MainWindow, OpenScene.GetCtx)
|
||||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
|
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
|
||||||
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
|
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ Public Class ProjectMgrUC
|
|||||||
' cancello tutti i punti di inizio (Waterjet)
|
' cancello tutti i punti di inizio (Waterjet)
|
||||||
ResetAllStartCurv()
|
ResetAllStartCurv()
|
||||||
' cancello tutti i ponticelli disegnati
|
' cancello tutti i ponticelli disegnati
|
||||||
ResetAllBRidges()
|
ResetAllBridges()
|
||||||
' cancella tutti i tagli di separazione inseriti in OFFICE
|
' cancella tutti i tagli di separazione inseriti in OFFICE
|
||||||
ResetAllSplitCut()
|
ResetAllSplitCut()
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ Public Class ProjectMgrUC
|
|||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
ResetAllMachinings(nWarn)
|
ResetAllMachinings(nWarn)
|
||||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
' Se esistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||||
ResetAllRawPart()
|
ResetAllRawPart()
|
||||||
' Aggiorno Info C Home
|
' Aggiorno Info C Home
|
||||||
Dim dCHome As Double
|
Dim dCHome As Double
|
||||||
@@ -335,14 +335,14 @@ Public Class ProjectMgrUC
|
|||||||
' cancello tutti i punti di inizio (Waterjet)
|
' cancello tutti i punti di inizio (Waterjet)
|
||||||
ResetAllStartCurv()
|
ResetAllStartCurv()
|
||||||
' cancello tutti i ponticelli disegnati
|
' cancello tutti i ponticelli disegnati
|
||||||
ResetAllBRidges()
|
ResetAllBridges()
|
||||||
' cancella tutti i tagli di separazione inseriti in OFFICE
|
' cancella tutti i tagli di separazione inseriti in OFFICE
|
||||||
ResetAllSplitCut()
|
ResetAllSplitCut()
|
||||||
' Ricalcolo tutte le lavorazioni
|
' Ricalcolo tutte le lavorazioni
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
ResetAllMachinings(nWarn)
|
ResetAllMachinings(nWarn)
|
||||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
' Se esistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||||
ResetAllRawPart()
|
ResetAllRawPart()
|
||||||
' Aggiorno Info C Home
|
' Aggiorno Info C Home
|
||||||
Dim dCHome As Double
|
Dim dCHome As Double
|
||||||
@@ -461,7 +461,7 @@ Public Class ProjectMgrUC
|
|||||||
#If TRIAL Then
|
#If TRIAL Then
|
||||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' se sono in modalità Test allora eseguo solo il posizionamento della lama
|
' Se sono in modalità Test Posizione lavorazione
|
||||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv Then
|
If m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv Then
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
@@ -481,9 +481,6 @@ Public Class ProjectMgrUC
|
|||||||
If Not TestToolWD.DialogResult Then Return
|
If Not TestToolWD.DialogResult Then Return
|
||||||
Dim CurrTestTool As TestTool = TestToolWD.GetSelectedTool
|
Dim CurrTestTool As TestTool = TestToolWD.GetSelectedTool
|
||||||
|
|
||||||
'Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
'EgtTdbSetCurrTool(sSaw)
|
|
||||||
|
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
Dim dHeight As Double = 0
|
Dim dHeight As Double = 0
|
||||||
If CurrTestTool.ToolIsSaw Then
|
If CurrTestTool.ToolIsSaw Then
|
||||||
@@ -504,8 +501,7 @@ Public Class ProjectMgrUC
|
|||||||
dThick = dThick / 2
|
dThick = dThick / 2
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' recupero il lato selezionato
|
||||||
'recupero il lato selezionato
|
|
||||||
Dim nIdSelected As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv
|
Dim nIdSelected As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv
|
||||||
If nIdSelected = -1 Then Return
|
If nIdSelected = -1 Then Return
|
||||||
' recupero il vettore nel punto medio dell'entità
|
' recupero il vettore nel punto medio dell'entità
|
||||||
@@ -517,16 +513,14 @@ Public Class ProjectMgrUC
|
|||||||
vtDirT.Normalize()
|
vtDirT.Normalize()
|
||||||
' calcolo la direzione di offset da applicare all'utensile
|
' calcolo la direzione di offset da applicare all'utensile
|
||||||
Dim vtOffset As New Vector3d(vtDirT.x, vtDirT.y, vtDirT.z)
|
Dim vtOffset As New Vector3d(vtDirT.x, vtDirT.y, vtDirT.z)
|
||||||
vtOffset.Rotate(Vector3d.Z_AX, 90)
|
vtOffset.Rotate(Vector3d.Z_AX(), 90)
|
||||||
|
|
||||||
If CurrTestTool.ToolIsSaw Then
|
If CurrTestTool.ToolIsSaw Then
|
||||||
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
||||||
vtDirT.Rotate(Vector3d.Z_AX, 90)
|
vtDirT.Rotate(Vector3d.Z_AX(), 90)
|
||||||
Else
|
Else
|
||||||
' calcolo il versore perpendicolare alla linea di taglio (diretto verso l'interno del pezzo)
|
' direzione utensile sempre Z+
|
||||||
vtDirT.Rotate(Vector3d.Z_AX, 90)
|
vtDirT = Vector3d.Z_AX()
|
||||||
' calcolo il versore perpendicolare al piano di taglio (diretto verso l'interno dell'utensile)
|
|
||||||
vtDirT.Rotate(vtDirLine, 90)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Calcolo punto di posizionamemto (punto medio)
|
' Calcolo punto di posizionamemto (punto medio)
|
||||||
@@ -544,50 +538,66 @@ Public Class ProjectMgrUC
|
|||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
|
||||||
' Imposto la lama corrente, preso dalla scelta precedente
|
' Imposto l'utensile corrente, preso dalla scelta precedente
|
||||||
'If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
If Not EgtSetCalcTool(CurrTestTool.ToolName, CurrTestTool.ToolHead, CurrTestTool.ToolExit) Then Return
|
If Not EgtSetCalcTool(CurrTestTool.ToolName, CurrTestTool.ToolHead, CurrTestTool.ToolExit) Then Return
|
||||||
|
Dim vsAxNames As String() = Nothing
|
||||||
|
EgtGetAllCurrAxesNames( vsAxNames)
|
||||||
|
Dim nRotAxCnt As Integer = vsAxNames.Count() - 3
|
||||||
|
|
||||||
' calcolo la posizione degli assi rotanti C, B
|
' calcolo la posizione degli assi rotanti C, B
|
||||||
Dim nStat As Integer
|
Dim nStat As Integer
|
||||||
Dim dC1, dB1, dC2, dB2 As Double
|
Dim dC1, dB1, dC2, dB2 As Double
|
||||||
|
' Se utensile LAMA
|
||||||
If CurrTestTool.ToolIsSaw Then
|
If CurrTestTool.ToolIsSaw Then
|
||||||
' Se LAMA
|
|
||||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Se LASER
|
||||||
ElseIf CurrTestTool.ToolIsLaser Then
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
' Se LASER
|
|
||||||
Dim dHomeC As Double = 90
|
Dim dHomeC As Double = 90
|
||||||
EgtGetAxisHomePos("C", dHomeC)
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
' Forzo B90
|
' Se asse C non calcolato, imposto il valore di Home
|
||||||
|
If nRotAxCnt = 0 Or nStat < 0 Then
|
||||||
|
dC1 = dHomeC
|
||||||
|
dC2 = dHomeC
|
||||||
|
End If
|
||||||
|
' Forzo asse B a 90 (per le lame)
|
||||||
dB1 = 90
|
dB1 = 90
|
||||||
' Forzo la pozione in Z alla quota di Home (per evitare l'errore di fine corsa asse Z)
|
' Se FRESA o FORETTO
|
||||||
Dim dHomeZ As Double = 0
|
ElseIf CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||||
EgtGetAxisHomePos("Z", dHomeZ)
|
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
||||||
ptMid.z = dHomeZ
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
Else
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
||||||
' Se utensile speciale
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
' Se asse C non calcolato, imposto il valore preferenziale
|
||||||
' Se FRESA/FORETTO
|
If nStat < 0 Then
|
||||||
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
dC1 = nStepRotC
|
||||||
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
dC2 = nStepRotC
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
End If
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
' Se WATERJET
|
||||||
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
||||||
' Se WJ
|
Dim dHomeC As Double = 90
|
||||||
Dim dHomeC As Double = 90
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
EgtGetAxisHomePos("C", dHomeC)
|
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
||||||
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
' Se asse C non calcolato, imposto il valore di Home
|
||||||
|
If nStat < 0 Then
|
||||||
|
dC1 = dHomeC
|
||||||
|
dC2 = dHomeC
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' calcolo la posizione degli assi lineari X, Y, Z
|
' calcolo la posizione degli assi lineari X, Y, Z
|
||||||
Dim dX, dY, dZ As Double
|
Dim dX, dY, dZ As Double
|
||||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||||
|
' Se laser, forzo la Z alla quota di Home
|
||||||
|
If CurrTestTool.ToolIsLaser Then
|
||||||
|
Dim dHomeZ As Double = 0
|
||||||
|
EgtGetAxisHomePos("Z", dHomeZ)
|
||||||
|
dZ = dHomeZ
|
||||||
|
End If
|
||||||
|
|
||||||
' verifica assi lineari
|
' verifica assi lineari
|
||||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
@@ -595,35 +605,56 @@ Public Class ProjectMgrUC
|
|||||||
EgtOutLog("Out of stroke: " & nStat)
|
EgtOutLog("Out of stroke: " & nStat)
|
||||||
vtDirT = -vtDirT
|
vtDirT = -vtDirT
|
||||||
ptMid -= vtDirT * dThick
|
ptMid -= vtDirT * dThick
|
||||||
|
' Se LAMA
|
||||||
If CurrTestTool.ToolIsSaw Then
|
If CurrTestTool.ToolIsSaw Then
|
||||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Se LASER
|
||||||
ElseIf CurrTestTool.ToolIsLaser Then
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
' Se LASER
|
|
||||||
Dim dHomeC As Double = 90
|
Dim dHomeC As Double = 90
|
||||||
EgtGetAxisHomePos("C", dHomeC)
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Se asse C non calcolato, imposto il valore di Home
|
||||||
|
If nRotAxCnt = 0 Or nStat < 0 Then
|
||||||
|
dC1 = dHomeC
|
||||||
|
dC2 = dHomeC
|
||||||
|
End If
|
||||||
' Forzo B90
|
' Forzo B90
|
||||||
dB1 = 90
|
dB1 = 90
|
||||||
Else
|
' Se FRESA/FORETTO
|
||||||
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
ElseIf CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||||
' Se FRESA/FORETTO
|
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
||||||
Dim nStepRotC As Integer = GetPrivateProfileInt(S_NEST, K_MACH_DRILL_MILL_C90, 1, m_MainWindow.GetMachIniFile())
|
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
||||||
Dim vtPrefAuxDir As Vector3d = -Vector3d.X_AX()
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, 90 * nStepRotC)
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
' Se asse C non calcolato, imposto il valore preferenziale
|
||||||
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
If nStat < 0 Then
|
||||||
' Se WJ
|
dC1 = nStepRotC
|
||||||
Dim dHomeC As Double = 90
|
dC2 = nStepRotC
|
||||||
EgtGetAxisHomePos("C", dHomeC)
|
End If
|
||||||
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
' Se WATERJET
|
||||||
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
ElseIf CurrTestTool.ToolType = MCH_TY.WATERJET Then
|
||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
' Se WJ
|
||||||
|
Dim dHomeC As Double = 90
|
||||||
|
EgtGetAxisHomePos("C", dHomeC)
|
||||||
|
Dim vtPrefAuxDir As Vector3d = Vector3d.X_AX()
|
||||||
|
vtPrefAuxDir.Rotate(Vector3d.Z_AX, dHomeC)
|
||||||
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
|
' Se asse C non calcolato, imposto il valore di Home
|
||||||
|
If nStat < 0 Then
|
||||||
|
dC1 = dHomeC
|
||||||
|
dC2 = dHomeC
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
' calcolo la posizione degli assi lineari X, Y, Z
|
||||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||||
|
' Se laser, forzo la Z alla quota di Home
|
||||||
|
If CurrTestTool.ToolIsLaser Then
|
||||||
|
Dim dHomeZ As Double = 0
|
||||||
|
EgtGetAxisHomePos("Z", dHomeZ)
|
||||||
|
dZ = dHomeZ
|
||||||
|
End If
|
||||||
|
|
||||||
' verifica assi lineari
|
' verifica assi lineari
|
||||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
@@ -633,19 +664,13 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||||
Dim ptMachine As Point3d = New Point3d(dX, dY, If(CurrTestTool.ToolIsLaser, 0, dZ))
|
ExecuteTestMoveCNC(New Point3d(dX, dY, dZ), dC1, dB1, CurrTestTool)
|
||||||
ExecuteCommandCNC(ptMachine, dC1, dB1, CurrTestTool)
|
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' ---------------------------- Fine modalità test --------------------------------------------
|
' ---------------------------- Fine modalità test posizione lavorazione --------------------------------------------
|
||||||
' se esiste salvo il nome del progetto
|
|
||||||
Dim sCurrProjName As String = String.Empty
|
' Salvo eventuale nome del progetto
|
||||||
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", sCurrProjName, m_MainWindow.GetIniFile())
|
m_CurrProjPage.SetProjectName()
|
||||||
If Not String.IsNullOrEmpty(sCurrProjName) Then
|
|
||||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_PROJNAME, sCurrProjName)
|
|
||||||
Else
|
|
||||||
EgtRemoveInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_PROJNAME)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||||
@@ -665,7 +690,7 @@ Public Class ProjectMgrUC
|
|||||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||||
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
Dim bDirectCut As Boolean = IsDirectCutOn()
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
Not bDirectCut And
|
Not bDirectCut And
|
||||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||||
@@ -693,7 +718,7 @@ Public Class ProjectMgrUC
|
|||||||
' Costringo ad aggiornare UI
|
' Costringo ad aggiornare UI
|
||||||
UpdateUI()
|
UpdateUI()
|
||||||
' Inserisco indice di progetto
|
' Inserisco indice di progetto
|
||||||
m_CurrProjPage.SetProjectIndexFlag()
|
m_CurrProjPage.SetProjectIndex()
|
||||||
' Inserisco il materiale
|
' Inserisco il materiale
|
||||||
m_CurrProjPage.SetProjectMaterial()
|
m_CurrProjPage.SetProjectMaterial()
|
||||||
' Salvo il progetto con le lavorazioni
|
' Salvo il progetto con le lavorazioni
|
||||||
@@ -766,7 +791,8 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'------------------- INIZIO Avvio il Ciclo-Start-------------------------
|
'------------------- 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)
|
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||||
MyCicloStartWD.ShowDialog()
|
MyCicloStartWD.ShowDialog()
|
||||||
End If
|
End If
|
||||||
@@ -1174,7 +1200,7 @@ Public Class ProjectMgrUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double, SelTestTool As TestTool)
|
Private Sub ExecuteTestMoveCNC(ptMid As Point3d, dAngC As Double, dAngB As Double, SelTestTool As TestTool)
|
||||||
|
|
||||||
Dim CmdString As String = String.Empty
|
Dim CmdString As String = String.Empty
|
||||||
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||||
@@ -1185,7 +1211,7 @@ Public Class ProjectMgrUC
|
|||||||
' imposto avanzamneto in rapido (non deve essere impostata feed e speed)
|
' imposto avanzamneto in rapido (non deve essere impostata feed e speed)
|
||||||
EgtLuaSetGlobBoolVar("CMD.G0", True)
|
EgtLuaSetGlobBoolVar("CMD.G0", True)
|
||||||
|
|
||||||
'----------- POSIZINE MACCHINA -----------
|
'----------- POSIZIONE MACCHINA -----------
|
||||||
' Leggo gli assi rispetto allo 0 macchina
|
' Leggo gli assi rispetto allo 0 macchina
|
||||||
m_CurrNcComm.m_CN.set_OP_OM(0)
|
m_CurrNcComm.m_CN.set_OP_OM(0)
|
||||||
|
|
||||||
@@ -1200,13 +1226,6 @@ Public Class ProjectMgrUC
|
|||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
|
|
||||||
'' Recupero spessore lama corrente
|
|
||||||
'Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
'EgtTdbSetCurrTool(sSaw)
|
|
||||||
'Dim dThick As Double = 0
|
|
||||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
|
||||||
'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
|
||||||
|
|
||||||
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||||
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName)
|
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName)
|
||||||
EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias)
|
EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias)
|
||||||
@@ -1217,7 +1236,6 @@ Public Class ProjectMgrUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||||
EgtLuaSetGlobStringVar("CMD.TCPOS", sTCPos)
|
EgtLuaSetGlobStringVar("CMD.TCPOS", sTCPos)
|
||||||
|
|
||||||
|
|
||||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", ptMid.x)
|
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", ptMid.x)
|
||||||
@@ -1237,9 +1255,7 @@ Public Class ProjectMgrUC
|
|||||||
' Log del comando
|
' Log del comando
|
||||||
EgtOutLog("CmdString=" & CmdString)
|
EgtOutLog("CmdString=" & CmdString)
|
||||||
|
|
||||||
' Reset lua
|
' Modifico stringa per inserire i newline
|
||||||
EgtLuaResetGlobVar("CMD")
|
|
||||||
' Modifico stringa per inserire i newline ( in questo caso non c'è bisogno perchè tutto sulla stessa linea)
|
|
||||||
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
||||||
' Creo file...
|
' Creo file...
|
||||||
Dim FilePath As String = m_MainWindow.GetCncDir() & "\TestWork" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
Dim FilePath As String = m_MainWindow.GetCncDir() & "\TestWork" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||||
@@ -1264,8 +1280,7 @@ Public Class ProjectMgrUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
' ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||||
If TestBtn.IsChecked Then
|
If TestBtn.IsChecked Then
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = True
|
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = True
|
||||||
@@ -1342,7 +1357,7 @@ Public Class ProjectMgrUC
|
|||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectAllBtn.Visibility = Windows.Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectAllBtn.Visibility = Windows.Visibility.Hidden
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectAllBtn.Visibility = Windows.Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectAllBtn.Visibility = Windows.Visibility.Hidden
|
||||||
' nuovi bottoni pagina di Nesting
|
' nuovi bottoni pagina di Nesting
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DragRettanleBtn.Visibility = Windows.Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DragRectangleBtn.Visibility = Windows.Visibility.Hidden
|
||||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Visible Then
|
If m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Visible Then
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
@@ -1432,11 +1447,11 @@ Public Class ProjectMgrUC
|
|||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectAllBtn.Visibility = Windows.Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectAllBtn.Visibility = Windows.Visibility.Visible
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectAllBtn.Visibility = Windows.Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectAllBtn.Visibility = Windows.Visibility.Visible
|
||||||
' nuovi bottoni pagina di Nesting
|
' nuovi bottoni pagina di Nesting
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DragRettanleBtn.Visibility = Windows.Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DragRectangleBtn.Visibility = Windows.Visibility.Visible
|
||||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Hidden Then
|
If m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Hidden Then
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Visible
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.Visibility = Windows.Visibility.Visible
|
||||||
End If
|
End If
|
||||||
' disabilito i comandi per gestioen SpotReg
|
' disabilito i comandi per gestione SpotReg
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.PointRegCheckedOff()
|
m_MainWindow.m_CadCutPageUC.m_NestPage.PointRegCheckedOff()
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UG0_Reg.Visibility = Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.UG0_Reg.Visibility = Visibility.Hidden
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UG1_Reg.Visibility = Visibility.Hidden
|
m_MainWindow.m_CadCutPageUC.m_NestPage.UG1_Reg.Visibility = Visibility.Hidden
|
||||||
@@ -1444,9 +1459,6 @@ Public Class ProjectMgrUC
|
|||||||
' Nascondo bottoni rawpage
|
' Nascondo bottoni rawpage
|
||||||
m_MainWindow.m_RawPartPage.OtherRefTabBtn.Visibility = Windows.Visibility.Visible
|
m_MainWindow.m_RawPartPage.OtherRefTabBtn.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
' Nascondo i bottoni per la definizione degli Spotreg
|
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UG0_Reg.Visibility = Visibility.Hidden
|
|
||||||
|
|
||||||
' Se c'è la foto devo sistemare
|
' Se c'è la foto devo sistemare
|
||||||
If m_CurrProjPage.GetPhoto() <> GDB_ID.NULL Then
|
If m_CurrProjPage.GetPhoto() <> GDB_ID.NULL Then
|
||||||
' Recupero il riferimento originale del primo grezzo
|
' Recupero il riferimento originale del primo grezzo
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Public Class StartLauncherWD
|
|||||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||||
Else
|
Else
|
||||||
MruFileListRemove.Add(ItemFile)
|
MruFileListRemove.Add(sFileName)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ Public Class StartLauncherWD
|
|||||||
EgtOutLog(" WARNING: File " & ItemFileRemove & " does not exist or is not accessible, it's been removed from MruFiles list")
|
EgtOutLog(" WARNING: File " & ItemFileRemove & " does not exist or is not accessible, it's been removed from MruFiles list")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' posiziono la fistra in centro alla pagina
|
' posiziono la finestra in centro alla pagina
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
|
||||||
|
|||||||
@@ -26,28 +26,19 @@ Public Class Camera
|
|||||||
Private m_bCalcContour As Boolean = False
|
Private m_bCalcContour As Boolean = False
|
||||||
Private m_nCameraCount As Integer = 0
|
Private m_nCameraCount As Integer = 0
|
||||||
Private m_sCameraPath As String = String.Empty
|
Private m_sCameraPath As String = String.Empty
|
||||||
'Private m_sCameraPath2 As String = String.Empty
|
|
||||||
Private m_sCameraProcName 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_sImage As String = String.Empty
|
||||||
'Private m_sImage2 As String = String.Empty
|
|
||||||
Private m_sInfo 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_sResult As String = String.Empty
|
||||||
'Private m_sResult2 As String = String.Empty
|
|
||||||
Private m_sContour 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_nThreshold As Integer = 60
|
||||||
Private m_dTolerance As Double = 5
|
Private m_dTolerance As Double = 5
|
||||||
Private m_nTimeout As Integer = 30
|
Private m_nTimeout As Integer = 30
|
||||||
Private m_sImageDir As String = String.Empty
|
Private m_sImageDir As String = String.Empty
|
||||||
|
|
||||||
Private Const CAMERAMNG As String = "CameraMng"
|
|
||||||
Private Const N_LOOP As Integer = 20
|
Private Const N_LOOP As Integer = 20
|
||||||
|
|
||||||
'Public m_ProcessCmg As New Process()
|
' Lista dei processi Cmg associati ad ogni tavola
|
||||||
|
|
||||||
' Lista dei processi Cmg associati ad igni tavola
|
|
||||||
Public m_ProcessCmgList As New List(Of Process)
|
Public m_ProcessCmgList As New List(Of Process)
|
||||||
' restituisce lo stato che il processo associato alla tavola corrente (PrepareCamera)
|
' restituisce lo stato che il processo associato alla tavola corrente (PrepareCamera)
|
||||||
Private m_bIsRunnigProc As Boolean = False
|
Private m_bIsRunnigProc As Boolean = False
|
||||||
@@ -96,6 +87,8 @@ Public Class Camera
|
|||||||
(GetPrivateProfileInt(S_GENERAL, K_CONTOURFROMCAMERA, 1, m_MainWindow.GetIniFile()) <> 0)
|
(GetPrivateProfileInt(S_GENERAL, K_CONTOURFROMCAMERA, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||||
' Ricavo il nome del processo associato
|
' Ricavo il nome del processo associato
|
||||||
m_sCameraProcName = Path.GetFileNameWithoutExtension(m_sCameraPath)
|
m_sCameraProcName = Path.GetFileNameWithoutExtension(m_sCameraPath)
|
||||||
|
' Terminazione di eventuali processi omonimi in esecuzione
|
||||||
|
KillPreviousProcesses()
|
||||||
' Avvio processi del camera manager per ogni tavola
|
' Avvio processi del camera manager per ogni tavola
|
||||||
CamerasHide()
|
CamerasHide()
|
||||||
Return True
|
Return True
|
||||||
@@ -104,7 +97,7 @@ Public Class Camera
|
|||||||
Public Function Close() As Boolean
|
Public Function Close() As Boolean
|
||||||
If m_bBusy Then Return False
|
If m_bBusy Then Return False
|
||||||
If m_bCameraLink Then
|
If m_bCameraLink Then
|
||||||
KillProcess()
|
KillProcesses()
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -179,7 +172,7 @@ Public Class Camera
|
|||||||
' Indice di processo uguale all'indice della tavola
|
' Indice di processo uguale all'indice della tavola
|
||||||
nIndProc = nIndTab
|
nIndProc = nIndTab
|
||||||
Case 1
|
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
|
If nIndTab = 1 And
|
||||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso
|
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso
|
||||||
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) <> 0) Then
|
(GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||||
@@ -362,7 +355,7 @@ Public Class Camera
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GoHomeForPhoto() As Boolean
|
Private Function GoHomeForPhoto() As Boolean
|
||||||
Dim bGoHome As Boolean = GetPrivateProfileInt(S_PHOTO, K_ENABELE_GOHOME_FOR_PHOTO, 0, m_MainWindow.GetMachIniFile()) <> 0
|
Dim bGoHome As Boolean = GetPrivateProfileInt(S_PHOTO, K_ENABLE_GOHOME_FOR_PHOTO, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
' Se non configurato esco senza generare errore
|
' Se non configurato esco senza generare errore
|
||||||
If Not bGoHome Then Return True
|
If Not bGoHome Then Return True
|
||||||
' Costruisco il bottone per potere eseguire il comando MDI
|
' Costruisco il bottone per potere eseguire il comando MDI
|
||||||
@@ -374,9 +367,8 @@ Public Class Camera
|
|||||||
Else
|
Else
|
||||||
EgtOutLog("Direct command for positionig head: " & sDirectCmdFile)
|
EgtOutLog("Direct command for positionig head: " & sDirectCmdFile)
|
||||||
End If
|
End If
|
||||||
GoHome = New TwoStateButton("", sDirectCmdFile, "", "", "")
|
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
GoHome.ExecuteMDICommand(GoHome.TLuaScriptName)
|
VarMdiCommand.ExecuteMDICommand(sDirectCmdFile)
|
||||||
' Leggo nome variabile posizione home raggiunta
|
' Leggo nome variabile posizione home raggiunta
|
||||||
Dim CameraStateNameVar As String = String.Empty
|
Dim CameraStateNameVar As String = String.Empty
|
||||||
GetPrivateProfileString(S_PHOTO, K_CAMERA_STATE_VAR, "", CameraStateNameVar, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_PHOTO, K_CAMERA_STATE_VAR, "", CameraStateNameVar, m_MainWindow.GetMachIniFile())
|
||||||
@@ -387,8 +379,7 @@ Public Class Camera
|
|||||||
Else
|
Else
|
||||||
EgtOutLog("Variable for read status of positioning head: " & CameraStateNameVar)
|
EgtOutLog("Variable for read status of positioning head: " & CameraStateNameVar)
|
||||||
End If
|
End If
|
||||||
' 91144=Going home
|
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91144)) ' Going home
|
||||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91144))
|
|
||||||
UpdateUI()
|
UpdateUI()
|
||||||
' Eseguo reset variabile posizione home raggiunta
|
' Eseguo reset variabile posizione home raggiunta
|
||||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(CameraStateNameVar, "0")
|
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(CameraStateNameVar, "0")
|
||||||
@@ -421,21 +412,19 @@ Public Class Camera
|
|||||||
Return bPositionOk
|
Return bPositionOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' OK: Ottengo l'indice del processo associato alla tavola e la configurazione del processo
|
' Ottengo l'indice del processo associato alla tavola e la configurazione del processo
|
||||||
Private Function PrepareCamera() As Integer
|
Private Function PrepareCamera() As Integer
|
||||||
' Stati del processo
|
' Stati del processo
|
||||||
m_bIsRunnigProc = False
|
m_bIsRunnigProc = False
|
||||||
m_bClickOk = False
|
m_bClickOk = False
|
||||||
m_bCorrectedImgOk = False
|
m_bCorrectedImgOk = False
|
||||||
m_bSavedBackImage = False
|
m_bSavedBackImage = False
|
||||||
' Argomento utilizzato per verificare lo stato della comunicazione
|
|
||||||
Dim sArgs As String = "7"
|
|
||||||
Dim nIndTab As Integer = GetCurrentTable()
|
Dim nIndTab As Integer = GetCurrentTable()
|
||||||
Dim nIndProc As Integer = GetProcessFromCurrentTable(nIndTab)
|
Dim nIndProc As Integer = GetProcessFromCurrentTable(nIndTab)
|
||||||
' Invio richiesta al processo per vedere se la comunicazione è aperta
|
' Invio richiesta al processo per vedere se la comunicazione è aperta (comando 7)
|
||||||
Try
|
Try
|
||||||
If Not m_ProcessCmgList(nIndProc - 1).HasExited Then
|
If Not m_ProcessCmgList(nIndProc - 1).HasExited Then
|
||||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine("7")
|
||||||
Else
|
Else
|
||||||
Return -2
|
Return -2
|
||||||
End If
|
End If
|
||||||
@@ -453,8 +442,8 @@ Public Class Camera
|
|||||||
ReloadCameraHide(nIndProc - 1)
|
ReloadCameraHide(nIndProc - 1)
|
||||||
For i As Integer = 0 To N_LOOP
|
For i As Integer = 0 To N_LOOP
|
||||||
Thread.Sleep(1000)
|
Thread.Sleep(1000)
|
||||||
' Invio richiesta al processo per vedere se la comunicazione è aperta
|
' Invio richiesta al processo per vedere se la comunicazione è aperta (comando 7)
|
||||||
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine(sArgs)
|
m_ProcessCmgList(nIndProc - 1).StandardInput.WriteLine("7")
|
||||||
If m_bIsRunnigProc Then Exit For
|
If m_bIsRunnigProc Then Exit For
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -467,10 +456,12 @@ Public Class Camera
|
|||||||
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT, "", m_sResult, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_CAMERA, K_CAM_RESULT, "", m_sResult, m_MainWindow.GetIniFile())
|
||||||
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR, "", m_sContour, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_CAMERA, K_CAM_CONTOUR, "", m_sContour, m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
m_sImage = m_sImage.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
If nIndProc <> 1 Then
|
||||||
m_sInfo = m_sInfo.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
m_sImage = m_sImage.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||||
m_sResult = m_sResult.Replace(CAMERAMNG, CAMERAMNG & (nIndProc).ToString())
|
m_sInfo = m_sInfo.Replace(m_sCameraProcName, m_sCameraProcName & (nIndProc).ToString())
|
||||||
m_sContour = m_sContour.Replace(CAMERAMNG, CAMERAMNG & (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)
|
Return If(m_bIsRunnigProc, nIndProc, -1)
|
||||||
End Function
|
End Function
|
||||||
@@ -799,20 +790,33 @@ Public Class Camera
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
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
|
Dim Procs() As Process
|
||||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
||||||
Return (Procs.Length() > 0)
|
For i As Integer = 0 To Procs.Count() - 1
|
||||||
End Function
|
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
|
' OK: chiudo tutti i processi di CameraMng lanciati
|
||||||
Private Sub KillProcess()
|
Private Sub KillProcesses()
|
||||||
Dim Procs() As Process
|
For i As Integer = 0 To m_ProcessCmgList.Count() - 1
|
||||||
Procs = Process.GetProcessesByName(m_sCameraProcName)
|
Try
|
||||||
For i As Integer = 0 To Procs.Length() - 1
|
' Invio comando "8" di annuncio chiusura
|
||||||
Procs(i).Kill()
|
m_ProcessCmgList(i).StandardInput.WriteLine("8")
|
||||||
Procs(i).WaitForExit(2000)
|
' Eseguo chiusura
|
||||||
Next i
|
m_ProcessCmgList(i).Kill()
|
||||||
|
Catch Ex As Exception
|
||||||
|
EgtOutLog(ex.Message())
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Public Class ChooseMachining
|
|||||||
Private Sub InitializeMachiningLists()
|
Private Sub InitializeMachiningLists()
|
||||||
|
|
||||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If Not m_CurrentMachine.ExistsSawHead() Then
|
||||||
CurrSawingTxBl.Visibility = Visibility.Hidden
|
CurrSawingTxBl.Visibility = Visibility.Hidden
|
||||||
CurrSawingCmBx.Visibility = Visibility.Hidden
|
CurrSawingCmBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
@@ -87,7 +87,8 @@ Public Class ChooseMachining
|
|||||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
||||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER,
|
||||||
|
CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||||
' Creo lista lavorazioni foretto e fresa
|
' Creo lista lavorazioni foretto e fresa
|
||||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||||
CreateMachiningList(MCH_MY.DRILLING, m_CurrentMachine.sCurrDrill, m_DrillingList)
|
CreateMachiningList(MCH_MY.DRILLING, m_CurrentMachine.sCurrDrill, m_DrillingList)
|
||||||
@@ -121,14 +122,15 @@ Public Class ChooseMachining
|
|||||||
m_WJettingList.Add("")
|
m_WJettingList.Add("")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' ---- MACCHINA CON CAMBIO UTENSILE ----
|
' ---- MACCHINA CON CAMBIO UTENSILE ----
|
||||||
ElseIf m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
ElseIf m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or
|
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or
|
||||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
' -- TAGLIO --
|
' -- TAGLIO --
|
||||||
' Il taglio è aggiunto sempre (all'inizio di questo metodo)
|
' Il taglio è aggiunto sempre (all'inizio di questo metodo)
|
||||||
' -- FORATURA --
|
' -- FORATURA --
|
||||||
CreateMachiningList(MCH_MY.DRILLING, m_DrillingList)
|
m_DrillingList.Clear()
|
||||||
|
If CanChangeTool() Then CreateMachiningList(MCH_MY.DRILLING, m_DrillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_DrillingList.Count = 0 Then
|
If m_DrillingList.Count = 0 Then
|
||||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||||
@@ -136,8 +138,9 @@ Public Class ChooseMachining
|
|||||||
' aggiungo il campo vuoto
|
' aggiungo il campo vuoto
|
||||||
m_DrillingList.Add("")
|
m_DrillingList.Add("")
|
||||||
End If
|
End If
|
||||||
' -- FRESATURA --
|
' -- FRESATURA --
|
||||||
CreateMachiningList(MCH_MY.MILLING, m_MillingList)
|
m_MillingList.Clear()
|
||||||
|
If CanChangeTool() Then CreateMachiningList(MCH_MY.MILLING, m_MillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_MillingList.Count = 0 Then
|
If m_MillingList.Count = 0 Then
|
||||||
m_CurrentMachine.sCurrMilling = String.Empty
|
m_CurrentMachine.sCurrMilling = String.Empty
|
||||||
@@ -146,7 +149,8 @@ Public Class ChooseMachining
|
|||||||
m_MillingList.Add("")
|
m_MillingList.Add("")
|
||||||
End If
|
End If
|
||||||
' -- SVUOTATURA --
|
' -- SVUOTATURA --
|
||||||
CreateMachiningList(MCH_MY.POCKETING, m_PocketingList)
|
m_PocketingList.Clear()
|
||||||
|
If CanChangeTool() Then CreateMachiningList(MCH_MY.POCKETING, m_PocketingList)
|
||||||
If m_PocketingList.Count = 0 Then
|
If m_PocketingList.Count = 0 Then
|
||||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||||
Else
|
Else
|
||||||
@@ -187,22 +191,19 @@ Public Class ChooseMachining
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
If m_CurrentMachine.bWaterJet And Not m_CurrentMachine.ExistsSawHead() Then
|
||||||
|
|
||||||
Else
|
Else
|
||||||
' verifico che lista delle lavorazioni di lama non sia vuoto
|
' verifico che lista delle lavorazioni di lama non sia vuoto
|
||||||
If m_SawingList.Count > 0 Then
|
If m_SawingList.Count > 0 Then
|
||||||
' provo ad assegnare la lama corrente (se l'associazione fallisce corrispoende ad impostare un campo vuoto)
|
' provo ad assegnare la lama corrente (se l'associazione fallisce corrisponde ad impostare un campo vuoto)
|
||||||
CurrSawingCmBx.SelectedItem = m_MainWindow.m_CurrentMachine.sCurrSawing
|
CurrSawingCmBx.SelectedItem = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
Else
|
Else
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
|
' se lavorazione di lama non definita, dichiaro da scegliere
|
||||||
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
||||||
' verifico che il nome della lama esista
|
m_MachIsModified = True
|
||||||
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
|
|
||||||
m_MachIsModified = True
|
|
||||||
End If
|
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.Runtime.Remoting.Metadata.W3cXsd2001
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
|
||||||
@@ -45,6 +46,9 @@ Public Class RawPartPageUC
|
|||||||
Private m_RawOffsY As Double = 0
|
Private m_RawOffsY As Double = 0
|
||||||
Private m_RawKerf As Double = 0
|
Private m_RawKerf As Double = 0
|
||||||
Private m_PrecKerf As Double = 0
|
Private m_PrecKerf As Double = 0
|
||||||
|
' Delta di visualizzazione su offset grezzo
|
||||||
|
Private m_dDeltaRoX As Double = 0
|
||||||
|
Private m_dDeltaRoY As Double = 0
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
' Definizione lista modalità di definizione grezzo per ComboBox
|
' Definizione lista modalità di definizione grezzo per ComboBox
|
||||||
@@ -142,6 +146,26 @@ Public Class RawPartPageUC
|
|||||||
XY = 3
|
XY = 3
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Private Sub SetRawOffsetX( dRawOffsX As Double)
|
||||||
|
OffsetXTxBx.Text = LenToString(dRawOffsX + m_dDeltaRoX, 2)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetRawOffsetX( ByRef dRawOffsX As Double) As Boolean
|
||||||
|
If Not StringToLen(OffsetXTxBx.Text, dRawOffsX) Then Return False
|
||||||
|
dRawOffsX -= m_dDeltaRoX
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetRawOffsetY( dRawOffsY As Double)
|
||||||
|
OffsetYTxBx.Text = LenToString(dRawOffsY + m_dDeltaRoY, 2)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetRawOffsetY( ByRef dRawOffsY As Double) As Boolean
|
||||||
|
If Not StringToLen(OffsetYTxBx.Text, dRawOffsY) Then Return False
|
||||||
|
dRawOffsY -= m_dDeltaRoY
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
|
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
'Creazione della Page UserControl e relative impostazioni
|
'Creazione della Page UserControl e relative impostazioni
|
||||||
@@ -269,6 +293,17 @@ Public Class RawPartPageUC
|
|||||||
EgtOutLog("Error : TableMin e TableRef1 are different")
|
EgtOutLog("Error : TableMin e TableRef1 are different")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
' Imposto eventuali delta di visualizzazione per Offset Grezzo
|
||||||
|
m_dDeltaRoX = 0
|
||||||
|
m_dDeltaRoY = 0
|
||||||
|
If GetPrivateProfileInt(S_TABLE, K_ALLTABORIGTAB1, 0, m_MainWindow.GetMachIniFile()) <> 0 AndAlso GetCurrentTable() <> 1 Then
|
||||||
|
Dim TabX As Double = GetPrivateProfileDouble( S_TABLE, K_TABX, Double.NaN, m_MainWindow.GetMachIniFile())
|
||||||
|
Dim TabY As Double = GetPrivateProfileDouble( S_TABLE, K_TABY, Double.NaN, m_MainWindow.GetMachIniFile())
|
||||||
|
If Not Double.IsNaN( TabX) AndAlso Not Double.IsNaN( TabY) Then
|
||||||
|
m_dDeltaRoX = ptRef1.x - TabX
|
||||||
|
m_dDeltaRoY = ptRef1.y - TabY
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' Nascondo eventuali pezzi in parcheggio
|
' Nascondo eventuali pezzi in parcheggio
|
||||||
HideParkedParts()
|
HideParkedParts()
|
||||||
' Deseleziono pezzi
|
' Deseleziono pezzi
|
||||||
@@ -327,15 +362,15 @@ Public Class RawPartPageUC
|
|||||||
|
|
||||||
' Carico le info del riferimento alternativo della tavola
|
' Carico le info del riferimento alternativo della tavola
|
||||||
m_nOtherRefTabLay = EgtCreateGroup(GDB_ID.ROOT)
|
m_nOtherRefTabLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
EgtSetLevel(m_nOtherRefTabLay, GDB_LV.TEMP)
|
||||||
LoadOtherRefTab()
|
LoadOtherRefTab()
|
||||||
|
|
||||||
' Assegno dati grezzo rettangolare ai textbox
|
' Assegno dati grezzo rettangolare ai textbox
|
||||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||||
HeightTxBx.Text = LenToString(m_RawHeight, 3)
|
HeightTxBx.Text = LenToString(m_RawHeight, 3)
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
KerfTxBx.Text = LenToString(dInvertKerf * m_RawKerf, 2)
|
KerfTxBx.Text = LenToString(dInvertKerf * m_RawKerf, 2)
|
||||||
|
|
||||||
' Recupero gli ID delle pareti che delimitano l'area Protetta (movimenti in OverZ)
|
' Recupero gli ID delle pareti che delimitano l'area Protetta (movimenti in OverZ)
|
||||||
@@ -352,7 +387,7 @@ Public Class RawPartPageUC
|
|||||||
m_SafetyZone_Y = ptMinY.y
|
m_SafetyZone_Y = ptMinY.y
|
||||||
End If
|
End If
|
||||||
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
||||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
DrawSafetyZone(m_CurrentMachine.dAdditionalTable + m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||||
|
|
||||||
' Creo layer temporaneo per crocette
|
' Creo layer temporaneo per crocette
|
||||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
@@ -657,7 +692,7 @@ Public Class RawPartPageUC
|
|||||||
|
|
||||||
' Creo una copia del punto corrente
|
' Creo una copia del punto corrente
|
||||||
Dim ptTemp As New Point3d(ptCurr.x, ptCurr.y, ptCurr.z)
|
Dim ptTemp As New Point3d(ptCurr.x, ptCurr.y, ptCurr.z)
|
||||||
Select Case DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, ptCurr - m_ptPrev)
|
Select Case DrawSafetyZone(m_CurrentMachine.dAdditionalTable + m_RawHeight, m_CurrentMachine.dHighPieceZ, ptCurr - m_ptPrev)
|
||||||
Case STATDRAG.X_
|
Case STATDRAG.X_
|
||||||
ptCurr.x = m_ptPrev.x
|
ptCurr.x = m_ptPrev.x
|
||||||
Case STATDRAG._Y
|
Case STATDRAG._Y
|
||||||
@@ -678,8 +713,6 @@ Public Class RawPartPageUC
|
|||||||
End Select
|
End Select
|
||||||
' Aggiorno il punto precedente
|
' Aggiorno il punto precedente
|
||||||
m_ptPrev = ptTemp
|
m_ptPrev = ptTemp
|
||||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
|
||||||
ResetAllBRidges()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ModifyRectangle(ptCurr As Point3d)
|
Private Sub ModifyRectangle(ptCurr As Point3d)
|
||||||
@@ -697,15 +730,15 @@ Public Class RawPartPageUC
|
|||||||
m_RawOffsX += vtMove.x
|
m_RawOffsX += vtMove.x
|
||||||
m_RawOffsY += vtMove.y
|
m_RawOffsY += vtMove.y
|
||||||
If dKerf < 0 Then
|
If dKerf < 0 Then
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX - m_RawKerf, 2)
|
SetRawOffsetX(m_RawOffsX - m_RawKerf)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY - m_RawKerf, 2)
|
SetRawOffsetY(m_RawOffsY - m_RawKerf)
|
||||||
Else
|
Else
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
' se sposto lato sotto
|
' se sposto lato sotto
|
||||||
ElseIf m_nDragEnt = 1 Then
|
ElseIf m_nDragEnt = 1 Then
|
||||||
Dim dDelta = ptCurr.y - m_ptPrev.y
|
Dim dDelta = ptCurr.y - m_ptPrev.y
|
||||||
If m_RawWidth - dDelta > MIN_RAW_DIM And m_RawOffsY + dDelta > m_RawKerf Then
|
If m_RawWidth - dDelta > MIN_RAW_DIM And m_RawOffsY + dDelta > m_RawKerf Then
|
||||||
@@ -719,14 +752,14 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
If dKerf < 0 Then
|
If dKerf < 0 Then
|
||||||
WidthTxBx.Text = LenToString(m_RawWidth + 2 * m_RawKerf, 2)
|
WidthTxBx.Text = LenToString(m_RawWidth + 2 * m_RawKerf, 2)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY - m_RawKerf, 2)
|
SetRawOffsetY(m_RawOffsY - m_RawKerf)
|
||||||
Else
|
Else
|
||||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
' se sposto lato a destra
|
' se sposto lato a destra
|
||||||
ElseIf m_nDragEnt = 2 Then
|
ElseIf m_nDragEnt = 2 Then
|
||||||
Dim dDelta = ptCurr.x - m_ptPrev.x
|
Dim dDelta = ptCurr.x - m_ptPrev.x
|
||||||
If m_RawLength + dDelta > MIN_RAW_DIM And
|
If m_RawLength + dDelta > MIN_RAW_DIM And
|
||||||
@@ -743,7 +776,7 @@ Public Class RawPartPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
' se sposto lato sopra
|
' se sposto lato sopra
|
||||||
ElseIf m_nDragEnt = 3 Then
|
ElseIf m_nDragEnt = 3 Then
|
||||||
Dim dDelta = ptCurr.y - m_ptPrev.y
|
Dim dDelta = ptCurr.y - m_ptPrev.y
|
||||||
If m_RawWidth + dDelta > MIN_RAW_DIM And
|
If m_RawWidth + dDelta > MIN_RAW_DIM And
|
||||||
@@ -760,7 +793,7 @@ Public Class RawPartPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
' se sposto lato a sinistra
|
' se sposto lato a sinistra
|
||||||
ElseIf m_nDragEnt = 4 Then
|
ElseIf m_nDragEnt = 4 Then
|
||||||
Dim dDelta = ptCurr.x - m_ptPrev.x
|
Dim dDelta = ptCurr.x - m_ptPrev.x
|
||||||
If m_RawLength - dDelta > MIN_RAW_DIM And m_RawOffsX + dDelta > m_RawKerf Then
|
If m_RawLength - dDelta > MIN_RAW_DIM And m_RawOffsX + dDelta > m_RawKerf Then
|
||||||
@@ -774,12 +807,10 @@ Public Class RawPartPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
If dKerf < 0 Then
|
If dKerf < 0 Then
|
||||||
LengthTxBx.Text = LenToString(m_RawLength + 2 * m_RawKerf, 2)
|
LengthTxBx.Text = LenToString(m_RawLength + 2 * m_RawKerf, 2)
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX - m_RawKerf, 2)
|
SetRawOffsetX(m_RawOffsX - m_RawKerf)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -860,11 +891,11 @@ Public Class RawPartPageUC
|
|||||||
If m_bProbingOn Then Return
|
If m_bProbingOn Then Return
|
||||||
' reimposto il comando OutLine
|
' reimposto il comando OutLine
|
||||||
OutlineBtn_Click(Nothing, Nothing)
|
OutlineBtn_Click(Nothing, Nothing)
|
||||||
' Nasocndo eventuali pareti
|
' Nascondo eventuali pareti
|
||||||
If m_bExistsSafetyZone Then
|
If m_bExistsSafetyZone Then
|
||||||
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
||||||
EgtSetStatus(m_nIdMinRedX, GDB_ST.OFF)
|
EgtSetMode(m_nIdMinRedX, GDB_MD.HIDDEN)
|
||||||
EgtSetStatus(m_nIdMinRedY, GDB_ST.OFF)
|
EgtSetMode(m_nIdMinRedY, GDB_MD.HIDDEN)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se confermata uscita
|
' Se confermata uscita
|
||||||
@@ -1963,13 +1994,13 @@ Public Class RawPartPageUC
|
|||||||
If dKerf < 0 Then
|
If dKerf < 0 Then
|
||||||
LengthTxBx.Text = LenToString(m_RawLength + 2 * m_RawKerf, 2)
|
LengthTxBx.Text = LenToString(m_RawLength + 2 * m_RawKerf, 2)
|
||||||
WidthTxBx.Text = LenToString(m_RawWidth + 2 * m_RawKerf, 2)
|
WidthTxBx.Text = LenToString(m_RawWidth + 2 * m_RawKerf, 2)
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX - m_RawKerf, 2)
|
SetRawOffsetX(m_RawOffsX - m_RawKerf)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY - m_RawKerf, 2)
|
SetRawOffsetY(m_RawOffsY - m_RawKerf)
|
||||||
Else
|
Else
|
||||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -2081,7 +2112,7 @@ Public Class RawPartPageUC
|
|||||||
If EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove) Then
|
If EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove) Then
|
||||||
' Aggiorno gli offset
|
' Aggiorno gli offset
|
||||||
m_RawOffsX += vtMove.x
|
m_RawOffsX += vtMove.x
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
' Se c'è la foto, devo aggiornarne la posizione
|
' Se c'è la foto, devo aggiornarne la posizione
|
||||||
Dim nPhotoId = m_CurrProjPage.GetPhoto()
|
Dim nPhotoId = m_CurrProjPage.GetPhoto()
|
||||||
If nPhotoId <> GDB_ID.NULL Then
|
If nPhotoId <> GDB_ID.NULL Then
|
||||||
@@ -2169,7 +2200,7 @@ Public Class RawPartPageUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' verifico se l'altezza del pezzo è maggiore di quella consentita in macchina
|
' verifico se l'altezza del pezzo è maggiore di quella consentita in macchina
|
||||||
DrawSafetyZone(dHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
DrawSafetyZone(m_CurrentMachine.dAdditionalTable + dHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||||
If dHeight > -EPS_ZERO Then
|
If dHeight > -EPS_ZERO Then
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
If Math.Abs(dHeight - m_RawHeight) > EPS_SMALL Then
|
If Math.Abs(dHeight - m_RawHeight) > EPS_SMALL Then
|
||||||
@@ -2199,21 +2230,17 @@ Public Class RawPartPageUC
|
|||||||
Dim dKerf As Double = 0
|
Dim dKerf As Double = 0
|
||||||
StringToLen(KerfTxBx.Text, dKerf)
|
StringToLen(KerfTxBx.Text, dKerf)
|
||||||
Dim dOffsetX As Double
|
Dim dOffsetX As Double
|
||||||
If Not StringToLen(OffsetXTxBx.Text, dOffsetX) Then
|
If Not GetRawOffsetX( dOffsetX) Then Return
|
||||||
Return
|
|
||||||
End If
|
|
||||||
Dim dMinOffsetX = m_RawKerf
|
Dim dMinOffsetX = m_RawKerf
|
||||||
If dKerf < 0 And dOffsetX >= 0 Then
|
If dKerf < 0 And dOffsetX >= 0 Then
|
||||||
'm_RawOffsX = dOffsetX + m_RawKerf
|
|
||||||
'UpdateRawPart()
|
|
||||||
m_RawOffsX = dOffsetX
|
m_RawOffsX = dOffsetX
|
||||||
AdjustRawPartPositionNegativeKerf()
|
AdjustRawPartPositionNegativeKerf()
|
||||||
ElseIf dKerf >= 0 And dOffsetX >= dMinOffsetX Then
|
ElseIf dKerf >= 0 And dOffsetX >= dMinOffsetX Then
|
||||||
m_RawOffsX = dOffsetX
|
m_RawOffsX = dOffsetX
|
||||||
UpdateRawPart()
|
UpdateRawPart()
|
||||||
Else
|
Else
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90519) & " " & LenToString(dMinOffsetX, 2)) ' Minimo offset X =
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90519) & " " & LenToString(dMinOffsetX + m_dDeltaRoX, 2)) ' Minimo offset X =
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2221,9 +2248,7 @@ Public Class RawPartPageUC
|
|||||||
Dim dKerf As Double = 0
|
Dim dKerf As Double = 0
|
||||||
StringToLen(KerfTxBx.Text, dKerf)
|
StringToLen(KerfTxBx.Text, dKerf)
|
||||||
Dim dOffsetY As Double
|
Dim dOffsetY As Double
|
||||||
If Not StringToLen(OffsetYTxBx.Text, dOffsetY) Then
|
If Not GetRawOffsetY( dOffsetY) Then Return
|
||||||
Return
|
|
||||||
End If
|
|
||||||
Dim dMinOffsetY = m_RawKerf
|
Dim dMinOffsetY = m_RawKerf
|
||||||
If dKerf < 0 And dOffsetY >= 0 Then
|
If dKerf < 0 And dOffsetY >= 0 Then
|
||||||
'm_RawOffsY = dOffsetY + m_RawKerf
|
'm_RawOffsY = dOffsetY + m_RawKerf
|
||||||
@@ -2234,25 +2259,24 @@ Public Class RawPartPageUC
|
|||||||
m_RawOffsY = dOffsetY
|
m_RawOffsY = dOffsetY
|
||||||
UpdateRawPart()
|
UpdateRawPart()
|
||||||
Else
|
Else
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90520) & " " & LenToString(dMinOffsetY, 2)) ' Minimo offset Y =
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90520) & " " & LenToString(dMinOffsetY + m_dDeltaRoY, 2)) ' Minimo offset Y =
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Funzione che si occupa di disegnare le pareti dell'area sicura e di gestire il grezzo (
|
' Funzione che si occupa di disegnare le pareti dell'area sicura e di gestire il grezzo
|
||||||
Private Function DrawSafetyZone(dHeight As Double, dHighPieceZ As Double, vtMove As Vector3d) As STATDRAG
|
Private Function DrawSafetyZone(dHeight As Double, dHighPieceZ As Double, vtMove As Vector3d) As STATDRAG
|
||||||
' Se non esiste allora esci senza eseguire controlli
|
' Se non esiste allora esci senza eseguire controlli
|
||||||
If Not m_bExistsSafetyZone Then Return STATDRAG.OK
|
If Not m_bExistsSafetyZone Then Return STATDRAG.OK
|
||||||
' Verifico se attivare la visualizzazione
|
' Verifico se attivare la visualizzazione
|
||||||
Dim nStatus As GDB_ST = GDB_ST.OFF
|
Dim bShow As Boolean = ( dHeight > dHighPieceZ)
|
||||||
If dHeight > dHighPieceZ Then
|
|
||||||
nStatus = GDB_ST.ON_
|
|
||||||
End If
|
|
||||||
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
||||||
EgtSetStatus(m_nIdMinRedX, nStatus)
|
EgtSetMode(m_nIdMinRedX, If( bShow, GDB_MD.STD, GDB_MD.HIDDEN))
|
||||||
EgtSetStatus(m_nIdMinRedY, nStatus)
|
EgtSetMode(m_nIdMinRedY, If( bShow, GDB_MD.STD, GDB_MD.HIDDEN))
|
||||||
|
EgtSetStatus(m_nIdMinRedX, GDB_ST.ON_)
|
||||||
|
EgtSetStatus(m_nIdMinRedY, GDB_ST.ON_)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
If nStatus = GDB_ST.ON_ Then
|
If bShow Then
|
||||||
Return VerifyDimensionRawSafetyZone(vtMove)
|
Return VerifyDimensionRawSafetyZone(vtMove)
|
||||||
End If
|
End If
|
||||||
Return STATDRAG.OK
|
Return STATDRAG.OK
|
||||||
@@ -2300,8 +2324,8 @@ Public Class RawPartPageUC
|
|||||||
' aggiorno il valore di Offset
|
' aggiorno il valore di Offset
|
||||||
m_RawOffsX = m_SafetyZone_X + m_RawKerf - m_ptTableMin.x
|
m_RawOffsX = m_SafetyZone_X + m_RawKerf - m_ptTableMin.x
|
||||||
m_RawOffsY = ptMinRaw.y + m_RawKerf - m_ptTableMin.y
|
m_RawOffsY = ptMinRaw.y + m_RawKerf - m_ptTableMin.y
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
bCalcBBoxRaw = True
|
bCalcBBoxRaw = True
|
||||||
nStat = STATDRAG.X_
|
nStat = STATDRAG.X_
|
||||||
End If
|
End If
|
||||||
@@ -2313,8 +2337,8 @@ Public Class RawPartPageUC
|
|||||||
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
|
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
|
||||||
m_RawOffsX = ptMinRaw.x + m_RawKerf - m_ptTableMin.x
|
m_RawOffsX = ptMinRaw.x + m_RawKerf - m_ptTableMin.x
|
||||||
m_RawOffsY = m_SafetyZone_Y - dRawWidth + m_RawKerf - m_ptTableMin.y
|
m_RawOffsY = m_SafetyZone_Y - dRawWidth + m_RawKerf - m_ptTableMin.y
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
bCalcBBoxRaw = True
|
bCalcBBoxRaw = True
|
||||||
nStat = nStat + STATDRAG._Y
|
nStat = nStat + STATDRAG._Y
|
||||||
End If
|
End If
|
||||||
@@ -2372,8 +2396,8 @@ Public Class RawPartPageUC
|
|||||||
m_RawOffsX = ptRawMin.x - m_ptTableMin.x + m_RawKerf * dInvertKerf
|
m_RawOffsX = ptRawMin.x - m_ptTableMin.x + m_RawKerf * dInvertKerf
|
||||||
m_RawOffsY = ptRawMin.y - m_ptTableMin.y + m_RawKerf * dInvertKerf
|
m_RawOffsY = ptRawMin.y - m_ptTableMin.y + m_RawKerf * dInvertKerf
|
||||||
End If
|
End If
|
||||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
SetRawOffsetX(m_RawOffsX)
|
||||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
SetRawOffsetY(m_RawOffsY)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2464,8 +2488,8 @@ Public Class RawPartPageUC
|
|||||||
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
|
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
|
||||||
StringToLen(LengthTxBx.Text, m_RawLength)
|
StringToLen(LengthTxBx.Text, m_RawLength)
|
||||||
StringToLen(WidthTxBx.Text, m_RawWidth)
|
StringToLen(WidthTxBx.Text, m_RawWidth)
|
||||||
StringToLen(OffsetXTxBx.Text, m_RawOffsX)
|
GetRawOffsetX(m_RawOffsX)
|
||||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
GetRawOffsetY(m_RawOffsY)
|
||||||
' UpdateRawPart()
|
' UpdateRawPart()
|
||||||
UpdateRawPartKerf()
|
UpdateRawPartKerf()
|
||||||
' Recupero id contorno kerf
|
' Recupero id contorno kerf
|
||||||
@@ -2488,8 +2512,8 @@ Public Class RawPartPageUC
|
|||||||
' recupero dati grezzo
|
' recupero dati grezzo
|
||||||
StringToLen(LengthTxBx.Text, m_RawLength)
|
StringToLen(LengthTxBx.Text, m_RawLength)
|
||||||
StringToLen(WidthTxBx.Text, m_RawWidth)
|
StringToLen(WidthTxBx.Text, m_RawWidth)
|
||||||
StringToLen(OffsetXTxBx.Text, m_RawOffsX)
|
GetRawOffsetX(m_RawOffsX)
|
||||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
GetRawOffsetY(m_RawOffsY)
|
||||||
|
|
||||||
If m_PrecKerf >= 0 Then
|
If m_PrecKerf >= 0 Then
|
||||||
m_RawLength = m_RawLength + 2 * m_RawKerf
|
m_RawLength = m_RawLength + 2 * m_RawKerf
|
||||||
@@ -2553,7 +2577,7 @@ Public Class RawPartPageUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90522) & " " & LenToString(dMaxKerf, 2)) ' Massimo kerf =
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90522) & " " & LenToString(dMaxKerf, 2)) ' Massimo kerf =
|
||||||
End If
|
End If
|
||||||
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
||||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
DrawSafetyZone(m_CurrentMachine.dAdditionalTable + m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawProbingBtn.Click
|
Private Sub RawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawProbingBtn.Click
|
||||||
@@ -2790,7 +2814,9 @@ Public Class RawPartPageUC
|
|||||||
Private Sub RawPartPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
Private Sub RawPartPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
|
m_nTempLay = GDB_ID.NULL
|
||||||
EgtErase(m_nOtherRefTabLay)
|
EgtErase(m_nOtherRefTabLay)
|
||||||
|
m_nOtherRefTabLay = GDB_ID.NULL
|
||||||
' Dichiaro pagina non attiva
|
' Dichiaro pagina non attiva
|
||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 917 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -89,12 +89,14 @@ Public Class SimulationPageUC
|
|||||||
EgtOutLog(" -- PREPARE SIMUL --")
|
EgtOutLog(" -- PREPARE SIMUL --")
|
||||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
' nascondo i pezzi in parcheggio
|
||||||
|
HideParkedParts()
|
||||||
' Visualizzo opportunamente la macchina
|
' Visualizzo opportunamente la macchina
|
||||||
m_nMachLook = MCH_LOOK.ALL
|
m_nMachLook = MCH_LOOK.ALL
|
||||||
EgtSetMachineLook(m_nMachLook)
|
EgtSetMachineLook(m_nMachLook)
|
||||||
' Imposto vista 3d isometrica di tutto
|
' Imposto vista 3d isometrica di tutto
|
||||||
EgtSetView(VT.ISO_SE, False)
|
EgtSetView(VT.ISO_SE, False)
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL, False)
|
||||||
' Elimino eventuale attrezzaggio da OmagOFFICE
|
' Elimino eventuale attrezzaggio da OmagOFFICE
|
||||||
EgtEraseCurrSetup()
|
EgtEraseCurrSetup()
|
||||||
' Verifico l'attrezzaggio degli utensili utilizzati
|
' Verifico l'attrezzaggio degli utensili utilizzati
|
||||||
@@ -108,7 +110,7 @@ Public Class SimulationPageUC
|
|||||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||||
' Se pezzi piani e non taglio diretto e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
' Se pezzi piani e non taglio diretto e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
Dim bDirectCut As Boolean = IsDirectCutOn()
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||||
Not bDirectCut And
|
Not bDirectCut And
|
||||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||||
@@ -178,6 +180,12 @@ Public Class SimulationPageUC
|
|||||||
m_CurrProjPage.ShowContour(False)
|
m_CurrProjPage.ShowContour(False)
|
||||||
' Nascondo eventuali testi con dati su aree
|
' Nascondo eventuali testi con dati su aree
|
||||||
m_CurrProjPage.SetAreasStatus(False)
|
m_CurrProjPage.SetAreasStatus(False)
|
||||||
|
' Nascondo eventuali pareti
|
||||||
|
Dim nIdBase As Integer = EgtGetBaseId("Base")
|
||||||
|
Dim m_nIdMinRedX = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
|
||||||
|
If m_nIdMinRedX <> GDB_ID.NULL Then EgtSetMode(m_nIdMinRedX, GDB_MD.HIDDEN)
|
||||||
|
Dim m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
|
||||||
|
If m_nIdMinRedY <> GDB_ID.NULL Then EgtSetMode(m_nIdMinRedY, GDB_MD.HIDDEN)
|
||||||
' Recupero eventuale fase di ripartenza
|
' Recupero eventuale fase di ripartenza
|
||||||
m_nRestart = m_MainWindow.m_CurrentProjectPageUC.GetProjectNcRestart()
|
m_nRestart = m_MainWindow.m_CurrentProjectPageUC.GetProjectNcRestart()
|
||||||
' Imposto prima fase
|
' Imposto prima fase
|
||||||
@@ -207,12 +215,6 @@ Public Class SimulationPageUC
|
|||||||
Else
|
Else
|
||||||
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Play.png", UriKind.Relative))
|
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Play.png", UriKind.Relative))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim nIdBase As Integer = EgtGetBaseId("Base")
|
|
||||||
Dim m_nIdMinRedX = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
|
|
||||||
If m_nIdMinRedX <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedX, GDB_ST.OFF)
|
|
||||||
Dim m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
|
|
||||||
If m_nIdMinRedY <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedY, GDB_ST.OFF)
|
|
||||||
EgtOutLog(" -- END PREPARE SIMUL --")
|
EgtOutLog(" -- END PREPARE SIMUL --")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -309,7 +311,7 @@ Public Class SimulationPageUC
|
|||||||
' Se non c'è restart esco
|
' Se non c'è restart esco
|
||||||
If m_nRestart = 0 Then Return
|
If m_nRestart = 0 Then Return
|
||||||
' Se tagli diretti restart non valido ed esco
|
' Se tagli diretti restart non valido ed esco
|
||||||
If GetDirectCutPart() <> GDB_ID.NULL Then Return
|
If IsDirectCutOn() Then Return
|
||||||
' Info
|
' Info
|
||||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90359) & " (" & m_nRestart.ToString() & ")") ' Restart (n)
|
m_CurrProjPage.SetInfoMessage(EgtMsg(90359) & " (" & m_nRestart.ToString() & ")") ' Restart (n)
|
||||||
' Salto
|
' Salto
|
||||||
@@ -576,9 +578,9 @@ Public Class SimulationPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GenerateCN_Click(sender As Object, e As RoutedEventArgs)
|
Private Sub GenerateCN_Click(sender As Object, e As RoutedEventArgs)
|
||||||
' Se il bottone Shift è premuto apro il file CadCut1 nel programma NotePad
|
' Se il bottone Shift è premuto apriro' il file CadCut1 nel programma NotePad
|
||||||
Dim IsPressedShiftKey As Boolean = False
|
Dim IsPressedShiftKey As Boolean = False
|
||||||
If Keyboard.Modifiers And ModifierKeys.Shift Then IsPressedShiftKey = True
|
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then IsPressedShiftKey = True
|
||||||
|
|
||||||
' Eventualmente fermo la simulazione
|
' Eventualmente fermo la simulazione
|
||||||
m_nStatus = MCH_SIM_ST.UI_STOP
|
m_nStatus = MCH_SIM_ST.UI_STOP
|
||||||
@@ -593,7 +595,7 @@ Public Class SimulationPageUC
|
|||||||
|
|
||||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||||
' Inserisco indice di progetto
|
' Inserisco indice di progetto
|
||||||
m_CurrProjPage.SetProjectIndexFlag()
|
m_CurrProjPage.SetProjectIndex()
|
||||||
' Inserisco il materiale
|
' Inserisco il materiale
|
||||||
m_CurrProjPage.SetProjectMaterial()
|
m_CurrProjPage.SetProjectMaterial()
|
||||||
' Salvo il progetto con le lavorazioni
|
' Salvo il progetto con le lavorazioni
|
||||||
@@ -637,7 +639,7 @@ Public Class SimulationPageUC
|
|||||||
' ricarico la pagina di simulazione
|
' ricarico la pagina di simulazione
|
||||||
EgtSetCurrPhase(1)
|
EgtSetCurrPhase(1)
|
||||||
' nascondo i pezzi in parcheggio
|
' nascondo i pezzi in parcheggio
|
||||||
HideParkedParts(True)
|
HideParkedParts()
|
||||||
' Avvio ambiente di simulazione
|
' Avvio ambiente di simulazione
|
||||||
EgtSimInit()
|
EgtSimInit()
|
||||||
EgtSimStart()
|
EgtSimStart()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Diagnostics
|
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Text.RegularExpressions
|
|
||||||
Imports EgtWPFLib
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib
|
||||||
|
|
||||||
Module Utility
|
Module Utility
|
||||||
Friend Function CompoColor(sIniFile As String) As Color3d
|
Friend Function CompoColor(sIniFile As String) As Color3d
|
||||||
@@ -73,14 +70,13 @@ Module Utility
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' conerte il dato (in mm) in stringa nell'unità corrente
|
' converte il dato (in mm) in stringa nell'unità corrente
|
||||||
Friend Function LenToString(dVal As Double, nNumDec As Integer, Optional ByVal bForceToDecimal As Boolean = False) As String
|
Friend Function LenToString(dVal As Double, nNumDec As Integer, Optional ByVal bForceToDecimal As Boolean = False) As String
|
||||||
Dim sVal As String = DoubleToString(EgtToUiUnits(dVal), nNumDec)
|
Dim sVal As String = DoubleToString(EgtToUiUnits(dVal), nNumDec)
|
||||||
' se richiesta scrittura in frazione (solo se unità corrente INCHES)
|
' se richiesta scrittura in frazione (solo se unità corrente INCHES)
|
||||||
If (nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM()) And Not bForceToDecimal Then
|
If (nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM()) And Not bForceToDecimal Then
|
||||||
' conevrto il dato corrente in decimale
|
' converto il dato corrente in decimale
|
||||||
Dim dCurrVal As Double = dVal
|
Dim dCurrVal As Double = dVal / ONEINCH
|
||||||
StringToDouble(sVal, dCurrVal)
|
|
||||||
Return DoubleToStringFraction(dCurrVal, dPrecision)
|
Return DoubleToStringFraction(dCurrVal, dPrecision)
|
||||||
End If
|
End If
|
||||||
Return sVal
|
Return sVal
|
||||||
@@ -322,24 +318,21 @@ Module Utility
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' Restituisce il colore dell'utensile correntemente settato, se non trova l'utesile o il colore ritorna il default (0,255,0)
|
' Restituisce il colore dell'utensile correntemente settato, se non trova l'utensile o il colore ritorna il default (0,255,0)
|
||||||
Friend Function GetColorPV() As Color3d
|
Friend Function GetColorPV() As Color3d
|
||||||
Dim ToolString As String = String.Empty
|
' Recupero il campo COLOR dalle note di sistema
|
||||||
Dim ToolColor As String = String.Empty
|
Dim ToolColor As String = String.Empty
|
||||||
'EgtTdbGetCurrToolParam(MCH_MP.SYSNOTES, ToolString)
|
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.SYSNOTES, ToolString)
|
|
||||||
EgtTdbGetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ToolColor)
|
EgtTdbGetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ToolColor)
|
||||||
|
' Recupero i tre valori interi RGB
|
||||||
Dim sItems As String() = ToolColor.Split(","c)
|
Dim sItems As String() = ToolColor.Split(","c)
|
||||||
' Verifico che siano almeno 3 campi
|
Dim nRed, nGreen, nBlue As Integer
|
||||||
If sItems.Count < 3 Then
|
If sItems.Count>= 3 AndAlso
|
||||||
Return New Color3d(0, 255, 0, 100)
|
Integer.TryParse( sItems(0), nRed) AndAlso
|
||||||
|
Integer.TryParse( sItems(1), nGreen) AndAlso
|
||||||
|
Integer.TryParse( sItems(2), nBlue) Then
|
||||||
|
Return New Color3d(nRed, nGreen, nBlue, 100)
|
||||||
Else
|
Else
|
||||||
' Verifico che tutti i campi siano numerici
|
Return New Color3d(0, 255, 0, 100)
|
||||||
If IsNumeric(sItems(0)) And IsNumeric(sItems(1)) And IsNumeric(sItems(2)) Then
|
|
||||||
Return New Color3d(CInt(sItems(0)), CInt(sItems(1)), CInt(sItems(2)), 100)
|
|
||||||
Else
|
|
||||||
Return New Color3d(0, 255, 0, 100)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -405,76 +398,70 @@ Module Utility
|
|||||||
Return BackBottomColor
|
Return BackBottomColor
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Sub GetDrillFromDrilling(ByRef sCurrDrill As String, ByVal sCurrDrilling As String)
|
Public Function GetDrillFromDrilling(sCurrDrilling As String) As String
|
||||||
If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
' Se foratura non definita, esco subito
|
||||||
' creo l'elenco degli utensili di foratura
|
If String.IsNullOrWhiteSpace(sCurrDrilling) Then Return ""
|
||||||
Dim sToolName As String = String.Empty
|
' Salvo lavorazione e utensile correnti
|
||||||
Dim nType As Integer = MCH_TY.NONE
|
Dim sPrevMach As String = ""
|
||||||
Dim DrillToolList As New ObservableCollection(Of String)
|
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sPrevMach)
|
||||||
DrillToolList.Clear()
|
Dim sPrevTool As String = ""
|
||||||
If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
EgtTdbGetCurrToolParam(MCH_TP.NAME, sPrevTool)
|
||||||
DrillToolList.Add(sToolName)
|
' Inizializzo nome utensile a nessuno
|
||||||
While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
Dim sCurrDrill As String = ""
|
||||||
DrillToolList.Add(sToolName)
|
' Se esiste la lavorazione
|
||||||
End While
|
If EgtMdbSetCurrMachining(sCurrDrilling) Then
|
||||||
|
' recupero il nome dell'utensile della lavorazione
|
||||||
|
Dim sTuuid As String = ""
|
||||||
|
Dim sToolName As String = ""
|
||||||
|
If Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid) OrElse
|
||||||
|
Not EgtTdbGetToolFromUUID(sTuuid, sToolName) Then
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sToolName)
|
||||||
End If
|
End If
|
||||||
' recupero l'utensile associato alla lavorazione
|
' ne verifico il tipo
|
||||||
'Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
Dim nToolType As Integer = MCH_TY.NONE
|
||||||
Dim ToolString As String = String.Empty
|
If EgtTdbSetCurrTool( sToolName) AndAlso
|
||||||
EgtMdbSetCurrMachining(sCurrDrilling)
|
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nToolType) AndAlso ( nToolType And MCH_TF.DRILLBIT) <> 0 Then
|
||||||
' Recupero nome utensile tramite TUUID
|
sCurrDrill = sToolName
|
||||||
Dim sTuuid As String = String.Empty
|
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
|
||||||
EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
|
||||||
Dim bToolExist As Boolean = False
|
|
||||||
For Each CurrTool As IEnumerable In DrillToolList
|
|
||||||
If CurrTool.ToString() = ToolString Then
|
|
||||||
bToolExist = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If bToolExist Then
|
|
||||||
sCurrDrill = ToolString
|
|
||||||
Else
|
|
||||||
sCurrDrill = String.Empty
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
' Ripristino lavorazione e utensile correnti
|
||||||
|
EgtMdbSetCurrMachining(sPrevMach)
|
||||||
|
EgtTdbSetCurrTool(sPrevTool)
|
||||||
|
' Restituisco il nome dell'utensile
|
||||||
|
Return sCurrDrill
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub GetMillFromMilling(ByRef sCurrMill As String, ByVal sCurrMilling As String)
|
Public Function GetMillFromMilling(sCurrMilling As String) As String
|
||||||
If String.IsNullOrEmpty(sCurrMill) Or String.IsNullOrWhiteSpace(sCurrMill) Then
|
' Se fresatura non definita, esco subito
|
||||||
' creo l'elenco degli utensili di foratura
|
If String.IsNullOrWhiteSpace(sCurrMilling) Then Return ""
|
||||||
Dim sToolName As String = String.Empty
|
' Salvo lavorazione e utensile correnti
|
||||||
Dim nType As Integer = MCH_TY.NONE
|
Dim sPrevMach As String = ""
|
||||||
Dim MillToolList As New ObservableCollection(Of String)
|
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sPrevMach)
|
||||||
MillToolList.Clear()
|
Dim sPrevTool As String = ""
|
||||||
If EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType) Then
|
EgtTdbGetCurrToolParam(MCH_TP.NAME, sPrevTool)
|
||||||
MillToolList.Add(sToolName)
|
' Inizializzo nome utensile a nessuno
|
||||||
While EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
Dim sCurrMill As String = ""
|
||||||
MillToolList.Add(sToolName)
|
' Se esiste la lavorazione
|
||||||
End While
|
If EgtMdbSetCurrMachining(sCurrMilling) Then
|
||||||
|
' recupero il nome dell'utensile della lavorazione
|
||||||
|
Dim sTuuid As String = ""
|
||||||
|
Dim sToolName As String = ""
|
||||||
|
If Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid) OrElse
|
||||||
|
Not EgtTdbGetToolFromUUID(sTuuid, sToolName) Then
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sToolName)
|
||||||
End If
|
End If
|
||||||
' recupero l'utensile associato alla lavorazione
|
' ne verifico il tipo
|
||||||
'Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
Dim nToolType As Integer = MCH_TY.NONE
|
||||||
Dim ToolString As String = String.Empty
|
If EgtTdbSetCurrTool( sToolName) AndAlso
|
||||||
EgtMdbSetCurrMachining(sCurrMilling)
|
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nToolType) AndAlso ( nToolType And MCH_TF.MILL) <> 0 Then
|
||||||
' Recupero nome utensile tramite TUUID
|
sCurrMill = sToolName
|
||||||
Dim sTuuid As String = String.Empty
|
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
|
||||||
EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
|
||||||
Dim bToolExist As Boolean = False
|
|
||||||
For Each CurrTool As IEnumerable In MillToolList
|
|
||||||
If CurrTool.ToString() = ToolString Then
|
|
||||||
bToolExist = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If bToolExist Then
|
|
||||||
sCurrMill = ToolString
|
|
||||||
Else
|
|
||||||
sCurrMill = String.Empty
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
' Ripristino lavorazione e utensile correnti
|
||||||
|
EgtMdbSetCurrMachining(sPrevMach)
|
||||||
|
EgtTdbSetCurrTool(sPrevTool)
|
||||||
|
' Restituisco il nome dell'utensile
|
||||||
|
Return sCurrMill
|
||||||
|
End Function
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ Friend Module VeinMatching
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
' ------------------- CARICO I PEZZI PRESENTI NEL PROGETTO CORRENTE -------------------
|
' ------------------- CARICO I PEZZI PRESENTI NEL PROGETTO CORRENTE -------------------
|
||||||
' carico tutti i pezzi del progetto corrente che sonon di tipo PCucina, PBagno, AlzFront
|
' carico tutti i pezzi del progetto corrente che sono di tipo PCucina, PBagno, AlzFront
|
||||||
Friend Function LoadCurrPartFromProj() As Boolean
|
Friend Function LoadCurrPartFromProj() As Boolean
|
||||||
' Recupero il contesto corrente
|
' Recupero il contesto corrente
|
||||||
Dim nCurrCtx = EgtGetCurrentContext()
|
Dim nCurrCtx = EgtGetCurrentContext()
|
||||||
|
|||||||