Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 74013dbd94 | |||
| f7ee580d1f |
+4
-140
@@ -38,6 +38,8 @@ Public Module SplitAuto
|
||||
Public m_vtDir As Vector3d
|
||||
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
|
||||
Public m_bMngLeadInOnIntCorner As Boolean
|
||||
' ver 2.7e1: tagli finali
|
||||
Public m_bFinalCut As Boolean
|
||||
End Class
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
@@ -51,146 +53,6 @@ Public Module SplitAuto
|
||||
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
||||
Dim Mach As New SplitMach
|
||||
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
|
||||
'' 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
|
||||
' Dim sInfo As String = String.Empty
|
||||
' If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
' Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
' For Each sId As String In sItems
|
||||
' Dim nId As Integer = 0
|
||||
' StringToInt(sId, nId)
|
||||
' If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
' Next
|
||||
' End If
|
||||
' ' tipo
|
||||
' Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' ' layer di origine
|
||||
' EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' ' se taglio con lama
|
||||
' If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' ' verifica interferenza
|
||||
' If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
' EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
' For Each nId As Integer In Mach.m_vOthId
|
||||
' Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
' EgtVerifyMachining(nId, nRes)
|
||||
' Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
' Next
|
||||
' Else
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' End If
|
||||
' ' la imposto come lavorazione corrente
|
||||
' EgtSetCurrMachining(nOperId)
|
||||
' ' inversione
|
||||
' EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' ' recupero l'angolo di fianco
|
||||
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' ' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
' Dim dStartAddLen As Double = -10
|
||||
' EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
' Dim dEndAddLen As Double = -10
|
||||
' EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' ' 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
|
||||
' Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
' Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
' Dim nEntId, nSub As Integer
|
||||
' If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' ' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
' If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
' 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
|
||||
' EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
' End If
|
||||
' ' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
' If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_sLay = NAME_OUTLOOP And ( Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
' Dim bIn As Boolean = False
|
||||
' Dim bOut As Boolean = False
|
||||
' CanExtendSides(Mach, bIn, bOut)
|
||||
' Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
' Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
' If nRes = 0 Then
|
||||
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
' End If
|
||||
|
||||
' ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_sLay = NAME_OUTLOOP And
|
||||
' (Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
|
||||
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
' Dim bIn As Boolean = False
|
||||
' Dim bOut As Boolean = False
|
||||
' CanExtendSides(Mach, bIn, bOut)
|
||||
' ' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
|
||||
' Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
|
||||
' Mach.m_nInterf <> FMI_TYPE.LI
|
||||
' ' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
|
||||
' Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
|
||||
' Mach.m_nInterf <> FMI_TYPE.LO
|
||||
' If nRes = 0 Then
|
||||
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
' End If
|
||||
' End If
|
||||
' ' se trasformabile in taglio di separazione, verifico se lo è
|
||||
' If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
' EgtSetCurrMachining(nOperId)
|
||||
' Dim nLiType As Integer
|
||||
' EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
' Dim nLoType As Integer
|
||||
' EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
' Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
' Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
' Else
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' End If
|
||||
' ' Waterjet
|
||||
' ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' ' recupero l'angolo di fianco
|
||||
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' Mach.m_bCanStartAll = False
|
||||
' Mach.m_bCanEndAll = False
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' ' Forature e fresature
|
||||
' Else
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' Mach.m_dSideAng = 0
|
||||
' Mach.m_bCanStartAll = False
|
||||
' Mach.m_bCanEndAll = False
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' End If
|
||||
' ' abilitazione
|
||||
' Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' ' pausa
|
||||
' Mach.m_bPause = GetPause(nOperId)
|
||||
' ' inserisco in lista
|
||||
' MachSplitList.Add(Mach)
|
||||
' ' altrimenti la disattivo
|
||||
'Else
|
||||
' EgtSetOperationMode(nOperId, False)
|
||||
'End If
|
||||
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
@@ -262,6 +124,8 @@ Public Module SplitAuto
|
||||
Mach.m_nEntId = nEntId
|
||||
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
End If
|
||||
Mach.m_bFinalCut = False
|
||||
EgtGetInfo(nOperId, "FinalCut", Mach.m_bFinalCut)
|
||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And (Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
|
||||
@@ -201,8 +201,9 @@ Public Class SplitPageUC
|
||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||
sText = EgtMsg(90791) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
If Mach.m_bFinalCut Then AddFinalText(sText)
|
||||
Else
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
AddItemToList(i, Mach, sText, MCH_OY.SAWING)
|
||||
@@ -863,6 +864,10 @@ Public Class SplitPageUC
|
||||
sName &= EgtMsg(91217) ' Top
|
||||
End Sub
|
||||
|
||||
Private Sub AddFinalText(ByRef sName As String)
|
||||
sName = "Final " & sName
|
||||
End Sub
|
||||
|
||||
Private Sub RemovePauseText(ByRef sName As String)
|
||||
sName = sName.Replace(EgtMsg(MSG_SPLITPAGEUC + 32), "")
|
||||
sName = sName.TrimEnd()
|
||||
|
||||
Reference in New Issue
Block a user