From e6a3e0c519e9f45fd97c50a419b00a83f48ffad3 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 5 Nov 2024 11:17:39 +0100 Subject: [PATCH] - in Cut correzione a utilizzo Q07 (forzatura fresa) - in LapJoint se arriva da Cut si applica sempre svuotatura - in LapJoint se birdsmouth a L si applica svuotatura anche in caso di elevazione non raggiunta (non si tenta la fresatura che fallirebbe non trovando facce sul lato lungo) --- LuaLibs/ProcessCut.lua | 2 +- LuaLibs/ProcessLapJoint.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 8996916..2981ba3 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -47,7 +47,7 @@ local ML = require( 'MachiningLib') -- Riconoscimento della feature function ProcessCut.Identify( Proc) -- se richiesto si forza fresatura - Proc.bForceMill = ( Proc.prc == 30 and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1)) + Proc.bForceMill = ( ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10) and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1)) if Proc.bForceMill then return false diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 9d482d0..4ed4761 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -117,6 +117,7 @@ local ProcessLapJoint = {} require( 'EgtBase') local BL = require( 'BeamLib') local Fbs = require( 'FacesBySaw') +local Fbp = require( 'FaceByPocket') local Cut = require( 'ProcessCut') local DoubleCut = require( 'ProcessDoubleCut') local LongCut = require( 'ProcessLongCut') @@ -6334,6 +6335,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if sMyPocketing and ( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or ( bIsL and nUseRoughTool == 0) or + ( bIsL and Proc.Prc == 20) or ( Proc.Prc == 25 and not bIsU and not bIsL)) or ( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then sPocketing = sMyPocketing @@ -7419,6 +7421,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- se รจ una spianatura a una faccia richiamo la LongCut elseif Proc.Prc == 90 then return LongCut.Make( Proc, nPhase, nRawId, nPartId) + -- se arriva da una cut si applica una svuotatura + elseif Proc.Prc == 10 then + local dDiam = min( Proc.Face[1].Height, Proc.Face[1].Width) * 3 + local bMillUp = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() > -0.259) + local bMillDown = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() < 0.342) + local sMchFindMaster = 'OpenPocket' + local _, sPocketing = VerifyPocket( Proc, dDiam, nil, nil, sMchFindMaster, bMillUp, bMillDown) + return Fbp.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid) -- altrimenti, con lama else return Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)