Compare commits

...

22 Commits

Author SHA1 Message Date
Nicola Pievani f3b1d80de7 Merge branch 'master' into develop 2025-03-13 11:18:49 +01:00
Nicola Pievani 14b4897575 Migliorata gestione movimento grezzo nell'area sicura 2025-03-12 17:29:04 +01:00
Nicola Pievani 213a66d916 Migliorata gestione grezzo per tagli OverZ 2025-03-12 14:45:19 +01:00
Nicola Pievani c9c7aeafae Gestione Warning da CamAuto 2025-03-11 12:09:26 +01:00
Nicola Pievani 07d54499b7 Correzione gestione cambio modo da pagina Grezzo 2025-03-10 17:58:42 +01:00
Nicola Pievani 9f266f1c56 Correzione gestione comando Manual da pagina tagli diretti 2025-03-10 16:13:36 +01:00
Nicola Pievani 48e523ce26 Merge commit 'a73b45d23ec23ddf0120a92ec35d85440229ffd0' 2025-02-24 15:33:53 +01:00
Nicola Pievani a73b45d23e Nuova gestione interasse cornici 2025-02-24 15:33:09 +01:00
Nicola Pievani 8ea607611c Gestione attesa per scatto fotografia (EnableGoHome) 2025-02-17 15:01:33 +01:00
Nicola Pievani bdf0971c20 Gestione apertura/salvataggio porgetti con multiparcheggio 2025-02-17 13:10:30 +01:00
Nicola Pievani 7d77297695 Merge branch 'develop' 2025-02-13 11:10:48 +01:00
Nicola Pievani bdcdcaecf0 Gestione sfondo dinamico PopUp viste 2025-02-12 17:51:09 +01:00
Nicola Pievani 44011c5775 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/OmagCUT into develop 2025-02-12 17:39:10 +01:00
Nicola Pievani cba095188e Migliorata gestione parcheggi in fase creazione nuovo progetto 2025-02-12 17:37:54 +01:00
Demetrio Cassarino ebedccf46a Aggiunto popup viste 2025-02-12 12:33:18 +01:00
Nicola Pievani 8bd7d9e3fa Merge branch 'develop' 2025-02-06 16:14:46 +01:00
Nicola Pievani 8dfa932bd7 Gestione SQUARING con lama 2025-02-06 16:13:33 +01:00
Nicola Pievani 5422e905e7 Aggiornamento lista materiali da DB waterjet 2025-02-06 15:59:03 +01:00
Nicola Pievani da396cc82e Merge branch 'Features/Read_C_Step' into develop 2025-02-06 15:01:08 +01:00
Nicola Pievani da8e7a9e42 Aggiornamento logo 2.7 2025-02-06 15:00:57 +01:00
Nicola Pievani d8cbe1a2c6 Aggiunto comando diretto per selezione modalità Manual 2025-02-03 11:23:40 +01:00
Nicola Pievani 79c2c17d6b Gestione taglio speciali per pezzi oltre il limite corsa in Z 2025-01-31 17:37:05 +01:00
33 changed files with 1233 additions and 745 deletions
+26 -8
View File
@@ -22,9 +22,12 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
End If
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
Return bOk
@@ -40,9 +43,12 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -60,9 +66,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -76,9 +84,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
@@ -94,9 +104,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -291,9 +303,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -307,9 +321,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -324,9 +340,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
If ResetOrderMachiningFlag Then
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
+1 -1
View File
@@ -157,7 +157,7 @@
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="ParkIndBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Name="ParkIndImg" Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
+56 -13
View File
@@ -149,15 +149,27 @@ Public Class NestPageUC
UG0.Columns = nColumnIn_UG0
' Gestione dei comandi di parcheggio e selezione (UniformGrid2)
'...
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then
EgtOutLog("Button 'EnableDXFPark' is not enable, check in file *.ini program.")
ParkIndBtn.Visibility = Visibility.Collapsed
UG2.Columns = 2
End If
End Sub
Dim ImageConverter As New ImageSourceConverter
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
m_bActive = True
LoadParams()
Dim ListparkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListparkInd)
If ListparkInd.Count > 2 Then ParkIndBtn.IsChecked = True
Dim nCpuntParkInd As Integer = UpdateImageParkInd()
If nCpuntParkInd > 2 Then
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("There are " & (nCpuntParkInd - 1).ToString & " park in project.")
EgtOutLog("WARNONG: Enable button 'EnableDXFPark' in file *.ini program.")
End If
ParkIndBtn.IsChecked = True
End If
ParkIndBtn_Click()
EgtZoom(ZM.ALL)
End Sub
@@ -230,21 +242,21 @@ Public Class NestPageUC
m_nCountSpot = 0
m_nCountSpotCUT = 0
End If
EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString)
'EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString)
' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi
If m_nCountSpot < 1 Then
UG0_Reg.IsEnabled = False
UG1_Reg.IsEnabled = False
EgtOutLog(" Abilito comandi gestione SPOT")
'EgtOutLog(" Abilito comandi gestione SPOT")
Else
UG0_Reg.IsEnabled = True
UG1_Reg.IsEnabled = True
EgtOutLog(" Disabilito comandi gestione SPOT")
'EgtOutLog(" Disabilito comandi gestione SPOT")
End If
' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli
If m_nCountSpotCUT < 1 Then
InsertSpotRegistration()
EgtOutLog(" Creo SPOT_CUT")
'EgtOutLog(" Creo SPOT_CUT")
End If
' Se necessario riabilito impostazione modificato
@@ -2810,9 +2822,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
' Aggiorno vista
EgtZoom(ZM.ALL)
' Aggiorno la lista dei parcheggi
If ParkIndBtn.IsChecked Then
m_SelParkInd.UpdateList()
End If
ReloadListParkInd()
End Sub
' ripulisco la lista dei pezzi in parcheggio
@@ -2985,8 +2995,39 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
If ParkIndBtn.IsChecked Then
m_SelParkInd.UpdateList()
End If
UpdateImageParkInd()
End Sub
' Aggiorna immagine e restituisce il numero di parcheggi (+1) disponibili (+1 perchè conto anche il comando All_Off)
Private Function UpdateImageParkInd() As Integer
' Carcico la lista dei parcheggi
Dim ListparkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListparkInd)
Dim nCount As Integer = ListparkInd.Count
' Se il comando è abilitato allora provvedo ad aggiornare l'immagine
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
Dim s As String = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Parking.png"
If nCount > 1 Then
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Busy.png"
Else
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Empty.png"
End If
ParkIndImg.Source = ImageConverter.ConvertFromString(s)
Else
' Se il comando non è abilitato allora provvedo a selezionare il primo parcheggio
Dim CurrparkInd As ParkInd = SelParkIndWD.GetCurrentParkIndSelected()
If Not IsNothing(CurrparkInd) Then
SelParkIndWD.SetStatusPartInParkInd(CurrparkInd, True)
Else
If nCount > 1 Then
ListparkInd(1).Status = GDB_ST.ON_
SelParkIndWD.SetStatusPartInParkInd(ListparkInd(1), True)
End If
End If
End If
Return nCount
End Function
Private Sub DeleteBridgeAssociated(nMyId As Integer)
' verifico se esistono dei ponticelli associati al pezzo indicato
' recuoero il gruppo di lavorazione corrente
@@ -3107,17 +3148,18 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
End Sub
Private Sub ParkIndBtn_Click() Handles ParkIndBtn.Click
If ParkIndBtn.Visibility = Visibility.Collapsed Then
Return
End If
If ParkIndBtn.IsChecked Then
If IsNothing(m_SelParkInd) Then
m_SelParkInd = New SelParkIndWD(m_MainWindow)
End If
'm_SelParkInd.Show()
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
m_MainWindow.m_CurrentProjectPageUC.SceneHostGrid.Children.Add(m_SelParkInd)
Else
If Not IsNothing(m_SelParkInd) Then
'm_SelParkInd.Close()
m_MainWindow.m_CurrentProjectPageUC.SceneHostGrid.Children.Remove(m_SelParkInd)
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
m_SelParkInd = Nothing
@@ -3130,6 +3172,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
If Not IsNothing(m_SelParkInd) Then
m_SelParkInd.UpdateList()
End If
UpdateImageParkInd()
End Sub
+63 -12
View File
@@ -6,13 +6,27 @@ Imports EgtUILib
Imports OmagCUT.NestPageUC
Public Class SelParkIndWD
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_ParkIndList As New List(Of ParkInd)
Private m_nCtx As Integer = -1
Public Const nIndAllOff As Integer = 999
Sub New(Owner As Window)
Public Shared sActualProj As String = String.Empty
Private m_ParkIndList As New List(Of ParkInd)
Public Property ParkIndList As List(Of ParkInd)
Get
Return m_ParkIndList
End Get
Set(value As List(Of ParkInd))
m_ParkIndList = value
End Set
End Property
Sub New(Owner As Window, Optional nCtx As Integer = -1)
'Me.Owner = Owner
InitializeComponent()
If nCtx > -1 Then m_nCtx = nCtx
End Sub
Public Sub Me_Laoded() Handles Me.Loaded
@@ -24,7 +38,7 @@ Public Class SelParkIndWD
Public Sub UpdateList()
' Carico lista dei pezzi
LoadParkInd(m_ParkIndList)
LoadParkInd(m_ParkIndList, m_nCtx)
ParkIndListBox.ItemsSource = m_ParkIndList
UpdateDefaultSelection()
' Forzo l'aggiornamento della grafica
@@ -82,19 +96,19 @@ Public Class SelParkIndWD
End While
' Assegno lo stato del parcheggio a tutti i pezzi i parcheggio
If bFound Then
SetStatusPartInParkInd(localParkInd)
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
Else
' Significa che i pezzi sono tutti in macchina: quindi i pezzi sono (SICURAMENTE?) accesi
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
localParkInd.Status = OppositStat
SetStatusPartInParkInd(localParkInd)
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
End If
' Se accendo un parcheggio procedo a spegnere tutto gli atri
If localParkInd.Status = GDB_ST.ON_ Then
For Each ItemParkInd As ParkInd In m_ParkIndList
If localParkInd.Ind <> ItemParkInd.Ind Then
ItemParkInd.Status = GDB_ST.OFF
SetStatusPartInParkInd(ItemParkInd)
SetStatusPartInParkInd(ItemParkInd, True, m_nCtx)
End If
Next
End If
@@ -104,11 +118,12 @@ Public Class SelParkIndWD
#Region "METODI SHARED per gestione della lista parcheggi"
' Restituisce il primo indice di parcheggio libero
Public Shared Function NewParkInd() As Integer
Public Shared Function NewParkInd(Optional nCtx As Integer = -1) As Integer
' recupero il contesto corrente
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim LastParkInd As Integer = 0
Dim nRawId As Integer = GetCurrentRaw()
@@ -144,12 +159,13 @@ Public Class SelParkIndWD
End Function
' Gestisce lo stato dei pezzi associati al parcheggio indicato
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True)
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True, Optional nCtx As Integer = -1)
If IsNothing(localParkInd) Then Return
' recupero il contesto corrente
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim nRawId As Integer = GetCurrentRaw()
' Pezzi in tavola
@@ -182,7 +198,7 @@ Public Class SelParkIndWD
End Sub
' Restituuisce la lista dei parcheggi del progetto corrente
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd))
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd), Optional nCtx As Integer = -1)
If IsNothing(P_List) Then Return
P_List.Clear()
P_List.Add(New ParkInd(nIndAllOff, "All off", 0))
@@ -190,6 +206,7 @@ Public Class SelParkIndWD
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim nRawId As Integer = GetCurrentRaw()
' Pezzi in tavola
@@ -210,7 +227,7 @@ Public Class SelParkIndWD
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
If IsNothing(localParkInd) Then
Dim nStatus As Integer
EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus)
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
' EgtGetStatus(nPartId, nStatus)
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
End If
@@ -235,7 +252,7 @@ Public Class SelParkIndWD
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
If IsNothing(localParkInd) Then
Dim nStatus As Integer
EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus)
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
' EgtGetStatus(nPartId, nStatus)
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
End If
@@ -273,9 +290,43 @@ Public Class SelParkIndWD
Public Shared Function GetPathCurrProj() As String
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
Dim sParkPath As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
If Not String.IsNullOrEmpty(sActualProj) Then
Dim sDir As String = System.IO.Path.GetDirectoryName(sActualProj)
Dim sFile As String = System.IO.Path.GetFileNameWithoutExtension(sActualProj)
sParkPath = sDir & "\" & sFile & "_ParkInd_"
End If
Return sParkPath
End Function
Public Shared Sub CopyImgSvg(sNewFileName As String, Optional nCtx As Integer = -1)
If sNewFileName.EndsWith(".nge") Then
sNewFileName = sNewFileName.Remove(sNewFileName.Length - 4, 4) & "_ParkInd_"
End If
Dim Extension As String = ".svg"
If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
Dim ListParkInd As New List(Of ParkInd)
' ricarico la lista
SelParkIndWD.LoadParkInd(ListParkInd, nCtx)
'SelParkIndWD.sActualProj = Path.GetFileNameWithoutExtension(sPath)
For Each ItemParkInd As ParkInd In ListParkInd
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
Try
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
If MainWindow.m_bShowSVGParkInd Then
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
Else
If System.IO.File.Exists(sNewFile) Then
System.IO.File.Delete(sNewFile)
End If
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
End If
Catch ex As Exception
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
End Try
End If
Next
End Sub
#End Region ' Metodi Shared
End Class
@@ -338,7 +389,7 @@ Public Class ParkInd
End Set
End Property
Private m_nPartInPark As Integer = 0
Private m_nPartInPark As Integer = GDB_ST.ON_
Public Property nPartInPark As Integer
Get
Return m_nPartInPark
+2
View File
@@ -90,6 +90,7 @@ Module ConstIni
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin"
Public Const K_DISTLINE As String = "DistLine"
Public Const K_ORTOGRAPHIC As String = "OrtoGraphic"
Public Const S_ALZFRONT As String = "Alz&Front"
Public Const K_ALZFRONT As String = "Alz&Front"
@@ -211,6 +212,7 @@ Module ConstIni
Public Const K_OFFSXY As String = "OffsXY"
Public Const K_OFFSYY As String = "OffsYY"
Public Const K_OFFSXINTERY As String = "OffsYInterY"
Public Const K_OFFSXINTERYSAWTH As String = "OffsYInterYSawTh"
Public Const K_STARTTRIM As String = "StartTrim"
Public Const K_ENDTRIM As String = "EndTrim"
Public Const K_OTHERSIDE As String = "OtherSide"
+1
View File
@@ -186,6 +186,7 @@
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
Public Const K_ENABELE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
Public Const S_TOOLS As String = "Tools"
Public Const K_DRILLBIT As String = "Drillbit"
+1 -1
View File
@@ -482,7 +482,7 @@ Public Class DirectCutPageUC
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
' Imposto modalità manuale della macchina
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
Dim nResult As Short = m_MainWindow.m_DirectCutPageUC.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
End Sub
+7 -3
View File
@@ -350,6 +350,7 @@ Public Class SquaringUC
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
EgtOutLog("Curr tool type in use for squaring: " & If(nType = MCH_TY.SAW_STD, "SAW_STD", "NOT 'SAW_STD'"))
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
@@ -367,9 +368,12 @@ Public Class SquaringUC
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
If Not nType = MCH_TY.SAW_STD Then
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
EgtOutLog("Curr tool in use is not of type SAW_STD: Depth is limited to raw thickness")
End If
' Allungo la geometria
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
+2 -4
View File
@@ -1174,7 +1174,6 @@ Public Class DrawPageUC
If m_ActiveComponentPage = Pages.CompoDimension And m_bInternalCompo Then Return
' Se errore esco
If Not m_bDrawOk Then Return
' Nome pezzo
Dim sPartName As String = PartNameTxBx.Text
' Leggo numero di pezzi da inserire
@@ -1186,6 +1185,8 @@ Public Class DrawPageUC
Else
MakeMultipleInsert(InsNbr, sPartName)
End If
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
ActivateParkIndZero()
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
' Se Shift premuto eseguo il contrario
If Keyboard.Modifiers And ModifierKeys.Shift Then
@@ -1206,9 +1207,6 @@ Public Class DrawPageUC
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
' Attivo il parcheggio dei pezzi Draw
ActivateParkIndZero()
Else
m_SceneButtons.MeasureBtn.IsChecked = False
DrawPage_Unloaded(sender, e)
+13 -4
View File
@@ -123,10 +123,19 @@
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OffsXInteryTxBl" Grid.Row="5" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Grid.Row="5" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="OffsXInteryTxBl" Grid.Column="0"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
<CheckBox Name="UseInteraxisChBx" Grid.Row="7" Grid.Column="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}" IsEnabled="{Binding ElementName=UseInteraxisChBx, Path=IsChecked}"/>
</Grid>
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
<Button Name="MirrorPartBtn"
+33 -4
View File
@@ -54,6 +54,8 @@ Public Class FrameCutPageUC
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
Dim bOffsYInterYSawTh As Boolean = False
UseInteraxisChBx.IsChecked = (GetPrivateProfileInt(S_FRAME, K_OFFSXINTERYSAWTH, 0, m_MainWindow.GetIniFile()) <> 1)
' Imposto i messaggi letti dal file dei messaggi
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
@@ -73,6 +75,17 @@ Public Class FrameCutPageUC
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
Dim sChBxToolTip As String = EgtMsg(90646) 'Applica valore indicato\n altrienti spessore lama
sChBxToolTip = sChBxToolTip.Replace("/n", "£")
Dim sItems As String() = sChBxToolTip.Split("£")
For Index As Integer = 0 To sItems.Count - 1
If Index = 0 Then
sChBxToolTip = sItems(Index).Trim
Else
sChBxToolTip &= vbCrLf & sItems(Index).Trim
End If
Next
UseInteraxisChBx.ToolTip = sChBxToolTip
End Sub
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -280,7 +293,7 @@ Public Class FrameCutPageUC
End If
End Sub
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed, UseInteraxisChBx.Click
' Forzo aggiornamento grezzo nella pagina di Nesting
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
' Parcheggio pezzi presenti nel grezzo
@@ -312,6 +325,11 @@ Public Class FrameCutPageUC
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
End If
Dim sUseInteraxis As String = "1"
If UseInteraxisChBx.IsChecked Then
sUseInteraxis = "0"
End If
WritePrivateProfileString(S_FRAME, K_OFFSXINTERYSAWTH, sUseInteraxis, m_MainWindow.GetIniFile())
End Sub
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
@@ -963,11 +981,22 @@ Public Class FrameCutPageUC
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
If dOffsXIntery <= dSawThick Then
dMinDist = dSawThick + 5 * EPS_SMALL
If UseInteraxisChBx.IsChecked Then
If dOffsXIntery < 0 Then
dMinDist = 5 * EPS_SMALL
OffsXInteryTxBx.Text = "0"
Else
dMinDist = dOffsXIntery + 5 * EPS_SMALL
End If
Else
dMinDist = dOffsXIntery + 5 * EPS_SMALL
dMinDist = dSawThick + 5 * EPS_SMALL
End If
'If dOffsXIntery <= dSawThick Then
' dMinDist = dSawThick + 5 * EPS_SMALL
' EgtOutLog("WARNINGS: Saw tickness is more width then interaxis")
'Else
' dMinDist = dOffsXIntery + 5 * EPS_SMALL
'End If
Else
EgtOutLog("Not found current saw for frames mindist")
dMinDist = dOffsXIntery
+12
View File
@@ -204,6 +204,9 @@ Public Class CurrentMachine
' Massima profondità lavorabile nei tagli diretti
Private m_MaxTabDepth As Double = 10.0
' Massima altezza lavorabile con lama grande
Private m_dHighPieceZ As Double = 200.0
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
Friend ReadOnly Property MaxTabDepth As Double
Get
@@ -1149,6 +1152,12 @@ Public Class CurrentMachine
End Get
End Property
Friend ReadOnly Property dHighPieceZ As Double
Get
Return m_dHighPieceZ
End Get
End Property
#End Region
Sub New()
@@ -1417,6 +1426,9 @@ Public Class CurrentMachine
If m_MaxTabDepth < 0 Then
m_MaxTabDepth = 10.0
End If
' Massimo spessore lavorabile con lama grande
m_dHighPieceZ = GetPrivateProfileDouble(S_RAWMOVE, "MaxHeightPiece", 800.0, m_MainWindow.GetMachIniFile())
End Sub
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
+2
View File
@@ -298,6 +298,8 @@ Public Class MachinePageUC
WaterJetBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
' Aggiorno lista materiali
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
m_ActiveMachinePage = MachinePages.MachiningDb
Case MachinePages.MachineCN
MachiningDBBtn.IsChecked = True
+3 -3
View File
@@ -26,7 +26,7 @@ Class MainWindow
' Variabile che definisce l'avvio forzato in modalità FRAME
Friend m_OnlyFrame As Boolean = False
Public Shared m_bShowSVGParkInd As Boolean = True
Public Shared m_bShowSVGParkInd As Boolean = False
' Dichiarazione delle Page UserControl
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
@@ -345,8 +345,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2612, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2612, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2703, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2703, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
+3 -3
View File
@@ -22,7 +22,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("OmagCUT")>
<Assembly: AssemblyCopyright("Copyright © 2015-2024 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2015-2025 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.6.12.1")>
<Assembly: AssemblyFileVersion("2.6.12.1")>
<Assembly: AssemblyVersion("2.7.3.2")>
<Assembly: AssemblyFileVersion("2.7.3.2")>
+16
View File
@@ -1396,6 +1396,22 @@
<Resource Include="Resources\NewIcons\LightArrowOff.png" />
<Resource Include="Resources\NewIcons\LightArrowOn.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Park_Busy.png" />
<Resource Include="Resources\NewIcons\icoRight-3D.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\icoLeft-3D.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\icoBack-3D.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\icoFront-3D.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\icoBottom-3D.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
+609 -603
View File
File diff suppressed because it is too large Load Diff
+22 -3
View File
@@ -196,7 +196,7 @@ Public Class CurrentProjectPageUC
' Inizializzo gestore lavorazioni
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
m_bFirst = False
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, "OrtoGraphic", 1, m_MainWindow.GetIniFile()) <> 0)
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, K_ORTOGRAPHIC, 1, m_MainWindow.GetIniFile()) <> 0)
EgtSetCameraType(bOrtoGraphic, True)
' creo nuovo progetto
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
@@ -436,21 +436,29 @@ Public Class CurrentProjectPageUC
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
' Parcheggio correttamente i pezzi precedentemente salvati
Dim nIdList As New List(Of Integer)
Dim nStatList As New List(Of Integer)
Dim nId2 As Integer = EgtGetFirstPart()
While nId2 <> GDB_ID.NULL
' Forzo lo stato per avere il giusto calcolo delle posizioni per evitare sovrapposizioni
EgtSetStatus(nId2, GDB_ST.ON_)
' Inserisco correttamente in parcheggio
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
' Aggiorno lo stato di visualizzazione
Dim nInfoStatus As Integer = 1
' Salvo lo stato (per gestire la navigazione)
EgtGetInfo(nId2, INFO_PARKSTATUS, nInfoStatus)
' Imposto lo stato
EgtSetStatus(nId2, nInfoStatus)
' Salvo l'Id e lo stato da impostare successivamente al posizionamento
nIdList.Add(nId2)
nStatList.Add(nInfoStatus)
' Notifica a WeinMatching per modifica Id
VeinMatching.UpdatePart(nId2)
' Passo al pezzo successivo
nId2 = EgtGetNextPart(nId2)
End While
For IndIndex As Integer = 0 To nIdList.Count - 1
EgtSetStatus(nIdList(IndIndex), nStatList(IndIndex))
Next
' Aggiorno Aree totale e da lavorare dei pezzi
SetTotalArea(dTotArea)
UpdateToProduceArea()
@@ -769,6 +777,17 @@ Public Class CurrentProjectPageUC
' Notifico a foto il cambio di path
EgtChangePhotoPath(nPhotoId, sNewPhoto)
End If
'--------------------------------------------------------------------------------
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
' Gestione visulizzazione lista pezzi in parcheggio
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
SelParkIndWD.CopyImgSvg(sPath)
SelParkIndWD.sActualProj = String.Empty
SelParkIndWD.CopyImgSvg(sNewFileName)
End If
'--------------------------------------------------------------------------------
' Se assente, inserisco contrassegno di progetto OmagCut valido
AddProjectMark()
' Eseguo
+59 -52
View File
@@ -6,33 +6,40 @@
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
<!-- Definizione della OpenPage -->
<Border>
<Grid Name="OpenPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<!-- Definizione della OpenPage -->
<Border>
<Grid Name="OpenPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Superiore -->
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1" Grid.RowSpan="2">
<!-- Definizione della Grid Superiore -->
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<Grid Name="SceneHostGrid" Grid.Row="2" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1.2*"/>
</Grid.ColumnDefinitions>
</Grid>
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="6.5*"/>
<RowDefinition Height="0.65*"/>
@@ -53,39 +60,39 @@
</Grid>
</Grid>
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Border>
<Button Name="BarCodeBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="BarCodeBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Button>
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Width="65" Height="65" HorizontalAlignment="Center"
</Button>
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Button>
</Grid>
</Grid>
</Border>
</Grid>
</Grid>
</Border>
</UserControl>
+47 -3
View File
@@ -5,6 +5,7 @@ Public Class OpenPageUC
'Riferimento alla MainWindow
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_SelParkInd As SelParkIndWD
'Dichiarazione dello UserControl SceneButtons
Private m_SceneButtons As SceneButtonsUC
@@ -35,11 +36,12 @@ Public Class OpenPageUC
' Assegnazione scena all'host e posizionamento nella OpenPageGrid
OpenSceneHost.Child = OpenScene
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
OpenSceneHost.SetValue(Grid.RowProperty, 2)
OpenSceneHost.SetValue(Grid.ColumnProperty, 0) '1
OpenSceneHost.SetValue(Grid.RowProperty, 0) ' 2
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
Me.OpenPageGrid.Children.Add(OpenSceneHost)
'Me.OpenPageGrid.Children.Add(OpenSceneHost)
SceneHostGrid.Children.Add(OpenSceneHost)
' Definizione del collegamento tra ItemList e ListBox1
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
@@ -241,6 +243,14 @@ Public Class OpenPageUC
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()
' Elimino elenco dei parcheggi
If Not IsNothing(m_SelParkInd) Then
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
SceneHostGrid.Children.Remove(m_SelParkInd)
m_SelParkInd = Nothing
End If
' Pulisco la selezione dei dati
SelParkIndWD.sActualProj = String.Empty
' Eseguo zoom
OpenScene.ZoomAll()
' Cancello messaggio
@@ -302,6 +312,24 @@ Public Class OpenPageUC
MessageBrd.Background = Brushes.Tomato
OkBtn.IsEnabled = False
End If
' Recupero il percorso del progetto per caricare le immagini
SelParkIndWD.sActualProj = sPath
Dim ListParkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListParkInd, OpenScene.GetCtx)
If ListParkInd.Count > 2 And GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
m_SelParkInd = New SelParkIndWD(m_MainWindow, OpenScene.GetCtx)
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
SceneHostGrid.Children.Add(m_SelParkInd)
Else
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
If Not IsNothing(m_SelParkInd) Then
SceneHostGrid.Children.Remove(m_SelParkInd)
m_SelParkInd = Nothing
End If
End If
' Eseguo zoom
OpenScene.ZoomAll()
Return bOk
@@ -475,11 +503,21 @@ Public Class OpenPageUC
' Se file dxf devo processarlo opportunamente
Dim bFileDxf As Boolean = (EgtGetFileType(m_sCurrFile) = FT.DXF)
If bFileDxf Then AdjustSlabDxf()
' Istruzioni per chiudere OpenPageUC e aprire currentproject
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_OpenPage)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
' Lancio caricamento nuovo progetto corrente
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.PostLoad(m_sCurrDir, m_sCurrFile)
'--------------------------------------------------------------------------------
' Gestione visulizzazione lista pezzi in parcheggio
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
Dim sNewFileName As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
SelParkIndWD.CopyImgSvg(sNewFileName, OpenScene.GetCtx)
SelParkIndWD.sActualProj = String.Empty
'--------------------------------------------------------------------------------
' Se file dxf
If bFileDxf Then
' Applico le lavorazioni
@@ -513,6 +551,12 @@ Public Class OpenPageUC
End Sub
Private Sub OpenPage_Unloaded(sender As Object, e As RoutedEventArgs)
If Not IsNothing(m_SelParkInd) Then
SceneHostGrid.Children.Remove(m_SelParkInd)
m_SelParkInd = Nothing
End If
' resetto il nome del progetto corrente
SelParkIndWD.sActualProj = String.Empty
End Sub
End Class
+20 -18
View File
@@ -110,24 +110,26 @@ Public Class ProjectMgrUC
' Gestione visulizzazione lista pezzi in parcheggio
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
Dim Extension As String = ".svg"
For Each ItemParkInd As ParkInd In ListParkInd
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
Try
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
If MainWindow.m_bShowSVGParkInd Then
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
Else
If File.Exists(sNewFile) Then
File.Delete(sNewFile)
End If
File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
End If
Catch ex As Exception
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
End Try
End If
Next
SelParkIndWD.CopyImgSvg(sNewFileName)
'Dim Extension As String = ".svg"
'If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
'For Each ItemParkInd As ParkInd In ListParkInd
' If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
' Try
' Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
' If MainWindow.m_bShowSVGParkInd Then
' WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
' Else
' If File.Exists(sNewFile) Then
' File.Delete(sNewFile)
' End If
' File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
' End If
' Catch ex As Exception
' EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
' End Try
' End If
'Next
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
+37
View File
@@ -39,6 +39,43 @@
<Button Name="TopViewBtn" Grid.Column="6" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Popup Name="ViewPopUp"
IsOpen="False"
AllowsTransparency="False"
PopupAnimation="Scroll"
StaysOpen="False"
Placement="Bottom"
PlacementTarget="{Binding ElementName=TopViewBtn}">
<WrapPanel Orientation="Vertical"
Width="78"
Background="{DynamicResource OmagCut_Gray}">
<Button x:Name="BottomViewBtn"
ToolTip="Bottom View"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromBOTTOMImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button x:Name="FrontViewBtn"
ToolTip="Front View"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromFRONTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button x:Name="BackViewBtn"
ToolTip="Back View"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromBACKImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button x:Name="LeftViewBtn"
ToolTip="Left View"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromLEFTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button x:Name="RightViewBtn"
ToolTip="Right View"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromRIGHTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</WrapPanel>
</Popup>
</Grid>
+39 -1
View File
@@ -5,6 +5,10 @@ Public Class SceneButtonsUC
'Riferimento alla MainWindow
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private Sub Init() Handles Me.Initialized
TopViewBtn.ToolTip = "Top View" & vbCrLf & "Select View (Shift)"
End Sub
Private Sub MeasureBtn_Checked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Checked
GetCurrScene.SetStatusGetDistance()
Dim ptRef1 As Point3d
@@ -49,6 +53,12 @@ Public Class SceneButtonsUC
'End Sub
Private Sub PanBtn_Click(sender As Object, e As RoutedEventArgs) Handles PanBtn.Click
If Keyboard.IsKeyDown(Key.LeftShift) Then
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, K_ORTOGRAPHIC, 1, m_MainWindow.GetIniFile()) <> 0)
EgtSetCameraType(Not bOrtoGraphic, True)
WritePrivateProfileString(S_SCENE, K_ORTOGRAPHIC, If(Not bOrtoGraphic, "1", "0"), m_MainWindow.GetIniFile())
Return
End If
GetCurrScene.SetStatusPan()
End Sub
@@ -69,7 +79,35 @@ Public Class SceneButtonsUC
End Sub
Private Sub TopViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles TopViewBtn.Click
EgtSetView(VT.TOP)
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
If ViewPopUp.IsOpen Then
ViewPopUp.IsOpen = False
Else
ViewPopUp.IsOpen = True
End If
Else
EgtSetView(VT.TOP)
End If
End Sub
Private Sub BottomViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BottomViewBtn.Click
EgtSetView(VT.BOTTOM)
End Sub
Private Sub FrontViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrontViewBtn.Click
EgtSetView(VT.FRONT)
End Sub
Private Sub BackViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackViewBtn.Click
EgtSetView(VT.BACK)
End Sub
Private Sub LeftViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftViewBtn.Click
EgtSetView(VT.LEFT)
End Sub
Private Sub RightViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles RightViewBtn.Click
EgtSetView(VT.RIGHT)
End Sub
Private Function GetCurrScene() As EgtUILib.Scene
+3 -1
View File
@@ -390,6 +390,8 @@ Public Class Camera
' Leggo nome variabile posizione home raggiunta
Dim CameraStateNameVar As String = String.Empty
GetPrivateProfileString(S_PHOTO, K_CAMERA_STATE_VAR, "", CameraStateNameVar, m_MainWindow.GetMachIniFile())
Dim nSteps As Integer = 20
nSteps = GetPrivateProfileInt(S_PHOTO, K_PENDIG_TIME_FOR_PHOTO, nSteps, m_MainWindow.GetMachIniFile())
If String.IsNullOrEmpty(CameraStateNameVar) Then
'Return False
Else
@@ -403,7 +405,7 @@ Public Class Camera
System.Threading.Thread.Sleep(300)
' Definisco flag posizionamento completato
Dim bPositionOk As Boolean = False
For I As Integer = 0 To 40
For I As Integer = 0 To nSteps
' Devo rileggere la variabile ad ogni ciclo
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(CameraStateNameVar, 3)
System.Threading.Thread.Sleep(100)
+8 -2
View File
@@ -176,7 +176,9 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -197,7 +199,11 @@
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Button Name="ManualModeBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="8" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
+148 -6
View File
@@ -1,12 +1,12 @@
Imports System.Globalization
Imports System.IO
Imports System.Windows.Media.Animation
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib
Imports Microsoft.VisualBasic.Devices
Public Class RawPartPageUC
' Dati generali CN
Friend m_CN As CN_generico
' Riferimento alla MainWindow
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Dim WithEvents m_CurrProjPage As CurrentProjectPageUC
@@ -81,6 +81,14 @@ Public Class RawPartPageUC
' Costante raggio cerchietto
Private Const RAD_CIRCLE As Double = 30
Private m_nIdMinRedX As Integer = -1
Private m_SafetyZone_X = 0
Private m_nIdMinRedY As Integer = -1
Private m_SafetyZone_Y = 0
Private m_bSafetyZoneRight As Boolean = True
Private m_bSafetyZoneBottom As Boolean = True
Private m_bExistsSafetyZone As Boolean = False
' Riferimento grezzo
Private m_bEnableOtherRefTab As Boolean = False
Private m_bOtherRefTab As Boolean
@@ -125,6 +133,13 @@ Public Class RawPartPageUC
TL = 3
End Enum
Private Enum STATDRAG As Integer
OK = 0
X_ = 1
_Y = 2
XY = 3
End Enum
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
'Creazione della Page UserControl e relative impostazioni
@@ -214,6 +229,7 @@ Public Class RawPartPageUC
ConfirmPhotoBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 24) 'Conferma
OtherRefTabTxBl.Text = "New Ref On Tab"
End Sub
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
@@ -320,6 +336,23 @@ Public Class RawPartPageUC
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
KerfTxBx.Text = LenToString(dInvertKerf * m_RawKerf, 2)
' Recupero gli ID delle pareti che delimitano l'area Protetta (movimenti in OverZ)
Dim nIdBase As Integer = EgtGetBaseId("Base")
m_nIdMinRedX = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
If m_nIdMinRedY <> GDB_ID.NULL And m_nIdMinRedY <> GDB_ID.NULL Then
m_bExistsSafetyZone = True
Dim ptMinX, ptMaxX As Point3d
EgtGetBBoxGlob(m_nIdMinRedX, GDB_BB.STANDARD, ptMinX, ptMaxX)
m_SafetyZone_X = ptMinX.x
Dim ptMinY, ptMaxY As Point3d
EgtGetBBoxGlob(m_nIdMinRedY, GDB_BB.STANDARD, ptMinY, ptMaxY)
m_SafetyZone_Y = ptMinY.y
End If
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
' Creo layer temporaneo per crocette
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
@@ -348,7 +381,6 @@ Public Class RawPartPageUC
EgtZoom(ZM.ALL)
End If
'Imposto il materiale corrente nella combobox
'MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
Dim Item As Material
For Each Item In MaterialsCmbx.Items
If Not IsNothing(m_CurrentMachine.CurrMat) AndAlso Item.sName = m_CurrentMachine.CurrMat.sName Then
@@ -571,6 +603,19 @@ Public Class RawPartPageUC
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' Creo una copia del punto corrente
Dim ptTemp As New Point3d(ptCurr.x, ptCurr.y, ptCurr.z)
Select Case DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, ptCurr - m_ptPrev)
Case STATDRAG.X_
ptCurr.x = m_ptPrev.x
Case STATDRAG._Y
ptCurr.y = m_ptPrev.y
Case STATDRAG.XY
m_ptPrev = ptCurr
Return
End Select
' Eseguo modifica
Select Case m_ActiveRawMode
Case RAWMODE.RECTANGLE
@@ -581,7 +626,7 @@ Public Class RawPartPageUC
ModifyDamaged(ptCurr)
End Select
' Aggiorno il punto precedente
m_ptPrev = ptCurr
m_ptPrev = ptTemp
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
ResetAllBRidges()
End Sub
@@ -2019,6 +2064,8 @@ Public Class RawPartPageUC
Dim dInvertKerf As Double = 1
EgtGetInfo(EgtGetFirstRawPart(), KEY_INVERT_KERF, dInvertKerf)
Dim dMaxLen = m_dTableLength - m_RawOffsX - m_RawKerf * dInvertKerf
' Se è attiva l'area sicura allora devo ricalcolare la dimensione massima
If dLength <= dMaxLen Then
m_CurrProjPage.ClearMessage()
If dKerf < 0 Then
@@ -2063,6 +2110,8 @@ Public Class RawPartPageUC
If Not StringToLen(HeightTxBx.Text, dHeight) Then
Return
End If
' verifico se l'altezza del pezzo è maggiore di quella consentita in macchina
DrawSafetyZone(dHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
If dHeight > -EPS_ZERO Then
m_CurrProjPage.ClearMessage()
If Math.Abs(dHeight - m_RawHeight) > EPS_SMALL Then
@@ -2132,6 +2181,91 @@ Public Class RawPartPageUC
End If
End Sub
' Funzione che si occupa di disegnare le pareti dell'area sicura e di gestire il grezzo (
Private Function DrawSafetyZone(dHeight As Double, dHighPieceZ As Double, vtMove As Vector3d) As STATDRAG
' Se non esiste allora esci senza eseguire controlli
If Not m_bExistsSafetyZone Then Return STATDRAG.OK
' Verifico se attivare la visualizzazione
Dim nStatus As GDB_ST = GDB_ST.OFF
If dHeight > dHighPieceZ Then
nStatus = GDB_ST.ON_
End If
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
EgtSetStatus(m_nIdMinRedX, nStatus)
EgtSetStatus(m_nIdMinRedY, nStatus)
EgtDraw()
If nStatus = GDB_ST.ON_ Then
Return VerifyDimensionRawSafetyZone(vtMove)
End If
Return STATDRAG.OK
End Function
' Verifica che le dimensioni del grezzo siano conformi con l'area sicura (altrimenti provvedo a ridimensionare il grezzo)
Private Function VerifyDimensionRawSafetyZone(vtMove As Vector3d) As STATDRAG
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
Dim ptMinRaw, ptMaxRaw As Point3d
EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
' Dimensioni grezzo
Dim Len_X As Double = ptMaxRaw.x - ptMinRaw.x
Dim Wid_Y As Double = ptMaxRaw.y - ptMinRaw.y
' Posiztion SafetyZone: RIGHT-BOTTOM
Dim RedTab_X = m_dTableLength - Math.Abs(m_SafetyZone_X - m_ptTableMin.x)
Dim RedTab_Y = Math.Abs(m_SafetyZone_Y - m_ptTableMin.y)
If RedTab_X < Len_X Then
' riduco le dimensioni del grezzo
m_RawLength = RedTab_X - EPS_SMALL * 10
LengthTxBx.Text = LenToString(m_RawLength, 2)
UpdateRawPart()
End If
If RedTab_Y < Wid_Y Then
' riduco le dimensioni del grezzo
m_RawWidth = RedTab_Y - EPS_SMALL * 10
WidthTxBx.Text = LenToString(m_RawWidth, 2)
UpdateRawPart()
End If
Return VerifyRawInSafetyZone(vtMove)
End Function
' Verifico che la posizione del grezzo sia conforme con la posizione di area sicura
Private Function VerifyRawInSafetyZone(vtMove As Vector3d) As STATDRAG
Dim nStat As STATDRAG = STATDRAG.OK
Dim bCalcBBoxRaw As Boolean = False
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
Dim ptMinRaw, ptMaxRaw As Point3d
EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
' Posiztion SafetyZone: RIGHT-BOTTOM
' Verifico che il grezzo sia all'interno di questi estremi
If ptMinRaw.x + vtMove.x < m_SafetyZone_X Then
' riposiziono il grezzo sulla parete
Dim ptRef As Point3d = New Point3d(m_SafetyZone_X - m_ptTableMin.x, ptMinRaw.y - m_ptTableMin.y, 0)
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
' aggiorno il valore di Offset
m_RawOffsX = m_SafetyZone_X + m_RawKerf - m_ptTableMin.x
m_RawOffsY = ptMinRaw.y + m_RawKerf - m_ptTableMin.y
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
bCalcBBoxRaw = True
nStat = STATDRAG.X_
End If
' Ricalcolo la posizione del grezzo se nel processo sopra ho eseguito uno spostamento
If bCalcBBoxRaw Then EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
If ptMaxRaw.y + vtMove.y > m_SafetyZone_Y Then
Dim dRawWidth As Double = ptMaxRaw.y - ptMinRaw.y
Dim ptRef As Point3d = New Point3d(ptMinRaw.x - m_ptTableMin.x, m_SafetyZone_Y - dRawWidth - m_ptTableMin.y, 0)
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
m_RawOffsX = ptMinRaw.x + m_RawKerf - m_ptTableMin.x
m_RawOffsY = m_SafetyZone_Y - dRawWidth + m_RawKerf - m_ptTableMin.y
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
bCalcBBoxRaw = True
nStat = nStat + STATDRAG._Y
End If
EgtDraw()
' Se ho ricalcolato la posizione del BBox grezzo allora ritorno falso
Return nStat
End Function
#Region "OTHERREFTAB"
Private Sub OtherRefTabChBx_Click(sender As Object, e As EventArgs) Handles OtherRefTabChBx.Click
@@ -2233,6 +2367,12 @@ Public Class RawPartPageUC
OthWD.ShowDialog()
End Sub
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
' Imposto modalità manuale della macchina
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
End Sub
#End Region ' OtherRefTab
Private Sub KerfTxBx_EgtClosed(sender As Object, e As EventArgs) Handles KerfTxBx.EgtClosed
@@ -2352,6 +2492,8 @@ Public Class RawPartPageUC
KerfTxBx.Text = LenToString(m_RawKerf, 2)
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 22) & " " & LenToString(dMaxKerf, 2)) 'Massimo kerf =
End If
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
End Sub
Private Sub RawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawProbingBtn.Click
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB