From d2eebfeb61b20192f43304ce37889b7de274f602 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 24 Jul 2026 10:06:20 +0200 Subject: [PATCH 01/11] LapJoint - Slot - Calcolo leadin/out tornato allo stato della 3.1f3 per problemi con altri casi. Modificato calcolo SCC come da FaceBySaw. --- LuaLibs/ProcessLapJoint.lua | 86 ++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 48 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index c9ca02a..4b258e7 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -5713,17 +5713,8 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin LeadIn.StartAddLength = BD.CUT_EXTRA LeadOut.EndAddLength = BD.CUT_EXTRA end - local vtN = Vector3d( FaceToMachine.VtN) - local vtOrthO - if EdgeToMachine.Elevation > - 10 * GEO.EPS_SMALL then - vtOrthO = Vector3d( EdgeToMachine.ToolDirection) - else - vtOrthO = -Vector3d( EdgeToMachine.ToolDirection) - end - local ptP1 = Point3d( FaceToMachine.Edges.BottomEdge.ptStart) - local ptP2 = Point3d( FaceToMachine.Edges.BottomEdge.ptEnd) - local vtV1 = -Vector3d( FaceToMachine.Edges.SideEdges.StartEdge.vtEdge) - local vtV2 = Vector3d( FaceToMachine.Edges.SideEdges.EndEdge.vtEdge) + local ptP1 = Point3d( EdgeToMachine.ptStart) + local ptP2 = Point3d( EdgeToMachine.ptEnd) local bInvert = Machining.Invert if bInvert then @@ -5734,16 +5725,6 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachin Machining.vtTg = vtTg Machining.vtV = vtV1 - -- Versore di riferimento - local vtRef = Vector3d( vtTg) - vtRef:rotate( vtN, EgtIf( bInvert, -90, 90)) - - local b3Box = BBox3d( b3Raw) - b3Box:expand( BD.CUT_SIC) - local ptPa1 = ptP1 + LeadIn.StartAddLength * -vtTg - local ptPa2 = ptP2 + LeadOut.EndAddLength * vtTg - - LeadIn.TangentDistance, LeadIn.PerpDistance, LeadOut.TangentDistance, LeadOut.PerpDistance = Fbs.CalcLeadInOutPerpGeom( ptPa1, ptPa2, vtV1, vtV2, vtN, ( Machining.Tool.Diameter / 2), vtRef, -Machining.RadialOffset, b3Box) else if Machining.IsStartClosed then LeadIn.StartAddLength = -dAddLengthToReduce @@ -5856,23 +5837,42 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw) end -function SawPlusChain.Saw.GetSCC( vtMachiningDirection) +function SawPlusChain.Saw.GetSCC( vtMachiningDirection, vtN, vtTg) -- TODO implementare SCC come per FacesBySaw - local nSCC = MCH_SCC.NONE - if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then - nSCC = MCH_SCC.ADIR_ZP - elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then - nSCC = MCH_SCC.ADIR_ZM - elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then - nSCC = MCH_SCC.ADIR_YP - elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then - nSCC = MCH_SCC.ADIR_YM - elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then - nSCC = MCH_SCC.ADIR_XP - elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then - nSCC = MCH_SCC.ADIR_XM + if not BD.TURN then + -- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata + if BD.C_SIMM and bMaximizeVerticalDepth then + nSCC = MCH_SCC.ADIR_ZM + elseif abs( vtMachiningDirection:getX()) > abs( vtMachiningDirection:getY()) - GEO.EPS_SMALL then + -- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno + if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then + nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP) + else + nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM) + end + else + -- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno + if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then + nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP) + else + nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) + end + end + else + if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then + nSCC = MCH_SCC.ADIR_ZP + elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then + nSCC = MCH_SCC.ADIR_ZM + elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then + nSCC = MCH_SCC.ADIR_YP + elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then + nSCC = MCH_SCC.ADIR_YM + elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then + nSCC = MCH_SCC.ADIR_XP + elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then + nSCC = MCH_SCC.ADIR_XM + end end - return nSCC end @@ -5994,8 +5994,6 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection) end Cutting.nEdgeFaceUse = EdgeToMachine.Id - -- SCC - Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection) -- asse bloccato Cutting.BlockedAxis = {} Cutting.BlockedAxis.Orientation = 'perpendicular' @@ -6003,6 +6001,8 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg Cutting.BlockedAxis.VtOut = EgtIf( FaceToMachine.VtN:getX() > 0, X_AX(), -X_AX()) -- approccio e retrazione Cutting.LeadIn, Cutting.LeadOut = SawPlusChain.CalculateLeadInOut( Cutting, EdgeToMachine, FaceToMachine, b3Raw) + -- SCC + Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection, FaceToMachine.VtN, Cutting.vtTg) -- eventuale step orizzontale Cutting.HorizontalSteps = {} if Cutting.Tool.SideStep then @@ -6036,25 +6036,15 @@ function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw) local bIsCuttingOk = false local sCuttingOriginalMessage = Cutting.Message or '' local sCuttingApplyMessage = '' - local vtTg = Cutting.vtTg - local bInvert = Cutting.Invert local dOriginalRadialOffset = Cutting.RadialOffset local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance - local dOriginalLeadInTangDistance = Cutting.LeadIn.TangentDistance local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance - local dOriginalLeadOutTangDistance = Cutting.LeadOut.TangentDistance for i = Cutting.HorizontalSteps.Count, 1, -1 do Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1) - local dOrthoOffsetStep = ( Cutting.RadialOffset * ( Cutting.vtV * vtTg)) -- update distanza perpendicolare attacco per contemplare l'offset applicato Cutting.LeadIn.PerpDistance = dOriginalLeadInPerpDistance - Cutting.RadialOffset - Cutting.LeadIn.TangentDistance = dOriginalLeadInTangDistance + dOrthoOffsetStep + Cutting.LeadIn.StartAddLength Cutting.LeadOut.PerpDistance = dOriginalLeadOutPerpDistance - Cutting.RadialOffset - Cutting.LeadOut.TangentDistance = dOriginalLeadOutTangDistance - dOrthoOffsetStep - Cutting.LeadOut.EndAddLength - - Cutting.LeadIn.StartAddLength = Cutting.LeadIn.StartAddLength - dOrthoOffsetStep - Cutting.LeadIn.StartAddLength - Cutting.LeadOut.EndAddLength = Cutting.LeadOut.EndAddLength + dOrthoOffsetStep + Cutting.LeadOut.EndAddLength -- applicazione lavorazione bIsCuttingOk, sCuttingApplyMessage = SawPlusChain.ApplyMachining( Cutting, b3Raw) -- update messaggi From 8337129f916a82f9045d5412e7ec0c952dbb74ec Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 24 Jul 2026 10:31:27 +0200 Subject: [PATCH 02/11] update versione e log --- UpdateLog.txt | 3 +++ Version.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 9d46c21..e3d3b0f 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Beam Update Log ==== +Versione 3.1g3 (24/07/2026) +- Fixed : in slot con lama corretta scelta SCC + Versione 3.1g2 (17/07/2026) - Modif : Diminuito LastStep forature in doppio - Modif : ScarfJoint tra le feature da eseguire dopo i fori che la attraversano diff --git a/Version.lua b/Version.lua index f34b019..8eaa1f4 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1g2' +VERSION = '3.1g3' MIN_EXE = '3.1b1' From 2f2b8589affed2c4ccf5fdb3c2489a6e2446fe4e Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Thu, 30 Jul 2026 14:48:42 +0200 Subject: [PATCH 03/11] LapJoint - MakeRoundCleanContour, corretto caso tasca profonda a U aperta --- LuaLibs/ProcessLapJoint.lua | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 4b258e7..6a325b6 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1955,14 +1955,21 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, -- inversione direzione utensile local bInvertMach = false if nPathInt then - -- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale) - if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - bInvertMach = true - -- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti - elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - bInvertMach = true + if bMillDown then + if vtN1:getZ() > 10 * GEO.EPS_SMALL then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + bInvertMach = true + end + else + -- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale) + if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + bInvertMach = true + -- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti + elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + bInvertMach = true + end end end -- imposto posizione braccio porta testa From 187beba6826f220eb106c35d1eaed7351add03aa Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Thu, 30 Jul 2026 17:09:42 +0200 Subject: [PATCH 04/11] - ProfCamb - aggiunta Q19, se = 1 disabilita lavorazione AntiSplint. - update versione e log --- LuaLibs/ProcessProfCamb.lua | 14 ++++++++------ UpdateLog.txt | 3 +++ Version.lua | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 8acc04f..45f2ff9 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -33,6 +33,7 @@ local sEnableExtraBladeUpperFace = 'Q02' -- i local sDepthChamferMill = 'Q03' -- d local sOverMaterialForFinish = 'Q04' -- d local sPreemptiveChamfer = 'Q05' -- i +local sDisableAntiSplint = 'Q19' -- abilitazioni extra local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0 @@ -301,13 +302,14 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local sMilling -- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia local bMakeAs + local bDeleteAntiSplint = EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') == 1 local vtStart = EgtSV( AuxId, GDB_ID.ROOT) if nSide == 0 then - if abs(vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then + if abs( vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then bMakeAs = true end else - if abs(vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then + if abs( vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then bMakeAs = true end end @@ -531,7 +533,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDouble then -- inserisco la lavorazione local sName - if bMakeAs then + if bMakeAs and not bDeleteAntiSplint then sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) else sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -583,7 +585,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) ModifySideAndInvert( Proc, bHead) end -- se devo fare l'antischeggia in testa - if bMakeAs then + if bMakeAs and not bDeleteAntiSplint then local sNewName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) -- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) @@ -621,7 +623,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- inserisco la prima lavorazione local sName - if bMakeAs then + if bMakeAs and not bDeleteAntiSplint then sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) else sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -698,7 +700,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) ModifySideAndInvert( Proc, bHead) end -- se devo fare l'antischeggia in testa - if bMakeAs then + if bMakeAs and not bDeleteAntiSplint then local sNewName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) -- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) diff --git a/UpdateLog.txt b/UpdateLog.txt index e3d3b0f..f31bad0 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,4 +1,7 @@ ==== Beam Update Log ==== +Versione 3.1g4 (30/07/2026) +- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown +- Modif : in ProfCamb aggiunta Q19, se = 1 disabilita lavorazione AntiSplint Versione 3.1g3 (24/07/2026) - Fixed : in slot con lama corretta scelta SCC diff --git a/Version.lua b/Version.lua index 8eaa1f4..74012e1 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1g3' +VERSION = '3.1g4' MIN_EXE = '3.1b1' From 9795bbdc802c065972d9c632c03e6526bc749d88 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 31 Jul 2026 10:03:59 +0200 Subject: [PATCH 05/11] - ProfCamb, piccola correzione commit precedente. --- LuaLibs/ProcessProfCamb.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 45f2ff9..4311586 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -302,7 +302,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local sMilling -- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia local bMakeAs - local bDeleteAntiSplint = EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') == 1 + local bDeleteAntiSplint = ( EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') or 0) == 1 local vtStart = EgtSV( AuxId, GDB_ID.ROOT) if nSide == 0 then if abs( vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then @@ -533,7 +533,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDouble then -- inserisco la lavorazione local sName - if bMakeAs and not bDeleteAntiSplint then + if bMakeAs then sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) else sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -585,7 +585,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) ModifySideAndInvert( Proc, bHead) end -- se devo fare l'antischeggia in testa - if bMakeAs and not bDeleteAntiSplint then + if bMakeAs then local sNewName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) -- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) @@ -623,7 +623,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- inserisco la prima lavorazione local sName - if bMakeAs and not bDeleteAntiSplint then + if bMakeAs then sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) else sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -700,7 +700,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) ModifySideAndInvert( Proc, bHead) end -- se devo fare l'antischeggia in testa - if bMakeAs and not bDeleteAntiSplint then + if bMakeAs then local sNewName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) -- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale) local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId)) From 3c97e96e05e297fa2b131fb1cd96caab532747fd Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Fri, 31 Jul 2026 17:01:15 +0200 Subject: [PATCH 06/11] - RoundCleanContour per tasche a 3 facce a U in doppio correzione Invert e ToolInvert --- LuaLibs/ProcessLapJoint.lua | 2 +- UpdateLog.txt | 7 +++++-- Version.lua | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 6a325b6..cd84499 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1955,7 +1955,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, -- inversione direzione utensile local bInvertMach = false if nPathInt then - if bMillDown then + if bMillDown and not bDoubleSide then if vtN1:getZ() > 10 * GEO.EPS_SMALL then EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) bInvertMach = true diff --git a/UpdateLog.txt b/UpdateLog.txt index f31bad0..3033b53 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,7 +1,10 @@ ==== Beam Update Log ==== -Versione 3.1g4 (30/07/2026) -- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown +Versione 3.1g5 (31/07/2026) +- Fixed : in RoundCleanContour per tasche a 3 facce a U in doppio + +Versione 3.1g4 (31/07/2026) - Modif : in ProfCamb aggiunta Q19, se = 1 disabilita lavorazione AntiSplint +- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown Versione 3.1g3 (24/07/2026) - Fixed : in slot con lama corretta scelta SCC diff --git a/Version.lua b/Version.lua index 74012e1..db32c64 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1g4' +VERSION = '3.1g5' MIN_EXE = '3.1b1' From bec5751e8cda2c90cd859ef41216236f65a784e7 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 4 Aug 2026 09:45:13 +0200 Subject: [PATCH 07/11] =?UTF-8?q?-=20LapJoint,=20MakeByPockets=20-=20se=20?= =?UTF-8?q?lavorazione=20in=20doppio=20taglia=20fino=20a=20met=C3=A0=20tas?= =?UTF-8?q?ca=20e=20non=20oltre=20(+BD.CUT=5FEXTRA=5FMIN)=20la=20considero?= =?UTF-8?q?=20comunque=20completa=20e=20non=20eseguo=20lavorazione=20di=20?= =?UTF-8?q?pulizia=20laterale.=20-=20LapJoint,=20MakeRoundCleanContour=20-?= =?UTF-8?q?=20se=20tasca=20passante=20solo=20da=20sopra=20o=20da=20sotto?= =?UTF-8?q?=20e=20fresa=20di=20contorno=20non=20lavora=20tutto,=20attiva?= =?UTF-8?q?=20lavorazione=20in=20doppio.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 47 +++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index cd84499..cf4710b 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1792,7 +1792,9 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, dDepth, bOneShot) -- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile - local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide) + local bTopHead = not( bMillDown and not bDoubleSide) + local bDownHead = bMillDown and not bDoubleSide + local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, bTopHead, bDownHead) if not sMilling then local sMyWarn = 'Warning : SmallToolContour not found in library' EgtOutLog( sMyWarn) @@ -1954,24 +1956,31 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) -- inversione direzione utensile local bInvertMach = false + local bInvertTool = false if nPathInt then - if bMillDown and not bDoubleSide then + if bDownHead then if vtN1:getZ() > 10 * GEO.EPS_SMALL then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + bInvertTool = true + bInvertMach = true + end + elseif bMillDown and bDoubleSide then + if vtN1:getZ() > 10 * GEO.EPS_SMALL and bDownHead then + bInvertTool = true bInvertMach = true end else -- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale) - if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + if vtN1:getZ() < BD.NZ_MINA and abs( vtN1:getZ()) >= 0.707 then + bInvertTool = true bInvertMach = true -- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti - elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + elseif not bDoubleSide and vtN1:getY() > 10 * GEO.EPS_SMALL then + bInvertTool = true bInvertMach = true end end end + EgtSetMachiningParam( MCH_MP.TOOLINVERT, bInvertMach) -- imposto posizione braccio porta testa local nSCC = MCH_SCC.NONE if not BD.C_SIMM then @@ -2046,7 +2055,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, -- imposto lato di lavoro sinistro EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) -- imposto direzione utensile opposta - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, not bInvertTool) -- imposto posizione braccio porta testa local nSCC = MCH_SCC.NONE if not BD.C_SIMM then @@ -2075,7 +2084,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, EgtSetMachiningParam( MCH_MP.DEPTH, dMachDepth) -- setto se devo invertire il percorso local bInvert = CheckToInvert( nIdPath, true) - EgtSetMachiningParam( MCH_MP.INVERT, not bInvert) + EgtSetMachiningParam( MCH_MP.INVERT, not EgtIf( bInvertMach, not bInvert, bInvert)) -- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) @@ -4590,9 +4599,11 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha else dMachDepth = dMaxDepthDn - ( dDepth / 2) - dCollSic dElev = dMaxDepthDn - bComplete = false - sWarn = 'Warning : elevation bigger than max tool depth' - EgtOutLog( sWarn) + if dMaxDepthDn < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then + bComplete = false + sWarn = 'Warning : elevation bigger than max tool depth' + EgtOutLog( sWarn) + end end else -- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura @@ -4600,9 +4611,11 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic dElev = dMaxDepth - bComplete = false - sWarn = 'Warning : elevation bigger than max tool depth' - EgtOutLog( sWarn) + if dMaxDepth < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then + bComplete = false + sWarn = 'Warning : elevation bigger than max tool depth' + EgtOutLog( sWarn) + end end end if bMakeContour then @@ -8181,7 +8194,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown, bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid, - dDepth, bOneShotm) + dDepth, bOneShot) if not bOk then return false, sWarn2 end if sWarn2 then if not sWarn then sWarn = '' end @@ -8273,7 +8286,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown, bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid, - dDepth, bOneShotm) + dDepth, bOneShot) if not bOk then return false, sWarn2 end if sWarn2 then if not sWarn then sWarn = '' end From dfcb06c298c21c2f41a651272f8dd65fff781c2c Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Wed, 5 Aug 2026 15:47:29 +0200 Subject: [PATCH 08/11] update versione e log --- UpdateLog.txt | 4 ++++ Version.lua | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 3033b53..ed86111 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,4 +1,8 @@ ==== Beam Update Log ==== +Versione 3.1h1 (05/08/2026) +- Modif : in Pocket non eseguo lavorazione di pulizia tasca (laterale) se le lavorazioni sopra e sotto arrivano esattamente a metà tasca (senza affondamento extra) +- Modif : in RoundCleanContour - tasca passante lavorata solo da sopra o da sotto e fresa di contorno non lavora tutto, attiva lavorazione in doppio + Versione 3.1g5 (31/07/2026) - Fixed : in RoundCleanContour per tasche a 3 facce a U in doppio diff --git a/Version.lua b/Version.lua index db32c64..5b947f3 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by Egaltech s.r.l. 2026/05/31 +-- Version.lua by Egaltech s.r.l. 2026/08/05 -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1g5' +VERSION = '3.1h1' MIN_EXE = '3.1b1' From 36618ccc028cbaa624a92e1bb00f688ab4286085 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 11 Aug 2026 12:01:25 +0200 Subject: [PATCH 09/11] - AntiSplintBySaw - Se inverte lavorazione, inverte anche i parametri di LeadIn e LeadOut --- LuaLibs/ProcessLapJoint.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index cf4710b..4f9e852 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -4914,6 +4914,30 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd, EgtSetMachiningParam( MCH_MP.INVERT, not bInvert) -- setto l'offset pari allo spessore lama EgtSetMachiningParam( MCH_MP.OFFSL, -dSawThick) + local LeadIn = { + dStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN), + dLeadInTangDist = EgtGetMachiningParam( MCH_MP.LITANG), + dLeadInPerpDist = EgtGetMachiningParam( MCH_MP.LIPERP), + dLeadInElev = EgtGetMachiningParam( MCH_MP.LIELEV), + dLeadInCompLen = EgtGetMachiningParam( MCH_MP.LICOMPLEN) + } + local LeadOut = { + dEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN), + dLeadOutTangDist = EgtGetMachiningParam( MCH_MP.LOTANG), + dLeadOutPerpDist = EgtGetMachiningParam( MCH_MP.LOPERP), + dLeadOutElev = EgtGetMachiningParam( MCH_MP.LOELEV), + dLeadOutCompLen = EgtGetMachiningParam( MCH_MP.LOCOMPLEN) + } + EgtSetMachiningParam( MCH_MP.STARTADDLEN, LeadOut.dEndAddLen) + EgtSetMachiningParam( MCH_MP.LITANG, LeadOut.dLeadOutTangDist) + EgtSetMachiningParam( MCH_MP.LIPERP, LeadOut.dLeadOutPerpDist) + EgtSetMachiningParam( MCH_MP.LIELEV, LeadOut.dLeadOutElev) + EgtSetMachiningParam( MCH_MP.LICOMPLEN, LeadOut.dLeadOutCompLen) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, LeadIn.dStartAddLen) + EgtSetMachiningParam( MCH_MP.LOTANG, LeadIn.dLeadInTangDist) + EgtSetMachiningParam( MCH_MP.LOPERP, LeadIn.dLeadInPerpDist) + EgtSetMachiningParam( MCH_MP.LOELEV, LeadIn.dLeadInElev) + EgtSetMachiningParam( MCH_MP.LOCOMPLEN, LeadIn.dLeadInCompLen) end end end From 1054f79ac037521cf1924702c3db1afb8ae44c9e Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 18 Aug 2026 16:43:28 +0200 Subject: [PATCH 10/11] In Drill - Fori in doppio con utensili lunghi, corretto calcolo LastStep. --- LuaLibs/BeamExec.lua | 4 ++-- LuaLibs/BeamLib.lua | 4 +++- LuaLibs/ProcessDrill.lua | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 4fbd954..1de34e8 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -2300,7 +2300,7 @@ function BeamExec.ProcessFeatures() BD.IMPROVE_HEAD_TAIL_DRILLINGS = true end -- costanti per doppio - MIRROR_DRILLINGS_MIN_DISTANCE = 40 + MIRROR_DRILLINGS_MIN_DISTANCE = 25 --TODO spostare la variabile MinDistToolX1X2 nel BeamData e usare quella MIRROR_POCKETS_MIN_DISTANCE = EgtIf( BD.DOWN_HEAD, 35, 50) -- verifica se possibile rotazione di 90 gradi BD.ROT90 = BD.ROT90 and Verify90DegRotation( EgtGetFirstRawPart()) @@ -2555,7 +2555,7 @@ function BeamExec.ProcessFeatures() local nNextRawId = EgtGetNextRawPart( nRawId) if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BD.MinRaw then EgtRemoveRawPartFromCurrPhase( nNextRawId) - end + end end nPhase = EgtGetCurrPhase() nDispId = EgtGetPhaseDisposition( nPhase) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 92dceda..724a7cc 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1448,7 +1448,7 @@ function BeamLib.GetToolFromMachining( sMachiningName) Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0 Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0 -- fresa (TODO al momento aggiunte solo le informazioni che servono) - elseif Tool.Type == MCH_TY.MILL_STD or MCH_TY.MILL_NOTIP then + elseif Tool.Type == MCH_TY.MILL_STD or Tool.Type == MCH_TY.MILL_NOTIP then if BD.GetSetupInfo then Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate else @@ -1459,6 +1459,8 @@ function BeamLib.GetToolFromMachining( sMachiningName) if Tool.StemDiameter > Tool.Diameter + GEO.EPS_SMALL then Tool.MaxDepth = Tool.MaxDepth - BD.COLL_SIC end + elseif Tool.Type == MCH_TY.DRILL_STD or Tool.Type == MCH_TY.DRILL_LONG then + Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0 -- altri utensili al momento non previsti else error( 'Wrong tool type') diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 534392a..bd89452 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -559,7 +559,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid) -- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia TgA = CosB / sqrt( 1 - CosB * CosB) - dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA + local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA -- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa if BD.C_SIMM and CosB > 0.866 then dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116 @@ -667,7 +667,13 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end end else - sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10) + local Tool = BL.GetToolFromMachining( sDrilling) + local dDrillbitTipLength_H1 = dMaxToolLength - Tool.Length + local sNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES) + EgtTdbSetCurrTool( EgtGetValInNotes( sNotes, 'DOUBLE', 's') or Tool.Name) + local dDrillbitTipLength_H2 = ( EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or 0) - ( EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0) + EgtTdbSetCurrTool( Tool.Name) + sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', ( MIRROR_DRILLINGS_MIN_DISTANCE + dDrillbitTipLength_H1 + dDrillbitTipLength_H2 + 10) / 2 + 1) end if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth' From 7020c473103eb5af7cc48aa2ac8440436f5d955c Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Mon, 24 Aug 2026 09:17:40 +0200 Subject: [PATCH 11/11] Update versione e log --- UpdateLog.txt | 5 +++++ Version.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index ed86111..e1fb7ab 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,4 +1,9 @@ ==== Beam Update Log ==== + +Versione 3.1h2 (24/08/2026) +- Fixed : in Drill - Fori in doppio con utensili lunghi, corretto calcolo LastStep +- Fixed : AntiSplintBySaw - Se inverte lavorazione, inverte anche i parametri di LeadIn e LeadOut + Versione 3.1h1 (05/08/2026) - Modif : in Pocket non eseguo lavorazione di pulizia tasca (laterale) se le lavorazioni sopra e sotto arrivano esattamente a metà tasca (senza affondamento extra) - Modif : in RoundCleanContour - tasca passante lavorata solo da sopra o da sotto e fresa di contorno non lavora tutto, attiva lavorazione in doppio diff --git a/Version.lua b/Version.lua index 5b947f3..a0e55f1 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '3.1h1' +VERSION = '3.1h2' MIN_EXE = '3.1b1'