diff --git a/LuaLibs/PanelSaw.lua b/LuaLibs/PanelSaw.lua index 49a9fc5..c50f993 100644 --- a/LuaLibs/PanelSaw.lua +++ b/LuaLibs/PanelSaw.lua @@ -38,7 +38,7 @@ local function GetPanelList() PanelList[i].idPatt = EgtGetInfo( idMachGroup, 'PATTID', 'i') PanelList[i].nPdn = EgtGetInfo( idPart, 'PDN', 'i') PanelList[i].sName = EgtGetInfo( idPart, 'NAM', 's') - PanelList[i].sDescription = '' + PanelList[i].sDescription = PanelList[i].sName -- in questa modalità ogni MachGroup è 1 pezzo, non esistono multipli -- TODO valutare se raggruppare i pannelli uguali per la cutting list PanelList[i].nQuantity = 1 @@ -58,13 +58,11 @@ local function GetSheetList() dLength = 2800, dWidth = 2070, dThickness = 8, - sMaterial = '' }, { dLength = 2800, dWidth = 2070, dThickness = 18, - sMaterial = '' } } @@ -92,6 +90,7 @@ local function BuildCuttingList_Cutty( PanelList, SheetList, ProjectInfo) for nCurrentPanelList = 1, #SplittedPanelList do local Lines = {} + local CurrentPanelList = SplittedPanelList[nCurrentPanelList] LinesToWriteList[nCurrentPanelList] = {} local F0 = { @@ -107,13 +106,13 @@ local function BuildCuttingList_Cutty( PanelList, SheetList, ProjectInfo) } local F1 = { - Header = { 'F1', SplittedPanelList[nCurrentPanelList][1].dThickness, 0, 0, 0}, + Header = { 'F1', CurrentPanelList[1].dThickness, 0, 0, 0}, HeaderPlaceholders = { '%s', '%.3f', '%.3f', '%.3f', '%.3f'}, ValuesList = {}, ValuesPlaceholders = { '%.3f', '%.3f', '%d', '%d', '%d', '%-29d', '%-50s', '%d', '%.3f', '%d', '%d', '%d', '%d'}, } for i = 1, #SheetList do - F1.ValuesList[i] = { SheetList[i].dLength, SheetList[i].dWidth, 99, 200, 1, 1, SheetList[i].sMaterial, 0, 1, 0, 0, 0, 0} + F1.ValuesList[i] = { SheetList[i].dLength, SheetList[i].dWidth, 99, 200, 1, 1, CurrentPanelList[1].sMaterialFullName, 0, 1, 0, 0, 0, 0} end local F2 = { @@ -122,8 +121,8 @@ local function BuildCuttingList_Cutty( PanelList, SheetList, ProjectInfo) ValuesList = {}, ValuesPlaceholders = { '%.3f', '%.3f', '%d', '%d', '%d', '%d', '%d', '%-20s', '%d', '%d', '%d', '%d', '%-50s', '%d', '%d', '%d', '%d', '%d', '%d', '%.3f', '%d', '%d', '%-85d', '%.3f', '%.3f'}, } - for i = 1, #SplittedPanelList[nCurrentPanelList] do - F2.ValuesList[i] = { SplittedPanelList[nCurrentPanelList][i].dLength, SplittedPanelList[nCurrentPanelList][i].dWidth, SplittedPanelList[nCurrentPanelList][i].nQuantity, 0, 0, 0, 0, SplittedPanelList[nCurrentPanelList][i].nPdn, 0, 0, 0, 0, SplittedPanelList[nCurrentPanelList][i].sDescription, 0, 0, 0, 0, 1, 0, 1500, 0, 0, 0, 0, 0} + for i = 1, #CurrentPanelList do + F2.ValuesList[i] = { CurrentPanelList[i].dLength, CurrentPanelList[i].dWidth, CurrentPanelList[i].nQuantity, 0, 0, 0, 0, CurrentPanelList[i].nPdn, 0, 0, 0, 0, CurrentPanelList[i].sDescription, 0, 0, 0, 0, 1, 0, 1500, 0, 0, 0, 0, 0} end local F7 = {