From 249cb4eea598683762c2d00ea09c0ff51bcd3e10 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 3 Jun 2025 10:53:45 +0200 Subject: [PATCH] Se fresa su aggregato e lavorazione rivolta verso Z-, si accede da lato aperto --- LuaLibs/ProcessDtMortise.lua | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index aa14f59..ad4e66a 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -274,6 +274,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local dMaxMat = 30 local dSideAng = 0 local bCW = true + local bMillOnAggregate = sMchExt == '_AT' if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then @@ -345,11 +346,20 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- eventuale calcolo SCC local nSCC - if BD.TURN and not bPocket then - if abs( vtAx:getY()) > abs( vtAx:getZ()) then - nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) - else - nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM) + if BD.TURN then + if not bPocket then + if abs( vtAx:getY()) > abs( vtAx:getZ()) then + nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) + else + nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM) + end + end + -- se aggregato e rivolto verso Z-, si accede da lato aperto + elseif bMillOnAggregate and AreSameVectorApprox( vtExtr, -Z_AX()) then + if Proc.AffectedFaces.Back then + nSCC = MCH_SCC.ADIR_YP + elseif Proc.AffectedFaces.Front then + nSCC = MCH_SCC.ADIR_YM end end -- flag di mirror precedente aggiornabile localmente