From 7248c44406fcf46b9446a21be203295450df48bb Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 7 Aug 2025 17:37:37 +0200 Subject: [PATCH] - migliorie a ottimizzazione teste --- LuaLibs/MachiningLib.lua | 4 ++-- LuaLibs/ProcessLapJoint.lua | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index 167e9cb..8e02439 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -80,7 +80,7 @@ end -- setta ultimi testa e utensile utilizzati se compatibili con ottimizzazione testa local function ConfirmNextMachining() -- utensile corrente - local sToolUuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) + local sToolUuid = EgtGetMachiningParam( MCH_MP.TUUID) local sToolName = EgtTdbGetToolFromUUID( sToolUuid or '') EgtTdbSetCurrTool( sToolName or '') -- testa dell'utensile corrente @@ -331,7 +331,7 @@ end --------------------------------------------------------------------- local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion) - local bOptimizeHeads = BEAM and BEAM.BW and ( not sSortingCriterion or sSortingCriterion == '') + local bOptimizeHeads = ( not sSortingCriterion or sSortingCriterion == '') if bTopHead == nil and bDownHead == nil then bTopHead = true bDownHead = false diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 26eccd0..8408409 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -6883,6 +6883,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa nil, nil, nil, b3Solid) if not bOk then return false, sWarn2 end end + -- dopo aver applicato gli antischeggia ricerco la svuotatura perchè l'ottimizzazione teste deve sapere quale è la lavorazione precedente + _, sPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown) + if not sPocketing and bMillUp then + _, sPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind) + bMillDown = false + end -- se smusso non esclusivo if nChamfer < 2 then -- eseguo la svuotatura della faccia principale, mi restituisce id utensile, il diametro utensile per il foro opzionale