Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97ec72e3e1 | |||
| ca3193b9a4 | |||
| 93e7144753 | |||
| 31e6bbaca7 | |||
| 8935622888 | |||
| c47370405c |
@@ -618,6 +618,10 @@ Public Class DrawPageUC
|
|||||||
MakePreview(sMsg)
|
MakePreview(sMsg)
|
||||||
MessageTxBl.Text = sMsg
|
MessageTxBl.Text = sMsg
|
||||||
MessageGrid.Background = If(m_bDrawOk, Brushes.Transparent, Application.Current.FindResource("OmagCut_Red"))
|
MessageGrid.Background = If(m_bDrawOk, Brushes.Transparent, Application.Current.FindResource("OmagCut_Red"))
|
||||||
|
|
||||||
|
' EseguoUpdate del solido
|
||||||
|
Utility.CreateSolid3D(m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' aggiorno visualizzazione
|
' aggiorno visualizzazione
|
||||||
EgtSetView(VT.TOP, False)
|
EgtSetView(VT.TOP, False)
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -627,7 +631,8 @@ Public Class DrawPageUC
|
|||||||
' Costruisco path completa del componente
|
' Costruisco path completa del componente
|
||||||
Dim sPath = m_sCompoDir & "\" & m_sCompoName
|
Dim sPath = m_sCompoDir & "\" & m_sCompoName
|
||||||
' Carico il file
|
' Carico il file
|
||||||
Return EgtLuaExecFile(sPath)
|
Dim bOk As Boolean = EgtLuaExecFile(sPath)
|
||||||
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ReadAndShowVariables() As Boolean
|
Private Function ReadAndShowVariables() As Boolean
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class FiloTopUC
|
Public Class FiloTopUC
|
||||||
|
|
||||||
@@ -109,6 +110,9 @@ Public Class FiloTopUC
|
|||||||
End While
|
End While
|
||||||
nPartId = EgtGetNextPart(nPartId)
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
Utility.CreateSolid3D(m_MainWindow.GetIniFile())
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Parameter3ChBx_Checked() Handles Parameter3ChBx.Click
|
Private Sub Parameter3ChBx_Checked() Handles Parameter3ChBx.Click
|
||||||
@@ -216,12 +220,16 @@ Public Class FiloTopUC
|
|||||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If bOk Then Utility.CreateSolid3D(m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
nPartId = EgtGetNextPart(nPartId)
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
End While
|
End While
|
||||||
|
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -579,6 +579,10 @@ Public Class SideAngleUC
|
|||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
CreateDripGeom(PartId)
|
CreateDripGeom(PartId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' se abilitato e dimensione solido da sotto: creo il solido
|
||||||
|
Utility.CreateSolid3D(m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -567,16 +567,55 @@ Public Class SimulationPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GenerateXPIUC_Click(sender As Object, e As RoutedEventArgs)
|
Private Sub GenerateXPIUC_Click(sender As Object, e As RoutedEventArgs)
|
||||||
' eventualmente fermo la simulazione
|
|
||||||
m_nStatus = MCH_SIM_ST.UI_STOP
|
|
||||||
m_bPlay = False
|
|
||||||
PlayPauseBtn_Click(Nothing, Nothing)
|
|
||||||
|
|
||||||
' se il bottone Shift è premuto apro il file CadCut1 nel programma NotePad
|
' se il bottone Shift è premuto apro il file CadCut1 nel programma NotePad
|
||||||
Dim IsPressedShiftKey As Boolean = False
|
Dim IsPressedShiftKey As Boolean = False
|
||||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||||
IsPressedShiftKey = True
|
IsPressedShiftKey = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Se nella pagina di tagli diretti
|
||||||
|
If m_MainWindow.DirectCutBtn.IsChecked And Not m_MainWindow.CadCutBtn.IsChecked Then
|
||||||
|
' Genero file CNC (lancio anche se errore in precedenza)
|
||||||
|
Dim sCncPathDirect As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||||
|
Dim bOkDirect As Boolean = EgtGenerate(sCncPathDirect, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||||
|
|
||||||
|
' Costringo ad aggiornare UI
|
||||||
|
UpdateUI()
|
||||||
|
' Ripristino come fase corrente quella iniziale
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
|
If bOkDirect Then
|
||||||
|
m_CurrProjPage.SetInfoMessage("Genarato file " & "DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt)
|
||||||
|
Else
|
||||||
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
|
End If
|
||||||
|
' procedo all'apertura del file CadCut1 apenna generato (solo se generazione corretta)
|
||||||
|
If bOkDirect And IsPressedShiftKey Then
|
||||||
|
Try
|
||||||
|
Process.Start("Notepad.exe", sCncPathDirect)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog(ex.ToString)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
' ricarico la pagina di simulazione
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
|
' nascondo i pezzi in parcheggio
|
||||||
|
HideParkedParts(True)
|
||||||
|
' Avvio ambiente di simulazione
|
||||||
|
EgtSimInit()
|
||||||
|
EgtSimStart()
|
||||||
|
' Imposto stato corrente
|
||||||
|
SetStatus(MCH_SIM_ST.UI_STOP)
|
||||||
|
m_bPlay = True
|
||||||
|
' Costringo ad aggiornare UI
|
||||||
|
UpdateUI()
|
||||||
|
' esco
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' eventualmente fermo la simulazione
|
||||||
|
m_nStatus = MCH_SIM_ST.UI_STOP
|
||||||
|
m_bPlay = False
|
||||||
|
PlayPauseBtn_Click(Nothing, Nothing)
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||||
' Elimino eventuale attrezzaggio da OmagOFFICE
|
' Elimino eventuale attrezzaggio da OmagOFFICE
|
||||||
|
|||||||
+31
-1
@@ -6,6 +6,36 @@ Imports EgtWPFLib
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Module Utility
|
Module Utility
|
||||||
|
|
||||||
|
'--------------------------------------------------------------------------------------------------
|
||||||
|
#Region "COMPO SOLID3d"
|
||||||
|
|
||||||
|
Friend Function CreateSolid3D(sIniFile As String) As Boolean
|
||||||
|
EgtSaveFile("C:\EgtData\OmagCUT\Temp\Ribasso.nge", NGE.TEXT)
|
||||||
|
Dim bOk As Boolean = False
|
||||||
|
Dim dRawHeight As Double = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, sIniFile)
|
||||||
|
' se abilitato e dimensione solido da sotto: creo il solido
|
||||||
|
Dim sPathSOLID As String = String.Empty
|
||||||
|
If GetPrivateProfileString(S_SIDES, "CreateSOLID", "", sPathSOLID, sIniFile) <> 0 And
|
||||||
|
GetPrivateProfileInt(S_SIDES, K_SIZEALWAYSONTOP, 0, sIniFile) = 0 Then
|
||||||
|
' Recupero file LUA
|
||||||
|
EgtLuaExecFile(sPathSOLID)
|
||||||
|
Dim dThick As Double = dRawHeight
|
||||||
|
EgtLuaSetGlobNumVar("CMP.THICK", dThick)
|
||||||
|
bOk = EgtLuaExecLine("CMP_Draw(false)")
|
||||||
|
Dim nErr As Integer = 0
|
||||||
|
EgtLuaGetGlobIntVar("CMP.ERR", nErr)
|
||||||
|
' Reset lua
|
||||||
|
EgtLuaResetGlobVar("CMP")
|
||||||
|
Else
|
||||||
|
EgtOutLog("CreateSolid3d Failed: file '" & sPathSOLID & "' not found or parameter 'SizeAlwaysOnTop' is TRUE")
|
||||||
|
End If
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Compo Solid3d
|
||||||
|
'--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Friend Function CompoColor(sIniFile As String) As Color3d
|
Friend Function CompoColor(sIniFile As String) As Color3d
|
||||||
Dim InsertColor As New Color3d(89, 210, 210, 25)
|
Dim InsertColor As New Color3d(89, 210, 210, 25)
|
||||||
Dim IndexColor As Integer = GetPrivateProfileInt(S_COMPO, K_LASTCOLOR, 1, sIniFile)
|
Dim IndexColor As Integer = GetPrivateProfileInt(S_COMPO, K_LASTCOLOR, 1, sIniFile)
|
||||||
@@ -39,7 +69,7 @@ Module Utility
|
|||||||
Friend Sub UpdateUI()
|
Friend Sub UpdateUI()
|
||||||
' Costringo ad aggiornare UI
|
' Costringo ad aggiornare UI
|
||||||
Dim nDummy As Integer
|
Dim nDummy As Integer
|
||||||
Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background, _
|
Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background,
|
||||||
New Action(Function() nDummy = 0))
|
New Action(Function() nDummy = 0))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user