From 0443133557570e52201178d71b8930db1d319265 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 14 Jun 2023 15:59:41 +0200 Subject: [PATCH] - lieve correzione per la lettura di vCuts --- LuaLibs/ProcessCut.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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)