diff --git a/Designing/WinProject.lua b/Designing/WinProject.lua index 2424678..94b17e7 100644 --- a/Designing/WinProject.lua +++ b/Designing/WinProject.lua @@ -270,7 +270,7 @@ _G.WinSetAuxGrpStatus = WinSetAuxGrpStatus ---------------------------------------------------------------------------------- local function WinGetSectionsTotalLenghts() WDG.SECTIONS_LENGTHS = {} -- array con le sezioni - -- ogni sezione è una tabella con le seguenti chiavi : w = spessore, h = altezza, l = lunghezza totale dei tronchetti con quella sezione + -- ogni sezione è una tabella con le seguenti chiavi : w = spessore, h = altezza, l = array con le lunghezze dei pezzi di tale sezione -- scorro tutti i pezzi local nPartId = EgtGetFirstPart() while nPartId do @@ -286,13 +286,13 @@ local function WinGetSectionsTotalLenghts() -- verfico se devo aggiornare sezione già presente o se devo aggiungerla local bFound = false for i = 1, #WDG.SECTIONS_LENGTHS do - if ( abs( WDG.SECTIONS_LENGTHS[i].w - dWidth) < GEO.EPS_SMALL and abs( WDG.SECTIONS_LENGTHS[i].h - dHeight) < GEO.EPS_SMALL) then + if ( abs( WDG.SECTIONS_LENGTHS[i].W - dWidth) < GEO.EPS_SMALL and abs( WDG.SECTIONS_LENGTHS[i].H - dHeight) < GEO.EPS_SMALL) then bFound = true - WDG.SECTIONS_LENGTHS[i].l = WDG.SECTIONS_LENGTHS[i].l + dLen + table.insert( WDG.SECTIONS_LENGTHS[i].L, dLen) end end if not bFound then - table.insert( WDG.SECTIONS_LENGTHS, { W = dWidth, H = dHeight, L = dLen}) + table.insert( WDG.SECTIONS_LENGTHS, { W = dWidth, H = dHeight, L = {dLen}}) end end end