Compare commits

..

26 Commits

Author SHA1 Message Date
NicolaP 17f41f1563 Correzione angolo previlegiato di deposito 2023-02-08 12:15:04 +01:00
NicolaP 6a17b88283 Inizio correzione gestione scarico frointale 2023-02-07 12:51:48 +01:00
NicolaP 6f248ec645 Merge branch 'Features/Manage_Quality_WJ' into develop 2023-02-06 17:26:38 +01:00
NicolaP 17d6ced974 Merge branch 'Features/Manage_New_Param_WaterJet_DB' into develop 2023-02-03 16:00:44 +01:00
NicolaP db145af965 Gestione spessore materiali inch 2023-02-03 16:00:26 +01:00
NicolaP 037fdb41b6 Gestione dati frazionati nella pagina Waterjet 2023-02-02 15:52:56 +01:00
NicolaP f89fe7fefd Aggiunta colonna AngCompensazione in DB WaterJet 2023-02-01 17:44:34 +01:00
NicolaP 6ecbd7f545 Cambio versione 2023-01-30 15:52:30 +01:00
NicolaP 734f480f67 Migliorata reset posizione pezzi in park 2023-01-30 15:07:23 +01:00
NicolaP 87fa5cc6dd Correzione gestione altezza AlzFront in Inch 2023-01-30 14:08:54 +01:00
NicolaP 5b00409abe Merge branch 'Features/Manage_Inches_Fractions' into develop 2023-01-27 17:16:10 +01:00
NicolaP 800a589285 Merge branch 'master' into develop 2023-01-23 09:17:19 +01:00
NicolaP 2618d3f14c Migliorata gestione visualizzazione ScrapWindow 2023-01-23 09:17:02 +01:00
NicolaP bb32a4e500 Aggiunto messaggio & cleanup 2023-01-20 12:33:02 +01:00
NicolaP 6d266819db Migliorato passaggio da 0° a 360° 2023-01-20 12:16:56 +01:00
NicolaP 3ce8965206 Migliorata gestione rotazione pezzi 2023-01-20 10:07:06 +01:00
NicolaP d924f4c107 Gestione rotazione pezzi con Drag 2023-01-19 18:06:21 +01:00
NicolaP b141bda34d Merge branch 'develop' 2023-01-18 18:05:09 +01:00
NicolaP ecb599c5c1 Correzione gestione allungamento tagli curvi 2023-01-18 16:51:22 +01:00
NicolaP 957a012de5 Merge branch 'master' into develop 2023-01-18 14:37:47 +01:00
NicolaP 12277387b6 Merge remote-tracking branch 'origin/HEAD' 2023-01-18 11:34:47 +01:00
DarioS ac92d1b4df OmagCUT :
- aggiornamento info programma.
2023-01-18 09:17:01 +01:00
NicolaP 202a63329b Merge branch 'develop' 2023-01-05 18:08:12 +01:00
NicolaP 61bb35fda2 Merge branch 'develop' 2023-01-03 17:36:41 +01:00
NicolaP 4432893794 Gestione definizione qualità nella pagina split 2022-12-28 19:25:59 +01:00
NicolaP 9fa98d78a5 Merge branch 'develop' 2022-12-28 17:34:43 +01:00
20 changed files with 583 additions and 212 deletions
+8
View File
@@ -27,6 +27,14 @@
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
+41 -1
View File
@@ -1,6 +1,7 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib
Imports System.Collections.ObjectModel
Public Class EditValueWD
@@ -8,10 +9,14 @@ Public Class EditValueWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_sMsg As String = "Value"
Private m_sValue As String = ""
Private m_sList As ObservableCollection(Of String)
Private m_IsText As Boolean = True
' avvia la visualizzazione della textbox
Sub New(Owner As Window, Optional sMsg As String = "")
Me.Owner = Owner
m_sMsg = sMsg
m_IsText = True
InitializeComponent()
End Sub
@@ -21,11 +26,20 @@ Public Class EditValueWD
Else
m_sValue = DoubleToString(dVal, 3)
End If
ValueTxBx.Text = m_sValue
Return True
End Function
' avvia la visualizzazione della combobox
Sub New(Owner As Window, sList As ObservableCollection(Of String), Optional sMsg As String = "")
Me.Owner = Owner
m_sMsg = sMsg
m_IsText = False
InitializeComponent()
m_sList = sList
SetComboBox(m_sList)
End Sub
Friend Function GetVal(Optional ByVal bLen As Boolean = False) As Double
Dim dVal As Double = 0
If bLen Then
@@ -36,10 +50,36 @@ Public Class EditValueWD
Return dVal
End Function
Friend Function SetComboBox(sList As ObservableCollection(Of String)) As Boolean
ValueCmBx.ItemsSource = sList
Return True
End Function
Friend Function SetItemComboBox(sItem As String) As Boolean
For Each MyItem As String In ValueCmBx.ItemsSource
If MyItem = sItem Then
ValueCmBx.SelectedItem = MyItem
End If
Next
Return True
End Function
Friend Function GetItemComboBox() As String
Dim sVal As String = ValueCmBx.SelectedItem
Return sVal
End Function
Private Sub EditValueWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
ValueTxbl.Text = m_sMsg
If m_IsText Then
ValueCmBx.Visibility = Visibility.Collapsed
ValueTxBx.Visibility = Visibility.Visible
Else
ValueCmBx.Visibility = Visibility.Visible
ValueTxBx.Visibility = Visibility.Collapsed
End If
End Sub
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
+21 -4
View File
@@ -329,6 +329,8 @@ Public Class MoveRawPartPage
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
' se su scarico frontale allora devo modificare la scelta delle ventose
VacuumCups.bUnloadingOnAuxTab = m_SplitPage.m_bOnAuxTab
If PutVacuumCupsOnRaw(nId, rmData) Then
' Visualizzo le ventose
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
@@ -837,6 +839,7 @@ Public Class MoveRawPartPage
EgtGetRawPartCenter(nRawId, ptRawCen)
' Sposto il grezzo in battuta sul corner
Dim dAngRaw As Double = 0
Dim dNewAngRot As Double = 0
Dim AngRotList As New List(Of Double)
@@ -877,12 +880,16 @@ Public Class MoveRawPartPage
' sposto il pezzo in questa posizione
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
' riprovo il movimento
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
dNewAngRot = GetPrefRotAng(dAngRaw)
'dNewAngRot = DeltaAngC
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dNewAngRot) Then
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
' riposiziono il pezzo come era prima
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
EgtDraw()
Return
End If
dAngRaw = dNewAngRot
Else
Return
End If
@@ -908,17 +915,18 @@ Public Class MoveRawPartPage
End If
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
End While
' Determino il movimento effettuato
Dim ptNewRawCen As Point3d
EgtGetRawPartCenter(nRawId, ptNewRawCen)
' Se tutto bene, aggiorno lista movimenti
If bRawOk Then
AddRawMoveData(nRawId, ptNewRawCen - ptRawCen, m_RawMoveDataList)
If dAngRaw <> 0 Then AddRawMoveData(nRawId, -dAngRaw, m_RawMoveDataList)
If dAngRaw <> 0 Then AddRawMoveData(nRawId, dAngRaw, m_RawMoveDataList)
' altrimenti annullo il movimento
Else
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
End If
' Disabilito pezzo e nascondo le ventose
@@ -991,6 +999,15 @@ Public Class MoveRawPartPage
Return True
End Function
' determino la migliore rotazione per portare il pezzo in orizzontale
Private Function GetPrefRotAng(ByVal dAngDeg As Double) As Double
Dim dNewAngDeg As Double = -dAngDeg
If dAngDeg > 90 And dAngDeg < 270 Then
dNewAngDeg = 180 - dAngDeg
End If
Return dNewAngDeg
End Function
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
If m_RawMoveDataList.Count = 0 Then Return
+1 -1
View File
@@ -8,7 +8,7 @@
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
<!-- Definizione della NestPage -->
<Grid Name="NestPageGrid" >
<Grid Name="NestPageGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
+226 -98
View File
@@ -62,6 +62,14 @@ Public Class NestPageUC
Private m_bMaximizeMove As Boolean = False
Private m_dAngStep As Double = 0
Private m_bReducedCut As Boolean = False
Private m_bKeyCtrlPressed As Boolean = False
Private m_bKeyLeftShiftPressed As Boolean = False
Private m_dAngTotal As Double = 0
Private m_dStartAng As Double = 0
Private m_bStartRot As Boolean = False
Private m_bStartMove As Boolean = False
' Dati per tolleranza spessore Trf
Private m_dTrfThickTolerance As Double = 0
' Dati movimento registrazione grezzo
@@ -94,6 +102,7 @@ Public Class NestPageUC
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
DragRettanleBtn.ToolTip = "Strech"
Dim nColumsIn_UG1 As Integer = 2
' gestisco la visualizzazione del comando PAN (per il drag dei rettangoli)
@@ -1053,7 +1062,9 @@ Public Class NestPageUC
m_locPrev = e.Location
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
m_bDragToStart = m_bDrag
' attivo la modalità di traslazione e rotazione senza cltrollo collisioni (solo in fase di Drag)
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
m_bKeyLeftShiftPressed = m_bVerify
m_vtTotMove = Vector3d.NULL()
End Sub
@@ -1116,51 +1127,114 @@ Public Class NestPageUC
m_bVerify = True
m_bFromParking = True
End If
' Inizio esecuzione di drag
m_bDragging = True
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' Ricavo il vettore di movimento
Dim vtMove As Vector3d = ptCurr - m_ptPrev
' Muovo i pezzi selezionati di quanto possibile
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
' Se movimento con sola verifica finale
If m_bVerify Then
EgtMove(nMoveId, vtMove)
m_vtTotMove += vtMove
' altrimenti caso con verifica durante il movimento
Else
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' muovo il pezzo
EgtMovePart(nMoveId, m_bReducedCut, vtMove)
EgtSaveCollInfo()
' se movimento risultante nullo, provo con movimento tangente
Dim bTgMoved As Boolean = False
If vtMove.IsSmall() Then
' riprovo con movimento tangente
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
EgtTgMovePartOnCollision(nMoveId, m_bReducedCut, vtTgMove)
bTgMoved = (Not vtTgMove.IsSmall())
End If
' se abilitato magnetico (allineamento + snap), lo provo
Dim bAlignMoved As Boolean = False
Dim bSnapMoved As Boolean = False
If m_bMagnetic Then
If Not GetLockOnRotation(nMoveId) Then
EgtAlignPartOnCollision(nMoveId, m_bReducedCut, bAlignMoved)
End If
If m_dSnapDist > EPS_SMALL Then
EgtRestoreCollInfo()
EgtMovePartToSnapPointOnCollision(nMoveId, m_bReducedCut, m_dSnapDist, bSnapMoved)
End If
End If
m_CurrProjPage.ResetOrderMachiningFlag()
' la rotazione è attivabile solo se premuto il tasto Ctrl (e non sono in parheggio)
m_bKeyCtrlPressed = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Control) > 0
'-------------Inizio ROTAZIONE ----------------
If m_bKeyCtrlPressed AndAlso (Not m_bFromParking OrElse m_bKeyLeftShiftPressed) Then
' Calcolo il centro di rotazione come centro del cluster
Dim ptCen As Point3d
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
' definisco il vettore dal centro del pezzo alla posizione del cursore
Dim vtCurr As Vector3d = ptCurr - ptCen
Dim dLen, dHAng, dVAng As Double
' recupero l'angolo orizzontale del vettore
vtCurr.ToSpherical(dLen, dHAng, dVAng)
If Not m_bStartRot Then
m_dAngTotal = 0
' notifico una rotazione
m_bStartRot = True
m_dStartAng = dVAng
End If
EgtDraw()
' Eventuale notifica al VeinMatching
Dim dDeltaAng As Double = dVAng - m_dStartAng
' gestione del passaggio da 0° → 360° evitando mantenendo la visualizzazione fluida
If Math.Abs(dDeltaAng) > 90 Then
If m_dStartAng < 180 And dVAng > 180 Then
dDeltaAng = dVAng - 360 - m_dStartAng
ElseIf m_dStartAng > 180 And dVAng < 180 Then
dDeltaAng = dVAng - m_dStartAng + 360
End If
End If
' Rotazione del pezzo attorno al suo centro
If Math.Abs(dDeltaAng) > EPS_ANG_SMALL Then
' se il tasto Shift è premuto (disabilitato il controllo collisioni durante il Drag)
If m_bKeyLeftShiftPressed Then
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), dDeltaAng, GDB_RT.GLOB)
m_dAngTotal += dDeltaAng
Else
' esegue la rotazione fino ad incontrare un altro pezzo
RotatePartInsideBond(dDeltaAng, nMoveId)
m_CurrProjPage.ResetOrderMachiningFlag()
' Eventuale notifica al VeinMatching
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
VeinMatching.OnMovePartInRaw(nId)
nId = EgtGetNextSelectedObj()
End While
End If
m_dStartAng = dVAng
End If
'-------------Fine ROTAZIONE ----------------
Else
' -------------Inizio TRASLAZIONE ---------------
' Ricavo il vettore di movimento
Dim vtMove As Vector3d = ptCurr - m_ptPrev
' Muovo i pezzi selezionati di quanto possibile
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
' notifico una traslazione
If Not m_bStartMove Then
m_bStartMove = True
End If
' Se movimento con sola verifica finale (disabilitato il controllo collisioni durante il Drag)
If m_bVerify Then
EgtMove(nMoveId, vtMove)
m_vtTotMove += vtMove
' altrimenti caso con verifica durante il movimento
Else
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' muovo il pezzo
EgtMovePart(nMoveId, m_bReducedCut, vtMove)
EgtSaveCollInfo()
' se movimento risultante nullo, provo con movimento tangente
Dim bTgMoved As Boolean = False
If vtMove.IsSmall() Then
' riprovo con movimento tangente
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
EgtTgMovePartOnCollision(nMoveId, m_bReducedCut, vtTgMove)
bTgMoved = (Not vtTgMove.IsSmall())
End If
' se abilitato magnetico (allineamento + snap), lo provo
Dim bAlignMoved As Boolean = False
Dim bSnapMoved As Boolean = False
If m_bMagnetic Then
If Not GetLockOnRotation(nMoveId) Then
EgtAlignPartOnCollision(nMoveId, m_bReducedCut, bAlignMoved)
End If
If m_dSnapDist > EPS_SMALL Then
EgtRestoreCollInfo()
EgtMovePartToSnapPointOnCollision(nMoveId, m_bReducedCut, m_dSnapDist, bSnapMoved)
End If
End If
m_CurrProjPage.ResetOrderMachiningFlag()
End If
' -------------Fine TRASLAZIONE ---------------
End If
End If
EgtDraw()
' Eventuale notifica al VeinMatching
If m_bStartMove OrElse m_bStartRot Then
If nMoveId = GDB_ID.SEL Then
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
@@ -1171,6 +1245,7 @@ Public Class NestPageUC
VeinMatching.OnMovePartInRaw(nMoveId)
End If
End If
' Aggiorno il punto precedente
m_ptPrev = ptCurr
' Terminata esecuzione di drag
@@ -1202,47 +1277,31 @@ Public Class NestPageUC
' Se eseguito drag
If Not m_bDragToStart Then
' Se movimento con sola verifica finale
If m_bVerify Then
' Determino cosa verificare
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' Eseguo verifica
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
m_CurrProjPage.ResetOrderMachiningFlag()
' Non superata riporto alla posizione iniziale
' Se movimento con sola verifica finale ----- TRASLAZIONE
If Not m_bStartRot And m_bStartMove Then
VerifyMove()
' Se movimento con sola verifica finale ----- TRASLAZIONE + ROTAZIONE
ElseIf m_bStartRot And m_bStartMove Then
If Not m_bFromParking Then
VerifyRot()
Else
If m_bFromParking Then
m_CurrProjPage.ClearMessage()
PreRemoveOnePart(nMoveId)
VeinMatching.OnRemovePartFromRaw(nMoveId)
Else
EgtMove(nMoveId, -m_vtTotMove)
' Eventuale notifica al VeinMatching
If nMoveId = GDB_ID.SEL Then
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
VeinMatching.OnMovePartInRaw(nId)
nId = EgtGetNextSelectedObj()
End While
Else
VeinMatching.OnMovePartInRaw(nMoveId)
End If
End If
'---------------------- COUNTER PART ----------------------
Dim sRefGroup As String = String.Empty
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
' accendo il layer che contiene il contatore (spento in fase di Drag)
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
' aggiorno il layer che indica il numero di pezzi in parcheggio
CountPartInFamily(sRefGroup)
End If
'---------------------- COUNTER PART ----------------------
' forzo il reset delle info di rotazione
m_dStartAng = 0
m_dAngTotal = 0
m_bStartRot = False
End If
VerifyMove()
' verifico se la posizione finale della rotazione è corretta ----- ROTAZIONE
ElseIf m_bStartRot And Not m_bStartMove Then
If m_bFromParking Then
VerifyMove()
' forzo il reset delle info di rotazione
m_dStartAng = 0
m_dAngTotal = 0
m_bStartRot = False
Else
VerifyRot()
End If
m_bFromParking = False
' altrimenti caso con verifica durante il movimento
Else
' Basta reset alla fine
@@ -1306,6 +1365,70 @@ Public Class NestPageUC
EgtDraw()
End Sub
Private Sub VerifyMove()
If m_bVerify Then
' Determino cosa verificare
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' Eseguo verifica
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
m_CurrProjPage.ResetOrderMachiningFlag()
' Non superata riporto alla posizione iniziale
Else
If m_bFromParking Then
m_CurrProjPage.ClearMessage()
PreRemoveOnePart(nMoveId)
VeinMatching.OnRemovePartFromRaw(nMoveId)
Else
EgtMove(nMoveId, -m_vtTotMove)
' Eventuale notifica al VeinMatching
If nMoveId = GDB_ID.SEL Then
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
VeinMatching.OnMovePartInRaw(nId)
nId = EgtGetNextSelectedObj()
End While
Else
VeinMatching.OnMovePartInRaw(nMoveId)
End If
End If
'---------------------- COUNTER PART ----------------------
' solo se pezzo disposto in tavola
If m_bFromParking Then
Dim sRefGroup As String = String.Empty
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
' accendo il layer che contiene il contatore (spento in fase di Drag)
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
' aggiorno il layer che indica il numero di pezzi in parcheggio
CountPartInFamily(sRefGroup)
End If
End If
'---------------------- COUNTER PART ----------------------
End If
m_bFromParking = False
End If
End Sub
Private Sub VerifyRot()
' se comando Shift è stato attivato
If m_bKeyLeftShiftPressed Then
' Determino cosa verificare
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
If Not EgtVerifyPart(nMoveId, m_bReducedCut) Then
Dim ptCen As Point3d
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), -m_dAngTotal, GDB_RT.GLOB)
End If
End If
' resetto i valori
m_dStartAng = 0
m_dAngTotal = 0
m_bStartRot = False
End Sub
Friend Function SelectPart(nPartId As Integer, bNotifyVM As Boolean) As Boolean
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
' Determino se pezzo in tavola o in parcheggio
@@ -1577,7 +1700,7 @@ Public Class NestPageUC
If m_nPartPos <> PART_POS.IN_TABLE Then
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
' Se pezzo con rotazione libera
' Se pezzo con rotazione libera (in parcheggio)
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
' Calcolo il centro di rotazione come centro del pezzo
Dim ptCen As Point3d
@@ -1613,25 +1736,30 @@ Public Class NestPageUC
Return True
' Altrimenti li ruoto tenendo conto delle collisioni
Else
' Verifico se ci sono dei pezzi bloccati in rotazione
Dim bLockedRot As Boolean = GetLockOnRotation(GDB_ID.SEL)
' Se tutti i pezzi possono ruotare
If Not bLockedRot Then
' Calcolo il centro di rotazione come centro del cluster
Dim ptCen As Point3d
If Not EgtGetPartPartClusterCenterGlob(GDB_ID.SEL, ptCen) Then Return False
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' Verifico rotazione complessiva
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
If EgtVerifyPart(GDB_ID.SEL, m_bReducedCut) Then Return True
' Provo rotazione parziale (dopo aver annullato la complessiva)
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
Return EgtRotatePart(GDB_ID.SEL, m_bReducedCut, ptCen, dAngRotDeg)
Else
Return False
End If
Return RotatePartInsideBond(dAngRotDeg, GDB_ID.SEL)
End If
End Function
' verifica che la rotazione sia ammessa
Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean
' Verifico se ci sono dei pezzi bloccati in rotazione
Dim bLockedRot As Boolean = GetLockOnRotation(nIdMove)
' Se tutti i pezzi possono ruotare
If Not bLockedRot Then
' Calcolo il centro di rotazione come centro del cluster
Dim ptCen As Point3d
If Not EgtGetPartPartClusterCenterGlob(nIdMove, ptCen) Then Return False
' Aggiorno regioni per nesting
UpdateNestRegions()
EnableReferenceRegion(False)
' Verifico rotazione complessiva
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
If EgtVerifyPart(nIdMove, m_bReducedCut) Then Return True
' Provo rotazione parziale (dopo aver annullato la complessiva)
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
Return EgtRotatePart(nIdMove, m_bReducedCut, ptCen, dAngRotDeg)
Else
Return False
End If
End Function
+9 -8
View File
@@ -98,14 +98,15 @@ Public Module SplitAuto
Mach.m_dStartFreeLen = FREELEN_INF + 1
Mach.m_dEndFreeLen = FREELEN_INF + 1
Dim nEntId, nSub As Integer
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
Mach.m_bEnableInvert = GetEnableInvert( nEntId)
EgtMidVector( nEntId, GDB_ID.ROOT, Mach.m_vtDir)
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
Mach.m_nEntId = nEntId
End If
+11 -3
View File
@@ -132,23 +132,31 @@
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<!--solo per macchine con lavorazioni Waterjet-->
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
+126 -74
View File
@@ -978,6 +978,54 @@ Public Class SplitPageUC
End If
End Sub
Private Sub QualityWJBtn_Click(Sender As Object, e As RoutedEventArgs) Handles QualityWJBtn.Click
Dim bFirstWJ As Boolean = True
Dim sQuality As String = String.Empty
' Recupero la lavorazione corrente
If m_CurrFirstInd = -1 Then Return
Dim bGenModif As Boolean = False
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
If Not m_ItemList(Index).IsSelected Then
Continue For
End If
Dim nI As Integer = m_ItemList(Index).Ind
Dim nOperId As Integer = m_MachiningList(nI).m_nId
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
' se altrimenti getto d'acqua
If nMachiningType = MCH_MY.WATERJETTING Then
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
If bFirstWJ Then
EgtSetCurrMachining(nOperId)
' Dialogo richiesta valore
Dim ValWnd As New EditValueWD(m_MainWindow, m_MainWindow.m_CurrentMachine.Qualities, "Quality")
If EgtGetInfo(nOperId, "Quality", sQuality) Then
ValWnd.SetItemComboBox(sQuality)
Else
ValWnd.SetItemComboBox(m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality)
End If
If Not ValWnd.ShowDialog() Then Return
sQuality = ValWnd.GetItemComboBox
' comunico che ho letto il primo dato
bFirstWJ = False
End If
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
EgtSetInfo(nOperId, "Quality", sQuality)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
bGenModif = True
End If
Next
' Se modificato qualcosa
If bGenModif Then
EgtDraw()
m_bModified = True
End If
End Sub
Private Function AdjustBothCuts(nI As Integer,
Optional bAllForced As Boolean = False,
Optional bAccForced As Boolean = False) As Boolean
@@ -1960,7 +2008,7 @@ Public Class SplitPageUC
Dim MyCuts As New List(Of Integer)
For nI As Integer = 0 To m_MachiningList.Count() - 1
If m_MachiningList(nI).m_bEnabled And
( m_MachiningList(nI).m_sLay = NAME_OUTLOOP Or m_MachiningList(nI).m_sLay = NAME_INLOOP) Then
(m_MachiningList(nI).m_sLay = NAME_OUTLOOP Or m_MachiningList(nI).m_sLay = NAME_INLOOP) Then
MyCuts.Add(m_MachiningList(nI).m_nId)
End If
Next
@@ -1972,7 +2020,7 @@ Public Class SplitPageUC
PrevBtn.IsEnabled = (m_nCurrPhase > 1)
' Per bottone NEXT
' Se abilitato manipolatore e non è con waterjet
If ( m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_MANIP) Or
If (m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_MANIP) Or
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP)) And
Not m_MainWindow.m_CurrentMachine.bWaterJetting Then
' Se in modifica
@@ -2034,6 +2082,7 @@ Public Class SplitPageUC
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
BridgesWJBtn.IsEnabled = Not m_bShow
BridgesDeleteWJBtn.IsEnabled = Not m_bShow
QualityWJBtn.IsEnabled = Not m_bShow
' 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
@@ -2153,13 +2202,16 @@ Public Class SplitPageUC
If CutStartBtn.Visibility = Visibility.Hidden Then
BridgesWJBtn.Visibility = Visibility.Visible
BridgesDeleteWJBtn.Visibility = Visibility.Visible
QualityWJBtn.Visibility = Visibility.Visible
Else
BridgesWJBtn.Visibility = Visibility.Hidden
BridgesDeleteWJBtn.Visibility = Visibility.Hidden
QualityWJBtn.Visibility = Visibility.Hidden
End If
Else
BridgesWJBtn.Visibility = Visibility.Hidden
BridgesDeleteWJBtn.Visibility = Visibility.Hidden
QualityWJBtn.Visibility = Visibility.Hidden
End If
End Sub
@@ -2181,7 +2233,7 @@ Public Class SplitPageUC
Return True
End Function
Private Sub NumberDirectionMachining( nI As Integer, Optional bNumber As Boolean = True)
Private Sub NumberDirectionMachining(nI As Integer, Optional bNumber As Boolean = True)
EgtDisableModified()
' Determino se seconda lavorazione
Dim sName As String = String.Empty
@@ -2215,28 +2267,28 @@ Public Class SplitPageUC
End If
If bNumber Then
Dim nNbrId As Integer = EgtCreateTextAdv( m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
Dim nNbrId As Integer = EgtCreateTextAdv(m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
300, False, dHtxt, dRat, 0, INS_POS.MC)
m_MachiningList(nI).m_nNbrId = nNbrId
' Aggiungo a numero info con identificativo della lavorazione e viceversa
EgtSetInfo( nNbrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo( m_MachiningList(nI).m_nId, "NbrId", nNbrId)
EgtSetInfo(nNbrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo(m_MachiningList(nI).m_nId, "NbrId", nNbrId)
End If
' Se taglio con lama, metto la direzione accanto al numero
If m_MachiningList(nI).m_nType = MCH_OY.SAWING Then
Dim ptStart As New Point3d( ptCen + m_MachiningList(nI).m_vtDir * dHtxt)
Dim vtDir As New Vector3d( m_MachiningList(nI).m_vtDir)
Dim bTwin As Boolean = ( Not m_MachiningList(nI).m_bEnableInvert OrElse Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1)
Dim nArrId As Integer = AddMachiningDirection( ptStart, vtDir, dHtxt, bTwin)
Dim ptStart As New Point3d(ptCen + m_MachiningList(nI).m_vtDir * dHtxt)
Dim vtDir As New Vector3d(m_MachiningList(nI).m_vtDir)
Dim bTwin As Boolean = (Not m_MachiningList(nI).m_bEnableInvert OrElse Math.Abs(m_MachiningList(nI).m_dSideAng) > 0.1)
Dim nArrId As Integer = AddMachiningDirection(ptStart, vtDir, dHtxt, bTwin)
m_MachiningList(nI).m_nArrId = nArrId
' Aggiungo a freccia info con identificativo della lavorazione e viceversa
EgtSetInfo( nArrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo( m_MachiningList(nI).m_nId, "ArrId", nArrId)
EgtSetInfo(nArrId, "MId", m_MachiningList(nI).m_nId)
EgtSetInfo(m_MachiningList(nI).m_nId, "ArrId", nArrId)
Else
m_MachiningList(nI).m_nArrId = GDB_ID.NULL
End If
' Assegno colore a numero e freccia
ColorNumberArrow( nI)
ColorNumberArrow(nI)
EgtEnableModified()
End Sub
@@ -2298,18 +2350,18 @@ Public Class SplitPageUC
Return True
End Function
Private Function AddMachiningDirection( ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
Dim dArrX As Double = dLen * Math.Cos( 30 * Math.PI / 180)
Dim dArrY As Double = dLen * Math.Sin( 30 * Math.PI / 180)
Dim nTmpId As Integer = EgtCreateLine( m_nNbrGrpId, Point3d.ORIG() + dArrY * Vector3d.Y_AX(), Point3d.ORIG() + dArrX * Vector3d.X_AX())
Dim nCrvId As Integer = EgtCreateCurveCompo( m_nNbrGrpId, nTmpId, True)
EgtAddCurveCompoLine( nCrvId, Point3d.ORIG() - dArrY * Vector3d.Y_AX())
Private Function AddMachiningDirection(ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
Dim dArrX As Double = dLen * Math.Cos(30 * Math.PI / 180)
Dim dArrY As Double = dLen * Math.Sin(30 * Math.PI / 180)
Dim nTmpId As Integer = EgtCreateLine(m_nNbrGrpId, Point3d.ORIG() + dArrY * Vector3d.Y_AX(), Point3d.ORIG() + dArrX * Vector3d.X_AX())
Dim nCrvId As Integer = EgtCreateCurveCompo(m_nNbrGrpId, nTmpId, True)
EgtAddCurveCompoLine(nCrvId, Point3d.ORIG() - dArrY * Vector3d.Y_AX())
If bTwin Then
EgtAddCurveCompoLine( nCrvId, Point3d.ORIG() + 2 * dArrX * Vector3d.X_AX())
EgtCloseCurveCompo( nCrvId)
EgtAddCurveCompoLine(nCrvId, Point3d.ORIG() + 2 * dArrX * Vector3d.X_AX())
EgtCloseCurveCompo(nCrvId)
End If
Dim frLoc As New Frame3d( ptStart, vtDir, Vector3d.Z_AX() ^ vtDir, Vector3d.Z_AX())
EgtTransform( nCrvId, frLoc)
Dim frLoc As New Frame3d(ptStart, vtDir, Vector3d.Z_AX() ^ vtDir, Vector3d.Z_AX())
EgtTransform(nCrvId, frLoc)
Return nCrvId
End Function
@@ -2340,35 +2392,35 @@ Public Class SplitPageUC
Private Sub MarkNumberArrow(nI As Integer, bMark As Boolean)
If nI < 0 Then Return
Dim nNbrId As Integer = m_MachiningList(nI).m_nNbrId
Dim nArrId As Integer = m_MachiningList( nI).m_nArrId
Dim nArrId As Integer = m_MachiningList(nI).m_nArrId
If bMark Then
EgtSetMark( nNbrId)
EgtSetMark( nArrId)
EgtSetMark(nNbrId)
EgtSetMark(nArrId)
Else
EgtResetMark( nNbrId)
EgtResetMark( nArrId)
EgtResetMark(nNbrId)
EgtResetMark(nArrId)
End If
End Sub
Private Sub ColorNumberArrow( nI As Integer)
Private Sub ColorNumberArrow(nI As Integer)
If nI < 0 Then Return
Dim nNbrId As Integer = m_MachiningList( nI).m_nNbrId
Dim nArrId As Integer = m_MachiningList( nI).m_nArrId
If m_MachiningList( nI).m_bEnabled Then
If m_MachiningList( nI).m_nInterf = FMI_TYPE.NONE Then
EgtSetColor( nNbrId, COL_MCH_FREE)
EgtSetColor( nArrId, COL_MCH_FREE)
Dim nNbrId As Integer = m_MachiningList(nI).m_nNbrId
Dim nArrId As Integer = m_MachiningList(nI).m_nArrId
If m_MachiningList(nI).m_bEnabled Then
If m_MachiningList(nI).m_nInterf = FMI_TYPE.NONE Then
EgtSetColor(nNbrId, COL_MCH_FREE)
EgtSetColor(nArrId, COL_MCH_FREE)
Else
EgtSetColor( nNbrId, COL_MCH_INTERF)
EgtSetColor( nArrId, COL_MCH_INTERF)
EgtSetColor(nNbrId, COL_MCH_INTERF)
EgtSetColor(nArrId, COL_MCH_INTERF)
End If
Else
If m_MachiningList( nI).m_nInterf = FMI_TYPE.NONE Then
EgtResetColor( nNbrId)
EgtResetColor( nArrId)
ElseIf Not m_MachiningList( nI).m_bEnabled Then
EgtSetColor( nNbrId, COL_MCH_DIS_INTERF)
EgtSetColor( nArrId, COL_MCH_DIS_INTERF)
If m_MachiningList(nI).m_nInterf = FMI_TYPE.NONE Then
EgtResetColor(nNbrId)
EgtResetColor(nArrId)
ElseIf Not m_MachiningList(nI).m_bEnabled Then
EgtSetColor(nNbrId, COL_MCH_DIS_INTERF)
EgtSetColor(nArrId, COL_MCH_DIS_INTERF)
End If
End If
End Sub
@@ -2394,38 +2446,38 @@ Public Class SplitPageUC
EgtEnableModified()
End Sub
Private Sub SwapStartEndData( nI As Integer)
Private Sub SwapStartEndData(nI As Integer)
' Swap angoli precedente e successivo
Dim dAng As Double = m_MachiningList( nI).m_dPrevAng
m_MachiningList( nI).m_dPrevAng = m_MachiningList( nI).m_dNextAng
m_MachiningList( nI).m_dNextAng = dAng
Dim dAng As Double = m_MachiningList(nI).m_dPrevAng
m_MachiningList(nI).m_dPrevAng = m_MachiningList(nI).m_dNextAng
m_MachiningList(nI).m_dNextAng = dAng
' Swap lunghezze libere
Dim dFreeLen As Double = m_MachiningList( nI).m_dStartFreeLen
m_MachiningList( nI).m_dStartFreeLen = m_MachiningList( nI).m_dEndFreeLen
m_MachiningList( nI).m_dEndFreeLen = dFreeLen
Dim dFreeLen As Double = m_MachiningList(nI).m_dStartFreeLen
m_MachiningList(nI).m_dStartFreeLen = m_MachiningList(nI).m_dEndFreeLen
m_MachiningList(nI).m_dEndFreeLen = dFreeLen
' Swap stato di allungamento
Dim bAll As Boolean = m_MachiningList( nI).m_bStartAll
m_MachiningList( nI).m_bStartAll = m_MachiningList( nI).m_bEndAll
m_MachiningList( nI).m_bEndAll = bAll
Dim bAll As Boolean = m_MachiningList(nI).m_bStartAll
m_MachiningList(nI).m_bStartAll = m_MachiningList(nI).m_bEndAll
m_MachiningList(nI).m_bEndAll = bAll
' Swap possibilità di allungamento
Dim bCanAll As Boolean = m_MachiningList( nI).m_bCanStartAll
m_MachiningList( nI).m_bCanStartAll = m_MachiningList( nI).m_bCanEndAll
m_MachiningList( nI).m_bCanEndAll = bCanAll
Dim bCanAll As Boolean = m_MachiningList(nI).m_bCanStartAll
m_MachiningList(nI).m_bCanStartAll = m_MachiningList(nI).m_bCanEndAll
m_MachiningList(nI).m_bCanEndAll = bCanAll
' Swap stato interferenza
if ( m_MachiningList( nI).m_nInterf And FMI_TYPE.LI) <> 0 And ( m_MachiningList( nI).m_nInterf And FMI_TYPE.LO) = 0 Then
m_MachiningList( nI).m_nInterf -= FMI_TYPE.LI
m_MachiningList( nI).m_nInterf += FMI_TYPE.LO
ElseIf ( m_MachiningList( nI).m_nInterf And FMI_TYPE.LI) = 0 And ( m_MachiningList( nI).m_nInterf And FMI_TYPE.LO) <> 0 Then
m_MachiningList( nI).m_nInterf += FMI_TYPE.LI
m_MachiningList( nI).m_nInterf -= FMI_TYPE.LO
If (m_MachiningList(nI).m_nInterf And FMI_TYPE.LI) <> 0 And (m_MachiningList(nI).m_nInterf And FMI_TYPE.LO) = 0 Then
m_MachiningList(nI).m_nInterf -= FMI_TYPE.LI
m_MachiningList(nI).m_nInterf += FMI_TYPE.LO
ElseIf (m_MachiningList(nI).m_nInterf And FMI_TYPE.LI) = 0 And (m_MachiningList(nI).m_nInterf And FMI_TYPE.LO) <> 0 Then
m_MachiningList(nI).m_nInterf += FMI_TYPE.LI
m_MachiningList(nI).m_nInterf -= FMI_TYPE.LO
End If
' Swap Allungamento Utente
Dim dOrigUsal As Double = 0
EgtGetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_SAL, dOrigUsal)
EgtGetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_SAL, dOrigUsal)
Dim dOrigUeal As Double = 0
EgtGetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_EAL, dOrigUeal)
EgtSetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_SAL, dOrigUeal)
EgtSetInfo( m_MachiningList( nI).m_nId, INFO_MCH_USER_EAL, dOrigUsal)
EgtGetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_EAL, dOrigUeal)
EgtSetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_SAL, dOrigUeal)
EgtSetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_EAL, dOrigUsal)
End Sub
'-----------------------------------------------------------------------------------------------
@@ -2455,10 +2507,10 @@ Public Class SplitPageUC
Return m_sName
End Get
Set(value As String)
If value <> m_sName Then
m_sName = value
NotifyPropertyChanged("Name")
End If
If value <> m_sName Then
m_sName = value
NotifyPropertyChanged("Name")
End If
End Set
End Property
@@ -2467,10 +2519,10 @@ Public Class SplitPageUC
Return m_bIsActive
End Get
Set(value As Boolean)
If value <> m_bIsActive Then
m_bIsActive = value
NotifyPropertyChanged("bIsActive")
End If
If value <> m_bIsActive Then
m_bIsActive = value
NotifyPropertyChanged("bIsActive")
End If
End Set
End Property
+12 -6
View File
@@ -96,8 +96,14 @@ Public Class AlzFrontUC
Dim LabelId As Integer = GDB_ID.NULL
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
Dim sVal As String = String.Empty
Dim dVal As Double = 0
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
Utility.StringToDouble(sVal, dVal)
Parameter1ATxBx.Text = Utility.LenToString(dVal, 4)
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
Utility.StringToDouble(sVal, dVal)
Parameter1FTxBx.Text = Utility.LenToString(dVal, 4)
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
@@ -607,9 +613,9 @@ Public Class AlzFrontUC
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
' Nuovo angolo di inclinazione
Dim dValue As Double
StringToDouble(Parameter1ATxBx.Text, dValue)
StringToLen(Parameter1ATxBx.Text, dValue)
' salvo il valore nel file ini e inserisco il valore nel file lua
WritePrivateProfileString("Alz&Front", "A_Height", Parameter1ATxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString("Alz&Front", "A_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
' aggiorno il disegno
LoadCurrentCompo()
End Sub
@@ -618,9 +624,9 @@ Public Class AlzFrontUC
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
' Nuovo angolo di inclinazione
Dim dValue As Double
StringToDouble(Parameter1FTxBx.Text, dValue)
StringToLen(Parameter1FTxBx.Text, dValue)
' salvo il valore nel file ini e inserisco il valore nel file lua
WritePrivateProfileString("Alz&Front", "F_Height", Parameter1FTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString("Alz&Front", "F_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
' aggiorno il disegno
LoadCurrentCompo()
End Sub
+4 -1
View File
@@ -1414,7 +1414,10 @@ Public Class CurrentMachine
If bFound Then Exit For
Next
End If
Return dMaxThick
' il valore resituito è già nell'unità corrente del programma -> converto il dato in mm
Dim dValmm As Double = 0
StringToLen(DoubleToString(dMaxThick, 3), dValmm)
Return dValmm
End Function
#Region "USERNOTE"
+2 -2
View File
@@ -899,11 +899,11 @@ Public Class MachiningDbPageUC
For Each Material As MachiningMaterial In m_MaterialsList
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
If Material.bIsActive Then
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
End If
Else
If Material.bIsActive Then
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
End If
End If
Next
+19 -9
View File
@@ -162,6 +162,7 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
@@ -185,12 +186,19 @@
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="7" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
</Grid>
</GroupBox.Header>
<!--Definizione della Grid dei parametri delle lavorazioni-->
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="308*"/>
<ColumnDefinition Width="73*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
@@ -201,7 +209,7 @@
ItemsSource="{Binding Path=SelectedItem.ParamList , ElementName=SubMaterialsLstBx}"
SelectedItem="{Binding Path=SelectedItem.SelWjParam , ElementName=SubMaterialsLstBx}"
Margin="0,0,0,0"
Grid.RowSpan="2">
Grid.RowSpan="2" Grid.ColumnSpan="2">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="700">
@@ -213,29 +221,31 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="7" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="3">
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
<Button Name="NewParamBtn" Grid.Column="0"
Command="{Binding NewWjParamCommand}"
Content="{Binding New_Msg}"
+51
View File
@@ -14,12 +14,20 @@ Public Class WaterJetPageUC
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
'----------------------------------------------------------------------------------------
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
ConvertParamListValueToFracrion()
'----------------------------------------------------------------------------------------
Me.DataContext = m_refWaterjetDbWindowVM
EgtWPFLib.Utility.MainWindow = m_MainWindow
End Sub
Public Sub WaterJetPage_Reinitialize()
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
'----------------------------------------------------------------------------------------
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
ConvertParamListValueToFracrion()
'----------------------------------------------------------------------------------------
Me.DataContext = m_refWaterjetDbWindowVM
End Sub
@@ -51,5 +59,48 @@ Public Class WaterJetPageUC
End If
End Sub
Private Sub ConvertParamListValueToFracrion()
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
Dim Index1 As Integer = 0
For Index1 = 0 To m_refWaterjetDbWindowVM.MaterialList.Count - 1
Dim Index2 As Integer = 0
For Index2 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList.Count - 1
Dim Index3 As Integer = 0
For Index3 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList.Count - 1
Dim dThickness As Double
Dim dQ1 As Double
Dim dQ2 As Double
Dim dQ3 As Double
Dim dQ4 As Double
Dim dQ5 As Double
Dim dQExtra As Double
Dim dAngComp As Double
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Thickness, dThickness)
Dim sVal As String = LenToString(dThickness, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetThickness(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q1, dQ1)
sVal = LenToString(dQ1, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ1(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q2, dQ2)
sVal = LenToString(dQ2, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ2(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q3, dQ3)
sVal = LenToString(dQ3, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ3(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q4, dQ4)
sVal = LenToString(dQ4, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ4(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q5, dQ5)
sVal = LenToString(dQ5, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ5(sVal)
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).QExtra, dQExtra)
sVal = LenToString(dQExtra, 3)
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQExtra(sVal)
StringToDouble(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).dAngComp, dAngComp)
Next
Next
Next
End Sub
End Class
+25 -1
View File
@@ -445,6 +445,12 @@ Public Class WaterjetDbWindowVM
End Get
End Property
Public ReadOnly Property AngComp_Msg As String
Get
Return "Ang"
End Get
End Property
Public ReadOnly Property New_Msg As String
Get
Return "Nuovo"
@@ -516,7 +522,14 @@ Public Class WaterjetDbWindowVM
StringToDouble(sParams(4), dQ4)
StringToDouble(sParams(5), dQ5)
StringToDouble(sParams(6), dQExtra)
QParamList.Add(New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV))
Dim LocalWjParam As New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV)
QParamList.Add(LocalWjParam)
' leggo il nuovo parametro di correzione conicità (di default il parametro è 0)
If sParams.Length() >= 8 Then
Dim dAngCompo As Double
StringToDouble(sParams(7), dAngCompo)
LocalWjParam.dAngComp = dAngCompo
End If
End If
QInd += 1
End While
@@ -868,6 +881,17 @@ Public Class WjParam
End Set
End Property
' angolo di compensazione conicità getto: 01/02/2023 ver 2.5b1
Private m_dAngComp As Double = 0
Public Property dAngComp As Double
Get
Return m_dAngComp
End Get
Set(value As Double)
m_dAngComp = value
End Set
End Property
Public ReadOnly Property ParamLstBx_Width As Double
Get
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
+4 -4
View File
@@ -20,9 +20,9 @@ Imports System.Windows
<Assembly: AssemblyTitle("OmagCUTR32.exe")>
<Assembly: AssemblyDescription("OmagCUT 32 bit")>
#End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("OmagCUT")>
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2015-2023 by Egalware 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.5.1.1")>
<Assembly: AssemblyFileVersion("2.5.1.1")>
<Assembly: AssemblyVersion("2.5.1.2")>
<Assembly: AssemblyFileVersion("2.5.1.2")>
+3
View File
@@ -1319,6 +1319,9 @@
<ItemGroup>
<Resource Include="Resources\NewIcons\Parking.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Quality.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
+1
View File
@@ -221,6 +221,7 @@
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="PonticelliWJImg" UriSource="Resources/NewIcons/Ponticelli.png"></BitmapImage>
<BitmapImage x:Key="PonticelliDeleteWJImg" UriSource="Resources/NewIcons/Ponticelli_delete.png"></BitmapImage>
<BitmapImage x:Key="QualityWJImg" UriSource="Resources/NewIcons/Quality.png"></BitmapImage>
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
+18
View File
@@ -357,6 +357,12 @@ Public Class OptionsPageUC
' Aggiorno dati nella pagina dipendenti da unità di misura
UpdateSlabDxf()
UpdateAllCSTA()
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
End If
End If
End Sub
Private Sub FractionPatternCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles FractionPatternCmBx.SelectionChanged
@@ -366,6 +372,12 @@ Public Class OptionsPageUC
' Aggiorno dati nella pagina dipendenti da unità di misura
UpdateSlabDxf()
UpdateAllCSTA()
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
End If
End If
End Sub
Private Sub PrecisionCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PrecisionCmBx.SelectionChanged
@@ -374,6 +386,12 @@ Public Class OptionsPageUC
' Aggiorno dati nella pagina dipendenti da unità di misura
UpdateSlabDxf()
UpdateAllCSTA()
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
End If
End If
End Sub
Private Sub ThemesCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ThemesCmBx.SelectionChanged
+1
View File
@@ -101,6 +101,7 @@ Public Class OmagPhotoWD
Dim m_refImagePrevieV As New EgtPHOTOLib.ImagePreviewV()
' modifico l'immagine e salvo
m_refImagePrevieV.SetContourScraps(m_ContornScrap)
m_refImagePrevieV.Hide()
m_refImagePrevieV.Show()
m_refImagePrevieV.SaveImage()
m_refImagePrevieV.Close()
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB