From 808f92fa36f1bdfb8d8116155930b038d2f2924d Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 23 Sep 2022 15:35:38 +0200 Subject: [PATCH] =?UTF-8?q?Improvement/Ticket#801:=20-ProcessCut:=20ora=20?= =?UTF-8?q?nelle=20lavorazioni=20laterali,=20se=20viene=20lasciato=20il=20?= =?UTF-8?q?cordolo,=20non=20si=20aggiorna=20il=20grezzo=20-ProcessLongCut:?= =?UTF-8?q?=20ora=20la=20lama=20sotto=20viene=20attivata=20per=20facce=20p?= =?UTF-8?q?oco=20pi=C3=B9=20che=20verticali=20-mancano=20dei=20dettagli=20?= =?UTF-8?q?da=20sistemare=20e=20i=20commenti?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessCut.lua | 16 +++++++++++----- LuaLibs/ProcessLongCut.lua | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index b66d19a..6ba1675 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -249,17 +249,21 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and ( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000)) -- verifico se da considerare taglio lungo dal lato, solo per macchine tipo PF1250, inclinato non più di 30deg - local bLongCutFromSide = ( not bDownCut and ( BD.C_SIMM and BD.DOWN_HEAD and ( vtN:getY() > 0.865 or vtN:getY() < -0.865) and + local bLongCutFromSide = ( not bDownCut and ( BD.C_SIMM and BD.DOWN_HEAD and ( abs(vtN:getY()) > 0.865) and Proc.Box:getDimZ() > b3Solid:getDimZ() - 10 * GEO.EPS_SMALL) and ( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000)) -- se taglio lungo e Q04 = 1 allora lancio il processo dell'L10 local bNoDicing = EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 if bNoDicing then if bLongCut then - return LongCut.Make( Proc, nPhase, nRawId, nPartId, true) + local bOk, sErr = LongCut.Make( Proc, nPhase, nRawId, nPartId, true) + return bOk, sErr, bNoDicing elseif bLongCutFromSide then - return LongCut.Make( Proc, nPhase, nRawId, nPartId, false, 2) + local bOk, sErr = LongCut.Make( Proc, nPhase, nRawId, nPartId, false, 2) + return bOk, sErr, bNoDicing end + -- se non passa dal LongCut rimetto a false perchè ha fatto un taglio standard + bNoDicing = false end -- se pezzo ancora attaccato alla trave, per non rovinare quello successivo local bFillAreaPiece @@ -737,9 +741,11 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, EgtOutLog( sErr) return false, sErr end + local bNoDicing = false -- se taglio con testa da sopra if not bDownHead and not bDownTurn then - local bOk, sErr = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes) + local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes) + bNoDicing = bNoDicing2 if not bOk then return false, sErr end -- altrimenti taglio con testa da sotto else @@ -747,7 +753,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, if not bOk then return false, sErr end end -- Aggiornamento ingombro (se vero taglio o richiesto) - if ProcessCut.Identify( Proc) or bUpdateIng then + if ( ProcessCut.Identify( Proc) or bUpdateIng) and not bNoDicing then UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw) end return true diff --git a/LuaLibs/ProcessLongCut.lua b/LuaLibs/ProcessLongCut.lua index 57cb2f2..299c449 100644 --- a/LuaLibs/ProcessLongCut.lua +++ b/LuaLibs/ProcessLongCut.lua @@ -436,8 +436,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus if ( nSide == -1 or abs(nSide) == 2) and vtN:getZ() <= -0.5 then bCanUseUnderBlade = true end - -- se faccia da sotto o di lato ma con versore Z negativo abilito la lavorazione con lame mixate - if ( nSide == -1 or abs(nSide) == 2) and vtN:getZ() <= -0.0175 then + -- se faccia da sotto o di lato ma con versore Z sotto l'orizzontale abilito la lavorazione con lame mixate + if ( nSide == -1 or abs(nSide) == 2) and vtN:getZ() <= 0.0175 then bCanUseUnderBlade = true end -- se faccia da sopra o di lato ma con versore Z negativo verifico che abbia un angolo compatibile (28deg) per non avere extracorsa