OmagCUT 2.2k3 :

- aggiunta possibilità di invertire tagli verticali in Split.
This commit is contained in:
Dario Sassi
2020-11-24 19:39:06 +00:00
parent 7954f538f0
commit 2b912bc913
5 changed files with 206 additions and 46 deletions
+30
View File
@@ -64,6 +64,22 @@ Friend Module CamAuto
Return bOk
End Function
Friend Function InvertVerticalCut(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.InvertVerticalCut")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
Friend Function ResetAllMachinings() As Boolean
Dim nWarn As Integer = 0
Return ResetAllMachinings(nWarn)
@@ -602,6 +618,20 @@ Friend Module CamAuto
Return EgtRemoveInfo(nMchId, INFO_MCH_PAUSE)
End Function
Friend Function SetEnableInvert(nEntId As Integer) As Boolean
Return EgtRemoveInfo(nEntId, INFO_ENABLE_INVERT)
End Function
Friend Function GetEnableInvert(nEntId As Integer) As Boolean
Dim bEnable As Boolean = True
EgtGetInfo(nEntId, INFO_ENABLE_INVERT, bEnable)
Return bEnable
End Function
Friend Function ResetEnableInvert(nEntId As Integer) As Boolean
Return EgtSetInfo(nEntId, INFO_ENABLE_INVERT, False)
End Function
Friend Function UpdateMachiningPreview(nMchId As Integer, bMoveOnPart As Boolean) As Boolean
' Imposto la lavorazione corrente
If Not EgtSetCurrMachining(nMchId) Then Return False
+10 -1
View File
@@ -13,7 +13,9 @@ Public Module SplitAuto
Public m_nType As Integer
Public m_dSideAng As Double
Public m_sLay As String
Public m_nEntId As Integer
Public m_nNbrId As Integer
Public m_nArrId As Integer
Public m_nInterf As Integer
Public m_bCanStartAll As Boolean
Public m_bCanEndAll As Boolean
@@ -21,12 +23,14 @@ Public Module SplitAuto
Public m_bEndAll As Boolean
Public m_bEnabled As Boolean
Public m_bPause As Boolean
Public m_bEnableInvert As Boolean
Public m_bInvert As Boolean
Public m_bIsLine As Boolean
Public m_dPrevAng As Double
Public m_dNextAng As Double
Public m_dStartFreeLen As Double
Public m_dEndFreeLen As Double
Public m_vtDir As Vector3d
End Class
'-----------------------------------------------------------------------------------------------
@@ -41,6 +45,7 @@ Public Module SplitAuto
' se appartiene ad un grezzo attivo la inserisco in lista
If IsMachiningInActiveRaw(nOperId) Then
Dim Mach As New SplitMach
Mach.m_nEntId = GDB_ID.NULL
' identificativo
Mach.m_nId = nOperId
' eventuali lavorazioni inglobate
@@ -81,7 +86,7 @@ Public Module SplitAuto
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
Dim dEndAddLen As Double = -10
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
' recupero tipo entità, ancolo con entità precedente e successiva, lunghezze libere iniziale e finale
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
Mach.m_bIsLine = True
Mach.m_dPrevAng = 0
Mach.m_dNextAng = 0
@@ -94,6 +99,10 @@ Public Module SplitAuto
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
Mach.m_bEnableInvert = GetEnableInvert( nEntId)
EgtMidVector( nEntId, GDB_ID.ROOT, Mach.m_vtDir)
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
Mach.m_nEntId = nEntId
End If
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And
+8 -7
View File
@@ -143,13 +143,14 @@
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="PauseBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllOutStartBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllCenStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllOutEndBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllCenEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllExtendBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllReduceBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
</Grid>
+156 -36
View File
@@ -39,6 +39,7 @@ Public Class SplitPageUC
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
ModifStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
ModifEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
InvertBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
AllOutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
AllCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
@@ -99,7 +100,7 @@ Public Class SplitPageUC
' sistemo colore
ColorMachining(m_MachiningList(nI))
' assegno numerazione
NumberMachining(nI)
NumberDirectionMachining(nI)
Next
' Preparo la lista degli Item
ShowMachiningList()
@@ -275,7 +276,7 @@ Public Class SplitPageUC
m_ItemList(Index).bIsActive = True
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
Next
EgtDraw()
' Imposto flag di modifica
@@ -290,7 +291,7 @@ Public Class SplitPageUC
m_MachiningList(nI).m_bEnabled = True
m_ItemList(nI).bIsActive = True
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
End If
Next
EgtDraw()
@@ -306,7 +307,7 @@ Public Class SplitPageUC
m_MachiningList(nI).m_bEnabled = False
m_ItemList(nI).bIsActive = False
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
End If
Next
EgtDraw()
@@ -523,7 +524,7 @@ Public Class SplitPageUC
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
bGenModif = True
End If
Next
@@ -553,7 +554,7 @@ Public Class SplitPageUC
ModifyOtherLeadIn(nI, MCH_SAW_LI.OUT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
Next
EgtDraw()
' Imposto flag di modifica
@@ -579,7 +580,7 @@ Public Class SplitPageUC
ModifyOtherLeadIn(nI, MCH_SAW_LI.CENT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
Next
EgtDraw()
' Imposto flag di modifica
@@ -621,7 +622,7 @@ Public Class SplitPageUC
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
bGenModif = True
End If
Next
@@ -651,7 +652,7 @@ Public Class SplitPageUC
ModifyOtherLeadOut(nI, MCH_SAW_LO.OUT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
Next
EgtDraw()
' Imposto flag di modifica
@@ -677,7 +678,7 @@ Public Class SplitPageUC
ModifyOtherLeadOut(nI, MCH_SAW_LO.CENT)
End If
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
Next
EgtDraw()
' Imposto flag di modifica
@@ -766,7 +767,7 @@ Public Class SplitPageUC
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
ColorNumberArrow(nI)
bGenModif = True
' se altrimenti fresatura sopra
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
@@ -819,7 +820,7 @@ Public Class SplitPageUC
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
ColorNumberArrow( nI)
bGenModif = True
End If
Next
@@ -870,7 +871,7 @@ Public Class SplitPageUC
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
ColorNumberArrow( nI)
bGenModif = True
' se altrimenti fresatura sopra
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
@@ -918,7 +919,7 @@ Public Class SplitPageUC
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
ColorNumberArrow( nI)
bGenModif = True
End If
Next
@@ -929,6 +930,50 @@ Public Class SplitPageUC
End If
End Sub
Private Sub InvertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InvertBtn.Click
If m_CurrFirstInd = -1 Then Return
For Index = m_CurrFirstInd To m_CurrLastInd
Dim nI As Integer = m_ItemList(Index).Ind
' Si possono invertire solo i tagli di lama
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
' Non si possono invertire i tagli di lama inclinati
If Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
' Se abilitata inversione automatica e quindi non invertito
If m_MachiningList( nI).m_bEnableInvert Then
' Inverto e disabilito inversione automatica
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
m_MachiningList( nI).m_bInvert = True
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
m_MachiningList( nI).m_bEnableInvert = False
SwapStartEndData( nI)
ResetEnableInvert( m_MachiningList( nI).m_nEntId)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
EgtDraw()
End If
' se altrimenti disabilitata inversione automatica e invertito
ElseIf m_MachiningList( nI).m_bInvert Then
' Tolgo inversione e lascio disabilitazione inv. autom.
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
m_MachiningList( nI).m_bInvert = False
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
SwapStartEndData( nI)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
EgtDraw()
End If
' altrimenti disabilitata inversione automatica e non invertito
Else
' Abilito inversione automatica e lascio non invertito
m_MachiningList( nI).m_bEnableInvert = True
SetEnableInvert( m_MachiningList( nI).m_nEntId)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
EgtDraw()
End If
Next
End Sub
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
If m_CurrFirstInd = -1 Then Return
Dim bGenModif As Boolean = False
@@ -1023,7 +1068,7 @@ Public Class SplitPageUC
' sistemo colore
ColorMachining(m_MachiningList(nI))
' assegno numerazione
NumberMachining(nI)
NumberDirectionMachining(nI)
Next
' Preparo la lista degli Item
ShowMachiningList()
@@ -1199,6 +1244,7 @@ Public Class SplitPageUC
AllReduceBtn.IsEnabled = Not m_bShow
ModifStartBtn.IsEnabled = Not m_bShow
ModifEndBtn.IsEnabled = Not m_bShow
InvertBtn.IsEnabled = Not m_bShow
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
End Sub
@@ -1220,7 +1266,7 @@ Public Class SplitPageUC
Return True
End Function
Private Sub NumberMachining(nI As Integer)
Private Sub NumberDirectionMachining( nI As Integer, Optional bNumber As Boolean = True)
EgtDisableModified()
' Determino se seconda lavorazione
Dim sName As String = String.Empty
@@ -1244,13 +1290,29 @@ Public Class SplitPageUC
vtXY.Normalize()
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
ptCen.z = ptMax.z + 1
Dim nNbrId As Integer = EgtCreateTextAdv( m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
300, False, dHtxt, dRat, 0, INS_POS.MC)
m_MachiningList(nI).m_nNbrId = nNbrId
ColorNumber(nI)
EgtSetInfo(nNbrId, "MId", m_MachiningList(nI).m_nId)
' Aggiungo a lavorazione info con identificativo del numero e viceversa
EgtSetInfo(m_MachiningList(nI).m_nId, "NbrId", nNbrId)
If bNumber Then
Dim nNbrId As Integer = EgtCreateTextAdv( m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
300, False, dHtxt, dRat, 0, INS_POS.MC)
m_MachiningList(nI).m_nNbrId = nNbrId
' Aggiungo a numero info con identificativo della lavorazione e viceversa
EgtSetInfo( nNbrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo( m_MachiningList(nI).m_nId, "NbrId", nNbrId)
End If
' Se taglio con lama, metto la direzione accanto al numero
If m_MachiningList(nI).m_nType = MCH_OY.SAWING Then
Dim ptStart As New Point3d( ptCen + m_MachiningList(nI).m_vtDir * dHtxt)
Dim vtDir As New Vector3d( m_MachiningList(nI).m_vtDir)
Dim bTwin As Double = ( Not m_MachiningList(nI).m_bEnableInvert OrElse Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1)
Dim nArrId As Integer = AddMachiningDirection( ptStart, vtDir, dHtxt, bTwin)
m_MachiningList(nI).m_nArrId = nArrId
' Aggiungo a freccia info con identificativo della lavorazione e viceversa
EgtSetInfo( nArrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo( m_MachiningList(nI).m_nId, "ArrId", nArrId)
Else
m_MachiningList(nI).m_nArrId = GDB_ID.NULL
End If
' Assegno colore a numero e freccia
ColorNumberArrow( nI)
EgtEnableModified()
End Sub
@@ -1282,13 +1344,28 @@ Public Class SplitPageUC
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
End Function
Private Function AddMachiningDirection( ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
Dim dArrX As Double = dLen * Math.Cos( 30 * Math.PI / 180)
Dim dArrY As Double = dLen * Math.Sin( 30 * Math.PI / 180)
Dim nTmpId As Integer = EgtCreateLine( m_nNbrGrpId, Point3d.ORIG() + dArrY * Vector3d.Y_AX(), Point3d.ORIG() + dArrX * Vector3d.X_AX())
Dim nCrvId As Integer = EgtCreateCurveCompo( m_nNbrGrpId, nTmpId, True)
EgtAddCurveCompoLine( nCrvId, Point3d.ORIG() - dArrY * Vector3d.Y_AX())
If bTwin Then
EgtAddCurveCompoLine( nCrvId, Point3d.ORIG() + 2 * dArrX * Vector3d.X_AX())
EgtCloseCurveCompo( nCrvId)
End If
Dim frLoc As New Frame3d( ptStart, vtDir, Vector3d.Z_AX() ^ vtDir, Vector3d.Z_AX())
EgtTransform( nCrvId, frLoc)
Return nCrvId
End Function
Private Sub MarkMachining(nI As Integer, bMark As Boolean)
If nI < 0 Then Return
Dim nOperId As Integer = m_MachiningList(nI).m_nId
' Evidenzio la lavorazione principale
MarkSingleMachining(nOperId, bMark)
' Evidenzio l'eventuale numero della lavorazione
MarkNumber(nI, bMark)
MarkNumberArrow(nI, bMark)
' Marco anche le lavorazioni inglobate
For Each nId As Integer In m_MachiningList(nI).m_vOthId
MarkSingleMachining(nId, bMark)
@@ -1306,29 +1383,38 @@ Public Class SplitPageUC
End If
End Sub
Private Sub MarkNumber(nI As Integer, bMark As Boolean)
Private Sub MarkNumberArrow(nI As Integer, bMark As Boolean)
If nI < 0 Then Return
Dim nNbrId As Integer = m_MachiningList(nI).m_nNbrId
Dim nArrId As Integer = m_MachiningList( nI).m_nArrId
If bMark Then
EgtSetMark(nNbrId)
EgtSetMark( nNbrId)
EgtSetMark( nArrId)
Else
EgtResetMark(nNbrId)
EgtResetMark( nNbrId)
EgtResetMark( nArrId)
End If
End Sub
Private Sub ColorNumber(nI As Integer)
Private Sub ColorNumberArrow( nI As Integer)
If nI < 0 Then Return
If m_MachiningList(nI).m_bEnabled Then
If m_MachiningList(nI).m_nInterf = FMI_TYPE.NONE Then
EgtSetColor(m_MachiningList(nI).m_nNbrId, COL_MCH_FREE)
Dim nNbrId As Integer = m_MachiningList( nI).m_nNbrId
Dim nArrId As Integer = m_MachiningList( nI).m_nArrId
If m_MachiningList( nI).m_bEnabled Then
If m_MachiningList( nI).m_nInterf = FMI_TYPE.NONE Then
EgtSetColor( nNbrId, COL_MCH_FREE)
EgtSetColor( nArrId, COL_MCH_FREE)
Else
EgtSetColor(m_MachiningList(nI).m_nNbrId, COL_MCH_INTERF)
EgtSetColor( nNbrId, COL_MCH_INTERF)
EgtSetColor( nArrId, COL_MCH_INTERF)
End If
Else
If m_MachiningList(nI).m_nInterf = FMI_TYPE.NONE Then
EgtResetColor(m_MachiningList(nI).m_nNbrId)
ElseIf Not m_MachiningList(nI).m_bEnabled Then
EgtSetColor(m_MachiningList(nI).m_nNbrId, COL_MCH_DIS_INTERF)
If m_MachiningList( nI).m_nInterf = FMI_TYPE.NONE Then
EgtResetColor( nNbrId)
EgtResetColor( nArrId)
ElseIf Not m_MachiningList( nI).m_bEnabled Then
EgtSetColor( nNbrId, COL_MCH_DIS_INTERF)
EgtSetColor( nArrId, COL_MCH_DIS_INTERF)
End If
End If
End Sub
@@ -1351,6 +1437,40 @@ Public Class SplitPageUC
EgtEnableModified()
End Sub
Private Sub SwapStartEndData( nI As Integer)
' Swap angoli precedente e successivo
Dim dAng As Double = m_MachiningList( nI).m_dPrevAng
m_MachiningList( nI).m_dPrevAng = m_MachiningList( nI).m_dNextAng
m_MachiningList( nI).m_dNextAng = dAng
' Swap lunghezze libere
Dim dFreeLen As Double = m_MachiningList( nI).m_dStartFreeLen
m_MachiningList( nI).m_dStartFreeLen = m_MachiningList( nI).m_dEndFreeLen
m_MachiningList( nI).m_dEndFreeLen = dFreeLen
' Swap stato di allungamento
Dim bAll As Boolean = m_MachiningList( nI).m_bStartAll
m_MachiningList( nI).m_bStartAll = m_MachiningList( nI).m_bEndAll
m_MachiningList( nI).m_bEndAll = bAll
' Swap possibilità di allungamento
Dim bCanAll As Boolean = m_MachiningList( nI).m_bCanStartAll
m_MachiningList( nI).m_bCanStartAll = m_MachiningList( nI).m_bCanEndAll
m_MachiningList( nI).m_bCanEndAll = bCanAll
' Swap stato interferenza
if ( m_MachiningList( nI).m_nInterf & FMI_TYPE.LI) <> 0 And ( m_MachiningList( nI).m_nInterf & FMI_TYPE.LO) = 0 Then
m_MachiningList( nI).m_nInterf -= FMI_TYPE.LI
m_MachiningList( nI).m_nInterf += FMI_TYPE.LO
ElseIf ( m_MachiningList( nI).m_nInterf & FMI_TYPE.LI) = 0 And ( m_MachiningList( nI).m_nInterf & FMI_TYPE.LO) <> 0 Then
m_MachiningList( nI).m_nInterf += FMI_TYPE.LI
m_MachiningList( nI).m_nInterf -= FMI_TYPE.LO
End If
' Swap Allungamento Utente
Dim dOrigUsal As Double = 0
EgtGetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_SAL, dOrigUsal)
Dim dOrigUeal As Double = 0
EgtGetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_EAL, dOrigUeal)
EgtSetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_SAL, dOrigUeal)
EgtSetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_EAL, dOrigUsal)
End Sub
'-----------------------------------------------------------------------------------------------
Private Class NameIdLsBxItem
Implements INotifyPropertyChanged
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.11.2")>
<Assembly: AssemblyFileVersion("2.2.11.2")>
<Assembly: AssemblyVersion("2.2.11.3")>
<Assembly: AssemblyFileVersion("2.2.11.3")>