Compare commits

...

1 Commits

Author SHA1 Message Date
NicolaP 93b432284d Gestione rotazione ventosa vicino finecorsa Y 2022-04-07 19:25:46 +02:00
+11 -2
View File
@@ -383,10 +383,19 @@ Module VacuumCups
dRotAngDeg = dAngOrizzDeg
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
Dim dPreferredRot As Double = m_dPreferredRot
If Math.Abs( dRotAngDeg - 90) < 45 Or Math.Abs( dRotAngDeg - 270) < 45 Then
' verifico l'orientamento del pezzo
If Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45 Then
' se l'rientamento è verticale
If frMinRect.Orig().x < b3Tab.Center().x Then
dPreferredRot = m_dPrefVertRotXMinus
else
Else
dPreferredRot = m_dPrefVertRotXPlus
End If
ElseIf Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45 Then
' se l'orientemanto è orizzontale
If frMinRect.Orig().y < b3Tab.Center().y Then
dPreferredRot = m_dPrefVertRotXMinus
Else
dPreferredRot = m_dPrefVertRotXPlus
End If
End If