From 542c421ac85a1792e9023918c57680b4b29e5d0d Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 11 Dec 2024 11:26:37 +0100 Subject: [PATCH] =?UTF-8?q?-=20in=20FacesBySaw=20aggiuta,=20tramite=20nota?= =?UTF-8?q?=20lavorazione=20PATHINVERT,=20la=20possibilit=C3=A0=20di=20inv?= =?UTF-8?q?ertire=20il=20senso=20di=20percorrenza=20calcolato=20(e=20quind?= =?UTF-8?q?i=20lavorare=20in=20discordanza)=20-=20in=20LapJoint=20modifich?= =?UTF-8?q?e=20per=20utilizzare=20aggregato=20speciale=20per=20fresa=20a?= =?UTF-8?q?=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