diff --git a/CSVPage.xaml b/CSVPage.xaml
index 8d76cb2..6b3e23c 100644
--- a/CSVPage.xaml
+++ b/CSVPage.xaml
@@ -225,6 +225,7 @@
Style="{StaticResource OmagCut_YellowIconButton}">
+
@@ -232,18 +233,32 @@
+
+
+
-
+
-
-
-
diff --git a/CSVPage.xaml.vb b/CSVPage.xaml.vb
index 4110a4d..f3becce 100644
--- a/CSVPage.xaml.vb
+++ b/CSVPage.xaml.vb
@@ -17,6 +17,7 @@ Public Class CSVPage
Private m_bFirst As Boolean = True
' Dati lista
Private m_sCsvPath As String = String.Empty
+ Private m_sFilePath As String = String.Empty
Private m_CsvPartList As New List(Of CsvPart)
Private m_ItemsList As New ObservableCollection(Of PartCathegoryItem)
Private m_sCompoDir As String = String.Empty
@@ -34,6 +35,8 @@ Public Class CSVPage
' Determino se versione semplificata
m_bFull = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_NESTING) And
(GetPrivateProfileInt(S_CSV, K_FULL, 1, m_MainWindow.GetIniFile()) <> 0)
+ PlusBtn.Visibility = If(m_bFull, Windows.Visibility.Visible, Windows.Visibility.Hidden)
+ MinusBtn.Visibility = If(m_bFull, Windows.Visibility.Visible, Windows.Visibility.Hidden)
RemoveBtn.Visibility = If(m_bFull, Windows.Visibility.Visible, Windows.Visibility.Hidden)
' Determino se gestione pezzi rovinati attiva
If Not m_MainWindow.m_CurrentMachine.bProdLine Or Not m_MainWindow.m_CurrentMachine.nSaveProduced = 0 Then
@@ -62,6 +65,9 @@ Public Class CSVPage
' Recupero dimensioni del grezzo e kerf
m_nRawId = EgtGetFirstRawPart()
GetRawBox(m_ptRawMin, m_ptRawMax)
+ ' Reset bottoni Plus e Minus
+ PlusBtn.IsChecked = False
+ MinusBtn.IsChecked = False
End Sub
Private Sub CSVPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
@@ -161,6 +167,7 @@ Public Class CSVPage
Private Function LoadCsvFile(sCsvPath As String) As Boolean
' Pulisco path e lista dei pezzi Csv
+ m_sFilePath = String.Empty
m_sCsvPath = String.Empty
m_CsvPartList.Clear()
' Eseguo la lettura del file Csv
@@ -168,6 +175,7 @@ Public Class CSVPage
m_CurrProjPage.SetErrorMessage(EgtMsg(91206)) 'Errore nella lettura del file CSV
Return False
End If
+ m_sFilePath = m_sCsvPath
' Elimino pezzi nulli
RemoveWrongParts(m_CsvPartList)
' Aggiorno
@@ -227,6 +235,7 @@ Public Class CSVPage
nCatToNest += CurrPart.m_nToNest
nCatCount += CurrPart.m_nCount
Dim sCount As String = CurrPart.m_nToNest.ToString() & "/" & CurrPart.m_nCount.ToString()
+ If CurrPart.m_nAdd > 0 Then sCount &= "+" & CurrPart.m_nAdd.ToString()
Dim sDim As String = LenToString(CurrPart.m_dDimX, 1) & "x" & LenToString(CurrPart.m_dDimY, 1)
PartCathegory.Items.Add(New PartCustomItem(CurrPart.m_sName, i, sCount, sDim, CurrPart.m_bActive))
Next
@@ -251,6 +260,7 @@ Public Class CSVPage
For Each PrtItem As PartCustomItem In CatItem.Items
Dim PartData As CsvPart = m_CsvPartList(PrtItem.nType - 1)
Dim sCount As String = PartData.m_nToNest.ToString() & "/" & PartData.m_nCount.ToString()
+ If PartData.m_nAdd > 0 Then sCount &= "+" & PartData.m_nAdd.ToString()
PrtItem.sText1 = sCount
sCurrMat = PartData.m_sMaterial
dCurrTh = PartData.m_dTh
@@ -286,12 +296,50 @@ Public Class CSVPage
SelectedCathegory.IsSelected = False
ElseIf TypeOf PartsTreeView.SelectedItem Is PartCustomItem Then
Dim SelectedCustom As PartCustomItem = DirectCast(PartsTreeView.SelectedItem, PartCustomItem)
- SelectedCustom.bIsActive = Not SelectedCustom.bIsActive
- m_CsvPartList(SelectedCustom.nType - 1).m_bActive = SelectedCustom.bIsActive
+ Dim PartData As CsvPart = m_CsvPartList(SelectedCustom.nType - 1)
+ Dim nPlusMinus As Integer = GetPlusMinus()
+ If nPlusMinus <> 0 Then
+ ' Posso sempre aggiungere pezzi in più
+ If nPlusMinus > 0 Then
+ PartData.m_nToNest += 1
+ PartData.m_nAdd += 1
+ Dim sCount As String = PartData.m_nToNest.ToString() & "/" & PartData.m_nCount.ToString()
+ If PartData.m_nAdd > 0 Then sCount &= "+" & PartData.m_nAdd.ToString()
+ SelectedCustom.sText1 = sCount
+ ' Posso togliere solo pezzi aggiunti non ancora inseriti
+ ElseIf PartData.m_nAdd > 0 And PartData.m_nToNest > 0 Then
+ PartData.m_nToNest -= 1
+ PartData.m_nAdd -= 1
+ Dim sCount As String = PartData.m_nToNest.ToString() & "/" & PartData.m_nCount.ToString()
+ If PartData.m_nAdd > 0 Then sCount &= "+" & PartData.m_nAdd.ToString()
+ SelectedCustom.sText1 = sCount
+ End If
+ Else
+ SelectedCustom.bIsActive = Not SelectedCustom.bIsActive
+ PartData.m_bActive = SelectedCustom.bIsActive
+ End If
SelectedCustom.IsSelected = False
End If
End Sub
+ Private Sub PlusBtn_Click(sender As Object, e As RoutedEventArgs) Handles PlusBtn.Click
+ If MinusBtn.IsChecked Then MinusBtn.IsChecked = False
+ End Sub
+
+ Private Sub MinusBtn_Click(sender As Object, e As RoutedEventArgs) Handles MinusBtn.Click
+ If PlusBtn.IsChecked Then PlusBtn.IsChecked = False
+ End Sub
+
+ Private Function GetPlusMinus() As Integer
+ If PlusBtn.IsChecked Then
+ Return 1
+ ElseIf MinusBtn.IsChecked Then
+ Return -1
+ Else
+ Return 0
+ End If
+ End Function
+
Private Sub InsertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertBtn.Click
' Recupero lo spessore della lastra corrente
Dim dRawHeight As Double = GetRawHeight()
@@ -525,7 +573,7 @@ Public Class CSVPage
Return
End If
' Path del file
- Dim sFile As String = Path.ChangeExtension(m_sCsvPath, ".epl")
+ Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
' Scrittura del file
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
' Registro in ini path
@@ -541,6 +589,7 @@ Public Class CSVPage
m_CsvPartList.Clear()
' Lettura del file
ReadCsvPartList(sFile, m_sCsvPath, m_CsvPartList)
+ m_sFilePath = sFile
' Elimino pezzi nulli
RemoveWrongParts(m_CsvPartList)
End Sub
diff --git a/CadCutPageUC.xaml.vb b/CadCutPageUC.xaml.vb
index dee4ebf..8bc61cb 100644
--- a/CadCutPageUC.xaml.vb
+++ b/CadCutPageUC.xaml.vb
@@ -176,7 +176,9 @@ Public Class CadCutPageUC
' Cancello tutto
EraseMachinings(GDB_ID.NULL)
' Reinserisco tutte le lavorazioni
- AddMachinings(GDB_ID.NULL)
+ 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
' Imposto flag di modifica
m_SplitPage.m_bShow = False
End If
diff --git a/CamAuto.vb b/CamAuto.vb
index 5d346cf..bc1ab4d 100644
--- a/CamAuto.vb
+++ b/CamAuto.vb
@@ -5,8 +5,15 @@ Friend Module CamAuto
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Friend Function AddMachinings(nPartId As Integer) As Boolean
+ Dim nWarn As Integer = 0
+ Return AddMachinings(nPartId, nWarn)
+ End Function
+
+ Friend Function AddMachinings(nPartId As Integer, ByRef nWarn As Integer) As Boolean
+ Dim bDripOk As Boolean = VerifyVacuumsForDrip(nPartId)
+ If Not bDripOk Then nWarn = 1
EgtLuaCreateGlobTable("CAM")
- SetLuaStandardCamParams()
+ SetLuaStandardCamParams(bDripOk)
EgtLuaSetGlobIntVar("CAM.PARTID", nPartId)
Dim nErr As Integer = 999
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
@@ -41,13 +48,18 @@ Friend Module CamAuto
End Function
Friend Function ResetAllMachinings() As Boolean
+ Dim nWarn As Integer = 0
+ Return ResetAllMachinings(nWarn)
+ End Function
+
+ Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL)
' Se progetto con pezzi piani
Dim nPrjType As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectType()
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
- AddMachinings(GDB_ID.NULL)
+ AddMachinings(GDB_ID.NULL, nWarn)
' Se altrimenti progetto con cornici
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
' Reinserisco tutte le lavorazioni delle cornici
@@ -120,6 +132,50 @@ Friend Module CamAuto
Return bOk
End Function
+ Friend Function VerifyVacuumsForDrip(nPartId As Integer) As Boolean
+ ' Se un pezzo
+ If nPartId <> GDB_ID.NULL Then
+ ' Verifico contenga layer per lavorazioni da sotto con entità
+ If EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)) = 0 And
+ EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
+ Return True
+ End If
+ ' Se tutti i pezzi
+ Else
+ ' Salvo fase attualmente corrente
+ Dim nOriPhase As Integer = EgtGetCurrPhase()
+ ' Ciclo su tutti i pezzi presenti nei grezzi dell'ultima fase di lavorazione
+ EgtSetCurrPhase(EgtGetPhaseCount())
+ Dim bFound As Boolean = False
+ Dim nRawId As Integer = EgtGetFirstRawPart()
+ While nRawId <> GDB_ID.NULL
+ If EgtVerifyRawPartCurrPhase(nRawId) Then
+ Dim nMyPartId As Integer = EgtGetFirstPartInRawPart(nRawId)
+ While nMyPartId <> GDB_ID.NULL
+ ' se ci sono lavorazioni da sotto
+ If EgtGetGroupObjs(EgtGetFirstNameInGroup(nMyPartId, NAME_DRIPCUT)) > 0 Or
+ EgtGetGroupObjs(EgtGetFirstNameInGroup(nMyPartId, NAME_UNDERDRILL)) > 0 Then
+ bFound = True
+ End If
+ nMyPartId = EgtGetNextPartInRawPart(nPartId)
+ End While
+ End If
+ nRawId = EgtGetNextRawPart(nRawId)
+ End While
+ ' Ripristino fase corrente originale
+ EgtSetCurrPhase(nOriPhase)
+ ' Se non trovate lavorazioni da sotto, esco
+ If Not bFound Then Return True
+ End If
+ ' Verifico che il diametro della lama installata permetta l'utilizzo della ventosa
+ Dim dSawDiam As Double
+ If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
+ EgtTdbGetCurrToolParam(MCH_TP.DIAM, dSawDiam) Then
+ Return (dSawDiam <= m_MainWindow.m_CurrentMachine.dMaxSawDiamForVac)
+ End If
+ Return False
+ End Function
+
Friend Function UpdateVacuumsForDrip() As Boolean
Dim bOk As Boolean = True
' Salvo fase attualmente corrente
@@ -541,12 +597,12 @@ Friend Module CamAuto
Return True
End Function
- Private Function SetLuaStandardCamParams() As Boolean
+ 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
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
- Dim sDripSawMch As String = m_MainWindow.m_CurrentMachine.sCurrDripSawing
- Dim sDripDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDripDrilling
+ Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
+ Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
Dim dHolesOffset As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, m_MainWindow.GetMachIniFile())
Dim dHolesOverlap As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, m_MainWindow.GetMachIniFile())
diff --git a/ImportPageUC.xaml b/ImportPageUC.xaml
index faaea0d..4180b05 100644
--- a/ImportPageUC.xaml
+++ b/ImportPageUC.xaml
@@ -1,6 +1,7 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ImportPageUC.xaml.vb b/ImportPageUC.xaml.vb
index 9d0510b..699ca76 100644
--- a/ImportPageUC.xaml.vb
+++ b/ImportPageUC.xaml.vb
@@ -70,6 +70,7 @@ Public Class ImportPageUC
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
+ PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclinazione
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incisione da sotto
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
@@ -151,12 +152,14 @@ Public Class ImportPageUC
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
ResetBtn.Visibility = Windows.Visibility.Visible
SideAngleBtn.Visibility = Windows.Visibility.Visible
+ PartNumberGrd.Visibility = Windows.Visibility.Visible
Else
UseLayerBtn.Visibility = Windows.Visibility.Hidden
UseRegionBtn.Visibility = Windows.Visibility.Hidden
UseClosedCurveBtn.Visibility = Windows.Visibility.Hidden
ResetBtn.Visibility = Windows.Visibility.Hidden
SideAngleBtn.Visibility = Windows.Visibility.Hidden
+ PartNumberGrd.Visibility = Windows.Visibility.Hidden
End If
mmBtn.IsEnabled = True
inchBtn.IsEnabled = True
@@ -168,6 +171,8 @@ Public Class ImportPageUC
Else
inchBtn.IsChecked = True
End If
+ ' imposto quantità
+ PartNumTxBx.Text = "1"
' disabilito ok
OkBtn.IsEnabled = False
@@ -333,6 +338,7 @@ Public Class ImportPageUC
ResetBtn.IsEnabled = False
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
+ PartNumberGrd.IsEnabled = True
OkBtn.IsEnabled = False
SideAngleBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
@@ -345,6 +351,7 @@ Public Class ImportPageUC
ResetBtn.IsEnabled = False
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
+ PartNumberGrd.IsEnabled = False
OkBtn.IsEnabled = True
SideAngleBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
@@ -663,12 +670,20 @@ Public Class ImportPageUC
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
' Elimino eventuali precedenti pezzi vuoti
EgtEraseEmptyParts()
+ ' Determino numero ripetizioni
+ Dim nRepeat = 1
+ StringToInt(PartNumTxBx.Text, nRepeat)
+ nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
Dim nFirstId As Integer = EgtGetLastPart()
- EgtInsertFile(sTmpFile)
+ For nInd As Integer = 1 To nRepeat
+ Dim nFirst2Id As Integer = EgtGetLastPart()
+ EgtInsertFile(sTmpFile)
+ nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
+ ' Eventuale inserimento pezzi in VeinMatching
+ VeinMatching.AddParts(sTmpFile, nFirst2Id)
+ Next
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
- ' Eventuale inserimento pezzi in VeinMatching
- VeinMatching.AddParts(sTmpFile, nFirstId)
' Cancello il file
If My.Computer.FileSystem.FileExists(sTmpFile) Then
My.Computer.FileSystem.DeleteFile(sTmpFile)
diff --git a/NestPageUC.xaml.vb b/NestPageUC.xaml.vb
index 71321fa..3559820 100644
--- a/NestPageUC.xaml.vb
+++ b/NestPageUC.xaml.vb
@@ -815,7 +815,9 @@ Public Class NestPageUC
Dim ptP As New Point3d(dRawCenX - 0.5 * b3Part.DimX(), dRawCenY - 0.5 * b3Part.DimY(), m_b3Raw.DimZ())
If EgtAddPartToRawPart(nId, ptP, m_nRawId) Then
' Aggiungo le lavorazioni standard
- AddMachinings(nId)
+ Dim nWarn As Integer = 0
+ AddMachinings(nId, nWarn)
+ If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
' Eseguo nesting
Dim bFit As Boolean = False
If UpdateNestRegions() Then
diff --git a/OmagCUT.vbproj b/OmagCUT.vbproj
index 5095c42..9d14444 100644
--- a/OmagCUT.vbproj
+++ b/OmagCUT.vbproj
@@ -715,6 +715,12 @@
+
+
+
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
diff --git a/ProjectMgrUC.xaml.vb b/ProjectMgrUC.xaml.vb
index a565613..2b8b0b1 100644
--- a/ProjectMgrUC.xaml.vb
+++ b/ProjectMgrUC.xaml.vb
@@ -211,7 +211,9 @@ Public Class ProjectMgrUC
' Cancello eventuali messaggi
m_CurrProjPage.ClearMessage()
' Ricalcolo tutte le lavorazioni
- ResetAllMachinings()
+ Dim nWarn As Integer = 0
+ ResetAllMachinings(nWarn)
+ If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
' Aggiorno visualizzazione
EgtDraw()
End Sub
diff --git a/RawPartPageUC.xaml.vb b/RawPartPageUC.xaml.vb
index 5489338..1302547 100644
--- a/RawPartPageUC.xaml.vb
+++ b/RawPartPageUC.xaml.vb
@@ -584,7 +584,9 @@ Public Class RawPartPageUC
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
- AddMachinings(GDB_ID.NULL)
+ 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)
diff --git a/Resources/CsvMinus.png b/Resources/CsvMinus.png
new file mode 100644
index 0000000..16d96b8
Binary files /dev/null and b/Resources/CsvMinus.png differ
diff --git a/Resources/CsvPlus.png b/Resources/CsvPlus.png
new file mode 100644
index 0000000..55e43e4
Binary files /dev/null and b/Resources/CsvPlus.png differ
diff --git a/SimulationPageUC.xaml.vb b/SimulationPageUC.xaml.vb
index a099597..55ceb94 100644
--- a/SimulationPageUC.xaml.vb
+++ b/SimulationPageUC.xaml.vb
@@ -23,9 +23,10 @@ Public Class SimulationPageUC
Friend Function GetSimExecuting() As Boolean
Return m_bSimExecuting
End Function
-
' Numero di assi in simulazione
Private m_SimulationAxesNum As Integer = 5
+ ' Flag di abilitazione della stima
+ Private m_bEstim As Boolean = False
Friend Sub ResetSimulation()
' Termino la simulazione
@@ -42,8 +43,8 @@ Public Class SimulationPageUC
Private Sub SimulationPage_Initialized(sender As Object, e As EventArgs)
' Impostazioni box stime
- Dim bEstim As Boolean = (GetPrivateProfileInt(S_MACH_ESTIMATIONS, K_ENABLEEST, 0, m_MainWindow.GetMachIniFile()) <> 0)
- If Not bEstim Then EstimGrid.Visibility = Windows.Visibility.Hidden
+ m_bEstim = (GetPrivateProfileInt(S_MACH_ESTIMATIONS, K_ENABLEEST, 0, m_MainWindow.GetMachIniFile()) <> 0)
+ If Not m_bEstim Then EstimGrid.Visibility = Windows.Visibility.Hidden
TimeTxBl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 15) ' Tempo
CutLenTxBl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 16) ' Lunghezza
NetAreaTxBl.Text = EgtMsg(MSG_SIMULATIONPAGEUC + 17) ' Area pezzi
@@ -114,32 +115,34 @@ Public Class SimulationPageUC
End If
' Costringo ad aggiornare UI
UpdateUI()
- ' Eseguo la stima di tempi, lunghezze ...
- EgtSetCurrPhase(1)
- EgtEstimate(m_MainWindow.GetTempDir() & "\MachProj.html", "OmagCut ver." & m_MainWindow.GetVersion())
- ' Visualizzo i risultati
- Dim nTotalTime As Integer = 0
- EgtGetInfo(EgtGetCurrMachGroup(), "Ttot", nTotalTime)
- Dim tsTotalTime As New TimeSpan(0, 0, nTotalTime)
- TimeTxBx.Text = tsTotalTime.ToString("hh\:mm\:ss")
- Dim dTotalLength As Double = 0
- EgtGetInfo(EgtGetCurrMachGroup(), "Ltot", dTotalLength)
- If EgtUiUnitsAreMM() Then
- CutLenTxBx.Text = DoubleToString(dTotalLength / 1000, 1) & " m"
- Else
- CutLenTxBx.Text = DoubleToString(dTotalLength / (ONEINCH * 12), 1) & " ft"
+ ' Se abilitate, eseguo la stima di tempi, lunghezze ...
+ If m_bEstim Then
+ EgtSetCurrPhase(1)
+ EgtEstimate(m_MainWindow.GetTempDir() & "\MachProj.html", "OmagCut ver." & m_MainWindow.GetVersion())
+ ' Visualizzo i risultati
+ Dim nTotalTime As Integer = 0
+ EgtGetInfo(EgtGetCurrMachGroup(), "Ttot", nTotalTime)
+ Dim tsTotalTime As New TimeSpan(0, 0, nTotalTime)
+ TimeTxBx.Text = tsTotalTime.ToString("hh\:mm\:ss")
+ Dim dTotalLength As Double = 0
+ EgtGetInfo(EgtGetCurrMachGroup(), "Ltot", dTotalLength)
+ If EgtUiUnitsAreMM() Then
+ CutLenTxBx.Text = DoubleToString(dTotalLength / 1000, 1) & " m"
+ Else
+ CutLenTxBx.Text = DoubleToString(dTotalLength / (ONEINCH * 12), 1) & " ft"
+ End If
+ Dim dNetArea As Double = 0
+ EgtGetInfo(EgtGetCurrMachGroup(), "NetArea", dNetArea)
+ If EgtUiUnitsAreMM() Then
+ NetAreaTxBx.Text = DoubleToString(dNetArea / 1000000, 2) & " m²"
+ Else
+ NetAreaTxBx.Text = DoubleToString(dNetArea / (ONEINCH * 12 * ONEINCH * 12), 1) & " ft²"
+ End If
+ Dim dRawArea As Double = 0
+ EgtGetInfo(EgtGetCurrMachGroup(), "RawArea", dRawArea)
+ Dim dUsage As Double = If(dRawArea > EPS_SMALL, dNetArea / dRawArea, 1)
+ UsageTxBx.Text = DoubleToString(dUsage * 100, 1) & " %"
End If
- Dim dNetArea As Double = 0
- EgtGetInfo(EgtGetCurrMachGroup(), "NetArea", dNetArea)
- If EgtUiUnitsAreMM() Then
- NetAreaTxBx.Text = DoubleToString(dNetArea / 1000000, 2) & " m²"
- Else
- NetAreaTxBx.Text = DoubleToString(dNetArea / (ONEINCH * 12 * ONEINCH * 12), 1) & " ft²"
- End If
- Dim dRawArea As Double = 0
- EgtGetInfo(EgtGetCurrMachGroup(), "RawArea", dRawArea)
- Dim dUsage As Double = If(dRawArea > EPS_SMALL, dNetArea / dRawArea, 1)
- UsageTxBx.Text = DoubleToString(dUsage * 100, 1) & " %"
' Salvo il progetto con le lavorazioni
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\MachProj.nge"
m_CurrProjPage.SaveFile(sMchPath, False)
diff --git a/SplitAuto.vb b/SplitAuto.vb
index 0966c7e..03624ea 100644
--- a/SplitAuto.vb
+++ b/SplitAuto.vb
@@ -366,7 +366,9 @@ Public Module SplitAuto
' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL)
' Reinserisco tutte le lavorazioni
- AddMachinings(GDB_ID.NULL)
+ Dim nWarn As Integer = 0
+ AddMachinings(GDB_ID.NULL, nWarn)
+ If nWarn = 1 Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
' Carico ventose
LoadVacuumCups()
' Lancio calcolo separazione