- in WallLib aggiunta funzione per splittare le tabelle più lunghe di un numero massimo di elementi

- in PanelSaw modificate l'esportazione formato Cutty per prevedere più file nel caso si superi il numero massimo di pannelli gestito
This commit is contained in:
luca.mazzoleni
2025-09-30 15:45:56 +02:00
parent 79856f6345
commit a17e649d44
2 changed files with 212 additions and 193 deletions
+22
View File
@@ -552,5 +552,27 @@ function WallLib.IsFeatureCuttingEntireSection( b3Proc, dRawW, dRawH, dRawL)
return ( ( ( abs( b3Proc:getDimY() - dRawW) < 10 * GEO.EPS_SMALL or b3Proc:getDimY() > dRawW) or ( abs( b3Proc:getDimX() - dRawL) < 10 * GEO.EPS_SMALL or b3Proc:getDimX() > dRawL)) and (abs(b3Proc:getDimZ() - dRawH) < 10 * GEO.EPS_SMALL or b3Proc:getDimZ() > dRawH))
end
-------------------------------------------------------------------------------------------------------------
-- Splitta una tabella in tabelle di dimensioni massima nMaxItemsCount
function WallLib.SplitTableInChunks( Table, nChunkSize)
local Result = {}
local Chunk = {}
for i, v in ipairs( Table) do
table.insert( Chunk, v)
if #Chunk == nChunkSize then
table.insert( Result, Chunk)
Chunk = {}
end
end
-- se rimangono elementi, li aggiungo
if #Chunk > 0 then
table.insert( Result, Chunk)
end
return Result
end
-------------------------------------------------------------------------------------------------------------
return WallLib