From 8ddf1f260a26d584cb785d9bd30fa05569c0bc9e Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Wed, 25 Oct 2023 15:37:52 +0200 Subject: [PATCH] In LapJoint e LongDoubleCut corretto comportamento con messaggi di ritorno in caso possa fare con lama --- LuaLibs/ProcessLapJoint.lua | 13 +++++++++++-- LuaLibs/ProcessLongDoubleCut.lua | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index f220313..a47b5eb 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -5743,11 +5743,13 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- leggo i parametri Q per utilizzare la fresa di fianco e/o lama local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1 - local bOK = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + local bOK, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) -- se non sono riuscito a farlo di lama, riprovo con la fresa if not bOK and bUseBlade then bUseBlade = false return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + else + return bOK, sMyWarn end -- prima faccia terminale elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then @@ -5832,7 +5834,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) if Proc.Box:getDimX() > 0.8 * b3Solid:getDimX() and abs( b3Fac1:getDimX() - b3Fac2:getDimX()) < 50 and abs( b3Fac1:getCenter():getX() - b3Fac2:getCenter():getX()) < 50 then local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 - return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + local bOK, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + -- se non sono riuscito a farlo di lama, riprovo con la fresa + if not bOK and bUseBlade then + bUseBlade = false + return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + else + return bOK, sMyWarn + end -- altrimenti else -- verifico se da lavorare con testa da sotto diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index a1d08f1..4811607 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -859,7 +859,6 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster local dLioPerp if j == 1 then -- il primo taglio lo faccio completo se angolo interno maggiore di 90 - -- se devo limitare la lavorazione, verifico che sia effettivamente un taglio longitudinale, altrimenti ritorno errore if not( ProcessLong2Cut.Identify( Proc)) then for i = 1, #vOrd do