diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index ec2699c..bf30107 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -322,7 +322,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0) -- determino la direzione di taglio preferenziale local frFac, dCutH, dCutV = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw) - local bHorizCut = ( dCutV < dMaxVertDepth - BD.CUT_EXTRA and not bDownCut) + local bHorizCut = ( dCutV < dMaxVertDepth - BD.CUT_EXTRA and not bDownCut) or + ( dCutV < 0.8 * dMaxVertDepth - BD.CUT_EXTRA and b3Solid:getDimZ() < 0.8 * dMaxVertDepth - BD.CUT_EXTRA) local bVertCutOk = ( dCutH < dMaxDepth - BD.CUT_EXTRA) -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) @@ -467,7 +468,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 ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0) then + elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0 or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then vtOrthoO = Z_AX() elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail 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