Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d77297695 | |||
| bdcdcaecf0 | |||
| 44011c5775 | |||
| cba095188e | |||
| ebedccf46a | |||
| 8bd7d9e3fa | |||
| 8dfa932bd7 | |||
| 5422e905e7 | |||
| 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -149,15 +149,24 @@ 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
|
||||
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
|
||||
EgtOutLog("ATTENZIONE: Attivare gestione parcheggio per progetti DXF e riavviare il programma")
|
||||
End If
|
||||
ParkIndBtn.IsChecked = True
|
||||
End If
|
||||
ParkIndBtn_Click()
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -230,21 +239,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 +2819,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 +2992,28 @@ 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
|
||||
Dim nCount As Integer = 0
|
||||
' 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"
|
||||
Dim ListparkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListparkInd)
|
||||
If ListparkInd.Count > 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)
|
||||
nCount = ListparkInd.Count
|
||||
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
|
||||
@@ -3130,6 +3157,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
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, 2702, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2702, 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.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.2.1")>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.5 KiB |