From abbc2005043ce84263fda53bc61a49fe0da6caad Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 5 Jul 2024 18:32:55 +0200 Subject: [PATCH] =?UTF-8?q?Beam=20:=20-=20anche=20nel=20taglio=20a=20cubet?= =?UTF-8?q?ti=20se=20c=C3=A8'=20si=20chiama=20GetNzLimDownUp=20di=20macchi?= =?UTF-8?q?na=20per=20decidere=20limite=20orientamento=20lama=20verso=20il?= =?UTF-8?q?=20basso.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessCut.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index df70d66..d34c9eb 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -542,7 +542,11 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b local dVzLimDwnUp = dNzLimDwnUp if j ~= 1 then vtNewOrthoO = -vtOrthoO - if not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then dVzLimDwnUp = -0.708 end + if BD.GetNzLimDownUp then + dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true) + elseif not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then + dVzLimDwnUp = -0.708 + end end local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) if not bOk then return bOk, sErr end @@ -566,7 +570,11 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b end end local dVzLimDwnUp = dNzLimDwnUp - if not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then dVzLimDwnUp = -0.708 end + if BD.GetNzLimDownUp then + dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true) + elseif not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then + dVzLimDwnUp = -0.708 + end local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw) if not bOk then return bOk, sErr end end