Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6a9cac6b4 | |||
| 4ce898c25c | |||
| 6f59cddd80 | |||
| c8b018f6df | |||
| e287e827c4 | |||
| 68e9a9201d | |||
| 8946bf3a00 | |||
| a15acb6528 | |||
| e7e9d26b75 | |||
| d9de23daca | |||
| ad5c9331ba | |||
| b67330b509 | |||
| ca66108145 | |||
| 379ccc7519 | |||
| b751c27773 | |||
| 14e1c254f0 | |||
| 6f08e5f520 | |||
| 7d8933cc39 | |||
| 2179996bff | |||
| 316bcc89ea | |||
| 17f41f1563 | |||
| 6a17b88283 | |||
| ce151e5db7 | |||
| b303fe2615 | |||
| 6f248ec645 | |||
| 3e0d43c1d8 | |||
| 70b1822446 | |||
| 17d6ced974 | |||
| db145af965 | |||
| 037fdb41b6 | |||
| f89fe7fefd | |||
| 6ecbd7f545 | |||
| 734f480f67 | |||
| 87fa5cc6dd | |||
| 5b00409abe | |||
| 800a589285 | |||
| 2618d3f14c | |||
| bb32a4e500 | |||
| 6d266819db | |||
| 3ce8965206 | |||
| d924f4c107 | |||
| b141bda34d | |||
| ecb599c5c1 | |||
| 957a012de5 | |||
| 12277387b6 | |||
| ac92d1b4df | |||
| 202a63329b | |||
| 61bb35fda2 | |||
| 4432893794 | |||
| 9fa98d78a5 |
@@ -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*"/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -837,6 +837,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 +878,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 +913,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 +997,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
|
||||
|
||||
@@ -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*"/>
|
||||
|
||||
+227
-99
@@ -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
|
||||
@@ -1294,8 +1353,8 @@ Public Class NestPageUC
|
||||
VeinMatching.OnDeselectPart(m_nIdToDesel)
|
||||
End If
|
||||
|
||||
|
||||
' Reset
|
||||
GetFamilyGroupInPark()
|
||||
m_bDrag = False
|
||||
m_nIdToSel = GDB_ID.NULL
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
|
||||
+17
-6
@@ -546,16 +546,27 @@ Module VacuumCups
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
' Posizione Home dell'asse rotante
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
' Corse dell'asse
|
||||
Dim dCMin As Double
|
||||
EgtGetAxisMin("C", dCMin)
|
||||
Dim dCMax As Double
|
||||
EgtGetAxisMax("C", dCMax)
|
||||
' Porto l'angolo nel range
|
||||
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||
' Imposto la ventosa come fosse un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
' Calcolo gli assi macchina
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
|
||||
@@ -583,7 +583,7 @@ Public Class SingleCutUC
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
' se è impostata una lavorazione di lama
|
||||
' Se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
@@ -599,9 +599,12 @@ Public Class SingleCutUC
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
|
||||
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then
|
||||
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+17
-2
@@ -38,6 +38,8 @@ Class MainWindow
|
||||
Friend m_MachinePageUC As MachinePageUC
|
||||
Friend m_OptionsPageUC As OptionsPageUC
|
||||
|
||||
Friend m_IsClosingApplication As Integer = 0
|
||||
|
||||
' Dichiarazione variabili direttori
|
||||
Private m_sExeRoot As String = String.Empty
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
@@ -326,8 +328,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2501, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2501, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -1085,6 +1087,19 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SaveNamedProject()
|
||||
m_CurrentProjectPageUC.SaveProject()
|
||||
End If
|
||||
' Inizio la chiusura del programma (verifico di aver terminato il processo DripFeed)
|
||||
EgtOutLog("Iniziato processo di chiusura programma")
|
||||
m_IsClosingApplication = 1
|
||||
Dim nCount As Integer = 0
|
||||
While m_IsClosingApplication <> 2
|
||||
If nCount > 5 Then
|
||||
Exit While
|
||||
End If
|
||||
' verifico che il processo DripFeed sia terminato
|
||||
EgtOutLog("Stato chiusura programma: " & m_IsClosingApplication.ToString)
|
||||
Thread.Sleep(100)
|
||||
nCount += 1
|
||||
End While
|
||||
' Uscita
|
||||
MainWindowExit()
|
||||
End Sub
|
||||
|
||||
@@ -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.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.Globalization
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.Num
|
||||
|
||||
Public Class CNCommunication
|
||||
|
||||
@@ -354,8 +355,8 @@ Public Class CNCommunication
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
||||
End If
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
|
||||
Catch ex As Exception
|
||||
' set status to statusbar
|
||||
@@ -496,6 +497,7 @@ Public Class CNCommunication
|
||||
If m_CN.read_active_mode() <> m_nCurrMode Then
|
||||
m_nCurrMode = m_CN.read_active_mode()
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
m_CN.nMachineMode = m_nCurrMode
|
||||
End If
|
||||
Case 2
|
||||
If m_CN.nMachineMode <> m_nCurrMode Then
|
||||
@@ -619,12 +621,17 @@ Public Class CNCommunication
|
||||
End If
|
||||
|
||||
' Nuove bottoni (Power Macchina)
|
||||
If m_IsNewConsole AndAlso m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
@@ -907,28 +914,51 @@ Public Class CNCommunication
|
||||
End If
|
||||
' Se richiesta successiva attivazione, faccio reset
|
||||
If bActivate Then
|
||||
EgtOutLog("Call function: DGeneralFunctions_Reset")
|
||||
TimeSpanInit()
|
||||
m_CN.DGeneralFunctions_Reset()
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
End If
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nResetSendDelay)
|
||||
If m_nNCType = 1 Then
|
||||
' Cancellazione eventuale file già presente con lo stesso nome (ignoro eventuale errore)
|
||||
EgtOutLog("Delete_NC_prog(sNumProg)")
|
||||
TimeSpanInit()
|
||||
m_CN.Delete_NC_prog(sNumProg)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
End If
|
||||
EgtOutLog("Download_NC_prog(sCncPath, sNumProg)")
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
EgtOutLog("Nc Type : " & m_nNCType.ToString)
|
||||
EgtOutLog("IsDripFeed : " & DirectCast(m_CN, NumNCOld).bIsDripFeed)
|
||||
If m_nNCType = 1 AndAlso TypeOf m_CN Is NumNCOld AndAlso DirectCast(m_CN, NumNCOld).bIsDripFeed Then
|
||||
' eventauli cambi di stato sono trattati all'interno della funzione
|
||||
Return True
|
||||
End If
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Se richiesta attivazione
|
||||
If bActivate Then
|
||||
' Attivazione programma
|
||||
EgtOutLog("ActivateProgram(nNumProg)")
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Modalità automatica
|
||||
EgtOutLog("DGeneralFunctions_WriteCncMode(0)")
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
End If
|
||||
|
||||
' Messaggio con risultato
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90317)) 'Programma CN trasmesso con successo
|
||||
|
||||
+946
-786
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
@@ -478,7 +480,6 @@ Public Class ProjectMgrUC
|
||||
If Not (m_CurrMachine.bProdLine Or m_CurrMachine.bDemo) Then
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.5 KiB |
+20
-2
@@ -1,4 +1,5 @@
|
||||
Imports System.Globalization
|
||||
Imports System.Diagnostics
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports EgtWPFLib
|
||||
@@ -17,8 +18,25 @@ Module Utility
|
||||
End Function
|
||||
|
||||
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
Friend Sub UpdateUI()
|
||||
Friend StopWatch As Stopwatch
|
||||
|
||||
Friend Sub TimeSpanInit()
|
||||
StopWatch = New Stopwatch
|
||||
StopWatch.Start()
|
||||
End Sub
|
||||
|
||||
Friend Function TimeSpanEnd()
|
||||
Dim sTime As String = ""
|
||||
If Not IsNothing(StopWatch) Then
|
||||
StopWatch.Stop()
|
||||
Dim ts As TimeSpan = StopWatch.Elapsed
|
||||
sTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds)
|
||||
End If
|
||||
Return sTime
|
||||
End Function
|
||||
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
Friend Sub UpdateUI()
|
||||
' Costringo ad aggiornare UI
|
||||
Dim nDummy As Integer
|
||||
Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background, _
|
||||
|
||||
Reference in New Issue
Block a user