From 19e1d4e7603f73fac5e83fdc841ce9712ba396b8 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 10 Mar 2025 13:22:30 +0100 Subject: [PATCH 1/5] - In HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo per farlo scaturire. - In LapJoint si anticipa controllo per decidere se feature di coda --- LuaLibs/ProcessHeadCut.lua | 3 ++- LuaLibs/ProcessLapJoint.lua | 10 ++++++---- LuaLibs/ProcessSplit.lua | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/LuaLibs/ProcessHeadCut.lua b/LuaLibs/ProcessHeadCut.lua index 25473aa..315c25a 100644 --- a/LuaLibs/ProcessHeadCut.lua +++ b/LuaLibs/ProcessHeadCut.lua @@ -412,7 +412,8 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut ( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA) local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) - local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) + local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and + ( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) -- verifico necessità di tagli aggiuntivi orizzontali o verticali local dMinOvmHeadForAddeddCuts = 10.123 local bNeedVerticalAddedCuts = ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 00c7063..dbc2862 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -802,6 +802,12 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw) ( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.8 * b3Solid:getDimX())) then return false end + + -- se interessa la coda, e pezzo lungo, si sposta dopo separazione + if b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.AffectedFaces.Left and Proc.Fct >= 2 then + return true + end + -- se una o due facce e interessa veramente la coda, allora di coda if Proc.Fct <= 2 then if Proc.Box:getMin():getX() < b3Solid:getMin():getX() + 1. then @@ -814,10 +820,6 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw) if Proc.AffectedFaces.Left and ( EgtGetInfo( Proc.Id, Q_SAW_PLUS_CHAIN, 'i') or 0) > 0 then return true end - -- se interessa la coda, e pezzo lungo, si sposta dopo separazione - if b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.AffectedFaces.Left and Proc.Fct > 2 then - return true - end -- deve avere la normale principale diretta verso la coda (oppure tunnel) Topology.Classify( Proc, b3Raw) local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc, nPartId) diff --git a/LuaLibs/ProcessSplit.lua b/LuaLibs/ProcessSplit.lua index cb73b07..cfce24d 100644 --- a/LuaLibs/ProcessSplit.lua +++ b/LuaLibs/ProcessSplit.lua @@ -634,7 +634,8 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt ( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)) local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) - local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) + local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and + ( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) -- dati geometrici del taglio local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT) -- separazione solo se esiste grezzo successivo con pezzi o scaricabile From 197673de11f07d677ffe27053522de2c7f269e65 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 12 Mar 2025 18:19:05 +0100 Subject: [PATCH 2/5] - in BacthProcess (Ts7) si forza ricalcolo ad ogni check o check+generate --- BatchProcess.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BatchProcess.lua b/BatchProcess.lua index 30793ea..0138404 100644 --- a/BatchProcess.lua +++ b/BatchProcess.lua @@ -202,7 +202,7 @@ if bBtl and string.find( sTitle, 'Bar_', 1, true) and EgtExistsFile( sNgeFile) t EgtEraseFile( sDiffFile) local _, nDiff = EgtTextFileCompare( BEAM.FILE, sOriFile, ';', sDiffFile) -- se BTL corrente coincide con originale, salto il riprocessamento - if nDiff == 0 then + if nDiff == 0 and sFlag ~= 'CHECK' and sFlag ~= 'CHECK+GENERATE' then bToProcess = false -- se cambiata configurazione macchina da ultima elaborazione, devo riprocessare if EgtCompareFilesLastWriteTime( sOriFile, sMachDir .. '\\Beam\\TS3Data.lua') == -1 or From 60a1707d43a899242e5a425efa11dd340ff6a40b Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Thu, 13 Mar 2025 09:55:09 +0100 Subject: [PATCH 3/5] In Cut, se taglio rivolto verso il basso e non possibile tagliare di fianco, da fare in fase ribaltata --- LuaLibs/ProcessCut.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 1989be8..15ac9eb 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -92,7 +92,7 @@ function ProcessCut.Classify( Proc, b3Raw) -- calcolo l'ingombro orizzontale della faccia local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0) -- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale) - if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and abs( vtN:getY()) > 0.1 and dMaxMat < DimH + BD.CUT_EXTRA) then + if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and ( abs( vtN:getY()) > 0.1 or bDownCut) and dMaxMat < DimH + BD.CUT_EXTRA) then return true, true end end From 8e608bd6239ec36f07ab41d234a35ab8db7392e8 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 17 Mar 2025 10:15:36 +0100 Subject: [PATCH 4/5] - in BeamExec aggiunto ritorno stato e messaggi a interfaccia per Double in tutti i casi --- LuaLibs/BeamExec.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index c4bc448..d2bb52c 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -1863,10 +1863,14 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw) ( BD.DOWN_HEAD and AreOppositeVectorApprox( vtExtr, Y_AX())) then Proc.Double = 2 Proc.MachDepthDouble = dMachiningDepth + Proc.MirrorCutId = ProcToDisable.CutId + Proc.MirrorTaskId = ProcToDisable.TaskId DisableOtherDrilling( ProcToDisable, vProc) elseif BD.DOWN_HEAD and AreSameVectorApprox( vtExtr, Z_AX()) then Proc.Double = 3 Proc.MachDepthDouble = dMachiningDepth + Proc.MirrorCutId = ProcToDisable.CutId + Proc.MirrorTaskId = ProcToDisable.TaskId DisableOtherDrilling( ProcToDisable, vProc) end end @@ -2173,8 +2177,14 @@ function BeamExec.ProcessFeatures() if not bOk then nTotErr = nTotErr + 1 table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end elseif sMsg and #sMsg > 0 then table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end else table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId}) if Proc.Double == 2 or Proc.Double == 3 then @@ -2263,8 +2273,14 @@ function BeamExec.ProcessFeatures() if not bOk then nTotErr = nTotErr + 1 table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end elseif sMsg and #sMsg > 0 then table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end else table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId}) if Proc.Double == 2 or Proc.Double == 3 then @@ -2341,8 +2357,14 @@ function BeamExec.ProcessFeatures() if not bOk then nTotErr = nTotErr + 1 table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end elseif sMsg and #sMsg > 0 then table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) + if Proc.Double == 2 or Proc.Double == 3 then + table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId}) + end else table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) if Proc.Double == 2 or Proc.Double == 3 then From 5fa40fad99a13ed40ebbf1d07201aaebe1b1334e Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 17 Mar 2025 17:47:20 +0100 Subject: [PATCH 5/5] update version e log --- UpdateLog.txt | 7 +++++++ Version.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 54d26d0..c5a1f1a 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,12 @@ ==== Beam Update Log ==== +Versione 2.7c1 (17/03/2025) +- Modif : in HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo +- Modif : in LapJoint migliorato controllo per decidere se feature di coda +- Modif : nei tagli, se taglio rivolto verso il basso e non possibile tagliare di fianco, si fa in fase ribaltata +- Fixed : in BacthProcess (Ts7) corretta restituzione stato feature erroneamente segnalata verde +- Fixed : corretta restituzione stato feature lavorata in doppio + Versione 2.7b3 (03/03/2025) - Modif : in forature passanti orizzontali fatte da un solo lato, si inverte il lato di lavoro in base all'utensile scelto - Modif : in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali; attacchi migliorati diff --git a/Version.lua b/Version.lua index dc5a3f6..4c26eac 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.7b3' +VERSION = '2.7c1' MIN_EXE = '2.6e5'