OmagCUT 1.9i4 :
- gestione ventose con asse rotante a step (STEPS=Val1,Val2,... in GEO di asse).
This commit is contained in:
+16
-1
@@ -72,7 +72,7 @@ Friend Module CamAuto
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
Dim nPrevOpeId As Integer = EgtGetPrevOperation(nOpeId)
|
||||
If EgtGetOperationType(nOpeId) = MCH_OY.DISP And EgtIsOperationEmpty(nOpeId) Then
|
||||
If EgtGetOperationType(nOpeId) = MCH_OY.DISP AndAlso EgtIsOperationEmpty(nOpeId) Then
|
||||
EgtRemoveLastPhase()
|
||||
Else
|
||||
Exit While
|
||||
@@ -82,6 +82,21 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveLastPhase() As Boolean
|
||||
' Non posso eliminare la prima fase
|
||||
Dim nLastPhase As Integer = EgtGetPhaseCount()
|
||||
If nLastPhase = 1 Then Return False
|
||||
' Sposto le lavorazioni in coda a quelle della fase precedente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(nLastPhase)
|
||||
Dim nMachId As Integer = EgtGetNextOperation(nDispId)
|
||||
While nMachId <> GDB_ID.NULL
|
||||
EgtChangeOperationPhase(nMachId, nLastPhase - 1)
|
||||
nMachId = EgtGetNextOperation(nDispId)
|
||||
End While
|
||||
' Rimuovo l'ultima fase
|
||||
Return EgtRemoveLastPhase()
|
||||
End Function
|
||||
|
||||
Friend Function UpdateAllMachiningsToolpaths() As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
|
||||
@@ -76,6 +76,8 @@ Module ConstGen
|
||||
Public Const KEY_VAC_TYPE As String = "VacType"
|
||||
' Nome gruppo layout in testa con ventose
|
||||
Public Const VACUUM_HEAD_LAYOUT As String = "LAYOUT"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
Public Const KEY_ROTVAC_STEPS As String = "STEPS"
|
||||
' Nome oggetto frame prima uscita di una testa
|
||||
Public Const HEAD_FIRST_EXIT As String = "_T1"
|
||||
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.9.3")>
|
||||
<Assembly: AssemblyFileVersion("1.9.9.3")>
|
||||
<Assembly: AssemblyVersion("1.9.9.4")>
|
||||
<Assembly: AssemblyFileVersion("1.9.9.4")>
|
||||
|
||||
@@ -440,22 +440,6 @@ Public Module SplitAuto
|
||||
Return False
|
||||
End Function
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Function RemoveLastPhase() As Boolean
|
||||
' Non posso eliminare la prima fase
|
||||
Dim nLastPhase As Integer = EgtGetPhaseCount()
|
||||
If nLastPhase = 1 Then Return False
|
||||
' Sposto le lavorazioni in coda a quelle della fase precedente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(nLastPhase)
|
||||
Dim nMachId As Integer = EgtGetNextOperation(nDispId)
|
||||
While nMachId <> GDB_ID.NULL
|
||||
EgtChangeOperationPhase(nMachId, nLastPhase - 1)
|
||||
nMachId = EgtGetNextOperation(nDispId)
|
||||
End While
|
||||
' Rimuovo l'ultima fase
|
||||
Return EgtRemoveLastPhase()
|
||||
End Function
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Private Function FindInterferences(ByRef MachSplitList As List(Of SplitMach)) As Boolean
|
||||
|
||||
+29
-2
@@ -304,6 +304,23 @@ Module VacuumCups
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
||||
' Recupero l'asse rotante della testa ventosa
|
||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
||||
' Verifico se contiene info con STEPS
|
||||
Dim sSteps As String = ""
|
||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
||||
' Leggo gli step previsti
|
||||
Dim vStep() As String = sSteps.Split(",".ToCharArray)
|
||||
For Each sStep As String In vStep
|
||||
Dim dStep As Double = 0
|
||||
If StringToDouble(sStep, dStep) Then
|
||||
vAngRot.Add(dStep)
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function TestVacuumCupSelection(sCups() As String, b3Raw As BBox3d, ptRawCen As Point3d, nOutlineId As Integer, nRawRegId As Integer,
|
||||
ByRef vtMove As Vector3d, ByRef ptRotCen As Point3d, ByRef dRotAngDeg As Double) As Double
|
||||
' Se definizione mancante, scarto soluzione
|
||||
@@ -347,10 +364,20 @@ Module VacuumCups
|
||||
For nJ As Integer = 0 To sCups.Length() - 1
|
||||
nCups(nJ) = EgtGetFirstNameInGroup(m_nVacId, sCups(nJ))
|
||||
Next
|
||||
' Angoli di prova
|
||||
Dim vAngRot As New List(Of Double)
|
||||
' Se asse rotante ventosa a step
|
||||
If GetVacRotAxisSteps(vAngRot) Then
|
||||
' Annullo la rotazione di allineamento
|
||||
dRotAngDeg = 0
|
||||
' altrimenti in continuo
|
||||
Else
|
||||
' Assegno più valori di ricerca e conservo angolo di allineamento
|
||||
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
||||
End If
|
||||
' Eseguo verifica delle ventose rispetto al grezzo
|
||||
Dim bVacOk As Boolean = False
|
||||
Dim vAngRot() As Double = {0, +5, -5, +12.5, -12.5, +25, -25, +45, -45}
|
||||
For i As Integer = 0 To vAngRot.Length() - 1
|
||||
For i As Integer = 0 To vAngRot.Count() - 1
|
||||
If TestVacuumCups(nCups, nRawRegId, vtMove, ptRotCen, dRotAngDeg + vAngRot(i)) Then
|
||||
dRotAngDeg += vAngRot(i)
|
||||
bVacOk = True
|
||||
|
||||
Reference in New Issue
Block a user