From 9184fa23ac153999a0568148b8a5e76c7be2ccd4 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 12 Feb 2024 18:18:47 +0100 Subject: [PATCH] - piccole correzioni in LapJoint e Long2Cut --- LuaLibs/ProcessLapJoint.lua | 2 +- LuaLibs/ProcessLongDoubleCut.lua | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index a2c708f..ac015fa 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -4657,7 +4657,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local dChainSawExtraLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - dChainSawTHLength - dMaxMat local dMaxMatReduction = 0 local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, vtOrtho) - if dToolEntryAngle > 10 * GEO.EPS_ANG_SMALL then + if dToolEntryAngle > 10 * GEO.EPS_ANG_SMALL and dTanToolEntryAngle then dMaxMatReduction = max( ( ( 2 * BD.C_SIMM_ENC - dSawWidth) / ( 2 * dTanToolEntryAngle) - dChainSawExtraLength) - 5, 0) end local dWorkDepth = dMaxMat - dMaxMatReduction diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index bfda135..3bee763 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -879,8 +879,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- imposto posizione braccio porta testa per non ingombrare agli estremi EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- imposto angolo 3° asse rot - local bDownHead = not bIsTopBladeCurrent - local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX()) + local vtOut = EgtIf( vtN[vOrd[j]]:getX() > 0, X_AX(), -X_AX()) EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtN, vtOut)) -- eseguo if not ML.ApplyMachining( true, false) then @@ -1072,7 +1071,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- determino e imposto l'utilizzo della faccia EgtSetMachiningParam( MCH_MP.FACEUSE, vFaceUse[vOrd[j]]) -- imposto angolo 3° asse rot - local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX()) + local vtOut = EgtIf( vtN[vOrd[j]]:getX() > 0, X_AX(), -X_AX()) EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtN, vtOut)) -- eseguo if not ML.ApplyMachining( true, false) then