Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a894e9d33 | |||
| 97b78f584a | |||
| eb3d3c8af9 | |||
| 5e0db28b31 | |||
| d4141d1423 | |||
| 7f56299074 | |||
| 1af5f6789f | |||
| 403a3ae648 | |||
| cc1cd85b58 | |||
| 0071a39d7f | |||
| e6db50229f | |||
| 575ce93877 | |||
| 1ec369dc5f | |||
| 47ab815e80 | |||
| c6482d0f53 | |||
| 489b50b45b | |||
| baa39cf299 | |||
| 84d10074d0 | |||
| 9e1b7da21e | |||
| 8c426b1cba | |||
| 4d09bd0fd5 | |||
| ddab78b620 | |||
| 1ef8f5000e | |||
| 26134cf2ee | |||
| 290db84246 | |||
| 23c14b1bb6 | |||
| ddb7c9e7f4 | |||
| c581c52022 | |||
| cf1e8cea34 | |||
| 4037db6b6b | |||
| 30965ac81d | |||
| 073b616405 | |||
| c2621a49bb | |||
| ee1ba47171 | |||
| 27015dd589 | |||
| ff3cac4fe9 | |||
| 4ded60f9f7 | |||
| 9e830bf2a5 | |||
| 1c84885a44 | |||
| f2694511e5 |
@@ -699,6 +699,25 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function IsExitPreCut(nOperId As Integer) As Boolean
|
||||
' Deve essere una lavorazione
|
||||
If Not EgtSetCurrMachining(nOperId) Then Return False
|
||||
' Verifico presenza Info di PreCut
|
||||
Return EgtExistsInfo(nOperId, INFO_MCH_EPC)
|
||||
End Function
|
||||
|
||||
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
While nOperId <> GDB_ID.NULL
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
|
||||
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation( nOperId)
|
||||
End If
|
||||
nOperId = nNextOperId
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
|
||||
@@ -201,6 +201,8 @@ Public Class NestPageUC
|
||||
While nId <> GDB_ID.NULL
|
||||
' Recupero l'identificativo del pezzo cui appartiene
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim sNamePartId As String = String.Empty
|
||||
EgtGetName(nPartId, sNamePartId)
|
||||
Dim bPartInTable As Boolean = (EgtGetParent(nPartId) = m_nRawId)
|
||||
If EgtIsPart(nPartId) Or bPartInTable Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
@@ -216,6 +218,19 @@ Public Class NestPageUC
|
||||
' Drag possibile
|
||||
m_bDrag = True
|
||||
Exit While
|
||||
Else
|
||||
' verifico che tra gli elemnti selezionati ci sia un testo
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
||||
Dim nTab As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||
' se non è stata eseguita nessuna selezione esco dal ciclo
|
||||
If nTab = 0 Then Exit While
|
||||
'' Creo nuovo progetto
|
||||
'm_CurrProjPage.NewProject(nTabInd, bRetainParkedParts)
|
||||
'' Gestione stato FastGrid
|
||||
'm_MainWindow.m_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||
'EgtZoom(ZM.ALL)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
@@ -73,6 +73,8 @@ Public Class SplitPageUC
|
||||
' Deseleziono pezzi
|
||||
EgtDeselectAll()
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino eventuali pretagli su uscite
|
||||
RemoveAllExitPreCuts()
|
||||
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
||||
If Not m_bShow Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
|
||||
@@ -244,6 +244,8 @@ Module ConstGen
|
||||
Public Const INFO_MCH_USER_SAL As String = "Usal"
|
||||
' Info allungamento finale lavorazione imposto dall'utente
|
||||
Public Const INFO_MCH_USER_EAL As String = "Ueal"
|
||||
' Info lavorazione di tipo pretaglio sull'uscita
|
||||
Public Const INFO_MCH_EPC As String = "EPC"
|
||||
' Nome contorno taglio
|
||||
Public Const NAME_PV_CUT As String = "CUT"
|
||||
' Nome contorno pre-taglio
|
||||
|
||||
@@ -45,6 +45,7 @@ Module ConstIni
|
||||
Public Const K_VIRTUALKEYBOARD As String = "VirtualKeyboard"
|
||||
Public Const K_THEME As String = "Theme"
|
||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||
Public Const K_TEST As String = "Test"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -79,6 +80,13 @@ Module ConstIni
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
|
||||
Public Const S_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZ_HEIGHT As String = "A_Height"
|
||||
Public Const K_ALZ_DELTA_ANG As String = "A_DeltaAng"
|
||||
Public Const K_FRONT_HEIGHT As String = "F_Height"
|
||||
Public Const K_FRONT_DELTA_ANG As String = "F_DeltaAng"
|
||||
|
||||
Public Const S_GRID As String = "Grid"
|
||||
Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
Public Const S_NCNUM As String = "NcNUM"
|
||||
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
@@ -102,8 +103,8 @@
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
Public Const K_ZJOG As String = "ZJog"
|
||||
Public Const K_BCJOG As String = "BCJog"
|
||||
Public Const K_ZCJOG As String = "ZCJog"
|
||||
Public Const K_ZBJOG As String = "ZBJog"
|
||||
Public Const K_POWERON As String = "PowerON"
|
||||
Public Const K_POWEROFF As String = "PowerOFF"
|
||||
|
||||
@@ -137,6 +138,7 @@
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
Public Const S_PHOTO As String = "Photo"
|
||||
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
@@ -60,24 +60,107 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="PolishingBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="SawTestBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -118,14 +201,14 @@
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-->
|
||||
<ToggleButton Name="ZBtn" Grid.Column="3"
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse B-C-->
|
||||
<ToggleButton Name="BCBtn" Grid.Column="4"
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
@@ -8,6 +8,7 @@ Public Class DirectCutPageUC
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
' nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
@@ -18,6 +19,7 @@ Public Class DirectCutPageUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
@@ -50,6 +52,7 @@ Public Class DirectCutPageUC
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
End Enum
|
||||
|
||||
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
@@ -60,6 +63,7 @@ Public Class DirectCutPageUC
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
@@ -80,6 +84,7 @@ Public Class DirectCutPageUC
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
@@ -89,7 +94,7 @@ Public Class DirectCutPageUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
Dim bCollpsedNewBottonsConsole As Boolean = False
|
||||
Dim bCollapsedNewBottonsConsole As Boolean = False
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
If Not m_NewMachineButtonsType Then
|
||||
'Assegno MachineButtons alla pagina
|
||||
@@ -97,7 +102,7 @@ Public Class DirectCutPageUC
|
||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' per le configurazioni diverse dalla Digitale5
|
||||
bCollpsedNewBottonsConsole = True
|
||||
bCollapsedNewBottonsConsole = True
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
@@ -105,30 +110,44 @@ Public Class DirectCutPageUC
|
||||
ManualModeBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
ManualBtn.Content = EgtMsg(90201)
|
||||
SingleCutBtn.Content = EgtMsg(90202)
|
||||
MultipleCutBtn.Content = EgtMsg(90203)
|
||||
GridCutBtn.Content = EgtMsg(90204)
|
||||
FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
PolishingBtn.Content = EgtMsg(90231)
|
||||
CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
SawTestBtn.Content = EgtMsg(90207)
|
||||
|
||||
' nuovi bottoni 20/05/2021
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollpsedNewBottonsConsole Then
|
||||
|
||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||
Dim x As Integer = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
|
||||
XYBtn.Content = "X - Y"
|
||||
ZBtn.Content = "Z"
|
||||
BCBtn.Content = "B - C"
|
||||
ZCBtn.Content = "Z - C"
|
||||
If AxesNumber < 5 Then
|
||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
ZBBtn.Content = "Z - B"
|
||||
Else
|
||||
XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZBtn.Visibility = Windows.Visibility.Collapsed
|
||||
BCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DirectCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
'------ NUOVI BOTTONI ----------
|
||||
'------ INIZIO NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonJogList.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
@@ -164,8 +183,8 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End While
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
'----------- FINE NUOVI BOTTONI------------
|
||||
|
||||
'-----------NUOVI BOTTONI------------
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
@@ -188,6 +207,9 @@ Public Class DirectCutPageUC
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
@@ -286,6 +308,11 @@ Public Class DirectCutPageUC
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
@@ -337,45 +364,45 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ZBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBtn.Click
|
||||
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
|
||||
Dim ZJogButton As MachineButton = m_ButtonJogList(1)
|
||||
' eseguo lo script lua associato
|
||||
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ZJogChanged(bZAxes As Boolean)
|
||||
Friend Sub ZCJogChanged(bZAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim ZJogButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_ZJOG Then
|
||||
If MachineButton.StateFlag.Trim = K_ZCJOG Then
|
||||
ZJogButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ZJogButton) Then
|
||||
ZJogButton.SetIsChecked(bZAxes)
|
||||
ZBtn.IsChecked = bZAxes
|
||||
ZCBtn.IsChecked = bZAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BCBtn_Click(sender As Object, e As RoutedEventArgs) Handles BCBtn.Click
|
||||
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
|
||||
Dim BCJogButton As MachineButton = m_ButtonJogList(2)
|
||||
' eseguo lo script lua associato
|
||||
BCJogButton.ExecuteMDICommand(BCJogButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub BCJogChanged(bBCAxes As Boolean)
|
||||
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim BCJogButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_BCJOG Then
|
||||
If MachineButton.StateFlag.Trim = K_ZBJOG Then
|
||||
BCJogButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(BCJogButton) Then
|
||||
BCJogButton.SetIsChecked(bBCAxes)
|
||||
BCBtn.IsChecked = bBCAxes
|
||||
ZBBtn.IsChecked = bBCAxes
|
||||
End If
|
||||
End Sub
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
@@ -416,6 +443,8 @@ Public Class DirectCutPageUC
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
End Select
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
@@ -433,4 +462,124 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
'' ------------------------ GESTIONE SECONDA PAGINA ------------------------
|
||||
'Private Sub ClearButton(nCount As Integer)
|
||||
' Dim nEndIndex As Integer
|
||||
' If m_bIsFirstPage Then
|
||||
' nEndIndex = If(nCount < 8, nCount, 8)
|
||||
' Else
|
||||
' nEndIndex = If(nCount < 16, nCount - 8, 8)
|
||||
' End If
|
||||
' For index As Integer = 1 To nEndIndex
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Visible
|
||||
' Next
|
||||
' For index As Integer = nEndIndex + 1 To 8
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Hidden
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
'Private Sub LoadPage()
|
||||
' Dim nDeltaSecondPage As Integer = 8
|
||||
' ' Leggo numero di componenti presenti
|
||||
' Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
' ' Calcolo indici a seconda della pagina in cui sono
|
||||
' If m_bIsFirstPage Then
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 0
|
||||
' Else
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 8
|
||||
' End If
|
||||
|
||||
' ' Creazione converter da String a ImageSource
|
||||
' Dim ImageConverter As New ImageSourceConverter
|
||||
' Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
' 'Assegnazione immagine e testo ai Button
|
||||
' For index As Integer = 1 To 8
|
||||
' Dim CustomThickness As New Thickness(0)
|
||||
' Dim nCompoName As Integer = GetPrivateProfileInt("Compo" & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
' Dim sCompoImage As String = ""
|
||||
' Dim sCompoImageSource As ImageSource
|
||||
|
||||
' 'verifico presenza immagine e la aggiungo
|
||||
' If GetPrivateProfileString("Compo" & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
' Try
|
||||
' sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
' GetImage(index).Height = 65
|
||||
' GetImage(index).Width = 65
|
||||
' GetImage(index).Source = sCompoImageSource
|
||||
' Catch ex As Exception
|
||||
' EgtOutLog("Error loading image " & sCompoImage)
|
||||
' sCompoImage = String.Empty
|
||||
' GetImage(index).Height = 0
|
||||
' GetImage(index).Width = 0
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End Try
|
||||
' Else
|
||||
' 'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' 'verifico presenza testo
|
||||
' If nCompoName > 0 Then
|
||||
' Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
' 'verifico presenza immagine
|
||||
' If sCompoImage.Length > 0 Then
|
||||
' 'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
' If sCompoName.Length > 15 Then
|
||||
' sCompoName = sCompoName.Substring(0, 15)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' 'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
' CustomThickness.Right = 10
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' Else
|
||||
' 'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||
' If sCompoName.Length > 20 Then
|
||||
' sCompoName = sCompoName.Substring(0, 20)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' End If
|
||||
' Else
|
||||
' 'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
'End Sub
|
||||
|
||||
'' Gestione bottone altri componenti
|
||||
'Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
||||
' If m_bIsFirstPage Then
|
||||
' m_bIsFirstPage = False
|
||||
' LoadPage()
|
||||
' 'Compo9.SetValue(Grid.ColumnProperty, 1)
|
||||
' 'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
' 'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
||||
' 'ImageCompo9.Visibility = Windows.Visibility.Visible
|
||||
' 'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Else
|
||||
' m_bIsFirstPage = True
|
||||
' LoadPage()
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -112,15 +112,15 @@ Public Class MachineButtonsUC
|
||||
EgtOutLog("Error loading image " & sImage)
|
||||
End Try
|
||||
Else
|
||||
' In attesa che attivono le icobne di questi pulsanti scrivo il contenuto del bottone
|
||||
' In attesa che attivono le icone di questi pulsanti scrivo il contenuto del bottone
|
||||
Try
|
||||
Dim CurrToggleBtn As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
|
||||
If StateFlagArray(nIndex) = K_XYJOG Then
|
||||
CurrToggleBtn.Content = "X - Y"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZJOG Then
|
||||
CurrToggleBtn.Content = "Z"
|
||||
ElseIf StateFlagArray(nIndex) = K_BCJOG Then
|
||||
CurrToggleBtn.Content = "C"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZCJOG Then
|
||||
CurrToggleBtn.Content = "Z - C"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||
CurrToggleBtn.Content = "Z - B"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||
@@ -589,7 +589,7 @@ Public Class MachineButtonsUC
|
||||
|
||||
Friend Sub ZJogChanged(ByVal bZAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_ZJOG)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_ZCJOG)
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bZAxes
|
||||
@@ -597,7 +597,7 @@ Public Class MachineButtonsUC
|
||||
|
||||
Friend Sub BCJogChanged(ByVal bBCAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_BCJOG)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_ZBJOG)
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
||||
|
||||
@@ -201,10 +201,10 @@ Public Class ManualAxesMoveUC
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
' Eseguo in MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
System.Threading.Thread.Sleep(150)
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
m_CN.MDI_command()
|
||||
System.Threading.Thread.Sleep(150)
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
m_MoveClicked = False
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<UserControl x:Class="SingleDrillUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid SingleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,452 @@
|
||||
Imports EgtUILib
|
||||
Public Class SingleDrillUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
|
||||
' riferimento alla macchina corrente
|
||||
Private m_CurrentMachine As CurrentMachine
|
||||
|
||||
' --------------------- VARIABILI PRESENTI NEL TAGLIO SINGOLO ---------------------
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
Private m_ptTabOri As Point3d
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
' Parametri P1 acquisito
|
||||
Private m_bPointP1Ok As Boolean = False
|
||||
Private m_ptTipP1 As Point3d
|
||||
Private m_vtToolP1 As Vector3d
|
||||
' Parametri P2 acquisito
|
||||
Private m_bPointP2Ok As Boolean = False
|
||||
Private m_ptTipP2 As Point3d
|
||||
Private m_vtToolP2 As Vector3d
|
||||
' Parametri della lavorazione
|
||||
Private m_bCutOk As Boolean = False
|
||||
|
||||
' Array delle modalità di acquisizione dei punti
|
||||
Private m_PointsModeArray(2) As String
|
||||
' Punto selezionato nel disegno
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
Private m_dDiameter As Double = 0
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
' Costanti che indicano la modalità di acquisizione dei punti
|
||||
Private Enum PT_MODE As Integer
|
||||
DRILL = 0
|
||||
LASER = 1
|
||||
DRAW = 2
|
||||
End Enum
|
||||
|
||||
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
' Assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' recupero informazioni del foretto usato
|
||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrDrill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
m_bSimul = False
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on TableRef1")
|
||||
End If
|
||||
' Dati del grezzo
|
||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina di foro diretto
|
||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
ActivateAllMachinings()
|
||||
' Abilito registrazione progetto modificato
|
||||
EgtEnableModified()
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
SimulBtn.Foreground = Brushes.Black
|
||||
OkBtn.IsEnabled = True
|
||||
OkBtn.Foreground = Brushes.Black
|
||||
Else
|
||||
SimulBtn.IsEnabled = False
|
||||
SimulBtn.Foreground = Brushes.DarkGray
|
||||
OkBtn.IsEnabled = False
|
||||
OkBtn.Foreground = Brushes.DarkGray
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' deselezione il bottone per acquisizione
|
||||
Point1Btn.IsChecked = False
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Acquisisco punto da disegno
|
||||
EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
' Aggiusto Z punto acquisito (è in globale)
|
||||
Dim dPtPrevZ As Double = m_ptPrev.z
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Se direzione di vista calcolabile e da sopra posso aggiustare anche XY
|
||||
Dim dAngVertDeg, dAngHorizDeg As Double
|
||||
If EgtGetGenericView(dAngVertDeg, dAngHorizDeg) Then
|
||||
Dim vtDir As Vector3d = Vector3d.FromSpherical(1, dAngVertDeg, dAngHorizDeg)
|
||||
If vtDir.z > EPS_SMALL Then
|
||||
m_ptPrev.z = dPtPrevZ
|
||||
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
|
||||
End If
|
||||
End If
|
||||
' Visualizzo coordinate (rispetto a 0 tavola)
|
||||
ShowCoord()
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
|
||||
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
|
||||
End Sub
|
||||
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Reset punto non acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
|
||||
' Ricavo dati Foretto corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
CreateSingleDrill()
|
||||
' Disegno la macchina nella sua posizione reale
|
||||
SetMachineInCurrPos()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||
Point1Btn.IsChecked = True
|
||||
End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
StringToLen(XcoordTxBx.Text, dXcoord)
|
||||
XcoordTxBx.Text = LenToString(dXcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.x = dXcoord + m_ptTabOri.x
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dYcoord As Double = 0
|
||||
StringToLen(YcoordTxBx.Text, dYcoord)
|
||||
YcoordTxBx.Text = LenToString(dYcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.y = dYcoord + m_ptTabOri.y
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Predispongo passaggio a simulazione
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
#If TRIAL Then
|
||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||
' Se errore in generazione, segnalo l'errore ed esco
|
||||
If Not bOk Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleDrill() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
m_bCutOk = False
|
||||
Return False
|
||||
End If
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Recupero spessore lama corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
EgtTdbSetCurrTool(sDrill)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
DeactivateAllMachinings()
|
||||
|
||||
' Creo nuovo pezzo per il taglio diretto
|
||||
Dim nPartId = CreateDirectCutPart()
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_INLOOP)
|
||||
' Creo il Drill
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
|
||||
' Creo layer per crocetta di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocetta/e
|
||||
If m_bPointP1Ok Then
|
||||
CreateCross(nCrossLayerId, ptStart)
|
||||
End If
|
||||
|
||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
||||
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
|
||||
ptIns.z = dRawHeight
|
||||
' Inserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||
' Inserisco la lavorazione
|
||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||
EgtSetCurrPhase(1)
|
||||
' Eventuale eliminazione Home finale
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
' crea una croce nel punto indicato e rappresenta il diametro dell'utensile corrente
|
||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||
' Aggiungo crocette
|
||||
ptP += New Vector3d(0, 0, 0.15)
|
||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||
Dim nCrossId1 = EgtCreateLine(nLayerId, ptP + (-vtCrossX), ptP + vtCrossX)
|
||||
EgtSetColor(nCrossId1, New Color3d(255, 0, 0))
|
||||
Dim nCrossId2 = EgtCreateLine(nLayerId, ptP + (-vtCrossY), ptP + vtCrossY)
|
||||
EgtSetColor(nCrossId2, New Color3d(255, 0, 0))
|
||||
Dim nPntId = EgtCreateGeoPoint(nLayerId, ptP)
|
||||
EgtSetColor(nPntId, New Color3d(255, 0, 0))
|
||||
Dim nCirleId = EgtCreateCircle(nLayerId, ptP, m_dDiameter / 2)
|
||||
EgtSetColor(nCirleId, New Color3d(0, 255, 0))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -46,6 +46,8 @@ Public Class AlzFrontUC
|
||||
|
||||
' raggio circoscritto al pezzo
|
||||
Private m_dBBoxRad As Double
|
||||
' dimensione dei caratteri
|
||||
Private m_dH As Double
|
||||
|
||||
Private Sub AlzFrontPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -66,12 +68,11 @@ Public Class AlzFrontUC
|
||||
' nascondo il bottone Back della pagina Draw
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Visibility.Hidden
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||
' Abilito bottoni angoli di fianco e lavorazioni da sotto
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
' Disabilito bottoni angoli di fianco e lavorazioni da sotto
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = "Altezza"
|
||||
@@ -93,10 +94,10 @@ Public Class AlzFrontUC
|
||||
Dim LabelId As Integer = GDB_ID.NULL
|
||||
|
||||
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
||||
GetPrivateProfileString("Alz&Front", "A_Height", "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString("Alz&Front", "F_Height", "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString("Alz&Front", "A_DeltaAng", "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString("Alz&Front", "F_DeltaAng", "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
@@ -142,6 +143,7 @@ Public Class AlzFrontUC
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
||||
Dim sNameCurrLine As String = String.Empty
|
||||
Dim nInfo As Integer = 0
|
||||
Dim dSideAng As Integer = 0
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
||||
EgtGetName(CurrLine, sNameCurrLine)
|
||||
' inserisco la numerazione dei lati della figura
|
||||
@@ -190,8 +192,8 @@ Public Class AlzFrontUC
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
' aggiungo l'Info che comunica se il lato è stato modificato
|
||||
InitList()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -269,9 +271,9 @@ Public Class AlzFrontUC
|
||||
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
|
||||
dBBoxRad As Double, bTextExt As Boolean, Optional bRot As Boolean = False) As Integer
|
||||
' Calcolo altezza testo
|
||||
Dim dH As Double = 0.05 * dBBoxRad
|
||||
m_dH = 0.05 * dBBoxRad
|
||||
' Creo testo
|
||||
Dim nText As Integer = EgtCreateTextAdv(TextLayer, Point3d.ORIG(), 0, sText, "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
Dim nText As Integer = EgtCreateTextAdv(TextLayer, Point3d.ORIG(), 0, sText, "", 500, False, m_dH, 1, 0, INS_POS.MC)
|
||||
' Calcolo posizionamento
|
||||
' BBox del testo e suo centro
|
||||
Dim ptMinBBox As Point3d
|
||||
@@ -659,6 +661,13 @@ Public Class AlzFrontUC
|
||||
Return sSideName
|
||||
End Function
|
||||
|
||||
Private Sub InitList()
|
||||
' quando avvio la pagina inizializzo tutti i lati comunicando che non sono stati modificati
|
||||
For j As Integer = 0 To AlzFrontEntityList.Count() - 1
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 0)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' aggiorno lo stato della dell'oggetto
|
||||
Private Sub RefreshList(sSideName As String, sOppositeNameCheck As String, bIsAlz As Boolean, bIsChecked As Boolean)
|
||||
For j As Integer = 0 To AlzFrontEntityList.Count() - 1
|
||||
@@ -668,6 +677,7 @@ Public Class AlzFrontUC
|
||||
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.NONE
|
||||
' insrisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 0)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
Exit For
|
||||
End If
|
||||
' se selezione di Alz. o Front.
|
||||
@@ -680,6 +690,7 @@ Public Class AlzFrontUC
|
||||
End If
|
||||
' insrisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 1)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
Else
|
||||
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.FRONTALINO
|
||||
' deseleziono il Check opposto
|
||||
@@ -689,6 +700,7 @@ Public Class AlzFrontUC
|
||||
End If
|
||||
' inserisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 2)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
End If
|
||||
' termino il ciclo
|
||||
Exit For
|
||||
@@ -713,9 +725,9 @@ Public Class AlzFrontUC
|
||||
|
||||
' recupero il nome del direttorio
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetPrivateProfileString("Alz&Front", K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
' leggo le info inserite nel campo "Alz&Front"
|
||||
m_MainWindow.m_DrawPageUC.m_MainComponentPage.GetPrivateProfileCompo("Alz&Front", "Alz&Front", nCompoName, sCompoFile, sCompoImage, m_MainWindow.GetIniFile())
|
||||
m_MainWindow.m_DrawPageUC.m_MainComponentPage.GetPrivateProfileCompo(S_ALZFRONT, K_ALZFRONT, nCompoName, sCompoFile, sCompoImage, m_MainWindow.GetIniFile())
|
||||
'Dim sCompoImageSource As ImageSource
|
||||
|
||||
' Costruisco path completa del componente
|
||||
@@ -737,6 +749,10 @@ Public Class AlzFrontUC
|
||||
If StringToLen(Parameter2FTxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||
End If
|
||||
' parametri per la scrittura dei caratteri
|
||||
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||
|
||||
|
||||
Dim sMsg As String = String.Empty
|
||||
' eseguo la funzione per il disegno della componente (CMP_Draw)
|
||||
|
||||
@@ -15,6 +15,8 @@ Public Class CompoDimensionUC
|
||||
Friend m_InternalCompoPage As InternalComponentPageUC
|
||||
' Riferimento alla pagina di selezione della alzatine
|
||||
Friend m_AlzFrontPage As AlzFrontUC
|
||||
' solo se è configurato il direttorio della componente allora mostro il bottone
|
||||
Friend bEnableAlzFront As Boolean = False
|
||||
|
||||
Private Sub CompoDimensionUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
'Creazione delle Page UserControl (per le componenti interne)
|
||||
@@ -29,9 +31,17 @@ Public Class CompoDimensionUC
|
||||
m_AlzFrontPage.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
m_AlzFrontPage.SetValue(Grid.RowSpanProperty, 4)
|
||||
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
' definisco il nome dei comandi presenti nella pagine
|
||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||
bEnableAlzFront = True
|
||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
AddBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 48) ' Aggiungi
|
||||
CancelBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 49) ' Rimuovi
|
||||
End Sub
|
||||
@@ -46,7 +56,7 @@ Public Class CompoDimensionUC
|
||||
' se arrivo dalla pagina delle componenti interne allora esco (non devo ricalcolare i parametri)
|
||||
If m_DrawPage.m_bBackFromInternalCompo Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
' Se componente interno visualizzo bottoni aggiungi rimuovi
|
||||
ShowAddRemoveBtn(m_DrawPage.m_bInternalCompo)
|
||||
' Imposto contesto corrente e faccio uno ZoomAll della scena con il componente
|
||||
@@ -64,7 +74,7 @@ Public Class CompoDimensionUC
|
||||
If m_DrawPage.sCompoName.StartsWith("PCucina") Or
|
||||
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
Else
|
||||
ShowInternalBtn(False)
|
||||
ShowAlzFrontBtn(False)
|
||||
|
||||
@@ -212,6 +212,14 @@ Public Class DrawPageUC
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
|
||||
DrawScene.SetDistLineMaterial(DstLnColor)
|
||||
|
||||
'' imposto il colore di sfondo del disegno
|
||||
'Dim BAckTopColor As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
|
||||
'Dim BackBottom As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
|
||||
'DrawScene.SetViewBackground(BAckTopColor, BackBottom)
|
||||
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
|
||||
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -869,6 +877,196 @@ Public Class DrawPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' permette di inserire più di un part
|
||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
Dim Pz As Integer = -1
|
||||
Dim NxtPz As Integer = -1
|
||||
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
' salvo il file temporaneo per studio delle alzatine
|
||||
EgtSaveFile("c:\EgtData\OmagCUT\Temp\TempAlzatine.nge", NGE.CMPTEXT)
|
||||
' cerco un altro pezzo nell'elenco
|
||||
NxtPz = EgtGetNextPart(Pz)
|
||||
|
||||
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
|
||||
EgtErase(SelectRegion)
|
||||
' Cancello layer etichette, quotatura,ausiliario e box
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "LayAux"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
|
||||
|
||||
' Cancello layer etichette dei componenti interni (buchi)
|
||||
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
While nHLId <> GDB_ID.NULL
|
||||
EgtErase(nHLId)
|
||||
nHLId = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
End While
|
||||
|
||||
' Attivo visualizzazione misura
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(Pz, NAME_REGION)
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While nId <> GDB_ID.NULL
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
End If
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
|
||||
' Calcolo dimensione ingombro Pezzo tramite OutLoop
|
||||
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
|
||||
' Se pezzo con dati TRF
|
||||
If m_bTrfData Then
|
||||
' Nome da dati Trf
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = m_TrfOrderCode & "-" & m_TrfOrderDesc
|
||||
Dim sText2 As String = m_TrfMatCode & "-" & m_TrfSurfCode
|
||||
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(m_TrfThickness, 0)
|
||||
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
|
||||
If dRatio < 5 Then
|
||||
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
|
||||
Else
|
||||
sText = sText & " " & sText2 & " " & sText3
|
||||
End If
|
||||
EgtModifyText(nTextId, sText)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(nTextId, ptCen)
|
||||
Dim b3Text As New BBox3d
|
||||
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
|
||||
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
|
||||
If dCoeff < 1 Then EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
' Info di pezzo da dati Trf
|
||||
EgtSetInfo(Pz, "OC", m_TrfOrderCode)
|
||||
EgtSetInfo(Pz, "OD", m_TrfOrderDesc)
|
||||
EgtSetInfo(Pz, "PC", m_TrfPartCode)
|
||||
EgtSetInfo(Pz, "MT", m_TrfMatCode)
|
||||
EgtSetInfo(Pz, "SRF", m_TrfSurfCode)
|
||||
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
|
||||
EgtSetInfo(Pz, "T", m_TrfThickness)
|
||||
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
|
||||
' Se altrimenti pezzo con dati Csv
|
||||
ElseIf m_bCsvData Then
|
||||
' Nome del pezzo
|
||||
EgtSetName(Pz, m_sCsvName)
|
||||
' Dati Csv
|
||||
EgtSetInfo(Pz, INFO_CSV_PART, m_sCsvName)
|
||||
EgtSetInfo(Pz, INFO_CSV_ORD, m_sCsvOrder)
|
||||
EgtSetInfo(Pz, INFO_CSV_DIST, m_sCsvList)
|
||||
EgtSetInfo(Pz, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(Pz, INFO_CSV_V1, DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, INFO_CSV_V2, DoubleToString(b3Part.DimY(), 1))
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(m_sCsvName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = m_sCsvName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Altrimenti pezzo con dati normali
|
||||
Else
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = sName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||
If TopChBx.IsVisible() And TopChBx.IsChecked() Then
|
||||
Utility.AddTopToPartRegion(nRegLayId)
|
||||
End If
|
||||
' Scrivo testi per nesting
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor(nRegLayId)
|
||||
' Esporto il pezzo in un file temporaneo
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
|
||||
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||
Return False
|
||||
End If
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
' Inserisco il pezzo
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nId2 As Integer = EgtGetLastPart()
|
||||
' Aggiusto per lavorazioni
|
||||
EgtAdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
If bDirect Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
||||
' Eventuale notifica al VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw(nId2)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
' Aggiorno Aree totale
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
|
||||
' passo al pezzo successivo
|
||||
Pz = NxtPz
|
||||
End While
|
||||
' Aggiorno Aree da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_bBackFromInternalCompo = False
|
||||
m_bInternalCompo = False
|
||||
@@ -883,7 +1081,8 @@ Public Class DrawPageUC
|
||||
' Leggo numero di pezzi da inserire
|
||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||
' Passo al contesto principale
|
||||
MakeInsert(InsNbr, sPartName)
|
||||
'MakeInsert(InsNbr, sPartName)
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino nome del componente precedente
|
||||
|
||||
@@ -367,23 +367,26 @@ Public Class InternalComponentPageUC
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DrawPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
|
||||
' torno alla pagina iniziale di selezione del piano (Compo)
|
||||
'm_MainWindow.m_DrawPageUC.BackBtn_Click(sender, e)
|
||||
|
||||
'--------- NUOVA GESTIONE ---------
|
||||
' rimuovo l'elenco di bottoni per selezionare il tipo di componente interna
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
' inserisco nella Grid VaribalsesGrid lo UeserControl per definire le dimensioni della componente
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
' nascondo la lista dei parametri
|
||||
m_MainWindow.m_DrawPageUC.m_CompoDimension.CollapsedAllParam()
|
||||
' sto uscendo dalla componente interna (quindi comunico il cambio di componente)
|
||||
m_MainWindow.m_DrawPageUC.m_bInternalCompo = False
|
||||
' comunico che sto arrivando da una componente interna
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = True
|
||||
If m_MainWindow.m_DrawPageUC.m_CompoDimension.bEnableAlzFront Then
|
||||
' rimuovo l'elenco di bottoni per selezionare il tipo di componente interna
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
' inserisco nella Grid VaribalsesGrid lo UeserControl per definire le dimensioni della componente
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
' nascondo la lista dei parametri
|
||||
m_MainWindow.m_DrawPageUC.m_CompoDimension.CollapsedAllParam()
|
||||
' sto uscendo dalla componente interna (quindi comunico il cambio di componente)
|
||||
m_MainWindow.m_DrawPageUC.m_bInternalCompo = False
|
||||
' comunico che sto arrivando da una componente interna
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = True
|
||||
Return
|
||||
End If
|
||||
|
||||
'--------- VECCHIA GESTIONE ---------
|
||||
' torno alla pagina iniziale di selezione del piano (Compo)
|
||||
m_MainWindow.m_DrawPageUC.BackBtn_Click(sender, e)
|
||||
'm_MainWindow.m_DrawPageUC.SelectedComponent(m_MainWindow.m_DrawPageUC.m_sMainCompo)
|
||||
'm_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.CompoDimension
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.CompoDimension
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -78,7 +78,10 @@
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
@@ -61,7 +61,7 @@ Public Class FrameCutPageUC
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida
|
||||
End If
|
||||
SelSectionBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
||||
SelSectionBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
||||
|
||||
@@ -296,8 +296,13 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
PreCutExitChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = ( nPreCutExit <> 0)
|
||||
End If
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
@@ -371,6 +376,7 @@ Public Class AlarmsPageUC
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
Private Sub RefreschMachining()
|
||||
If m_CurrentMachine.sCurrSawing <> String.Empty Then
|
||||
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
|
||||
@@ -532,6 +538,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- DRILL --
|
||||
@@ -565,6 +573,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- MILL --
|
||||
@@ -598,6 +608,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- CUPWHEEL --
|
||||
@@ -631,6 +643,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- WATERJET --
|
||||
@@ -662,6 +676,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
#End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET
|
||||
|
||||
@@ -24,6 +24,9 @@ Public Class CurrentMachine
|
||||
' Ritardo tra reset e invio programma per NUM
|
||||
Private m_nResetSendDelay As Integer = 1000
|
||||
|
||||
' tempo di arresto sospensione dei Thread prima dopo aver lanciato il comando CN
|
||||
Private m_nThreadSleep As Integer = 150
|
||||
|
||||
' Dati su linea di produzione
|
||||
Private m_bProdLine As Boolean = False
|
||||
Private m_sVarProg1 As String = "E80021"
|
||||
@@ -216,6 +219,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property nThreadSleep As Integer
|
||||
Get
|
||||
Return m_nThreadSleep
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bProdLine As Boolean
|
||||
Get
|
||||
Return m_bProdLine
|
||||
@@ -1017,6 +1026,8 @@ Public Class CurrentMachine
|
||||
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nResetSendDelay = GetPrivateProfileInt(S_NCNUM, K_RESETSENDDELAY, 1000, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nThreadSleep = GetPrivateProfileInt(S_NCNUM, K_THREADSLEEP, 150, sMachIniFile)
|
||||
' Leggo se linea di produzione e parametri relativi
|
||||
m_bProdLine = (GetPrivateProfileInt(S_PRODUCTIONLINE, K_ACTIVE, 0, sMachIniFile) <> 0)
|
||||
If m_bProdLine And Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.PRODUCTION_LINE) Then
|
||||
|
||||
@@ -56,6 +56,12 @@ Public Class MachineCNPageUC
|
||||
m_ButtonPower.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
Dim sTestVal As String = String.Empty
|
||||
' se non trovo il primo pulsante della lista allora nascondo l'elenco dei pulasnti per accensione
|
||||
If GetPrivateProfileString("MachineButtons", K_BUTTON & "1", "", sTestVal, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
Return
|
||||
End If
|
||||
While bFoundBtn
|
||||
Dim sNameBtn As String = K_BUTTON & (m_nCount).ToString()
|
||||
Dim sMachineButtonType As String = String.Empty
|
||||
@@ -267,8 +273,8 @@ Public Class MachineCNPageUC
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(PowerOFFButton) Then
|
||||
PowerOFFButton.SetIsChecked(Not bPowerOFF)
|
||||
PowerOFFBtn.IsChecked = Not bPowerOFF
|
||||
PowerOFFButton.SetIsChecked(bPowerOFF)
|
||||
PowerOFFBtn.IsChecked = bPowerOFF
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -29,12 +29,22 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@ Public Class MachinePageUC
|
||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
AlarmsBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 5)
|
||||
ToolsDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
AlarmsBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 5)
|
||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
PolishingsBtn.Content = EgtMsg(91090)
|
||||
TestingPageBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
StatisticsBtn.Content = EgtMsg(90709)
|
||||
|
||||
' Apro pagina dati macchina
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid Name="B">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -118,12 +118,18 @@ Public Class MachineStatusUC
|
||||
If Index < m_AxesNumber Then
|
||||
HorizontalGrid.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If HorizontalGrid.Name = "B" And m_AxesNumber = 4 Then
|
||||
' se macchina a 4 assi allora nascondo le info dell'asse B
|
||||
HorizontalGrid.Visibility = Windows.Visibility.Collapsed
|
||||
Continue For
|
||||
End If
|
||||
Dim BorderRow As New RowDefinition
|
||||
BorderRow.Height = New GridLength(2, GridUnitType.Pixel)
|
||||
HorizontalGrid.RowDefinitions.Add(BorderRow)
|
||||
Dim AxisGrid As New RowDefinition
|
||||
AxisGrid.Height = New GridLength(1, GridUnitType.Star)
|
||||
HorizontalGrid.RowDefinitions.Add(AxisGrid)
|
||||
|
||||
For Each Children As UIElement In HorizontalGrid.Children
|
||||
If TypeOf Children Is System.Windows.Controls.Primitives.UniformGrid Then
|
||||
Dim AxisUniformGrid As System.Windows.Controls.Primitives.UniformGrid = DirectCast(Children, System.Windows.Controls.Primitives.UniformGrid)
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="CurveBrd" Grid.Column="0" Grid.Row="18" Grid.ColumnSpan="4" Grid.RowSpan="3"
|
||||
<Border Name="CurveBrd" Grid.Column="0" Grid.Row="15" Grid.ColumnSpan="4" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_NoNameGroupBorder}">
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -705,8 +705,9 @@ Public Class MachiningDbPageUC
|
||||
LonOffsetTxBx.Visibility = Windows.Visibility.Visible
|
||||
Select Case nMachiningType
|
||||
Case MCH_MY.SAWING 'Parametri Taglio
|
||||
SideAngleTxBl.Visibility = Windows.Visibility.Visible
|
||||
SideAngleTxBx.Visibility = Windows.Visibility.Visible
|
||||
' nascondo il parametro di sbandamento
|
||||
SideAngleTxBl.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleTxBx.Visibility = Windows.Visibility.Hidden
|
||||
InvertTxBl.Visibility = Windows.Visibility.Visible
|
||||
InvertChBx.Visibility = Windows.Visibility.Visible
|
||||
AcrossTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -723,40 +724,58 @@ Public Class MachiningDbPageUC
|
||||
TypeBrd.Visibility = Windows.Visibility.Visible
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
If RowNum > 1 Then
|
||||
For Index As Integer = RowNum - 1 To 1 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 0)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 0)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 3)
|
||||
End If
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
LeadOutTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadOutTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ExtLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
LeadLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
LeadLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurveBrd.Visibility = Windows.Visibility.Hidden
|
||||
If MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
MachParamGrd.Children.Remove(StartPosTxBl)
|
||||
MachParamGrd.Children.Remove(StartPosTxBx)
|
||||
TypeGrd.Children.Add(StartPosTxBl)
|
||||
TypeGrd.Children.Add(StartPosTxBx)
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
|
||||
CurveBrd.Visibility = Windows.Visibility.Visible
|
||||
|
||||
'If Not MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
If TypeGrd.Children.Contains(StartPosTxBl) Then
|
||||
'MachParamGrd.Children.Remove(StartPosTxBl)
|
||||
'MachParamGrd.Children.Remove(StartPosTxBx)
|
||||
'TypeGrd.Children.Add(StartPosTxBl)
|
||||
'TypeGrd.Children.Add(StartPosTxBx
|
||||
TypeGrd.Children.Remove(StartPosTxBl)
|
||||
TypeGrd.Children.Remove(StartPosTxBx)
|
||||
MachParamGrd.Children.Add(StartPosTxBl)
|
||||
MachParamGrd.Children.Add(StartPosTxBx)
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_MachLeftCalculatorTextBoxInBorder")
|
||||
ElseIf MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
End If
|
||||
StartPosTxBl.Visibility = Windows.Visibility.Visible
|
||||
StartPosTxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -914,6 +933,18 @@ Public Class MachiningDbPageUC
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -1079,6 +1110,14 @@ Public Class MachiningDbPageUC
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_LeftCalculatorTextBoxNoBorder")
|
||||
ElseIf MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 6)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 6)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_LeftCalculatorTextBoxNoBorder")
|
||||
End If
|
||||
StartPosTxBl.Visibility = Windows.Visibility.Visible
|
||||
StartPosTxBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
@@ -160,12 +160,12 @@ Public Class ToolsDbPageUC
|
||||
ToolScene.SetStatusNull()
|
||||
' Inizializzo le famiglie di utensili nell'albero
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg( 90751))
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg( 90752))
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg( 90753))
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg( 90754))
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756))
|
||||
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg( 90755))
|
||||
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg(90751))
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg(90752))
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg(90753))
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg(90754))
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg(90756))
|
||||
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg(90755))
|
||||
' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
|
||||
If Not m_CurrMachine.bShowHeadExit Then
|
||||
MoveParam()
|
||||
@@ -708,6 +708,8 @@ Public Class ToolsDbPageUC
|
||||
' Aggiorno visualizzazione
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
EgtSetView(VT.TOP, False)
|
||||
'EgtSetGenericView(150, -150)
|
||||
'EgtSetView(VT.ISO_SE, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -323,8 +323,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2305, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2305, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2309, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2309, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -433,7 +433,8 @@ Class MainWindow
|
||||
End If
|
||||
|
||||
' abilito il bottone per la gestione del comando di Check-Up-Start (posziona lama prelavorazione)
|
||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 Then
|
||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
||||
Not File.Exists( m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||
@@ -1096,9 +1097,9 @@ Class MainWindow
|
||||
End If
|
||||
|
||||
' seleziono il tipo di avvio
|
||||
'm_CurrentProjectPageUC.StartProgram()
|
||||
m_CurrentProjectPageUC.StartProgram()
|
||||
' aggiorno la grafica
|
||||
EgtDraw()
|
||||
EgtZoom(ZM.ALL, True)
|
||||
End Sub
|
||||
|
||||
Friend Sub EgtWPFInit()
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.6.3")>
|
||||
<Assembly: AssemblyFileVersion("2.3.6.3")>
|
||||
<Assembly: AssemblyVersion("2.3.9.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.9.1")>
|
||||
|
||||
@@ -330,10 +330,10 @@ Public Class CNCommunication
|
||||
If m_IsNewConsole Then
|
||||
GetPrivateProfileString(S_NCDATA, K_XYJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_BCJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BCJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZCJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZBJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
End If
|
||||
@@ -556,8 +556,8 @@ Public Class CNCommunication
|
||||
' Nuovi bottoni (uso joystick)
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZJogChanged(m_CN.bZJog)
|
||||
m_MainWindow.m_DirectCutPageUC.BCJogChanged(m_CN.bBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
@@ -576,8 +576,8 @@ Public Class CNCommunication
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -62,8 +62,8 @@ Public MustInherit Class CN_generico
|
||||
LaserTrac = 46
|
||||
|
||||
XYJog = 47
|
||||
ZJog = 48
|
||||
BCJog = 49
|
||||
ZCJog = 48
|
||||
ZBJog = 49
|
||||
PowerON = 50
|
||||
End Enum
|
||||
|
||||
@@ -201,8 +201,8 @@ Public MustInherit Class CN_generico
|
||||
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
Public bXYJog As Boolean
|
||||
Public bZJog As Boolean
|
||||
Public bBCJog As Boolean
|
||||
Public bZCJog As Boolean
|
||||
Public bZBCJog As Boolean
|
||||
|
||||
Public bPowerON As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
@@ -1079,10 +1079,10 @@ Namespace Num
|
||||
|
||||
Case CnData.XYJog ' (46)
|
||||
bXYJog = CBool(values(n))
|
||||
Case CnData.ZJog ' (47)
|
||||
bZJog = CBool(values(n))
|
||||
Case CnData.BCJog ' (48)
|
||||
bBCJog = CBool(values(n))
|
||||
Case CnData.ZCJog ' (47)
|
||||
bZCJog = CBool(values(n))
|
||||
Case CnData.ZBJog ' (48)
|
||||
bZBCJog = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
bPowerON = CBool(values(n))
|
||||
|
||||
|
||||
@@ -173,6 +173,9 @@
|
||||
<Compile Include="DirectCuts\SingleCutAuto.xaml.vb">
|
||||
<DependentUpon>SingleCutAuto.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\SingleDrillUC.xaml.vb">
|
||||
<DependentUpon>SingleDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
||||
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -196,6 +199,9 @@
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\CicloStartWD.xaml.vb">
|
||||
<DependentUpon>CicloStartWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\SlabIdWD.xaml.vb">
|
||||
<DependentUpon>SlabIdWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -397,6 +403,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\SingleDrillUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\AlzFrontUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -422,6 +432,8 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
@@ -730,6 +742,7 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AvantiVeloce.png" />
|
||||
<Resource Include="Resources\IndietroVeloce.png" />
|
||||
<Resource Include="Resources\NewIcons\ZCJog.png" />
|
||||
<Resource Include="Resources\Pause.png" />
|
||||
<Resource Include="Resources\Play.png" />
|
||||
</ItemGroup>
|
||||
@@ -1028,6 +1041,64 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SlabId.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\XYJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZBJog.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Nuovo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Carica.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva-con-nome.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Vein-match.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DB-lavorazioni.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DB-utensili.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Macchina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Movimento-manuale.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-singolo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-multiplo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-griglia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Spianatura.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Copia-dima.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Sezione-cornice.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Foro-singolo.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/NewIcons/Zoom-.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/NewIcons/ZoomWIn.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/NewIcons/logo-OmCut.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Nuove icone da sistemare-->
|
||||
<BitmapImage x:Key="AvantiVeloceImg" UriSource="Resources/NewIcons/AvantiVeloce.png"></BitmapImage>
|
||||
<BitmapImage x:Key="IndietroVeloceImg" UriSource="Resources/NewIcons/IndietroVeloce.png"></BitmapImage>
|
||||
@@ -88,6 +88,28 @@
|
||||
<BitmapImage x:Key="StopImg" UriSource="Resources/NewIcons/Stop.png"></BitmapImage>
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/NewIcons/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Roboto</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#636974" />
|
||||
|
||||
@@ -155,6 +155,32 @@
|
||||
<BitmapImage x:Key="StopImg" UriSource="Resources/Stop.png"></BitmapImage>
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--sono le stesse immagini usate per l'interfaccia Dark-->
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Foro-singoloImg" UriSource="Resources/NewIcons/Foro-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#FFFFFFFF" />
|
||||
@@ -921,7 +947,16 @@
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!--DataTemplate testo ed immagine-->
|
||||
<DataTemplate x:Key="FileNameLsBxItem">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{Binding GraphicName}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
DockPanel.Dock="Left" Width="130"/>
|
||||
<TextBlock Text="{Binding sDate}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
DockPanel.Dock="Right" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<!--DataTemplate testo ed immagine-->
|
||||
<DataTemplate x:Key="DataTemplateItem">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -537,28 +537,54 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Selezione il tipo di avvio del programma-->
|
||||
<GroupBox Name="StartLauncherGpBx"
|
||||
Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedbackGpBx"
|
||||
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ Public Class OptionsPageUC
|
||||
Private UnitsList() As String = {"inch", "mm"}
|
||||
Private ThemesList() As String = {"Classic", "Dark"}
|
||||
|
||||
Private StartLauncherList() As String = {"Last Project", "New Project", "Open Folder", "Show Window"}
|
||||
|
||||
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
' Associazione della lista linguaggi alla combobox
|
||||
@@ -28,6 +30,11 @@ Public Class OptionsPageUC
|
||||
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
|
||||
Themes_StartUp()
|
||||
|
||||
' Carico la lista con il tipo di avvio
|
||||
StartLauncherCmBx.ItemsSource = StartLauncherList
|
||||
' 0-New, 1-Last, 2-Open, 3-Window
|
||||
StartLauncherCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
|
||||
' Rendo invisibile il GroupBox dei Temi la versione corrente
|
||||
' ThemesGpBx.Visibility = Windows.Visibility.Collapsed
|
||||
|
||||
@@ -102,7 +109,7 @@ Public Class OptionsPageUC
|
||||
ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
||||
AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
|
||||
LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28)
|
||||
|
||||
StartLauncherGpBx.Header = "Avvio Programma"
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSlabDxf()
|
||||
@@ -304,6 +311,11 @@ Public Class OptionsPageUC
|
||||
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub StartLauncherCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles StartLauncherCmBx.SelectionChanged
|
||||
Dim nIndex As Integer = StartLauncherCmBx.SelectedIndex
|
||||
WritePrivateProfileString(S_GENERAL, K_AUTOLOADLASTPROJ, StartLauncherCmBx.SelectedIndex, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
|
||||
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
|
||||
EgtSetUiUnits(bMM)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<Window x:Class="CicloStartWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="200" Width="426.5" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CicloStartTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,38 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Class CicloStartWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Public Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
' inizializzo la finestra
|
||||
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' posiziono la fistra in centro alla pagina
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' imopposto il messaggio di avvio
|
||||
CicloStartTxbl.Text = "Avvio Ciclo-Start"
|
||||
End Sub
|
||||
|
||||
' creo un progetto nuovo
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
' Ultimo progetto
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
' Aspetto e lo avvio
|
||||
System.Threading.Thread.Sleep(300)
|
||||
' avvio il ciclo start della macchina
|
||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
|
||||
@@ -93,6 +93,14 @@ Public Class CurrentProjectPageUC
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetDistLineMaterial(DstLnColor)
|
||||
|
||||
''imposto il colore di sfondo del progetto
|
||||
'Dim BAckTopColor As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
|
||||
'Dim BackBottom As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
|
||||
'CurrentProjectScene.SetViewBackground(BAckTopColor, BackBottom)
|
||||
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
|
||||
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -174,26 +182,27 @@ Public Class CurrentProjectPageUC
|
||||
m_bFirst = False
|
||||
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
'' apro la finstra di selezione di avvio del programma
|
||||
' apro la finstra di selezione di avvio del programma
|
||||
'StartProgram()
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
|
||||
' Se richiesto, carico ultimo progetto
|
||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
If bAutoLoadLast Then
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
If Not LoadProject(sPath, False) Then
|
||||
NewProject()
|
||||
End If
|
||||
EgtResetModified()
|
||||
'Altrimenti ne imposto uno nuovo
|
||||
Else
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
NewProject()
|
||||
End If
|
||||
'' Se richiesto, carico ultimo progetto
|
||||
'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
'If bAutoLoadLast Then
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' If Not LoadProject(sPath, False) Then
|
||||
' NewProject()
|
||||
' End If
|
||||
' EgtResetModified()
|
||||
' 'Altrimenti ne imposto uno nuovo
|
||||
'Else
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' NewProject()
|
||||
'End If
|
||||
|
||||
'' creo nuovo progetto
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress per fotografia
|
||||
@@ -227,16 +236,18 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Public Sub StartProgram()
|
||||
' leggo il tipo di avvio del programma: 0-New, 1-Last, 2-Open, 3-Window
|
||||
Dim nStart As Integer = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
|
||||
Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow)
|
||||
MyStartLancherWD.ShowDialog()
|
||||
|
||||
' Se richiesto, carico ultimo progetto
|
||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' se ultimo progetto
|
||||
If MyStartLancherWD.CurrSelection = 2 Then
|
||||
bAutoLoadLast = True
|
||||
' mostro la finestra di avvio solo se configirato (= 3)
|
||||
If nStart = MODE_LAUNCHER.ShowWindow Then
|
||||
MyStartLancherWD.ShowDialog()
|
||||
Else
|
||||
MyStartLancherWD.CurrSelection = nStart
|
||||
End If
|
||||
|
||||
If MyStartLancherWD.CurrSelection = MODE_LAUNCHER.LastProject Then
|
||||
' Stampo il numero di progetto con 4 decimali: 12 -> "0012"
|
||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' provo ad aprire l'ultimo progetto modificato
|
||||
@@ -249,21 +260,58 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
EgtResetModified()
|
||||
|
||||
' apro il file selezionato all'avvio
|
||||
ElseIf MyStartLancherWD.CurrSelection = 3 Then
|
||||
If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||
' altrimenti apro un nuovo progetto
|
||||
NewProject()
|
||||
Else
|
||||
' salvo il nome del file caricato
|
||||
m_MruFiles.Add(MyStartLancherWD.SelPath)
|
||||
End If
|
||||
EgtResetModified()
|
||||
|
||||
' se nuovo progetto o naviga direttorio
|
||||
ElseIf MyStartLancherWD.CurrSelection = 1 Or MyStartLancherWD.CurrSelection = 0 Then
|
||||
bAutoLoadLast = False
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.NewProject Then
|
||||
NewProject()
|
||||
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.OpenFolder Then
|
||||
NewProject()
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Cancello eventuali messaggi
|
||||
ClearMessage()
|
||||
' Imposto la pagina attualmente attiva come Previous
|
||||
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage
|
||||
' Passo alla pagina di apertura con preview
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
|
||||
NewProject()
|
||||
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
|
||||
Dim sCurrFile As String = Path.GetFileName(MyStartLancherWD.SelPath)
|
||||
|
||||
If Not LoadProject(sCurrDir & "\" & sCurrFile) Then
|
||||
NewProject()
|
||||
m_MruFiles.Remove(sCurrDir & "\" & sCurrFile)
|
||||
Else
|
||||
' Verifico se file salvato con nome guardando il nome della cartella in cui si trova
|
||||
Dim sSaveNameDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVENAMEDIR, "", sSaveNameDir, m_MainWindow.GetIniFile())
|
||||
If sCurrDir = sSaveNameDir Then
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, sCurrFile.Substring(0, sCurrFile.Length - 4), m_MainWindow.GetIniFile())
|
||||
' Salvo equivalente con indice
|
||||
SetNextProjectIndex()
|
||||
SaveProject()
|
||||
Else
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, String.Empty, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' Salvo path di carico del progetto
|
||||
If sCurrDir <> m_MainWindow.GetSaveDir() And sCurrDir <> sSaveNameDir Then
|
||||
SetLoadPath(sCurrDir & "\" & sCurrFile)
|
||||
End If
|
||||
m_MruFiles.Add(sCurrDir & "\" & sCurrFile)
|
||||
End If
|
||||
|
||||
'If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||
' ' altrimenti apro un nuovo progetto
|
||||
' NewProject()
|
||||
'Else
|
||||
' ' salvo il nome del file caricato
|
||||
' m_MruFiles.Add(MyStartLancherWD.SelPath)
|
||||
'End If
|
||||
'EgtResetModified()
|
||||
End If
|
||||
|
||||
'' Nascondo progress per fotografia
|
||||
@@ -280,6 +328,26 @@ Public Class CurrentProjectPageUC
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
|
||||
Private Sub ChooseMachining() Handles CurrProjGrid.MouseDown
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
Dim m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
|
||||
' apro la finestra per la selezione delle lavorazioni
|
||||
m_ChooseMachiningPage.ShowDialog()
|
||||
' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
ClearMessage()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
If m_bSelectCurv Then
|
||||
RaiseEvent OnMouseDownSceneSelCurv(sender, e)
|
||||
@@ -423,16 +491,28 @@ Public Class CurrentProjectPageUC
|
||||
EgtErase(EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE))
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
Dim dAddTable As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||
' Se non esiste sovratavola, esco subito
|
||||
' Se non richiesta sovratavola, non c'è altro da fare ed esco
|
||||
If dAddTable < 10 * EPS_SMALL Then Return True
|
||||
' Recupero box tavola
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetTableArea(1, ptMin, ptMax)
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
ptMin.z = ptMax.z
|
||||
ptMax.z += dAddTable
|
||||
Dim nAddTabId As Integer = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
||||
' Nuova geometria
|
||||
Dim nAddTabId As Integer = GDB_ID.NULL
|
||||
' Se esiste geometria di riferimento
|
||||
Dim nRefAddTabId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( EgtGetTableId( MAIN_TAB), "SOLID"), MACH_ADD_TABLE)
|
||||
If nRefAddTabId <> GDB_ID.NULL Then
|
||||
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
||||
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
||||
EgtScale( nAddTabId, new Frame3d( ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
Else
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
ptMin.z = ptMax.z
|
||||
ptMax.z += dAddTable
|
||||
nAddTabId = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
||||
End If
|
||||
' Sistemazioni finali
|
||||
If nAddTabId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
@@ -588,6 +668,8 @@ Public Class CurrentProjectPageUC
|
||||
SetProjectMaterial()
|
||||
' Eseguo
|
||||
If Not SaveFile(sPath) Then Return False
|
||||
' aggiungo il file all'elenco dei file recenti
|
||||
m_MruFiles.Add(sPath)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
' Salvo eventuale VeinMatching
|
||||
@@ -641,6 +723,8 @@ Public Class CurrentProjectPageUC
|
||||
If Not SaveFile(sPath) Then
|
||||
Return False
|
||||
End If
|
||||
' aggiungo il file all'elenco dei file recenti
|
||||
m_MruFiles.Add(sPath)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
|
||||
@@ -14,28 +14,41 @@
|
||||
<ColumnDefinition Width="1.3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Name="LowerButtonGrid" Rows="1" >
|
||||
|
||||
<Button Name="NewBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="LoadBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveNameBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
|
||||
<Button Name="CSVBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<ToggleButton Name="VeinMatchingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Button Name="NewBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LoadBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource CaricaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SaveBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SalvaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SaveNameBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Salva-con-nomeImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CSVBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource CSVImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<ToggleButton Name="VeinMatchingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Vein-matchImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
<Button Name="ResetCutBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_BlueToggleButton}"/>
|
||||
|
||||
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_BlueToggleButton}"></ToggleButton>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/>
|
||||
|
||||
@@ -14,12 +14,13 @@ Public Class ProjectMgrUC
|
||||
|
||||
Private Sub ProjectMgrUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
NewBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
||||
LoadBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 4)
|
||||
SaveBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 5)
|
||||
SaveNameBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 6)
|
||||
CSVBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 8)
|
||||
VeinMatchingBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 9)
|
||||
NewBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
||||
LoadBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 4)
|
||||
SaveBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 5)
|
||||
SaveNameBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 6)
|
||||
CSVBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 8)
|
||||
VeinMatchingBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 9)
|
||||
|
||||
RegisterBtn.Content = "REG" 'Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
SimulateBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
@@ -126,6 +127,28 @@ Public Class ProjectMgrUC
|
||||
Return nTabInd
|
||||
End Function
|
||||
|
||||
Friend Function ChangeTable() As Integer
|
||||
Dim nTabInd As Integer = 0
|
||||
' se non abilitato esco dalla pagina
|
||||
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
Return nTabInd
|
||||
End If
|
||||
Select Case GetTableCount()
|
||||
Case 2
|
||||
' Tavolo da usare ?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case TableToUse.m_nPressedBtn
|
||||
Case 1 ' 1
|
||||
nTabInd = 1
|
||||
Case 0 ' 2
|
||||
nTabInd = 2
|
||||
End Select
|
||||
Case Else
|
||||
' negli altri casi (3 tavole o una tavola non fare nulla)
|
||||
End Select
|
||||
Return nTabInd
|
||||
End Function
|
||||
|
||||
Private Sub LoadBtn_Click(sender As Object, e As RoutedEventArgs) Handles LoadBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
@@ -153,6 +176,7 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Friend Sub PostLoad(ByVal sCurrDir As String, sCurrFile As String)
|
||||
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
If Not m_CurrProjPage.LoadProject(sCurrDir & "\" & sCurrFile) Then
|
||||
m_CurrProjPage.NewProject()
|
||||
@@ -297,9 +321,9 @@ Public Class ProjectMgrUC
|
||||
ptMid.x = (ptEnd.x + ptStart.x) / 2
|
||||
ptMid.y = (ptEnd.y + ptStart.y) / 2
|
||||
ptMid.z = (ptEnd.z + ptStart.z) / 2 + dDiam / 2
|
||||
ptMid -= vtDirT * dThick
|
||||
|
||||
'--------------------------- Imposto la posizione della macchina ----------------------------
|
||||
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
@@ -310,14 +334,15 @@ Public Class ProjectMgrUC
|
||||
Dim nStat As Integer
|
||||
Dim dC1, dB1, dC2, dB2 As Double
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z
|
||||
Dim dX, dY, dZ As Double
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
vtDirT.Rotate(Vector3d.Z_AX, 180)
|
||||
vtDirT = - vtDirT
|
||||
ptMid -= vtDirT * dThick
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
@@ -446,8 +471,18 @@ Public Class ProjectMgrUC
|
||||
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then
|
||||
m_MainWindow.ExecSentProgScript(False)
|
||||
''-------------------Avvio il Ciclo-Start-------------------------
|
||||
'Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
'MyCicloStartWD.ShowDialog()
|
||||
''-------------------Avvio il Ciclo-Start-------------------------
|
||||
End If
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
|
||||
' Altrimenti linea di produzione
|
||||
Else
|
||||
' Verifico non sia già stato trasmesso
|
||||
@@ -490,12 +525,12 @@ Public Class ProjectMgrUC
|
||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
If bSlabId Then
|
||||
Dim sBlock As String = ""
|
||||
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||
Dim nSlabNbr As Integer = GetPrivateProfileInt(S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||
nSlabNbr += 1
|
||||
Dim sSlabNbr As String = nSlabNbr.ToString()
|
||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
||||
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||
End If
|
||||
' Salvo il progetto
|
||||
m_CurrProjPage.SaveProject()
|
||||
@@ -523,6 +558,7 @@ Public Class ProjectMgrUC
|
||||
If AskTransm.m_nPressedBtn <> 1 Then Return
|
||||
End If
|
||||
End If
|
||||
|
||||
' Se non collegato alla macchina
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||
@@ -537,6 +573,7 @@ Public Class ProjectMgrUC
|
||||
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Leggo variabile relativa al programma 1 (standard E80021)
|
||||
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
||||
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1)
|
||||
@@ -610,6 +647,7 @@ Public Class ProjectMgrUC
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
||||
End If
|
||||
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
@@ -617,13 +655,6 @@ Public Class ProjectMgrUC
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
|
||||
'If m_CurrNcComm.m_nNCType = 3 AndAlso m_CurrNcComm.m_CN.m_IsSiemensOne Then
|
||||
' SiemensMoveAxis(ptMid, dAngC, dAngB)
|
||||
' Return
|
||||
'End If
|
||||
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
Return
|
||||
@@ -657,26 +688,8 @@ Public Class ProjectMgrUC
|
||||
|
||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||
Dim dAxVal As Double = ptMid.x
|
||||
Dim bThickSaw As Boolean = True
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.y
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.z
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", ptMid.x)
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", ptMid.y)
|
||||
EgtLuaSetGlobNumVar("CMD.Z_AXISMOVE", ptMid.z)
|
||||
' imposto gli angoli
|
||||
EgtLuaSetGlobNumVar("CMD.C_ANGMOVE", dAngC)
|
||||
@@ -692,15 +705,6 @@ Public Class ProjectMgrUC
|
||||
' Log del comando
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
|
||||
'' Eseguo in MDI
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
'System.Threading.Thread.Sleep(150)
|
||||
'm_CurrNcComm.m_CN.sz_ManualDataInput = CmdString
|
||||
'm_CurrNcComm.m_CN.MDI_command()
|
||||
'System.Threading.Thread.Sleep(150)
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_CycleStart()
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Modifico stringa per inserire i newline ( in questo caso non c'è bisogno perchè tutto sulla stessa linea)
|
||||
@@ -728,95 +732,6 @@ Public Class ProjectMgrUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SiemensMoveAxis(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua")
|
||||
|
||||
'----------- DATI MOVIMENTO -----------
|
||||
' imposto avanzamneto in rapido (non deve essere impostata feed e speed)
|
||||
EgtLuaSetGlobBoolVar("CMD.G0", True)
|
||||
'' fermo la rotazione dell'utensile (per sicure
|
||||
'EgtLuaSetGlobNumVar("CMD.F", 30000)
|
||||
'EgtLuaSetGlobNumVar("CMD.S", 0)
|
||||
|
||||
'----------- POSIZINE MACCHINA -----------
|
||||
' Leggo gli assi rispetto allo 0 macchina
|
||||
m_CurrNcComm.m_CN.set_OP_OM(0)
|
||||
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Dim dL1o, dL2o, dL3o As Double
|
||||
m_CurrNcComm.GetLinearAxesPositions(dL1o, dL2o, dL3o)
|
||||
Dim dR1, dR2 As Double
|
||||
m_CurrNcComm.GetRotaryAxesPositions(dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1o", dL1o)
|
||||
EgtLuaSetGlobNumVar("CMD.L2o", dL2o)
|
||||
EgtLuaSetGlobNumVar("CMD.L3o", dL3o)
|
||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||
|
||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||
Dim dAxVal As Double = ptMid.x
|
||||
Dim bThickSaw As Boolean = True
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.y
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.z
|
||||
EgtLuaSetGlobNumVar("CMD.Z_AXISMOVE", ptMid.z)
|
||||
|
||||
EgtLuaSetGlobNumVar("CMD.C_ANGMOVE", dAngC)
|
||||
EgtLuaSetGlobNumVar("CMD.B_ANGMOVE", dAngB)
|
||||
|
||||
' Calcolo stringa di comando risultante
|
||||
EgtLuaCallFunction("CmdString")
|
||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CmdString")
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Log del comando
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
|
||||
' Creo file
|
||||
Dim sFilePath As String = m_MainWindow.GetCncDir() & "\MANAXMOV.MPF"
|
||||
Try
|
||||
File.WriteAllLines(sFilePath, New List(Of String)({CmdString, "M30"}), Text.Encoding.UTF8)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Eccezione creazione programma: " & ex.Message)
|
||||
End Try
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.m_CN.Download_NC_prog(sFilePath, "MANAXMOV") = 0 Then
|
||||
EgtOutLog("Programma caricato")
|
||||
System.Threading.Thread.Sleep(150)
|
||||
Dim sActivateManAxMov As String = "/plc/OmagCUT_DB.CTRL.Start_Asup"
|
||||
' Attivo variabile per esecuzione comando manuale
|
||||
m_CurrNcComm.m_CN.DVariables_WriteVariables3(sActivateManAxMov, 1, 1, 0, 0, "")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
|
||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="300" Width="426.5" ShowInTaskbar="False">
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
@@ -14,19 +14,21 @@
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.4*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Messaggio di tipo di avvio-->
|
||||
<!--Messaggio: Selezione modalità di avvio-->
|
||||
<TextBlock Name="SlectLauncherTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -39,32 +41,33 @@
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="OpenFolder" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
ToolTip="OpenFolder">
|
||||
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="LastProject" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="LastProject">
|
||||
<Image Source="{DynamicResource LastProjImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="New Project">
|
||||
<Image Source="{DynamicResource CsvNewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="LastProject" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
ToolTip="LastProject">
|
||||
<Image Source="{DynamicResource CsvOpenImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="OpenFolder" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="OpenFolder">
|
||||
<Image Source="{DynamicResource CaricaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Grid.Column="1" Grid.Row="5">
|
||||
<TextBlock Name="FileName" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="DataFile" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
</UniformGrid>
|
||||
<!--lista degli ultimi file aperti-->
|
||||
<ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="5"
|
||||
SelectionMode="Extended">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="7" ItemTemplate="{DynamicResource FileNameLsBxItem}"
|
||||
SelectionMode="Extended">
|
||||
</ListBox>
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Enum MODE_LAUNCHER
|
||||
LastProject
|
||||
NewProject
|
||||
OpenFolder
|
||||
ShowWindow
|
||||
SelectedProject
|
||||
End Enum
|
||||
|
||||
Public Class StartLauncherWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Public Enum MODE_LAUNCHER As Integer
|
||||
OpenFolder = 0
|
||||
NewProject = 1
|
||||
LastProject = 2
|
||||
SelectedProject = 3
|
||||
End Enum
|
||||
' lista dei file recenti da visualizzare
|
||||
Private m_RecentFileList As New ObservableCollection(Of FileNameLsBxItem)
|
||||
|
||||
Private m_CurrSelection As MODE_LAUNCHER
|
||||
Public ReadOnly Property CurrSelection As MODE_LAUNCHER
|
||||
Public Property CurrSelection As MODE_LAUNCHER
|
||||
Get
|
||||
Return m_CurrSelection
|
||||
End Get
|
||||
Set(value As MODE_LAUNCHER)
|
||||
m_CurrSelection = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelPath As String = String.Empty
|
||||
@@ -30,25 +40,86 @@ Public Class StartLauncherWD
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
|
||||
Private Class FileNameLsBxItem
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Private m_sDate As String
|
||||
Private m_sName As String
|
||||
|
||||
Public Property sDate As String
|
||||
Get
|
||||
Return m_sDate
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sDate = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_sName Then
|
||||
m_sName = value
|
||||
NotifyPropertyChanged("Name")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GraphicName As String
|
||||
Get
|
||||
' recupero il nome del file con estensione, altrimenti -> Path.GetFileNameWithoutExtension(m_sName)
|
||||
Return Path.GetFileNameWithoutExtension(m_sName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Sub New(Name As String, dDate As Date)
|
||||
Me.m_sName = Name
|
||||
Me.m_sDate = dDate.ToString
|
||||
End Sub
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
|
||||
|
||||
' inizializzo la finestra
|
||||
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' carico la liste dei file recenti
|
||||
FilesLsBx.ItemsSource = m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
||||
FilesLsBx.ItemsSource = m_RecentFileList
|
||||
Dim ItemFile As String = String.Empty
|
||||
'carico la liste dei file recenti
|
||||
Dim sFileName As String = String.Empty
|
||||
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
||||
sFileName = ItemFile.Replace("__", "_")
|
||||
If Not String.IsNullOrEmpty(sFileName) Then
|
||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.Remove(ItemFile)
|
||||
End If
|
||||
Next
|
||||
|
||||
' posiziono la fistra in centro alla pagina
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
' imopposto il messaggio di avvio
|
||||
SlectLauncherTxbl.Text = "Seleziona modalità di avvio"
|
||||
FileName.Text = "Progetti recenti"
|
||||
DataFile.Text = "Ultima apertura"
|
||||
End Sub
|
||||
|
||||
' lancio l'apertura della pagina dei progetti
|
||||
Private Sub OpenFolder_Click(sender As Object, e As RoutedEventArgs) Handles OpenFolder.Click
|
||||
m_CurrSelection = MODE_LAUNCHER.OpenFolder
|
||||
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage
|
||||
' Passo alla pagina di apertura con preview
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
EgtZoom(ZM.ALL)
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
@@ -68,7 +139,8 @@ Public Class StartLauncherWD
|
||||
|
||||
' quando viene rilasciato il mouse
|
||||
Private Sub SelectProject_MouseUp(sender As Object, e As RoutedEventArgs) Handles FilesLsBx.MouseDoubleClick, FilesLsBx.TouchUp
|
||||
m_SelPath = FilesLsBx.SelectedItem
|
||||
' recupero il nome selezionato
|
||||
m_SelPath = FilesLsBx.SelectedItem.Name
|
||||
m_CurrSelection = MODE_LAUNCHER.SelectedProject
|
||||
EgtZoom(ZM.ALL)
|
||||
Me.Close()
|
||||
|
||||
@@ -19,10 +19,17 @@ Public Class ChooseMachining
|
||||
' attulmente questa ComboBox è spenta (ma potrebbe essere richiesta in futuro?)
|
||||
Private m_bNotShowAuxilaryCmBx As Boolean = False
|
||||
|
||||
Private m_MachIsModified As Boolean = False
|
||||
Public ReadOnly Property MachIsModified As Boolean
|
||||
Get
|
||||
Return m_MachIsModified
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
ShowDialog()
|
||||
'ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ChooseMachining_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
@@ -42,10 +49,12 @@ Public Class ChooseMachining
|
||||
CurrWJettingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
||||
CurrPocketingTxBl.Text = EgtMsg(90550)
|
||||
|
||||
' carico l'elenco delle lavorazioni della pagina (anche senza aver caricato la pagina)
|
||||
InitializeMachiningLists()
|
||||
End Sub
|
||||
|
||||
Private Sub ChooseMachining_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
InitializeMachiningLists()
|
||||
' InitializeMachiningLists()
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeMachiningLists()
|
||||
@@ -166,6 +175,14 @@ Public Class ChooseMachining
|
||||
Else
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
|
||||
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
||||
' verifico che il nome della lama esista
|
||||
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
|
||||
m_MachIsModified = True
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
|
||||
' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE --
|
||||
If m_bNotShowAuxilaryCmBx Then
|
||||
@@ -461,12 +478,19 @@ Public Class ChooseMachining
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
' titolo della ComboBox
|
||||
CurrDrillingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
' ComboBox (nella riga successiva al titolo)
|
||||
CurrDrillingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
'ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingCmBx.SelectedItem = m_CurrentMachine.sCurrDrilling
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrDrillingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrDrillingCmBx.SelectedItem <> m_CurrentMachine.sCurrDrilling Then m_MachIsModified = True
|
||||
End If
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
@@ -486,6 +510,11 @@ Public Class ChooseMachining
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
CurrMillingCmBx.SelectedItem = m_CurrentMachine.sCurrMilling
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrMillingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrMilling Then m_MachIsModified = True
|
||||
End If
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
@@ -505,6 +534,11 @@ Public Class ChooseMachining
|
||||
If m_CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
CurrPocketingCmBx.SelectedItem = m_CurrentMachine.sCurrPocketing
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrPocketingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrPocketing Then m_MachIsModified = True
|
||||
End If
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrPocketingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
@@ -523,6 +557,11 @@ Public Class ChooseMachining
|
||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrWJettingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJetting Then m_MachIsModified = True
|
||||
End If
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
@@ -74,6 +74,10 @@ Public Class RawPartPageUC
|
||||
Private Const SAFE_RAW_DIST As Double = 5
|
||||
' Costante raggio cerchietto
|
||||
Private Const RAD_CIRCLE As Double = 30
|
||||
|
||||
' mostra la pagina delle lavorazioni
|
||||
Private m_SmartMachiningPage As Boolean = False
|
||||
|
||||
' Costanti modo operazione punti
|
||||
Private Enum PTMODE
|
||||
MOVE = 0
|
||||
@@ -137,6 +141,8 @@ Public Class RawPartPageUC
|
||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
|
||||
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo
|
||||
DamagedBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'By points - Per punti
|
||||
@@ -671,66 +677,80 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
' Sistemo il grezzo
|
||||
AdjustRawPartOnExit()
|
||||
' Imposto spessore del grezzo
|
||||
m_CurrProjPage.m_dRawHeight = GetRawHeight()
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Aggiorno lavorazione in interfaccia
|
||||
m_CurrProjPage.UpdateMachiningTxBx()
|
||||
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
|
||||
' Se ci sono pezzi nel grezzo
|
||||
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
' Se progetto con pezzi piani
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno regioni per nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
|
||||
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
|
||||
ShowParkedParts()
|
||||
' Verifico ogni singolo pezzo
|
||||
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
If Not EgtVerifyPart(nPartId, bReducedCut) Then
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
|
||||
VeinMatching.OnRemovePartFromRaw(nPartId)
|
||||
End If
|
||||
nPartId = nNextPartId
|
||||
End While
|
||||
' Nascondo i pezzi parcheggiati
|
||||
HideParkedParts()
|
||||
' Aggiusto eventuali solidi per lavorazioni da sotto
|
||||
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
UpdateSolidForDrip(nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
End If
|
||||
'--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
|
||||
' mostro la finestra di selezione delle lavorazioni
|
||||
If m_ChooseMachiningPage.MachIsModified OrElse Not m_SmartMachiningPage Then
|
||||
m_ChooseMachiningPage.ShowDialog()
|
||||
'--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
Return AdjustRawPartInCurrProject()
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
Return AdjustRawPartInCurrProject()
|
||||
End If
|
||||
' forzo l'uscita dalla pagina
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AdjustRawPartInCurrProject() As Boolean
|
||||
' Sistemo il grezzo
|
||||
AdjustRawPartOnExit()
|
||||
' Imposto spessore del grezzo
|
||||
m_CurrProjPage.m_dRawHeight = GetRawHeight()
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Aggiorno lavorazione in interfaccia
|
||||
m_CurrProjPage.UpdateMachiningTxBx()
|
||||
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
|
||||
' Se ci sono pezzi nel grezzo
|
||||
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
' Se progetto con pezzi piani
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno regioni per nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
|
||||
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
|
||||
ShowParkedParts()
|
||||
' Verifico ogni singolo pezzo
|
||||
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
If Not EgtVerifyPart(nPartId, bReducedCut) Then
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
|
||||
VeinMatching.OnRemovePartFromRaw(nPartId)
|
||||
End If
|
||||
nPartId = nNextPartId
|
||||
End While
|
||||
' Nascondo i pezzi parcheggiati
|
||||
HideParkedParts()
|
||||
' Aggiusto eventuali solidi per lavorazioni da sotto
|
||||
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
UpdateSolidForDrip(nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub RawModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RawModeCmBx.SelectionChanged
|
||||
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 41 KiB |
@@ -73,6 +73,9 @@ Public Class VeinMatchingWindow
|
||||
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
m_bFirst = False
|
||||
' --------------- ASSEMBLY 3D ----------------
|
||||
' disabilito il bottone per il disegno dell'assemblato
|
||||
|
||||
End If
|
||||
' inibisco selezione diretta da Scene
|
||||
VeinMatchingScene.SetStatusNull()
|
||||
@@ -164,7 +167,7 @@ Public Class VeinMatchingWindow
|
||||
EgtSetCurrentContext(VeinMatchingScene.GetCtx())
|
||||
' Se selezione riuscita, la eseguo anche in VME
|
||||
If bSelected Then EgtSelectObj(m_nIdToSel)
|
||||
' Se deselezione da eseguire
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
' Eseguo la deselezione in Nesting
|
||||
Dim bDeselected As Boolean = False
|
||||
|
||||