From a5cd84172ed7696c26bbd0e28ae00e706257dd42 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 17 Apr 2026 12:54:35 +0200 Subject: [PATCH 1/4] LapJoint - Aggiunto caso di Slot su testa o coda con lato di fondo inclinato e lati aperti sui fianchi. --- LuaLibs/BeamLib.lua | 2 +- LuaLibs/ProcessLapJoint.lua | 28 +++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 0c19524..616a7e5 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -588,7 +588,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng) end local bEveryFaceHasUndercut = ( nFacesWithUnderCut == nFacCnt) -- tunnel o assimilabile - if Proc.Topology == 'Tunnel' or ( bCompare3Fc and Proc.Topology == 'Groove' and Proc.IsThrough) or ( Proc.Topology == 'Strip' and bEveryFaceHasUndercut) then + if Proc.Topology == 'Tunnel' or ( bCompare3Fc and Proc.Topology == 'Groove' and Proc.IsThrough and not (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)) or ( Proc.Topology == 'Strip' and bEveryFaceHasUndercut) then if Proc.IsParallel or Proc.AllRightAngles then return -1, GEO.INFINITO, true else diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index b3af308..4143ff2 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3473,17 +3473,35 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, -- imposto offset radiale local dOffs = ( i - 1) * dStep EgtSetMachiningParam( MCH_MP.OFFSR, dOffs) + local bElevAdj + local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, rfFac:getVersZ()) -- se necessario, avverto limitazione dell'affondamento - if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then - EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth) - sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' - EgtOutLog( sWarn) + if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then + if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) then + local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1]) + local dWorkEdgeWidth + for i = 1, #Edges do + if Edges[i].AdjacentFaceId == nFacInd then + dWorkEdgeWidth = Edges[i].Length + break + end + end + local dDeltaDepth = dWorkEdgeWidth * cos( dToolEntryAngle) + bElevAdj = true + EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth - dDeltaDepth) + else + EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth) + sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' + EgtOutLog( sWarn) + end + --local dDepth = dMaxDepth - dElev --EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1)) end -- imposto massima elevazione local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' - sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 2)) + local dElevAdj = EgtIf( bElevAdj, dElev / sin( dToolEntryAngle), dElev) + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElevAdj, 2)) EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) -- eseguo if not ML.ApplyMachining( true, false) then From 946f5e8bf641858b9f50535d51c5aedca20c0ffb Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 17 Apr 2026 15:29:14 +0200 Subject: [PATCH 2/4] LapJoint - Tolto controllo nella BeamLib (situazione precedente) e inserito controllo direttamente nella MakeByChainOrSaw() --- LuaLibs/BeamLib.lua | 2 +- LuaLibs/ProcessLapJoint.lua | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 616a7e5..0c19524 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -588,7 +588,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng) end local bEveryFaceHasUndercut = ( nFacesWithUnderCut == nFacCnt) -- tunnel o assimilabile - if Proc.Topology == 'Tunnel' or ( bCompare3Fc and Proc.Topology == 'Groove' and Proc.IsThrough and not (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)) or ( Proc.Topology == 'Strip' and bEveryFaceHasUndercut) then + if Proc.Topology == 'Tunnel' or ( bCompare3Fc and Proc.Topology == 'Groove' and Proc.IsThrough) or ( Proc.Topology == 'Strip' and bEveryFaceHasUndercut) then if Proc.IsParallel or Proc.AllRightAngles then return -1, GEO.INFINITO, true else diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 4143ff2..fea7633 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3408,7 +3408,9 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, bGoFromHead = false -- continuo di testa se fessura con tre facce o non รจ tunnel else - bGoFromHead = (( bIs3Faces and dMaxElev) or not bOrthoFaces) + bGoFromHead = (( bIs3Faces and ( dMaxElev + or ( Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel))) + or not bOrthoFaces) end end -- se continuo a lavorare di testa @@ -3477,7 +3479,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, rfFac:getVersZ()) -- se necessario, avverto limitazione dell'affondamento if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then - if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) then + if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1]) local dWorkEdgeWidth for i = 1, #Edges do From 5fcaf823a0ab9278635e57f8e2dd8d36c680a9c6 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 28 Apr 2026 16:25:38 +0200 Subject: [PATCH 3/4] =?UTF-8?q?ProcessDrill=20-=20lavorazioni=20in=20doppi?= =?UTF-8?q?o:=20tolto=20foro=20singolo=20di=20sfondamento=20se=20utensile?= =?UTF-8?q?=20non=20=C3=A8=20abbastanza=20lungo.=20In=20tal=20caso=20profo?= =?UTF-8?q?ndit=C3=A0=20lavorazione=20in=20doppio=20aumentata=20al=20massi?= =?UTF-8?q?mo=20della=20possibilit=C3=A0=20dell'utensile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamExec.lua | 3 +++ LuaLibs/ProcessDrill.lua | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index a2dce21..07a1b06 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -1991,6 +1991,9 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw) end local dToolDoubleDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM, 'd') local dToolDoubleMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) + if ( sType == 'Pocket_AT' or sType == 'Pocket') then + dToolDoubleMaxDepth = EgtTdbGetCurrToolMaxDepth() + end dMachiningDepth = min( dMachiningDepth, dToolDoubleMaxDepth) -- recupero la lunghezza della parte inclinata della punta local dToolDoubleTipLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - EgtTdbGetCurrToolParam( MCH_TP.LEN) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 7a37621..f797e40 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -613,6 +613,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end end end + local dDepthOri = dDepth -- se foro da saltare per eccessiva inclinazione if not bTryDrill then sMyWarn = 'Warning in drill : too slant hole' @@ -654,6 +655,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 dLastStepDepth = dDepth + dReduceDepth dDepth = dDepth - dReduceDepth + if ( dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL) and ( dMaxDepth <= ( dLen / 2) - dReduceDepth) and ( dDepthOri ~= dDepth) then + dDepth = dMaxDepth + end end else sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15) @@ -718,12 +722,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) else -- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then + if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then + sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' + return false, sMyWarn + end local idMachiningLastStep = EgtCopyMachining( EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)), sName) EgtSetCurrMachining( idMachiningLastStep) - if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then - sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' - dLastStepDepth = dMaxDepth - end local dMaxElevLastStep = dLastStepDepth - dDepth sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1)) EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth) From c746a11e45fc0825cab635c2be8ce5fe4b088a61 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 5 May 2026 13:32:02 +0200 Subject: [PATCH 4/4] update log e version --- UpdateLog.txt | 4 ++++ Version.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index f61c848..3609e15 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,9 @@ ==== Beam Update Log ==== +Versione 3.1e1 (05/05/2026) +- Modif : in LapJoint migliorate slot con sega a catena +- Fixed : in DrillPocket in doppio eliminata lavorazione aggiuntiva in caso di utensile non abbastanza lungo + Versione 3.1d2 (10/04/2026) - Added : in StepJoint aggiunto Q02=1 per forzare fresa - Added : in DtMortise aggiunto Q01=1 per disabilitare antischeggia diff --git a/Version.lua b/Version.lua index e1b3d28..8d60f54 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1d3' +VERSION = '3.1e1' MIN_EXE = '3.1b1'