diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index d8b8b4c..41965c7 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1,4 +1,4 @@ --- ProcessLapJoint.lua by Egaltech s.r.l. 2022/12/22 +-- ProcessLapJoint.lua by Egaltech s.r.l. 2023/06/06 -- Gestione calcolo mezzo-legno per Travi -- 2019/10/08 Agg. gestione OpenPocket. -- 2021/01/24 Con sega a catena ora sempre impostato asse A. @@ -65,6 +65,7 @@ -- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura. -- 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. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -3184,6 +3185,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin if bOpenOutRaw then sNotes = sNotes .. 'OpenOutRaw=1;' end + sNotes = sNotes .. ( EgtGetMachiningParam( MCH_MP.USERNOTES) or '') EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) if not ML.ApplyMachining( true, false) then -- provo ad allargare leggermente la tasca @@ -4945,7 +4947,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa elseif Proc.Fct == 4 then -- se non angoli fittizi, per rifinire gli angoli premio utensile diam 25 o da BD if not bAllWithEndCap then - dDiam = min( dDiam, BD.MAXDIAM_POCK_CORNER) + dDiam = min( ( 2 * dDiam) + 10 * GEO.EPS_SMALL, BD.MAXDIAM_POCK_CORNER) end elseif Proc.Fct == 3 and bIsL then -- per rifinire gli angoli premio utensile diam 25 o da BD diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 797720a..bc89247 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1,4 +1,4 @@ --- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2022/11/30 +-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2023/06/07 -- Gestione calcolo doppio taglio longitudinale per Travi -- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto. -- 2021/06/29 Corretta gestione caso equivalente a due smussi. @@ -17,6 +17,7 @@ -- 2023/02/22 Nuova gestione del verso di avanzamento ottimale che contempla tutti i casi. -- 2023/03/06 Correzione per i casi con lavorazione limitata. -- 2023/03/23 Correzione per caso con doppia lama da sotto. +-- 2023/06/07 Sistemazione SCC per macchina TURN -- Tabella per definizione modulo local ProcessLong2Cut = {} @@ -1114,12 +1115,12 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster if not BD.TURN then nSCC = EgtIf( ( j == 1 or j == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM) else - if nSide == 1 then - nSCC = EgtIf( vtN[vOrd[i]]:getY() < 0, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP) - elseif nSide == -1 then - nSCC = EgtIf( vtN[vOrd[i]]:getY() < 0, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP) + if nSide == 1 or nSide == -1 then + local bFromYM = (( vtN[vOrd[i]]:getY() < 0 and bConvex) or ( vtN[vOrd[i]]:getY() > 0 and not bConvex)) + nSCC = EgtIf( bFromYM, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP) else - nSCC = EgtIf( vtN[vOrd[i]]:getZ() < 0, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP) + local bFromZM = (( vtN[vOrd[i]]:getZ() < 0 and bConvex) or ( vtN[vOrd[i]]:getZ() > 0 and not bConvex)) + nSCC = EgtIf( bFromZM, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP) end end end diff --git a/Process.lua b/Process.lua index 65c66fd..09d5b8f 100644 --- a/Process.lua +++ b/Process.lua @@ -62,7 +62,7 @@ local function MyProcessInputData() end end if not bFound then - table.insert( vBeam, { Id = nPartId, Name = ( EgtGetName( nPartId) or ( 'Id=' .. tonumber( nPartId)))}) + table.insert( vBeam, { Ind = #vBeam + 1, Id = nPartId, Name = ( EgtGetName( nPartId) or ( 'Id=' .. tonumber( nPartId)))}) end end nId = EgtGetNextSelectedObj() @@ -116,7 +116,13 @@ local function MyProcessInputData() EgtDeselectAll() -- Le ordino in senso di lunghezza crescente - table.sort( vBeam, function( B1, B2) return B1.Box:getDimX() < B2.Box:getDimX() end) + table.sort( vBeam, function( B1, B2) + if abs( B1.Box:getDimX() - B2.Box:getDimX()) < 1 then + return B1.Ind < B2.Ind + else + return B1.Box:getDimX() < B2.Box:getDimX() + end + end) do local sOut = '' for i = 1, #vBeam do diff --git a/Version.lua b/Version.lua index d76bca4..4b845b4 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by Egaltech s.r.l. 2023/05/26 +-- Version.lua by Egaltech s.r.l. 2023/06/08 -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.5e5' +VERSION = '2.5f1' MIN_EXE = '2.5c1'