From 4500f96d6dc02276ecae36ca9166531811356c9b Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 17 Jan 2025 16:33:28 +0100 Subject: [PATCH 1/3] Aggiunto parametro Q09 per inversione ultimo passaggio su contorno libero --- LuaLibs/ProcessFreeContour.lua | 56 +++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index 87d91bd..c7f00ca 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -33,6 +33,7 @@ local Q_ONLY_CHAMFER = 'Q00' -- i local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket local Q_IGNORE_LASER_PROBLEMS = 'Q07' local Q_FORCE_CLAMPABLE_AREA = 'Q08' +local Q_INVERT_LAST_PATH = 'Q09' --------------------------------------------------------------------- -- Riconoscimento della feature @@ -588,6 +589,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end end end + -- eventuale inversione ultimo segmento + local bInvertLastPath = ( ( EgtGetInfo( Proc.Id, Q_INVERT_LAST_PATH, 'd') or 0) == 1) -- eseguo for i = 1, nStep do for j = 1, nDouble do @@ -630,35 +633,66 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- aggiungo geometria EgtSetMachiningGeometry( {{ AuxId, -1}}) -- eventuale accorciamento di testa + local dStartAddLen, dEndAddLen, dWorkSide, bToolInvert, bInvert if ( j == 1 and i > 1) or ( j == 2 and i < nStep) then - local dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen) + dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep) else - EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( j == 1, dStartAddSpec, dEndAddSpec)) + dStartAddLen = EgtIf( j == 1, dStartAddSpec, dEndAddSpec) end -- eventuale accorciamento di coda if ( j == 1 and i < nStep) or ( j == 2 and i > 1) then - local dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen) + dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep) else - EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( j == 1, dEndAddSpec, dStartAddSpec)) + dEndAddLen = EgtIf( j == 1, dEndAddSpec, dStartAddSpec) end -- se estrusione da sotto, inverto direzione fresa if ( j == 1 and bToolInv) or ( j == 2 and not bToolInv) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + bToolInvert = true + else + bToolInvert = false end -- se seconda passata, inverto direzione di lavoro if j == 2 then - EgtSetMachiningParam( MCH_MP.INVERT, true) + bInvert = true + else + bInvert = false end + -- assegno lato di lavoro if Proc.Grp == 0 then - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER) + dWorkSide = MCH_MILL_WS.CENTER elseif ( Proc.Grp == 3 and not bToolInv) or ( Proc.Grp == 4 and bToolInv) or ( Proc.Grp == 1 and bToolInv) or ( Proc.Grp == 2 and bToolInv) then - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) + dWorkSide = MCH_MILL_WS.LEFT elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) or ( Proc.Grp == 1 and not bToolInv) or ( Proc.Grp == 2 and not bToolInv) then - EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) + dWorkSide = MCH_MILL_WS.RIGHT end + + -- se ultimo step da invertire + if i == nStep and bInvertLastPath then + -- se profilo orizzontale + if abs( vtExtr:getZ()) < 10 * GEO.EPS_SMALL then + dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen + bInvert = not( bInvert) + bToolInvert = not( bToolInvert) + else + dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen + bInvert = not( bInvert) + if dWorkSide == MCH_MILL_WS.LEFT then + dWorkSide = MCH_MILL_WS.RIGHT + elseif dWorkSide == MCH_MILL_WS.RIGHT then + dWorkSide = MCH_MILL_WS.LEFT + end + end + end + + -- setto i valori + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen) + EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToolInvert) + EgtSetMachiningParam( MCH_MP.INVERT, bInvert) + EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide) + + -- posizione braccio porta testa local nSCC = MCH_SCC.NONE if not BD.C_SIMM then From 8dc16e1ed9d533e426b1f9755261c1cdebefa357 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 21 Jan 2025 08:54:31 +0100 Subject: [PATCH 2/3] =?UTF-8?q?-=20in=20FreeContour=20aggiunta=20Q09=20per?= =?UTF-8?q?=20inversione=20ultima=20lavorazione=20-=20in=20Cut,=20si=20tag?= =?UTF-8?q?lia=20dal=20basso=20solo=20se=20il=20pezzo=20piccolo=20=C3=A8?= =?UTF-8?q?=20gi=C3=A0=20staccato=20dalla=20barra=20-=20in=20BatchProcess?= =?UTF-8?q?=20(Ts7)=20aggiunta=20scrittura=20id=20progetto=20e=20produzion?= =?UTF-8?q?e=20in=20Btm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BatchProcess.lua | 14 +++++++++++++- UpdateLog.txt | 7 ++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/BatchProcess.lua b/BatchProcess.lua index 99fdf3b..20ec020 100644 --- a/BatchProcess.lua +++ b/BatchProcess.lua @@ -122,13 +122,25 @@ end -- Funzione per aggiornare dati ausiliari local function UpdateAuxData( sAuxFile) local bModif = false + local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL -- Se definito LOAD90, aggiorno local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile) if sLoad90 ~= '' then - local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90) bModif = true end + -- Se definito PROJID, aggiorno + local sProjId = EgtGetStringFromIni( 'AuxData', 'PROJID', '', sAuxFile) + if sProjId ~= '' then + EgtSetInfo( BtlInfoId, 'PROJECT', sProjId) + bModif = true + end + -- Se definito PRODID, aggiorno + local sProdId = EgtGetStringFromIni( 'AuxData', 'PRODID', '', sAuxFile) + if sProdId ~= '' then + EgtSetInfo( BtlInfoId, 'PRODID', sProdId) + bModif = true + end return bModif end diff --git a/UpdateLog.txt b/UpdateLog.txt index 24ea550..7065015 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,8 +1,13 @@ ==== Beam Update Log ==== +Versione 2.1a1 (21/01/2025) +- Added : in FreeContour aggiunta Q09 per inversione ultima lavorazione +- Modif : in Cut, si taglia dal basso solo se il pezzo piccolo è già staccato dalla barra +- Modif : in BatchProcess (Ts7) aggiunta scrittura id progetto e produzione in Btm + Versione 2.6l2 (07/01/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 L030 aggiunto Q03=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 From 0de82a5fd9c6c3ba8a5200d4c714a5ab1d924521 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 21 Jan 2025 09:08:11 +0100 Subject: [PATCH 3/3] update version --- Version.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version.lua b/Version.lua index f950a97..65f3ac2 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.6l2' +VERSION = '2.7a1' MIN_EXE = '2.6e5'