From 4a4d95d4379ce00f8eef6326f8068e5f86a4e94f Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 3 May 2021 17:43:43 +0200 Subject: [PATCH] DataBeam : - correzione su tagli inclinati verso il basso. --- LuaLibs/ProcessCut.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 9547041..fd4bc63 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -1,4 +1,4 @@ --- ProcessCut.lua by Egaltech s.r.l. 2021/03/31 +-- ProcessCut.lua by Egaltech s.r.l. 2021/05/03 -- Gestione calcolo singoli tagli di lama per Travi -- Tabella per definizione modulo @@ -304,6 +304,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b -- determino la direzione di taglio preferenziale local _, dCutH, dCutV = BL.GetFaceHvRefDim( Proc.Id, 0) local bHorizCut = ( dCutV < dMaxVertDepth - BD.CUT_EXTRA and not bDownCut) + local bVertCutOk = ( dCutH < dMaxDepth - BD.CUT_EXTRA) -- verifico se necessari tagli supplementari EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3) local vCuts = {} @@ -445,7 +446,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b local vtOrthoO if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then vtOrthoO = -Z_AX() - elseif bHorizCut and ( b3Solid:getDimX() > BD.LEN_SHORT_PART or vtN:getX() > 0) then + elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or vtN:getX() > 0) then vtOrthoO = Z_AX() elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then if Proc.Head then