diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index f96b9f6..68f9ed9 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -21,6 +21,7 @@ -- 2023/01/20 Modificata PutStartNearestToEdge per gestire lato preferito come Y+, Y-, z*, Z-. Aggiunta funzione GetDistanceToNextPart. -- 2023/01/31 Aggiunta funzione ConvertToClosedCurve, precedentemente parte di ProcessMortise.Make -- 2023/02/22 Modifiche a SetOpenSide, aggiunte ChangeOrOpenStart e CurveWithOnlyStraightLines. +-- 2023/06/12 In ChangeOrOpenStart corretta ricerca segmento più lungo. -- Tabella per definizione modulo local BeamLib = {} @@ -966,8 +967,8 @@ function BeamLib.ChangeOrOpenStart( nPathInt, nStartPoint) end -- recupero l'indice del segmento aperto più lungo local nMaxOpen, dMaxLen - local vOpen = EgtGetInfo( nPathInt or GDB_ID.NULL, 'OPEN') - for i = 0, #( vOpen or {}) do + local vOpen = EgtGetInfo( nPathInt or GDB_ID.NULL, 'OPEN', 'vi') + for i = 1, #( vOpen or {}) do -- se primo o più lungo, lo salvo local dLen = EgtCurveCompoLength( nPathInt, vOpen[i]) if not dMaxLen or dLen > dMaxLen then diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index cb94c89..bb15145 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -299,7 +299,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType, return false, sErr end local ptM = ( ptT1 + ptT2) / 2 - local vtTg = ptT2 - ptT1 ; + local vtTg = ptT2 - ptT1 ; vtTg:normalize() local bConvex = ( dAngT > 0) -- verifico non siano orientate troppo verso il basso e molto sbandate (oltre 10 deg) local bFaceOk = {} @@ -315,14 +315,14 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType, vtRef[1] = vtN[1] ^ vtTg if vtRef[1] * vtN[2] < 0 then vtRef[1] = - vtRef[1] end vtRef[1]:normalize() - if abs( vtRef[1]:getZ()) < 0.577 and abs( abs( vtRef[1]:getX()) - abs( vtRef[1]:getY())) < 0.1 then + if abs( vtTg:getZ()) < 0.708 and abs( vtRef[1]:getZ()) < 0.577 and abs( abs( vtRef[1]:getX()) - abs( vtRef[1]:getY())) < 0.1 then vtRef[1] = ptC[1] - ptM vtRef[1]:normalize() end vtRef[2] = vtN[2] ^ vtTg if vtRef[2] * vtN[1] < 0 then vtRef[2] = - vtRef[2] end vtRef[2]:normalize() - if abs( vtRef[2]:getZ()) < 0.577 and abs( abs( vtRef[2]:getX()) - abs( vtRef[2]:getY())) < 0.1 then + if abs( vtTg:getZ()) < 0.708 and abs( vtRef[2]:getZ()) < 0.577 and abs( abs( vtRef[2]:getX()) - abs( vtRef[2]:getY())) < 0.1 then vtRef[2] = ptC[2] - ptM vtRef[2]:normalize() end diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 43c5e3e..d163be8 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -66,6 +66,7 @@ -- 2023/02/21 Piccola correzione alla MakeByPocket. -- 2023/03/31 Correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile. -- 2023/06/06 Limiti su svuotature tasche a L 4 facce come per L 3 facce. In svuotatura aggiunto recupero UserNotes da libreria per MaxOptSize. +-- 2023/16/12 Corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -1355,8 +1356,10 @@ local function MakeRoundCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, local dTMaxDepth = 0 if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) - dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam - dTMaxDepth = EgtTdbGetCurrToolMaxDepth() or dTMaxDepth + if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then + dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam + dTMaxDepth = EgtTdbGetCurrToolMaxDepth() or dTMaxDepth + end end -- se il diametro trovato non è minore dei 3/4 del diametro utilizzato in precedenza, esco @@ -1535,8 +1538,10 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, local dTMaxDepth = 0 if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) - dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam - dTMaxDepth = EgtTdbGetCurrToolMaxDepth() or dTMaxDepth + if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then + dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam + dTMaxDepth = EgtTdbGetCurrToolMaxDepth() or dTMaxDepth + end end local sMillingDn = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and bDoubleSide), bMillDown and bDoubleSide) @@ -1550,8 +1555,10 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, local dTMaxDepthDn = 0 if EgtMdbSetCurrMachining( sMillingDn) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) - dTDiamDn = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiamDn - dTMaxDepthDn = EgtTdbGetCurrToolMaxDepth() or dTMaxDepthDn + if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then + dTDiamDn = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiamDn + dTMaxDepthDn = EgtTdbGetCurrToolMaxDepth() or dTMaxDepthDn + end end -- se il diametro trovato non è minore dei 3/4 del diametro utilizzato in precedenza, esco @@ -1904,7 +1911,9 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI -- recupero i dati dell'utensile ( temporaneo, per compensare errore nella lavorazione) if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) - dMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxDepth + if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then + dMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxDepth + end end -- l'altezza di taglio del tagliente corrisponde al raggio del raccordo che si riesce a coprire -- quindi confronto l'elevazione con il raggio utensile utilizzato per la svuotatura @@ -3281,7 +3290,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) if not ML.ApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() - EgtSetOperationMode( nMchFId, false) + EgtSetOperationMode( nMchId, false) return false, sErr end else diff --git a/UpdateLog.txt b/UpdateLog.txt index 14a30e6..a0ea8c5 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,21 @@ ==== Beam Update Log ==== +Versione 2.5f2 (12/06/2023) +- Fixed : in LapJoint corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato +- In BeamLib -> ChangeOrOpenStart corretta ricerca segmento più lungo. + +Versione 2.5f1 (08/05/2023) +- Fixed : in LongDoubleCut corretta scelta SCC (orientamento braccio testa) per macchine TURN nel caso di concavi +- Modif : in Process (esecuzione manuale da Cam5) ordinamento travi di lunghezza praticamente uguale dipende da ordine di selezione +- Modif : in LapJoint limiti su svuotature tasche a L 4 facce come per L 3 facce +- Modif : in LapJoint su svuotature aggiunto recupero UserNotes da libreria per MaxOptSize. + +Versione 2.5e5 (26/05/2023) +- Fixed : correzioni a Profili Concavo e Convesso per TURN +- Fixed : correzione a foratura per ignorare fori annegati nel pezzo +- Modif : riconoscimento fori da sotto anche dalla faccia di ingresso +- Modif : in foratura se TURN aggiunta possibilità di forare da sotto. + Versione 2.5e4 (23/05/2023) - Modif : in LongCut migliorato calcolo e verifica affondamento per lavorazione con lama con codolo in mezzo - Fixed : correzione SCC lama per macchina Turn [Ticket #1258] diff --git a/Version.lua b/Version.lua index 4b845b4..288e42c 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.5f1' +VERSION = '2.5f2' MIN_EXE = '2.5c1'