From 01260c7278c1344f256d7d249bf991cd710a969a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 28 Jun 2023 11:34:47 +0200 Subject: [PATCH 1/3] update log --- UpdateLog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UpdateLog.txt b/UpdateLog.txt index fc6185a..2056000 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Wall Update Log ==== +Versione 2.5f2 (28/06/2023) +- Added : aggiunte due nuove origini (TN e BN che come X usano WD.NEW_REF), in totale ora sono 8. + Versione 2.5f1 (13/06/2023) - Added : aggiunta gestione priorità da btl - Added : aggiunta gestione lavorazione per lamatura speciale affondata con Tool_ID specifico. From e34ac566e1803d1911983ae625895af8cb5acb93 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 30 Jun 2023 16:22:17 +0200 Subject: [PATCH 2/3] -In LapJoint aggiunta lettura delle note esistenti dalle lavorazioni per evitare di sovrascriverle - Alcune piccole correzioni --- LuaLibs/WProcessLapJoint.lua | 49 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index 64f92f3..16d1e63 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -21,6 +21,7 @@ -- 2023/04/17 Sistemata gestione parametri Q, eliminando quello non usato di forzatura lama e abilitandoli anche per DoubleCut. -- Lavorazione CleanCorner sempre forzata con lato di lavoro in centro. -- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni. +-- 2023/06/30 Aggiunta lettura delle note esistenti dalle lavorazioni per evitare di sovrascriverle. -- Tabella per definizione modulo local WPL = {} @@ -811,7 +812,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp -- riordino le facce nNewProcLoc = ReorderFacesFromTab( nNewProcLoc, vFace) -- acquisisco il numero della faccia - nFacCnt = EgtSurfTmFacetCount( nNewProcLoc) + local nFacCnt = EgtSurfTmFacetCount( nNewProcLoc) nFacInd = nFacCnt - 1 else local sErr = 'Cannot make local bottom surface' @@ -1013,10 +1014,13 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp EgtSetMachiningParam( MCH_MP.DEPTH, 0) -- forzo lato correzione a centrato EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER) + -- leggo eventuali note esistenti della lavorazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) -- Note utente con dichiarazione nessuna generazione sfridi per Vmill - local sUserNotes = 'VMRS=0;' + sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) -- aggiungo alle note massima elevazione - sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( 0.0, 1) .. ';' + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( 0.0, 1)) + -- scrivo le note della lavorazione EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) if not EgtApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() @@ -1302,13 +1306,16 @@ local function MakeByChainSaw( Proc, nFacet, nRawId, b3Raw, dElev, dH, dV) -- se necessario, limito l'affondamento if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' - dDepth = dMaxDepth - dElev + local dDepth = dMaxDepth - dElev EgtOutLog( sWarn) EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1)) end + -- leggo eventuali note esistenti della lavorazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) -- imposto elevazione - local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 2) .. ';' - EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 2)) + -- scrivo le note della lavorazione + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) -- eseguo if not EgtApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() @@ -1732,7 +1739,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d end end -- inserisco la lavorazione di fresatura - local sNameGorge = 'Gorge_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm) + local sNameGorge = 'Gorge_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) local nMchFId = WM.AddMachining( Proc, sNameGorge, sMillingGorge) if not nMchFId then local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sMillingGorge @@ -1748,7 +1755,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d end EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- imposto modo di lavorare la faccia - local nFaceUse = WL.GetNearestParalOpposite( Z_AX(), vtN) + local nFaceUse = WL.GetNearestParalOpposite( Z_AX()) EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse) -- imposto elevazione e step local dStep = EgtGetMachiningParam( MCH_MP.STEP) @@ -1783,7 +1790,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d for i = 1, nNumStep - 1 do nNm = nNm + 1 -- inserisco la lavorazione di taglio sfrido gorge - local sNameGorge = 'GorgeCut_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm) + local sNameGorge = 'GorgeCut_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm) local nMchFId = WM.AddMachining( Proc, sNameGorge, sCuttingGorge) if not nMchFId then local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sCuttingGorge @@ -1860,7 +1867,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d local nSCC = MCH_SCC.ADIR_NEAR EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- imposto modo di lavorare la faccia - local nFaceUse = WL.GetNearestParalOpposite( Z_AX(), vtN) + local nFaceUse = WL.GetNearestParalOpposite( Z_AX()) EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse) -- imposto elevazione e step local dStep = EgtGetMachiningParam( MCH_MP.STEP) @@ -1879,7 +1886,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d dStep = -dStep end EgtSetMachiningParam( MCH_MP.STEP, dStep) - EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') + -- leggo eventuali note esistenti della lavorazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) + -- aggiungo alle note massima elevazione + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3)) + -- scrivo le note della lavorazione + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) -- setto il lato di lavoro standard EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) @@ -1999,7 +2011,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d dStepOtherFace = -dStepOtherFace end EgtSetMachiningParam( MCH_MP.STEP, dStepOtherFace) - EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') + -- leggo eventuali note esistenti della lavorazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) + -- aggiungo alle note massima elevazione + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3)) + -- scrivo le note della lavorazione + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) if bMachFromDn then EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.DEPTH, dDepthOtherFace) @@ -2184,8 +2201,12 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar) EgtOutLog( sWarn) end EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) + -- leggo eventuali note della lavorazione + local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) -- imposto elevazione - EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( min( dElev, dMaxDepth), 1) .. ';') + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( min( dElev, dMaxDepth), 1)) + -- scrivo le note della lavorazione + EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) -- eseguo if not EgtApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() @@ -2614,7 +2635,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw) if sMilling and EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then - local dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam + local dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 bIsBlade = EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0 if bIsBlade then dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dMaxMat From abfee0334d956e35f1eee6e5aff5d4885ed8666a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 30 Jun 2023 16:28:40 +0200 Subject: [PATCH 3/3] update log e versione --- UpdateLog.txt | 3 +++ Version.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 2056000..067cec5 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Wall Update Log ==== +Versione 2.5f3 (30/06/2023) +- Modif : in LapJoint aggiunta lettura di eventuali note di lavorazione esistenti. + Versione 2.5f2 (28/06/2023) - Added : aggiunte due nuove origini (TN e BN che come X usano WD.NEW_REF), in totale ora sono 8. diff --git a/Version.lua b/Version.lua index 34958ac..f2822b1 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Wall NAME = 'Wall' -VERSION = '2.5f2' +VERSION = '2.5f3' MIN_EXE = '2.5b3'