diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 9162825..63b783b 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -1,4 +1,4 @@ --- ProcessCut.lua by Egaltech s.r.l. 2020/04/20 +-- ProcessCut.lua by Egaltech s.r.l. 2020/06/02 -- Gestione calcolo singoli tagli di lama per Travi -- Tabella per definizione modulo @@ -122,12 +122,15 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom) for i = 1, #vCuts do -- determino il modo di tagliare local vtOrthoO + local bNoPerpCuts = false if i % 2 == 1 then vtOrthoO = Vector3d( vtN) else local vtO if #vCuts[i-1] > 0 then vtO = EgtSurfTmFacetNormVersor( vCuts[i-1][1], 0, GDB_ID.ROOT) + else + bNoPerpCuts = true end if vtO then vtOrthoO = Vector3d( vtO) * EgtIf( bOrthInv, -1, 1) @@ -162,8 +165,18 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom) -- tutti gli altri casi vengono saltati -- caso generale else - -- se invertiti tagli ortogonali devo approfondire tagli paralleli dello spessore lama - local dExtraCut = EgtIf( ( i % 2) == 0 and bOrthInv, dSawThick, -0.1) + -- in generale sta sollevato di pochissimo + local dExtraCut = -0.1 + -- se tagli paralleli + if ( i % 2) == 0 then + -- se non ci sono tagli ortogonali devo affondare + if bNoPerpCuts then + dExtraCut = BD.CUT_EXTRA + -- se altrimenti tagli ortogonali invertiti, devo approfondire dello spessore lama + elseif bOrthInv then + dExtraCut = dSawThick + end + end local bOk, sErr = BL.MakeOneFaceBySaw( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dNzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, nil, b3Raw) if not bOk then return bOk, sErr