Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da396cc82e | |||
| da8e7a9e42 | |||
| d8cbe1a2c6 | |||
| 79c2c17d6b |
@@ -25,6 +25,9 @@ Friend Module CamAuto
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
If nErr < 0 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
|
||||
End If
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
@@ -43,6 +46,7 @@ Friend Module CamAuto
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -230,21 +230,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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1175,6 +1175,9 @@ Public Class DrawPageUC
|
||||
' Se errore esco
|
||||
If Not m_bDrawOk Then Return
|
||||
|
||||
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
|
||||
ActivateParkIndZero()
|
||||
|
||||
' Nome pezzo
|
||||
Dim sPartName As String = PartNameTxBx.Text
|
||||
' Leggo numero di pezzi da inserire
|
||||
@@ -1206,9 +1209,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-3
@@ -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, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2701, 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
|
||||
|
||||
@@ -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.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.1")>
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -49,6 +49,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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -7,6 +7,9 @@ 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
|
||||
@@ -320,6 +323,8 @@ Public Class RawPartPageUC
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
KerfTxBx.Text = LenToString(dInvertKerf * m_RawKerf, 2)
|
||||
' Verifico se attivare la visualizzazione dell'area sicura
|
||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ)
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
@@ -571,6 +576,9 @@ Public Class RawPartPageUC
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
|
||||
If Not DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ) Then Return
|
||||
|
||||
' Eseguo modifica
|
||||
Select Case m_ActiveRawMode
|
||||
Case RAWMODE.RECTANGLE
|
||||
@@ -745,6 +753,8 @@ Public Class RawPartPageUC
|
||||
If Not m_bActive Then Return
|
||||
' Disabilito modalità drag
|
||||
m_bDrag = False
|
||||
' Verifico che il pezzo sia in una posizione corretta
|
||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ)
|
||||
End Sub
|
||||
|
||||
Private Sub MaterialsCmbx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MaterialsCmbx.SelectionChanged
|
||||
@@ -2063,6 +2073,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)
|
||||
If dHeight > -EPS_ZERO Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
If Math.Abs(dHeight - m_RawHeight) > EPS_SMALL Then
|
||||
@@ -2132,6 +2144,64 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function DrawSafetyZone(dHeight As Double, dHighPieceZ As Double) As Boolean
|
||||
Dim nStatus As GDB_ST = GDB_ST.OFF
|
||||
If dHeight > dHighPieceZ Then
|
||||
nStatus = GDB_ST.ON_
|
||||
End If
|
||||
' attivo la visualizzazione delle pareti che delimitano l'area sicura
|
||||
Dim nIdBase As Integer = EgtGetBaseId("Base")
|
||||
Dim nIdMinRedX As Integer = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
|
||||
EgtSetStatus(nIdMinRedX, nStatus)
|
||||
Dim nIdMinRedY As Integer = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
|
||||
EgtSetStatus(nIdMinRedY, nStatus)
|
||||
EgtDraw()
|
||||
If nStatus = GDB_ST.ON_ Then
|
||||
Return VerifyRawInSafetyZone(nIdMinRedX, nIdMinRedY)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function VerifyRawInSafetyZone(nIdMinRedX As Integer, nIdMinRedY As Integer) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
Dim ptMinRaw, ptMaxRaw As Point3d
|
||||
EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
|
||||
Dim ptMinX, ptMaxX As Point3d
|
||||
EgtGetBBoxGlob(nIdMinRedX, GDB_BB.STANDARD, ptMinX, ptMaxX)
|
||||
Dim ptMinY, ptMaxY As Point3d
|
||||
EgtGetBBoxGlob(nIdMinRedY, GDB_BB.STANDARD, ptMinY, ptMaxY)
|
||||
' Verifico che il grezzo sia all'interno di questi estremi
|
||||
If ptMinRaw.x < ptMinX.x Then
|
||||
' EgtSetColor(nRawSolidId, New Color3d(255, 0, 0), 40)
|
||||
Dim ptRef As Point3d = New Point3d(ptMinX.x - m_ptTableMin.x, ptMinRaw.y - m_ptTableMin.y, 0)
|
||||
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
|
||||
m_RawOffsX = ptMinX.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)
|
||||
EgtDraw()
|
||||
bOk = False
|
||||
End If
|
||||
' Ricalcolo la posizione del grezzo se nel processo sopra ho eseguito uno spostamento
|
||||
If Not bOk Then EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
|
||||
If ptMaxRaw.y > ptMinY.y Then
|
||||
' EgtSetColor(nRawSolidId, New Color3d(255, 0, 0), 40)
|
||||
Dim dRawWidth As Double = ptMaxRaw.y - ptMinRaw.y
|
||||
Dim ptRef As Point3d = New Point3d(ptMinRaw.x - m_ptTableMin.x, ptMinY.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 = ptMinY.y - dRawWidth + m_RawKerf - m_ptTableMin.y
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
EgtDraw()
|
||||
bOk = False
|
||||
End If
|
||||
If bOk Then EgtSetColor(nRawSolidId, m_RawCol)
|
||||
EgtDraw()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
#Region "OTHERREFTAB"
|
||||
|
||||
Private Sub OtherRefTabChBx_Click(sender As Object, e As EventArgs) Handles OtherRefTabChBx.Click
|
||||
@@ -2233,6 +2303,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_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' OtherRefTab
|
||||
|
||||
Private Sub KerfTxBx_EgtClosed(sender As Object, e As EventArgs) Handles KerfTxBx.EgtClosed
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user