OmagCUT :

- aggiunto salvataggio BBox complessiva di pezzi con canalini per fare lavaggio.
This commit is contained in:
Dario Sassi
2017-05-02 09:39:51 +00:00
parent 2dc512e761
commit a5e1af7eeb
3 changed files with 16 additions and 3 deletions
+12 -1
View File
@@ -97,6 +97,8 @@ Friend Module CamAuto
Dim nOriPhase As Integer = EgtGetCurrPhase()
' Carico le ventose
LoadVacuumCups()
' Box complessivo dei pezzi con tagli da sotto
Dim b3Tot As New BBox3d
' Ciclo su tutti i pezzi presenti nei grezzi dell'ultima fase di lavorazione
EgtSetCurrPhase(EgtGetPhaseCount())
Dim nRawId As Integer = EgtGetFirstRawPart()
@@ -109,8 +111,10 @@ Friend Module CamAuto
' se ci sono tagli da sotto nel pezzo si processa
If EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)) > 0 Then
Dim rmData As New RawMoveData
If PutVacuumCupsOnPart(nPartId, rmData) Then
Dim b3Part As New BBox3d
If PutVacuumCupsOnPart(nPartId, rmData, b3Part) Then
SaveOneMoveInfo(nPartId, rmData)
b3Tot.Add(b3Part)
Else
bOk = False
EgtOutLog("Error on UpdateVacuumsForDrip in Part " & nPartId.ToString())
@@ -123,6 +127,13 @@ Friend Module CamAuto
End While
' Scarico le ventose
RemoveVacuumCups()
' Salvo box complessivo
Dim nMarkId As Integer = m_MainWindow.m_CurrentProjectPageUC.AddProjectMark()
If b3Tot.IsEmpty Then
Return EgtRemoveInfo(nMarkId, INFO_DRIPBBOX)
Else
Return EgtSetInfo(nMarkId, INFO_DRIPBBOX, b3Tot)
End If
' Ripristino fase corrente originale
EgtSetCurrPhase(nOriPhase)
Return bOk
+2
View File
@@ -114,6 +114,8 @@ Module ConstGen
Public Const INFO_PROJMAT As String = "ProjMat"
' Info per programma di linea inviato
Public Const INFO_NCPROGSENT As String = "NcProgSent"
' Info per ingombro pezzi con gocciolatoio
Public Const INFO_DRIPBBOX As String = "DripBBox"
' Nome layer delle regioni
Public Const NAME_REGION As String = "Region"
+2 -2
View File
@@ -163,7 +163,8 @@ Module VacuumCups
Return False
End Function
Friend Function PutVacuumCupsOnPart(nPartId As Integer, ByRef rmData As RawMoveData) As Boolean
Friend Function PutVacuumCupsOnPart(nPartId As Integer,
ByRef rmData As RawMoveData, ByRef b3Part As BBox3d) As Boolean
' Ripristino posizione originale ventose
ResetVacuumCups()
' Verifico sia veramente un pezzo
@@ -177,7 +178,6 @@ Module VacuumCups
End While
If nRegId = GDB_ID.NULL Then Return False
' Box e baricentro del pezzo (sempre sopra)
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nRegId, GDB_BB.STANDARD, b3Part)
Dim ptPartCen As Point3d
EgtCentroid(nRegId, GDB_ID.ROOT, ptPartCen)