From c0156a4a97baf56aaddccf4083bf82e3ee483bd4 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Wed, 25 Jun 2025 11:43:27 +0200 Subject: [PATCH] =?UTF-8?q?In=20LongDoubleCut,=20se=20la=20faccia=20scelta?= =?UTF-8?q?=20non=20=C3=A8=20completa,=20si=20=20lavora=20l'altra=20faccia?= =?UTF-8?q?=20(se=20completa)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLongDoubleCut.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index f64cc41..5238263 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1306,6 +1306,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster end -- ciclo sulle parti local nM = 0 + local bInverted = false for j = 1, nC do -- su entrambe le facce for i = nIni, nFin do @@ -1349,8 +1350,19 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- controllo se lavorazione completa local dMachDepth = vElevation[vOrd[i]] if dMachDepth > dMaxDepth - 10 * GEO.EPS_ANG_SMALL then - sWarn = 'Warning : elevation bigger than max tool depth' - EgtOutLog( sWarn) + -- verifico se posso lavorare la faccia 2 + local nOtherFace = EgtIf( i == 1, 2, 1) + if j == 1 and vtN[vOrd[nOtherFace]]:getZ() > dLimitAngle and vWidth[vOrd[i]] < dMaxDepth then + vOrd[1], vOrd[2] = vOrd[2], vOrd[1] + dLargh = vWidth[vOrd[i]] + dSal, dEal = dEal, dSal + bInverted = true + else + sWarn = 'Warning : elevation bigger than max tool depth' + EgtOutLog( sWarn) + end + elseif bInverted then + dSal, dEal = dEal, dSal end if not bSide and dLargh > 0.8 * dToolDiam then nO = ceil( dLargh / ( 0.6 * dToolDiam))