diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 3071633..96d54ba 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -400,9 +400,12 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b local bDangerousReliefCut = false local frFace = BL.GetFaceHvRefDim( Proc.Id, 0) -- verifico che i tagli perpendicolari siano perpendicolari al lato più vicino a Z - local vtTemp = EgtSurfTmFacetNormVersor( vCuts[1][1], 0, GDB_ID.ROOT) ^ frFace:getVersY() - if #vCuts > 0 and vtTemp:isSmall() and not ( bDownCut or bFromBottom) then - bDangerousReliefCut = true + local nFirstPerpendicularCut = ( #vCuts ~= 0 and ( vCuts[1][1] or vCuts[3][1])) + if nFirstPerpendicularCut then + local vtTemp = EgtSurfTmFacetNormVersor( nFirstPerpendicularCut, 0, GDB_ID.ROOT) ^ frFace:getVersY() + if #vCuts > 0 and vtTemp:isSmall() and not ( bDownCut or bFromBottom) then + bDangerousReliefCut = true + end end --DC.PrintOrderCut( vCuts)