diff --git a/CamAuto.vb b/CamAuto.vb index 2d692e8..5037cd8 100644 --- a/CamAuto.vb +++ b/CamAuto.vb @@ -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 diff --git a/ConstGen.vb b/ConstGen.vb index cefe456..9187286 100644 --- a/ConstGen.vb +++ b/ConstGen.vb @@ -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" diff --git a/VacuumCups.vb b/VacuumCups.vb index 839039e..a0f97ba 100644 --- a/VacuumCups.vb +++ b/VacuumCups.vb @@ -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)