Compare commits

...

18 Commits

Author SHA1 Message Date
NicolaP 22afb6edcd Gestione modifica inizio/fine sugli angoli interni 2022-01-17 10:18:57 +01:00
NicolaP 9c8faf25bf Gestione Modifica Inizio/Fine da comando diretto 2022-01-13 18:05:00 +01:00
NicolaP 58775595c7 Gestione minimo accorciamento tagli con cursore 2022-01-12 17:22:45 +01:00
NicolaP 9750fdfe75 Selezione da interfaccia delle lavorazioni 2022-01-12 12:27:48 +01:00
NicolaP 39bc4f55ea Merge commit '803a7bdbfc50a45289bb4fddec345318bd22a07d' into Feature/Mach_WaterJet 2022-01-12 10:10:49 +01:00
DarioS 803a7bdbfc OmagCUT :
- piccola correzione su abilitazione Cornici.
2022-01-10 20:27:34 +01:00
NicolaP 1473298705 Merge branch 'Feature/Mach_WaterJet' 2022-01-10 20:17:55 +01:00
NicolaP 4be7087a1b Disabilito tutto quello che riguarda la lama. 2022-01-10 20:17:01 +01:00
NicolaP 7c990987e8 Merge remote-tracking branch 'origin/DB_WaterJet_Renzo' into Feature/Mach_WaterJet 2022-01-10 19:36:56 +01:00
NicolaP 3837895350 Merge remote-tracking branch 'origin/HEAD' into Feature/Mach_WaterJet 2022-01-10 18:49:49 +01:00
NicolaP e5195c5c5c Disabilito info lama se H1 assente 2022-01-10 18:49:09 +01:00
DarioS 17ed0b3807 OmagCUT :
- in Split aggiunta gestione con mouse (drag) di lunghezze di attacchi e uscite di tagli con lama
- corretto problema salvataggio progetto quando non esiste direttorio in cui si dovrebbe trovare la foto.
2022-01-10 18:39:20 +01:00
NicolaP e11722f598 Gestione visualizzazione bottoni in SplitPage 2022-01-10 18:20:28 +01:00
RenzoL 9644529618 Nel Db Waterjet il parametro del Sottomateriale viene selezionato anche quando si clicca una delle TextBox (ulteriore clic per scrivere nella TextBox) 2022-01-10 15:26:04 +01:00
DarioS 0eb6897c08 OmagCUT :
- modifiche per import CSV con angoli di lato e tallone
- salvataggio AGG_DEPTH in lato con taglio inclinato non passante.
2022-01-10 10:18:07 +01:00
DarioS 8462554421 OmagCUT 2.4a1 :
- sistemata acquisizione punto da laser per grezzo (problema impostazione lama).
2022-01-04 08:10:43 +01:00
NicolaP 446df8f37f Merge branch 'Feature/DB_WaterJet' 2021-12-29 13:11:01 +01:00
NicolaP 093f882118 Merge branch 'Feature/DB_WaterJet' 2021-12-29 11:59:53 +01:00
18 changed files with 595 additions and 132 deletions
+3
View File
@@ -674,6 +674,9 @@ Friend Module CamAuto
End If
' Lo sposto dalla lavorazione al pezzo
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
If nId = GDB_ID.NULL Then Return False
While nId <> GDB_ID.NULL
EgtRelocateGlob(nId, nPartPvId)
nId = EgtGetFirstInGroup(nMchPvId)
+40
View File
@@ -19,6 +19,14 @@ Friend Module CSVFile
Public m_dDimX As Double = 0
Public m_dDimY As Double = 0
Public m_dTh As Double = 0
Public m_dAng1 As Double = 0
Public m_dHeel1 As Double = 0
Public m_dAng2 As Double = 0
Public m_dHeel2 As Double = 0
Public m_dAng3 As Double = 0
Public m_dHeel3 As Double = 0
Public m_dAng4 As Double = 0
Public m_dHeel4 As Double = 0
Public m_nOriInd As Integer = 0
Public m_nId As Integer = GDB_ID.NULL
End Class
@@ -62,6 +70,14 @@ Friend Module CSVFile
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
OnePart.m_nOriInd = i
' inserisco in lista
CsvPartList.Add(OnePart)
@@ -147,6 +163,22 @@ Friend Module CSVFile
StringToDouble(sItems(1), OnePart.m_dDimY)
ElseIf sItems(0) = "Th" Then
StringToDouble(sItems(1), OnePart.m_dTh)
ElseIf sItems(0) = "A1" Then
StringToDouble(sItems(1), OnePart.m_dAng1)
ElseIf sItems(0) = "H1" Then
StringToDouble(sItems(1), OnePart.m_dHeel1)
ElseIf sItems(0) = "A2" Then
StringToDouble(sItems(1), OnePart.m_dAng2)
ElseIf sItems(0) = "H2" Then
StringToDouble(sItems(1), OnePart.m_dHeel2)
ElseIf sItems(0) = "A3" Then
StringToDouble(sItems(1), OnePart.m_dAng3)
ElseIf sItems(0) = "H3" Then
StringToDouble(sItems(1), OnePart.m_dHeel3)
ElseIf sItems(0) = "A4" Then
StringToDouble(sItems(1), OnePart.m_dAng4)
ElseIf sItems(0) = "H4" Then
StringToDouble(sItems(1), OnePart.m_dHeel4)
ElseIf sItems(0) = "OIn" Then
StringToInt(sItems(1), OnePart.m_nOriInd)
End If
@@ -188,6 +220,14 @@ Friend Module CSVFile
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
Next
' Terminatore
+30 -1
View File
@@ -424,10 +424,14 @@ Public Class CSVPage
' Definizione variabili
Dim dDimX = CurrPart.m_dDimX
Dim dDimY = CurrPart.m_dDimY
Dim dAng = New Double() {CurrPart.m_dAng1,CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4}
Dim dHeel = New Double() {CurrPart.m_dHeel1,CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4}
If bMaxDimOnX And dDimY > dDimX Then
Dim dTemp As Double = dDimX
dDimX = dDimY
dDimY = dTemp
dAng = New Double() {CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4,CurrPart.m_dAng1}
dHeel = New Double() {CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4,CurrPart.m_dHeel1}
End If
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
@@ -439,7 +443,7 @@ Public Class CSVPage
If nId = GDB_ID.NULL Then Continue For
CurrPart.m_nId = nId
' Muovo la regione in Z per evitare problemi in visualizzazione
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
Dim nRegId As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
' Eventuale testo per indicare il sopra
If Not bMaxDimOnX Then
@@ -447,6 +451,31 @@ Public Class CSVPage
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
EgtSetColor(nText, New Color3d( 0, 0, 0))
End If
' Inserisco eventuali angoli di fianco
Dim bSideAngs As Boolean = False
Dim nOutLoopId As Integer = EgtGetFirstNameInGroup( nId, NAME_OUTLOOP)
For nSide As Integer = 1 To 4
Dim dSideAng As Double = dAng( nSide - 1)
Dim dSideHeel As Double = dHeel( nSide - 1)
If Math.Abs( dSideAng) > EPS_ANG_SMALL Then
Dim nEntId As Integer = EgtGetFirstNameInGroup( nOutLoopId, "A" & nSide.ToString())
If nEntId <> GDB_ID.NULL Then
bSideAngs = True
' Assegno valori
EgtSetInfo(nEntId, INFO_SIDE_ANGLE, dSideAng)
EgtSetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dSideAng)
EgtSetInfo(nEntId, INFO_HEEL, dSideHeel)
End If
End If
Next
' Creo layer per testi nesting
If bSideAngs Then
Dim TextLayId As Integer = EgtCreateGroup(nId)
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
' Opero su geometria esterna pezzo
SideAngle.WriteSideAngleOnLoop(nOutLoopId, TextLayId)
End If
' Aggiusto per lavorazioni
EgtAdjustFlatPart(nId)
' Se Csv completo, aggiungo info su CSV di origine
+5 -1
View File
@@ -1168,7 +1168,7 @@ Public Class NestPageUC
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
End While
' Aggiorno le entità con tallone e quelle con angolo esterno
Const AGG_DEPTH As Double = 2.0
Const AGG_DEPTH As Double = 0.75
Dim bSizeOnTop As Boolean = ( GetPrivateProfileInt( S_SIDES, K_SIZEALWAYSONTOP, 0, m_MainWindow.GetIniFile()) <> 0)
For Each nEnt As Integer In vEnt
' Se aggiornamento vietato, vado oltre
@@ -1194,12 +1194,14 @@ Public Class NestPageUC
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
End If
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
Else
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
EgtRemoveInfo(nEnt, INFO_OFFSET2)
EgtRemoveInfo(nEnt, INFO_DEPTH2)
EgtRemoveInfo(nEnt, INFO_AGG2)
End If
' Inclinazione interna
Else
@@ -1208,12 +1210,14 @@ Public Class NestPageUC
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
Else
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
EgtRemoveInfo(nEnt, INFO_OFFSET)
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
EgtRemoveInfo(nEnt, INFO_DEPTH2)
EgtRemoveInfo(nEnt, INFO_AGG2)
End If
End If
' Se altrimenti inclinazione esterna
+11
View File
@@ -166,6 +166,17 @@ Public Module SplitAuto
End Function
'-----------------------------------------------------------------------------------------------
' calcolo il numero di tipi di lavorazioni
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
If MachSplit.m_nType = MCH_OY.SAWING Then
nCountSawing += 1
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
nCountWaterjetting += 1
Else
nCountOtherMachining += 1
End If
End Sub
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
EgtDisableModified()
' Assegno stato
+428 -78
View File
@@ -6,6 +6,9 @@ Public Class SplitPageUC
' Riferimento alla MainWindow
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Tipo movimento dei grezzi (manuale o con testa ventosa)
Private m_bByHand As Boolean = True
' Abilitazione movimento finale pezzi su tavola ausiliaria
@@ -13,6 +16,16 @@ Public Class SplitPageUC
' Stato
Private m_nCurrPhase As Integer = 0
Private m_MachiningList As New List(Of SplitMach)
' numero di lavorazioni di tipo lama
Private m_nCountSawing As Integer = 0
' numero di lavprazioni di tipo waterjet
Private m_nCountWaterjetting As Integer = 0
' altri tipi di lavorazioni (Foro/Fresa)
Private m_nCountOtherMachining As Integer = 0
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
Private m_bAreHomogeneous As Boolean = False
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
'Private m_CurrInd As Integer = -1
'Private m_CurrItems As New List(Of NameIdLsBxItem)
@@ -23,6 +36,13 @@ Public Class SplitPageUC
Private m_nNbrGrpId As Integer = GDB_ID.NULL
Private m_bToNext As Boolean = False
Friend m_bOnAuxTab As Boolean = False
' Drag
Private m_nDragInd As Integer = -1
Private m_nDragType As Integer = 0 '0=niente, 1=attacco, 2=uscita
Private m_ptDragPrev As Point3d
Private m_bDragging As Boolean = False
' Selected cut
Private m_nSelected As Integer = GDB_ID.NULL
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
PrevBtn.IsEnabled = False
@@ -53,6 +73,10 @@ Public Class SplitPageUC
End Sub
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
m_bActive = True
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_nDragInd = -1
m_nDragType = 0
' Leggo tipo movimento grezzi
m_bByHand = (EgtGetHeadId(VACUUM_HEAD) = GDB_ID.NULL Or
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
@@ -79,7 +103,7 @@ Public Class SplitPageUC
If Not m_bShow Then
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
Dim bModif As Boolean = TestAllMachiningsForStrict()
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
End If
@@ -97,12 +121,18 @@ Public Class SplitPageUC
ShowOnePhaseMachiningPreview(m_nCurrPhase)
' Preparo la lista delle lavorazioni
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
' azzero i contatori delle lavorazioni
m_nCountSawing = 0
m_nCountWaterjetting = 0
m_nCountOtherMachining = 0
' Aggiorno visualizzazione delle lavorazioni
For nI As Integer = 0 To m_MachiningList.Count() - 1
' sistemo colore
ColorMachining(m_MachiningList(nI))
' assegno numerazione
NumberDirectionMachining(nI)
' conto il numero di tipi di lavorazioni
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
Next
' Preparo la lista degli Item
ShowMachiningList()
@@ -138,33 +168,222 @@ Public Class SplitPageUC
Dim sText As String = String.Empty
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
sText = EgtMsg(90791) & " " & i.ToString()
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
Else
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString( Mach.m_dSideAng, 2) & "°"
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
End If
If Mach.m_bPause Then AddPauseText(sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
If Mach.m_bPause Then AddPauseText(sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
If Mach.m_bPause Then AddPauseText( sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
If Mach.m_bPause Then AddPauseText(sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
If Mach.m_bPause Then AddPauseText(sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
If Mach.m_bPause Then AddPauseText(sText)
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
End If
Next
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
If Not m_bActive OrElse m_bShow Then Return
' Si può selezionare solo con il tasto sinistro e se stato NULL
If e.Button <> Windows.Forms.MouseButtons.Left Or
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
Return
End If
' Reset drag
m_nDragInd = -1
m_nDragType = 0
' Reset selection interface
m_nSelected = GDB_ID.NULL
' Verifico se selezionato estremo di taglio con lama
EgtSetObjFilterForSelWin(False, True, False, False, False)
Dim nSel As Integer
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
' Verifico sia un attacco o uscita di taglio con lama
Dim nType As Integer = 0
Dim sName As String = ""
EgtGetName(nId, sName)
If String.Compare(sName, NAME_PV_PRECUT) = 0 Then
nType = 1
ElseIf String.Compare(sName, NAME_PV_POSTCUT) = 0 Then
nType = 2
ElseIf String.Compare(sName, NAME_PV_CUT) = 0 Then
nType = 3
End If
If nType = 1 Or nType = 2 Then
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
Dim nMchId As Integer = GDB_ID.NULL
If EgtGetInfo(nPvId, "MId", nMchId) Then
For nInd As Integer = 0 To m_MachiningList.Count() - 1
If m_MachiningList(nInd).m_nId = nMchId Then
m_nDragInd = nInd
m_nDragType = nType
End If
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
m_nDragInd = nInd
m_nDragType = nType
Exit For
End If
Next
If m_nDragInd >= 0 Then
' Assegno l'id dell'elemnto selezionato
m_nSelected = m_nDragInd
Exit For
End If
Next
End If
If m_nDragInd >= 0 Then
' Assegno l'id dell'elemnto selezionato
m_nSelected = m_nDragInd
Exit While
End If
ElseIf nType = 3 Then
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
Dim nMchId As Integer = GDB_ID.NULL
If EgtGetInfo(nPvId, "MId", nMchId) Then
For nInd As Integer = 0 To m_MachiningList.Count() - 1
If m_MachiningList(nInd).m_nId = nMchId Then
m_nSelected = nInd
End If
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
m_nSelected = nInd
Exit For
End If
Next
If m_nSelected >= 0 Then Exit For
Next
End If
If m_nSelected >= 0 Then Exit While
End If
nId = EgtGetNextObjInSelWin()
End While
' Sistemazioni per drag
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
MachiningLsBx.SelectedIndex = m_nSelected
Else
m_nDragInd = -1
m_nDragType = 0
m_nSelected = GDB_ID.NULL
End If
End Sub
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
If Not m_bActive OrElse m_bShow Then Return
' Se drag non abilitato o in corso
If m_nDragInd = -1L Or m_bDragging Then Return
m_bDragging = True
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' Ricavo il vettore di movimento e la variazione di lunghezza
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
If m_nDragType = 1 Then
Dim dOrigUsal As Double = 0
Dim dUsal As Double
' ----------------------- REPEAT -----------------------
Do
dDelta = -dDelta
' Leggo il valore salvato nella geometria
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
dUsal = dOrigUsal + dDelta
' Se c'è limite alla lunghezza libera
If m_MachiningList(m_nDragInd).m_dStartFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUsal = Math.Min(dUsal, m_MachiningList(m_nDragInd).m_dStartFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
m_bDragging = False
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
' ----------------------- REPEAT (solo se il segmento scompare) -----------------------
Else
Dim dOrigUeal As Double = 0
Dim dUeal As Double
dDelta = -dDelta
Do
dDelta = -dDelta
' Leggo il valore salvato nella geometria
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
dUeal = dOrigUeal + dDelta
' Se c'è limite alla lunghezza libera
If m_MachiningList(m_nDragInd).m_dEndFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUeal = Math.Min(dUeal, m_MachiningList(m_nDragInd).m_dEndFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
m_bDragging = False
Return
End If
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
End If
' verifico interferenza
EgtVerifyMachining(m_MachiningList(m_nDragInd).m_nId, m_MachiningList(m_nDragInd).m_nInterf)
ColorMachining(m_MachiningList(m_nDragInd))
ColorNumberArrow(m_nDragInd)
' Aggiorno visualizzazione
EgtDraw()
m_bModified = True
' Aggiorno punto e stato di drag
m_ptDragPrev = ptCurr
m_bDragging = False
End Sub
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
If Not m_bActive OrElse m_bShow Then Return
' Se drag in corso
If m_nDragInd >= 0 Then
m_nDragInd = -1
End If
End Sub
Private Sub AddPauseText(ByRef sName As String)
sName &= " " & EgtMsg(MSG_SPLITPAGEUC + 32) ' Pausa
End Sub
@@ -180,11 +399,16 @@ Public Class SplitPageUC
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
If MachiningLsBx.SelectedItems.Count = 0 Then Return
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
' creo lista ordinata dei selezionati
Dim ItemList As New List(Of NameIdLsBxItem)
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
ItemList.Add(Item)
Next
' verifico che le lavorazioni siano dello stesso tipo
VerifyHomogenousMachining(ItemList)
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(m_ItemList.IndexOf(x), m_ItemList.IndexOf(y)))
' verifico che siano contigui
Dim bContigus As Boolean = False
@@ -287,8 +511,14 @@ Public Class SplitPageUC
EgtDraw()
' Imposto flag di modifica
m_bModified = True
' Abilitazione bottone Next
EnableButtons()
' recupero l'elenco degli elementi selezionati
Dim ItemList As New List(Of NameIdLsBxItem)
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
ItemList.Add(Item)
Next
VerifyHomogenousMachining(ItemList)
End Sub
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
@@ -772,26 +1002,37 @@ Public Class SplitPageUC
bFirstInd = False
End If
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
Dim bRepeat As Boolean = False
Do
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
If bRepeat Then
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
dUsal = dOrigUsal
End If
Loop Until Not bRepeat
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
@@ -903,7 +1144,7 @@ Public Class SplitPageUC
' Recupero la lavorazione corrente
If m_CurrFirstInd = -1 Then Return
Dim bGenModif As Boolean = False
For Index As integer = m_CurrFirstInd To m_CurrLastInd
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
Dim nI As Integer = m_ItemList(Index).Ind
Dim nOperId As Integer = m_MachiningList(nI).m_nId
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
@@ -924,26 +1165,38 @@ Public Class SplitPageUC
bFirstInd = False
End If
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
Dim bRepeat As Boolean = False
Do
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
If bRepeat Then
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUeal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUeal)
dUeal = dOrigUeal
End If
Loop Until Not bRepeat
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
@@ -1027,40 +1280,40 @@ Public Class SplitPageUC
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
Dim nI As Integer = m_ItemList(Index).Ind
' Si possono invertire solo i tagli di lama
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
If m_MachiningList(nI).m_nType <> MCH_OY.SAWING Then Continue For
' Non si possono invertire i tagli di lama inclinati
If Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
If Math.Abs(m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
' Se abilitata inversione automatica e quindi non invertito
If m_MachiningList( nI).m_bEnableInvert Then
If m_MachiningList(nI).m_bEnableInvert Then
' Inverto e disabilito inversione automatica
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
m_MachiningList( nI).m_bInvert = True
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
m_MachiningList( nI).m_bEnableInvert = False
SwapStartEndData( nI)
ResetEnableInvert( m_MachiningList( nI).m_nEntId)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
m_MachiningList(nI).m_bInvert = True
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
m_MachiningList(nI).m_bEnableInvert = False
SwapStartEndData(nI)
ResetEnableInvert(m_MachiningList(nI).m_nEntId)
EgtErase(m_MachiningList(nI).m_nArrId)
NumberDirectionMachining(nI, False)
EgtDraw()
End If
' se altrimenti disabilitata inversione automatica e invertito
ElseIf m_MachiningList( nI).m_bInvert Then
' se altrimenti disabilitata inversione automatica e invertito
ElseIf m_MachiningList(nI).m_bInvert Then
' Tolgo inversione e lascio disabilitazione inv. autom.
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
m_MachiningList( nI).m_bInvert = False
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
SwapStartEndData( nI)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
m_MachiningList(nI).m_bInvert = False
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
SwapStartEndData(nI)
EgtErase(m_MachiningList(nI).m_nArrId)
NumberDirectionMachining(nI, False)
EgtDraw()
End If
' altrimenti disabilitata inversione automatica e non invertito
' altrimenti disabilitata inversione automatica e non invertito
Else
' Abilito inversione automatica e lascio non invertito
m_MachiningList( nI).m_bEnableInvert = True
SetEnableInvert( m_MachiningList( nI).m_nEntId)
EgtErase( m_MachiningList( nI).m_nArrId)
NumberDirectionMachining( nI, False)
m_MachiningList(nI).m_bEnableInvert = True
SetEnableInvert(m_MachiningList(nI).m_nEntId)
EgtErase(m_MachiningList(nI).m_nArrId)
NumberDirectionMachining(nI, False)
EgtDraw()
End If
Next
@@ -1122,7 +1375,7 @@ Public Class SplitPageUC
' Se fase corrente è la prima, imposto partenza normale
If m_nCurrPhase = 1 Then
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
' Altrimenti, imposto la ripartenza dalla fase corrente
' Altrimenti, imposto la ripartenza dalla fase corrente
Else
m_MainWindow.m_CurrentProjectPageUC.SetProjectNcRestart(m_nCurrPhase)
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(MSG_SPLITPAGEUC + 19) & " (" & m_nCurrPhase.ToString() & ")")
@@ -1141,7 +1394,7 @@ Public Class SplitPageUC
' Aggiorno le lavorazioni (eliminato sort per lasciare ordine immutato)
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
Dim bModif As Boolean = TestAllMachiningsForStrict()
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
End If
@@ -1151,8 +1404,13 @@ Public Class SplitPageUC
HideAllMachinings()
' Preparo la lista delle lavorazioni e le disabilito
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
m_nCountSawing = 0
m_nCountWaterjetting = 0
m_nCountOtherMachining = 0
For nI As Integer = 0 To m_MachiningList.Count() - 1
m_MachiningList(nI).m_bEnabled = False
' conto il numero di tipi di lavorazioni
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
Next
' Aggiorno visualizzazione delle lavorazioni
EgtEmptyGroup(m_nNbrGrpId)
@@ -1171,6 +1429,7 @@ Public Class SplitPageUC
End Sub
Private Sub SplitPageUC_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
m_bActive = False
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
ExitSplit(Not m_bToNext)
EgtDraw()
@@ -1338,6 +1597,86 @@ Public Class SplitPageUC
ModifEndBtn.IsEnabled = Not m_bShow
InvertBtn.IsEnabled = Not m_bShow
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining) Then
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
Else
VisibilityButtonFromMachinig(MCH_OY.SAWING)
End If
End Sub
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
Return
End If
Dim nSawing As Integer = 0
Dim nWaterjetting As Integer = 0
Dim nOtherMachining As Integer = 0
' conto il numero di tipi di lavprazioni
For Each Item As NameIdLsBxItem In ItemList
If Item.Type = MCH_OY.SAWING Then
nSawing += 1
ElseIf Item.Type = MCH_OY.WATERJETTING Then
nWaterjetting += 1
Else
nOtherMachining += 1
End If
Next
' verifico se le lavorazioni sono omeogenee
If nSawing > 0 And (nWaterjetting > 0 Or nOtherMachining > 0) Then
m_bAreHomogeneous = False
VisibilityButtonFromMachinig(MCH_OY.SAWING)
ElseIf nSawing = 0 And nOtherMachining > 0 And nWaterjetting > 0 Then
m_bAreHomogeneous = False
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
Else
VisibilityButtonFromMachinig(ItemList(0).Type)
m_bAreHomogeneous = True
End If
' eventualmente stampo messaggio
If Not m_bAreHomogeneous Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Lavorazioni non omogenee")
Else
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
End If
End Sub
Private Sub VisibilityButtonFromMachinig(ByVal Type As Integer)
If Type <> MCH_OY.SAWING Then
CutBtn.Visibility = Visibility.Hidden
CutStartBtn.Visibility = Visibility.Hidden
CutEndBtn.Visibility = Visibility.Hidden
OutCenStartBtn.Visibility = Visibility.Hidden
OutCenEndBtn.Visibility = Visibility.Hidden
InvertBtn.Visibility = Visibility.Hidden
PauseBtn.Visibility = Visibility.Hidden
AllOutStartBtn.Visibility = Visibility.Hidden
AllCenStartBtn.Visibility = Visibility.Hidden
AllOutEndBtn.Visibility = Visibility.Hidden
AllCenEndBtn.Visibility = Visibility.Hidden
AllExtendBtn.Visibility = Visibility.Hidden
AllReduceBtn.Visibility = Visibility.Hidden
Else
CutBtn.Visibility = Visibility.Visible
CutStartBtn.Visibility = Visibility.Visible
CutEndBtn.Visibility = Visibility.Visible
OutCenStartBtn.Visibility = Visibility.Visible
OutCenEndBtn.Visibility = Visibility.Visible
InvertBtn.Visibility = Visibility.Visible
PauseBtn.Visibility = Visibility.Visible
AllOutStartBtn.Visibility = Visibility.Visible
AllCenStartBtn.Visibility = Visibility.Visible
AllOutEndBtn.Visibility = Visibility.Visible
AllCenEndBtn.Visibility = Visibility.Visible
AllExtendBtn.Visibility = Visibility.Visible
AllReduceBtn.Visibility = Visibility.Visible
End If
End Sub
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
@@ -1572,6 +1911,7 @@ Public Class SplitPageUC
Private m_nInd As Integer
Private m_sName As String
Private m_bIsActive As Boolean
Private m_nType As Integer
Public Property Ind As Integer
Get
@@ -1606,10 +1946,20 @@ Public Class SplitPageUC
End Set
End Property
Sub New(Name As String, Ind As Integer, bIsActive As Boolean)
Public Property Type As Integer
Get
Return m_nType
End Get
Set(value As Integer)
m_nType = value
End Set
End Property
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
Me.m_sName = Name
Me.m_nInd = Ind
Me.m_bIsActive = bIsActive
Me.m_nType = nType
End Sub
Public Sub NotifyPropertyChanged(propName As String)
+1
View File
@@ -205,6 +205,7 @@ Module ConstGen
Public Const INFO_DEPTH As String = "Depth"
Public Const INFO_WIDTH As String = "Width"
Public Const INFO_DEPTH2 As String = "Depth2"
Public CONST INFO_AGG2 As String = "Agg2"
' Info in entità da tagliare per taglio ristretto
Public Const INFO_STRICT As String = "Strict"
' Info in entità da tagliare per angolo di lato e tallone
+4 -22
View File
@@ -281,32 +281,14 @@ Public Class AlzFrontUC
' restituisce vero se il lato possiede delle info legate al sideangle
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
Dim sInfoSideAngle As String = String.Empty
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
If Not String.IsNullOrWhiteSpace(sInfoSideAngle) Or Not String.IsNullOrEmpty(sInfoSideAngle) Then
' verifico che il dato salvato sia un double
Try
Dim dSideAngle As Double = 0
StringToDouble(sInfoSideAngle, dSideAngle)
If dSideAngle <> 0 Then
Return True
End If
Catch ex As Exception
End Try
End If
Return False
Dim dSideAngle As Double
return EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, dSideAngle)
End Function
' restituisce vero se il lato possiede delle info legate alle alette
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
Dim sInfoAlzFront As String = String.Empty
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
If sInfoAlzFront.Trim <> "0" Then
Return True
End If
End If
Return False
Dim nAlzFront As Integer
return EgtGetInfo(nCurrLine, INFO_ALZFRONT, nAlzFront) AndAlso nAlzFront <> 0
End Function
' approvo la costruzione dell'aletta sul lato indicato
+1 -1
View File
@@ -159,7 +159,7 @@ Module SideAngle
Return True
End Function
Private Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
Friend Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
' Verifiche
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
' Calcolo dimensione ingombro Loop
+1
View File
@@ -809,6 +809,7 @@
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</Button>
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
+13 -5
View File
@@ -119,6 +119,14 @@ Public Class AlarmsPageUC
' Variabile che accorcia il riferimento alla macchina corrente
m_CurrentMachine = m_MainWindow.m_CurrentMachine
' in assenza dell'uscita H1 nascondo i parametri lama
If EgtGetHeadId("H1") = GDB_ID.NULL Then
SawGpBx.Visibility = Visibility.Hidden
TopMillGpBx.Visibility = Visibility.Hidden
CurrSawTxBl.Visibility = Visibility.Hidden
CurrSawCmBx.Visibility = Visibility.Hidden
End If
' Verifico la configurazione della macchina per creare i combobox
Select Case m_CurrentMachine.MountedToolConfig
Case CurrentMachine.MountedToolConfigs.SAW
@@ -133,7 +141,7 @@ Public Class AlarmsPageUC
' Disattivo il gruppo dei parametri fori
HolesGpBx.Visibility = Windows.Visibility.Hidden
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
'Non faccio alcunchè
'Non faccio alcunchè
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
'Da implementare
End Select
@@ -152,7 +160,7 @@ Public Class AlarmsPageUC
' Se non previsti tagli waterjet, disabilito relativo box
If Not m_CurrentMachine.bWaterJetting Then
WJsParamGpBx.Visibility = Visibility.Hidden
WjsParamGpBx.Visibility = Visibility.Hidden
End If
' Abilitazione box per contorni grezzo da foto
@@ -165,7 +173,7 @@ Public Class AlarmsPageUC
End If
' Abilitazione Feed ridotta su inizio/fine tagli
If m_CurrentMachine.bFsevEnable Then
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
CutFredGpBx.Visibility = Windows.Visibility.Visible
Else
CutFredGpBx.Visibility = Windows.Visibility.Hidden
@@ -180,8 +188,8 @@ Public Class AlarmsPageUC
m_bFirst = False
End If
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
' Seleziono lama corrente
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
+2 -1
View File
@@ -1139,7 +1139,8 @@ Class MainWindow
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
' Aggiorno interfaccia
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso (EgtGetHeadId("H1") <> GDB_ID.NULL)
DirectCutBtn.IsEnabled = (EgtGetHeadId("H1") <> GDB_ID.NULL)
End Sub
' Nomi dei file per OmagVIEW
+3 -3
View File
@@ -22,7 +22,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyProduct("OmagCUT")>
<Assembly: AssemblyCopyright("Copyright © 2015-2021 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.12.1")>
<Assembly: AssemblyFileVersion("2.3.12.1")>
<Assembly: AssemblyVersion("2.4.1.1")>
<Assembly: AssemblyFileVersion("2.4.1.1")>
+8
View File
@@ -1209,6 +1209,14 @@
<Setter Property="Width" Value="80"/>
<Setter Property="Keyboard" Value="Calculator"/>
<Setter Property="KeyboardDimension" Value="300"/>
<Setter Property="IsHitTestVisible" Value="False" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type ListBoxItem}, AncestorLevel=1}}"
Value="True">
<Setter Property="IsHitTestVisible" Value="True" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
+2
View File
@@ -622,6 +622,8 @@ Public Class CurrentProjectPageUC
File.Copy(sPhoto, sNewPhoto, True)
Catch ex As FileNotFoundException
' non è un problema
Catch ex As DirectoryNotFoundException
' non è un problema
Catch ex As Exception
Return False
End Try
+6
View File
@@ -60,6 +60,12 @@ Public Class ChooseMachining
Private Sub InitializeMachiningLists()
' in assenza dell'uscita H1 nascondo i parametri lama
If EgtGetHeadId("H1") = GDB_ID.NULL Then
CurrSawingTxBl.Visibility = Visibility.Hidden
CurrSawingCmBx.Visibility = Visibility.Hidden
End If
' -- TAGLIO --
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
' aggiungo un campo vuoto
+37 -20
View File
@@ -964,13 +964,21 @@ Public Class RawPartPageUC
m_nPtMode = If(AddBtn.IsChecked, PTMODE.ADD, PTMODE.MOVE)
Case RAWMODE.FROM_LASER
Dim ptAcquired As Point3d
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
ptAcquired = m_ptPrev
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
ElseIf Not AcquireLaserPoint(ptAcquired) Then
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
' Se inserimento manuale dei punti laser
If m_bFromDraw Then
If Not IsNothing(m_ptPrev) Then
ptAcquired = m_ptPrev
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
Else
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
Return
End If
' altrimenti da macchina
Else
If Not AcquireLaserPoint(ptAcquired) Then
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
Return
End If
End If
' Limito il punto a stare nella tavola con franco pari al kerf
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
@@ -1014,13 +1022,21 @@ Public Class RawPartPageUC
m_nPtDmgMode = DMGMODE.NONE
Case RAWMODE.DAMAGED_BY_LASER
Dim ptAcquired As Point3d
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
ptAcquired = m_ptPrev
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
ElseIf Not AcquireLaserPoint(ptAcquired) Then
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
' Se inserimento manuale dei punti laser
If m_bFromDraw Then
If Not IsNothing(m_ptPrev) Then
ptAcquired = m_ptPrev
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
Else
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
Return
End If
' altrimenti da macchina
Else
If Not AcquireLaserPoint(ptAcquired) Then
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
Return
End If
End If
' Limito il punto a stare nella tavola con franco pari al kerf
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
@@ -1062,8 +1078,11 @@ Public Class RawPartPageUC
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
Return False
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_CurrentMachine.sCurrSaw
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
Dim nExit As Integer = 0
EgtGetCalcTool(sTool, sHead, nExit)
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then
Return False
@@ -1072,10 +1091,8 @@ Public Class RawPartPageUC
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
Return False
End If
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then
Return False
End If
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Porto il tip nell'origine tavola
ptAcquired = ptTipP1
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB