- Correzione a visualizzazione avanzamento slice

This commit is contained in:
Emmanuele Sassi
2022-04-12 15:51:41 +02:00
parent a066ea8f9a
commit 124eeecbab
+15 -3
View File
@@ -41,6 +41,8 @@ function RunSliceAdvancement.Exec()
local nPercentage = tonumber( ViewValues[2])
local nParamsGrp = EgtGetFirstNameInGroup( GDB_ID.ROOT, PARAMS_GRP) or GDB_ID.NULL
local nPrintOrder = EgtGetInfo( nParamsGrp, KEY_PRINT_ORDER, 'i')
-- ciclo sui pezzi
local nPartIndex = 1
local nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex)
@@ -54,8 +56,11 @@ function RunSliceAdvancement.Exec()
local nSolidId = EgtGetFirstNameInGroup( nCrvId, SOLID_GRP)
local ShellList = { {}, {}}
local nSurfId = EgtGetFirstInGroup( nSolidId)
local nOldType = 0
while nSurfId do
local nType = EgtGetInfo( nSurfId, KEY_TYPE, 'i')
if not nType or ( nType ~= 0 and nType ~= 1) then nType = nOldType end
nOldType = nType
table.insert( ShellList[nType + 1], nSurfId)
nSurfId = EgtGetNext( nSurfId)
end
@@ -64,9 +69,16 @@ function RunSliceAdvancement.Exec()
local ToHideList
if nAdvancementType == 1 then
nSegmentQty = #ShellList[1] + #ShellList[2]
SegmentList = ShellList[1]
for i = 1, #ShellList[2] do
SegmentList[#SegmentList + 1] = ShellList[2][i]
if nPrintOrder == PRINT_ORDER.EXT_INT_INF then
SegmentList = ShellList[1]
for i = 1, #ShellList[2] do
SegmentList[#SegmentList + 1] = ShellList[2][i]
end
else
SegmentList = ShellList[2]
for i = 1, #ShellList[1] do
SegmentList[#SegmentList + 1] = ShellList[1][i]
end
end
elseif nAdvancementType == 2 then
nSegmentQty = #ShellList[1]