From ea79ac1366dee3d1c06d0faae6be1c6741cad13f Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Wed, 22 Apr 2026 12:11:35 +0200 Subject: [PATCH] Tutte le forature vengono ordinate per diametro decrescente --- LuaLibs/WallExec.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/LuaLibs/WallExec.lua b/LuaLibs/WallExec.lua index 6217c26..0aad1d4 100644 --- a/LuaLibs/WallExec.lua +++ b/LuaLibs/WallExec.lua @@ -525,10 +525,8 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName if EgtGetOperationPhase( nOperId) == nPhase and ( nType & nOperType) == nOperType and ( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and ( not nPriority or EgtGetInfo( nOperId, 'PRIORITY', 'i') == nPriority ) and - ( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or - ( not bExistName and not ContainsStartName( nOperId, StartNames))) and - ( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or - ( not bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') ~= 1)) then + ( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or ( not bExistName and not ContainsStartName( nOperId, StartNames))) and + ( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or ( not bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') ~= 1)) then -- non si deve cambiare lo stato di attivazione della lavorazione (se disabilitata errata) EgtSetCurrMachining( nOperId) if not EgtIsMachiningEmpty() then @@ -652,8 +650,8 @@ local function SortMachinings( nPhase, PrevMch, nPartId, nPriority) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true, nil, nil, nil, nil, nil, nPriority) -- Forature e Svuotature PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING + MCH_OY.POCKETING + MCH_OY.MILLING, { 'SideMill_', 'Clean_'}, false, 'MOVE_AFTER', false, false, true, nil, nPriority) --- -- Forature *** --- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false) + -- Forature *** + PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, nil, false, nil, true, nil, nil) -- -- Svuotature *** -- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', false) -- -- Fresature che sono rifiniture di spigoli