From 4c19cc49e2934ddeeb76fbd3635f552193604801 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 10 Dec 2024 09:49:10 +0100 Subject: [PATCH 1/9] - in LapJoint modifiche per gestione fresa a disco su aggregato - in BeamLib aggiunta funzione GetToolFromMachining estrapolata da SawPlusChain --- LuaLibs/BeamLib.lua | 39 +++++++++++++++++++++++++++ LuaLibs/ProcessLapJoint.lua | 53 +++++++++++++------------------------ 2 files changed, 57 insertions(+), 35 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 747a16b..100d81f 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1335,5 +1335,44 @@ function BeamLib.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail) return true end +------------------------------------------------------------------------------------------------------------- +function BeamLib.GetToolFromMachining( sMachiningName) + local Tool = {} + if EgtMdbSetCurrMachining( sMachiningName) then + local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) + if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then + Tool.Name = EgtTdbGetCurrToolParam( MCH_TP.NAME) + Tool.IsCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0) + Tool.Type = EgtTdbGetCurrToolParam( MCH_TP.TYPE) + Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 + -- lama + if Tool.Type == MCH_TY.SAW_STD or Tool.Type == MCH_TY.SAW_FLAT then + Tool.Thickness = EgtTdbGetCurrToolParam(MCH_TP.THICK) or 0 + Tool.MaxDepth = EgtTdbGetCurrToolMaxDepth() or 0 + Tool.SideStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDESTEP', 'd') + -- sega a catena + elseif Tool.Type == MCH_TY.MORTISE_STD then + Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0 + Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0 + Tool.Width = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 + 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 + if BD.GetSetupInfo then + Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)) + else + Tool.IsOnAggregate = false + end + -- altri utensili al momento non previsti + else + error( 'Wrong tool type') + end + end + end + + return Tool +end + ------------------------------------------------------------------------------------------------------------- return BeamLib \ No newline at end of file diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index c3820e0..ac70220 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -5038,38 +5038,6 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face) end -function SawPlusChain.GetToolFromMachining( sMachiningName) - local Tool = {} - if EgtMdbSetCurrMachining( sMachiningName) then - local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) - if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then - Tool.Name = EgtTdbGetCurrToolParam( MCH_TP.NAME) - Tool.IsCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0) - Tool.Type = EgtTdbGetCurrToolParam( MCH_TP.TYPE) - Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 - -- lama - if Tool.Type == MCH_TY.SAW_STD or Tool.Type == MCH_TY.SAW_FLAT then - Tool.Thickness = EgtTdbGetCurrToolParam(MCH_TP.THICK) or 0 - Tool.MaxDepth = EgtTdbGetCurrToolMaxDepth() or 0 - Tool.SideStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDESTEP', 'd') - -- sega a catena - elseif Tool.Type == MCH_TY.MORTISE_STD then - Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0 - Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0 - Tool.Width = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 - Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0 - Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0 - -- altri utensili al momento non previsti - else - error( 'Wrong tool type') - end - end - end - - return Tool -end - - function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine) -- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom) @@ -5281,7 +5249,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg end end Cutting.Type = MCH_OY.MILLING - Cutting.Tool = SawPlusChain.GetToolFromMachining( Cutting.Name) + Cutting.Tool = BL.GetToolFromMachining( Cutting.Name) -- verifica dimensioni tasca e direzione compatibili -- se tasca meno spessa della lama la strategia non è applicabile @@ -5479,7 +5447,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine EgtOutLog( Mortising.Message) end Mortising.Type = MCH_OY.MORTISING - Mortising.Tool = SawPlusChain.GetToolFromMachining( Mortising.Name) + Mortising.Tool = BL.GetToolFromMachining( Mortising.Name) -- in caso di tunnel da un lato permetto eventuale inversione lato di lavoro in caso di errori di applicazione (es: Outstroke) if Proc.Topology == 'Tunnel' and sMortisingType == 'OneSide' or sMortisingType == 'OneSideAndExtend' then @@ -5981,8 +5949,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa vtN, vtN2 = vtN2, vtN end end + -- informazioni utensile + local Tool = BL.GetToolFromMachining( sMilling) -- se lavorazione da sotto e lunga, va divisa in due metà - local bDouble = ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200) and not BD.TURN) + local bDouble = not Tool.IsOnAggregate and ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200) and not BD.TURN) -- inserisco la lavorazione di fresatura local sName = 'BHMill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMchFId = EgtAddMachining( sName, sMilling) @@ -6050,6 +6020,19 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end EgtSetMachiningParam( MCH_MP.SCC, nSCC) + -- impostazioni per fresa a disco su aggregato + if Tool.IsOnAggregate and AreSameVectorApprox( vtN, -Z_AX()) then + EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT) + if bHeadDir then + EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, 'B=-90') + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + else + EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, 'B=90') + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, false) + end + end -- eseguo if not ML.ApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() From 542c421ac85a1792e9023918c57680b4b29e5d0d Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 11 Dec 2024 11:26:37 +0100 Subject: [PATCH 2/9] =?UTF-8?q?-=20in=20FacesBySaw=20aggiuta,=20tramite=20?= =?UTF-8?q?nota=20lavorazione=20PATHINVERT,=20la=20possibilit=C3=A0=20di?= =?UTF-8?q?=20invertire=20il=20senso=20di=20percorrenza=20calcolato=20(e?= =?UTF-8?q?=20quindi=20lavorare=20in=20discordanza)=20-=20in=20LapJoint=20?= =?UTF-8?q?modifiche=20per=20utilizzare=20aggregato=20speciale=20per=20fre?= =?UTF-8?q?sa=20a=20disco?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/FacesBySaw.lua | 6 ++++++ LuaLibs/ProcessLapJoint.lua | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index bada866..ef952a6 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -246,6 +246,12 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw return false end local bIsSawCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0) + -- se settato nelle note lavorazione si lavora in discordanza + EgtMdbSetCurrMachining( sCutting) + local sMachiningNotes = EgtMdbGetCurrMachiningParam( MCH_MP.USERNOTES) or '' + if ( EgtGetValInNotes( sMachiningNotes, 'PATHINVERT', 'd') or 0) == 1 then + bIsSawCCW = not bIsSawCCW + end local bInvert = bForceInvert -- l'inversione può essere comandata da rotazione lama (direzione concorde, legata anche a DownUp) oppure da direzione Z del percorso (si preferisce lavorare dal basso verso l'alto per limitare le corse) -- se c'è disaccordo tra rotazione e direzione si cambia il lato di lavoro, se possibile. Se ciò non è possbile comanda la direzione. Se percorso orizzontale comanda la rotazione. diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index ac70220..e4f7b0f 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -6021,16 +6021,19 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- impostazioni per fresa a disco su aggregato - if Tool.IsOnAggregate and AreSameVectorApprox( vtN, -Z_AX()) then - EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT) - if bHeadDir then - EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, 'B=-90') - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + if Tool.IsOnAggregate then + if AreSameVectorApprox( vtN, -Z_AX()) then + EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT) + EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP) + if bHeadDir then + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + else + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, false) + end else - EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, 'B=90') - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) - EgtSetMachiningParam( MCH_MP.TOOLINVERT, false) + EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end end -- eseguo From 1c64f500b3c528256cb757977e26be1c36e102eb Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 11 Dec 2024 11:56:57 +0100 Subject: [PATCH 3/9] - in BeamLib correzione in GetToolFromMachining --- LuaLibs/BeamLib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 100d81f..0d7e533 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1360,7 +1360,7 @@ function BeamLib.GetToolFromMachining( sMachiningName) -- fresa (TODO al momento aggiunte solo le informazioni che servono) elseif Tool.Type == MCH_TY.MILL_STD or MCH_TY.MILL_NOTIP then if BD.GetSetupInfo then - Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)) + Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate else Tool.IsOnAggregate = false end From e4ba0214821d676923ce1bc6e444e10609bd0504 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 12 Dec 2024 09:26:35 +0100 Subject: [PATCH 4/9] - in LapJoint abiitata SideMillAsBlade anche da sotto --- LuaLibs/ProcessLapJoint.lua | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index e4f7b0f..d108d1f 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -873,12 +873,25 @@ function ProcessLapJoint.Classify( Proc, b3Raw) end -- se è presente il rinvio angolare con lavorazioni di tasca ed è una tasca perfettamente verticale da sotto, non ruoto if BD.ANG_TRASM and Proc.Fct >= 4 and not bClosedOrthoFaces then - local vtNBottomFace = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT) - if AreOppositeVectorApprox( vtNBottomFace, Z_AX()) and + if AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) and ( Proc.Fct >= 5 and ML.FindPocketing( 'Pocket_AT') or ( Proc.Fct < 5 and ML.FindPocketing( 'OpenPocket_AT'))) then return true, false end end + -- se groove da sotto e possibile fresatura tipo SideMillAsBlade non ruoto + if Proc.AllRightAngles and Proc.Topology == 'Groove' and not( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) then + -- recupero gruppo per geometria addizionale + local nAddGrpId = BL.GetAddGroup( nPartId) + if not nAddGrpId then + local sErr = 'Error : missing AddGroup' + EgtOutLog( sErr) + return false, sErr + end + if VerifySideMillAsSaw( Proc, nAddGrpId, Proc.Face[nFacInd + 1].VtN, min( Proc.Face[nFacInd + 1].Height, Proc.Face[nFacInd + 1].Width) , Proc.Face[nFacInd + 1].Elevation) then + Proc.OkFromBottom = true + return true, false + end + end -- se scanalatura chiusa lavoro la faccia di fondo if Proc.Topology == 'Pocket' and ( Proc.IsParallel or Proc.AllRightAngles) and not bClosedOrthoFaces then nFacInd = Topology.GetFacesWithGivenAdjacencyNumber( Proc, nil, 4)[1] @@ -6195,7 +6208,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if BD.ANG_TRASM and Proc.Fct >= 4 and AreOppositeVectorApprox( vtN, Z_AX()) then bLapJointAngTrasm = true -- se orientata verso il basso e non c'è testa da sotto, verifico l'alternativa - elseif vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 then + elseif vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 and not Proc.OkFromBottom then ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT) nFacInd, nFacInd2 = nFacInd2, nFacInd dFacElev, dFacElev2 = dFacElev2, dFacElev @@ -6203,7 +6216,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end -- verifico non sia orientata verso il basso o ci sia una testa dal basso o la lavorazione sia dal lato. local bFaceDown = ( vtN:getZ() < BD.NZ_MINA) - if bFaceDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill and not bLapJointAngTrasm then + if bFaceDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill and not bLapJointAngTrasm and not Proc.OkFromBottom then local sErr = 'Error : LapJoint from bottom impossible' EgtOutLog( sErr) return false, sErr @@ -7013,7 +7026,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) for i = 1, #vAddId do local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD) local nFct = EgtSurfTmFacetCount( vAddId[i]) - local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces} + local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom} Topology.Classify( AddProc, b3Raw) -- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil) local bOk, sMyWarn From 677ff492e79dbe5563332a87c9615319df9dc0b0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 12 Dec 2024 16:59:41 +0100 Subject: [PATCH 5/9] - correzione in LapJoint per SideMillAsBlade --- LuaLibs/ProcessLapJoint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index d108d1f..f82c2bc 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -879,7 +879,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw) end end -- se groove da sotto e possibile fresatura tipo SideMillAsBlade non ruoto - if Proc.AllRightAngles and Proc.Topology == 'Groove' and not( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) then + if Proc.AllRightAngles and ( Proc.Topology == 'Groove' or Proc.Topology == 'Pocket') and not( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) then -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) if not nAddGrpId then From c219a6842ba76c00362648fc45662beb0a110928 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 13 Dec 2024 12:42:01 +0100 Subject: [PATCH 6/9] =?UTF-8?q?-=20in=20LapJoint=20la=20Q=20ForceSideMill?= =?UTF-8?q?=20ora=20funziona=20solo=20se=20la=20feature=20=C3=A8=20aperta?= =?UTF-8?q?=20sul=20fronte=20o=20sul=20retro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index f82c2bc..a072d6d 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -935,7 +935,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw) local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) -- se forzata la lavorazione con fresa di lato da parametro Q03=2/3 non devo ruotare local nSideRoughTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd') - local bForceSideMill = ( ( nSideRoughTool == 2 or nSideRoughTool == 3) and ( Proc.Fct == 3 or Proc.Fct == 4)) + local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( nSideRoughTool == 2 or nSideRoughTool == 3) and ( Proc.Fct == 3 or Proc.Fct == 4) if bForceSideMill then bDown = false elseif nFacInd2 and dElev2 < 160 and dElev2 < 2 * dElev then @@ -5944,7 +5944,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2) -- se parametro Q03=2 forzo la fresatura di lato; con Q03=3 forzo solo se la faccia di lavoro non è rivolta verso l'alto +/-10°; per rabbet che guardano in giù sempre fresatura di lato local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) - local bForceSideMill = bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2)) + local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2))) -- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill) if bPrevBhSideMill == nil then From 6caa4fb6b5dd17cab6519856ec6721359d5e5e6a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 16 Dec 2024 09:52:29 +0100 Subject: [PATCH 7/9] - in LapJoint aggiunta Q_SIDE_ROUGH_TOOL=4 per lavorare con fresa evitando tasche aperte testa/coda --- LuaLibs/ProcessLapJoint.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index a072d6d..ec931bf 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -418,7 +418,7 @@ local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill) -- se non feature BlockHausHalfLap e non abilitato parametro Q per lavorarlo di fianco e non macchina BH esco local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 - if Proc.Prc ~= 37 and nUseSideTool == 0 and not BD.BH_MACHINE then + if Proc.Prc ~= 37 and not BD.BH_MACHINE and ( nUseSideTool == 0 or ( nUseSideTool == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right))) then return false end @@ -7307,6 +7307,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) if Proc.Prc == 30 or Proc.Prc == 20 then local nBladeAntisplint = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0 local nUseRoughToolOnSide = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 + if nUseRoughToolOnSide == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) then + nUseRoughToolOnSide = 0 + end nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, Q_BLADE_ON_ALONG_FACE, 'i') or 0 -- se antischeggia di fresa o abilitato sgrossatore di fianco if nBladeAntisplint == 2 or nUseRoughToolOnSide > 0 then From 38b1eba03eb6864d15138bb918e7eab6997de6cb Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 30 Dec 2024 12:14:44 +0100 Subject: [PATCH 8/9] Se foro aperto in faccia di coda (LEFT), non si considerano dipendenze --- LuaLibs/BeamExec.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 53a4253..6cd5836 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -395,6 +395,8 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT) Proc2.TaskId = Proc.TaskId Proc2.AdjId = Proc.AdjId Proc2.MainId = Proc.MainId + -- recupero l'elenco delle facce della parte interessate dalla feature + Proc2.AffectedFaces = BL.GetProcessAffectedFaces( Proc2) table.insert( vProc, Proc2) -- verifico se devo inserire i prefori if Drill.IsPredrillNeeded( Proc2) then @@ -2026,9 +2028,12 @@ function GetFeatureInfoAndDependency( vProc, b3Raw) local ProcB = vProc[j] -- verifico se feature tipo LapJoint è attraversata da almeno un foro if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove' or Mortise.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then - Proc.PassedByHole = true - ProcB.Dependency = {} - ProcB.Dependency.ExecBefore = Proc + -- se foro in coda non setto la dipendenza + if not ProcB.AffectedFaces.Left then + Proc.PassedByHole = true + ProcB.Dependency = {} + ProcB.Dependency.ExecBefore = Proc + end end -- verifico se feature tipo LapJoint è attraversata da almeno una mortasa a coda di rondine if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then From f388cf47f3cd0a35ac25e4047ea694074b6f1d30 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 7 Jan 2025 18:00:08 +0100 Subject: [PATCH 9/9] update log e versione --- UpdateLog.txt | 8 ++++++++ Version.lua | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index eb617d3..634329d 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,13 @@ ==== Beam Update Log ==== +Versione 2.7a1 (01/07/2025) +- Added : in LapJoint abiitata SideMillAsBlade anche da sotto e varie migliorie +- Modif : in LapJoint aggiunta Q_SIDE_ROUGH_TOOL=4 per lavorare con fresa evitando tasche aperte testa/coda +- Modif : in LapJoint modifiche per gestione fresa a disco su aggregato +- Modif : in fresature con lama o simili aggiunta la possibilità di invertire il senso di percorrenza calcolato in automatico +- Modif : migliorie all'ordinamento +- Fixed : in LapJoint la Q per forzare lavorazione di lato funziona solo se la feature è aperta davnti o dietro + Versione 2.6l1 (11/12/2024) - Added : aggiunta gestione slot e tagli di lama con lame molto grandi - Modif : in lama + motosega aggiunta gestione slot aperte con lato obliquo diff --git a/Version.lua b/Version.lua index db5bd2d..65f3ac2 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.6l1' +VERSION = '2.7a1' MIN_EXE = '2.6e5'