From ed73898f86349d93dd3fdcf062208d80b7924d10 Mon Sep 17 00:00:00 2001 From: DarioS Date: Thu, 3 Mar 2022 10:56:13 +0100 Subject: [PATCH] DataBeam : - in ordinamento feature per lavorazione i tagli longitudinali vengono messi dopo le altre lavorazioni lunghe - in LapJoint migliorata gestione lama su testa sotto. --- LuaLibs/BeamExec.lua | 8 ++++++-- LuaLibs/ProcessLapJoint.lua | 17 ++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 25abe42..5ed5705 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -567,9 +567,13 @@ local function OrderFeatures( vProc, b3Raw) end -- se primo è taglio longitudinale completo o altra lav. lunga, dopo tutte le altre feature non di coda if abs( B1.Box:getDimX() - b3Raw:getDimX()) < 0.2 * b3Raw:getDimX() then - -- se anche l'altra è lunga, faccio prima quello a Zmax + -- se anche l'altra è lunga, faccio prima quello piccolo in YZ if abs( B2.Box:getDimX() - b3Raw:getDimX()) < 0.2 * b3Raw:getDimX() then - return B1.Box:getMax():getZ() > B2.Box:getMax():getZ() + if abs( B1.Box:getDimY() * B1.Box:getDimZ() - B2.Box:getDimY() * B2.Box:getDimZ()) < 10 then + return B1.Id < B2.Id + else + return B1.Box:getDimY() * B1.Box:getDimZ() < B2.Box:getDimY() * B2.Box:getDimZ() + end else return B2.Tail or B1.Box:getMin():getX() + 20 > B2.Box:getCenter():getX() end diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index aa01042..ecead09 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -2885,9 +2885,11 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end end end + -- verifico se uso lama da sotto + local bCutDown = ( BD.DOWN_HEAD and rfFac:getVersZ():getZ() < - 0.5) -- Recupero il massimo affondamento possibile con la lama local dSawMaxDepth = 0 - local sCutting = ML.FindCutting( 'HeadSide') + local sCutting = ML.FindCutting( 'HeadSide'..EgtIf( bCutDown, '_H2', '')) if sCutting then if EgtMdbSetCurrMachining( sCutting) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) @@ -2904,14 +2906,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, end -- Se entrambi gli estremi sono aperti e possibile, lavoro con la lama if bOpenStart and bOpenEnd and bForceUseBlade and dElev < dSawMaxDepth + 10 * GEO.EPS_SMALL then - -- Recupero la lavorazione di lama - local sCutting = ML.FindCutting( 'HeadSide') - if not sCutting then - local sErr = 'Error : HeadSide (cutting) not found in library' - EgtOutLog( sErr) - return false, sErr, 'MNF' - end - -- recupero i dati dell'utensile + -- recupero altri dati dell'utensile local dSawDiam = 400 local dSawThick = 4 if EgtMdbSetCurrMachining( sCutting) then @@ -5531,8 +5526,8 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) local bDownHead = TestTwoFacesDownHead( Proc) -- determino l'angolo tra le facce local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT) - -- se ortogonali e non forzata lama oppure con testa da sotto, con fresa - if ( not bUseBlade or bDownHead) and bAdj and abs( dAng + 90) < 1 then + -- se ortogonali e non forzata lama, con fresa + if not bUseBlade and bAdj and abs( dAng + 90) < 1 then -- se piccole if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) then return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)