OmagCUT 1.6t1 :

- aggiunto log dei comandi diretti 3assi e 5assi
- aggiunta rimozione manuale sfridi anche con movimento pezzi con ventose
- aggiunta possibilità di eliminare home finale nei tagli diretti
- con NUOVO progetto e pezzi parcheggiati si chiede se conservarli
- spessore pezzo con 3 decimali (per inches)
- migliorata visualizzazione coordinate assi in simulazione
- in lista lavorazioni aggiunto flag sui tagli inclinati 
- corretta visualizzazione famiglie utensili da Ini.
This commit is contained in:
Dario Sassi
2016-08-05 18:48:41 +00:00
parent cb2257e12f
commit a8dc3d2642
28 changed files with 432 additions and 143 deletions
+49 -40
View File
@@ -11,6 +11,7 @@ Public Module SplitAuto
Public m_nId As Integer
Public m_vOthId As New List(Of Integer)
Public m_nType As Integer
Public m_dSideAng As Double
Public m_sLay As String
Public m_nNbrId As Integer
Public m_nInterf As Integer
@@ -47,50 +48,58 @@ Public Module SplitAuto
Mach.m_nType = EgtGetOperationType(nOperId)
' layer di origine
EgtGetInfo(nOperId, "Lay", Mach.m_sLay)
' 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
' 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)
' 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)
' verifico se trasformabile in un taglio di separazione
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL And
dStartAddLen > -EPS_SMALL And dEndAddLen > -EPS_SMALL And
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Mach.m_bCanStartAll = (nRes And CAR_RES.LI_OK) <> 0
Mach.m_bCanEndAll = (nRes And CAR_RES.LO_OK) <> 0
Else
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
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)
Else
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
' Forature e fresature
Else
Mach.m_nInterf = FMI_TYPE.NONE
End If
' la imposto come lavorazione corrente e ne ricavo il tipo
EgtSetCurrMachining(nOperId)
Dim nMchType As Integer = MCH_MY.NONE
EgtGetMachiningParam(MCH_MP.TYPE, nMchType)
' se taglio con lama, recupero l'angolo di fianco
Dim dSideAng As Double = 90
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
' se taglio con lama, 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)
' verifico se trasformabile in un taglio di separazione
If Math.Abs(dSideAng) < EPS_ANG_SMALL And
dStartAddLen > -EPS_SMALL And dEndAddLen > -EPS_SMALL And
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Mach.m_bCanStartAll = (nRes And CAR_RES.LI_OK) <> 0
Mach.m_bCanEndAll = (nRes And CAR_RES.LO_OK) <> 0
Else
Mach.m_dSideAng = 0
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
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)
Else
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If