OmagCut 1.6k8 :
- migliorato inserimento pezzi da DrawPage e Import - migliorato calcolo dimensioni grezzo per inserimento - migliorata gestione modifica progetto in simula e genera.
This commit is contained in:
@@ -173,15 +173,22 @@ Public Class CadCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub WorkBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkBtn.Click
|
||||
' Disabilito impostazione modificato
|
||||
EgtDisableModified()
|
||||
' Salvo progetto
|
||||
Dim sPath As String = m_MainWindow.GetTempDir() & "\" & "SimuProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sPath)
|
||||
' Inserisco le lavorazioni
|
||||
EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "MachProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath)
|
||||
' Genero file CNC
|
||||
EgtGenerate(m_MainWindow.GetCncDir() & "\CadCut.xpi", "OmagCut")
|
||||
' Ricarico
|
||||
m_MainWindow.m_CurrentProjectPageUC.LoadFile(sPath)
|
||||
' Abilito impostazione modificato
|
||||
EgtEnableModified()
|
||||
'Download programma
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 1 Then
|
||||
m_MainWindow.m_CNCommunication.m_CN.Delete_NC_prog("%900.0")
|
||||
|
||||
+8
-4
@@ -311,9 +311,12 @@ Public Class DrawPageUC
|
||||
Dim bDirect As Boolean = GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
' Recupero dimensioni del grezzo
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
Dim ptMin, ptMax As Point3d
|
||||
Dim nSolidRawId As Integer = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
||||
Dim ptRawMin, ptRawMax As Point3d
|
||||
Dim nFlag As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
||||
EgtGetBBoxGlob(nRawId, nFlag, ptMin, ptMax)
|
||||
EgtGetBBoxGlob(nSolidRawId, nFlag, ptRawMin, ptRawMax)
|
||||
Dim dKerf As Double = 0
|
||||
EgtGetInfo(nRawId, KEY_KERF, dKerf)
|
||||
' abilito registrazione
|
||||
EgtEnableCommandLogger()
|
||||
' ricarico componente corrente
|
||||
@@ -337,9 +340,10 @@ Public Class DrawPageUC
|
||||
If bDirect Then
|
||||
Dim ptPmin, ptPmax As Point3d
|
||||
EgtGetBBoxGlob(nId2, nFlag, ptPmin, ptPmax)
|
||||
ptPmin.z = ptMax.z
|
||||
ptPmin.z = ptRawMax.z + 0.1
|
||||
EgtAddPartToRawPart(nId2, ptPmin, nRawId)
|
||||
If Not EgtPackPart(nId2, ptMin.x, ptMin.y, ptMax.x, ptMax.y, 4, True) Then
|
||||
If Not EgtPackPart(nId2, ptRawMin.x + dKerf, ptRawMin.y + dKerf,
|
||||
ptRawMax.x - dKerf, ptRawMax.y - dKerf, 4, True) Then
|
||||
EgtRemovePartFromRawPart(nId2)
|
||||
EgtSetStatus(nId2, GDB_ST.ON_)
|
||||
EgtPackPart(nId2, -5000, -INFINITO, 1000, -3000, 20, False)
|
||||
|
||||
@@ -358,9 +358,12 @@ Public Class ImportPageUC
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero dimensioni del grezzo
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
Dim ptMin, ptMax As Point3d
|
||||
Dim nSolidRawId As Integer = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
||||
Dim ptRawMin, ptRawMax As Point3d
|
||||
Dim nFlag As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
||||
EgtGetBBoxGlob(nRawId, nFlag, ptMin, ptMax)
|
||||
EgtGetBBoxGlob(nSolidRawId, nFlag, ptRawMin, ptRawMax)
|
||||
Dim dKerf As Double = 0
|
||||
EgtGetInfo(nRawId, KEY_KERF, dKerf)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Ciclo di caricamento dei pezzi
|
||||
@@ -374,9 +377,10 @@ Public Class ImportPageUC
|
||||
If bDirect Then
|
||||
Dim ptPmin, ptPmax As Point3d
|
||||
EgtGetBBoxGlob(nId2, nFlag, ptPmin, ptPmax)
|
||||
ptPmin.z = ptMax.z
|
||||
ptPmin.z = ptRawMax.z + 0.1
|
||||
EgtAddPartToRawPart(nId2, ptPmin, nRawId)
|
||||
If Not EgtPackPart(nId2, ptMin.x, ptMin.y, ptMax.x, ptMax.y, 4, True) Then
|
||||
If Not EgtPackPart(nId2, ptRawMin.x + dKerf, ptRawMin.y + dKerf,
|
||||
ptRawMax.x - dKerf, ptRawMax.y - dKerf, 4, True) Then
|
||||
EgtRemovePartFromRawPart(nId2)
|
||||
EgtSetStatus(nId2, GDB_ST.ON_)
|
||||
EgtPackPart(nId2, -5000, -INFINITO, 1000, -3000, 20, False)
|
||||
|
||||
@@ -55,5 +55,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.10.7")>
|
||||
<Assembly: AssemblyFileVersion("1.6.10.7")>
|
||||
<Assembly: AssemblyVersion("1.6.11.8")>
|
||||
<Assembly: AssemblyFileVersion("1.6.11.8")>
|
||||
|
||||
+2
-1
@@ -44,7 +44,8 @@ Public Class NestPageUC
|
||||
m_bActive = True
|
||||
' recupero dimensioni del grezzo e kerf
|
||||
m_nRawId = EgtGetFirstRawPart()
|
||||
EgtGetBBoxGlob(m_nRawId, BBFLAG, m_ptRawMin, m_ptRawMax)
|
||||
Dim nSolidRawId As Integer = EgtGetFirstNameInGroup(m_nRawId, NAME_RAW_SOLID)
|
||||
EgtGetBBoxGlob(nSolidRawId, BBFLAG, m_ptRawMin, m_ptRawMax)
|
||||
EgtGetInfo(m_nRawId, KEY_KERF, m_dKerf)
|
||||
' carico e calcolo i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_NEST, K_STEP, 10, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -35,8 +35,11 @@ Public Class SimulationPageUC
|
||||
HideParkedParts()
|
||||
' Visualizzo tutta la macchina
|
||||
EgtShowOnlyTable(False)
|
||||
' Eseguo
|
||||
' Calcolo le lavorazioni
|
||||
EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "MachProj.nge"
|
||||
m_CurrProjPage.SaveFile(sMchPath)
|
||||
' Imposto vista 3d isometrica di tutto
|
||||
EgtSetView(VT.ISO_SE, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -117,7 +120,8 @@ Public Class SimulationPageUC
|
||||
Private Sub ExitBtnUC_Click(sender As Object, e As RoutedEventArgs)
|
||||
' Mi assicuro di terminare la simulazione
|
||||
EgtSimStop()
|
||||
' Ricarico il progetto corrente
|
||||
' Ricarico il progetto corrente (forzato)
|
||||
m_bToReload = True
|
||||
ReloadFile(False)
|
||||
' Ripristino visibilità standard
|
||||
ShowParkedParts()
|
||||
|
||||
Reference in New Issue
Block a user