Compare commits

...

8 Commits

Author SHA1 Message Date
Dario Sassi ca19208365 EgtBEAMWALL :
- aggiunto nuovo calcolo solidi per assemblaggio, verificato e commentato.
2025-10-13 12:31:22 +02:00
Dario Sassi 1637651865 EgtBEAMWALL 2.7j1 :
- aggiornata versione.
2025-10-11 11:57:26 +02:00
Dario Sassi be48fbc13e - aggiornate dll di interfaccia con codice nativo. 2025-10-11 11:50:49 +02:00
Emmanuele Sassi 3a22017fe5 - corretta visualizzazione messaggi 2025-09-09 12:42:10 +02:00
Emmanuele Sassi f402d9a14d - create modalita' di nesting
- aggiunto bottone per generare lista di taglio per cabinet
2025-09-09 10:34:37 +02:00
Emmanuele Sassi 5d06bf5787 - correzione su verificha stato machgroup in ProduceAll 2025-08-29 13:24:36 +02:00
Emmanuele Sassi b0484a7874 - correzione backup
- correzione nesting da Btl
2025-08-27 11:31:24 +02:00
Dario Sassi a37686962d - Aggiunto messaggio se cartella Variant non trovata.
- Aggiornati controlli versione a 2.7d1
2025-04-17 18:19:30 +02:00
23 changed files with 205 additions and 38 deletions
+2
View File
@@ -297,6 +297,8 @@
Public Const WRH_L As String = "L"
Public Const WRH_KERF As String = "Kerf"
Public Const WRH_S As String = "S"
Public Const WRH_NESTINGTYPE As String = "NestingType"
Public Const WRH_PANELSAW As String = "PanelSaw"
' parametri import/export
Public Const EXP_PROJ As String = "EXPORTPROJ"
+2 -2
View File
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.1.1")>
<Assembly: AssemblyFileVersion("2.7.1.1")>
<Assembly: AssemblyVersion("2.7.4.1")>
<Assembly: AssemblyFileVersion("2.7.4.1")>
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7.1.1")]
[assembly: AssemblyFileVersion("2.7.1.1")]
[assembly: AssemblyVersion("2.7.4.1")]
[assembly: AssemblyFileVersion("2.7.4.1")]
@@ -248,8 +248,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.1.2")>
<Assembly: AssemblyFileVersion("2.7.1.2")>
<Assembly: AssemblyVersion("2.7.10.1")>
<Assembly: AssemblyFileVersion("2.7.10.1")>
@@ -61,7 +61,9 @@ Public Class MySceneHostVM
' Imposto direttorio ausiliario per import/gestione BTL
Dim sBtlAuxDir As String = String.Empty
GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
End If
' inizializzo gestore travi e pareti
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
' inizializzo gestore lavorazioni
@@ -1122,7 +1122,9 @@ Public Class BTLStructureVM
Dim bOn As Boolean = EgtBeamGetBuildingIsOn()
If bShow <> bOn Then
'If bShow Then EgtBeamCalcAllSolids(True)
EgtBeamShowBuilding(bShow)
'If Not bShow Then EgtBeamShowAllSolids(False)
End If
' ripristino precedente impostazione modificato
@@ -675,9 +675,16 @@ Public Class ConfigurationPageVM
Dim sDayDir As String = sMonthDir & "\" & nDay
Dim VersionList() As String = Directory.GetFiles(sDayDir)
If VersionList.Length > 0 Then
Dim nMaxVersion As Int64 = VersionList.Max(Function(x) Int64.Parse(Path.GetFileNameWithoutExtension(x)))
sRestorePath = sDayDir & "\" & nMaxVersion & ".bwbck"
Exit For
Dim nMaxVersion As Int64 = 0
For Each item As String In VersionList
Dim nTmp As Int64 = 0
Int64.TryParse(Path.GetFileNameWithoutExtension(item), nTmp)
nMaxVersion = Math.Max(nMaxVersion, nTmp)
Next
If nMaxVersion > 0 Then
sRestorePath = sDayDir & "\" & nMaxVersion & ".bwbck"
Exit For
End If
End If
Next
If Not String.IsNullOrEmpty(sRestorePath) Then Exit For
@@ -687,6 +694,8 @@ Public Class ConfigurationPageVM
End If
If String.IsNullOrEmpty(sRestorePath) Then
MessageBox.Show(EgtMsg(62106), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore impossible! Last backup not found!
m_bRestoreRunning = False
Return
End If
If MessageBox.Show(String.Format(EgtMsg(62107), nYear, nMonth, nDay), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Warning) <> MessageBoxResult.OK Then 'Are you sure you want to restore the last backup from {0}\{1}\{2}? If you proceed you will lose actual data!
m_bRestoreRunning = False
@@ -939,6 +939,9 @@
<ItemGroup>
<Resource Include="Resources\OpenProjectFileDialog\Archived.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\OptimizePanel\PreNesting.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
@@ -242,8 +242,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -198,9 +198,16 @@ Public Class MainWindowVM
Dim sDayDir As String = sMonthDir & "\" & nDay
Dim VersionList() As String = Directory.GetFiles(sDayDir)
If VersionList.Length > 0 Then
Dim nMaxVersion As Int64 = VersionList.Max(Function(x) Int64.Parse(Path.GetFileNameWithoutExtension(x)))
LastBackupDate = New Date(nYear, nMonth, nDay)
Exit For
Dim nMaxVersion As Int64 = 0
For Each item As String In VersionList
Dim nTmp As Int64 = 0
Int64.TryParse(Path.GetFileNameWithoutExtension(item), nTmp)
nMaxVersion = Math.Max(nMaxVersion, nTmp)
Next
If nMaxVersion > 0 Then
LastBackupDate = New Date(nYear, nMonth, nDay)
Exit For
End If
End If
Next
If LastBackupDate <> Date.MinValue Then Exit For
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.1.2")>
<Assembly: AssemblyFileVersion("2.7.1.2")>
<Assembly: AssemblyVersion("2.7.10.1")>
<Assembly: AssemblyFileVersion("2.7.10.1")>
@@ -243,6 +243,8 @@ Public Class NestingRunningWndVM
Dim WhType = GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, 2)
Dim sWarehouseIniPath As String = ""
Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Dim nNestingType As Integer = WarehouseHelper.GetNestingType(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Dim sPanelSaw As String = WarehouseHelper.GetPanelSaw(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Dim dStartOffset As Double = 0
Dim dKerf As Double = 0
Select Case WhType
@@ -315,7 +317,7 @@ Public Class NestingRunningWndVM
End If
' passo a lua lista id pezzi da nestare
If SectionProgress.SectionPartList.Count > 0 AndAlso SectionProgress.SParamList.Count > 0 AndAlso
Not ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionProgress.SectionPartList, SectionProgress.SParamList, dStartOffset, dOffset, dKerf, m_bLDIntersOther, m_nMinScore, SectionProgress.dCalcNestTime) Then
Not ExecNesting(sLogPath, CurrentMachine.sMachineName, SectionProgress.SectionPartList, SectionProgress.SParamList, dStartOffset, dOffset, dKerf, m_bLDIntersOther, m_nMinScore, SectionProgress.dCalcNestTime, nNestingType, sPanelSaw) Then
Exit For
End If
Next
@@ -354,7 +356,11 @@ Public Class NestingRunningWndVM
dRawPartH = b3Box.DimZ
End If
' verifico che sia tra quelli da nestare
If dRawPartH <= 0 Or Not m_SectionProgressList.Any(Function(x) x.Section.dH = dRawPartH) Then Continue While
If dRawPartH <= 0 Or Not m_SectionProgressList.Any(Function(x) (Math.Abs(x.Section.dH - dRawPartH)) < (100 * EPS_SMALL)) Then
' passo al prossimo RawPart
nRawPartId = EgtGetNext(nRawPartId)
Continue While
End If
' recupero il contorno
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nRawPartId, "Outline")
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
@@ -70,6 +70,13 @@
<Image Source="/Resources/OptimizePanel/UnlockRotation.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PreNesting_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding PreNesting_Command}"
Visibility="{Binding MachiningPage_Visibility}">
<Image Source="/Resources/OptimizePanel/PreNesting.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Warehouse_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Warehouse_Command}"
@@ -1,4 +1,5 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Threading
Imports EgtBEAMWALL.Core
Imports EgtUILib
@@ -136,6 +137,13 @@ Public Class OptimizePanelVM
End Get
End Property
Public ReadOnly Property PreNestingBtn_Visibility As Visibility
Get
Return If(WarehouseHelper.GetNestingType(Map.refProjectVM.BTLStructureVM.nPROJTYPE) = 2, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#Region "Messages"
Public ReadOnly Property LongDrillArea_Msg As String
@@ -187,6 +195,7 @@ Public Class OptimizePanelVM
Private m_cmdCalcRotFlip As ICommand
Private m_cmdUnlockRot As ICommand
Private m_cmdUnlockFlip As ICommand
Private m_cmdPreNesting As ICommand
Private m_cmdWarehouse As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -200,6 +209,7 @@ Public Class OptimizePanelVM
m_SelOriginType = OriginTypeList(0)
m_bLDIntersOther = False
NotifyPropertyChanged(NameOf(SelPartType))
NotifyPropertyChanged(NameOf(PreNestingBtn_Visibility))
End Sub
#End Region ' CONSTRUCTOR
@@ -466,6 +476,53 @@ Public Class OptimizePanelVM
#End Region ' Optimize
#Region "PreNesting"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property PreNesting_Command As ICommand
Get
If m_cmdPreNesting Is Nothing Then
m_cmdPreNesting = New Command(AddressOf PreNesting)
End If
Return m_cmdPreNesting
End Get
End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub PreNesting()
If Not IsNothing(Map.refProdManagerVM.CurrProd) Then
Dim sPanelSaw As String = WarehouseHelper.GetPanelSaw(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\PreNestingLog.txt"
ExecNesting(sLogPath, 11, sPanelSaw)
Dim CutListFileName As String = "CutList"
Dim FileList() As String = Directory.GetFiles(Map.refProdManagerVM.CurrProd.sProdDirPath)
Dim SawPanelList As List(Of String) = FileList.Where(Function(x) Path.GetFileName(x).StartsWith(CutListFileName)).ToList
Dim sSaveCncPath As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
Dim sMessage As String = ""
For Each SawPanelFile In SawPanelList
Try
Dim sNewPath As String = sSaveCncPath & "\" & Path.GetFileName(SawPanelFile)
File.Copy(SawPanelFile, sNewPath, True)
' sMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
Catch ex As Exception
sMessage &= String.Format("Copy of {0} to {1} folder failed!", {SawPanelFile, sSaveCncPath}) & Environment.NewLine
End Try
Next
If String.IsNullOrWhiteSpace(sMessage) Then
MessageBox.Show("All files copied correctly!", "Info", MessageBoxButton.OK, MessageBoxImage.Information)
Else
MessageBox.Show(sMessage, "Info", MessageBoxButton.OK, MessageBoxImage.Information)
End If
End If
End Sub
#End Region ' PreNesting
#Region "Warehouse"
''' <summary>
Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

@@ -68,7 +68,9 @@ Public Class MySceneHostVM
' Imposto direttorio ausiliario per import/gestione BTL
Dim sBtlAuxDir As String = String.Empty
GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
End If
' inizializzo gestore travi e pareti
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
' inizializzo gestore lavorazioni
@@ -58,7 +58,11 @@ Public Class MyStatusBarVM
' Costringo ad aggiornare
UpdateUI()
' Eventuale attesa
Thread.Sleep(nPause)
If nPause >= 0 Then
Thread.Sleep(nPause)
'ElseIf nPause = 1 Then
' EgtDraw()
End If
' Ritorno eventuale stop
If m_bStopProgress Then
m_bStopProgress = False
@@ -258,13 +258,13 @@ Public Class TopPanelVM
ElseIf sSaveExt(0) <> "." Then
sSaveExt = "." & sSaveExt
End If
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
Try
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
File.Copy(sMachGroupFilePath, sNewPath, True)
MessageBox.Show(String.Format("File copied! You can find it at {0}", {sNewPath}), "Info", MessageBoxButton.OK, MessageBoxImage.Information)
Catch ex As Exception
MessageBox.Show(String.Format("Copy to {0} folder failed!", {sSaveCncPath}), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(String.Format("Copy of {0} to {1} folder failed!", {sMachGroupFilePath, sSaveCncPath}), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End Try
End If
End If
@@ -342,7 +342,7 @@ Public Class TopPanelVM
End If
Else
' altrimenti lo copio se path disponibile
If Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.OK Or Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.INFO Then
If DirectCast(Machgroup, MyMachGroupVM).nGlobalState = CalcStates.OK Or DirectCast(Machgroup, MyMachGroupVM).nGlobalState = CalcStates.INFO Then
Dim sSaveCncPath As String = ""
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
Dim sSaveExt As String = ""
@@ -353,19 +353,21 @@ Public Class TopPanelVM
sSaveExt = "." & sSaveExt
End If
If String.IsNullOrWhiteSpace(sSaveCncPath) OrElse Not Directory.Exists(sSaveCncPath) Then Return
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
Try
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Machgroup.Name.ToString() & sSaveExt
File.Copy(sMachGroupFilePath, sNewPath, True)
sErrorMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
' sErrorMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
Catch ex As Exception
sErrorMessage &= String.Format("Copy to {0} folder failed!", {sSaveCncPath}) & Environment.NewLine
sErrorMessage &= String.Format("Copy of {0} to {1} folder failed!", {sMachGroupFilePath, sSaveCncPath}) & Environment.NewLine
End Try
End If
End If
Next
If Not String.IsNullOrWhiteSpace(sErrorMessage) Then
sErrorMessage = "Results for all the parts generated:" & Environment.NewLine & sErrorMessage
If String.IsNullOrWhiteSpace(sErrorMessage) Then
MessageBox.Show("All files copied correctly!", "Info", MessageBoxButton.OK, MessageBoxImage.Information)
Else
'sErrorMessage = "Results for all the parts generated:" & Environment.NewLine & sErrorMessage
MessageBox.Show(sErrorMessage, If(bErrorMessage, "Error", "Info"), MessageBoxButton.OK, MessageBoxImage.Information)
End If
If MachgroupErrorList.Count > 0 Then
+43 -1
View File
@@ -74,7 +74,7 @@ Module LuaExec
Return bOk
End Function
Friend Function ExecNesting(sFile As String, sMachine As String, PartList As List(Of BTLPartM), SectionList As List(Of SParam), dStartOffset As Double, dOffset As Double, dKerf As Double, bLDIntersOther As Boolean, nMinScore As Integer, nNestTime As Integer) As Boolean
Friend Function ExecNesting(sFile As String, sMachine As String, PartList As List(Of BTLPartM), SectionList As List(Of SParam), dStartOffset As Double, dOffset As Double, dKerf As Double, bLDIntersOther As Boolean, nMinScore As Integer, nNestTime As Integer, nFlag As Integer, sPanelSaw As String) As Boolean
If PartList.Count = 0 Then
EgtOutLog("Exit nesting: no parts received!")
Return True
@@ -105,6 +105,8 @@ Module LuaExec
EgtLuaSetGlobNumVar("NEST.KERF", dKerf)
EgtLuaSetGlobNumVar("NEST.DRILL_MACH_AREA", If(bLDIntersOther, 1, 0))
EgtLuaSetGlobNumVar("NEST.MIN_ANGLE_PNT", nMinScore)
EgtLuaSetGlobNumVar("NEST.FLAG", nFlag)
EgtLuaSetGlobStringVar("NEST.PANELSAW", sPanelSaw)
Dim nNestCorner As Integer
Select Case CurrentMachine.NestingCorner
Case MCH_CR.TL
@@ -162,6 +164,46 @@ Module LuaExec
Return bOk
End Function
Friend Function ExecNesting(sFile As String, nFlag As Integer, sPanelSaw As String) As Boolean
EgtOutLog("-- Start ExecNest --")
' Recupero lo script da eseguire
Dim sExecPath As String = ""
Dim sExecName As String = ""
GetMainPrivateProfileString(S_NEST, K_NESTEXEC, "", sExecName)
Dim sRoot As String = ""
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
sRoot = Map.refMainWindowVM.MainWindowM.sBeamRoot
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
sRoot = Map.refMainWindowVM.MainWindowM.sWallRoot
End If
sExecPath = (sRoot & "\" & sExecName).TrimEnd({"\"c})
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
EgtOutLog("Not found NestExec script " & sExecPath)
Return False
End If
' Assegno i dati
EgtLuaCreateGlobTable("NEST")
EgtLuaSetGlobStringVar("NEST.BASEDIR", sRoot)
EgtLuaSetGlobStringVar("NEST.FILE", sFile)
EgtLuaSetGlobNumVar("NEST.FLAG", nFlag)
EgtLuaSetGlobStringVar("NEST.PANELSAW", sPanelSaw)
' Eseguo lo script
Dim bOk As Boolean = False
If EgtLuaExecFile(sExecPath) Then
' Recupero i risultati
Dim nErr As Integer = 999
EgtLuaGetGlobIntVar("NEST.ERR", nErr)
bOk = (nErr <= 0)
If Not bOk Then EgtOutLog("NestExec Err=" & nErr.ToString())
Else
bOk = False
EgtOutLog("Error executing Nest Exec script " & sExecPath)
End If
' Cancello tavola globale
EgtLuaResetGlobVar("NEST")
Return bOk
End Function
Friend Function ExecRotFlip(nPartId As Integer) As Boolean
If IsNothing(nPartId) OrElse nPartId = GDB_ID.NULL Then
EgtOutLog("Exit nesting: no parts received!")
@@ -43,6 +43,28 @@ Module WarehouseHelper
End If
End Function
' funzione che restituisce il flag
Public Function GetNestingType(Type As BWType) As Integer
If Type = BWType.BEAM Then
Return GenInterface.GetPrivateProfileInt(WRH_BEAM, WRH_NESTINGTYPE, 1, GetWarehouseIniPath())
Else
Return GenInterface.GetPrivateProfileInt(WRH_WALL, WRH_NESTINGTYPE, 1, GetWarehouseIniPath())
End If
End Function
' funzione che restituisce il PanelSaw
Public Function GetPanelSaw(Type As BWType) As String
If Type = BWType.BEAM Then
Dim sPanelSaw As String = ""
GenInterface.GetPrivateProfileString(WRH_BEAM, WRH_PANELSAW, "", sPanelSaw, GetWarehouseIniPath())
Return sPanelSaw
Else
Dim sPanelSaw As String = ""
GenInterface.GetPrivateProfileString(WRH_WALL, WRH_PANELSAW, "", sPanelSaw, GetWarehouseIniPath())
Return sPanelSaw
End If
End Function
' funzione che restituisce l'offset dato spessore pareti
Public Function GetWallOffsetByWidth(dHeight As Double) As Double
Dim dOffset As Double = 0
@@ -162,11 +184,11 @@ Module WarehouseHelper
Dim SectionData() As String = sSectionData.Split(","c)
Select Case Type
Case BWType.BEAM
Dim dSectionW As Double = 0 : StringToDoubleAdv( SectionData(0), dSectionW)
Dim dSectionH As Double = 0 : StringToDoubleAdv( SectionData(1), dSectionH)
Dim dSectionW As Double = 0 : StringToDoubleAdv(SectionData(0), dSectionW)
Dim dSectionH As Double = 0 : StringToDoubleAdv(SectionData(1), dSectionH)
For Each SectionProgress In SectionList
If Math.Abs( SectionProgress.Section.dW - dSectionW) < 0.1 AndAlso
Math.Abs( SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(2)) Then
If Math.Abs(SectionProgress.Section.dW - dSectionW) < 0.1 AndAlso
Math.Abs(SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(2)) Then
If Not StringToDoubleAdv(sSectionValues(1), dL) Then Continue While
If Not Integer.TryParse(sSectionValues(2), nQty) Then Continue While
If sSectionValues.Count >= 4 AndAlso Integer.TryParse(sSectionValues(3), nActive) Then
@@ -179,9 +201,9 @@ Module WarehouseHelper
End If
Next
Case BWType.WALL
Dim dSectionH As Double = 0 : StringToDoubleAdv( SectionData(0), dSectionH)
Dim dSectionH As Double = 0 : StringToDoubleAdv(SectionData(0), dSectionH)
For Each SectionProgress In SectionList
If Math.Abs( SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(1)) Then
If Math.Abs(SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(1)) Then
If Not StringToDoubleAdv(sSectionValues(1), dW) Then Continue While
If Not StringToDoubleAdv(sSectionValues(2), dL) Then Continue While
If Not Integer.TryParse(sSectionValues(3), nQty) Then Continue While
Binary file not shown.
Binary file not shown.